KiCad PCB EDA Suite
Loading...
Searching...
No Matches
cadstar_pcb_archive_parser.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2020 Roberto Fernandez Bautista <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
25
26#ifndef CADSTAR_PCB_ARCHIVE_PARSER_H_
27#define CADSTAR_PCB_ARCHIVE_PARSER_H_
28
29#include <map>
31#include <vector>
32
33//=================================
34// MACRO DEFINITIONS
35//=================================
36#define UNDEFINED_MATERIAL_ID ( MATERIAL_ID ) wxEmptyString
37#define UNDEFINED_PHYSICAL_LAYER ( PHYSICAL_LAYER_ID ) - 1
38
43{
44public:
45 explicit CADSTAR_PCB_ARCHIVE_PARSER( const wxString& aFilename ) :
47 Filename( aFilename ), Header(), Assignments(),
48 m_rootNode( nullptr )
49 {
50 KiCadUnitMultiplier = 10; // assume hundredth micron
51 }
52
53
55 {
56 if( m_rootNode )
57 delete m_rootNode;
58 }
59
65 void Parse( bool aLibrary = false );
66
67 typedef wxString MATERIAL_ID;
68 typedef long PHYSICAL_LAYER_ID;
69 typedef wxString COPPERCODE_ID;
70 typedef wxString PADCODE_ID;
71 typedef wxString VIACODE_ID;
72 typedef wxString SPACINGCODE_ID;
73 typedef wxString LAYERPAIR_ID;
74 typedef wxString RULESET_ID;
75 typedef wxString COMP_AREA_ID;
76 typedef long PAD_ID;
77 typedef wxString DIMENSION_ID;
78 typedef wxString BOARD_ID;
79 typedef wxString AREA_ID;
80 typedef wxString COMPONENT_ID;
81 typedef wxString TEMPLATE_ID;
82 typedef long COPPER_TERM_ID;
83 typedef wxString COPPER_ID;
84 typedef wxString DRILL_TABLE_ID;
85 typedef wxString TRUNK_ID;
86
96
97
109
110
126
127
139
140
149
150
151 enum class EMBEDDING
152 {
156 };
157
158
180
181
183 {
184 std::map<MATERIAL_ID, MATERIAL> Materials;
185 std::map<LAYER_ID, LAYER> Layers;
186 std::vector<LAYER_ID> LayerStack;
187
188 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
189 };
190
191
193 {
196
197 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
198 };
199
200
202 {
204 wxString Name;
206 std::vector<COPREASSIGN> Reassigns;
207
208 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
209 };
210
211
213 {
215 {
218
219 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
220 };
221
262 std::vector<REASSIGN> Reassigns;
263
264 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
265 };
266
267
280
281
294
295
297 {
300 bool HasShape = false;
301
302 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
303 };
304
305
307 {
309 wxString Name;
313 bool Plated = true;
318 long DrillXoffset = 0;
319 long DrillYoffset = 0;
320
321 std::map<LAYER_ID, CADSTAR_PAD_SHAPE> Reassigns;
322
323 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
324 };
325
326
328 {
331 bool HasShape = false;
332
333 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
334 };
335
336
338 {
340 wxString Name;
346
347 std::map<LAYER_ID, CADSTAR_PAD_SHAPE> Reassigns;
348
349 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
350 };
351
352
363
364
374
375
377 {
379 wxString Name;
387
388 std::map<SPACINGCODE_ID, SPACINGCODE>
391 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
392 };
393
394
396 {
397 std::map<COPPERCODE_ID, COPPERCODE> CopperCodes;
398 std::map<SPACINGCODE_ID, SPACINGCODE> SpacingCodes;
399 std::map<RULESET_ID, RULESET> Rulesets;
400 std::map<PADCODE_ID, PADCODE> PadCodes;
401 std::map<VIACODE_ID, VIACODE> ViaCodes;
402 std::map<LAYERPAIR_ID, LAYERPAIR>
404 std::vector<SPCCLASSSPACE> SpacingClasses;
405
406 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
407 };
408
409
431
432
434 {
439 bool NetclassEditAttributeSettings = false; //< Unclear what this does
440 bool SpacingclassEditAttributeSettings = false; //< Unclear what this does
441
442 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
443 };
444
450 {
453 SHAPE Shape; //< Uses the component's coordinate frame.
455 std::vector<PAD_ID> AssociatedPadIDs;
456
457 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
458 };
459
467 {
471 SHAPE Shape; //< Uses the component's coordinate frame.
473
474 bool NoTracks = false;
478 bool NoVias = false;
482
483 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
484 };
485
499
500
501 static PAD_SIDE GetPadSide( const wxString& aPadSideString );
502
521 {
522 bool FreeAngle = false;
523 bool North = false;
524 bool NorthEast = false;
525 bool East = false;
526 bool SouthEast = false;
527 bool South = false;
528 bool SouthWest = false;
529 bool West = false;
530 bool NorthWest = false;
531
532 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
533 };
534
535
537 {
542 long OrientAngle = 0;
544
545 wxString Identifier;
552
553 bool FirstPad = false;
558 bool PCBonlyPad = false;
562
563 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
564 };
565
570 {
571 enum class TYPE
572 {
576 };
577
578
592
593
594 struct ARROW : PARSER //"DIMARROW"
595 {
610
612 long UpperAngle = 0;
613 long LowerAngle = 0;
614 long ArrowLength = 0;
615
616 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
617 };
618
634 {
635 enum class STYLE
636 {
641 };
642
644 long TextGap;
647
648 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
649 };
650
651
653 {
655
659 long Offset;
660 bool SuppressFirst = false;
662
663 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
664 };
665
666
667 struct LINE : PARSER
668 {
677
678 enum class STYLE //DIMLINETYPE
679 {
684 };
685
689
693
700
701 static bool IsLine( XNODE* aNode );
702 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
703 };
704
718 bool Fixed = false;
719 GROUP_ID GroupID = wxEmptyString;
722
723 static bool IsDimension( XNODE* aNode );
724 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
725 };
726
783
784
786 {
788 long SymHeight = 0;
789
790 std::vector<COMPONENT_COPPER> ComponentCoppers;
791 std::map<COMP_AREA_ID, COMPONENT_AREA> ComponentAreas;
792 std::map<PAD_ID, COMPONENT_PAD> ComponentPads;
793 std::map<DIMENSION_ID, DIMENSION> Dimensions;
794
795 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
796 };
797
798
800 {
801 std::map<SYMDEF_ID, SYMDEF_PCB> ComponentDefinitions;
802
803 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
804 };
805
806
808 {
812 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
813 bool Fixed = false;
814
816 GROUP_ID GroupID = wxEmptyString;
817
820
821 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
822 };
823
831 struct AREA : PARSER
832 {
835 wxString Name;
838
839 //TODO find out what token is used for specifying "Rule Set"
840 RULESET_ID RuleSetID = wxEmptyString;
841
842 bool Fixed = false;
843
844 bool Placement = false;
846 bool Routing = false;
848 bool Keepout = false;
850 bool NoTracks = false;
852 bool NoVias = false;
854
860
861 GROUP_ID GroupID = wxEmptyString;
863 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
864
865 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
866 };
867
868
869 enum class TESTLAND_SIDE
870 {
875 };
876
877
878 static TESTLAND_SIDE ParseTestlandSide( XNODE* aNode );
879
880
882 {
884 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
886
887 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
888 };
889
890
892 {
894 PADCODE_ID PadCode = wxEmptyString;
895 bool OverrideExits = false;
897 bool OverrideSide = false;
900 long OrientAngle = 0;
901
902 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
903 };
904
905
907 {
909 wxString Name;
914
915 GROUP_ID GroupID = wxEmptyString;
918 VARIANT_ID VariantID = wxEmptyString;
919 long OrientAngle = 0;
920 bool TestPoint = false;
922 bool Mirror = false;
923 bool Fixed = false;
925
926 std::map<ATTRIBUTE_ID, TEXT_LOCATION> TextLocations;
929 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
930 std::map<PART_DEFINITION_PIN_ID, wxString> PinLabels;
934 std::map<PART_DEFINITION_PIN_ID, PIN_ATTRIBUTE> PinAttributes;
935 std::map<PAD_ID, PADEXCEPTION> PadExceptions;
937
938 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
939 };
940
941
942 struct TRUNK : PARSER
943 {
945 wxString Definition; // TODO: more work required to fully parse the TRUNK structure
946
947 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
948 };
949
950
952 {
953 struct PIN : PARSER
954 {
958
959 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
960 };
961
963 {
965
966 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
967 };
968
983
985 {
989
990 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
991 };
992
996 {
997 long RouteWidth = 0;
999 bool TeardropAtStart = false;
1000 bool TeardropAtEnd = false;
1003 bool Fixed = false;
1005
1007 XNODE* Parse( XNODE* aNode, PARSER_CONTEXT* aContext );
1008 };
1009
1010 struct ROUTE : PARSER
1011 {
1012 LAYER_ID LayerID = wxEmptyString;
1014 std::vector<ROUTE_VERTEX> RouteVertices;
1015
1016 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1017 };
1018
1020 {
1022 bool Unrouted = false;
1026
1027 LAYER_ID UnrouteLayerID = wxEmptyString;
1029
1030 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1031 };
1032
1033 std::map<NETELEMENT_ID, PIN> Pins;
1034 std::map<NETELEMENT_ID, JUNCTION_PCB> Junctions;
1035 std::map<NETELEMENT_ID, VIA> Vias;
1036 std::map<NETELEMENT_ID, COPPER_TERMINAL> CopperTerminals;
1037 std::vector<CONNECTION_PCB> Connections;
1038
1039 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1040 };
1041
1131
1132
1134 {
1136 {
1138 {
1141 bool Fixed = false;
1142
1143 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1144 };
1145
1146 NET_ID NetID = wxEmptyString;
1147 std::map<COPPER_TERM_ID, COPPER_TERM> CopperTerminals;
1148 bool Fixed = false;
1149
1150 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1151 };
1152
1160 bool Fixed = false;
1161 GROUP_ID GroupID = wxEmptyString;
1163
1164 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
1165
1166 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1167 };
1168
1169
1170 enum class NETSYNCH
1171 {
1175 };
1176
1177
1193
1194
1196 {
1198
1199 std::map<GROUP_ID, GROUP> Groups;
1200 std::map<REUSEBLOCK_ID, REUSEBLOCK> ReuseBlocks;
1201
1202 std::map<BOARD_ID, CADSTAR_BOARD> Boards;
1204 std::map<FIGURE_ID, FIGURE> Figures;
1205 std::map<AREA_ID, AREA> Areas;
1206 std::map<COMPONENT_ID, COMPONENT> Components;
1207 std::map<DOCUMENTATION_SYMBOL_ID, DOCUMENTATION_SYMBOL> DocumentationSymbols;
1208 std::map<TRUNK_ID, TRUNK> Trunks;
1209 std::map<NET_ID, NET_PCB> Nets;
1210 std::map<TEMPLATE_ID, TEMPLATE> Templates;
1211 std::map<COPPER_ID, COPPER> Coppers;
1212 std::map<TEXT_ID, TEXT> Texts;
1213 std::map<DIMENSION_ID, DIMENSION> Dimensions;
1214 std::map<DRILL_TABLE_ID, DRILL_TABLE> DrillTables;
1216
1217 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1218 };
1219
1220
1221 wxString Filename;
1222
1228
1230
1231private:
1232 XNODE* m_rootNode; // Currently parsed root node
1233
1234}; //CADSTAR_PCB_ARCHIVE_PARSER
1235
1236#endif // CADSTAR_PCB_ARCHIVE_PARSER_H_
Helper functions and common defines between schematic and PCB Archive files.
#define UNDEFINED_LAYER_ID
#define UNDEFINED_MATERIAL_ID
#define UNDEFINED_PHYSICAL_LAYER
READABILITY
Sets the readability direction of text.
@ BOTTOM_TO_TOP
When text is vertical, show it rotated 90 degrees anticlockwise.
SWAP_RULE
Corresponds to "Display when" Item property.
@ BOTH
Always display (Mirrored and Unmirrored)
wxString LAYER_ID
ID of a Sheet (if schematic) or board Layer (if PCB)
long PART_DEFINITION_PIN_ID
Pin identifier in the part definition.
static TESTLAND_SIDE ParseTestlandSide(XNODE *aNode)
SYMDEF_TYPE
A symbol definition can represent a number of different objects in CADSTAR.
@ STARPOINT
From CADSTAR Help: "Starpoints are special symbols/components that can be used to electrically connec...
@ JUMPER
From CADSTAR Help: "Jumpers are components used primarily for the purpose of routing.
@ COMPONENT
Standard PCB Component definition.
@ TESTPOINT
From CADSTAR Help: "A testpoint is an area of copper connected to a net.
long PAD_ID
Pad identifier (pin) in the PCB.
void Parse(bool aLibrary=false)
Parses the file.
int KiCadUnitMultiplier
Use this value to convert units in this CPA file to KiCad units.
@ ALLELEC
Inbuilt layer type (cannot be assigned to user layers)
@ ALLDOC
Inbuilt layer type (cannot be assigned to user layers)
@ NOLAYER
Inbuilt layer type (cannot be assigned to user layers)
@ JUMPERLAYER
Inbuilt layer type (cannot be assigned to user layers)
@ ALLLAYER
Inbuilt layer type (cannot be assigned to user layers)
@ ASSCOMPCOPP
Inbuilt layer type (cannot be assigned to user layers)
CADSTAR_PCB_ARCHIVE_PARSER(const wxString &aFilename)
@ MAX
The highest PHYSICAL_LAYER_ID currently defined (i.e. back / bottom side).
@ MIN
The lowest PHYSICAL_LAYER_ID currently defined (i.e. front / top side).
MATERIAL_LAYER_TYPE
Type of layer appropriate for the material being set up.
static PAD_SIDE GetPadSide(const wxString &aPadSideString)
PAD_SIDE
From CADSTAR Help: "This parameter indicates the physical layers on which the selected pad is placed.
@ MAXIMUM
The highest PHYSICAL_LAYER_ID currently defined (i.e.
@ THROUGH_HOLE
All physical layers currently defined.
An extension of wxXmlNode that can format its contents as KiCad-style s-expressions.
Definition xnode.h:67
Represent a floating value in E notation.
Represent a point in x,y coordinates.
References an element from a design reuse block.
Represents a vertex in a shape.
From CADSTAR Help: "Area is for creating areas within which, and nowhere else, certain operations are...
GROUP_ID GroupID
If not empty, this AREA is part of a group.
bool Keepout
From CADSTAR Help: "Auto Placement cannot place components within this area.
bool Placement
From CADSTAR Help: "Auto Placement can place components within this area.
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
long AreaHeight
From CADSTAR Help: "The Height value specified for the PCB component is checked against the Height va...
bool Routing
From CADSTAR Help: "Area can be used to place routes during Automatic Routing.
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
bool NoTracks
From CADSTAR Help: "Area cannot be used to place routes during automatic routing.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
GROUP_ID GroupID
Normally CADSTAR_BOARD cannot be part of a reuseblock, but included for completeness.
bool Fixed
If not empty, this CADSTAR_BOARD is part of a group.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< COPPERCODE_ID, COPPERCODE > CopperCodes
std::map< RULESET_ID, RULESET > Rulesets
Used for area design rules.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< SPACINGCODE_ID, SPACINGCODE > SpacingCodes
Spacing Design Rules.
std::map< LAYERPAIR_ID, LAYERPAIR > LayerPairs
Default vias to use between pairs of layers.
From CADSTAR Help: "Area is for creating areas within which, and nowhere else, certain operations are...
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool NoVias
From CADSTAR Help: "Check this button to specify that any area created by the Rectangle,...
bool NoTracks
From CADSTAR Help: "Check this button to specify that any area created by the Rectangle,...
A shape of copper in the component footprint.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool PCBonlyPad
From CADSTAR Help: "The PCB Only Pad property can be used to stop ECO Update, Back Annotation,...
POINT Position
Pad position within the component's coordinate frame.
wxString Identifier
This is an identifier that is displayed to the user.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool FirstPad
From CADSTAR Help: "Only one pad can have this property; if an existing pad in the design already has...
wxString Name
Designator e.g. "C1", "R1", etc.
POINT Origin
Origin of the component (this is used as the reference point when placing the component in the design...
bool TestPoint
Indicates whether this component should be treated as a testpoint.
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
std::map< PAD_ID, PADEXCEPTION > PadExceptions
Override pad definitions for this instance.
std::map< ATTRIBUTE_ID, TEXT_LOCATION > TextLocations
This contains location of any attributes, including designator position.
std::map< PART_DEFINITION_PIN_ID, PIN_ATTRIBUTE > PinAttributes
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
GROUP_ID GroupID
If not empty, this component is part of a group.
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
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< COPPER_TERM_ID, COPPER_TERM > CopperTerminals
GROUP_ID GroupID
If not empty, this COPPER is part of a group.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
TEMPLATE_ID PouredTemplateID
If not empty, it means this COPPER is part of a poured template.
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
@ CLOSED
The arrow head is made up of two angled lines either side of main line plus two other lines perpendic...
@ CLEAR
Same as closed but the main line finishes at the start of the perpendicular lines.
@ CLOSED_FILLED
The same as CLOSED or CLEAR arrows, but with a solid fill "DIMENSION_ARROWCLOSEDFILLED".
@ OPEN
The arrow head is made up of two angled lines either side of main line.
long ArrowLength
The length of the angled lines that make up the arrow head.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool SuppressFirst
If true, excludes the first extension line (only shows extension line at end)
long Overshoot
Overshoot of the extension line past the arrow line.
< Token can be either "LEADERLINE", "LINEARLINE" or "ANGULARLINE"
@ INTERNAL
The lines are placed inside the measurement token=DIMENSION_INTERNAL.
@ EXTERNAL
The lines are placed outside the measurement (typically used when limited space) token=DIMENSION_EXTE...
@ LEADERLINE
Only for dimensions of type LEADERRDIM.
@ ANGULARLINE
Only for dimensions of type ANGULARDIM.
long LeaderLineExtensionLength
Only for TYPE=LEADERLINE Length of the horizontal part of the leader line [param6].
long LeaderLineLength
Only for TYPE=LEADERLINE Length of the angled part of the leader line [param5].
long LeaderAngle
Only for TYPE=LEADERLINE subnode "LEADERANG".
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
POINT Centre
Only for TYPE=ANGULARLINE [point3].
Contains formatting specific for a CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION object.
long TextGap
Specifies the gap between the text and the end of the line.
long TextOffset
Specifies how far above the line the text is (doesn't have an effect on actual position!...
@ INSIDE
Embedded with the line (the Gap parameter specifies the gap between the text and the end of the line)...
@ OUTSIDE
Above the line (the Offset parameter specifies how far above the line the text is) DIMENSION_EXTERNAL...
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
Linear, leader (radius/diameter) or angular dimension.
LAYER_ID LayerID
ID on which to draw this [param1].
@ DIRECT
A linear dimension parallel to measurement with perpendicular extension lines token=DIMENSION_DIRECT.
@ ORTHOGONAL
An orthogonal dimension (either x or y measurement) token=DIMENSION_ORTHOGONAL.
@ ANGLED
A linear dimension parallel to measurement but with orthogonal extension lines (i....
GROUP_ID GroupID
If not empty, this DIMENSION is part of a group.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
EXTENSION_LINE ExtensionLineParams
Not applicable to TYPE=LEADERDIM.
DIMENSION_ID ID
Some ID (doesn't seem to be used) subnode="DIMREF".
@ LEADERDIM
Typically used for Radius/Diameter Dimension.
long Precision
Number of decimal points to display in the measurement [param3].
ANGUNITS AngularUnits
Only Applicable to TYPE=ANGLEDIM.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
GROUP_ID GroupID
If not empty, this DRILL_TABLE is part of a group.
std::map< MATERIAL_ID, MATERIAL > Materials
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
PHYSICAL_LAYER_ID PhysicalLayer
If UNDEFINED, no physical layer is assigned (e.g.
LAYER_ID SwapLayerID
If UNDEFINED_LAYER_ID, no swap layer.
long Thickness
Note: Units of length are defined in file header.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< TEMPLATE_ID, TEMPLATE > Templates
std::map< BOARD_ID, CADSTAR_BOARD > Boards
Normally CADSTAR only allows one board but.
std::map< NET_ID, NET_PCB > Nets
Contains tracks and vias.
std::map< COMPONENT_ID, COMPONENT > Components
std::map< DOCUMENTATION_SYMBOL_ID, DOCUMENTATION_SYMBOL > DocumentationSymbols
std::map< DIMENSION_ID, DIMENSION > Dimensions
std::map< REUSEBLOCK_ID, REUSEBLOCK > ReuseBlocks
std::map< DRILL_TABLE_ID, DRILL_TABLE > DrillTables
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< SYMDEF_ID, SYMDEF_PCB > ComponentDefinitions
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool Unrouted
Instead of a ROUTE, the CONNECTION might have an "UNROUTE" token.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
< "PIN" nodename (represents a PAD in a PCB component)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
< Two sibbling nodes: first node being "ROUTEWIDTH" and next node being a VERTEX (e....
XNODE * Parse(XNODE *aNode, PARSER_CONTEXT *aContext)
bool RouteWidthIsExplicit
False if ROUTEWIDTH was not specified in file.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
GROUP_ID GroupID
If not empty, this VIA is part of a group.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< NETELEMENT_ID, COPPER_TERMINAL > CopperTerminals
std::map< NETELEMENT_ID, JUNCTION_PCB > Junctions
long ReliefWidth
if undefined inherits from design
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< LAYER_ID, CADSTAR_PAD_SHAPE > Reassigns
long ReliefClearance
if undefined inherits from design
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
PADCODE_ID PadCode
If not empty, override padcode.
bool HasShape
False when the shape node was unknown and skipped.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
From CADSTAR help: "For specifying the directions in which routes can enter or exit the pad.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
ROUTECODE_ID AreaRouteCodeID
For assigning a net route code to a rule set.
VIACODE_ID AreaViaCodeID
For assigning a via code to a rule set.
std::map< SPACINGCODE_ID, SPACINGCODE > SpacingCodes
Overrides these spacing rules in the specific area.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::vector< REASSIGN > Reassigns
Can have different spacings on different layers.
SPACINGCODE_ID ID
Possible spacing rules:
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
LAYER_ID LayerID
Normally LAY0, which corresponds to (All Layers)
std::map< PAD_ID, COMPONENT_PAD > ComponentPads
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< DIMENSION_ID, DIMENSION > Dimensions
inside "DIMENSIONS" subnode
std::vector< COMPONENT_COPPER > ComponentCoppers
long SymHeight
The Height of the component (3D height in z direction)
std::map< COMP_AREA_ID, COMPONENT_AREA > ComponentAreas
long MinRouteWidth
Manufacturing Design Rule. Corresponds to "Thin Route Width".
long TrackGrid
Grid for Routes (equal X and Y steps)
long MaxPhysicalLayer
Should equal number of copper layers.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
long MaxMitre
Manufacturing Design Rule. Corresponds to "Maximum Mitre".
long ViaGrid
Grid for Vias (equal X and Y steps)
long MinMitre
Manufacturing Design Rule. Corresponds to "Minimum Mitre".
long AdditionalIsolation
This is the gap to apply in routes and pads in addition to the existing pad-to-copper or route-to-cop...
bool TargetForAutorouting
true when subnode "AUTOROUTETARGET" is present
bool ThermalReliefOnVias
false when subnode "NOVIARELIEF" is present
RELIEF_TYPE
From CADSTAR Help: "With this parameter you can select one of two ways in which to generate thermal r...
@ CROSS
This method applies short copper stubs to form a cross. (default)
@ CUTOUTS
This method uses four cutouts in the copper to leave the reliefs required.
HATCHCODE_ID HatchCodeID
Only for FillType = HATCHED.
bool ThermalReliefOnPads
false when subnode "NOPINRELIEF" is present
long ThermalReliefPadsAngle
Orientation for the thermal reliefs.
long MinDisjointCopper
The value is the length of one side of a notional square.
bool AutomaticRepour
true when subnode "REGENERATE" is present
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool AllowInNoRouting
true when subnode "IGNORETRN" is present
bool BoxIsolatedPins
true when subnode "BOXPINS" is present
long ClearanceWidth
Specifies the space around pads when pouring (i.e.
COPPERCODE_ID ReliefCopperCodeID
From CADSTAR Help: "Relief Copper Code is forselecting the width of line used to draw thethermal reli...
COPPERCODE_ID CopperCodeID
From CADSTAR Help: "Copper Code is for selecting the width of the line used to draw the outline and f...
long ThermalReliefViasAngle
Disabled when !ThermalReliefOnVias (param6)
long MinIsolatedCopper
The value is the length of one side of a notional square.
long SliverWidth
Minimum width of copper that may be created.
Templates are CADSTAR's equivalent to a "filled zone".
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
POURING Pouring
Copper pour settings (e.g. relief / hatching /etc.)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
GROUP_ID GroupID
If not empty, this TEMPLATE is part of a group.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
long ReliefClearance
if undefined inherits from design
long ReliefWidth
if undefined inherits from design
std::map< LAYER_ID, CADSTAR_PAD_SHAPE > Reassigns
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool HasShape
False when the shape node was unknown and skipped.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override