KiCad PCB EDA Suite
|
#include <pcb_io_ipc2581.h>
Public Member Functions | |
PCB_IO_IPC2581 () | |
PCB_IO_IPC2581. | |
~PCB_IO_IPC2581 () override | |
This program source code file is part of KiCad, a free EDA CAD application. | |
void | SaveBoard (const wxString &aFileName, BOARD *aBoard, const STRING_UTF8_MAP *aProperties=nullptr) override |
Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be used to write a portion of aBoard to a special kind of export file. | |
const IO_BASE::IO_FILE_DESC | GetBoardFileDesc () const override |
Returns board file description for the PCB_IO. | |
const IO_BASE::IO_FILE_DESC | GetLibraryDesc () const override |
Get the descriptor for the library container that this IO plugin operates on. | |
std::vector< FOOTPRINT * > | GetImportedCachedLibraryFootprints () override |
Return a container with the cached library footprints generated in the last call to Load. | |
long long | GetLibraryTimestamp (const wxString &aLibraryPath) const override |
Generate a timestamp representing all the files in the library (including the library directory). | |
bool | CanReadBoard (const wxString &aFileName) const override |
Checks if this PCB_IO can read the specified board file. | |
bool | CanReadFootprint (const wxString &aFileName) const override |
Checks if this PCB_IO can read a footprint from specified file or directory. | |
bool | CanReadLibrary (const wxString &aFileName) const override |
Checks if this IO object can read the specified library file/directory. | |
virtual void | SetQueryUserCallback (std::function< bool(wxString aTitle, int aIcon, wxString aMessage, wxString aAction)> aCallback) |
Registers a KIDIALOG callback for collecting info from the user. | |
virtual BOARD * | LoadBoard (const wxString &aFileName, BOARD *aAppendToMe, const STRING_UTF8_MAP *aProperties=nullptr, PROJECT *aProject=nullptr) |
Load information from some input file format that this PCB_IO implementation knows about into either a new BOARD or an existing one. | |
virtual void | FootprintEnumerate (wxArrayString &aFootprintNames, const wxString &aLibraryPath, bool aBestEfforts, const STRING_UTF8_MAP *aProperties=nullptr) |
Return a list of footprint names contained within the library at aLibraryPath. | |
virtual void | PrefetchLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) |
If possible, prefetches the specified library (e.g. | |
virtual FOOTPRINT * | ImportFootprint (const wxString &aFootprintPath, wxString &aFootprintNameOut, const STRING_UTF8_MAP *aProperties=nullptr) |
Load a single footprint from aFootprintPath and put its name in aFootprintNameOut. | |
virtual FOOTPRINT * | FootprintLoad (const wxString &aLibraryPath, const wxString &aFootprintName, bool aKeepUUID=false, const STRING_UTF8_MAP *aProperties=nullptr) |
Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PCB_IO knows about. | |
virtual const FOOTPRINT * | GetEnumeratedFootprint (const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr) |
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management. | |
virtual bool | FootprintExists (const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr) |
Check for the existence of a footprint. | |
virtual void | FootprintSave (const wxString &aLibraryPath, const FOOTPRINT *aFootprint, const STRING_UTF8_MAP *aProperties=nullptr) |
Write aFootprint to an existing library located at aLibraryPath. | |
virtual void | FootprintDelete (const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr) |
Delete aFootprintName from the library at aLibraryPath. | |
virtual void | GetLibraryOptions (STRING_UTF8_MAP *aListToAppendTo) const override |
Append supported PLUGIN options to aListToAppenTo along with internationalized descriptions. | |
const wxString & | GetName () const |
Return a brief hard coded name for this IO interface. | |
virtual void | SetReporter (REPORTER *aReporter) |
Set an optional reporter for warnings/errors. | |
virtual void | SetProgressReporter (PROGRESS_REPORTER *aReporter) |
Set an optional progress reporter. | |
virtual const IO_FILE_DESC | GetLibraryFileDesc () const |
Get the descriptor for the individual library elements that this IO plugin operates on. | |
virtual void | CreateLibrary (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) |
Create a new empty library at aLibraryPath empty. | |
virtual bool | DeleteLibrary (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) |
Delete an existing library and returns true, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason. | |
virtual bool | IsLibraryWritable (const wxString &aLibraryPath) |
Return true if the library at aLibraryPath is writable. | |
virtual void | RegisterLayerMappingCallback (LAYER_MAPPING_HANDLER aLayerMappingHandler) |
Register a different handler to be called when mapping of input layers to KiCad layers occurs. | |
Protected Attributes | |
wxString | m_name |
Name of the IO loader. | |
REPORTER * | m_reporter |
Reporter to log errors/warnings to, may be nullptr. | |
PROGRESS_REPORTER * | m_progressReporter |
Progress reporter to track the progress of the operation, may be nullptr. | |
LAYER_MAPPING_HANDLER | m_layer_mapping_handler |
Callback to get layer mapping. | |
Private Member Functions | |
void | clearLoadedFootprints () |
Return the automapped layers. | |
wxXmlNode * | generateXmlHeader () |
Creates the XML header for IPC-2581. | |
wxXmlNode * | generateContentSection () |
Creates the Content section of the XML file. | |
wxXmlNode * | generateLogisticSection () |
Creates the logistical data header. | |
wxXmlNode * | generateHistorySection () |
Creates the history section. | |
wxXmlNode * | generateBOMSection (wxXmlNode *aEcadNode) |
Creates the BOM section. | |
wxXmlNode * | generateEcadSection () |
Creates the ECAD section. | |
wxXmlNode * | generateAvlSection () |
Creates the Approved Vendor List section. | |
void | generateCadLayers (wxXmlNode *aCadLayerNode) |
void | generateDrillLayers (wxXmlNode *aCadLayerNode) |
void | generateStepSection (wxXmlNode *aCadNode) |
void | generateProfile (wxXmlNode *aStepNode) |
void | generateLogicalNets (wxXmlNode *aStepNode) |
void | generatePhyNetGroup (wxXmlNode *aStepNode) |
void | generateLayerFeatures (wxXmlNode *aStepNode) |
void | generateLayerSetDrill (wxXmlNode *aStepNode) |
void | generateLayerSetNet (wxXmlNode *aLayerNode, PCB_LAYER_ID aLayer, std::vector< BOARD_ITEM * > &aItems) |
wxXmlNode * | generateContentStackup (wxXmlNode *aContentNode) |
void | generateComponents (wxXmlNode *aStepNode) |
void | addCadHeader (wxXmlNode *aEcadNode) |
wxXmlNode * | addPackage (wxXmlNode *aStepNode, FOOTPRINT *aFootprint) |
void | addPad (wxXmlNode *aContentNode, const PAD *aPad, PCB_LAYER_ID aLayer) |
void | addVia (wxXmlNode *aContentNode, const PCB_VIA *aVia, PCB_LAYER_ID aLayer) |
void | addPadStack (wxXmlNode *aContentNode, const PAD *aPad) |
void | addPadStack (wxXmlNode *aContentNode, const PCB_VIA *aVia) |
void | addLocationNode (wxXmlNode *aContentNode, double aX, double aY) |
void | addLocationNode (wxXmlNode *aContentNode, const PAD &aPad, bool aRelative) |
void | addLocationNode (wxXmlNode *aContentNode, const PCB_SHAPE &aShape) |
void | addShape (wxXmlNode *aContentNode, const PCB_SHAPE &aShape) |
void | addShape (wxXmlNode *aContentNode, const PAD &aPad, PCB_LAYER_ID aLayer) |
void | addSlotCavity (wxXmlNode *aContentNode, const PAD &aPad, const wxString &aName) |
void | addText (wxXmlNode *aContentNode, EDA_TEXT *aShape, const KIFONT::METRICS &aFontMetrics) |
void | addLineDesc (wxXmlNode *aNode, int aWidth, LINE_STYLE aDashType, bool aForce=false) |
void | addFillDesc (wxXmlNode *aNode, FILL_T aFillType, bool aForce=false) |
bool | addPolygonNode (wxXmlNode *aParentNode, const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType=FILL_T::FILLED_SHAPE, int aWidth=0, LINE_STYLE aDashType=LINE_STYLE::SOLID) |
bool | addPolygonCutouts (wxXmlNode *aParentNode, const SHAPE_POLY_SET::POLYGON &aPolygon) |
bool | addOutlineNode (wxXmlNode *aParentNode, const SHAPE_POLY_SET &aPolySet, int aWidth=0, LINE_STYLE aDashType=LINE_STYLE::SOLID) |
bool | addContourNode (wxXmlNode *aParentNode, const SHAPE_POLY_SET &aPolySet, int aOutline=0, FILL_T aFillType=FILL_T::FILLED_SHAPE, int aWidth=0, LINE_STYLE aDashType=LINE_STYLE::SOLID) |
size_t | lineHash (int aWidth, LINE_STYLE aDashType) |
size_t | shapeHash (const PCB_SHAPE &aShape) |
wxString | genString (const wxString &aStr, const char *aPrefix=nullptr) const |
wxString | floatVal (double aVal) |
wxString | pinName (const PAD *aPad) const |
wxString | componentName (FOOTPRINT *aFootprint) |
void | addXY (wxXmlNode *aNode, const VECTOR2I &aVec, const char *aXName=nullptr, const char *aYName=nullptr) |
void | addAttribute (wxXmlNode *aNode, const wxString &aName, const wxString &aValue) |
wxXmlNode * | insertNode (wxXmlNode *aParent, const wxString &aName) |
wxXmlNode * | appendNode (wxXmlNode *aParent, const wxString &aName) |
void | appendNode (wxXmlNode *aParent, wxXmlNode *aNode) |
void | insertNode (wxXmlNode *aParent, wxXmlNode *aNode) |
void | insertNodeAfter (wxXmlNode *aPrev, wxXmlNode *aNode) |
void | addLayerAttributes (wxXmlNode *aNode, PCB_LAYER_ID aLayer) |
bool | isValidLayerFor2581 (PCB_LAYER_ID aLayer) |
Private Attributes | |
LAYER_MAPPING_HANDLER | m_layerMappingHandler |
bool | m_show_layer_mapping_warnings |
size_t | m_total_bytes |
wxString | m_units_str |
double | m_scale |
int | m_sigfig |
char | m_version |
wxString | m_OEMRef |
wxString | m_mpn |
wxString | m_mfg |
wxString | m_distpn |
wxString | m_dist |
wxXmlNode * | m_enterpriseNode |
BOARD * | m_board |
std::vector< FOOTPRINT * > | m_loaded_footprints |
const STRING_UTF8_MAP * | m_props |
std::map< size_t, wxString > | m_user_shape_dict |
wxXmlNode * | m_shape_user_node |
std::map< size_t, wxString > | m_std_shape_dict |
wxXmlNode * | m_shape_std_node |
std::map< size_t, wxString > | m_line_dict |
wxXmlNode * | m_line_node |
std::map< size_t, wxString > | m_padstack_dict |
std::vector< wxXmlNode * > | m_padstacks |
wxXmlNode * | m_last_padstack |
std::map< size_t, wxString > | m_footprint_dict |
std::map< wxString, FOOTPRINT * > | m_footprint_refdes_dict |
std::map< FOOTPRINT *, wxString > | m_footprint_refdes_reverse_dict |
std::map< FOOTPRINT *, wxString > | m_OEMRef_dict |
std::map< int, std::vector< std::pair< wxString, wxString > > > | m_net_pin_dict |
std::map< PCB_LAYER_ID, wxString > | m_layer_name_map |
std::map< std::pair< PCB_LAYER_ID, PCB_LAYER_ID >, std::vector< BOARD_ITEM * > > | m_drill_layers |
std::map< std::pair< PCB_LAYER_ID, PCB_LAYER_ID >, std::vector< PAD * > > | m_slot_holes |
PROGRESS_REPORTER * | m_progress_reporter |
std::set< wxUniChar > | m_acceptable_chars |
wxXmlDocument * | m_xml_doc |
wxXmlNode * | m_xml_root |
Definition at line 49 of file pcb_io_ipc2581.h.
|
inline |
Definition at line 56 of file pcb_io_ipc2581.h.
References m_board, m_enterpriseNode, m_last_padstack, m_line_node, m_progress_reporter, m_props, m_scale, m_shape_std_node, m_shape_user_node, m_show_layer_mapping_warnings, m_sigfig, m_total_bytes, m_version, m_xml_doc, and m_xml_root.
|
override |
This program source code file is part of KiCad, a free EDA CAD application.
Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition at line 58 of file pcb_io_ipc2581.cpp.
References clearLoadedFootprints().
|
private |
Definition at line 284 of file pcb_io_ipc2581.cpp.
References m_total_bytes.
Referenced by addCadHeader(), addFillDesc(), addLayerAttributes(), addLineDesc(), addPackage(), addPad(), addPadStack(), addShape(), addSlotCavity(), addXY(), generateAvlSection(), generateBOMSection(), generateCadLayers(), generateComponents(), generateContentSection(), generateContentStackup(), generateDrillLayers(), generateEcadSection(), generateHistorySection(), generateLayerSetDrill(), generateLayerSetNet(), generateLogicalNets(), generateLogisticSection(), generateStepSection(), and generateXmlHeader().
|
private |
Definition at line 1339 of file pcb_io_ipc2581.cpp.
References addAttribute(), appendNode(), and m_units_str.
Referenced by generateEcadSection().
|
private |
Definition at line 1849 of file pcb_io_ipc2581.cpp.
References addPolygonCutouts(), addPolygonNode(), appendNode(), SHAPE_POLY_SET::OutlineCount(), and SHAPE_POLY_SET::Polygon().
Referenced by addPackage(), addShape(), and generateLayerSetNet().
|
private |
Definition at line 509 of file pcb_io_ipc2581.cpp.
References addAttribute(), and appendNode().
Referenced by addPolygonNode(), and addShape().
|
private |
Definition at line 1352 of file pcb_io_ipc2581.cpp.
References addAttribute(), B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, IsCopperLayer(), Margin, User_1, User_2, User_3, User_4, User_5, User_6, User_7, User_8, and User_9.
Referenced by generateCadLayers().
|
private |
Definition at line 529 of file pcb_io_ipc2581.cpp.
References addAttribute(), appendNode(), floatVal(), lineHash(), m_line_dict, m_line_node, m_scale, and name.
Referenced by addOutlineNode(), addPackage(), addPolygonNode(), addShape(), and addText().
|
private |
Definition at line 370 of file pcb_io_ipc2581.cpp.
References addLocationNode(), BOARD_ITEM::GetFPRelativePosition(), PAD::GetOffset(), PAD::GetPosition(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Definition at line 386 of file pcb_io_ipc2581.cpp.
References addLocationNode(), PCB_SHAPE::GetPosition(), EDA_SHAPE::GetRectangleHeight(), EDA_SHAPE::GetRectangleWidth(), and EDA_SHAPE::GetShape().
|
private |
Definition at line 364 of file pcb_io_ipc2581.cpp.
References addXY(), and appendNode().
Referenced by addLocationNode(), addPackage(), addPad(), addPadStack(), addSlotCavity(), addVia(), generateComponents(), and generateLayerSetNet().
|
private |
Definition at line 1821 of file pcb_io_ipc2581.cpp.
References addLineDesc(), addPolygonNode(), appendNode(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), SHAPE_LINE_CHAIN::PointCount(), and SHAPE_POLY_SET::Polygon().
Referenced by addPackage(), and addSlotCavity().
|
private |
IPC2581 only supports the documentation layers for production and post-production All other layers are ignored TODO: Decide if we should place the other layers from footprints on the board
Definition at line 1895 of file pcb_io_ipc2581.cpp.
References addAttribute(), addContourNode(), addLineDesc(), addLocationNode(), addOutlineNode(), addPadStack(), addPolygonNode(), addShape(), addText(), ANGLE_0, appendNode(), B_CrtYd, B_Fab, B_SilkS, FOOTPRINT::Clone(), dummy, ERROR_INSIDE, F_CrtYd, F_Cu, F_Fab, F_SilkS, floatVal(), genString(), EDA_SHAPE::GetShape(), hash_fp_item(), HASH_POS, insertNode(), m_footprint_dict, m_net_pin_dict, name, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), pad, PCB_SHAPE_T, PCB_TEXT_T, PCB_TEXTBOX_T, pinName(), REL_COORD, text, and SHAPE_LINE_CHAIN::Width().
Referenced by generateComponents().
|
private |
Definition at line 1587 of file pcb_io_ipc2581.cpp.
References addAttribute(), addLocationNode(), addPadStack(), addShape(), ANGLE_0, appendNode(), EDA_ANGLE::AsDegrees(), componentName(), floatVal(), PAD::GetOrientation(), BOARD_ITEM::GetParentFootprint(), FOOTPRINT::IsFlipped(), EDA_ANGLE::Normalize(), and pinName().
Referenced by generateLayerSetNet().
|
private |
Definition at line 1633 of file pcb_io_ipc2581.cpp.
References addAttribute(), addLocationNode(), addShape(), addXY(), appendNode(), PAD::FlashLayer(), floatVal(), PAD::GetAttribute(), PAD::GetDrillSize(), PAD::GetDrillSizeX(), PAD::GetDrillSizeY(), PAD::GetLayerSet(), PAD::GetOffset(), BOARD_ITEM::GetParentFootprint(), EDA_SHAPE::GetStart(), hash_fp_item(), PAD::HasHole(), BOARD::IsLayerEnabled(), m_board, m_layer_name_map, m_padstack_dict, m_padstacks, m_scale, name, LSET::Seq(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetStart(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by addPackage(), addPad(), and addVia().
|
private |
Definition at line 1694 of file pcb_io_ipc2581.cpp.
References addAttribute(), addLocationNode(), addShape(), appendNode(), PCB_VIA::FlashLayer(), floatVal(), PCB_VIA::GetDrillValue(), PCB_VIA::GetLayerSet(), PCB_TRACK::GetWidth(), hash_fp_item(), insertNodeAfter(), BOARD::IsLayerEnabled(), KiROUND(), m_board, m_last_padstack, m_layer_name_map, m_padstack_dict, m_scale, name, LSET::Seq(), and EDA_SHAPE::SetEnd().
|
private |
Definition at line 1795 of file pcb_io_ipc2581.cpp.
References addXY(), and appendNode().
Referenced by addContourNode().
|
private |
Definition at line 1745 of file pcb_io_ipc2581.cpp.
References addFillDesc(), addLineDesc(), addXY(), and appendNode().
Referenced by addContourNode(), addOutlineNode(), addPackage(), and generateProfile().
|
private |
Definition at line 705 of file pcb_io_ipc2581.cpp.
References std::abs(), addAttribute(), addContourNode(), SHAPE_POLY_SET::Append(), appendNode(), B_Mask, B_Paste, chamfer, F_Mask, F_Paste, floatVal(), PAD::GetChamferPositions(), PAD::GetChamferRectRatio(), PAD::GetDelta(), BOARD::GetDesignSettings(), PAD::GetRoundRectCornerRadius(), PAD::GetShape(), PAD::GetSize(), PAD::GetSizeX(), PAD::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), hash_fp_item(), SHAPE_POLY_SET::InflateWithLinkedHoles(), KiROUND(), m_board, BOARD_DESIGN_SETTINGS::m_MaxError, m_scale, m_shape_std_node, m_std_shape_dict, PAD::MergePrimitivesAsPolygon(), name, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::PM_FAST, RECT_CHAMFER_BOTTOM_LEFT, RECT_CHAMFER_BOTTOM_RIGHT, RECT_CHAMFER_TOP_LEFT, RECT_CHAMFER_TOP_RIGHT, VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Definition at line 899 of file pcb_io_ipc2581.cpp.
References std::abs(), addAttribute(), addContourNode(), addFillDesc(), addLineDesc(), addXY(), appendNode(), floatVal(), EDA_SHAPE::GetBezierC1(), EDA_SHAPE::GetBezierC2(), PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetFillMode(), STROKE_PARAMS::GetLineStyle(), BEZIER_POLY::GetPoly(), EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetRectangleHeight(), EDA_SHAPE::GetRectangleWidth(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), PCB_SHAPE::GetStroke(), STROKE_PARAMS::GetWidth(), EDA_SHAPE::IsClockwiseArc(), m_scale, m_shape_user_node, m_user_shape_dict, name, SHAPE_POLY_SET::OutlineCount(), and shapeHash().
Referenced by addPackage(), addPad(), addPadStack(), addVia(), and generateLayerSetNet().
|
private |
Definition at line 1093 of file pcb_io_ipc2581.cpp.
References addAttribute(), addLocationNode(), addOutlineNode(), appendNode(), ERROR_INSIDE, PAD::GetAttribute(), PAD::GetEffectiveShape(), and m_version.
Referenced by generateLayerSetDrill().
|
private |
Definition at line 584 of file pcb_io_ipc2581.cpp.
References addLineDesc(), addXY(), appendNode(), EDA_TEXT::GetAttributes(), EDA_TEXT::GetDrawRotation(), EDA_TEXT::GetEffectiveTextPenWidth(), EDA_TEXT::GetFont(), KIFONT::FONT::GetFont(), EDA_TEXT::IsVisible(), TEXT_ATTRIBUTES::m_Angle, TEXT_ATTRIBUTES::m_Multiline, and TEXT_ATTRIBUTES::m_StrokeWidth.
Referenced by addPackage(), and generateLayerSetNet().
|
private |
Definition at line 1616 of file pcb_io_ipc2581.cpp.
References addLocationNode(), addPadStack(), addShape(), appendNode(), PCB_VIA::FlashLayer(), PCB_VIA::GetPosition(), PCB_TRACK::GetWidth(), KiROUND(), EDA_SHAPE::SetEnd(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by generateLayerSetNet().
|
private |
Definition at line 269 of file pcb_io_ipc2581.cpp.
References addAttribute(), floatVal(), m_scale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by addLocationNode(), addPadStack(), addPolygonCutouts(), addPolygonNode(), addShape(), addText(), and generateLayerSetDrill().
|
private |
Definition at line 149 of file pcb_io_ipc2581.cpp.
References appendNode().
Referenced by addCadHeader(), addContourNode(), addFillDesc(), addLineDesc(), addLocationNode(), addOutlineNode(), addPackage(), addPad(), addPadStack(), addPolygonCutouts(), addPolygonNode(), addShape(), addSlotCavity(), addText(), addVia(), appendNode(), generateAvlSection(), generateBOMSection(), generateCadLayers(), generateComponents(), generateContentSection(), generateContentStackup(), generateDrillLayers(), generateEcadSection(), generateHistorySection(), generateLayerSetDrill(), generateLayerSetNet(), generateLogicalNets(), generateLogisticSection(), generateProfile(), and generateStepSection().
|
private |
Definition at line 124 of file pcb_io_ipc2581.cpp.
References m_total_bytes.
|
inlineoverridevirtual |
Checks if this PCB_IO can read the specified board file.
If not overriden, extension check is used.
Reimplemented from PCB_IO.
Definition at line 105 of file pcb_io_ipc2581.h.
|
inlineoverridevirtual |
Checks if this PCB_IO can read a footprint from specified file or directory.
If not overriden, extension check is used.
Reimplemented from PCB_IO.
Definition at line 111 of file pcb_io_ipc2581.h.
|
inlineoverridevirtual |
Checks if this IO object can read the specified library file/directory.
If not overriden, extension check is used.
Reimplemented from IO_BASE.
Definition at line 117 of file pcb_io_ipc2581.h.
|
private |
Return the automapped layers.
aInputLayerDescriptionVector |
aLayerMappingHandler | Frees the memory allocated for the loaded footprints in m_loaded_footprints. |
Definition at line 64 of file pcb_io_ipc2581.cpp.
References m_loaded_footprints.
Referenced by ~PCB_IO_IPC2581().
|
private |
Definition at line 217 of file pcb_io_ipc2581.cpp.
References genString(), FOOTPRINT::GetReference(), m_footprint_refdes_dict, m_footprint_refdes_reverse_dict, and name.
Referenced by addPad(), generateBOMSection(), generateComponents(), and generateLayerSetNet().
|
virtualinherited |
Create a new empty library at aLibraryPath empty.
It is an error to attempt to create an existing library or to attempt to create on a "read only" location.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several elements. |
aProperties | is an associative array that can be used to tell the library create function anything special, because it can take any number of additional named tuning arguments that the IO is known to support. The caller continues to own this object (IO may not delete it), and IOs should expect it to be optionally NULL. |
IO_ERROR | if there is a problem finding the library, or creating it. |
Reimplemented in SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, and PCB_IO_KICAD_SEXPR.
Definition at line 44 of file io_base.cpp.
References NOT_IMPLEMENTED.
|
virtualinherited |
Delete an existing library and returns true, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason.
aLibraryPath | is a locator for the "library", usually a directory or file which will contain several elements. |
aProperties | is an associative array that can be used to tell the library delete implementation function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem deleting an existing library. |
Reimplemented in SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, and PCB_IO_KICAD_SEXPR.
Definition at line 50 of file io_base.cpp.
References NOT_IMPLEMENTED.
|
private |
Definition at line 253 of file pcb_io_ipc2581.cpp.
References m_sigfig.
Referenced by addLineDesc(), addPackage(), addPad(), addPadStack(), addShape(), addXY(), generateComponents(), and generateLayerSetDrill().
|
virtualinherited |
Delete aFootprintName from the library at aLibraryPath.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
aFootprintName | is the name of a footprint to delete from the specified library. |
aProperties | is an associative array that can be used to tell the library delete function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem finding the footprint or the library, or deleting it. |
Reimplemented in PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.
Definition at line 164 of file pcb_io.cpp.
References NOT_IMPLEMENTED.
|
virtualinherited |
Return a list of footprint names contained within the library at aLibraryPath.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
aProperties | is an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
aFootprintNames | is the array of available footprint names inside a library. |
aBestEfforts | if true, don't throw on errors, just return an empty list. |
IO_ERROR | if the library cannot be found, or footprint cannot be loaded. |
Reimplemented in PCB_IO_ALTIUM_DESIGNER, PCB_IO_CADSTAR_ARCHIVE, PCB_IO_EAGLE, PCB_IO_EASYEDA, PCB_IO_EASYEDAPRO, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, and PCB_IO_KICAD_SEXPR.
Definition at line 96 of file pcb_io.cpp.
References NOT_IMPLEMENTED.
Referenced by PCB_IO::ImportFootprint().
|
virtualinherited |
Check for the existence of a footprint.
Reimplemented in PCB_IO_CADSTAR_ARCHIVE, and PCB_IO_KICAD_SEXPR.
Definition at line 140 of file pcb_io.cpp.
References PCB_IO::FootprintLoad().
|
virtualinherited |
Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PCB_IO knows about.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
aFootprintName | is the name of the footprint to load. |
aProperties | is an associative array that can be used to tell the loader implementation to do something special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
aKeepUUID | = true to keep initial items UUID, false to set new UUID normally true if loaded in the footprint editor, false if loaded in the board editor. Make sense only in kicad_plugin |
IO_ERROR | if the library cannot be found or read. No exception is thrown in the case where aFootprintName cannot be found. |
Reimplemented in PCB_IO_ALTIUM_DESIGNER, PCB_IO_CADSTAR_ARCHIVE, PCB_IO_EAGLE, PCB_IO_EASYEDA, PCB_IO_EASYEDAPRO, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, and PCB_IO_KICAD_SEXPR.
Definition at line 148 of file pcb_io.cpp.
References NOT_IMPLEMENTED.
Referenced by PCB_IO::FootprintExists(), PCB_IO::GetEnumeratedFootprint(), and PCB_IO::ImportFootprint().
|
virtualinherited |
Write aFootprint to an existing library located at aLibraryPath.
If a footprint by the same name already exists, it is replaced.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
aFootprint | is what to store in the library. The caller continues to own the footprint after this call. |
aProperties | is an associative array that can be used to tell the saver how to save the footprint, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem saving. |
Reimplemented in PCB_IO_KICAD_SEXPR.
Definition at line 156 of file pcb_io.cpp.
References NOT_IMPLEMENTED.
|
private |
Creates the Approved Vendor List section.
If the user chooses, this will associate BOM items with vendor numbers and names.
Definition at line 2744 of file pcb_io_ipc2581.cpp.
References _, addAttribute(), PROGRESS_REPORTER::AdvancePhase(), appendNode(), empty(), genString(), PCB_TEXT::GetShownText(), insertNodeAfter(), m_dist, m_distpn, m_enterpriseNode, m_mfg, m_mpn, m_OEMRef_dict, IO_BASE::m_progressReporter, m_xml_root, and name.
Referenced by SaveBoard().
|
private |
Creates the BOM section.
This section defines the BOM data for the board. This includes the part number, manufacturer, and distributor information for each component on the board.
We assume that the m_OEMRef_dict is populated already by the generateComponents function This will either place a unique string in the dictionary or field reference.
Definition at line 1159 of file pcb_io_ipc2581.cpp.
References _, addAttribute(), PROGRESS_REPORTER::AdvancePhase(), ANGLE_0, appendNode(), componentName(), F_Cu, BOARD::Footprints(), FP_EXCLUDE_FROM_BOM, genString(), BOARD::GetFileName(), hash_fp_item(), HASH_POS, m_board, m_footprint_dict, m_layer_name_map, m_OEMRef_dict, IO_BASE::m_progressReporter, m_xml_root, REFDES, and REL_COORD.
Referenced by SaveBoard().
|
private |
Definition at line 1432 of file pcb_io_ipc2581.cpp.
References addAttribute(), addLayerAttributes(), appendNode(), BS_ITEM_TYPE_DIELECTRIC, genString(), BOARD_STACKUP_ITEM::GetBrdLayerId(), BOARD_STACKUP::GetCount(), BOARD::GetDesignSettings(), BOARD_STACKUP_ITEM::GetDielectricLayerId(), BOARD::GetEnabledLayers(), BOARD_STACKUP_ITEM::GetLayerName(), BOARD::GetLayerName(), BOARD_STACKUP::GetList(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), BOARD_STACKUP_ITEM::GetSublayersCount(), BOARD_STACKUP_ITEM::GetType(), BOARD_STACKUP_ITEM::GetTypeName(), IsValidLayer(), isValidLayerFor2581(), KEY_CORE, m_board, m_layer_name_map, LSET::Seq(), and BOARD_STACKUP::SynchronizeWithBoard().
Referenced by generateEcadSection().
|
private |
Definition at line 2183 of file pcb_io_ipc2581.cpp.
References addAttribute(), addLocationNode(), addPackage(), ANGLE_0, appendNode(), componentName(), F_Cu, floatVal(), BOARD::Footprints(), FP_SMD, FP_THROUGH_HOLE, genString(), PCB_TEXT::GetShownText(), EDA_TEXT::GetText(), insertNode(), m_board, m_last_padstack, m_layer_name_map, m_OEMRef, m_OEMRef_dict, m_padstacks, and name.
Referenced by generateStepSection().
|
private |
Creates the Content section of the XML file.
This holds the overview of the rest of the board data. Includes references to the step, bom, and layers as well as the content dictionaries
Definition at line 310 of file pcb_io_ipc2581.cpp.
References _, addAttribute(), PROGRESS_REPORTER::AdvancePhase(), appendNode(), generateContentStackup(), genString(), BOARD::GetFileName(), m_board, m_line_node, IO_BASE::m_progressReporter, m_shape_std_node, m_shape_user_node, m_units_str, m_version, and m_xml_root.
Referenced by SaveBoard().
|
private |
Definition at line 432 of file pcb_io_ipc2581.cpp.
References addAttribute(), appendNode(), KIGFX::COLOR4D::b, BS_ITEM_TYPE_DIELECTRIC, color, KIGFX::COLOR4D::g, genString(), BOARD::GetDesignSettings(), BOARD::GetLayerName(), BOARD_STACKUP::GetList(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), GetStandardColors(), IsPrmSpecified(), KiROUND(), m_board, m_layer_name_map, KIGFX::COLOR4D::r, and BOARD_STACKUP::SynchronizeWithBoard().
Referenced by generateContentSection().
|
private |
Definition at line 1506 of file pcb_io_ipc2581.cpp.
References addAttribute(), appendNode(), B_Cu, F_Cu, BOARD::Footprints(), genString(), BOARD::GetLayerName(), m_board, m_drill_layers, m_slot_holes, pad, PCB_VIA_T, BOARD::Tracks(), and via.
Referenced by generateEcadSection().
|
private |
Creates the ECAD section.
This describes the layout, layers, and design as well as component placement and netlist information
Definition at line 1320 of file pcb_io_ipc2581.cpp.
References _, addAttribute(), addCadHeader(), PROGRESS_REPORTER::AdvancePhase(), appendNode(), generateCadLayers(), generateDrillLayers(), generateStepSection(), IO_BASE::m_progressReporter, and m_xml_root.
Referenced by SaveBoard().
|
private |
Creates the history section.
This section defines the history of the file, the revision number, and the date of the revision as well as software used to create the file. Optionally, the data could include information about the git revision and tag
Definition at line 1132 of file pcb_io_ipc2581.cpp.
References _, addAttribute(), PROGRESS_REPORTER::AdvancePhase(), appendNode(), GetMajorMinorPatchVersion(), IO_BASE::m_progressReporter, and m_xml_root.
Referenced by SaveBoard().
|
private |
Definition at line 2279 of file pcb_io_ipc2581.cpp.
References BOARD::GetEnabledLayers(), BOARD::GetNetInfo(), m_board, LSET::Seq(), and BOARD::Tracks().
Referenced by generateStepSection().
|
private |
Definition at line 2392 of file pcb_io_ipc2581.cpp.
References addAttribute(), addSlotCavity(), addXY(), appendNode(), floatVal(), genString(), BOARD::GetLayerName(), hash_fp_item(), m_board, m_drill_layers, m_padstack_dict, m_scale, m_slot_holes, pad, PCB_PAD_T, PCB_VIA_T, and via.
Referenced by generateStepSection().
|
private |
Definition at line 2483 of file pcb_io_ipc2581.cpp.
References add_zone, addAttribute(), addContourNode(), addLocationNode(), addPad(), addShape(), addText(), addVia(), appendNode(), componentName(), FlipLayer(), genString(), PCB_TRACK::GetEnd(), PCB_ARC::GetMid(), BOARD_ITEM::GetParentFootprint(), EDA_TEXT::GetShownText(), PCB_TRACK::GetStart(), PCB_TRACK::GetWidth(), PCB_TEXTBOX::IsBorderEnabled(), IsCopperLayer(), FOOTPRINT::IsFlipped(), EDA_TEXT::IsVisible(), m_version, SHAPE_POLY_SET::OutlineCount(), pad, PCB_ARC_T, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_DIMENSION_T, PCB_FIELD_T, PCB_PAD_T, PCB_SHAPE_T, PCB_TARGET_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, EDA_SHAPE::SetArcGeometry(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetStart(), EDA_SHAPE::SetWidth(), and text.
|
private |
Definition at line 2260 of file pcb_io_ipc2581.cpp.
References addAttribute(), appendNode(), genString(), BOARD::GetNetInfo(), NETINFO_LIST::GetNetItem(), NETINFO_ITEM::GetNetname(), m_board, m_net_pin_dict, and pin.
|
private |
Creates the logistical data header.
This section defines the organization and person creating the file. Can be used for contact information and config management
Definition at line 1111 of file pcb_io_ipc2581.cpp.
References addAttribute(), appendNode(), m_enterpriseNode, and m_xml_root.
Referenced by SaveBoard().
|
private |
|
private |
Definition at line 1875 of file pcb_io_ipc2581.cpp.
References addPolygonNode(), appendNode(), BOARD::GetBoardPolygonOutlines(), m_board, and SHAPE_POLY_SET::Polygon().
Referenced by generateStepSection().
|
private |
Definition at line 1561 of file pcb_io_ipc2581.cpp.
References addAttribute(), appendNode(), BOARD::Footprints(), generateComponents(), generateLayerFeatures(), generateLayerSetDrill(), generateProfile(), genString(), BOARD::GetFileName(), insertNode(), m_board, m_last_padstack, and m_version.
Referenced by generateEcadSection().
|
private |
Creates the XML header for IPC-2581.
Definition at line 291 of file pcb_io_ipc2581.cpp.
References addAttribute(), m_version, and m_xml_doc.
Referenced by SaveBoard().
|
private |
Definition at line 158 of file pcb_io_ipc2581.cpp.
References m_acceptable_chars, and m_version.
Referenced by addPackage(), componentName(), generateAvlSection(), generateBOMSection(), generateCadLayers(), generateComponents(), generateContentSection(), generateContentStackup(), generateDrillLayers(), generateLayerSetDrill(), generateLayerSetNet(), generateLogicalNets(), generateStepSection(), and pinName().
|
inlineoverridevirtual |
Returns board file description for the PCB_IO.
Reimplemented from PCB_IO.
Definition at line 86 of file pcb_io_ipc2581.h.
|
virtualinherited |
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.
Reimplemented in PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.
Definition at line 131 of file pcb_io.cpp.
References PCB_IO::FootprintLoad().
|
overridevirtual |
Return a container with the cached library footprints generated in the last call to Load.
This function is intended to be used ONLY by the non-KiCad board importers for the purpose of obtaining the footprint library of the design and creating a project-specific library.
Reimplemented from PCB_IO.
Definition at line 75 of file pcb_io_ipc2581.cpp.
References m_loaded_footprints.
|
inlineoverridevirtual |
Get the descriptor for the library container that this IO plugin operates on.
Implements IO_BASE.
Definition at line 91 of file pcb_io_ipc2581.h.
|
inlinevirtualinherited |
Get the descriptor for the individual library elements that this IO plugin operates on.
For libraries where all the elements are in a single container (e.g. all elements in a single file), then this will return the descriptor from IO_BASE::GetLibraryDesc().
Reimplemented in PCB_IO_EASYEDA, PCB_IO_EASYEDAPRO, PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.
Definition at line 102 of file io_base.h.
References IO_BASE::GetLibraryDesc().
Referenced by PCB_IO::CanReadFootprint().
|
overridevirtualinherited |
Append supported PLUGIN options to aListToAppenTo along with internationalized descriptions.
Options are typically appended so that a derived #PLUGIN can call its base class function by the same name first, thus inheriting options declared there. Some base class options could pertain to all Footprint*() functions in all derived PLUGINs.
aListToAppendTo | holds a tuple of
In the future perhaps aListToAppendTo evolves to something capable of also holding a wxValidator for the cells in said dialog: http://forums.wxwidgets.org/viewtopic.php?t=23277&p=104180. This would require a 3 column list, and introducing wx GUI knowledge to PLUGIN, which has been avoided to date. |
Reimplemented from IO_BASE.
Definition at line 172 of file pcb_io.cpp.
References _, and IO_BASE::GetLibraryOptions().
|
inlineoverridevirtual |
Generate a timestamp representing all the files in the library (including the library directory).
Timestamps should not be considered ordered, they either match or they don't.
Implements PCB_IO.
Definition at line 99 of file pcb_io_ipc2581.h.
|
inlineinherited |
Return a brief hard coded name for this IO interface.
Definition at line 71 of file io_base.h.
References IO_BASE::m_name.
Referenced by SCH_IO_ALTIUM::ParseLibFile().
|
virtualinherited |
Load a single footprint from aFootprintPath and put its name in aFootprintNameOut.
If this is a footprint library, the first footprint should be loaded. The default implementation uses FootprintEnumerate and FootprintLoad to load first footprint.
aLibraryPath | is a path of the footprint file. |
aFootprintNameOut | is the name output of the loaded footprint. |
aProperties | is an associative array that can be used to tell the loader implementation to do something special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if the footprint cannot be found or read. |
Reimplemented in PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.
Definition at line 109 of file pcb_io.cpp.
References _, PCB_IO::FootprintEnumerate(), and PCB_IO::FootprintLoad().
|
private |
Definition at line 114 of file pcb_io_ipc2581.cpp.
References insertNode(), and m_total_bytes.
Referenced by addPackage(), generateComponents(), generateStepSection(), and insertNode().
|
private |
Definition at line 88 of file pcb_io_ipc2581.cpp.
References m_total_bytes.
|
private |
Definition at line 103 of file pcb_io_ipc2581.cpp.
References m_total_bytes.
Referenced by addPadStack(), and generateAvlSection().
|
virtualinherited |
Return true if the library at aLibraryPath is writable.
The system libraries are typically read only because of where they are installed..
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
IO_ERROR | if no library at aLibraryPath exists. |
Reimplemented in SCH_IO_ALTIUM, SCH_IO_CADSTAR_ARCHIVE, SCH_IO_DATABASE, SCH_IO_EAGLE, SCH_IO_EASYEDA, SCH_IO_EASYEDAPRO, SCH_IO_HTTP_LIB, SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, PCB_IO_ALTIUM_DESIGNER, PCB_IO_CADSTAR_ARCHIVE, PCB_IO_EAGLE, PCB_IO_EASYEDA, PCB_IO_EASYEDAPRO, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, and PCB_IO_KICAD_SEXPR.
Definition at line 56 of file io_base.cpp.
References NOT_IMPLEMENTED.
|
private |
Definition at line 1346 of file pcb_io_ipc2581.cpp.
References F_Cu, UNDEFINED_LAYER, and User_9.
Referenced by generateCadLayers().
|
private |
Definition at line 418 of file pcb_io_ipc2581.cpp.
References hash_combine(), and hash_val().
Referenced by addLineDesc().
|
virtualinherited |
Load information from some input file format that this PCB_IO implementation knows about into either a new BOARD or an existing one.
This may be used to load an entire new BOARD, or to augment an existing one if aAppendToMe is not NULL.
aFileName | is the name of the file to use as input and may be foreign in nature or native in nature. |
aAppendToMe | is an existing BOARD to append to, but if NULL then this means "do not append, rather load anew". |
aProperties | is an associative array that can be used to tell the loader how to load the file, because it can take any number of additional named arguments that the plugin is known to support. These are tuning parameters for the import or load. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
aProject | is the optional PROJECT object primarily used by third party importers. |
IO_ERROR | if there is a problem loading, and its contents should say what went wrong, using line number and character offsets of the input file if possible. |
Reimplemented in PCB_IO_ALTIUM_CIRCUIT_STUDIO, PCB_IO_ALTIUM_CIRCUIT_MAKER, PCB_IO_ALTIUM_DESIGNER, PCB_IO_SOLIDWORKS, CLIPBOARD_IO, PCB_IO_CADSTAR_ARCHIVE, PCB_IO_EAGLE, PCB_IO_EASYEDA, PCB_IO_EASYEDAPRO, PCB_IO_FABMASTER, PCB_IO_KICAD_LEGACY, PCB_IO_KICAD_SEXPR, and PCB_IO_PCAD.
Definition at line 75 of file pcb_io.cpp.
References NOT_IMPLEMENTED.
Referenced by PCB_CONTROL::AppendBoard().
|
private |
Definition at line 190 of file pcb_io_ipc2581.cpp.
References genString(), PAD::GetAttribute(), PAD::GetNumber(), FOOTPRINT::GetPadCount(), BOARD_ITEM::GetParentFootprint(), name, and FOOTPRINT::Pads().
Referenced by addPackage(), and addPad().
|
virtualinherited |
If possible, prefetches the specified library (e.g.
performing downloads). Does not parse. Threadsafe.
This is a no-op for libraries that cannot be prefetched. Plugins that cannot prefetch need not override this; a default no-op is provided.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
aProperties | is an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is an error prefetching the library. |
Definition at line 104 of file pcb_io.cpp.
|
inlinevirtualinherited |
Register a different handler to be called when mapping of input layers to KiCad layers occurs.
The function is marked as virtual, so the plugins can implement extra logic (e.g., enable warnings or checks)
aLayerMappingHandler |
Reimplemented in PCB_IO_CADSTAR_ARCHIVE.
Definition at line 73 of file plugin_common_layer_mapping.h.
References LAYER_REMAPPABLE_PLUGIN::m_layer_mapping_handler.
Referenced by PCB_EDIT_FRAME::OpenProjectFiles(), PCB_IO_CADSTAR_ARCHIVE::PCB_IO_CADSTAR_ARCHIVE(), PCB_IO_EAGLE::PCB_IO_EAGLE(), and PCB_IO_CADSTAR_ARCHIVE::RegisterLayerMappingCallback().
|
overridevirtual |
Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be used to write a portion of aBoard to a special kind of export file.
aFileName | is the name of a file to save to on disk. |
aBoard | is the class BOARD in memory document tree from which to extract information when writing to aFileName. The caller continues to own the BOARD, and the plugin should refrain from modifying the BOARD if possible. |
aProperties | is an associative array that can be used to tell the saver how to save the file, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it) and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem saving or exporting. |
Reimplemented from PCB_IO.
Definition at line 2837 of file pcb_io_ipc2581.cpp.
References _, PROGRESS_REPORTER::AdvancePhase(), PROGRESS_REPORTER::BeginPhase(), generateAvlSection(), generateBOMSection(), generateContentSection(), generateEcadSection(), generateHistorySection(), generateLogisticSection(), generateXmlHeader(), m_acceptable_chars, m_board, m_dist, m_distpn, m_mfg, m_mpn, m_OEMRef, IO_BASE::m_progressReporter, m_scale, m_sigfig, m_total_bytes, m_units_str, m_version, m_xml_doc, m_xml_root, PCB_IU_PER_MM, PROGRESS_REPORTER::Report(), PROGRESS_REPORTER::SetCurrentProgress(), PROGRESS_REPORTER::SetNumPhases(), and wxFileOutputStreamWithProgress::SetProgressCallback().
|
inlinevirtualinherited |
Set an optional progress reporter.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 81 of file io_base.h.
References IO_BASE::m_progressReporter.
Referenced by PCB_CONTROL::AppendBoard().
|
inlinevirtualinherited |
Registers a KIDIALOG callback for collecting info from the user.
Definition at line 98 of file pcb_io.h.
Referenced by PCB_CONTROL::AppendBoard().
|
inlinevirtualinherited |
Set an optional reporter for warnings/errors.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 76 of file io_base.h.
References IO_BASE::m_reporter.
|
private |
Definition at line 426 of file pcb_io_ipc2581.cpp.
References hash_fp_item(), HASH_POS, and REL_COORD.
Referenced by addShape().
|
private |
Definition at line 350 of file pcb_io_ipc2581.h.
Referenced by genString(), and SaveBoard().
|
private |
Definition at line 307 of file pcb_io_ipc2581.h.
Referenced by addPadStack(), addShape(), generateBOMSection(), generateCadLayers(), generateComponents(), generateContentSection(), generateContentStackup(), generateDrillLayers(), generateLayerFeatures(), generateLayerSetDrill(), generateLogicalNets(), generateProfile(), generateStepSection(), PCB_IO_IPC2581(), and SaveBoard().
|
private |
Definition at line 301 of file pcb_io_ipc2581.h.
Referenced by generateAvlSection(), and SaveBoard().
|
private |
Definition at line 300 of file pcb_io_ipc2581.h.
Referenced by generateAvlSection(), and SaveBoard().
|
private |
Definition at line 343 of file pcb_io_ipc2581.h.
Referenced by generateDrillLayers(), and generateLayerSetDrill().
|
private |
Definition at line 305 of file pcb_io_ipc2581.h.
Referenced by generateAvlSection(), generateLogisticSection(), and PCB_IO_IPC2581().
|
private |
Definition at line 325 of file pcb_io_ipc2581.h.
Referenced by addPackage(), and generateBOMSection().
|
private |
Definition at line 328 of file pcb_io_ipc2581.h.
Referenced by componentName().
|
private |
Definition at line 331 of file pcb_io_ipc2581.h.
Referenced by componentName().
|
private |
Definition at line 322 of file pcb_io_ipc2581.h.
Referenced by addPadStack(), generateComponents(), generateStepSection(), and PCB_IO_IPC2581().
|
protectedinherited |
Callback to get layer mapping.
Definition at line 80 of file plugin_common_layer_mapping.h.
Referenced by PCB_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), PCB_IO_CADSTAR_ARCHIVE::LoadBoard(), and LAYER_REMAPPABLE_PLUGIN::RegisterLayerMappingCallback().
|
private |
Definition at line 340 of file pcb_io_ipc2581.h.
Referenced by addPadStack(), generateBOMSection(), generateCadLayers(), generateComponents(), and generateContentStackup().
|
private |
Definition at line 288 of file pcb_io_ipc2581.h.
|
private |
Definition at line 317 of file pcb_io_ipc2581.h.
Referenced by addLineDesc().
|
private |
Definition at line 318 of file pcb_io_ipc2581.h.
Referenced by addLineDesc(), generateContentSection(), and PCB_IO_IPC2581().
|
private |
Definition at line 308 of file pcb_io_ipc2581.h.
Referenced by clearLoadedFootprints(), and GetImportedCachedLibraryFootprints().
|
private |
Definition at line 299 of file pcb_io_ipc2581.h.
Referenced by generateAvlSection(), and SaveBoard().
|
private |
Definition at line 298 of file pcb_io_ipc2581.h.
Referenced by generateAvlSection(), and SaveBoard().
|
protectedinherited |
|
private |
Definition at line 337 of file pcb_io_ipc2581.h.
Referenced by addPackage(), and generateLogicalNets().
|
private |
Definition at line 297 of file pcb_io_ipc2581.h.
Referenced by generateComponents(), and SaveBoard().
|
private |
Definition at line 334 of file pcb_io_ipc2581.h.
Referenced by generateAvlSection(), generateBOMSection(), and generateComponents().
|
private |
Definition at line 320 of file pcb_io_ipc2581.h.
Referenced by addPadStack(), and generateLayerSetDrill().
|
private |
Definition at line 321 of file pcb_io_ipc2581.h.
Referenced by addPadStack(), and generateComponents().
|
private |
Definition at line 348 of file pcb_io_ipc2581.h.
Referenced by PCB_IO_IPC2581().
|
protectedinherited |
Progress reporter to track the progress of the operation, may be nullptr.
Definition at line 213 of file io_base.h.
Referenced by SCH_IO_EAGLE::checkpoint(), SCH_IO_KICAD_LEGACY::checkpoint(), SCH_IO_EAGLE::ensureLoadedLibrary(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), generateAvlSection(), generateBOMSection(), generateContentSection(), generateEcadSection(), generateHistorySection(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::LoadBoard(), PCB_IO_ALTIUM_CIRCUIT_MAKER::LoadBoard(), PCB_IO_ALTIUM_DESIGNER::LoadBoard(), PCB_IO_SOLIDWORKS::LoadBoard(), PCB_IO_CADSTAR_ARCHIVE::LoadBoard(), PCB_IO_EASYEDA::LoadBoard(), PCB_IO_EASYEDAPRO::LoadBoard(), PCB_IO_FABMASTER::LoadBoard(), PCB_IO_KICAD_SEXPR::LoadBoard(), SCH_IO_KICAD_LEGACY::loadFile(), SCH_IO_KICAD_SEXPR::loadFile(), SCH_IO_EAGLE::loadSchematic(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), SaveBoard(), IO_BASE::SetProgressReporter(), and SCH_IO_CADSTAR_ARCHIVE::SetProgressReporter().
|
private |
Definition at line 309 of file pcb_io_ipc2581.h.
Referenced by PCB_IO_IPC2581().
|
protectedinherited |
Reporter to log errors/warnings to, may be nullptr.
Definition at line 210 of file io_base.h.
Referenced by SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), SCH_IO_EAGLE::loadInstance(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), SCH_IO_ALTIUM::ParseAltiumSch(), SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParseBezier(), SCH_IO_ALTIUM::ParseCircle(), SCH_IO_ALTIUM::ParseComponent(), SCH_IO_ALTIUM::ParseDesignator(), SCH_IO_ALTIUM::ParseEllipse(), SCH_IO_ALTIUM::ParseEllipticalArc(), SCH_IO_ALTIUM::ParseFileName(), SCH_IO_ALTIUM::ParseHarnessConnector(), SCH_IO_ALTIUM::ParseHarnessEntry(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseHarnessType(), SCH_IO_ALTIUM::ParseImage(), SCH_IO_ALTIUM::ParseImplementation(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLibFile(), SCH_IO_ALTIUM::ParseLine(), SCH_IO_ALTIUM::ParsePin(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_ALTIUM::ParsePort(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_IO_ALTIUM::ParseRecord(), SCH_IO_ALTIUM::ParseRectangle(), SCH_IO_ALTIUM::ParseRoundRectangle(), SCH_IO_ALTIUM::ParseSheetEntry(), SCH_IO_ALTIUM::ParseSheetName(), SCH_IO_ALTIUM::ParseSignalHarness(), SCH_IO_ALTIUM::ParseStorage(), SCH_IO_ALTIUM::SCH_IO_ALTIUM(), SCH_IO_CADSTAR_ARCHIVE::SCH_IO_CADSTAR_ARCHIVE(), SCH_IO_EAGLE::SCH_IO_EAGLE(), SCH_IO_EASYEDA::SCH_IO_EASYEDA(), SCH_IO_EASYEDAPRO::SCH_IO_EASYEDAPRO(), SCH_IO_LTSPICE::SCH_IO_LTSPICE(), IO_BASE::SetReporter(), and SCH_IO_CADSTAR_ARCHIVE::SetReporter().
|
private |
Definition at line 294 of file pcb_io_ipc2581.h.
Referenced by addLineDesc(), addPadStack(), addShape(), addXY(), generateLayerSetDrill(), PCB_IO_IPC2581(), and SaveBoard().
|
private |
Definition at line 315 of file pcb_io_ipc2581.h.
Referenced by addShape(), generateContentSection(), and PCB_IO_IPC2581().
|
private |
Definition at line 312 of file pcb_io_ipc2581.h.
Referenced by addShape(), generateContentSection(), and PCB_IO_IPC2581().
|
private |
Definition at line 289 of file pcb_io_ipc2581.h.
Referenced by PCB_IO_IPC2581().
|
private |
Definition at line 295 of file pcb_io_ipc2581.h.
Referenced by floatVal(), PCB_IO_IPC2581(), and SaveBoard().
|
private |
Definition at line 346 of file pcb_io_ipc2581.h.
Referenced by generateDrillLayers(), and generateLayerSetDrill().
|
private |
Definition at line 314 of file pcb_io_ipc2581.h.
Referenced by addShape().
|
private |
Definition at line 291 of file pcb_io_ipc2581.h.
Referenced by addAttribute(), appendNode(), insertNode(), insertNodeAfter(), PCB_IO_IPC2581(), and SaveBoard().
|
private |
Definition at line 293 of file pcb_io_ipc2581.h.
Referenced by addCadHeader(), generateContentSection(), and SaveBoard().
|
private |
Definition at line 311 of file pcb_io_ipc2581.h.
Referenced by addShape().
|
private |
Definition at line 296 of file pcb_io_ipc2581.h.
Referenced by addSlotCavity(), generateContentSection(), generateLayerSetNet(), generateStepSection(), generateXmlHeader(), genString(), PCB_IO_IPC2581(), and SaveBoard().
|
private |
Definition at line 352 of file pcb_io_ipc2581.h.
Referenced by generateXmlHeader(), PCB_IO_IPC2581(), and SaveBoard().
|
private |
Definition at line 353 of file pcb_io_ipc2581.h.
Referenced by generateAvlSection(), generateBOMSection(), generateContentSection(), generateEcadSection(), generateHistorySection(), generateLogisticSection(), PCB_IO_IPC2581(), and SaveBoard().