|
KiCad PCB EDA Suite
|
#include <list>#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 <idf_parser.h>#include <pad.h>#include <pcb_shape.h>#include <build_version.h>#include <project_pcb.h>#include <wx/msgdlg.h>#include "project.h"#include "3d_cache/3d_cache.h"#include "filename_resolver.h"#include "export_idf.h"#include <base_units.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 void | idf_export_footprint (BOARD *aPcb, FOOTPRINT *aFootprint, IDF3_BOARD &aIDFBoard, bool aIncludeUnspecified, bool aIncludeDNP) |
| Retrieve information from all board footprints, adds drill holes to the DRILLED_HOLES or BOARD_OUTLINE section as appropriate, Compiles data for the PLACEMENT section and compiles data for the library ELECTRICAL section. | |
| bool | ExportBoardToIDF3 (BOARD *aPcb, const wxString &aFullFileName, bool aUseThou, double aXRef, double aYRef, bool aIncludeUnspecified, bool aIncludeDNP, FILENAME_RESOLVER *aResolver, wxString *aErrorMsg) |
| Generate IDFv3 compliant board (*.emn) and library (*.emp) files representing the user's PCB design. | |
Variables | |
| static FILENAME_RESOLVER * | resolver |
| #define LINE_WIDTH (pcbIUScale.mmToIU( 0.1 )) |
Definition at line 46 of file export_idf.cpp.
Referenced by idf_export_outline().
| bool ExportBoardToIDF3 | ( | BOARD * | aPcb, |
| const wxString & | aFullFileName, | ||
| bool | aUseThou, | ||
| double | aXRef, | ||
| double | aYRef, | ||
| bool | aIncludeUnspecified, | ||
| bool | aIncludeDNP, | ||
| FILENAME_RESOLVER * | aResolver, | ||
| wxString * | aErrorMsg ) |
Generate IDFv3 compliant board (*.emn) and library (*.emp) files representing the user's PCB design.
Generate IDFv3 compliant board (*.emn) and library (*.emp) files for aPcb.
Split out from PCB_EDIT_FRAME::Export_IDF3 so it can be driven headlessly (unit tests, CLI) with an explicitly supplied 3D model resolver and no GUI error reporting.
Definition at line 681 of file export_idf.cpp.
References BOARD::Footprints(), From_UTF8(), BOARD_DESIGN_SETTINGS::GetBoardThickness(), GetBuildVersion(), BOARD::GetDesignSettings(), BOARD::GetFileName(), idf_export_footprint(), idf_export_outline(), pcbIUScale, resolver, scale, TO_UTF8, and IO_ERROR::What().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PCB_EDIT_FRAME::Export_IDF3().
|
static |
Convert a single Edge_Cuts graphic into IDF segments and append them to aLines.
Shared between the board outline and footprint cutout emitters so both encode identical geometry into the BOARD_OUTLINE section.
Definition at line 58 of file export_idf.cpp.
References ARC, EDA_ANGLE::AsDegrees(), BEZIER, chain, CIRCLE, SHAPE_POLY_SET::COutline(), end, EDA_SHAPE::GetArcAngle(), EDA_SHAPE::GetBezierPoints(), PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), EDA_SHAPE::IsPolyShapeValid(), left, SHAPE_POLY_SET::OutlineCount(), POLY, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), RECTANGLE, right, SEGMENT, top(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by idf_export_footprint(), and idf_export_outline().
|
static |
Retrieve information from all board footprints, adds drill holes to the DRILLED_HOLES or BOARD_OUTLINE section as appropriate, Compiles data for the PLACEMENT section and compiles data for the library ELECTRICAL section.
Definition at line 325 of file export_idf.cpp.
References EDA_ANGLE::AsDegrees(), B_Cu, comp, Edge_Cuts, PROJECT_PCB::FootprintLibAdapter(), FP_SMD, FP_THROUGH_HOLE, FOOTPRINT::GetAttributes(), BOARD::GetCurrentVariant(), FOOTPRINT::GetDNPForVariant(), BOARD::GetEmbeddedFiles(), FOOTPRINT::GetEmbeddedFiles(), FOOTPRINT::GetFPID(), LIBRARY_MANAGER::GetFullURI(), FOOTPRINT::GetLayer(), LIB_ID::GetLibNickname(), FOOTPRINT::GetOrientation(), FOOTPRINT::GetPosition(), BOARD::GetProject(), LIBRARY_MANAGER_ADAPTER::GetRow(), PCB_FIELD::GetShownText(), FOOTPRINT::GraphicalItems(), idf_append_shape(), FOOTPRINT::Models(), NPTH, OBLONG, pad, FOOTPRINT::Pads(), PCB_SHAPE_T, FOOTPRINT::Reference(), resolver, RotatePoint(), scale, TO_UTF8, top(), FOOTPRINT::Value(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ExportBoardToIDF3().
|
static |
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.
Definition at line 196 of file export_idf.cpp.
References BOARD::Drawings(), Edge_Cuts, BOARD::GetBoardEdgesBoundingBox(), BOX2< Vec >::GetOrigin(), BOX2< Vec >::GetSize(), idf_append_shape(), LINE_WIDTH, PCB_SHAPE_T, and scale.
Referenced by ExportBoardToIDF3().
|
static |
Definition at line 49 of file export_idf.cpp.
Referenced by DIALOG_MIGRATE_3D_MODELS::AutoMigrateByFilename(), DIALOG_MIGRATE_3D_MODELS::BoardHasUnresolvedWrlReferences(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DIALOG_MIGRATE_3D_MODELS::buildCatalog(), PCB_CONTROL::CollectAndEmbed3DModels(), DIALOG_MIGRATE_3D_MODELS::collectMissingModels(), DIALOG_MIGRATE_3D_MODELS::CountUnresolvedWrlReferences(), EXPRESSION_EVALUATOR::createCombinedCallback(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), PCB_TUNING_PATTERN::EditStart(), ExportBoardToIDF3(), PCB_FIELD::GetShownText(), PCB_TEXT::GetShownText(), PCB_TEXTBOX::GetShownText(), KIPLATFORM::ENV::GetSystemProxyConfig(), idf_export_footprint(), BOARD_LOADER::initializeLoadedBoard(), PCB_EDIT_FRAME::LoadDrawingSheet(), SCH_EDIT_FRAME::LoadDrawingSheet(), PCBNEW_JOBS_HANDLER::loadOverrideDrawingSheet(), DRC_ENGINE::loadRules(), PANEL_SETUP_RULES::OnCompile(), DIALOG_MIGRATE_3D_MODELS::OnReplaceClick(), PANEL_SETUP_RULES::OnShowMatching(), SIM_LIB_MGR::ResolveLibraryPath(), and ROUTER_TOOL::UpdateMessagePanel().