26 #ifndef CADSTAR_PCB_ARCHIVE_PARSER_H_ 27 #define CADSTAR_PCB_ARCHIVE_PARSER_H_ 36 #define UNDEFINED_MATERIAL_ID ( MATERIAL_ID ) wxEmptyString 37 #define UNDEFINED_PHYSICAL_LAYER ( PHYSICAL_LAYER_ID ) - 1 377 std::map<SPACINGCODE_ID, SPACINGCODE>
391 std::map<LAYERPAIR_ID, LAYERPAIR>
920 std::map<PART_DEFINITION_PIN_ID, PIN_ATTRIBUTE>
PinAttributes;
1186 std::map<FIGURE_ID, FIGURE>
Figures;
1216 #endif // CADSTAR_PCB_ARCHIVE_PARSER_H_ void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
long PART_DEFINITION_PIN_ID
Pin identifier in the part definition.
READABILITY
Sets the readability direction of text.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
COMPONENT_ID VariantParentComponentID
The lines are placed outside the measurement (typically used when limited space) token=DIMENSION_EXTE...
CADSTAR_PCB_ARCHIVE_PARSER(const wxString &aFilename)
TESTLAND_SIDE TestlandSide
wxString SPACING_CLASS_ID
bool Fixed
If not empty, this CADSTAR_BOARD is part of a group.
std::vector< PAD_ID > AssociatedPadIDs
REUSEBLOCKREF ReuseBlockRef
Embedded with the line (the Gap parameter specifies the gap between the text and the end of the line)...
POURING Pouring
Copper pour settings (e.g. relief / hatching /etc.)
PADCODE_ID PadCode
If not empty, override padcode.
#define UNDEFINED_MATERIAL_ID
long ViaGrid
Grid for Vias (equal X and Y steps)
Inbuilt layer type (cannot be assigned to user layers)
Inbuilt layer type (cannot be assigned to user layers)
Inbuilt layer type (cannot be assigned to user layers)
long LeaderAngle
Only for TYPE=LEADERLINE subnode "LEADERANG".
bool ThermalReliefOnVias
false when subnode "NOVIARELIEF" is present
static bool IsDimension(XNODE *aNode)
std::map< NETELEMENT_ID, PIN > Pins
bool PCBonlyPad
From CADSTAR Help: "The PCB Only Pad property can be used to stop ECO Update, Back Annotation,...
COPPERCODE_ID CopperCodeID
From CADSTAR Help: "Copper Code is for selecting the width of the line used to draw the outline and f...
long Offset
Offset from the measurement point.
bool TestPoint
Indicates whether this component should be treated as a testpoint.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
The highest PHYSICAL_LAYER_ID currently defined (i.e. back / bottom side).
bool Unrouted
Instead of a ROUTE, the CONNECTION might have an "UNROUTE" token.
bool NoVias
From CADSTAR Help: "Check this button to specify that any area created by the Rectangle,...
From CADSTAR Help: "A testpoint is an area of copper connected to a net.
std::vector< COPREASSIGN > Reassigns
REUSEBLOCKREF ReuseBlockRef
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< COMP_AREA_ID, COMPONENT_AREA > ComponentAreas
long ArrowLength
The length of the angled lines that make up the arrow head.
bool SpacingclassEditAttributeSettings
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
Helper functions and common structures for CADSTAR PCB and Schematic archive files.
EXTENSION_LINE ExtensionLineParams
Not applicable to TYPE=LEADERDIM.
std::map< PART_DEFINITION_PIN_ID, wxString > PinLabels
This is inherited from the PARTS library but is allowed to be out of sync.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
VIACODE_ID AreaViaCodeID
For assigning a via code to a rule set.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
Above the line (the Offset parameter specifies how far above the line the text is) DIMENSION_EXTERNAL...
COPPERCODE_ID CopperCodeID
std::map< AREA_ID, AREA > Areas
bool BoxIsolatedPins
true when subnode "BOXPINS" is present
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< NETELEMENT_ID, COPPER_TERMINAL > CopperTerminals
bool NoTracks
From CADSTAR Help: "Check this button to specify that any area created by the Rectangle,...
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
long MinNeckedLength
Manufacturing Design Rule.
PHYSICAL_LAYER_ID PhysicalLayerStart
Typically used for Radius/Diameter Dimension.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
#define UNDEFINED_LAYER_ID
std::map< RULESET_ID, RULESET > Rulesets
Used for area design rules.
std::map< TRUNK_ID, TRUNK > Trunks
std::map< PART_DEFINITION_PIN_ID, PIN_ATTRIBUTE > PinAttributes
long PAD_ID
Pad identifier (pin) in the PCB.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< COPPERCODE_ID, COPPERCODE > CopperCodes
std::map< MATERIAL_ID, MATERIAL > Materials
std::vector< CONNECTION_PCB > Connections
wxString Name
Designator e.g. "C1", "R1", etc.
std::map< VIACODE_ID, VIACODE > ViaCodes
ANGUNITS AngularUnits
Only Applicable to TYPE=ANGLEDIM.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
From CADSTAR Help: "Area is for creating areas within which, and nowhere else, certain operations are...
Only for dimensions of type LINEARDIM.
STYLE Style
Subnode="DIMLINETYPE".
long MinIsolatedCopper
The value is the length of one side of a notional square.
NETELEMENT_ID ID
First character is "P".
Always display (Mirrored and Unmirrored)
REUSEBLOCKREF ReuseBlockRef
Contains formatting specific for a CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION object.
VARIANT_HIERARCHY VariantHierarchy
LAYER_ID LayerID
ID on which to draw this [param1].
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
STYLE ArrowStyle
Subnode="ARROWSTYLE".
bool Routing
From CADSTAR Help: "Area can be used to place routes during Automatic Routing.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< LAYER_ID, LAYER > Layers
This method applies short copper stubs to form a cross. (default)
std::map< DRILL_TABLE_ID, DRILL_TABLE > DrillTables
std::map< LAYERPAIR_ID, LAYERPAIR > LayerPairs
Default vias to use between pairs of layers.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
From CADSTAR help: "For specifying the directions in which routes can enter or exit the pad.
From CADSTAR Help: "Jumpers are components used primarily for the purpose of routing.
long Thickness
Note: Units of length are defined in file header.
long ReliefWidth
if undefined inherits from design
Helper functions and common defines between schematic and PCB Archive files.
long MaxPhysicalLayer
Should equal number of copper layers.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< TEMPLATE_ID, TEMPLATE > Templates
GROUP_ID GroupID
If not empty, this COPPER is part of a group.
REUSEBLOCKREF ReuseBlockRef
The arrow head is made up of two angled lines either side of main line.
static PAD_SIDE GetPadSide(const wxString &aPadSideString)
From CADSTAR Help: "Area is for creating areas within which, and nowhere else, certain operations are...
long ReliefWidth
if undefined inherits from design
Keyword "UNBIASED" (default)
long TextGap
Specifies the gap between the text and the end of the line.
A shape of copper in the component footprint.
std::map< NET_ID, NET_PCB > Nets
Contains tracks and vias.
GROUP_ID GroupID
If not empty, this AREA is part of a group.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
< Two sibbling nodes: first node being "ROUTEWIDTH" and next node being a VERTEX (e....
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse()
Parses the file.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< LAYER_ID, CADSTAR_PAD_SHAPE > Reassigns
SPACING_CLASS_ID SpacingClassID1
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
REUSEBLOCKREF ReuseBlockRef
PART_DEFINITION_PIN_ID Pin
Represents a point in x,y coordinates.
A linear dimension parallel to measurement but with orthogonal extension lines (i....
long ThermalReliefPadsAngle
Orientation for the thermal reliefs.
PAD_SIDE Side
See PAD_SIDE.
bool FirstPad
From CADSTAR Help: "Only one pad can have this property; if an existing pad in the design already has...
bool AllowInNoRouting
true when subnode "IGNORETRN" is present
HATCHCODE_ID HatchCodeID
Only for FillType = HATCHED.
std::map< PAD_ID, COMPONENT_PAD > ComponentPads
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
References an element from a design reuse block.
DIMENSION_ID ID
Some ID (doesn't seem to be used) subnode="DIMREF".
bool Placement
From CADSTAR Help: "Auto Placement can place components within this area.
long AreaHeight
From CADSTAR Help: "The Height value specified for the PCB component is checked against the Height va...
long Precision
Number of decimal points to display in the measurement [param3].
LINECODE_ID LineCodeID
param0
long LeaderLineLength
Only for TYPE=LEADERLINE Length of the angled part of the leader line [param5].
EVALUE Resistivity
x10^-8 ohm*metre
Inbuilt layer type (cannot be assigned to user layers)
An orthogonal dimension (either x or y measurement) token=DIMENSION_ORTHOGONAL.
TECHNOLOGY_SECTION Technology
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< PADCODE_ID, PADCODE > PadCodes
COPPER_TERM_ID CopperTermNum
The highest PHYSICAL_LAYER_ID currently defined (i.e.
XNODE * Parse(XNODE *aNode, PARSER_CONTEXT *aContext)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool ThermalReliefOnPads
false when subnode "NOPINRELIEF" is present
std::map< SYMDEF_ID, SYMDEF_PCB > ComponentDefinitions
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
< Token can be either "LEADERLINE", "LINEARLINE" or "ANGULARLINE"
The same as CLOSED or CLEAR arrows, but with a solid fill "DIMENSION_ARROWCLOSEDFILLED".
long TextOffset
Specifies how far above the line the text is (doesn't have an effect on actual position!...
std::vector< COMPONENT_COPPER > ComponentCoppers
SWAP_RULE
Corresponds to "Display when" Item property.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
LAYER_ID LayerID
Normally LAY0, which corresponds to (All Layers)
MATERIAL_LAYER_TYPE
Type of layer appropriate for the material being set up.
Only for dimensions of type ANGULARDIM.
std::vector< SPCCLASSSPACE > SpacingClasses
From CADSTAR Help: "Starpoints are special symbols/components that can be used to electrically connec...
TESTLAND_SIDE TestlandSide
Same as closed but the main line finishes at the start of the perpendicular lines.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
LAYER_ID UnrouteLayerID
See Unrouted member variable.
#define UNDEFINED_PHYSICAL_LAYER
Standard PCB Component definition.
wxString Identifier
This is an identifier that is displayed to the user.
All physical layers currently defined.
bool AutomaticRepour
true when subnode "REGENERATE" is present
Only for dimensions of type LEADERRDIM.
PHYSICAL_LAYER_ID 1 (i.e.
std::map< FIGURE_ID, FIGURE > Figures
GROUP_ID GroupID
If not empty, this VIA is part of a group.
long UpperAngle
token="ARROWANGLEA"
long TrackGrid
Grid for Routes (equal X and Y steps)
GROUP_ID GroupID
Normally CADSTAR_BOARD cannot be part of a reuseblock, but included for completeness.
std::map< REUSEBLOCK_ID, REUSEBLOCK > ReuseBlocks
static const long UNDEFINED_VALUE
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
The lowest PHYSICAL_LAYER_ID currently defined (i.e. front / top side).
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
SPACING_CLASS_ID SpacingClassID2
Represents a CADSTAR PCB Archive (CPA) file.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
TRUNK_ID TrunkID
TRUNKREF Statements.
Hold an XML or S-expression element.
std::vector< LAYER_ID > LayerStack
std::map< SPACINGCODE_ID, SPACINGCODE > SpacingCodes
Spacing Design Rules.
REUSEBLOCKREF ReuseBlockRef
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< PAD_ID, PADEXCEPTION > PadExceptions
Override pad definitions for this instance.
LAYER_ID SwapLayerID
If UNDEFINED_LAYER_ID, no swap layer.
bool Keepout
From CADSTAR Help: "Auto Placement cannot place components within this area.
long OrientAngle
1/1000 of a Degree
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
This is a user defined HATCHCODE_ID.
TRUNK_ID TrunkID
TRUNKREF Statements.
TEMPLATE_ID PouredTemplateID
If not empty, it means this COPPER is part of a poured template.
std::map< LAYER_ID, CADSTAR_PAD_SHAPE > Reassigns
PAD_EXITS Exits
See PAD_EXITS.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
NETELEMENT_ID ID
First character is "V".
static bool IsLine(XNODE *aNode)
long SymHeight
The Height of the component (3D height in z direction)
std::map< NETELEMENT_ID, VIA > Vias
long MinUnneckedLength
Manufacturing Design Rule.
RELIEF_TYPE
From CADSTAR Help: "With this parameter you can select one of two ways in which to generate thermal r...
Inbuilt layer type (cannot be assigned to user layers)
GROUP_ID GroupID
If not empty, this component is part of a group.
std::map< DIMENSION_ID, DIMENSION > Dimensions
VERTEX Vertex
Returns a pointer to the last node.
bool NoTracks
From CADSTAR Help: "Area cannot be used to place routes during automatic routing.
std::vector< ROUTE_VERTEX > RouteVertices
static bool IsPadShape(XNODE *aNode)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
long LowerAngle
token="ARROWANGLEB"
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< NETELEMENT_ID, JUNCTION_PCB > Junctions
GROUP_ID GroupID
If not empty, this DRILL_TABLE is part of a group.
std::map< COPPER_ID, COPPER > Coppers
The lines are placed inside the measurement token=DIMENSION_INTERNAL.
A linear dimension parallel to measurement with perpendicular extension lines token=DIMENSION_DIRECT.
long SliverWidth
Minimum width of copper that may be created.
std::map< SPACINGCODE_ID, SPACINGCODE > SpacingCodes
Overrides these spacing rules in the specific area.
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
NETELEMENT_ID ID
First two character are "CT".
std::map< DIMENSION_ID, DIMENSION > Dimensions
inside "DIMENSIONS" subnode
bool NetclassEditAttributeSettings
REUSEBLOCKREF ReuseBlockRef
long ReliefClearance
if undefined inherits from design
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
PHYSICAL_LAYER_ID PhysicalLayer
If UNDEFINED, no physical layer is assigned (e.g.
std::vector< REASSIGN > Reassigns
Can have different spacings on different layers.
COPPERCODE_ID ReliefCopperCodeID
From CADSTAR Help: "Relief Copper Code is for selecting the width of line used to draw the thermal re...
ROUTECODE_ID AreaRouteCodeID
For assigning a net route code to a rule set.
COPPER_FILL_TYPE FillType
Assume solid fill.
std::map< DOCUMENTATION_SYMBOL_ID, DOCUMENTATION_SYMBOL > DocumentationSymbols
long Overshoot
Overshoot of the extension line past the arrow line.
static TESTLAND_SIDE ParseTestlandSide(XNODE *aNode)
long MinMitre
Manufacturing Design Rule. Corresponds to "Minimum Mitre".
Inbuilt layer type (cannot be assigned to user layers)
long MinDisjointCopper
The value is the length of one side of a notional square.
std::map< TEXT_ID, TEXT > Texts
bool TargetForAutorouting
true when subnode "AUTOROUTETARGET" is present
Only used for error detection.
wxString LAYER_ID
ID of a Sheet (if schematic) or board Layer (if PCB)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
long ClearanceWidth
Specifies the space around pads when pouring (i.e.
POINT Position
Pad position within the component's coordinate frame.
long LeaderLineExtensionLength
Only for TYPE=LEADERLINE Length of the horizontal part of the leader line [param6].
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
long ThermalReliefViasAngle
Disabled when !ThermalReliefOnVias (param6)
COPPERCODE_ID CopperCodeID
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
long MinRouteWidth
Manufacturing Design Rule. Corresponds to "Thin Route Width".
std::map< COMPONENT_ID, COMPONENT > Components
std::map< BOARD_ID, CADSTAR_BOARD > Boards
Normally CADSTAR only allows one board but.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
Templates are CADSTAR's equivalent to a "filled zone".
bool NoVias
From CADSTAR Help: "No vias will be placed within this area by the automatic router.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
RELIEF_TYPE ReliefType
See RELIEF_TYPE.
GROUP_ID GroupID
If not empty, this TEMPLATE is part of a group.
long ReliefClearance
if undefined inherits from design
REUSEBLOCKREF ReuseBlockRef
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
< "PIN" nodename (represents a PAD in a PCB component)
bool SuppressFirst
If true, excludes the first extension line (only shows extension line at end)
long AdditionalIsolation
This is the gap to apply in routes and pads in addition to the existing pad-to-copper or route-to-cop...
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< ATTRIBUTE_ID, TEXT_LOCATION > TextLocations
This contains location of any attributes, including designator position.
std::map< GROUP_ID, GROUP > Groups
POINT Centre
Only for TYPE=ANGULARLINE [point3].
SYMDEF_TYPE
A symbol definition can represent a number of different objects in CADSTAR.
TRUNK_ID TrunkID
TRUNKREF Statements.
int KiCadUnitMultiplier
Use this value to convert units in this CPA file to KiCad units.
Linear, leader (radius/diameter) or angular dimension.
PAD_SIDE
From CADSTAR Help: "This parameter indicates the physical layers on which the selected pad is placed.
long MaxMitre
Manufacturing Design Rule. Corresponds to "Maximum Mitre".
The arrow head is made up of two angled lines either side of main line plus two other lines perpendic...
POINT Origin
Origin of the component (this is used as the reference point when placing the component in the design...
GROUP_ID GroupID
If not empty, this DIMENSION is part of a group.
SPACINGCODE_ID ID
Possible spacing rules:
This method uses four cutouts in the copper to leave the reliefs required.
PHYSICAL_LAYER_ID PhysicalLayerEnd
std::map< COPPER_TERM_ID, COPPER_TERM > CopperTerminals
When text is vertical, show it rotated 90 degrees anticlockwise.