KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CADSTAR_PCB_ARCHIVE_PARSER Class Reference

Represents a CADSTAR PCB Archive (CPA) file. More...

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER:
CADSTAR_ARCHIVE_PARSER CADSTAR_PCB_ARCHIVE_LOADER

Classes

struct  AREA
 From CADSTAR Help: "Area is for creating areas within which, and nowhere else, certain operations are carried out (e.g. More...
 
struct  ASSIGNMENTS
 
struct  CADSTAR_BOARD
 
struct  CADSTAR_PAD_SHAPE
 
struct  CODEDEFS_PCB
 
struct  COMPONENT
 
struct  COMPONENT_AREA
 From CADSTAR Help: "Area is for creating areas within which, and nowhere else, certain operations are carried out (e.g. More...
 
struct  COMPONENT_COPPER
 A shape of copper in the component footprint. More...
 
struct  COMPONENT_PAD
 
struct  COPPER
 
struct  COPPERCODE
 
struct  COPREASSIGN
 
struct  DIMENSION
 Linear, leader (radius/diameter) or angular dimension. More...
 
struct  DRILL_TABLE
 
struct  LAYER
 
struct  LAYERDEFS
 
struct  LAYERPAIR
 
struct  LAYOUT
 
struct  LIBRARY
 
struct  MATERIAL
 
struct  NET_PCB
 
struct  PAD_EXITS
 From CADSTAR help: "For specifying the directions in which routes can enter or exit the pad. More...
 
struct  PADCODE
 
struct  PADEXCEPTION
 
struct  PADREASSIGN
 
struct  PIN_ATTRIBUTE
 
struct  RULESET
 
struct  SPACINGCODE
 
struct  SPCCLASSSPACE
 
struct  SYMDEF_PCB
 
struct  TECHNOLOGY_SECTION
 
struct  TEMPLATE
 Templates are CADSTAR's equivalent to a "filled zone". More...
 
struct  TRUNK
 
struct  VIACODE
 
struct  VIAREASSIGN
 

Public Types

enum class  MATERIAL_LAYER_TYPE { CONSTRUCTION , ELECTRICAL , NON_ELECTRICAL }
 Type of layer appropriate for the material being set up. More...
 
enum class  LAYER_TYPE {
  UNDEFINED , ALLLAYER , ALLELEC , ALLDOC ,
  NOLAYER , ASSCOMPCOPP , JUMPERLAYER , ELEC ,
  POWER , NONELEC , CONSTRUCTION , DOC
}
 
enum class  LAYER_SUBTYPE {
  LAYERSUBTYPE_NONE , LAYERSUBTYPE_SILKSCREEN , LAYERSUBTYPE_PLACEMENT , LAYERSUBTYPE_ASSEMBLY ,
  LAYERSUBTYPE_SOLDERRESIST , LAYERSUBTYPE_PASTE , LAYERSUBTYPE_CLEARANCE , LAYERSUBTYPE_ROUT
}
 
enum class  ROUTING_BIAS {
  UNBIASED , X , Y , ANTI_ROUTE ,
  OBSTACLE
}
 
enum class  EMBEDDING { NONE , ABOVE , BELOW }
 
enum class  PAD_SHAPE_TYPE {
  ANNULUS , BULLET , CIRCLE , DIAMOND ,
  FINGER , OCTAGON , RECTANGLE , ROUNDED_RECT ,
  SQUARE
}
 
enum class  PAD_SIDE { MINIMUM , MAXIMUM , THROUGH_HOLE }
 From CADSTAR Help: "This parameter indicates the physical layers on which the selected pad is placed. More...
 
enum class  SYMDEF_TYPE { COMPONENT , JUMPER , STARPOINT , TESTPOINT }
 A symbol definition can represent a number of different objects in CADSTAR. More...
 
enum class  TESTLAND_SIDE { NONE , MAX , MIN , BOTH }
 
enum class  NETSYNCH { UNDEFINED , WARNING , FULL }
 
typedef wxString MATERIAL_ID
 
typedef long PHYSICAL_LAYER_ID
 
typedef wxString COPPERCODE_ID
 
typedef wxString PADCODE_ID
 
typedef wxString VIACODE_ID
 
typedef wxString SPACINGCODE_ID
 
typedef wxString LAYERPAIR_ID
 
typedef wxString RULESET_ID
 
typedef wxString COMP_AREA_ID
 
typedef long PAD_ID
 Pad identifier (pin) in the PCB.
 
typedef wxString DIMENSION_ID
 
typedef wxString BOARD_ID
 
typedef wxString AREA_ID
 
typedef wxString COMPONENT_ID
 
typedef wxString TEMPLATE_ID
 
typedef long COPPER_TERM_ID
 
typedef wxString COPPER_ID
 
typedef wxString DRILL_TABLE_ID
 
typedef wxString TRUNK_ID
 
enum class  TEXT_FIELD_NAME {
  DESIGN_TITLE , SHORT_JOBNAME , LONG_JOBNAME , NUM_OF_SHEETS ,
  SHEET_NUMBER , SHEET_NAME , VARIANT_NAME , VARIANT_DESCRIPTION ,
  REG_USER , COMPANY_NAME , CURRENT_USER , DATE ,
  TIME , MACHINE_NAME , FROM_FILE , DISTANCE ,
  UNITS_SHORT , UNITS_ABBREV , UNITS_FULL , HYPERLINK ,
  NONE
}
 These are special fields in text objects enclosed between the tokens '<@' and '>' such as <@[FIELD_NAME][FIELD_VALUE]>. More...
 
enum class  RESOLUTION { HUNDREDTH_MICRON }
 
enum class  LINESTYLE {
  SOLID , DASH , DASHDOT , DASHDOTDOT ,
  DOT
}
 
enum class  VERTEX_TYPE {
  POINT , CLOCKWISE_ARC , CLOCKWISE_SEMICIRCLE , ANTICLOCKWISE_ARC ,
  ANTICLOCKWISE_SEMICIRCLE
}
 
enum class  SHAPE_TYPE { OPENSHAPE , OUTLINE , SOLID , HATCHED }
 
enum class  UNITS {
  DESIGN , THOU , INCH , MICROMETRE ,
  MM , CENTIMETER , METER
}
 
enum class  ANGUNITS { DEGREES , RADIANS }
 
enum class  GRID_TYPE { FRACTIONALGRID , STEPGRID }
 
enum class  ALIGNMENT {
  NO_ALIGNMENT , TOPLEFT , TOPCENTER , TOPRIGHT ,
  CENTERLEFT , CENTERCENTER , CENTERRIGHT , BOTTOMLEFT ,
  BOTTOMCENTER , BOTTOMRIGHT
}
 From CADSTAR Help: "Text Alignment enables you to define the position of an alignment origin for all text items in CADSTAR. More...
 
enum class  JUSTIFICATION { LEFT , CENTER , RIGHT }
 From CADSTAR Help: "Multi Line Text can also be justified as Left, Centre or Right. More...
 
enum class  READABILITY { BOTTOM_TO_TOP , TOP_TO_BOTTOM }
 Sets the readability direction of text. More...
 
enum class  ATTROWNER {
  ALL_ITEMS , AREA , BOARD , COMPONENT ,
  CONNECTION , COPPER , DOCSYMBOL , FIGURE ,
  NET , NETCLASS , PART , PART_DEFINITION ,
  PIN , SIGNALREF , SYMBOL , SYMDEF ,
  TEMPLATE , TESTPOINT
}
 
enum class  ATTRUSAGE {
  BOTH , COMPONENT , PART_DEFINITION , PART_LIBRARY ,
  SYMBOL , UNDEFINED
}
 
enum class  SWAP_RULE { NO_SWAP , USE_SWAP_LAYER , BOTH }
 Corresponds to "Display when" Item property. More...
 
typedef wxString LINECODE_ID
 
typedef wxString HATCHCODE_ID
 
typedef wxString ROUTECODE_ID
 
typedef wxString NETCLASS_ID
 
typedef wxString SPACING_CLASS_ID
 
typedef wxString TEXTCODE_ID
 
typedef wxString LAYER_ID
 ID of a Sheet (if schematic) or board Layer (if PCB)
 
typedef wxString VARIANT_ID
 
typedef wxString ATTRIBUTE_ID
 
typedef wxString SYMDEF_ID
 
typedef wxString PART_ID
 
typedef wxString GATE_ID
 
typedef long TERMINAL_ID
 Terminal is the pin identifier in the schematic.
 
typedef long PART_DEFINITION_PIN_ID
 Pin identifier in the part definition.
 
typedef long PART_PIN_ID
 Pin identifier in the part.
 
typedef wxString TEXT_ID
 
typedef wxString FIGURE_ID
 
typedef wxString GROUP_ID
 
typedef wxString REUSEBLOCK_ID
 
typedef wxString NET_ID
 
typedef wxString NETELEMENT_ID
 
typedef wxString DOCUMENTATION_SYMBOL_ID
 
typedef wxString COLOR_ID
 

Public Member Functions

 CADSTAR_PCB_ARCHIVE_PARSER (const wxString &aFilename)
 
virtual ~CADSTAR_PCB_ARCHIVE_PARSER ()
 
void Parse (bool aLibrary=false)
 Parses the file.
 

Static Public Member Functions

static PAD_SIDE GetPadSide (const wxString &aPadSideString)
 
static TESTLAND_SIDE ParseTestlandSide (XNODE *aNode)
 
static wxString ParseTextFields (const wxString &aTextString, PARSER_CONTEXT *aParserContext)
 Replaces CADSTAR fields for the equivalent in KiCad and stores the field values in aParserContext.
 
static UNITS ParseUnits (XNODE *aNode)
 
static ANGUNITS ParseAngunits (XNODE *aNode)
 
static ALIGNMENT ParseAlignment (XNODE *aNode)
 
static JUSTIFICATION ParseJustification (XNODE *aNode)
 
static READABILITY ParseReadability (XNODE *aNode)
 
static SWAP_RULE ParseSwapRule (XNODE *aNode)
 
static void InsertAttributeAtEnd (XNODE *aNode, wxString aValue)
 
static XNODELoadArchiveFile (const wxString &aFileName, const wxString &aFileTypeIdentifier, PROGRESS_REPORTER *aProgressReporter=nullptr)
 Reads a CADSTAR Archive file (S-parameter format)
 
static bool IsValidAttribute (wxXmlAttribute *aAttribute)
 
static wxString GetXmlAttributeIDString (XNODE *aNode, unsigned int aID, bool aIsRequired=true)
 
static long GetXmlAttributeIDLong (XNODE *aNode, unsigned int aID, bool aIsRequired=true)
 
static void CheckNoChildNodes (XNODE *aNode)
 
static void CheckNoNextNodes (XNODE *aNode)
 
static void ParseChildEValue (XNODE *aNode, PARSER_CONTEXT *aContext, EVALUE &aValueToParse)
 
static std::vector< POINTParseAllChildPoints (XNODE *aNode, PARSER_CONTEXT *aContext, bool aTestAllChildNodes=false, int aExpectedNumPoints=UNDEFINED_VALUE)
 if no children are present, it just returns an empty vector (without throwing an exception)
 
static std::vector< VERTEXParseAllChildVertices (XNODE *aNode, PARSER_CONTEXT *aContext, bool aTestAllChildNodes=false)
 if no children are present, it just returns an empty vector (without throwing an exception)
 
static std::vector< CUTOUTParseAllChildCutouts (XNODE *aNode, PARSER_CONTEXT *aContext, bool aTestAllChildNodes=false)
 if no children are present, it just returns an empty vector (without throwing an exception)
 
static long GetNumberOfChildNodes (XNODE *aNode)
 
static long GetNumberOfStepsForReporting (XNODE *aRootNode, std::vector< wxString > aSubNodeChildrenToCount)
 
static wxString EscapeFieldText (const wxString &aFieldText)
 
static wxString HandleTextOverbar (wxString aCadstarString)
 Convert a string with CADSTAR overbar characters to equivalent in KiCad.
 
static void FixTextPositionNoAlignment (EDA_TEXT *aKiCadTextItem, bool aInvertY=false)
 Corrects the position of a text element that had NO_ALIGNMENT in CADSTAR.
 
static wxString generateLibName (const wxString &aRefName, const wxString &aAlternateName)
 

Public Attributes

wxString Filename
 
HEADER Header
 
ASSIGNMENTS Assignments
 
LIBRARY Library
 
PARTS Parts
 
LAYOUT Layout
 
int KiCadUnitMultiplier
 Use this value to convert units in this CPA file to KiCad units.
 

Static Public Attributes

static const long UNDEFINED_VALUE = -1
 
static const double TXT_HEIGHT_RATIO = ( 24.0 - 5.0 ) / 24.0
 CADSTAR fonts are drawn on a 24x24 integer matrix, where the each axis goes from 0 to 24.
 
static const std::map< TEXT_FIELD_NAME, wxString > CADSTAR_TO_KICAD_FIELDS
 Map between CADSTAR fields and KiCad text variables.
 
static const long FONT_NORMAL = 400
 
static const long FONT_BOLD = 700
 

Protected Member Functions

void checkPoint ()
 Updates m_progressReporter or throws if user cancelled.
 

Protected Attributes

PARSER_CONTEXT m_context
 
PROGRESS_REPORTERm_progressReporter
 

Private Attributes

XNODEm_rootNode
 

Detailed Description

Represents a CADSTAR PCB Archive (CPA) file.

Definition at line 42 of file cadstar_pcb_archive_parser.h.

Member Typedef Documentation

◆ AREA_ID

Definition at line 78 of file cadstar_pcb_archive_parser.h.

◆ ATTRIBUTE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_ID
inherited

Definition at line 108 of file cadstar_archive_parser.h.

◆ BOARD_ID

Definition at line 77 of file cadstar_pcb_archive_parser.h.

◆ COLOR_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::COLOR_ID
inherited

Definition at line 122 of file cadstar_archive_parser.h.

◆ COMP_AREA_ID

Definition at line 74 of file cadstar_pcb_archive_parser.h.

◆ COMPONENT_ID

Definition at line 79 of file cadstar_pcb_archive_parser.h.

◆ COPPER_ID

Definition at line 82 of file cadstar_pcb_archive_parser.h.

◆ COPPER_TERM_ID

◆ COPPERCODE_ID

Definition at line 68 of file cadstar_pcb_archive_parser.h.

◆ DIMENSION_ID

Definition at line 76 of file cadstar_pcb_archive_parser.h.

◆ DOCUMENTATION_SYMBOL_ID

Definition at line 121 of file cadstar_archive_parser.h.

◆ DRILL_TABLE_ID

Definition at line 83 of file cadstar_pcb_archive_parser.h.

◆ FIGURE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::FIGURE_ID
inherited

Definition at line 116 of file cadstar_archive_parser.h.

◆ GATE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::GATE_ID
inherited

Definition at line 111 of file cadstar_archive_parser.h.

◆ GROUP_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::GROUP_ID
inherited

Definition at line 117 of file cadstar_archive_parser.h.

◆ HATCHCODE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::HATCHCODE_ID
inherited

Definition at line 101 of file cadstar_archive_parser.h.

◆ LAYER_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::LAYER_ID
inherited

ID of a Sheet (if schematic) or board Layer (if PCB)

Definition at line 106 of file cadstar_archive_parser.h.

◆ LAYERPAIR_ID

Definition at line 72 of file cadstar_pcb_archive_parser.h.

◆ LINECODE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::LINECODE_ID
inherited

Definition at line 100 of file cadstar_archive_parser.h.

◆ MATERIAL_ID

Definition at line 66 of file cadstar_pcb_archive_parser.h.

◆ NET_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::NET_ID
inherited

Definition at line 119 of file cadstar_archive_parser.h.

◆ NETCLASS_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::NETCLASS_ID
inherited

Definition at line 103 of file cadstar_archive_parser.h.

◆ NETELEMENT_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::NETELEMENT_ID
inherited

Definition at line 120 of file cadstar_archive_parser.h.

◆ PAD_ID

Pad identifier (pin) in the PCB.

Definition at line 75 of file cadstar_pcb_archive_parser.h.

◆ PADCODE_ID

Definition at line 69 of file cadstar_pcb_archive_parser.h.

◆ PART_DEFINITION_PIN_ID

Pin identifier in the part definition.

Definition at line 113 of file cadstar_archive_parser.h.

◆ PART_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::PART_ID
inherited

Definition at line 110 of file cadstar_archive_parser.h.

◆ PART_PIN_ID

typedef long CADSTAR_ARCHIVE_PARSER::PART_PIN_ID
inherited

Pin identifier in the part.

Definition at line 114 of file cadstar_archive_parser.h.

◆ PHYSICAL_LAYER_ID

◆ REUSEBLOCK_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::REUSEBLOCK_ID
inherited

Definition at line 118 of file cadstar_archive_parser.h.

◆ ROUTECODE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::ROUTECODE_ID
inherited

Definition at line 102 of file cadstar_archive_parser.h.

◆ RULESET_ID

Definition at line 73 of file cadstar_pcb_archive_parser.h.

◆ SPACING_CLASS_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::SPACING_CLASS_ID
inherited

Definition at line 104 of file cadstar_archive_parser.h.

◆ SPACINGCODE_ID

Definition at line 71 of file cadstar_pcb_archive_parser.h.

◆ SYMDEF_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::SYMDEF_ID
inherited

Definition at line 109 of file cadstar_archive_parser.h.

◆ TEMPLATE_ID

Definition at line 80 of file cadstar_pcb_archive_parser.h.

◆ TERMINAL_ID

typedef long CADSTAR_ARCHIVE_PARSER::TERMINAL_ID
inherited

Terminal is the pin identifier in the schematic.

Definition at line 112 of file cadstar_archive_parser.h.

◆ TEXT_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::TEXT_ID
inherited

Definition at line 115 of file cadstar_archive_parser.h.

◆ TEXTCODE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::TEXTCODE_ID
inherited

Definition at line 105 of file cadstar_archive_parser.h.

◆ TRUNK_ID

Definition at line 84 of file cadstar_pcb_archive_parser.h.

◆ VARIANT_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::VARIANT_ID
inherited

Definition at line 107 of file cadstar_archive_parser.h.

◆ VIACODE_ID

Definition at line 70 of file cadstar_pcb_archive_parser.h.

Member Enumeration Documentation

◆ ALIGNMENT

enum class CADSTAR_ARCHIVE_PARSER::ALIGNMENT
stronginherited

From CADSTAR Help: "Text Alignment enables you to define the position of an alignment origin for all text items in CADSTAR.

The alignment origin is a point on or within the text boundary and defines how the text is displayed.

For example, with an alignment of bottom-right the origin will be positioned at the bottom right of the text boundary. This makes it easier to right-align several text items regardless of the length of text displayed.

Text Alignment applies to all CADSTAR text. [...]

Note: Unaligned text operates in the way CADSTAR text always has. In most cases this behaves as Bottom Left alignment, but there are a few exceptions, e.g. pin names. Also unaligned multiline text has an origin Bottom Left of the first line."

See also JUSTIFICATION

Enumerator
NO_ALIGNMENT 

NO_ALIGNMENT has different meaning depending on the object type.

TOPLEFT 
TOPCENTER 
TOPRIGHT 
CENTERLEFT 
CENTERCENTER 
CENTERRIGHT 
BOTTOMLEFT 
BOTTOMCENTER 
BOTTOMRIGHT 

Definition at line 612 of file cadstar_archive_parser.h.

◆ ANGUNITS

enum class CADSTAR_ARCHIVE_PARSER::ANGUNITS
stronginherited
Enumerator
DEGREES 
RADIANS 

Definition at line 519 of file cadstar_archive_parser.h.

◆ ATTROWNER

enum class CADSTAR_ARCHIVE_PARSER::ATTROWNER
stronginherited
Enumerator
ALL_ITEMS 
AREA 
BOARD 
COMPONENT 
CONNECTION 
COPPER 
DOCSYMBOL 
FIGURE 
NET 
NETCLASS 
PART 

Only library Attributes.

PART_DEFINITION 

Only library Attributes.

PIN 
SIGNALREF 
SYMBOL 
SYMDEF 
TEMPLATE 
TESTPOINT 

Definition at line 666 of file cadstar_archive_parser.h.

◆ ATTRUSAGE

enum class CADSTAR_ARCHIVE_PARSER::ATTRUSAGE
stronginherited
Enumerator
BOTH 

From CADSTAR Help: Assigned to both Schematic symbols and PCB components, and displayed on Schematic and PCB designs.

COMPONENT 

From CADSTAR Help: Assigned to PCB components and displayed on PCB designs.

PART_DEFINITION 

From CADSTAR Help: Assigned to Parts library Definitions and displayed by the Library searcher.

PART_LIBRARY 

From CADSTAR Help: Only used by non-Cadstar applications.

SYMBOL 

From CADSTAR Help: Assigned to Schematic Symbols and displayed on Schematic Designs.

UNDEFINED 

Note: It seems that some attribute have no "ATTRUSAGE" defined.

It appears that the attributes that fall under this category are the ones associated with the design itself (i.e. not inherited from the library)

Definition at line 689 of file cadstar_archive_parser.h.

◆ EMBEDDING

Enumerator
NONE 
ABOVE 
BELOW 

Definition at line 150 of file cadstar_pcb_archive_parser.h.

◆ GRID_TYPE

enum class CADSTAR_ARCHIVE_PARSER::GRID_TYPE
stronginherited
Enumerator
FRACTIONALGRID 

Param1 = Units, Param2 = Divisor.

The grid is equal in X and Y dimensions with a step size equal to Param1/Param2

STEPGRID 

Param1 = X Step, Param2 = Y Step. A standard x,y grid.

Definition at line 529 of file cadstar_archive_parser.h.

◆ JUSTIFICATION

enum class CADSTAR_ARCHIVE_PARSER::JUSTIFICATION
stronginherited

From CADSTAR Help: "Multi Line Text can also be justified as Left, Centre or Right.

This does not affect the text alignment. Note: Justification of single line text has no effect."

This only affects multiline text

See also ALIGNMENT

Enumerator
LEFT 
CENTER 
RIGHT 

Definition at line 638 of file cadstar_archive_parser.h.

◆ LAYER_SUBTYPE

Enumerator
LAYERSUBTYPE_NONE 
LAYERSUBTYPE_SILKSCREEN 
LAYERSUBTYPE_PLACEMENT 
LAYERSUBTYPE_ASSEMBLY 
LAYERSUBTYPE_SOLDERRESIST 
LAYERSUBTYPE_PASTE 
LAYERSUBTYPE_CLEARANCE 
LAYERSUBTYPE_ROUT 

Definition at line 127 of file cadstar_pcb_archive_parser.h.

◆ LAYER_TYPE

Enumerator
UNDEFINED 

Only used for error detection.

ALLLAYER 

Inbuilt layer type (cannot be assigned to user layers)

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)

ASSCOMPCOPP 

Inbuilt layer type (cannot be assigned to user layers)

JUMPERLAYER 

Inbuilt layer type (cannot be assigned to user layers)

ELEC 
POWER 
NONELEC 

This type has subtypes.

CONSTRUCTION 
DOC 

Definition at line 110 of file cadstar_pcb_archive_parser.h.

◆ LINESTYLE

enum class CADSTAR_ARCHIVE_PARSER::LINESTYLE
stronginherited
Enumerator
SOLID 
DASH 
DASHDOT 
DASHDOTDOT 
DOT 

Definition at line 288 of file cadstar_archive_parser.h.

◆ MATERIAL_LAYER_TYPE

Type of layer appropriate for the material being set up.

Enumerator
CONSTRUCTION 
ELECTRICAL 

Either.

See also
LAYER_TYPE::ELEC or
LAYER_TYPE::POWER
NON_ELECTRICAL 

Definition at line 89 of file cadstar_pcb_archive_parser.h.

◆ NETSYNCH

Enumerator
UNDEFINED 
WARNING 
FULL 

Definition at line 1165 of file cadstar_pcb_archive_parser.h.

◆ PAD_SHAPE_TYPE

Enumerator
ANNULUS 
BULLET 
CIRCLE 

Keyword "ROUND".

DIAMOND 
FINGER 
OCTAGON 
RECTANGLE 
ROUNDED_RECT 

Keyword "ROUNDED".

SQUARE 

Definition at line 267 of file cadstar_pcb_archive_parser.h.

◆ PAD_SIDE

From CADSTAR Help: "This parameter indicates the physical layers on which the selected pad is placed.

Note: When you change the Side parameter in PCB Design, the Side assigned to the pad in the library is not overwritten."

Enumerator
MINIMUM 

PHYSICAL_LAYER_ID 1 (i.e.

front / top side). Normally used for surface mount devices.

MAXIMUM 

The highest PHYSICAL_LAYER_ID currently defined (i.e.

back / bottom side). Normally used for surface mount devices.

THROUGH_HOLE 

All physical layers currently defined.

Definition at line 488 of file cadstar_pcb_archive_parser.h.

◆ READABILITY

enum class CADSTAR_ARCHIVE_PARSER::READABILITY
stronginherited

Sets the readability direction of text.

From CADSTAR Help: "Horizontal text will always be displayed from left to right (i.e. never upside down). Vertical text can be set as readable from either the left or right edge of the design."

I.e. Vertical text can either be rotated 90 degrees clockwise or 90 degrees anticlockwise from horizontal. This does not impact vertical text

Enumerator
BOTTOM_TO_TOP 

When text is vertical, show it rotated 90 degrees anticlockwise.

TOP_TO_BOTTOM 

When text is vertical, show it rotated 90 degrees clockwise.

Definition at line 656 of file cadstar_archive_parser.h.

◆ RESOLUTION

enum class CADSTAR_ARCHIVE_PARSER::RESOLUTION
stronginherited
Enumerator
HUNDREDTH_MICRON 

Definition at line 250 of file cadstar_archive_parser.h.

◆ ROUTING_BIAS

Enumerator
UNBIASED 

Keyword "UNBIASED" (default)

Keyword "X_BIASED".

Keyword "Y_BIASED".

ANTI_ROUTE 

Keyword "ANTITRACK".

OBSTACLE 

Keyword "OBSTACLE".

Definition at line 140 of file cadstar_pcb_archive_parser.h.

◆ SHAPE_TYPE

enum class CADSTAR_ARCHIVE_PARSER::SHAPE_TYPE
stronginherited
Enumerator
OPENSHAPE 

Unfilled open shape. Cannot have cutouts.

OUTLINE 

Unfilled closed shape.

SOLID 

Filled closed shape (solid fill).

HATCHED 

Filled closed shape (hatch fill).

Definition at line 475 of file cadstar_archive_parser.h.

◆ SWAP_RULE

enum class CADSTAR_ARCHIVE_PARSER::SWAP_RULE
stronginherited

Corresponds to "Display when" Item property.

From CADSTAR Help: "This parameter enables you to make the visibility of a component outline/area (or an area of component copper, or a string of component text) dependent on the current mirror status of the component. For example, you may require a string of component text to be displayed only when the component is mirrored."

Enumerator
NO_SWAP 

Display when Unmirrored.

USE_SWAP_LAYER 

Display when Mirrored.

BOTH 

Always display (Mirrored and Unmirrored)

Definition at line 846 of file cadstar_archive_parser.h.

◆ SYMDEF_TYPE

A symbol definition can represent a number of different objects in CADSTAR.

SYMDEF_TYPE is used in cadstar2kicadplugin to simplify identification of each type.

Enumerator
COMPONENT 

Standard PCB Component definition.

JUMPER 

From CADSTAR Help: "Jumpers are components used primarily for the purpose of routing.

A jumper's two pins are connected with a wire, joining together the nets on either side. Typically, a jumper is used to bridge across other routes where a routing problem is particularly difficult or to make a small modification to a design when most of the routing has been finalised.

In CADSTAR, components are designated as jumpers in the component footprint. If the footprint has two pins and the first eight letters of the reference name spell "JUMPERNF" then the component will be treated as a jumper.

From CADSTAR 8.0 archive format onwards, jumpers are saved as jumpers. For older archive formats and for most other export formats and post processing, jumpers are treated just as components. When CADSTAR saves a PCB design in an old archive format, the implied connection between the jumper's pins is added as an actual connection. When an old archive or binary PCB design is opened in the latest CADSTAR, any component footprint with two pins and whose first eight letters spell "JUMPERNF" will be treated as a jumper footprint automatically. If there is an actual connection between the pins, it will be removed and one implied from then on. If there isn't an actual connection, the nets connected to the pins will be merged. If a merge is needed and if each net has a user-supplied name (not $...), you will be asked to choose which name to use."

STARPOINT 

From CADSTAR Help: "Starpoints are special symbols/components that can be used to electrically connect different nets together, whilst avoiding any of the standard design rule error codes that would normally occur.

If the first eleven letters of the reference name spell "STARPOINTNF" then the component will be treated as a starpoint.

For a starpoint component to be valid:

  • There must be at least two pads
  • All pads must have the same position
  • All pads must have the same orientation
  • All pads must be on the same side
  • All pad codes must be the same
  • All pads must have the same exit direction
  • All pads must have the same PCB Only Pad setting

If a starpoint component is not valid you will get an error message when trying to add it to the PCB component library."

TESTPOINT 

From CADSTAR Help: "A testpoint is an area of copper connected to a net.

It allows a test probe to investigate the electrical properties of that net. The Testpoint Symbols provided in the CADSTAR libraries are the Alternates for a pre-defined symbol called TESTPOINT." If the ReferenceName equals "TESTPOINT", then the component is treated as such. Note that the library manager does not permit adding a component with the name "TESTPOINT" if it has more than one pad defined.

Definition at line 728 of file cadstar_pcb_archive_parser.h.

◆ TESTLAND_SIDE

Enumerator
NONE 
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).

BOTH 

Definition at line 866 of file cadstar_pcb_archive_parser.h.

◆ TEXT_FIELD_NAME

enum class CADSTAR_ARCHIVE_PARSER::TEXT_FIELD_NAME
stronginherited

These are special fields in text objects enclosed between the tokens '<@' and '>' such as <@[FIELD_NAME][FIELD_VALUE]>.

For example: "<@DESIGN TITLEProject Title@>"

Enumerator
DESIGN_TITLE 
SHORT_JOBNAME 
LONG_JOBNAME 
NUM_OF_SHEETS 
SHEET_NUMBER 
SHEET_NAME 
VARIANT_NAME 
VARIANT_DESCRIPTION 
REG_USER 
COMPANY_NAME 
CURRENT_USER 
DATE 
TIME 
MACHINE_NAME 
FROM_FILE 
DISTANCE 
UNITS_SHORT 
UNITS_ABBREV 
UNITS_FULL 
HYPERLINK 
NONE 

Synthetic for flagging.

Definition at line 143 of file cadstar_archive_parser.h.

◆ UNITS

enum class CADSTAR_ARCHIVE_PARSER::UNITS
stronginherited
Enumerator
DESIGN 

Inherits from design units (assumed Assignments->Technology->Units)

THOU 
INCH 
MICROMETRE 
MM 
CENTIMETER 
METER 

Definition at line 504 of file cadstar_archive_parser.h.

◆ VERTEX_TYPE

enum class CADSTAR_ARCHIVE_PARSER::VERTEX_TYPE
stronginherited
Enumerator
POINT 
CLOCKWISE_ARC 
CLOCKWISE_SEMICIRCLE 
ANTICLOCKWISE_ARC 
ANTICLOCKWISE_SEMICIRCLE 

Definition at line 429 of file cadstar_archive_parser.h.

Constructor & Destructor Documentation

◆ CADSTAR_PCB_ARCHIVE_PARSER()

CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PCB_ARCHIVE_PARSER ( const wxString &  aFilename)
inlineexplicit

Definition at line 45 of file cadstar_pcb_archive_parser.h.

References KiCadUnitMultiplier.

◆ ~CADSTAR_PCB_ARCHIVE_PARSER()

virtual CADSTAR_PCB_ARCHIVE_PARSER::~CADSTAR_PCB_ARCHIVE_PARSER ( )
inlinevirtual

Definition at line 53 of file cadstar_pcb_archive_parser.h.

References m_rootNode.

Member Function Documentation

◆ CheckNoChildNodes()

◆ CheckNoNextNodes()

◆ checkPoint()

◆ EscapeFieldText()

static wxString CADSTAR_ARCHIVE_PARSER::EscapeFieldText ( const wxString &  aFieldText)
inlinestaticinherited

◆ FixTextPositionNoAlignment()

void CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment ( EDA_TEXT aKiCadTextItem,
bool  aInvertY = false 
)
staticinherited

Corrects the position of a text element that had NO_ALIGNMENT in CADSTAR.

Assumes that the provided text element has been initialised with a position and orientation.

Parameters
aKiCadTextItema Kicad item to correct

Definition at line 2778 of file cadstar_archive_parser.cpp.

References EDA_TEXT::GetInterline(), EDA_TEXT::GetText(), EDA_TEXT::GetTextAngle(), EDA_TEXT::Offset(), RotatePoint(), text, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), and CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText().

◆ generateLibName()

wxString CADSTAR_ARCHIVE_PARSER::generateLibName ( const wxString &  aRefName,
const wxString &  aAlternateName 
)
staticinherited

◆ GetNumberOfChildNodes()

long CADSTAR_ARCHIVE_PARSER::GetNumberOfChildNodes ( XNODE aNode)
staticinherited

◆ GetNumberOfStepsForReporting()

long CADSTAR_ARCHIVE_PARSER::GetNumberOfStepsForReporting ( XNODE aRootNode,
std::vector< wxString >  aSubNodeChildrenToCount 
)
staticinherited

◆ GetPadSide()

CADSTAR_PCB_ARCHIVE_PARSER::PAD_SIDE CADSTAR_PCB_ARCHIVE_PARSER::GetPadSide ( const wxString &  aPadSideString)
static

◆ GetXmlAttributeIDLong()

long CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong ( XNODE aNode,
unsigned int  aID,
bool  aIsRequired = true 
)
staticinherited
Parameters
aNode
aID
aIsRequiredPrevents exception throwing if false.
Returns
returns the value (long) of attribute "attrX" in aNode where 'X' is aID
Exceptions
IO_ERRORif attribute does not exist

Definition at line 2608 of file cadstar_archive_parser.cpp.

References CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), THROW_PARSING_IO_ERROR, and CADSTAR_ARCHIVE_PARSER::UNDEFINED_VALUE.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::Parse(), CADSTAR_ARCHIVE_PARSER::FORMAT::Parse(), CADSTAR_ARCHIVE_PARSER::HATCH::Parse(), CADSTAR_ARCHIVE_PARSER::FONT::Parse(), CADSTAR_ARCHIVE_PARSER::TEXTCODE::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTECODE::Parse(), CADSTAR_ARCHIVE_PARSER::POINT::Parse(), CADSTAR_ARCHIVE_PARSER::LONGPOINT::Parse(), CADSTAR_ARCHIVE_PARSER::GRID::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRNAME::COLUMNORDER::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRNAME::COLUMNWIDTH::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT_LOCATION::Parse(), CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::GATE::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Parse(), CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::Parse(), CADSTAR_ARCHIVE_PARSER::PART::Parse(), CADSTAR_ARCHIVE_PARSER::DOCUMENTATION_SYMBOL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL_SHAPE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::PIN_NUM_LABEL_LOC::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMATTR::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPREASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::REASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPCCLASSSPACE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TECHNOLOGY_SECTION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::ARROW::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::TEXTFORMAT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SYMDEF_PCB::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::AREA::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::PIN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::COPPER_TERMINAL::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::COPPER_TERM::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT::Parse(), CADSTAR_ARCHIVE_PARSER::SETTINGS::ParseSubNode(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::ParseSubNode(), CADSTAR_ARCHIVE_PARSER::SYMDEF::ParseSubNode(), and CADSTAR_ARCHIVE_PARSER::NET::ParseSubNode().

◆ GetXmlAttributeIDString()

wxString CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString ( XNODE aNode,
unsigned int  aID,
bool  aIsRequired = true 
)
staticinherited
Parameters
aNode
aID
aIsRequiredPrevents exception throwing if false.
Returns
returns the value (wxString) of attribute "attrX" in aNode where 'X' is aID
Exceptions
IO_ERRORif attribute does not exist

Definition at line 2582 of file cadstar_archive_parser.cpp.

References THROW_MISSING_PARAMETER_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::PART::GetPinType(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::FORMAT::Parse(), CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Parse(), CADSTAR_ARCHIVE_PARSER::HEADER::Parse(), CADSTAR_ARCHIVE_PARSER::VARIANT::Parse(), CADSTAR_ARCHIVE_PARSER::LINECODE::Parse(), CADSTAR_ARCHIVE_PARSER::HATCHCODE::Parse(), CADSTAR_ARCHIVE_PARSER::FONT::Parse(), CADSTAR_ARCHIVE_PARSER::TEXTCODE::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTECODE::Parse(), CADSTAR_ARCHIVE_PARSER::EVALUE::Parse(), CADSTAR_ARCHIVE_PARSER::SHAPE::Parse(), CADSTAR_ARCHIVE_PARSER::GRID::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRNAME::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT_LOCATION::Parse(), CADSTAR_ARCHIVE_PARSER::CADSTAR_NETCLASS::Parse(), CADSTAR_ARCHIVE_PARSER::SPCCLASSNAME::Parse(), CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Parse(), CADSTAR_ARCHIVE_PARSER::REUSEBLOCKREF::Parse(), CADSTAR_ARCHIVE_PARSER::GROUP::Parse(), CADSTAR_ARCHIVE_PARSER::FIGURE::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::GATE::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GROUP::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Parse(), CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::Parse(), CADSTAR_ARCHIVE_PARSER::PART::Parse(), CADSTAR_ARCHIVE_PARSER::DOCUMENTATION_SYMBOL::Parse(), CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRCOL::Parse(), CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMINALCODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::PIN_NUM_LABEL_LOC::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SHEETS::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::COMP::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SIGNALREFERENCELINK::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SIGLOC::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::BUS::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::BLOCK::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BUS_TERM::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::CONNECTION_SCH::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYERDEFS::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPREASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::REASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADREASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIAREASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPCCLASSSPACE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::RULESET::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_COPPER::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_AREA::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::ARROW::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::TEXTFORMAT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_BOARD::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::AREA::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TRUNK::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::PIN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::VIA::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::COPPER_TERMINAL::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::CONNECTION_PCB::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT::Parse(), CADSTAR_ARCHIVE_PARSER::ParseAlignment(), CADSTAR_ARCHIVE_PARSER::ParseAngunits(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::ParseIdentifiers(), CADSTAR_ARCHIVE_PARSER::SYMDEF::ParseIdentifiers(), CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::ParseIdentifiers(), CADSTAR_ARCHIVE_PARSER::NET::CONNECTION::ParseIdentifiers(), CADSTAR_ARCHIVE_PARSER::NET::ParseIdentifiers(), CADSTAR_ARCHIVE_PARSER::ParseJustification(), CADSTAR_ARCHIVE_PARSER::ParseReadability(), CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::ParseSubNode(), CADSTAR_ARCHIVE_PARSER::NET::CONNECTION::ParseSubNode(), CADSTAR_ARCHIVE_PARSER::NET::ParseSubNode(), CADSTAR_ARCHIVE_PARSER::ParseSwapRule(), ParseTestlandSide(), and CADSTAR_ARCHIVE_PARSER::ParseUnits().

◆ HandleTextOverbar()

wxString CADSTAR_ARCHIVE_PARSER::HandleTextOverbar ( wxString  aCadstarString)
staticinherited

Convert a string with CADSTAR overbar characters to equivalent in KiCad.

Parameters
aCadstarStringInput string
Returns
KiCad string with overbar characters

Definition at line 2768 of file cadstar_archive_parser.cpp.

References ConvertToNewOverbarNotation().

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), CADSTAR_SCH_ARCHIVE_LOADER::loadLibPart(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbol(), and CADSTAR_SCH_ARCHIVE_LOADER::loadSymbolGateAndPartFields().

◆ InsertAttributeAtEnd()

void CADSTAR_ARCHIVE_PARSER::InsertAttributeAtEnd ( XNODE aNode,
wxString  aValue 
)
staticinherited

◆ IsValidAttribute()

◆ LoadArchiveFile()

XNODE * CADSTAR_ARCHIVE_PARSER::LoadArchiveFile ( const wxString &  aFileName,
const wxString &  aFileTypeIdentifier,
PROGRESS_REPORTER aProgressReporter = nullptr 
)
staticinherited

Reads a CADSTAR Archive file (S-parameter format)

Parameters
aFileName
aFileTypeIdentifierIdentifier of the first node in the file to check against. E.g. "CADSTARPCB"
aProgressReporterPointer to a Progress Reporter to report progress to.
Returns
XNODE pointing to the top of the tree for further parsing. Each node has the first element as the node's name and subsequent elements as node attributes ("attr0", "attr1", "attr2", etc.). Caller is responsible for deleting to avoid memory leaks.
Exceptions
IO_ERROR

Definition at line 2451 of file cadstar_archive_parser.cpp.

References _, DSNLEXER::CurText(), DSN_EOF, DSN_LEFT, DSN_RIGHT, XNODE::GetParent(), CADSTAR_ARCHIVE_PARSER::InsertAttributeAtEnd(), PROGRESS_REPORTER::KeepRefreshing(), DSNLEXER::NextTok(), PROGRESS_REPORTER::SetCurrentProgress(), and THROW_IO_ERROR.

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::Parse(), and Parse().

◆ Parse()

◆ ParseAlignment()

◆ ParseAllChildCutouts()

std::vector< CADSTAR_ARCHIVE_PARSER::CUTOUT > CADSTAR_ARCHIVE_PARSER::ParseAllChildCutouts ( XNODE aNode,
PARSER_CONTEXT aContext,
bool  aTestAllChildNodes = false 
)
staticinherited

if no children are present, it just returns an empty vector (without throwing an exception)

Parameters
aNodecontaining a series of CUTOUT objects
aTestAllChildNodes
aExpectedNumPointsif -1, this is check is disabled
Returns
std::vector containing all CUTOUT objects
Exceptions
IO_ERRORif one of the following:
  • Unable to parse a CUTOUT object
  • aTestAllChildNodes is true and one of the child nodes is not a valid CUTOUT object

Definition at line 2710 of file cadstar_archive_parser.cpp.

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::CUTOUT::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::SHAPE::Parse().

◆ ParseAllChildPoints()

std::vector< CADSTAR_ARCHIVE_PARSER::POINT > CADSTAR_ARCHIVE_PARSER::ParseAllChildPoints ( XNODE aNode,
PARSER_CONTEXT aContext,
bool  aTestAllChildNodes = false,
int  aExpectedNumPoints = UNDEFINED_VALUE 
)
staticinherited

if no children are present, it just returns an empty vector (without throwing an exception)

Parameters
aNodecontaining a series of POINT objects
aTestAllChildNodes
aExpectedNumPointsif UNDEFINED_VALUE (i.e. -1), this is check is disabled
Returns
std::vector containing all POINT objects
Exceptions
IO_ERRORif one of the following:
  • Unable to parse a POINT object
  • aTestAllChildNodes is true and one of the child nodes is not a valid POINT object
  • aExpectedNumPoints is non-negative and the number of POINT objects found is different

Definition at line 2650 of file cadstar_archive_parser.cpp.

References _, XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::POINT::Parse(), THROW_IO_ERROR, THROW_UNKNOWN_NODE_IO_ERROR, and CADSTAR_ARCHIVE_PARSER::UNDEFINED_VALUE.

Referenced by CADSTAR_ARCHIVE_PARSER::VERTEX::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::CONNECTION_SCH::Parse(), and CADSTAR_ARCHIVE_PARSER::SETTINGS::ParseSubNode().

◆ ParseAllChildVertices()

std::vector< CADSTAR_ARCHIVE_PARSER::VERTEX > CADSTAR_ARCHIVE_PARSER::ParseAllChildVertices ( XNODE aNode,
PARSER_CONTEXT aContext,
bool  aTestAllChildNodes = false 
)
staticinherited

if no children are present, it just returns an empty vector (without throwing an exception)

Parameters
aNodecontaining a series of VERTEX objects
aTestAllChildNodes
aExpectedNumPointsif -1, this is check is disabled
Returns
std::vector containing all VERTEX objects
Exceptions
IO_ERRORif one of the following:
  • Unable to parse a VERTEX object
  • aTestAllChildNodes is true and one of the child nodes is not a valid VERTEX object

Definition at line 2684 of file cadstar_archive_parser.cpp.

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::VERTEX::IsVertex(), CADSTAR_ARCHIVE_PARSER::VERTEX::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::CUTOUT::Parse(), and CADSTAR_ARCHIVE_PARSER::SHAPE::Parse().

◆ ParseAngunits()

◆ ParseChildEValue()

void CADSTAR_ARCHIVE_PARSER::ParseChildEValue ( XNODE aNode,
PARSER_CONTEXT aContext,
EVALUE aValueToParse 
)
staticinherited
Parameters
aNodewith a child node containing an EVALUE
aValueToParse
Exceptions
IO_ERRORif unable to parse or node is not an EVALUE

Definition at line 2640 of file cadstar_archive_parser.cpp.

References XNODE::GetChildren(), CADSTAR_ARCHIVE_PARSER::EVALUE::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL::Parse().

◆ ParseJustification()

◆ ParseReadability()

◆ ParseSwapRule()

◆ ParseTestlandSide()

◆ ParseTextFields()

wxString CADSTAR_ARCHIVE_PARSER::ParseTextFields ( const wxString &  aTextString,
PARSER_CONTEXT aParserContext 
)
staticinherited

Replaces CADSTAR fields for the equivalent in KiCad and stores the field values in aParserContext.

Parameters
aTextStringText string to parse
aParserContextPARSER_CONTEXT in which to store the values of the found fields
Returns

Definition at line 856 of file cadstar_archive_parser.cpp.

References CADSTAR_ARCHIVE_PARSER::CADSTAR_TO_KICAD_FIELDS, CADSTAR_ARCHIVE_PARSER::COMPANY_NAME, CADSTAR_ARCHIVE_PARSER::CURRENT_USER, CADSTAR_ARCHIVE_PARSER::DATE, CADSTAR_ARCHIVE_PARSER::DESIGN_TITLE, CADSTAR_ARCHIVE_PARSER::DISTANCE, CADSTAR_ARCHIVE_PARSER::PARSER_CONTEXT::FilenamesToTextMap, CADSTAR_ARCHIVE_PARSER::FROM_FILE, CADSTAR_ARCHIVE_PARSER::HYPERLINK, CADSTAR_ARCHIVE_PARSER::PARSER_CONTEXT::InconsistentTextFields, KI_FALLTHROUGH, CADSTAR_ARCHIVE_PARSER::LONG_JOBNAME, CADSTAR_ARCHIVE_PARSER::MACHINE_NAME, CADSTAR_ARCHIVE_PARSER::NONE, CADSTAR_ARCHIVE_PARSER::NUM_OF_SHEETS, CADSTAR_ARCHIVE_PARSER::ParseTextFields(), CADSTAR_ARCHIVE_PARSER::REG_USER, CADSTAR_ARCHIVE_PARSER::SHEET_NAME, CADSTAR_ARCHIVE_PARSER::SHEET_NUMBER, CADSTAR_ARCHIVE_PARSER::SHORT_JOBNAME, CADSTAR_ARCHIVE_PARSER::PARSER_CONTEXT::TextFieldToValuesMap, CADSTAR_ARCHIVE_PARSER::PARSER_CONTEXT::TextToHyperlinksMap, CADSTAR_ARCHIVE_PARSER::TIME, CADSTAR_ARCHIVE_PARSER::UNITS_ABBREV, CADSTAR_ARCHIVE_PARSER::UNITS_FULL, CADSTAR_ARCHIVE_PARSER::UNITS_SHORT, CADSTAR_ARCHIVE_PARSER::VARIANT_DESCRIPTION, and CADSTAR_ARCHIVE_PARSER::VARIANT_NAME.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::applyDimensionSettings(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), CADSTAR_ARCHIVE_PARSER::TEXT::Parse(), and CADSTAR_ARCHIVE_PARSER::ParseTextFields().

◆ ParseUnits()

Member Data Documentation

◆ Assignments

◆ CADSTAR_TO_KICAD_FIELDS

const std::map< CADSTAR_ARCHIVE_PARSER::TEXT_FIELD_NAME, wxString > CADSTAR_ARCHIVE_PARSER::CADSTAR_TO_KICAD_FIELDS
staticinherited
Initial value:
=
{ { TEXT_FIELD_NAME::DESIGN_TITLE, wxT( "DESIGN_TITLE" ) },
{ TEXT_FIELD_NAME::SHORT_JOBNAME, wxT( "SHORT_JOBNAME" ) },
{ TEXT_FIELD_NAME::LONG_JOBNAME, wxT( "LONG_JOBNAME" ) },
{ TEXT_FIELD_NAME::SHEET_NAME, wxT( "SHEETNAME" ) },
{ TEXT_FIELD_NAME::VARIANT_NAME, wxT( "VARIANT_NAME" ) },
{ TEXT_FIELD_NAME::VARIANT_DESCRIPTION, wxT( "VARIANT_DESCRIPTION" ) },
{ TEXT_FIELD_NAME::REG_USER, wxT( "REG_USER" ) },
{ TEXT_FIELD_NAME::COMPANY_NAME, wxT( "COMPANY_NAME" ) },
{ TEXT_FIELD_NAME::CURRENT_USER, wxT( "CURRENT_USER" ) },
{ TEXT_FIELD_NAME::DATE, wxT( "DATE" ) },
{ TEXT_FIELD_NAME::TIME, wxT( "TIME" ) },
{ TEXT_FIELD_NAME::MACHINE_NAME, wxT( "MACHINE_NAME" ) } }

Map between CADSTAR fields and KiCad text variables.

This is used as a lookup table when parsing CADSTAR text fields. Most variables have a similar name in KiCad as in CADSTAR.

Definition at line 172 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::loadTextVariables(), CADSTAR_PCB_ARCHIVE_LOADER::loadTextVariables(), and CADSTAR_ARCHIVE_PARSER::ParseTextFields().

◆ Filename

wxString CADSTAR_PCB_ARCHIVE_PARSER::Filename

Definition at line 1216 of file cadstar_pcb_archive_parser.h.

Referenced by Parse().

◆ FONT_BOLD

const long CADSTAR_ARCHIVE_PARSER::FONT_BOLD = 700
staticinherited

◆ FONT_NORMAL

const long CADSTAR_ARCHIVE_PARSER::FONT_NORMAL = 400
staticinherited

Definition at line 329 of file cadstar_archive_parser.h.

◆ Header

◆ KiCadUnitMultiplier

int CADSTAR_PCB_ARCHIVE_PARSER::KiCadUnitMultiplier

◆ Layout

◆ Library

◆ m_context

◆ m_progressReporter

◆ m_rootNode

XNODE* CADSTAR_PCB_ARCHIVE_PARSER::m_rootNode
private

Definition at line 1227 of file cadstar_pcb_archive_parser.h.

Referenced by Parse(), and ~CADSTAR_PCB_ARCHIVE_PARSER().

◆ Parts

PARTS CADSTAR_PCB_ARCHIVE_PARSER::Parts

◆ TXT_HEIGHT_RATIO

const double CADSTAR_ARCHIVE_PARSER::TXT_HEIGHT_RATIO = ( 24.0 - 5.0 ) / 24.0
staticinherited

CADSTAR fonts are drawn on a 24x24 integer matrix, where the each axis goes from 0 to 24.

The characters can each specify a width of between 12 and 24, but the height is fixed at 24.

The default CADSTAR font uses y=5 as the starting point for capital letters, leaving space for the tails of letters such as "g", "p", "y", "q", etc.

The font height in CADSTAR corresponds to the full 24 point height. In KiCad it only corresponds to the height above the guide line, meaning the overall text height will be larger in KiCad.

Definition at line 137 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::applyTextCode(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists(), and CADSTAR_SCH_ARCHIVE_LOADER::getTextHeightFromTextCode().

◆ UNDEFINED_VALUE


The documentation for this class was generated from the following files: