20#ifndef PCB_IO_IPC2581_H_ 
   21#define PCB_IO_IPC2581_H_ 
   35#include <wx/xml/xml.h> 
   82                    const std::map<std::string, UTF8>* aProperties = 
nullptr ) 
override;
 
  223    void addSlotCavity( wxXmlNode* aContentNode, 
const PAD& aPad, 
const wxString& aName );
 
  250    wxString 
genString( 
const wxString& aStr, 
const char* aPrefix = 
nullptr ) 
const;
 
  254    wxString 
floatVal( 
double aVal, 
int aSigFig = -1 ) 
const;
 
  260    void addXY( wxXmlNode* aNode, 
const VECTOR2I& aVec, 
const char* aXName = 
nullptr,
 
  261                const char* aYName = 
nullptr );
 
  263    void addAttribute( wxXmlNode* aNode, 
const wxString& aName, 
const wxString& aValue );
 
  265    wxXmlNode* 
insertNode( wxXmlNode* aParent, 
const wxString& aName );
 
  267    wxXmlNode* 
appendNode( wxXmlNode* aParent, 
const wxString& aName );
 
  269    void appendNode( wxXmlNode* aParent, wxXmlNode* aNode );
 
  271    void insertNode( wxXmlNode* aParent, wxXmlNode* aNode );
 
  313    std::map<size_t, wxString>
 
  316    std::map<wxString, FOOTPRINT*>
 
  319    std::map<FOOTPRINT*, wxString>
 
  322    std::map<FOOTPRINT*, wxString>
 
  325    std::map<int, std::vector<std::pair<wxString, wxString>>>
 
  328    std::map<PCB_LAYER_ID, wxString>
 
  331    std::map<std::pair<PCB_LAYER_ID, PCB_LAYER_ID>, std::vector<BOARD_ITEM*>>
 
  334    std::map<std::pair<PCB_LAYER_ID, PCB_LAYER_ID>, std::vector<PAD*>>
 
  337    std::map<std::tuple<auxLayerType, PCB_LAYER_ID, PCB_LAYER_ID>, std::vector<BOARD_ITEM*>>
 
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
Information pertinent to a Pcbnew printed circuit board.
 
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
 
Handle the data for a net.
 
void addText(wxXmlNode *aContentNode, EDA_TEXT *aShape, const KIFONT::METRICS &aFontMetrics)
 
wxString floatVal(double aVal, int aSigFig=-1) const
 
bool CanReadBoard(const wxString &aFileName) const override
Checks if this PCB_IO can read the specified board file.
 
void generateLayerSetDrill(wxXmlNode *aStepNode)
 
wxString genLayerString(PCB_LAYER_ID aLayer, const char *aPrefix) const
 
wxXmlNode * generateContentSection()
Creates the Content section of the XML file.
 
wxXmlNode * appendNode(wxXmlNode *aParent, const wxString &aName)
 
void generateDrillLayers(wxXmlNode *aCadLayerNode)
 
wxXmlNode * addPackage(wxXmlNode *aStepNode, FOOTPRINT *aFootprint)
 
void generateComponents(wxXmlNode *aStepNode)
 
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)
 
wxString componentName(FOOTPRINT *aFootprint)
 
bool addOutlineNode(wxXmlNode *aParentNode, const SHAPE_POLY_SET &aPolySet, int aWidth=0, LINE_STYLE aDashType=LINE_STYLE::SOLID)
 
void generateStackup(wxXmlNode *aCadLayerNode)
 
std::map< std::tuple< auxLayerType, PCB_LAYER_ID, PCB_LAYER_ID >, std::vector< BOARD_ITEM * > > m_auxilliary_Layers
 
bool addPolygonNode(wxXmlNode *aParentNode, const SHAPE_LINE_CHAIN &aPolygon, FILL_T aFillType=FILL_T::FILLED_SHAPE, int aWidth=0, LINE_STYLE aDashType=LINE_STYLE::SOLID)
 
void generateLayerSetNet(wxXmlNode *aLayerNode, PCB_LAYER_ID aLayer, std::vector< BOARD_ITEM * > &aItems)
 
bool isValidLayerFor2581(PCB_LAYER_ID aLayer)
 
void insertNodeAfter(wxXmlNode *aPrev, wxXmlNode *aNode)
 
void generateCadLayers(wxXmlNode *aCadLayerNode)
 
std::vector< wxXmlNode * > m_padstacks
 
wxString pinName(const PAD *aPad) const
 
void generateCadSpecs(wxXmlNode *aCadLayerNode)
 
void addVia(wxXmlNode *aContentNode, const PCB_VIA *aVia, PCB_LAYER_ID aLayer)
 
void addSlotCavity(wxXmlNode *aContentNode, const PAD &aPad, const wxString &aName)
 
wxXmlNode * m_last_padstack
 
size_t lineHash(int aWidth, LINE_STYLE aDashType)
 
std::map< size_t, wxString > m_std_shape_dict
 
void addAttribute(wxXmlNode *aNode, const wxString &aName, const wxString &aValue)
 
wxXmlNode * m_shape_user_node
 
wxXmlNode * generateAvlSection()
Creates the Approved Vendor List section.
 
wxXmlNode * generateHistorySection()
Creates the history section.
 
void addXY(wxXmlNode *aNode, const VECTOR2I &aVec, const char *aXName=nullptr, const char *aYName=nullptr)
 
wxXmlNode * m_shape_std_node
 
void addPadStack(wxXmlNode *aContentNode, const PAD *aPad)
 
std::map< FOOTPRINT *, wxString > m_OEMRef_dict
 
void clearLoadedFootprints()
Frees the memory allocated for the loaded footprints in m_loaded_footprints.
 
std::map< std::pair< PCB_LAYER_ID, PCB_LAYER_ID >, std::vector< PAD * > > m_slot_holes
 
std::map< size_t, wxString > m_footprint_dict
 
wxXmlNode * generateLogisticSection()
Creates the logistical data header.
 
std::set< wxString > m_element_names
 
std::map< size_t, wxString > m_line_dict
 
void addLineDesc(wxXmlNode *aNode, int aWidth, LINE_STYLE aDashType, bool aForce=false)
 
void addKnockoutText(wxXmlNode *aContentNode, PCB_TEXT *aText)
 
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
 
std::map< size_t, wxString > m_padstack_dict
 
std::map< std::pair< PCB_LAYER_ID, PCB_LAYER_ID >, std::vector< BOARD_ITEM * > > m_drill_layers
 
std::map< wxString, FOOTPRINT * > m_footprint_refdes_dict
 
void generateProfile(wxXmlNode *aStepNode)
 
void generateLayerFeatures(wxXmlNode *aStepNode)
 
void SaveBoard(const wxString &aFileName, BOARD *aBoard, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be u...
 
bool CanReadFootprint(const wxString &aFileName) const override
Checks if this PCB_IO can read a footprint from specified file or directory.
 
wxXmlNode * generateBOMSection(wxXmlNode *aEcadNode)
Creates the BOM section.
 
wxXmlNode * generateContentStackup(wxXmlNode *aContentNode)
 
void addShape(wxXmlNode *aContentNode, const PCB_SHAPE &aShape)
 
void generateAuxilliaryLayers(wxXmlNode *aCadLayerNode)
 
void addCadHeader(wxXmlNode *aEcadNode)
 
void generateLayerSetAuxilliary(wxXmlNode *aStepNode)
 
PROGRESS_REPORTER * m_progress_reporter
 
std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints() override
Return a container with the cached library footprints generated in the last call to Load.
 
const std::map< std::string, UTF8 > * m_props
 
wxString genLayersString(PCB_LAYER_ID aTop, PCB_LAYER_ID aBottom, const char *aPrefix) const
 
void generateLogicalNets(wxXmlNode *aStepNode)
 
void addFillDesc(wxXmlNode *aNode, FILL_T aFillType, bool aForce=false)
 
std::map< size_t, wxString > m_user_shape_dict
 
size_t shapeHash(const PCB_SHAPE &aShape)
 
void generatePhyNetGroup(wxXmlNode *aStepNode)
 
~PCB_IO_IPC2581() override
 
wxString genString(const wxString &aStr, const char *aPrefix=nullptr) const
 
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 * > m_loaded_footprints
 
bool addPolygonCutouts(wxXmlNode *aParentNode, const SHAPE_POLY_SET::POLYGON &aPolygon)
 
std::set< wxUniChar > m_acceptable_chars
 
void addLayerAttributes(wxXmlNode *aNode, PCB_LAYER_ID aLayer)
 
wxXmlNode * generateXmlHeader()
Creates the XML header for IPC-2581.
 
wxXmlNode * generateEcadSection()
Creates the ECAD section.
 
wxXmlDocument * m_xml_doc
 
bool CanReadLibrary(const wxString &aFileName) const override
Checks if this IO object can read the specified library file/directory.
 
wxXmlNode * insertNode(wxXmlNode *aParent, const wxString &aName)
 
void addPad(wxXmlNode *aContentNode, const PAD *aPad, PCB_LAYER_ID aLayer)
 
void generateStepSection(wxXmlNode *aCadNode)
 
std::map< PCB_LAYER_ID, wxString > m_layer_name_map
 
std::map< wxString, wxString > m_generated_names
 
const IO_BASE::IO_FILE_DESC GetBoardFileDesc() const override
Returns board file description for the PCB_IO.
 
void addLocationNode(wxXmlNode *aContentNode, double aX, double aY)
 
std::map< int, std::vector< std::pair< wxString, wxString > > > m_net_pin_dict
 
std::map< FOOTPRINT *, wxString > m_footprint_refdes_reverse_dict
 
wxXmlNode * m_enterpriseNode
 
PCB_IO(const wxString &aName)
 
A progress reporter interface for use in multi-threaded environments.
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
Represent a set of closed polygons.
 
std::vector< SHAPE_LINE_CHAIN > POLYGON
represents a single polygon outline with holes.
 
@ FILLED_SHAPE
Fill with object color.
 
PCB_LAYER_ID
A quick note on layer IDs:
 
LINE_STYLE
Dashed line types.
 
Container that describes file type info.
 
VECTOR2< int32_t > VECTOR2I