KiCad PCB EDA Suite
Loading...
Searching...
No Matches
IDF_EXPORTER Class Reference

#include <export_idf.h>

Public Member Functions

 IDF_EXPORTER (BOARD *aBoard, FILENAME_RESOLVER *aResolver, JOB_EXPORT_PCB_IDF *aSettings, REPORTER *aReporter=nullptr)
 
bool Export (const wxString &aFullFileName) const
 Generate IDFv3 compliant board (*.emn) and library (*.emp) files for aPcb.
 

Private Member Functions

VECTOR2D getOrigin () const
 
void exportFootprint (FOOTPRINT *aFootprint, IDF3_BOARD &aIDFBoard) const
 Exports the given footprint to an in-progress IDF file.
 
bool exportFootprintIdfModels (FOOTPRINT *aFootprint, IDF3_BOARD &aIDFBoard) const
 Exports any explicit IDF models attached to a footprint to an in-progress IDF file.
 
IDF3_COMP_OUTLINE * createOutlineFromExtrudedBody (const FOOTPRINT *aFootprint, IDF3_BOARD &aIDFBoard, const EXTRUDED_3D_BODY &aBody) const
 Generates an IDF component outline from a footprint extruded 3D body, if possible.
 
int getMaxModelHeight (FOOTPRINT *aFootprint) const
 Returns the largest extent in Z of the footprint's visible 3D models, in IU.
 

Private Attributes

BOARD * m_board = nullptr
 
FILENAME_RESOLVER * m_resolver = nullptr
 
JOB_EXPORT_PCB_IDF * m_settings = nullptr
 
REPORTER * m_reporter = nullptr
 
std::unique_ptr< JOB_EXPORT_PCB_IDF > m_defaultSettings
 

Detailed Description

Definition at line 36 of file export_idf.h.

Constructor & Destructor Documentation

◆ IDF_EXPORTER()

IDF_EXPORTER::IDF_EXPORTER ( BOARD * aBoard,
FILENAME_RESOLVER * aResolver,
JOB_EXPORT_PCB_IDF * aSettings,
REPORTER * aReporter = nullptr )
explicit

Definition at line 53 of file export_idf.cpp.

References m_board, m_defaultSettings, m_reporter, m_resolver, and m_settings.

Member Function Documentation

◆ createOutlineFromExtrudedBody()

◆ Export()

bool IDF_EXPORTER::Export ( const wxString & aFullFileName) const

Generate IDFv3 compliant board (*.emn) and library (*.emp) files for aPcb.

Headless-friendly core of the IDF exporter. aResolver locates 3D model files and must be non-null; the GUI passes the project resolver while non-GUI callers may pass a bare resolver. On failure the routine returns false and, when aErrorMsg is non-null, stores a human-readable message rather than showing a dialog.

Definition at line 1054 of file export_idf.cpp.

References _, IDF3::CAD_ELEC, exportFootprint(), From_UTF8(), GetBuildVersion(), IDF3_BOARD::GetError(), getOrigin(), idf_export_outline(), FILEEXT::IdfV3BoardFileExtension, FILEEXT::IdfV3LibraryFileExtension, m_board, m_reporter, m_resolver, m_settings, IDF_SETTINGS::MILS, pcbIUScale, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, scale, IDF3_BOARD::SetBoardName(), IDF3_BOARD::SetBoardThickness(), IDF3_BOARD::SetBoardVersion(), IDF3_BOARD::SetIDFSource(), IDF3_BOARD::SetLibraryVersion(), IDF3_BOARD::SetUserOffset(), IDF3_BOARD::SetUserPrecision(), IDF3_BOARD::SetUserScale(), TO_UTF8, IDF3::UNIT_MM, IDF3::UNIT_THOU, IO_ERROR::What(), IDF3_BOARD::WriteFile(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DIALOG_EXPORT_IDF3::doExport(), and PCBNEW_JOBS_HANDLER::JobExportIdf().

◆ exportFootprint()

void IDF_EXPORTER::exportFootprint ( FOOTPRINT * aFootprint,
IDF3_BOARD & aIDFBoard ) const
private

◆ exportFootprintIdfModels()

◆ getMaxModelHeight()

int IDF_EXPORTER::getMaxModelHeight ( FOOTPRINT * aFootprint) const
private

◆ getOrigin()

VECTOR2D IDF_EXPORTER::getOrigin ( ) const
private

Member Data Documentation

◆ m_board

BOARD* IDF_EXPORTER::m_board = nullptr
private

◆ m_defaultSettings

std::unique_ptr<JOB_EXPORT_PCB_IDF> IDF_EXPORTER::m_defaultSettings
private

Definition at line 76 of file export_idf.h.

Referenced by IDF_EXPORTER().

◆ m_reporter

REPORTER* IDF_EXPORTER::m_reporter = nullptr
private

◆ m_resolver

FILENAME_RESOLVER* IDF_EXPORTER::m_resolver = nullptr
private

◆ m_settings

JOB_EXPORT_PCB_IDF* IDF_EXPORTER::m_settings = nullptr
private

The documentation for this class was generated from the following files: