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 along
18 * with this program. If not, see <http://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
283 {
289 long OrientAngle = 0;
290
291 static bool IsPadShape( XNODE* aNode );
292 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
293 };
294
295
297 {
300
301 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
302 };
303
304
306 {
308 wxString Name;
312 bool Plated = true;
317 long DrillXoffset = 0;
318 long DrillYoffset = 0;
319
320 std::map<LAYER_ID, CADSTAR_PAD_SHAPE> Reassigns;
321
322 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
323 };
324
325
327 {
330
331 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
332 };
333
334
336 {
338 wxString Name;
344
345 std::map<LAYER_ID, CADSTAR_PAD_SHAPE> Reassigns;
346
347 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
348 };
349
350
361
362
372
373
375 {
377 wxString Name;
385
386 std::map<SPACINGCODE_ID, SPACINGCODE>
389 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
390 };
391
392
394 {
395 std::map<COPPERCODE_ID, COPPERCODE> CopperCodes;
396 std::map<SPACINGCODE_ID, SPACINGCODE> SpacingCodes;
397 std::map<RULESET_ID, RULESET> Rulesets;
398 std::map<PADCODE_ID, PADCODE> PadCodes;
399 std::map<VIACODE_ID, VIACODE> ViaCodes;
400 std::map<LAYERPAIR_ID, LAYERPAIR>
402 std::vector<SPCCLASSSPACE> SpacingClasses;
403
404 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
405 };
406
407
429
430
432 {
437 bool NetclassEditAttributeSettings = false; //< Unclear what this does
438 bool SpacingclassEditAttributeSettings = false; //< Unclear what this does
439
440 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
441 };
442
448 {
451 SHAPE Shape; //< Uses the component's coordinate frame.
453 std::vector<PAD_ID> AssociatedPadIDs;
454
455 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
456 };
457
465 {
469 SHAPE Shape; //< Uses the component's coordinate frame.
471
472 bool NoTracks = false;
476 bool NoVias = false;
480
481 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
482 };
483
497
498
499 static PAD_SIDE GetPadSide( const wxString& aPadSideString );
500
519 {
520 bool FreeAngle = false;
521 bool North = false;
522 bool NorthEast = false;
523 bool East = false;
524 bool SouthEast = false;
525 bool South = false;
526 bool SouthWest = false;
527 bool West = false;
528 bool NorthWest = false;
529
530 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
531 };
532
533
535 {
540 long OrientAngle = 0;
542
543 wxString Identifier;
550
551 bool FirstPad = false;
556 bool PCBonlyPad = false;
560
561 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
562 };
563
568 {
569 enum class TYPE
570 {
574 };
575
576
590
591
592 struct ARROW : PARSER //"DIMARROW"
593 {
608
610 long UpperAngle = 0;
611 long LowerAngle = 0;
612 long ArrowLength = 0;
613
614 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
615 };
616
632 {
633 enum class STYLE
634 {
639 };
640
642 long TextGap;
645
646 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
647 };
648
649
651 {
653
657 long Offset;
658 bool SuppressFirst = false;
660
661 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
662 };
663
664
665 struct LINE : PARSER
666 {
675
676 enum class STYLE //DIMLINETYPE
677 {
682 };
683
687
691
698
699 static bool IsLine( XNODE* aNode );
700 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
701 };
702
716 bool Fixed = false;
717 GROUP_ID GroupID = wxEmptyString;
720
721 static bool IsDimension( XNODE* aNode );
722 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
723 };
724
781
782
784 {
786 long SymHeight = 0;
787
788 std::vector<COMPONENT_COPPER> ComponentCoppers;
789 std::map<COMP_AREA_ID, COMPONENT_AREA> ComponentAreas;
790 std::map<PAD_ID, COMPONENT_PAD> ComponentPads;
791 std::map<DIMENSION_ID, DIMENSION> Dimensions;
792
793 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
794 };
795
796
798 {
799 std::map<SYMDEF_ID, SYMDEF_PCB> ComponentDefinitions;
800
801 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
802 };
803
804
806 {
810 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
811 bool Fixed = false;
812
814 GROUP_ID GroupID = wxEmptyString;
815
818
819 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
820 };
821
829 struct AREA : PARSER
830 {
833 wxString Name;
836
837 //TODO find out what token is used for specifying "Rule Set"
838 RULESET_ID RuleSetID = wxEmptyString;
839
840 bool Fixed = false;
841
842 bool Placement = false;
844 bool Routing = false;
846 bool Keepout = false;
848 bool NoTracks = false;
850 bool NoVias = false;
852
858
859 GROUP_ID GroupID = wxEmptyString;
861 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
862
863 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
864 };
865
866
867 enum class TESTLAND_SIDE
868 {
873 };
874
875
876 static TESTLAND_SIDE ParseTestlandSide( XNODE* aNode );
877
878
880 {
882 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
884
885 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
886 };
887
888
890 {
892 PADCODE_ID PadCode = wxEmptyString;
893 bool OverrideExits = false;
895 bool OverrideSide = false;
898 long OrientAngle = 0;
899
900 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
901 };
902
903
905 {
907 wxString Name;
912
913 GROUP_ID GroupID = wxEmptyString;
916 VARIANT_ID VariantID = wxEmptyString;
917 long OrientAngle = 0;
918 bool TestPoint = false;
920 bool Mirror = false;
921 bool Fixed = false;
923
924 std::map<ATTRIBUTE_ID, TEXT_LOCATION> TextLocations;
927 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
928 std::map<PART_DEFINITION_PIN_ID, wxString> PinLabels;
932 std::map<PART_DEFINITION_PIN_ID, PIN_ATTRIBUTE> PinAttributes;
933 std::map<PAD_ID, PADEXCEPTION> PadExceptions;
935
936 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
937 };
938
939
940 struct TRUNK : PARSER
941 {
943 wxString Definition; // TODO: more work required to fully parse the TRUNK structure
944
945 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
946 };
947
948
950 {
951 struct PIN : PARSER
952 {
956
957 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
958 };
959
961 {
963
964 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
965 };
966
981
983 {
987
988 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
989 };
990
993 {
995 bool TeardropAtStart = false;
996 bool TeardropAtEnd = false;
999 bool Fixed = false;
1001
1003 XNODE* Parse( XNODE* aNode, PARSER_CONTEXT* aContext );
1004 };
1005
1006 struct ROUTE : PARSER
1007 {
1008 LAYER_ID LayerID = wxEmptyString;
1010 std::vector<ROUTE_VERTEX> RouteVertices;
1011
1012 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1013 };
1014
1016 {
1018 bool Unrouted = false;
1022
1023 LAYER_ID UnrouteLayerID = wxEmptyString;
1025
1026 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1027 };
1028
1029 std::map<NETELEMENT_ID, PIN> Pins;
1030 std::map<NETELEMENT_ID, JUNCTION_PCB> Junctions;
1031 std::map<NETELEMENT_ID, VIA> Vias;
1032 std::map<NETELEMENT_ID, COPPER_TERMINAL> CopperTerminals;
1033 std::vector<CONNECTION_PCB> Connections;
1034
1035 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1036 };
1037
1127
1128
1130 {
1132 {
1134 {
1137 bool Fixed = false;
1138
1139 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1140 };
1141
1142 NET_ID NetID = wxEmptyString;
1143 std::map<COPPER_TERM_ID, COPPER_TERM> CopperTerminals;
1144 bool Fixed = false;
1145
1146 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1147 };
1148
1156 bool Fixed = false;
1157 GROUP_ID GroupID = wxEmptyString;
1159
1160 std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> AttributeValues;
1161
1162 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1163 };
1164
1165
1166 enum class NETSYNCH
1167 {
1171 };
1172
1173
1189
1190
1192 {
1194
1195 std::map<GROUP_ID, GROUP> Groups;
1196 std::map<REUSEBLOCK_ID, REUSEBLOCK> ReuseBlocks;
1197
1198 std::map<BOARD_ID, CADSTAR_BOARD> Boards;
1200 std::map<FIGURE_ID, FIGURE> Figures;
1201 std::map<AREA_ID, AREA> Areas;
1202 std::map<COMPONENT_ID, COMPONENT> Components;
1203 std::map<DOCUMENTATION_SYMBOL_ID, DOCUMENTATION_SYMBOL> DocumentationSymbols;
1204 std::map<TRUNK_ID, TRUNK> Trunks;
1205 std::map<NET_ID, NET_PCB> Nets;
1206 std::map<TEMPLATE_ID, TEMPLATE> Templates;
1207 std::map<COPPER_ID, COPPER> Coppers;
1208 std::map<TEXT_ID, TEXT> Texts;
1209 std::map<DIMENSION_ID, DIMENSION> Dimensions;
1210 std::map<DRILL_TABLE_ID, DRILL_TABLE> DrillTables;
1212
1213 void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
1214 };
1215
1216
1217 wxString Filename;
1218
1224
1226
1227private:
1228 XNODE* m_rootNode; // Currently parsed root node
1229
1230}; //CADSTAR_PCB_ARCHIVE_PARSER
1231
1232#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:71
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)
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.
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
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override