KiCad PCB EDA Suite
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 (C) 2020-2022 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 along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
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 {
48 KiCadUnitMultiplier = 10; // assume hundredth micron
49 }
50
56 void Parse();
57
58 typedef wxString MATERIAL_ID;
59 typedef long PHYSICAL_LAYER_ID;
60 typedef wxString COPPERCODE_ID;
61 typedef wxString PADCODE_ID;
62 typedef wxString VIACODE_ID;
63 typedef wxString SPACINGCODE_ID;
64 typedef wxString LAYERPAIR_ID;
65 typedef wxString RULESET_ID;
66 typedef wxString COMP_AREA_ID;
67 typedef long PAD_ID;
68 typedef wxString DIMENSION_ID;
69 typedef wxString BOARD_ID;
70 typedef wxString AREA_ID;
71 typedef wxString COMPONENT_ID;
72 typedef wxString TEMPLATE_ID;
73 typedef long COPPER_TERM_ID;
74 typedef wxString COPPER_ID;
75 typedef wxString DRILL_TABLE_ID;
76 typedef wxString TRUNK_ID;
77
82 {
83 CONSTRUCTION,
84 ELECTRICAL,
85 NON_ELECTRICAL
86 };
87
88
90 {
92 wxString Name;
97
98 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
99 };
100
101
102 enum class LAYER_TYPE
103 {
104 UNDEFINED,
105 ALLLAYER,
106 ALLELEC,
107 ALLDOC,
108 NOLAYER,
109 ASSCOMPCOPP,
110 JUMPERLAYER,
111 ELEC,
112 POWER,
113 NONELEC,
114 CONSTRUCTION,
115 DOC
116 };
117
118
119 enum class LAYER_SUBTYPE
120 {
121 LAYERSUBTYPE_NONE,
122 LAYERSUBTYPE_SILKSCREEN,
123 LAYERSUBTYPE_PLACEMENT,
124 LAYERSUBTYPE_ASSEMBLY,
125 LAYERSUBTYPE_SOLDERRESIST,
126 LAYERSUBTYPE_PASTE,
127 LAYERSUBTYPE_CLEARANCE,
128 LAYERSUBTYPE_ROUT,
129 };
130
131
132 enum class ROUTING_BIAS
133 {
134 UNBIASED,
135 X,
136 Y,
137 ANTI_ROUTE,
138 OBSTACLE
139 };
140
141
142 enum class EMBEDDING
143 {
144 NONE,
145 ABOVE,
146 BELOW
147 };
148
149
150 struct LAYER : PARSER
151 {
153 wxString Name;
154 wxString Description = wxEmptyString;
163 long Thickness = 0;
166 bool ReferencePlane = false;
167 bool VariantLayer = false;
168
169 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
170 };
171
172
174 {
175 std::map<MATERIAL_ID, MATERIAL> Materials;
176 std::map<LAYER_ID, LAYER> Layers;
177 std::vector<LAYER_ID> LayerStack;
178
179 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
180 };
181
182
184 {
187
188 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
189 };
190
191
193 {
195 wxString Name;
197 std::vector<COPREASSIGN> Reassigns;
198
199 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
200 };
201
202
204 {
206 {
209
210 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
211 };
212
253 std::vector<REASSIGN> Reassigns;
254
255 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
256 };
257
258
259 enum class PAD_SHAPE_TYPE
260 {
261 ANNULUS,
262 BULLET,
263 CIRCLE,
264 DIAMOND,
265 FINGER,
266 OCTAGON,
267 RECTANGLE,
268 ROUNDED_RECT,
269 SQUARE
270 };
271
272
274 {
280 long OrientAngle = 0;
281
282 static bool IsPadShape( XNODE* aNode );
283 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
284 };
285
286
288 {
291
292 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
293 };
294
295
297 {
299 wxString Name;
303 bool Plated = true;
308 long DrillXoffset = 0;
309 long DrillYoffset = 0;
310
311 std::map<LAYER_ID, CADSTAR_PAD_SHAPE> Reassigns;
312
313 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
314 };
315
316
318 {
321
322 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
323 };
324
325
327 {
329 wxString Name;
335
336 std::map<LAYER_ID, CADSTAR_PAD_SHAPE> Reassigns;
337
338 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
339 };
340
341
343 {
345 wxString Name;
349
350 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
351 };
352
353
355 {
360
361 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
362 };
363
364
366 {
368 wxString Name;
376
377 std::map<SPACINGCODE_ID, SPACINGCODE>
380 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
381 };
382
383
385 {
386 std::map<COPPERCODE_ID, COPPERCODE> CopperCodes;
387 std::map<SPACINGCODE_ID, SPACINGCODE> SpacingCodes;
388 std::map<RULESET_ID, RULESET> Rulesets;
389 std::map<PADCODE_ID, PADCODE> PadCodes;
390 std::map<VIACODE_ID, VIACODE> ViaCodes;
391 std::map<LAYERPAIR_ID, LAYERPAIR>
393 std::vector<SPCCLASSSPACE> SpacingClasses;
394
395 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
396 };
397
398
400 {
406 long MinMitre;
407 long MaxMitre;
413 long ViaGrid;
414
415 bool BackOffJunctions = false;
416 bool BackOffWidthChange = false;
417
418 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
419 };
420
421
423 {
428 bool NetclassEditAttributeSettings = false; //< Unclear what this does
429 bool SpacingclassEditAttributeSettings = false; //< Unclear what this does
430
431 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
432 };
433
439 {
442 SHAPE Shape; //< Uses the component's coordinate frame.
444 std::vector<PAD_ID> AssociatedPadIDs;
445
446 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
447 };
448
456 {
460 SHAPE Shape; //< Uses the component's coordinate frame.
462
463 bool NoTracks = false;
467 bool NoVias = false;
471
472 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
473 };
474
480 enum class PAD_SIDE
481 {
482 MINIMUM,
484 MAXIMUM,
486 THROUGH_HOLE
487 };
488
489
490 static PAD_SIDE GetPadSide( const wxString& aPadSideString );
491
510 {
511 bool FreeAngle = false;
512 bool North = false;
513 bool NorthEast = false;
514 bool East = false;
515 bool SouthEast = false;
516 bool South = false;
517 bool SouthWest = false;
518 bool West = false;
519 bool NorthWest = false;
520
521 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
522 };
523
524
526 {
531 long OrientAngle = 0;
533
534 wxString Identifier;
541
542 bool FirstPad = false;
547 bool PCBonlyPad = false;
551
552 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
553 };
554
559 {
560 enum class TYPE
561 {
562 LINEARDIM,
563 LEADERDIM,
564 ANGLEDIM
565 };
566
567
568 enum class SUBTYPE
569 {
570 ORTHOGONAL,
572 DIRECT,
574 ANGLED,
577 DIAMETER,
578 RADIUS,
579 ANGULAR
580 };
581
582
583 struct ARROW : PARSER //"DIMARROW"
584 {
585 enum class STYLE
586 {
587 OPEN,
589 CLOSED,
594 CLEAR,
596 CLOSED_FILLED
598 };
599
601 long UpperAngle = 0;
602 long LowerAngle = 0;
603 long ArrowLength = 0;
604
605 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
606 };
607
623 {
624 enum class STYLE
625 {
626 INSIDE,
628 OUTSIDE
630 };
631
633 long TextGap;
636
637 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
638 };
639
640
642 {
644
648 long Offset;
649 bool SuppressFirst = false;
651
652 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
653 };
654
655
656 struct LINE : PARSER
657 {
658 enum class TYPE
659 {
660 LINEARLINE,
661 LEADERLINE,
664 ANGULARLINE
665 };
666
667 enum class STYLE //DIMLINETYPE
668 {
669 INTERNAL,
671 EXTERNAL
673 };
674
678
682
689
690 static bool IsLine( XNODE* aNode );
691 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
692 };
693
707 bool Fixed = false;
708 GROUP_ID GroupID = wxEmptyString;
711
712 static bool IsDimension( XNODE* aNode );
713 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
714 };
715
720 enum class SYMDEF_TYPE
721 {
722 COMPONENT,
723 JUMPER,
745 STARPOINT,
763 TESTPOINT
771 };
772
773
775 {
777 long SymHeight = 0;
778
779 std::vector<COMPONENT_COPPER> ComponentCoppers;
780 std::map<COMP_AREA_ID, COMPONENT_AREA> ComponentAreas;
781 std::map<PAD_ID, COMPONENT_PAD> ComponentPads;
782 std::map<DIMENSION_ID, DIMENSION> Dimensions;
783
784 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
785 };
786
787
789 {
790 std::map<SYMDEF_ID, SYMDEF_PCB> ComponentDefinitions;
791
792 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
793 };
794
795
797 {
801 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
802 bool Fixed = false;
803
805 GROUP_ID GroupID = wxEmptyString;
806
809
810 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
811 };
812
820 struct AREA : PARSER
821 {
824 wxString Name;
827
828 //TODO find out what token is used for specifying "Rule Set"
829 RULESET_ID RuleSetID = wxEmptyString;
830
831 bool Fixed = false;
832
833 bool Placement = false;
835 bool Routing = false;
837 bool Keepout = false;
839 bool NoTracks = false;
841 bool NoVias = false;
843
849
850 GROUP_ID GroupID = wxEmptyString;
852 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
853
854 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
855 };
856
857
858 enum class TESTLAND_SIDE
859 {
860 NONE,
861 MAX,
862 MIN,
863 BOTH
864 };
865
866
867 static TESTLAND_SIDE ParseTestlandSide( XNODE* aNode );
868
869
871 {
873 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
875
876 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
877 };
878
879
881 {
883 PADCODE_ID PadCode = wxEmptyString;
884 bool OverrideExits = false;
886 bool OverrideSide = false;
889 long OrientAngle = 0;
890
891 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
892 };
893
894
896 {
898 wxString Name;
903
904 GROUP_ID GroupID = wxEmptyString;
907 VARIANT_ID VariantID = wxEmptyString;
908 long OrientAngle = 0;
909 bool TestPoint = false;
911 bool Mirror = false;
912 bool Fixed = false;
914
915 std::map<ATTRIBUTE_ID, TEXT_LOCATION> TextLocations;
918 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
919 std::map<PART_DEFINITION_PIN_ID, wxString> PinLabels;
923 std::map<PART_DEFINITION_PIN_ID, PIN_ATTRIBUTE> PinAttributes;
924 std::map<PAD_ID, PADEXCEPTION> PadExceptions;
926
927 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
928 };
929
930
931 struct TRUNK : PARSER
932 {
934 wxString Definition; // TODO: more work required to fully parse the TRUNK structure
935
936 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
937 };
938
939
941 {
942 struct PIN : PARSER
943 {
947
948 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
949 };
950
952 {
954
955 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
956 };
957
958 struct VIA : PARSER
959 {
965 GROUP_ID GroupID = wxEmptyString;
968 bool Fixed = false;
969
970 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
971 };
972
974 {
978
979 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
980 };
981
984 {
986 bool TeardropAtStart = false;
987 bool TeardropAtEnd = false;
990 bool Fixed = false;
992
994 XNODE* Parse( XNODE* aNode, PARSER_CONTEXT* aContext );
995 };
996
997 struct ROUTE : PARSER
998 {
999 LAYER_ID LayerID = wxEmptyString;
1001 std::vector<ROUTE_VERTEX> RouteVertices;
1002
1003 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1004 };
1005
1007 {
1009 bool Unrouted = false;
1013
1014 LAYER_ID UnrouteLayerID = wxEmptyString;
1016
1017 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1018 };
1019
1020 std::map<NETELEMENT_ID, PIN> Pins;
1021 std::map<NETELEMENT_ID, JUNCTION_PCB> Junctions;
1022 std::map<NETELEMENT_ID, VIA> Vias;
1023 std::map<NETELEMENT_ID, COPPER_TERMINAL> CopperTerminals;
1024 std::vector<CONNECTION_PCB> Connections;
1025
1026 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1027 };
1028
1036 {
1038 {
1040 {
1041 FILLED,
1042 HATCHED
1043 };
1044
1050 enum class RELIEF_TYPE
1051 {
1052 CROSS,
1053 CUTOUTS
1056 };
1057
1058
1072
1088
1091 bool AllowInNoRouting = false;
1092 bool BoxIsolatedPins = false;
1093 bool AutomaticRepour = false;
1095
1098 HATCHCODE_ID HatchCodeID = wxEmptyString;
1099
1100 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1101 };
1102
1105 wxString Name;
1110 bool Fixed = false;
1111 GROUP_ID GroupID = wxEmptyString;
1113
1114 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
1115
1116 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1117 };
1118
1119
1121 {
1123 {
1125 {
1128 bool Fixed = false;
1129
1130 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1131 };
1132
1133 NET_ID NetID = wxEmptyString;
1134 std::map<COPPER_TERM_ID, COPPER_TERM> CopperTerminals;
1135 bool Fixed = false;
1136
1137 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1138 };
1139
1147 bool Fixed = false;
1148 GROUP_ID GroupID = wxEmptyString;
1150
1151 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
1152
1153 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1154 };
1155
1156
1157 enum class NETSYNCH
1158 {
1159 UNDEFINED,
1160 WARNING,
1161 FULL
1162 };
1163
1164
1166 {
1170 long OrientAngle = 0;
1171 bool Mirror = false;
1172 bool Fixed = false;
1174 GROUP_ID GroupID = wxEmptyString;
1177
1178 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1179 };
1180
1181
1183 {
1185
1186 std::map<GROUP_ID, GROUP> Groups;
1187 std::map<REUSEBLOCK_ID, REUSEBLOCK> ReuseBlocks;
1188
1189 std::map<BOARD_ID, CADSTAR_BOARD> Boards;
1191 std::map<FIGURE_ID, FIGURE> Figures;
1192 std::map<AREA_ID, AREA> Areas;
1193 std::map<COMPONENT_ID, COMPONENT> Components;
1194 std::map<DOCUMENTATION_SYMBOL_ID, DOCUMENTATION_SYMBOL> DocumentationSymbols;
1195 std::map<TRUNK_ID, TRUNK> Trunks;
1196 std::map<NET_ID, NET_PCB> Nets;
1197 std::map<TEMPLATE_ID, TEMPLATE> Templates;
1198 std::map<COPPER_ID, COPPER> Coppers;
1199 std::map<TEXT_ID, TEXT> Texts;
1200 std::map<DIMENSION_ID, DIMENSION> Dimensions;
1201 std::map<DRILL_TABLE_ID, DRILL_TABLE> DrillTables;
1203
1204 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1205 };
1206
1207
1208 wxString Filename;
1209
1215
1217
1218}; //CADSTAR_PCB_ARCHIVE_PARSER
1219
1220#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
Helper functions and common structures for CADSTAR PCB and Schematic archive files.
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)
static const long UNDEFINED_VALUE
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.
Represents a CADSTAR PCB Archive (CPA) file.
static TESTLAND_SIDE ParseTestlandSide(XNODE *aNode)
SYMDEF_TYPE
A symbol definition can represent a number of different objects in CADSTAR.
@ COMPONENT
Standard PCB Component definition.
@ UNBIASED
Keyword "UNBIASED" (default)
long PAD_ID
Pad identifier (pin) in the PCB.
int KiCadUnitMultiplier
Use this value to convert units in this CPA file to KiCad units.
@ UNDEFINED
Only used for error detection.
CADSTAR_PCB_ARCHIVE_PARSER(const wxString &aFilename)
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.
Represent basic circle geometry with utility geometry functions.
Definition: circle.h:33
Hold an XML or S-expression element.
Definition: xnode.h:44
@ MIN
Definition: ibis_parser.h:97
@ MAX
Definition: ibis_parser.h:98
@ NONE
Definition: kibis.h:53
@ FILLED
Definition: outline_mode.h:27
@ TESTPOINT
a test point pad
@ OUTSIDE
Text appears outside the dimension line (default)
#define X()
Represents a floating value in E notation.
Represents 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
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"
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!...
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].
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".
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
NETELEMENT_ID ID
First character is "P".
< Two sibbling nodes: first node being "ROUTEWIDTH" and next node being a VERTEX (e....
XNODE * Parse(XNODE *aNode, PARSER_CONTEXT *aContext)
VERTEX Vertex
Returns a pointer to the last node.
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.
NETELEMENT_ID ID
First character is "V".
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.
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)
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 for selecting the width of line used to draw the thermal re...
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
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override