KiCad PCB EDA Suite
Loading...
Searching...
No Matches
export_idf.cpp File Reference
#include <list>
#include <optional>
#include <locale_io.h>
#include <macros.h>
#include <pcb_edit_frame.h>
#include <board.h>
#include <board_design_settings.h>
#include <footprint.h>
#include <footprint_library_adapter.h>
#include <io/idf/idf_parser.h>
#include <pad.h>
#include <pcb_shape.h>
#include <build_version.h>
#include <project_pcb.h>
#include <reporter.h>
#include "project.h"
#include "3d_cache/3d_cache.h"
#include "filename_resolver.h"
#include "export_idf.h"
#include <3d_math.h>
#include <3d_rendering/3d_placeholder_utils.h>
#include <base_units.h>
#include <jobs/job_export_pcb_idf.h>

Go to the source code of this file.

Macros

#define LINE_WIDTH   (pcbIUScale.mmToIU( 0.1 ))
 

Functions

static void idf_append_shape (PCB_SHAPE *aGraphic, double aScale, double aOffX, double aOffY, std::list< IDF_SEGMENT * > &aLines)
 Convert a single Edge_Cuts graphic into IDF segments and append them to aLines.
 
static void idf_export_outline (BOARD *aPcb, IDF3_BOARD &aIDFBoard)
 Retrieve line segment information from the edge layer and compiles the data into a form which can be output as an IDFv3 compliant BOARD_OUTLINE section.
 
static std::optional< double > getModelHeight (const S3DMODEL &aModel, const VECTOR3D &aRotation, const VECTOR3D &aScale)
 Returns the largest board Z value, in mm, of the given model.
 

Macro Definition Documentation

◆ LINE_WIDTH

#define LINE_WIDTH   (pcbIUScale.mmToIU( 0.1 ))

Definition at line 50 of file export_idf.cpp.

Referenced by idf_export_outline().

Function Documentation

◆ getModelHeight()

static std::optional< double > getModelHeight ( const S3DMODEL & aModel,
const VECTOR3D & aRotation,
const VECTOR3D & aScale )
static

Returns the largest board Z value, in mm, of the given model.

Definition at line 336 of file export_idf.cpp.

References CalcModelMatrix(), S3DMODEL::m_Meshes, S3DMODEL::m_MeshesSize, SMESH::m_Positions, SMESH::m_VertexSize, VECTOR3< T >::x, VECTOR3< T >::y, and VECTOR3< T >::z.

Referenced by IDF_EXPORTER::getMaxModelHeight().

◆ idf_append_shape()

static void idf_append_shape ( PCB_SHAPE * aGraphic,
double aScale,
double aOffX,
double aOffY,
std::list< IDF_SEGMENT * > & aLines )
static

◆ idf_export_outline()

static void idf_export_outline ( BOARD * aPcb,
IDF3_BOARD & aIDFBoard )
static