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

#include <cadstar_pcb_archive_loader.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_LOADER:
CADSTAR_PCB_ARCHIVE_PARSER CADSTAR_ARCHIVE_PARSER

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_LOADER (wxString aFilename, LAYER_MAPPING_HANDLER aLayerMappingHandler, bool aLogLayerWarnings, PROGRESS_REPORTER *aProgressReporter)
 
 ~CADSTAR_PCB_ARCHIVE_LOADER ()
 
void Load (BOARD *aBoard, PROJECT *aProject)
 Loads a CADSTAR PCB Archive file into the KiCad BOARD object given.
 
std::vector< std::unique_ptr< FOOTPRINT > > LoadLibrary ()
 Parse a CADSTAR PCB Archive and load the footprints contained within.
 
std::vector< FOOTPRINT * > GetLoadedLibraryFootpints () const
 Return a copy of the loaded library footprints (caller owns the objects)
 
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 Types

using ASSOCIATED_COPPER_PADS = std::map< PAD_ID, std::vector< PAD_ID > >
 Map of pad anchor points (first) to copper pads (second).
 

Private Member Functions

void loadBoardStackup ()
 
void remapUnsureLayers ()
 Callback m_layerMappingHandler for layers we aren't sure of.
 
void loadDesignRules ()
 
void loadComponentLibrary ()
 
void loadGroups ()
 
void loadBoards ()
 
void loadFigures ()
 
void loadTexts ()
 
void loadDimensions ()
 
void loadAreas ()
 
void loadComponents ()
 
void loadDocumentationSymbols ()
 
void loadTemplates ()
 
void loadCoppers ()
 
void loadNets ()
 
void loadTextVariables ()
 
void logBoardStackupWarning (const wxString &aCadstarLayerName, const PCB_LAYER_ID &aKiCadLayer)
 
void logBoardStackupMessage (const wxString &aCadstarLayerName, const PCB_LAYER_ID &aKiCadLayer)
 
void initStackupItem (const LAYER &aCadstarLayer, BOARD_STACKUP_ITEM *aKiCadItem, int aDielectricSublayer)
 
void loadLibraryFigures (const SYMDEF_PCB &aComponent, FOOTPRINT *aFootprint)
 
void loadLibraryCoppers (const SYMDEF_PCB &aComponent, FOOTPRINT *aFootprint)
 
void loadLibraryAreas (const SYMDEF_PCB &aComponent, FOOTPRINT *aFootprint)
 
void loadLibraryPads (const SYMDEF_PCB &aComponent, FOOTPRINT *aFootprint)
 
void loadComponentAttributes (const COMPONENT &aComponent, FOOTPRINT *aFootprint)
 
void loadNetTracks (const NET_ID &aCadstarNetID, const NET_PCB::ROUTE &aCadstarRoute, long aStartWidth=std::numeric_limits< long >::max(), long aEndWidth=std::numeric_limits< long >::max())
 
int loadNetVia (const NET_ID &aCadstarNetID, const NET_PCB::VIA &aCadstarVia)
 Load via and return via size.
 
void checkAndLogHatchCode (const HATCHCODE_ID &aCadstarHatchcodeID)
 
void applyDimensionSettings (const DIMENSION &aCadstarDim, PCB_DIMENSION_BASE *aKiCadDim)
 
bool calculateZonePriorities (PCB_LAYER_ID &aLayer)
 Tries to make a best guess as to the zone priorities based on the pour status.
 
void drawCadstarText (const TEXT &aCadstarText, BOARD_ITEM_CONTAINER *aContainer, const GROUP_ID &aCadstarGroupID=wxEmptyString, const LAYER_ID &aCadstarLayerOverride=wxEmptyString, const VECTOR2I &aMoveVector={ 0, 0 }, double aRotationAngle=0.0, double aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, bool aMirrorInvert=false)
 
void drawCadstarShape (const SHAPE &aCadstarShape, const PCB_LAYER_ID &aKiCadLayer, int aLineThickness, const wxString &aShapeName, BOARD_ITEM_CONTAINER *aContainer, const GROUP_ID &aCadstarGroupID=wxEmptyString, const VECTOR2I &aMoveVector={ 0, 0 }, double aRotationAngle=0.0, double aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, bool aMirrorInvert=false)
 
void drawCadstarCutoutsAsShapes (const std::vector< CUTOUT > &aCutouts, const PCB_LAYER_ID &aKiCadLayer, int aLineThickness, BOARD_ITEM_CONTAINER *aContainer, const GROUP_ID &aCadstarGroupID=wxEmptyString, const VECTOR2I &aMoveVector={ 0, 0 }, double aRotationAngle=0.0, double aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, bool aMirrorInvert=false)
 Uses PCB_SHAPEs to draw the cutouts on m_board object.
 
void drawCadstarVerticesAsShapes (const std::vector< VERTEX > &aCadstarVertices, const PCB_LAYER_ID &aKiCadLayer, int aLineThickness, BOARD_ITEM_CONTAINER *aContainer, const GROUP_ID &aCadstarGroupID=wxEmptyString, const VECTOR2I &aMoveVector={ 0, 0 }, double aRotationAngle=0.0, double aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, bool aMirrorInvert=false)
 Uses PCB_SHAPE to draw the vertices on m_board object.
 
std::vector< PCB_SHAPE * > getShapesFromVertices (const std::vector< VERTEX > &aCadstarVertices, BOARD_ITEM_CONTAINER *aContainer=nullptr, const GROUP_ID &aCadstarGroupID=wxEmptyString, const VECTOR2I &aMoveVector={ 0, 0 }, double aRotationAngle=0.0, double aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, bool aMirrorInvert=false)
 Returns a vector of pointers to PCB_SHAPE objects.
 
PCB_SHAPEgetShapeFromVertex (const POINT &aCadstarStartPoint, const VERTEX &aCadstarVertex, BOARD_ITEM_CONTAINER *aContainer=nullptr, const GROUP_ID &aCadstarGroupID=wxEmptyString, const VECTOR2I &aMoveVector={ 0, 0 }, double aRotationAngle=0.0, double aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, bool aMirrorInvert=false)
 Returns a pointer to a PCB_SHAPE object.
 
ZONEgetZoneFromCadstarShape (const SHAPE &aCadstarShape, const int &aLineThickness, BOARD_ITEM_CONTAINER *aParentContainer)
 
SHAPE_POLY_SET getPolySetFromCadstarShape (const SHAPE &aCadstarShape, int aLineThickness=-1, BOARD_ITEM_CONTAINER *aContainer=nullptr, const VECTOR2I &aMoveVector={ 0, 0 }, double aRotationAngle=0.0, double aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, bool aMirrorInvert=false)
 Returns a SHAPE_POLY_SET object from a Cadstar SHAPE.
 
SHAPE_LINE_CHAIN getLineChainFromShapes (const std::vector< PCB_SHAPE * > &aShapes)
 Returns a SHAPE_LINE_CHAIN object from a series of PCB_SHAPE objects.
 
std::vector< PCB_TRACK * > makeTracksFromShapes (const std::vector< PCB_SHAPE * > &aShapes, BOARD_ITEM_CONTAINER *aParentContainer, NETINFO_ITEM *aNet=nullptr, PCB_LAYER_ID aLayerOverride=UNDEFINED_LAYER, int aWidthOverride=-1)
 Returns a vector of pointers to TRACK/ARC objects.
 
void addAttribute (const ATTRIBUTE_LOCATION &aCadstarAttrLoc, const ATTRIBUTE_ID &aCadstarAttributeID, FOOTPRINT *aFootprint, const wxString &aAttributeValue)
 Adds a CADSTAR Attribute to a KiCad footprint.
 
void applyRouteOffset (VECTOR2I *aPointToOffset, const VECTOR2I &aRefPoint, const long &aOffsetAmount)
 CADSTAR's Post Processor does an action called "Route Offset" which is applied when a route is wider than the pad on which it is terminating or when there are different widths of route, in order to reduce overlap.
 
void applyTextCode (EDA_TEXT *aKiCadText, const TEXTCODE_ID &aCadstarTextCodeID)
 Apply cadstar textcode parameters to a KiCad text object.
 
int getLineThickness (const LINECODE_ID &aCadstarLineCodeID)
 
COPPERCODE getCopperCode (const COPPERCODE_ID &aCadstaCopperCodeID)
 
HATCHCODE getHatchCode (const HATCHCODE_ID &aCadstarHatchcodeID)
 
LAYERPAIR getLayerPair (const LAYERPAIR_ID &aCadstarLayerPairID)
 
PADCODE getPadCode (const PADCODE_ID &aCadstarPadCodeID)
 
PART getPart (const PART_ID &aCadstarPartID)
 
ROUTECODE getRouteCode (const ROUTECODE_ID &aCadstarRouteCodeID)
 
TEXTCODE getTextCode (const TEXTCODE_ID &aCadstarTextCodeID)
 
VIACODE getViaCode (const VIACODE_ID &aCadstarViaCodeID)
 
wxString getAttributeName (const ATTRIBUTE_ID &aCadstarAttributeID)
 
wxString getAttributeValue (const ATTRIBUTE_ID &aCadstarAttributeID, const std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > &aCadstarAttributeMap)
 
LAYER_TYPE getLayerType (const LAYER_ID aCadstarLayerID)
 
EDA_ANGLE getHatchCodeAngle (const HATCHCODE_ID &aCadstarHatchcodeID)
 
PADgetKiCadPad (const COMPONENT_PAD &aCadstarPad, FOOTPRINT *aParent)
 
PAD *& getPadReference (FOOTPRINT *aFootprint, const PAD_ID aCadstarPadID)
 
FOOTPRINTgetFootprintFromCadstarID (const COMPONENT_ID &aCadstarComponentID)
 
int getKiCadHatchCodeThickness (const HATCHCODE_ID &aCadstarHatchcodeID)
 
int getKiCadHatchCodeGap (const HATCHCODE_ID &aCadstarHatchcodeID)
 
PCB_GROUPgetKiCadGroup (const GROUP_ID &aCadstarGroupID)
 
VECTOR2I getKiCadPoint (const VECTOR2I &aCadstarPoint)
 Scales, offsets and inverts y axis to make the point usable directly in KiCad.
 
int getKiCadLength (long long aCadstarLength)
 
double getAngleTenthDegree (const long long &aCadstarAngle)
 
EDA_ANGLE getAngle (const long long &aCadstarAngle)
 
double getAngleDegrees (const long long &aCadstarAngle)
 
NETINFO_ITEMgetKiCadNet (const NET_ID &aCadstarNetID)
 Searches m_netMap and returns the NETINFO_ITEM pointer if exists.
 
PCB_LAYER_ID getKiCadCopperLayerID (unsigned int aLayerNum, bool aDetectMaxLayer=true)
 
bool isLayerSet (const LAYER_ID &aCadstarLayerID)
 
PCB_LAYER_ID getKiCadLayer (const LAYER_ID &aCadstarLayerID)
 
LSET getKiCadLayerSet (const LAYER_ID &aCadstarLayerID)
 
bool isFootprint (BOARD_ITEM_CONTAINER *aContainer)
 
void addToGroup (const GROUP_ID &aCadstarGroupID, BOARD_ITEM *aKiCadItem)
 
GROUP_ID createUniqueGroupID (const wxString &aName)
 Adds a new PCB_GROUP* to m_groupMap.
 

Private Attributes

LAYER_MAPPING_HANDLER m_layerMappingHandler
 Callback to get layer mapping.
 
bool m_logLayerWarnings
 Used in loadBoardStackup()
 
BOARDm_board
 
PROJECTm_project
 
std::map< LAYER_ID, PCB_LAYER_IDm_layermap
 Map between Cadstar and KiCad Layers.
 
std::map< SYMDEF_ID, FOOTPRINT * > m_libraryMap
 Map between Cadstar and KiCad components in the library.
 
std::map< GROUP_ID, PCB_GROUP * > m_groupMap
 Map between Cadstar and KiCad groups.
 
std::map< COMPONENT_ID, FOOTPRINT * > m_componentMap
 Map between Cadstar and KiCad components on the board.
 
std::map< SYMDEF_ID, ASSOCIATED_COPPER_PADSm_librarycopperpads
 Associated copper pads (if any) for each component library definition.
 
std::map< NET_ID, NETINFO_ITEM * > m_netMap
 Map between Cadstar and KiCad Nets.
 
std::map< std::tuple< ROUTECODE_ID, NETCLASS_ID, SPACING_CLASS_ID >, std::shared_ptr< NETCLASS > > m_netClassMap
 Map between Cadstar and KiCad classes.
 
std::map< TEMPLATE_ID, ZONE * > m_zonesMap
 Map between Cadstar and KiCad zones.
 
std::vector< LAYER_IDm_powerPlaneLayers
 List of layers that are marked as power plane in CADSTAR.
 
VECTOR2I m_designCenter
 Used for calculating the required offset to apply to the Cadstar design so that it fits in KiCad canvas.
 
std::set< HATCHCODE_IDm_hatchcodesTested
 Used by checkAndLogHatchCode() to avoid multiple duplicate warnings.
 
std::set< PADCODE_IDm_padcodesTested
 Used by getKiCadPad() to avoid multiple duplicate warnings.
 
bool m_doneCopperWarning
 Used by loadCoppers() to avoid multiple duplicate warnings.
 
bool m_doneSpacingClassWarning
 Used by getKiCadNet() to avoid multiple duplicate warnings.
 
bool m_doneNetClassWarning
 Used by getKiCadNet() to avoid multiple duplicate warnings.
 
bool m_doneTearDropWarning
 
int m_numNets
 Number of nets loaded so far.
 
int m_numCopperLayers
 Number of layers in the design.
 
XNODEm_rootNode
 

Detailed Description

Definition at line 41 of file cadstar_pcb_archive_loader.h.

Member Typedef Documentation

◆ AREA_ID

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::AREA_ID
inherited

Definition at line 78 of file cadstar_pcb_archive_parser.h.

◆ ASSOCIATED_COPPER_PADS

using CADSTAR_PCB_ARCHIVE_LOADER::ASSOCIATED_COPPER_PADS = std::map<PAD_ID, std::vector<PAD_ID> >
private

Map of pad anchor points (first) to copper pads (second).

In the vast majority of designs there is only one copper pad, but just in case, making it a vector

Definition at line 120 of file cadstar_pcb_archive_loader.h.

◆ ATTRIBUTE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_ID
inherited

Definition at line 108 of file cadstar_archive_parser.h.

◆ BOARD_ID

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::BOARD_ID
inherited

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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::COMP_AREA_ID
inherited

Definition at line 74 of file cadstar_pcb_archive_parser.h.

◆ COMPONENT_ID

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_ID
inherited

Definition at line 79 of file cadstar_pcb_archive_parser.h.

◆ COPPER_ID

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::COPPER_ID
inherited

Definition at line 82 of file cadstar_pcb_archive_parser.h.

◆ COPPER_TERM_ID

Definition at line 81 of file cadstar_pcb_archive_parser.h.

◆ COPPERCODE_ID

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE_ID
inherited

Definition at line 68 of file cadstar_pcb_archive_parser.h.

◆ DIMENSION_ID

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION_ID
inherited

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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE_ID
inherited

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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR_ID
inherited

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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL_ID
inherited

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

typedef long CADSTAR_PCB_ARCHIVE_PARSER::PAD_ID
inherited

Pad identifier (pin) in the PCB.

Definition at line 75 of file cadstar_pcb_archive_parser.h.

◆ PADCODE_ID

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::PADCODE_ID
inherited

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

Definition at line 67 of file cadstar_pcb_archive_parser.h.

◆ 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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::RULESET_ID
inherited

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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE_ID
inherited

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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE_ID
inherited

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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::TRUNK_ID
inherited

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

typedef wxString CADSTAR_PCB_ARCHIVE_PARSER::VIACODE_ID
inherited

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

enum class CADSTAR_PCB_ARCHIVE_PARSER::EMBEDDING
stronginherited
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

enum class CADSTAR_PCB_ARCHIVE_PARSER::LAYER_SUBTYPE
stronginherited
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

enum class CADSTAR_PCB_ARCHIVE_PARSER::LAYER_TYPE
stronginherited
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

enum class CADSTAR_PCB_ARCHIVE_PARSER::NETSYNCH
stronginherited
Enumerator
UNDEFINED 
WARNING 
FULL 

Definition at line 1165 of file cadstar_pcb_archive_parser.h.

◆ PAD_SHAPE_TYPE

enum class CADSTAR_PCB_ARCHIVE_PARSER::PAD_SHAPE_TYPE
stronginherited
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

enum class CADSTAR_PCB_ARCHIVE_PARSER::PAD_SIDE
stronginherited

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

enum class CADSTAR_PCB_ARCHIVE_PARSER::ROUTING_BIAS
stronginherited
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

enum class CADSTAR_PCB_ARCHIVE_PARSER::SYMDEF_TYPE
stronginherited

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

enum class CADSTAR_PCB_ARCHIVE_PARSER::TESTLAND_SIDE
stronginherited
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_LOADER()

CADSTAR_PCB_ARCHIVE_LOADER::CADSTAR_PCB_ARCHIVE_LOADER ( wxString  aFilename,
LAYER_MAPPING_HANDLER  aLayerMappingHandler,
bool  aLogLayerWarnings,
PROGRESS_REPORTER aProgressReporter 
)
inlineexplicit

◆ ~CADSTAR_PCB_ARCHIVE_LOADER()

CADSTAR_PCB_ARCHIVE_LOADER::~CADSTAR_PCB_ARCHIVE_LOADER ( )
inline

Definition at line 66 of file cadstar_pcb_archive_loader.h.

References m_libraryMap.

Member Function Documentation

◆ addAttribute()

void CADSTAR_PCB_ARCHIVE_LOADER::addAttribute ( const ATTRIBUTE_LOCATION aCadstarAttrLoc,
const ATTRIBUTE_ID aCadstarAttributeID,
FOOTPRINT aFootprint,
const wxString &  aAttributeValue 
)
private

Adds a CADSTAR Attribute to a KiCad footprint.

Parameters
aCadstarAttrLoc
aCadstarAttributeID
aFootprint
aAttributeValue

Definition at line 3254 of file cadstar_pcb_archive_loader.cpp.

References FOOTPRINT::Add(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::Alignment, applyTextCode(), CADSTAR_ARCHIVE_PARSER::BOTTOMCENTER, CADSTAR_ARCHIVE_PARSER::BOTTOMLEFT, CADSTAR_ARCHIVE_PARSER::BOTTOMRIGHT, CADSTAR_ARCHIVE_PARSER::CENTERCENTER, CADSTAR_ARCHIVE_PARSER::CENTERLEFT, CADSTAR_ARCHIVE_PARSER::CENTERRIGHT, COMPONENT_NAME_2_ATTRID, COMPONENT_NAME_ATTRID, BOARD_ITEM::Duplicate(), CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), getAngle(), getAttributeName(), getKiCadLayer(), getKiCadPoint(), EDA_TEXT::GetText(), EDA_TEXT::GetTextAngle(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, KI_FALLTHROUGH, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::LayerID, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::Mirror, CADSTAR_ARCHIVE_PARSER::NO_ALIGNMENT, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::OrientAngle, PART_NAME_ATTRID, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::Position, FOOTPRINT::Reference(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetKeepUpright(), BOARD_ITEM::SetLayer(), EDA_TEXT::SetMirrored(), PCB_TEXT::SetPosition(), EDA_TEXT::SetText(), EDA_TEXT::SetTextAngle(), FOOTPRINT::SetValue(), EDA_TEXT::SetVertJustify(), EDA_TEXT::SetVisible(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::TextCodeID, CADSTAR_ARCHIVE_PARSER::TOPCENTER, CADSTAR_ARCHIVE_PARSER::TOPLEFT, CADSTAR_ARCHIVE_PARSER::TOPRIGHT, and FOOTPRINT::Value().

Referenced by loadComponentAttributes().

◆ addToGroup()

void CADSTAR_PCB_ARCHIVE_LOADER::addToGroup ( const GROUP_ID aCadstarGroupID,
BOARD_ITEM aKiCadItem 
)
private

◆ applyDimensionSettings()

void CADSTAR_PCB_ARCHIVE_LOADER::applyDimensionSettings ( const DIMENSION aCadstarDim,
PCB_DIMENSION_BASE aKiCadDim 
)
private

Definition at line 3665 of file cadstar_pcb_archive_loader.cpp.

References _, applyTextCode(), CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_ARCHIVE_PARSER::CENTIMETER, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, CADSTAR_ARCHIVE_PARSER::DESIGN, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::End, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::ExtensionLineParams, getKiCadLayer(), getKiCadLength(), getKiCadPoint(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::ID, CADSTAR_ARCHIVE_PARSER::INCH, KI_FALLTHROUGH, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LayerID, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Line, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LinearUnits, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::LineCodeID, CADSTAR_ARCHIVE_PARSER::CODEDEFS::LineCodes, CADSTAR_ARCHIVE_PARSER::m_context, CADSTAR_ARCHIVE_PARSER::METER, CADSTAR_ARCHIVE_PARSER::MICROMETRE, CADSTAR_ARCHIVE_PARSER::MM, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Offset, CADSTAR_ARCHIVE_PARSER::ParseTextFields(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Precision, PCB_DIMENSION_BASE::SetEnd(), PCB_DIMENSION_BASE::SetExtensionOffset(), BOARD_ITEM::SetLayer(), PCB_DIMENSION_BASE::SetLineThickness(), PCB_DIMENSION_BASE::SetPrecision(), PCB_DIMENSION_BASE::SetPrefix(), PCB_DIMENSION_BASE::SetStart(), PCB_DIMENSION_BASE::SetSuffix(), PCB_DIMENSION_BASE::SetUnitsFormat(), PCB_DIMENSION_BASE::SetUnitsMode(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Start, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Technology, CADSTAR_ARCHIVE_PARSER::TEXT::Text, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Text, CADSTAR_ARCHIVE_PARSER::TEXT::TextCodeID, CADSTAR_ARCHIVE_PARSER::THOU, CADSTAR_ARCHIVE_PARSER::SETTINGS::UnitDisplPrecision, CADSTAR_ARCHIVE_PARSER::SETTINGS::Units, and CADSTAR_ARCHIVE_PARSER::LINECODE::Width.

Referenced by loadDimensions().

◆ applyRouteOffset()

void CADSTAR_PCB_ARCHIVE_LOADER::applyRouteOffset ( VECTOR2I aPointToOffset,
const VECTOR2I aRefPoint,
const long &  aOffsetAmount 
)
private

CADSTAR's Post Processor does an action called "Route Offset" which is applied when a route is wider than the pad on which it is terminating or when there are different widths of route, in order to reduce overlap.

Parameters
aPointToOffsetPoint that we want to offset by aOffsetAmount
aRefPointReference point to use for determine the angle of the offset
aOffsetAmount

Definition at line 3373 of file cadstar_pcb_archive_loader.cpp.

References VECTOR2< T >::EuclideanNorm(), VECTOR2< T >::Resize(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by makeTracksFromShapes().

◆ applyTextCode()

◆ calculateZonePriorities()

◆ checkAndLogHatchCode()

◆ CheckNoChildNodes()

◆ CheckNoNextNodes()

◆ checkPoint()

◆ createUniqueGroupID()

CADSTAR_PCB_ARCHIVE_LOADER::GROUP_ID CADSTAR_PCB_ARCHIVE_LOADER::createUniqueGroupID ( const wxString &  aName)
private

Adds a new PCB_GROUP* to m_groupMap.

Parameters
aNameName to give the group. If name already exists, append "_1", "_2", etc. to the end to ensure it is unique
Returns

Definition at line 4202 of file cadstar_pcb_archive_loader.cpp.

References BOARD::Add(), m_board, m_groupMap, and PCB_GROUP::SetName().

Referenced by loadBoards(), and loadDocumentationSymbols().

◆ drawCadstarCutoutsAsShapes()

void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarCutoutsAsShapes ( const std::vector< CUTOUT > &  aCutouts,
const PCB_LAYER_ID aKiCadLayer,
int  aLineThickness,
BOARD_ITEM_CONTAINER aContainer,
const GROUP_ID aCadstarGroupID = wxEmptyString,
const VECTOR2I aMoveVector = { 0, 0 },
double  aRotationAngle = 0.0,
double  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
bool  aMirrorInvert = false 
)
private

Uses PCB_SHAPEs to draw the cutouts on m_board object.

Parameters
aVertices
aKiCadLayerKiCad layer to draw on
aLineThicknessThickness of line to draw with
aContainerto draw on (e.g. m_board)
aCadstarGroupIDto add the shapes to
aMoveVectormove shapes by this amount (in KiCad coordinates)
aRotationAnglerotate shapes by this amount (in tenth degrees)
aScalingFactorscale shapes by this amount
aTransformCentrearound which all transforms are applied (KiCad coordinates)
aMirrorInvertif true, mirrors the shapes

Definition at line 2838 of file cadstar_pcb_archive_loader.cpp.

References drawCadstarVerticesAsShapes().

Referenced by drawCadstarShape().

◆ drawCadstarShape()

void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarShape ( const SHAPE aCadstarShape,
const PCB_LAYER_ID aKiCadLayer,
int  aLineThickness,
const wxString &  aShapeName,
BOARD_ITEM_CONTAINER aContainer,
const GROUP_ID aCadstarGroupID = wxEmptyString,
const VECTOR2I aMoveVector = { 0, 0 },
double  aRotationAngle = 0.0,
double  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
bool  aMirrorInvert = false 
)
private
Parameters
aCadstarShape
aCadstarLayerIDKiCad layer to draw on
aLineThicknessThickness of line to draw with
aShapeNamefor reporting warnings/errors to the user
aContainerto draw on (e.g. m_board)
aCadstarGroupIDto add the shape to
aMoveVectormove shapes by this amount (in KiCad coordinates)
aRotationAnglerotate shapes by this amount (in tenth degrees)
aScalingFactorscale shapes by this amount
aTransformCentrearound which all transforms are applied (KiCad coordinates)
aMirrorInvertif true, mirrors the shapes

TODO update this when Polygons in KiCad can be defined with no fill

TODO update this when Polygons in KiCad can be defined with hatch fill

Definition at line 2769 of file cadstar_pcb_archive_loader.cpp.

References _, BOARD_ITEM_CONTAINER::Add(), addToGroup(), CADSTAR_ARCHIVE_PARSER::SHAPE::Cutouts, drawCadstarCutoutsAsShapes(), drawCadstarVerticesAsShapes(), SHAPE_POLY_SET::Fracture(), getPolySetFromCadstarShape(), CADSTAR_ARCHIVE_PARSER::HATCHED, CADSTAR_ARCHIVE_PARSER::OPENSHAPE, CADSTAR_ARCHIVE_PARSER::OUTLINE, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, EDA_SHAPE::SetFilled(), PCB_SHAPE::SetLayer(), EDA_SHAPE::SetPolyShape(), PCB_SHAPE::SetStroke(), CADSTAR_ARCHIVE_PARSER::SOLID, CADSTAR_ARCHIVE_PARSER::SHAPE::Type, and CADSTAR_ARCHIVE_PARSER::SHAPE::Vertices.

Referenced by loadBoards(), loadDocumentationSymbols(), loadFigures(), loadLibraryCoppers(), and loadLibraryFigures().

◆ drawCadstarText()

void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText ( const TEXT aCadstarText,
BOARD_ITEM_CONTAINER aContainer,
const GROUP_ID aCadstarGroupID = wxEmptyString,
const LAYER_ID aCadstarLayerOverride = wxEmptyString,
const VECTOR2I aMoveVector = { 0, 0 },
double  aRotationAngle = 0.0,
double  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
bool  aMirrorInvert = false 
)
private
Parameters
aCadstarText
aContainerto draw on (e.g. m_board)
aCadstarGroupIDto add the text to
aCadstarLayerOverrideif not empty, overrides the LayerID in aCadstarText
aMoveVectormove text by this amount (in KiCad coordinates)
aRotationAnglerotate text by this amount (in tenth degrees)
aScalingFactorscale text by this amount
aTransformCentrearound which all transforms are applied (KiCad coordinates)
aMirrorInvertif true, it inverts the Mirror status of aCadstarText

Definition at line 2635 of file cadstar_pcb_archive_loader.cpp.

References BOARD::Add(), BOARD_ITEM_CONTAINER::Add(), addToGroup(), CADSTAR_ARCHIVE_PARSER::TEXT::Alignment, applyTextCode(), CADSTAR_ARCHIVE_PARSER::BOTTOMCENTER, CADSTAR_ARCHIVE_PARSER::BOTTOMLEFT, CADSTAR_ARCHIVE_PARSER::BOTTOMRIGHT, CADSTAR_ARCHIVE_PARSER::CENTERCENTER, CADSTAR_ARCHIVE_PARSER::CENTERLEFT, CADSTAR_ARCHIVE_PARSER::CENTERRIGHT, BOARD_ITEM::Duplicate(), CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), PCB_TEXT::Flip(), getAngle(), getKiCadLayer(), getKiCadLayerSet(), getKiCadPoint(), EDA_TEXT::GetTextSize(), EDA_TEXT::GetTextThickness(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, isLayerSet(), KiROUND(), CADSTAR_ARCHIVE_PARSER::TEXT::LayerID, m_board, CADSTAR_ARCHIVE_PARSER::TEXT::Mirror, PCB_TEXT::Move(), CADSTAR_ARCHIVE_PARSER::NO_ALIGNMENT, CADSTAR_ARCHIVE_PARSER::TEXT::OrientAngle, CADSTAR_ARCHIVE_PARSER::TEXT::Position, BOARD::Remove(), RotatePoint(), EDA_TEXT::SetHorizJustify(), BOARD_ITEM::SetLayer(), EDA_TEXT::SetMirrored(), PCB_TEXT::SetPosition(), EDA_TEXT::SetText(), EDA_TEXT::SetTextAngle(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetTextThickness(), EDA_TEXT::SetVertJustify(), TENTHS_OF_A_DEGREE_T, CADSTAR_ARCHIVE_PARSER::TEXT::Text, CADSTAR_ARCHIVE_PARSER::TEXT::TextCodeID, CADSTAR_ARCHIVE_PARSER::TOPCENTER, CADSTAR_ARCHIVE_PARSER::TOPLEFT, CADSTAR_ARCHIVE_PARSER::TOPRIGHT, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by loadDocumentationSymbols(), and loadTexts().

◆ drawCadstarVerticesAsShapes()

void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarVerticesAsShapes ( const std::vector< VERTEX > &  aCadstarVertices,
const PCB_LAYER_ID aKiCadLayer,
int  aLineThickness,
BOARD_ITEM_CONTAINER aContainer,
const GROUP_ID aCadstarGroupID = wxEmptyString,
const VECTOR2I aMoveVector = { 0, 0 },
double  aRotationAngle = 0.0,
double  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
bool  aMirrorInvert = false 
)
private

Uses PCB_SHAPE to draw the vertices on m_board object.

Parameters
aCadstarVertices
aKiCadLayerKiCad layer to draw on
aLineThicknessThickness of line to draw with
aContainerto draw on (e.g. m_board)
aCadstarGroupIDto add the shape to
aMoveVectormove shape by this amount (in KiCad coordinates)
aRotationAnglerotate shape by this amount (in tenth degrees)
aScalingFactorscale shape by this amount
aTransformCentrearound which all transforms are applied (KiCad coordinates)
aMirrorInvertif true, mirrors the shape
aCadstarGroupIDto add the shape to

Definition at line 2858 of file cadstar_pcb_archive_loader.cpp.

References BOARD_ITEM_CONTAINER::Add(), and getShapesFromVertices().

Referenced by drawCadstarCutoutsAsShapes(), and drawCadstarShape().

◆ 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 addAttribute(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), and drawCadstarText().

◆ generateLibName()

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

◆ getAngle()

EDA_ANGLE CADSTAR_PCB_ARCHIVE_LOADER::getAngle ( const long long &  aCadstarAngle)
inlineprivate

◆ getAngleDegrees()

double CADSTAR_PCB_ARCHIVE_LOADER::getAngleDegrees ( const long long &  aCadstarAngle)
inlineprivate
Parameters
aCadstarAngle
Returns

Definition at line 499 of file cadstar_pcb_archive_loader.h.

References getAngleTenthDegree().

Referenced by loadDimensions().

◆ getAngleTenthDegree()

double CADSTAR_PCB_ARCHIVE_LOADER::getAngleTenthDegree ( const long long &  aCadstarAngle)
inlineprivate

◆ getAttributeName()

wxString CADSTAR_PCB_ARCHIVE_LOADER::getAttributeName ( const ATTRIBUTE_ID aCadstarAttributeID)
private

◆ getAttributeValue()

wxString CADSTAR_PCB_ARCHIVE_LOADER::getAttributeValue ( const ATTRIBUTE_ID aCadstarAttributeID,
const std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > &  aCadstarAttributeMap 
)
private

Definition at line 3503 of file cadstar_pcb_archive_loader.cpp.

Referenced by loadComponentAttributes().

◆ getCopperCode()

◆ getFootprintFromCadstarID()

FOOTPRINT * CADSTAR_PCB_ARCHIVE_LOADER::getFootprintFromCadstarID ( const COMPONENT_ID aCadstarComponentID)
private

Definition at line 3942 of file cadstar_pcb_archive_loader.cpp.

References m_componentMap.

Referenced by getKiCadNet(), and loadNets().

◆ getHatchCode()

◆ getHatchCodeAngle()

◆ getKiCadCopperLayerID()

PCB_LAYER_ID CADSTAR_PCB_ARCHIVE_LOADER::getKiCadCopperLayerID ( unsigned int  aLayerNum,
bool  aDetectMaxLayer = true 
)
private
Parameters
aLayerNumPhysical / logical layer number (starts at 1)
aDetectMaxLayerIf true, returns B.Cu if the requested layer is the maximum layer
Returns
PCB_LAYER_ID

Definition at line 4076 of file cadstar_pcb_archive_loader.cpp.

References m_numCopperLayers.

Referenced by loadNetVia().

◆ getKiCadGroup()

PCB_GROUP * CADSTAR_PCB_ARCHIVE_LOADER::getKiCadGroup ( const GROUP_ID aCadstarGroupID)
private

Definition at line 3593 of file cadstar_pcb_archive_loader.cpp.

References m_groupMap.

Referenced by loadBoards().

◆ getKiCadHatchCodeGap()

◆ getKiCadHatchCodeThickness()

◆ getKiCadLayer()

PCB_LAYER_ID CADSTAR_PCB_ARCHIVE_LOADER::getKiCadLayer ( const LAYER_ID aCadstarLayerID)
private

◆ getKiCadLayerSet()

◆ getKiCadLength()

◆ getKiCadNet()

◆ getKiCadPad()

PAD * CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad ( const COMPONENT_PAD aCadstarPad,
FOOTPRINT aParent 
)
private

Definition at line 1017 of file cadstar_pcb_archive_loader.cpp.

References _, std::abs(), LSET::AllCuMask(), ANGLE_180, CADSTAR_PCB_ARCHIVE_PARSER::ANNULUS, B_Cu, B_Mask, B_Paste, CADSTAR_PCB_ARCHIVE_PARSER::BULLET, CADSTAR_PCB_ARCHIVE_PARSER::CIRCLE, SHAPE_POLY_SET::Contains(), CADSTAR_PCB_ARCHIVE_PARSER::DIAMOND, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::DrillDiameter, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::DrillXoffset, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::DrillYoffset, ERROR_INSIDE, F_Cu, F_Mask, F_Paste, CADSTAR_PCB_ARCHIVE_PARSER::FINGER, getAngle(), BOARD::GetDesignSettings(), getKiCadLayer(), getKiCadLength(), getKiCadPoint(), getPadCode(), EDA_SHAPE::GetPolyShape(), CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::ID, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::ID, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Identifier, CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::InternalFeature, CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::LeftLength, m_board, BOARD_DESIGN_SETTINGS::m_MaxError, m_padcodesTested, CADSTAR_PCB_ARCHIVE_PARSER::MAXIMUM, CADSTAR_PCB_ARCHIVE_PARSER::MINIMUM, PCB_SHAPE::Move(), CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Name, CADSTAR_PCB_ARCHIVE_PARSER::OCTAGON, CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::OrientAngle, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::OrientAngle, pad, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::PadCodeID, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::PCBonlyPad, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Plated, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Position, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Reassigns, CADSTAR_PCB_ARCHIVE_PARSER::RECTANGLE, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::ReliefClearance, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::ReliefWidth, CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::RightLength, PCB_SHAPE::Rotate(), RotatePoint(), CADSTAR_PCB_ARCHIVE_PARSER::ROUNDED_RECT, LSET::Seq(), EDA_SHAPE::SetFilled(), EDA_SHAPE::SetPolyShape(), EDA_SHAPE::SetShape(), PCB_SHAPE::SetStroke(), CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Shape, CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::ShapeType, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Side, CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::Size, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::SlotLength, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::SlotOrientation, CADSTAR_PCB_ARCHIVE_PARSER::SQUARE, CADSTAR_PCB_ARCHIVE_PARSER::THROUGH_HOLE, CADSTAR_ARCHIVE_PARSER::UNDEFINED_VALUE, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by loadComponents(), and loadLibraryPads().

◆ getKiCadPoint()

VECTOR2I CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPoint ( const VECTOR2I aCadstarPoint)
private

◆ getLayerPair()

◆ getLayerType()

◆ getLineChainFromShapes()

SHAPE_LINE_CHAIN CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromShapes ( const std::vector< PCB_SHAPE * > &  aShapes)
private

◆ getLineThickness()

◆ GetLoadedLibraryFootpints()

std::vector< FOOTPRINT * > CADSTAR_PCB_ARCHIVE_LOADER::GetLoadedLibraryFootpints ( ) const

Return a copy of the loaded library footprints (caller owns the objects)

Returns
Container with all the footprint definitions that were loaded

Definition at line 173 of file cadstar_pcb_archive_loader.cpp.

References m_libraryMap.

Referenced by PCB_IO_CADSTAR_ARCHIVE::LoadBoard().

◆ GetNumberOfChildNodes()

long CADSTAR_ARCHIVE_PARSER::GetNumberOfChildNodes ( XNODE aNode)
staticinherited

◆ GetNumberOfStepsForReporting()

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

◆ getPadCode()

◆ getPadReference()

PAD *& CADSTAR_PCB_ARCHIVE_LOADER::getPadReference ( FOOTPRINT aFootprint,
const PAD_ID  aCadstarPadID 
)
private

◆ GetPadSide()

◆ getPart()

CADSTAR_PCB_ARCHIVE_LOADER::PART CADSTAR_PCB_ARCHIVE_LOADER::getPart ( const PART_ID aCadstarPartID)
private

◆ getPolySetFromCadstarShape()

SHAPE_POLY_SET CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape ( const SHAPE aCadstarShape,
int  aLineThickness = -1,
BOARD_ITEM_CONTAINER aContainer = nullptr,
const VECTOR2I aMoveVector = { 0, 0 },
double  aRotationAngle = 0.0,
double  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
bool  aMirrorInvert = false 
)
private

Returns a SHAPE_POLY_SET object from a Cadstar SHAPE.

Parameters
aCadstarShape
aLineThicknessThickness of line is used for expanding the polygon by half.
aContainerto draw on (e.g. m_board). Can be nullptr.
aMoveVectormove poly by this amount (in KiCad coordinates)
aRotationAnglerotate poly by this amount (in tenth degrees)
aScalingFactorscale poly by this amount
aTransformCentrearound which all transforms are applied (KiCad coordinates)
aMirrorInvertif true, mirrors the poly
Returns

Definition at line 3031 of file cadstar_pcb_archive_loader.cpp.

References SHAPE_POLY_SET::AddHole(), ARC_HIGH_DEF, SHAPE_POLY_SET::ClearArcs(), CADSTAR_ARCHIVE_PARSER::SHAPE::Cutouts, getLineChainFromShapes(), getShapesFromVertices(), SHAPE_POLY_SET::Hole(), SHAPE_POLY_SET::HoleCount(), SHAPE_POLY_SET::Inflate(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), SHAPE_LINE_CHAIN::PointCount(), CADSTAR_ARCHIVE_PARSER::CUTOUT::Vertices, and CADSTAR_ARCHIVE_PARSER::SHAPE::Vertices.

Referenced by drawCadstarShape(), getZoneFromCadstarShape(), loadCoppers(), and loadLibraryCoppers().

◆ getRouteCode()

CADSTAR_PCB_ARCHIVE_LOADER::ROUTECODE CADSTAR_PCB_ARCHIVE_LOADER::getRouteCode ( const ROUTECODE_ID aCadstarRouteCodeID)
private

◆ getShapeFromVertex()

PCB_SHAPE * CADSTAR_PCB_ARCHIVE_LOADER::getShapeFromVertex ( const POINT aCadstarStartPoint,
const VERTEX aCadstarVertex,
BOARD_ITEM_CONTAINER aContainer = nullptr,
const GROUP_ID aCadstarGroupID = wxEmptyString,
const VECTOR2I aMoveVector = { 0, 0 },
double  aRotationAngle = 0.0,
double  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
bool  aMirrorInvert = false 
)
private

Returns a pointer to a PCB_SHAPE object.

Caller owns the object.

Parameters
aCadstarStartPoint
aCadstarVertex
aContainerto draw on (e.g. m_board). Can be nullptr.
aCadstarGroupIDto add the shape to
aMoveVectormove shapes by this amount (in KiCad coordinates)
aRotationAnglerotate shapes by this amount (in tenth degrees)
aScalingFactorscale shapes by this amount
aTransformCentrearound which all transforms are applied (KiCad coordinates)
aMirrorInvertif true, mirrors the shapes
Returns

Definition at line 2915 of file cadstar_pcb_archive_loader.cpp.

References addToGroup(), CADSTAR_ARCHIVE_PARSER::ANTICLOCKWISE_ARC, CADSTAR_ARCHIVE_PARSER::ANTICLOCKWISE_SEMICIRCLE, CADSTAR_ARCHIVE_PARSER::VERTEX::Center, CADSTAR_ARCHIVE_PARSER::CLOCKWISE_ARC, CADSTAR_ARCHIVE_PARSER::CLOCKWISE_SEMICIRCLE, CADSTAR_ARCHIVE_PARSER::VERTEX::End, PCB_SHAPE::Flip(), getKiCadPoint(), KI_FALLTHROUGH, PCB_SHAPE::Move(), EDA_ANGLE::NormalizeNegative(), CADSTAR_ARCHIVE_PARSER::POINT, PCB_SHAPE::Rotate(), PCB_SHAPE::Scale(), EDA_SHAPE::SetArcAngleAndEnd(), EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetStart(), TENTHS_OF_A_DEGREE_T, and CADSTAR_ARCHIVE_PARSER::VERTEX::Type.

Referenced by getShapesFromVertices(), and loadNetTracks().

◆ getShapesFromVertices()

std::vector< PCB_SHAPE * > CADSTAR_PCB_ARCHIVE_LOADER::getShapesFromVertices ( const std::vector< VERTEX > &  aCadstarVertices,
BOARD_ITEM_CONTAINER aContainer = nullptr,
const GROUP_ID aCadstarGroupID = wxEmptyString,
const VECTOR2I aMoveVector = { 0, 0 },
double  aRotationAngle = 0.0,
double  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
bool  aMirrorInvert = false 
)
private

Returns a vector of pointers to PCB_SHAPE objects.

Caller owns the objects.

Parameters
aCadstarVertices
aContainerto draw on (e.g. m_board). Can be nullptr.
aCadstarGroupIDto add the shape to
aMoveVectormove shapes by this amount (in KiCad coordinates)
aRotationAnglerotate shapes by this amount (in tenth degrees)
aScalingFactorscale shapes by this amount
aTransformCentrearound which all transforms are applied (KiCad coordinates)
aMirrorInvertif true, mirrors the shapes
Returns

Definition at line 2885 of file cadstar_pcb_archive_loader.cpp.

References CADSTAR_ARCHIVE_PARSER::VERTEX::End, and getShapeFromVertex().

Referenced by drawCadstarVerticesAsShapes(), getPolySetFromCadstarShape(), and loadCoppers().

◆ getTextCode()

◆ getViaCode()

◆ 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(), CADSTAR_PCB_ARCHIVE_PARSER::ParseTestlandSide(), and CADSTAR_ARCHIVE_PARSER::ParseUnits().

◆ getZoneFromCadstarShape()

ZONE * CADSTAR_PCB_ARCHIVE_LOADER::getZoneFromCadstarShape ( const SHAPE aCadstarShape,
const int &  aLineThickness,
BOARD_ITEM_CONTAINER aParentContainer 
)
private
Parameters
aCadstarShape
aLineThicknessThickness of line to draw with
aParentContainerParent object (e.g. BOARD or FOOTPRINT pointer)
Returns
Pointer to ZONE. Caller owns the object.

Definition at line 3004 of file cadstar_pcb_archive_loader.cpp.

References ZONE::AddPolygon(), SHAPE_POLY_SET::CHole(), SHAPE_POLY_SET::COutline(), getPolySetFromCadstarShape(), CADSTAR_ARCHIVE_PARSER::HATCHED, SHAPE_POLY_SET::HoleCount(), ZONE::SetFillMode(), ZONE::SetHatchStyle(), and CADSTAR_ARCHIVE_PARSER::SHAPE::Type.

Referenced by loadAreas(), loadCoppers(), loadLibraryAreas(), and loadTemplates().

◆ 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().

◆ initStackupItem()

◆ InsertAttributeAtEnd()

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

◆ isFootprint()

bool CADSTAR_PCB_ARCHIVE_LOADER::isFootprint ( BOARD_ITEM_CONTAINER aContainer)
inlineprivate

Definition at line 542 of file cadstar_pcb_archive_loader.h.

References PCB_FOOTPRINT_T, and EDA_ITEM::Type().

◆ isLayerSet()

bool CADSTAR_PCB_ARCHIVE_LOADER::isLayerSet ( const LAYER_ID aCadstarLayerID)
private

◆ IsValidAttribute()

◆ Load()

void CADSTAR_PCB_ARCHIVE_LOADER::Load ( BOARD aBoard,
PROJECT aProject 
)

Loads a CADSTAR PCB Archive file into the KiCad BOARD object given.

Parameters
aBoard

Definition at line 51 of file cadstar_pcb_archive_loader.cpp.

References _, LSET::AllCuMask(), CADSTAR_PCB_ARCHIVE_PARSER::Assignments, PROGRESS_REPORTER::BeginPhase(), calculateZonePriorities(), CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Coppers, CADSTAR_ARCHIVE_PARSER::SETTINGS::DesignArea, CADSTAR_ARCHIVE_PARSER::SETTINGS::DesignLimit, BOARD::GetLayerName(), CADSTAR_PCB_ARCHIVE_PARSER::KiCadUnitMultiplier, CADSTAR_PCB_ARCHIVE_PARSER::Layout, loadAreas(), loadBoards(), loadBoardStackup(), loadComponentLibrary(), loadComponents(), loadCoppers(), loadDesignRules(), loadDimensions(), loadDocumentationSymbols(), loadFigures(), loadGroups(), loadNets(), loadTemplates(), loadTexts(), loadTextVariables(), m_board, m_designCenter, m_numCopperLayers, CADSTAR_ARCHIVE_PARSER::m_progressReporter, m_project, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::NetSynch, CADSTAR_PCB_ARCHIVE_PARSER::Parse(), PCB_IU_PER_MM, remapUnsureLayers(), CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::ReuseBlocks, PROGRESS_REPORTER::SetMaxProgress(), PROGRESS_REPORTER::SetNumPhases(), CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Technology, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Templates, THROW_IO_ERROR, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Trunks, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::VariantHierarchy, CADSTAR_ARCHIVE_PARSER::VARIANT_HIERARCHY::Variants, CADSTAR_PCB_ARCHIVE_PARSER::WARNING, CADSTAR_ARCHIVE_PARSER::LONGPOINT::x, and CADSTAR_ARCHIVE_PARSER::LONGPOINT::y.

Referenced by PCB_IO_CADSTAR_ARCHIVE::LoadBoard().

◆ 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 CADSTAR_PCB_ARCHIVE_PARSER::Parse().

◆ loadAreas()

◆ loadBoards()

◆ loadBoardStackup()

void CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup ( )
private

Definition at line 282 of file cadstar_pcb_archive_loader.cpp.

References _, CADSTAR_PCB_ARCHIVE_PARSER::ABOVE, CADSTAR_PCB_ARCHIVE_PARSER::ALLDOC, CADSTAR_PCB_ARCHIVE_PARSER::ALLELEC, CADSTAR_PCB_ARCHIVE_PARSER::ALLLAYER, LSET::AllLayersMask(), CADSTAR_PCB_ARCHIVE_PARSER::ASSCOMPCOPP, CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::BELOW, BOARD_STACKUP::BuildBoardThicknessFromStackup(), BOARD_STACKUP::BuildDefaultStackupList(), Cmts_User, CADSTAR_PCB_ARCHIVE_PARSER::CONSTRUCTION, CADSTAR_PCB_ARCHIVE_PARSER::DOC, Dwgs_User, CADSTAR_PCB_ARCHIVE_PARSER::ELEC, CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Embedding, BOARD::GetDesignSettings(), BOARD_STACKUP::GetList(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), CADSTAR_PCB_ARCHIVE_PARSER::LAYER::ID, initStackupItem(), CADSTAR_PCB_ARCHIVE_PARSER::JUMPERLAYER, KEY_CORE, KEY_PREPREG, KI_FALLTHROUGH, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Layerdefs, CADSTAR_PCB_ARCHIVE_PARSER::LAYERDEFS::Layers, CADSTAR_PCB_ARCHIVE_PARSER::LAYERDEFS::LayerStack, CADSTAR_PCB_ARCHIVE_PARSER::LAYERSUBTYPE_ASSEMBLY, CADSTAR_PCB_ARCHIVE_PARSER::LAYERSUBTYPE_CLEARANCE, CADSTAR_PCB_ARCHIVE_PARSER::LAYERSUBTYPE_NONE, CADSTAR_PCB_ARCHIVE_PARSER::LAYERSUBTYPE_PASTE, CADSTAR_PCB_ARCHIVE_PARSER::LAYERSUBTYPE_PLACEMENT, CADSTAR_PCB_ARCHIVE_PARSER::LAYERSUBTYPE_ROUT, CADSTAR_PCB_ARCHIVE_PARSER::LAYERSUBTYPE_SILKSCREEN, CADSTAR_PCB_ARCHIVE_PARSER::LAYERSUBTYPE_SOLDERRESIST, logBoardStackupMessage(), logBoardStackupWarning(), m_board, BOARD_DESIGN_SETTINGS::m_HasStackup, m_layermap, m_numCopperLayers, m_powerPlaneLayers, CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Name, CADSTAR_PCB_ARCHIVE_PARSER::NOLAYER, CADSTAR_PCB_ARCHIVE_PARSER::NONE, CADSTAR_PCB_ARCHIVE_PARSER::NONELEC, CADSTAR_PCB_ARCHIVE_PARSER::POWER, BOARD_STACKUP::RemoveAll(), BOARD_DESIGN_SETTINGS::SetBoardThickness(), BOARD::SetCopperLayerCount(), BOARD::SetEnabledLayers(), BOARD::SetLayerName(), BOARD::SetLayerType(), BOARD::SetVisibleLayers(), CADSTAR_PCB_ARCHIVE_PARSER::LAYER::SubType, THROW_IO_ERROR, CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Type, User_1, User_2, User_3, User_4, User_5, User_6, User_7, User_8, and User_9.

Referenced by Load(), and LoadLibrary().

◆ loadComponentAttributes()

◆ loadComponentLibrary()

◆ loadComponents()

void CADSTAR_PCB_ARCHIVE_LOADER::loadComponents ( )
private

Definition at line 1745 of file cadstar_pcb_archive_loader.cpp.

References _, BOARD::Add(), CADSTAR_PCB_ARCHIVE_PARSER::LIBRARY::ComponentDefinitions, CADSTAR_PCB_ARCHIVE_PARSER::SYMDEF_PCB::ComponentPads, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Components, CADSTAR_ARCHIVE_PARSER::PART::Definition, FOOTPRINT::Duplicate(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Exits, CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Exits, FOOTPRINT::Flip(), getAngle(), getKiCadPad(), getKiCadPoint(), PAD::GetNumber(), getPadReference(), getPart(), CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::ID, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::ID, CADSTAR_PCB_ARCHIVE_PARSER::Layout, CADSTAR_PCB_ARCHIVE_PARSER::Library, loadComponentAttributes(), m_board, m_componentMap, m_designCenter, m_libraryMap, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Mirror, CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Name, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Name, EDA_ANGLE::Normalize180(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::OrientAngle, CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::OrientAngle, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::OrientAngle, CADSTAR_ARCHIVE_PARSER::SYMDEF::Origin, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Origin, CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::OverrideExits, CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::OverrideOrientation, CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::OverrideSide, CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::PadCode, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::PadCodeID, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::PadExceptions, FOOTPRINT::Pads(), CADSTAR_ARCHIVE_PARSER::PARTS::PartDefinitions, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::PartID, CADSTAR_PCB_ARCHIVE_PARSER::Parts, pin, CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Pins, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Position, FOOTPRINT::SetLibDescription(), PAD::SetNumber(), FOOTPRINT::SetOrientation(), FOOTPRINT::SetPosition(), FOOTPRINT::SetReference(), FOOTPRINT::SetValue(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Side, CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Side, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::SymdefID, THROW_IO_ERROR, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::VariantID, and CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::VariantParentComponentID.

Referenced by Load().

◆ loadCoppers()

void CADSTAR_PCB_ARCHIVE_LOADER::loadCoppers ( )
private

Definition at line 2133 of file cadstar_pcb_archive_loader.cpp.

References _, BOARD::Add(), ARC_HIGH_DEF, SHAPE_POLY_SET::BooleanAdd(), CADSTAR_ARCHIVE_PARSER::checkPoint(), SHAPE_POLY_SET::ClearArcs(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::CopperCodeID, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Coppers, CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::CopperWidth, CADSTAR_ARCHIVE_PARSER::SHAPE::Cutouts, SHAPE_POLY_SET::Fracture(), getCopperCode(), ZONE::GetFill(), getHatchCodeAngle(), getKiCadHatchCodeGap(), getKiCadHatchCodeThickness(), getKiCadLayer(), getKiCadLength(), getKiCadNet(), getPolySetFromCadstarShape(), getShapesFromVertices(), getZoneFromCadstarShape(), ZONE::HasFilledPolysForLayer(), CADSTAR_ARCHIVE_PARSER::SHAPE::HatchCodeID, CADSTAR_ARCHIVE_PARSER::HATCHED, CADSTAR_PCB_ARCHIVE_PARSER::COPPER::ID, SHAPE_POLY_SET::Inflate(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::LayerID, CADSTAR_PCB_ARCHIVE_PARSER::Layout, m_board, m_doneCopperWarning, m_zonesMap, makeTracksFromShapes(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::NetID, CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NetRef, CADSTAR_ARCHIVE_PARSER::OPENSHAPE, CADSTAR_ARCHIVE_PARSER::OUTLINE, ZONE::Outline(), SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, CADSTAR_PCB_ARCHIVE_PARSER::COPPER::PouredTemplateID, ZONE::SetAssignedPriority(), ZONE::SetFilledPolysList(), ZONE::SetFillMode(), ZONE::SetHatchGap(), ZONE::SetHatchOrientation(), ZONE::SetHatchStyle(), ZONE::SetHatchThickness(), ZONE::SetIsFilled(), ZONE::SetIslandRemovalMode(), ZONE::SetLayer(), ZONE::SetNeedRefill(), BOARD_CONNECTED_ITEM::SetNet(), ZONE::SetPadConnection(), ZONE::SetZoneName(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::Shape, TransformArcToPolygon(), TransformOvalToPolygon(), CADSTAR_ARCHIVE_PARSER::SHAPE::Type, CADSTAR_ARCHIVE_PARSER::CUTOUT::Vertices, and CADSTAR_ARCHIVE_PARSER::SHAPE::Vertices.

Referenced by Load().

◆ loadDesignRules()

◆ loadDimensions()

void CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions ( )
private

Definition at line 1467 of file cadstar_pcb_archive_loader.cpp.

References _, BOARD::Add(), ANGLE_90, applyDimensionSettings(), EDA_ANGLE::Cos(), DEG2RAD(), CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Dimensions, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::End, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::ExtensionLineParams, getAngleDegrees(), getKiCadLength(), getKiCadPoint(), PCB_DIMENSION_BASE::GetStart(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, PCB_DIM_ORTHOGONAL::HORIZONTAL, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::ID, KI_FALLTHROUGH, CADSTAR_PCB_ARCHIVE_PARSER::Layout, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::LeaderAngle, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::LeaderLineExtensionLength, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::LeaderLineLength, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Line, m_board, CADSTAR_ARCHIVE_PARSER::m_context, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Overshoot, CADSTAR_ARCHIVE_PARSER::ParseTextFields(), PCB_DIM_ALIGNED_T, PCB_DIMENSION_BASE::SetEnd(), PCB_DIM_ALIGNED::SetExtensionHeight(), PCB_DIMENSION_BASE::SetExtensionOffset(), PCB_DIM_ALIGNED::SetHeight(), EDA_TEXT::SetHorizJustify(), PCB_DIM_ORTHOGONAL::SetOrientation(), PCB_DIMENSION_BASE::SetOverrideText(), PCB_DIMENSION_BASE::SetPrefix(), PCB_DIMENSION_BASE::SetStart(), PCB_DIMENSION_BASE::SetSuffix(), EDA_TEXT::SetTextPos(), PCB_DIMENSION_BASE::SetUnitsFormat(), EDA_ANGLE::Sin(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Start, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::Start, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::LINE::Style, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Subtype, CADSTAR_ARCHIVE_PARSER::TEXT::Text, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Text, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Type, PCB_DIM_ORTHOGONAL::VERTICAL, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Load().

◆ loadDocumentationSymbols()

◆ loadFigures()

◆ loadGroups()

◆ LoadLibrary()

std::vector< std::unique_ptr< FOOTPRINT > > CADSTAR_PCB_ARCHIVE_LOADER::LoadLibrary ( )

Parse a CADSTAR PCB Archive and load the footprints contained within.

Returns
Container with all the footprint definitions that were loaded (caller owns them)

Definition at line 186 of file cadstar_pcb_archive_loader.cpp.

References CADSTAR_ARCHIVE_PARSER::BOARD, loadBoardStackup(), loadComponentLibrary(), m_board, m_designCenter, m_libraryMap, CADSTAR_ARCHIVE_PARSER::m_progressReporter, m_project, CADSTAR_PCB_ARCHIVE_PARSER::Parse(), remapUnsureLayers(), and PROGRESS_REPORTER::SetNumPhases().

Referenced by PCB_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary().

◆ loadLibraryAreas()

◆ loadLibraryCoppers()

void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers ( const SYMDEF_PCB aComponent,
FOOTPRINT aFootprint 
)
private

◆ loadLibraryFigures()

◆ loadLibraryPads()

void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryPads ( const SYMDEF_PCB aComponent,
FOOTPRINT aFootprint 
)
private

◆ loadNets()

◆ loadNetTracks()

void CADSTAR_PCB_ARCHIVE_LOADER::loadNetTracks ( const NET_ID aCadstarNetID,
const NET_PCB::ROUTE &  aCadstarRoute,
long  aStartWidth = std::numeric_limits<long>::max(),
long  aEndWidth = std::numeric_limits<long>::max() 
)
private

◆ loadNetVia()

◆ loadTemplates()

void CADSTAR_PCB_ARCHIVE_LOADER::loadTemplates ( )
private

Definition at line 1929 of file cadstar_pcb_archive_loader.cpp.

References _, BOARD::Add(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::AdditionalIsolation, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::AllowInNoRouting, CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::AutomaticRepour, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Boards, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::BoxIsolatedPins, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::ClearanceWidth, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::CopperCodeID, CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::CopperWidth, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::FillType, getCopperCode(), BOARD::GetDesignSettings(), getHatchCodeAngle(), getKiCadHatchCodeGap(), getKiCadHatchCodeThickness(), getKiCadLayer(), getKiCadLength(), getKiCadNet(), BOARD_DESIGN_SETTINGS::GetLineThickness(), getZoneFromCadstarShape(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::HatchCodeID, CADSTAR_ARCHIVE_PARSER::NET::ID, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::ID, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Layerdefs, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::LayerID, CADSTAR_PCB_ARCHIVE_PARSER::LAYERDEFS::Layers, CADSTAR_PCB_ARCHIVE_PARSER::Layout, m_board, BOARD_DESIGN_SETTINGS::m_MinClearance, m_powerPlaneLayers, m_zonesMap, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::MinDisjointCopper, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::MinIsolatedCopper, CADSTAR_ARCHIVE_PARSER::NET::Name, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::Name, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::NetID, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Nets, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::Pouring, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::ReliefCopperCodeID, ZONE::SetAssignedPriority(), ZONE::SetFillMode(), ZONE::SetHatchGap(), ZONE::SetHatchOrientation(), ZONE::SetHatchThickness(), ZONE::SetIslandRemovalMode(), ZONE::SetLayer(), ZONE::SetLocalClearance(), ZONE::SetMinIslandArea(), ZONE::SetMinThickness(), BOARD_CONNECTED_ITEM::SetNet(), ZONE::SetPadConnection(), ZONE::SetThermalReliefGap(), ZONE::SetThermalReliefSpokeWidth(), ZONE::SetZoneName(), CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_BOARD::Shape, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::Shape, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::SliverWidth, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Templates, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::ThermalReliefOnPads, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::ThermalReliefOnVias, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::ThermalReliefPadsAngle, CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::ThermalReliefViasAngle, and CADSTAR_ARCHIVE_PARSER::UNDEFINED_VALUE.

Referenced by Load().

◆ loadTexts()

void CADSTAR_PCB_ARCHIVE_LOADER::loadTexts ( )
private

◆ loadTextVariables()

◆ logBoardStackupMessage()

void CADSTAR_PCB_ARCHIVE_LOADER::logBoardStackupMessage ( const wxString &  aCadstarLayerName,
const PCB_LAYER_ID aKiCadLayer 
)
private

Definition at line 247 of file cadstar_pcb_archive_loader.cpp.

References _, m_logLayerWarnings, and LSET::Name().

Referenced by loadBoardStackup().

◆ logBoardStackupWarning()

void CADSTAR_PCB_ARCHIVE_LOADER::logBoardStackupWarning ( const wxString &  aCadstarLayerName,
const PCB_LAYER_ID aKiCadLayer 
)
private

Definition at line 234 of file cadstar_pcb_archive_loader.cpp.

References _, m_logLayerWarnings, and LSET::Name().

Referenced by loadBoardStackup().

◆ makeTracksFromShapes()

std::vector< PCB_TRACK * > CADSTAR_PCB_ARCHIVE_LOADER::makeTracksFromShapes ( const std::vector< PCB_SHAPE * > &  aShapes,
BOARD_ITEM_CONTAINER aParentContainer,
NETINFO_ITEM aNet = nullptr,
PCB_LAYER_ID  aLayerOverride = UNDEFINED_LAYER,
int  aWidthOverride = -1 
)
private

Returns a vector of pointers to TRACK/ARC objects.

Caller owns the objects

Parameters
aShapes
aParentContainersets this as the parent of each TRACK object and Add()s it to the parent
aNetsets all the tracks to this net, unless nullptr
aLayerOverrideSets all tracks to this layer, or, if it is UNDEFINED_LAYER, uses the layers in the shapes
aWidthOverrideSets all tracks to this width, or, if it is UNDEFINED_LAYER, uses the width in the shapes
Returns

Definition at line 3132 of file cadstar_pcb_archive_loader.cpp.

References BOARD_ITEM_CONTAINER::Add(), applyRouteOffset(), PCB_TRACK::GetEnd(), BOARD_ITEM::GetLayer(), BOARD_CONNECTED_ITEM::GetNet(), PCB_TRACK::GetStart(), PCB_TRACK::GetWidth(), BOARD_ITEM::IsLocked(), SHAPE_ARC::Reverse(), PCB_TRACK::SetEnd(), BOARD_ITEM::SetLayer(), BOARD_ITEM::SetLocked(), BOARD_CONNECTED_ITEM::SetNet(), BOARD_CONNECTED_ITEM::SetNetCode(), PCB_TRACK::SetStart(), and PCB_TRACK::SetWidth().

Referenced by loadCoppers(), and loadNetTracks().

◆ 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 applyDimensionSettings(), loadDimensions(), CADSTAR_ARCHIVE_PARSER::TEXT::Parse(), and CADSTAR_ARCHIVE_PARSER::ParseTextFields().

◆ ParseUnits()

◆ remapUnsureLayers()

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(), loadTextVariables(), and CADSTAR_ARCHIVE_PARSER::ParseTextFields().

◆ Filename

wxString CADSTAR_PCB_ARCHIVE_PARSER::Filename
inherited

Definition at line 1216 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::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

HEADER CADSTAR_PCB_ARCHIVE_PARSER::Header
inherited

◆ KiCadUnitMultiplier

int CADSTAR_PCB_ARCHIVE_PARSER::KiCadUnitMultiplier
inherited

Use this value to convert units in this CPA file to KiCad units.

Definition at line 1224 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PCB_ARCHIVE_PARSER(), getKiCadLength(), getKiCadPoint(), Load(), loadNets(), and CADSTAR_PCB_ARCHIVE_PARSER::Parse().

◆ Layout

◆ Library

LIBRARY CADSTAR_PCB_ARCHIVE_PARSER::Library
inherited

◆ m_board

◆ m_componentMap

std::map<COMPONENT_ID, FOOTPRINT*> CADSTAR_PCB_ARCHIVE_LOADER::m_componentMap
private

Map between Cadstar and KiCad components on the board.

Does NOT own the FOOTPRINT objects (these should have been loaded to m_board).

Definition at line 111 of file cadstar_pcb_archive_loader.h.

Referenced by getFootprintFromCadstarID(), and loadComponents().

◆ m_context

◆ m_designCenter

VECTOR2I CADSTAR_PCB_ARCHIVE_LOADER::m_designCenter
private

Used for calculating the required offset to apply to the Cadstar design so that it fits in KiCad canvas.

Definition at line 134 of file cadstar_pcb_archive_loader.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER(), getKiCadPoint(), Load(), loadComponents(), and LoadLibrary().

◆ m_doneCopperWarning

bool CADSTAR_PCB_ARCHIVE_LOADER::m_doneCopperWarning
private

Used by loadCoppers() to avoid multiple duplicate warnings.

Definition at line 141 of file cadstar_pcb_archive_loader.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER(), and loadCoppers().

◆ m_doneNetClassWarning

bool CADSTAR_PCB_ARCHIVE_LOADER::m_doneNetClassWarning
private

Used by getKiCadNet() to avoid multiple duplicate warnings.

Definition at line 145 of file cadstar_pcb_archive_loader.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER(), and getKiCadNet().

◆ m_doneSpacingClassWarning

bool CADSTAR_PCB_ARCHIVE_LOADER::m_doneSpacingClassWarning
private

Used by getKiCadNet() to avoid multiple duplicate warnings.

Definition at line 143 of file cadstar_pcb_archive_loader.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER(), and getKiCadNet().

◆ m_doneTearDropWarning

bool CADSTAR_PCB_ARCHIVE_LOADER::m_doneTearDropWarning
private

Definition at line 147 of file cadstar_pcb_archive_loader.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER(), and loadNetTracks().

◆ m_groupMap

std::map<GROUP_ID, PCB_GROUP*> CADSTAR_PCB_ARCHIVE_LOADER::m_groupMap
private

Map between Cadstar and KiCad groups.

Does NOT ownthe PCB_GROUP objects (these should have been loaded to m_board).

Definition at line 107 of file cadstar_pcb_archive_loader.h.

Referenced by addToGroup(), createUniqueGroupID(), getKiCadGroup(), and loadGroups().

◆ m_hatchcodesTested

std::set<HATCHCODE_ID> CADSTAR_PCB_ARCHIVE_LOADER::m_hatchcodesTested
private

Used by checkAndLogHatchCode() to avoid multiple duplicate warnings.

Definition at line 137 of file cadstar_pcb_archive_loader.h.

Referenced by checkAndLogHatchCode().

◆ m_layermap

std::map<LAYER_ID, PCB_LAYER_ID> CADSTAR_PCB_ARCHIVE_LOADER::m_layermap
private

Map between Cadstar and KiCad Layers.

Populated by loadBoardStackup().

Definition at line 101 of file cadstar_pcb_archive_loader.h.

Referenced by getKiCadLayer(), loadBoardStackup(), and remapUnsureLayers().

◆ m_layerMappingHandler

LAYER_MAPPING_HANDLER CADSTAR_PCB_ARCHIVE_LOADER::m_layerMappingHandler
private

Callback to get layer mapping.

Definition at line 97 of file cadstar_pcb_archive_loader.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER(), and remapUnsureLayers().

◆ m_librarycopperpads

std::map<SYMDEF_ID, ASSOCIATED_COPPER_PADS> CADSTAR_PCB_ARCHIVE_LOADER::m_librarycopperpads
private

Associated copper pads (if any) for each component library definition.

Definition at line 125 of file cadstar_pcb_archive_loader.h.

Referenced by loadLibraryCoppers(), and loadNets().

◆ m_libraryMap

std::map<SYMDEF_ID, FOOTPRINT*> CADSTAR_PCB_ARCHIVE_LOADER::m_libraryMap
private

Map between Cadstar and KiCad components in the library.

Populated by loadComponentLibrary(). Owns the FOOTPRINT objects.

Definition at line 103 of file cadstar_pcb_archive_loader.h.

Referenced by GetLoadedLibraryFootpints(), loadComponentLibrary(), loadComponents(), LoadLibrary(), and ~CADSTAR_PCB_ARCHIVE_LOADER().

◆ m_logLayerWarnings

bool CADSTAR_PCB_ARCHIVE_LOADER::m_logLayerWarnings
private

◆ m_netClassMap

std::map<std::tuple<ROUTECODE_ID, NETCLASS_ID, SPACING_CLASS_ID>, std::shared_ptr<NETCLASS> > CADSTAR_PCB_ARCHIVE_LOADER::m_netClassMap
private

Map between Cadstar and KiCad classes.

Definition at line 129 of file cadstar_pcb_archive_loader.h.

Referenced by getKiCadNet().

◆ m_netMap

std::map<NET_ID, NETINFO_ITEM*> CADSTAR_PCB_ARCHIVE_LOADER::m_netMap
private

Map between Cadstar and KiCad Nets.

Definition at line 127 of file cadstar_pcb_archive_loader.h.

Referenced by getKiCadNet().

◆ m_numCopperLayers

int CADSTAR_PCB_ARCHIVE_LOADER::m_numCopperLayers
private

Number of layers in the design.

Definition at line 149 of file cadstar_pcb_archive_loader.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER(), getKiCadCopperLayerID(), getKiCadLayerSet(), Load(), and loadBoardStackup().

◆ m_numNets

int CADSTAR_PCB_ARCHIVE_LOADER::m_numNets
private

Number of nets loaded so far.

Definition at line 148 of file cadstar_pcb_archive_loader.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER(), and getKiCadNet().

◆ m_padcodesTested

std::set<PADCODE_ID> CADSTAR_PCB_ARCHIVE_LOADER::m_padcodesTested
private

Used by getKiCadPad() to avoid multiple duplicate warnings.

Definition at line 139 of file cadstar_pcb_archive_loader.h.

Referenced by getKiCadPad().

◆ m_powerPlaneLayers

std::vector<LAYER_ID> CADSTAR_PCB_ARCHIVE_LOADER::m_powerPlaneLayers
private

List of layers that are marked as power plane in CADSTAR.

This is used by "loadtemplates"

Definition at line 131 of file cadstar_pcb_archive_loader.h.

Referenced by loadBoardStackup(), and loadTemplates().

◆ m_progressReporter

◆ m_project

PROJECT* CADSTAR_PCB_ARCHIVE_LOADER::m_project
private

◆ m_rootNode

XNODE* CADSTAR_PCB_ARCHIVE_PARSER::m_rootNode
privateinherited

◆ m_zonesMap

std::map<TEMPLATE_ID, ZONE*> CADSTAR_PCB_ARCHIVE_LOADER::m_zonesMap
private

Map between Cadstar and KiCad zones.

Definition at line 130 of file cadstar_pcb_archive_loader.h.

Referenced by calculateZonePriorities(), loadCoppers(), and loadTemplates().

◆ Parts

PARTS CADSTAR_PCB_ARCHIVE_PARSER::Parts
inherited

◆ 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 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: