![]() |
KiCad PCB EDA Suite
|
#include <cadstar_pcb_archive_loader.h>
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. More... | |
std::vector< FOOTPRINT * > | GetLoadedLibraryFootpints () const |
Return a copy of the loaded library footprints (caller owns the objects) More... | |
void | Parse () |
Parses the file. More... | |
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. More... | |
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 XNODE * | LoadArchiveFile (const wxString &aFileName, const wxString &aFileTypeIdentifier, PROGRESS_REPORTER *aProgressReporter=nullptr) |
Reads a CADSTAR Archive file (S-parameter format) More... | |
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< POINT > | ParseAllChildPoints (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) More... | |
static std::vector< VERTEX > | ParseAllChildVertices (XNODE *aNode, PARSER_CONTEXT *aContext, bool aTestAllChildNodes=false) |
if no children are present, it just returns an empty vector (without throwing an exception) More... | |
static std::vector< CUTOUT > | ParseAllChildCutouts (XNODE *aNode, PARSER_CONTEXT *aContext, bool aTestAllChildNodes=false) |
if no children are present, it just returns an empty vector (without throwing an exception) More... | |
static long | GetNumberOfChildNodes (XNODE *aNode) |
static long | GetNumberOfStepsForReporting (XNODE *aRootNode, std::vector< wxString > aSubNodeChildrenToCount) |
static wxString | HandleTextOverbar (wxString aCadstarString) |
Convert a string with CADSTAR overbar characters to equivalent in KiCad. More... | |
static void | FixTextPositionNoAlignment (EDA_TEXT *aKiCadTextItem) |
Corrects the position of a text element that had NO_ALIGNMENT in CADSTAR. More... | |
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. More... | |
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. More... | |
static const std::map< TEXT_FIELD_NAME, wxString > | CADSTAR_TO_KICAD_FIELDS |
Map between CADSTAR fields and KiCad text variables. More... | |
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. More... | |
Protected Attributes | |
PARSER_CONTEXT | m_context |
PROGRESS_REPORTER * | m_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). More... | |
Private Member Functions | |
void | loadBoardStackup () |
void | remapUnsureLayers () |
Callback m_layerMappingHandler for layers we aren't sure of. More... | |
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. More... | |
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. More... | |
void | drawCadstarText (const TEXT &aCadstarText, BOARD_ITEM_CONTAINER *aContainer, const GROUP_ID &aCadstarGroupID=wxEmptyString, const LAYER_ID &aCadstarLayerOverride=wxEmptyString, const wxPoint &aMoveVector={ 0, 0 }, const double &aRotationAngle=0.0, const double &aScalingFactor=1.0, const wxPoint &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false) |
void | drawCadstarShape (const SHAPE &aCadstarShape, const PCB_LAYER_ID &aKiCadLayer, const int &aLineThickness, const wxString &aShapeName, BOARD_ITEM_CONTAINER *aContainer, const GROUP_ID &aCadstarGroupID=wxEmptyString, const wxPoint &aMoveVector={ 0, 0 }, const double &aRotationAngle=0.0, const double &aScalingFactor=1.0, const wxPoint &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false) |
void | drawCadstarCutoutsAsShapes (const std::vector< CUTOUT > &aCutouts, const PCB_LAYER_ID &aKiCadLayer, const int &aLineThickness, BOARD_ITEM_CONTAINER *aContainer, const GROUP_ID &aCadstarGroupID=wxEmptyString, const wxPoint &aMoveVector={ 0, 0 }, const double &aRotationAngle=0.0, const double &aScalingFactor=1.0, const wxPoint &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false) |
Uses PCB_SHAPEs to draw the cutouts on m_board object. More... | |
void | drawCadstarVerticesAsShapes (const std::vector< VERTEX > &aCadstarVertices, const PCB_LAYER_ID &aKiCadLayer, const int &aLineThickness, BOARD_ITEM_CONTAINER *aContainer, const GROUP_ID &aCadstarGroupID=wxEmptyString, const wxPoint &aMoveVector={ 0, 0 }, const double &aRotationAngle=0.0, const double &aScalingFactor=1.0, const wxPoint &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false) |
Uses PCB_SHAPE to draw the vertices on m_board object. More... | |
std::vector< PCB_SHAPE * > | getShapesFromVertices (const std::vector< VERTEX > &aCadstarVertices, BOARD_ITEM_CONTAINER *aContainer=nullptr, const GROUP_ID &aCadstarGroupID=wxEmptyString, const wxPoint &aMoveVector={ 0, 0 }, const double &aRotationAngle=0.0, const double &aScalingFactor=1.0, const wxPoint &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false) |
Returns a vector of pointers to PCB_SHAPE objects. More... | |
PCB_SHAPE * | getShapeFromVertex (const POINT &aCadstarStartPoint, const VERTEX &aCadstarVertex, BOARD_ITEM_CONTAINER *aContainer=nullptr, const GROUP_ID &aCadstarGroupID=wxEmptyString, const wxPoint &aMoveVector={ 0, 0 }, const double &aRotationAngle=0.0, const double &aScalingFactor=1.0, const wxPoint &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false) |
Returns a pointer to a PCB_SHAPE object. More... | |
ZONE * | getZoneFromCadstarShape (const SHAPE &aCadstarShape, const int &aLineThickness, BOARD_ITEM_CONTAINER *aParentContainer) |
SHAPE_POLY_SET | getPolySetFromCadstarShape (const SHAPE &aCadstarShape, const int &aLineThickness=-1, BOARD_ITEM_CONTAINER *aContainer=nullptr, const wxPoint &aMoveVector={ 0, 0 }, const double &aRotationAngle=0.0, const double &aScalingFactor=1.0, const wxPoint &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false) |
Returns a SHAPE_POLY_SET object from a Cadstar SHAPE. More... | |
SHAPE_LINE_CHAIN | getLineChainFromShapes (const std::vector< PCB_SHAPE * > aShapes) |
Returns a SHAPE_LINE_CHAIN object from a series of PCB_SHAPE objects. More... | |
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. More... | |
void | addAttribute (const ATTRIBUTE_LOCATION &aCadstarAttrLoc, const ATTRIBUTE_ID &aCadstarAttributeID, FOOTPRINT *aFootprint, const wxString &aAttributeValue) |
Adds a CADSTAR Attribute to a KiCad footprint. More... | |
void | applyRouteOffset (wxPoint *aPointToOffset, const wxPoint &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. More... | |
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) |
double | getHatchCodeAngleDegrees (const HATCHCODE_ID &aCadstarHatchcodeID) |
PAD * | getKiCadPad (const COMPONENT_PAD &aCadstarPad, FOOTPRINT *aParent) |
PAD *& | getPadReference (FOOTPRINT *aFootprint, const PAD_ID aCadstarPadID) |
FOOTPRINT * | getFootprintFromCadstarID (const COMPONENT_ID &aCadstarComponentID) |
int | getKiCadHatchCodeThickness (const HATCHCODE_ID &aCadstarHatchcodeID) |
int | getKiCadHatchCodeGap (const HATCHCODE_ID &aCadstarHatchcodeID) |
PCB_GROUP * | getKiCadGroup (const GROUP_ID &aCadstarGroupID) |
wxPoint | getKiCadPoint (const wxPoint &aCadstarPoint) |
Scales, offsets and inverts y axis to make the point usable directly in KiCad. More... | |
int | getKiCadLength (long long aCadstarLength) |
double | getAngleTenthDegree (const long long &aCadstarAngle) |
double | getAngleDegrees (const long long &aCadstarAngle) |
double | getPolarAngle (const wxPoint &aPoint) |
NETINFO_ITEM * | getKiCadNet (const NET_ID &aCadstarNetID) |
Searches m_netMap and returns the NETINFO_ITEM pointer if exists. More... | |
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. More... | |
Private Attributes | |
LAYER_MAPPING_HANDLER | m_layerMappingHandler |
Callback to get layer mapping. More... | |
bool | m_logLayerWarnings |
Used in loadBoardStackup() More... | |
BOARD * | m_board |
PROJECT * | m_project |
std::map< LAYER_ID, PCB_LAYER_ID > | m_layermap |
Map between Cadstar and KiCad Layers. More... | |
std::map< SYMDEF_ID, FOOTPRINT * > | m_libraryMap |
Map between Cadstar and KiCad components in the library. More... | |
std::map< GROUP_ID, PCB_GROUP * > | m_groupMap |
Map between Cadstar and KiCad groups. More... | |
std::map< COMPONENT_ID, FOOTPRINT * > | m_componentMap |
Map between Cadstar and KiCad components on the board. More... | |
std::map< SYMDEF_ID, ASSOCIATED_COPPER_PADS > | m_librarycopperpads |
Associated copper pads (if any) for each component library definition. More... | |
std::map< NET_ID, NETINFO_ITEM * > | m_netMap |
Map between Cadstar and KiCad Nets. More... | |
std::map< std::tuple< ROUTECODE_ID, NETCLASS_ID, SPACING_CLASS_ID >, NETCLASSPTR > | m_netClassMap |
Map between Cadstar and KiCad classes. More... | |
std::map< TEMPLATE_ID, ZONE * > | m_zonesMap |
Map between Cadstar and KiCad zones. More... | |
std::vector< LAYER_ID > | m_powerPlaneLayers |
List of layers that are marked as power plane in CADSTAR. More... | |
wxPoint | m_designCenter |
Used for calculating the required offset to apply to the Cadstar design so that it fits in KiCad canvas. More... | |
std::set< HATCHCODE_ID > | m_hatchcodesTested |
Used by checkAndLogHatchCode() to avoid multiple duplicate warnings. More... | |
std::set< PADCODE_ID > | m_padcodesTested |
Used by getKiCadPad() to avoid multiple duplicate warnings. More... | |
bool | m_doneCopperWarning |
Used by loadCoppers() to avoid multiple duplicate warnings. More... | |
bool | m_doneSpacingClassWarning |
Used by getKiCadNet() to avoid multiple duplicate warnings. More... | |
bool | m_doneNetClassWarning |
Used by getKiCadNet() to avoid multiple duplicate warnings. More... | |
int | m_numNets |
Number of nets loaded so far. More... | |
int | m_numCopperLayers |
Number of layers in the design. More... | |
Definition at line 39 of file cadstar_pcb_archive_loader.h.
|
inherited |
Definition at line 70 of file cadstar_pcb_archive_parser.h.
|
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 110 of file cadstar_pcb_archive_loader.h.
|
inherited |
Definition at line 100 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 69 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 114 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 66 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 71 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 74 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 73 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 60 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 68 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 113 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 75 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 108 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 103 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 109 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 93 of file cadstar_archive_parser.h.
|
inherited |
ID of a Sheet (if schematic) or board Layer (if PCB)
Definition at line 98 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 64 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 92 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 58 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 111 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 95 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 112 of file cadstar_archive_parser.h.
|
inherited |
Pad identifier (pin) in the PCB.
Definition at line 67 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 61 of file cadstar_pcb_archive_parser.h.
|
inherited |
Pin identifier in the part definition.
Definition at line 105 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 102 of file cadstar_archive_parser.h.
|
inherited |
Pin identifier in the part.
Definition at line 106 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 59 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 110 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 94 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 65 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 96 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 63 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 101 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 72 of file cadstar_pcb_archive_parser.h.
|
inherited |
Terminal is the pin identifier in the schematic.
Definition at line 104 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 107 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 97 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 76 of file cadstar_pcb_archive_parser.h.
|
inherited |
Definition at line 99 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 62 of file cadstar_pcb_archive_parser.h.
|
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 576 of file cadstar_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
DEGREES | |
RADIANS |
Definition at line 486 of file cadstar_archive_parser.h.
|
stronginherited |
Definition at line 630 of file cadstar_archive_parser.h.
|
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 653 of file cadstar_archive_parser.h.
|
stronginherited |
|
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 496 of file cadstar_archive_parser.h.
|
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 602 of file cadstar_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
LAYERSUBTYPE_NONE | |
LAYERSUBTYPE_SILKSCREEN | |
LAYERSUBTYPE_PLACEMENT | |
LAYERSUBTYPE_ASSEMBLY | |
LAYERSUBTYPE_SOLDERRESIST | |
LAYERSUBTYPE_PASTE | |
LAYERSUBTYPE_CLEARANCE | |
LAYERSUBTYPE_ROUT |
Definition at line 119 of file cadstar_pcb_archive_parser.h.
|
stronginherited |
Definition at line 102 of file cadstar_pcb_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
SOLID | |
DASH | |
DASHDOT | |
DASHDOTDOT | |
DOT |
Definition at line 280 of file cadstar_archive_parser.h.
|
stronginherited |
Type of layer appropriate for the material being set up.
Enumerator | |
---|---|
CONSTRUCTION | |
ELECTRICAL | Either.
|
NON_ELECTRICAL |
Definition at line 81 of file cadstar_pcb_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
UNDEFINED | |
WARNING | |
FULL |
Definition at line 1153 of file cadstar_pcb_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
ANNULUS | |
BULLET | |
CIRCLE | Keyword "ROUND". |
DIAMOND | |
FINGER | |
OCTAGON | |
RECTANGLE | |
ROUNDED_RECT | Keyword "ROUNDED". |
SQUARE |
Definition at line 259 of file cadstar_pcb_archive_parser.h.
|
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."
Definition at line 480 of file cadstar_pcb_archive_parser.h.
|
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 620 of file cadstar_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
HUNDREDTH_MICRON |
Definition at line 242 of file cadstar_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
UNBIASED | Keyword "UNBIASED" (default) |
X | Keyword "X_BIASED". |
Y | Keyword "Y_BIASED". |
ANTI_ROUTE | Keyword "ANTITRACK". |
OBSTACLE | Keyword "OBSTACLE". |
Definition at line 132 of file cadstar_pcb_archive_parser.h.
|
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 450 of file cadstar_archive_parser.h.
|
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 810 of file cadstar_archive_parser.h.
|
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:
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 720 of file cadstar_pcb_archive_parser.h.
|
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 858 of file cadstar_pcb_archive_parser.h.
|
stronginherited |
These are special fields in text objects enclosed between the tokens '<@' and '>' such as <@[FIELD_NAME][FIELD_VALUE]>.
For example: "<@DESIGN TITLEProject [email protected]>"
Definition at line 135 of file cadstar_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
DESIGN | Inherits from design units (assumed Assignments->Technology->Units) |
THOU | |
INCH | |
MICROMETRE | |
MM | |
CENTIMETER | |
METER |
Definition at line 471 of file cadstar_archive_parser.h.
|
stronginherited |
Enumerator | |
---|---|
POINT | |
CLOCKWISE_ARC | |
CLOCKWISE_SEMICIRCLE | |
ANTICLOCKWISE_ARC | |
ANTICLOCKWISE_SEMICIRCLE |
Definition at line 416 of file cadstar_archive_parser.h.
|
inlineexplicit |
Definition at line 42 of file cadstar_pcb_archive_loader.h.
References m_board, m_designCenter, m_doneCopperWarning, m_doneNetClassWarning, m_doneSpacingClassWarning, m_layerMappingHandler, m_logLayerWarnings, m_numCopperLayers, m_numNets, CADSTAR_ARCHIVE_PARSER::m_progressReporter, and m_project.
|
inline |
Definition at line 63 of file cadstar_pcb_archive_loader.h.
References m_libraryMap.
|
private |
Adds a CADSTAR Attribute to a KiCad footprint.
aCadstarAttrLoc | |
aCadstarAttributeID | |
aFootprint | |
aAttributeValue |
Definition at line 3198 of file cadstar_pcb_archive_loader.cpp.
References FOOTPRINT::Add(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::Alignment, 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(), getAngleTenthDegree(), getAttributeName(), getKiCadLayer(), getKiCadLength(), getKiCadPoint(), FOOTPRINT::GetOrientation(), FOOTPRINT::GetPosition(), EDA_TEXT::GetText(), EDA_TEXT::GetTextAngle(), getTextCode(), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, CADSTAR_ARCHIVE_PARSER::TEXTCODE::Height, KI_FALLTHROUGH, KiROUND(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::LayerID, CADSTAR_ARCHIVE_PARSER::TEXTCODE::LineWidth, 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(), RotatePoint(), EDA_TEXT::SetHorizJustify(), FP_TEXT::SetKeepUpright(), BOARD_ITEM::SetLayer(), EDA_TEXT::SetMirrored(), FP_TEXT::SetPos0(), EDA_TEXT::SetText(), FP_TEXT::SetTextAngle(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetTextThickness(), 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, CADSTAR_ARCHIVE_PARSER::TXT_HEIGHT_RATIO, FOOTPRINT::Value(), and CADSTAR_ARCHIVE_PARSER::TEXTCODE::Width.
Referenced by loadComponentAttributes().
|
private |
Definition at line 4116 of file cadstar_pcb_archive_loader.cpp.
References m_groupMap.
Referenced by drawCadstarShape(), drawCadstarText(), getShapeFromVertex(), and loadBoards().
|
private |
Definition at line 3593 of file cadstar_pcb_archive_loader.cpp.
References _, CADSTAR_PCB_ARCHIVE_PARSER::Assignments, BARE_SUFFIX, 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, Format(), getKiCadLayer(), getKiCadLength(), getKiCadPoint(), getTextCode(), CADSTAR_ARCHIVE_PARSER::TEXTCODE::Height, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::ID, CADSTAR_ARCHIVE_PARSER::INCH, INCHES, KI_FALLTHROUGH, KiROUND(), 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::TEXTCODE::LineWidth, CADSTAR_ARCHIVE_PARSER::m_context, CADSTAR_ARCHIVE_PARSER::METER, CADSTAR_ARCHIVE_PARSER::MICROMETRE, MILLIMETRES, MILS, CADSTAR_ARCHIVE_PARSER::MM, NO_SUFFIX, 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(), PCB_DIMENSION_BASE::SetLayer(), PCB_DIMENSION_BASE::SetLineThickness(), PCB_DIMENSION_BASE::SetPrecision(), PCB_DIMENSION_BASE::SetPrefix(), PCB_DIMENSION_BASE::SetStart(), PCB_DIMENSION_BASE::SetSuffix(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetTextThickness(), PCB_DIMENSION_BASE::SetUnitsFormat(), PCB_DIMENSION_BASE::SetUnitsMode(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Start, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Technology, PCB_DIMENSION_BASE::Text(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Text, CADSTAR_ARCHIVE_PARSER::TEXT::Text, CADSTAR_ARCHIVE_PARSER::TEXT::TextCodeID, CADSTAR_ARCHIVE_PARSER::THOU, CADSTAR_ARCHIVE_PARSER::TXT_HEIGHT_RATIO, CADSTAR_ARCHIVE_PARSER::SETTINGS::UnitDisplPrecision, CADSTAR_ARCHIVE_PARSER::SETTINGS::Units, CADSTAR_ARCHIVE_PARSER::LINECODE::Width, and CADSTAR_ARCHIVE_PARSER::TEXTCODE::Width.
Referenced by loadDimensions().
|
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.
aPointToOffset | Point that we want to offset by aOffsetAmount |
aRefPoint | Reference point to use for determine the angle of the offset |
aOffsetAmount |
Definition at line 3334 of file cadstar_pcb_archive_loader.cpp.
References VECTOR2< T >::EuclideanNorm(), VECTOR2< T >::Resize(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by makeTracksFromShapes().
|
private |
Tries to make a best guess as to the zone priorities based on the pour status.
Definition at line 3673 of file cadstar_pcb_archive_loader.cpp.
References SHAPE_POLY_SET::Area(), CADSTAR_PCB_ARCHIVE_PARSER::Assignments, SHAPE_POLY_SET::BooleanSubtract(), CADSTAR_ARCHIVE_PARSER::checkPoint(), CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, LSET::Contains(), BOARD::GetDesignSettings(), ZONE::GetFilledPolysList(), getKiCadLength(), ZONE::GetLayerSet(), ZONE::GetLocalClearance(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::ID, SHAPE_POLY_SET::Inflate(), CADSTAR_PCB_ARCHIVE_PARSER::Layout, m_board, BOARD_DESIGN_SETTINGS::m_MinClearance, m_zonesMap, ZONE::Outline(), SHAPE_POLY_SET::PM_FAST, CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::SpacingCodes, and CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Templates.
Referenced by Load().
|
private |
Definition at line 3529 of file cadstar_pcb_archive_loader.cpp.
References _, E6, Format(), getAngleDegrees(), getHatchCode(), getKiCadLength(), CADSTAR_ARCHIVE_PARSER::HATCHCODE::Hatches, m_hatchcodesTested, and CADSTAR_ARCHIVE_PARSER::HATCHCODE::Name.
Referenced by getHatchCodeAngleDegrees(), getKiCadHatchCodeGap(), and getKiCadHatchCodeThickness().
|
staticinherited |
aNode |
IO_ERROR | if a child node was found |
Definition at line 2465 of file cadstar_archive_parser.cpp.
References XNODE::GetChildren(), and THROW_UNKNOWN_NODE_IO_ERROR.
Referenced by CADSTAR_PCB_ARCHIVE_PARSER::LAYERDEFS::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::REASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_COPPER::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_AREA::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRNAME::COLUMNORDER::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRNAME::COLUMNWIDTH::Parse(), CADSTAR_ARCHIVE_PARSER::REUSEBLOCKREF::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::AREA::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::PIN::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::GATE::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN_EQUIVALENCE::Parse(), and CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GATE::Parse().
|
staticinherited |
aNode |
IO_ERROR | if a node adjacent to aNode was found |
Definition at line 2472 of file cadstar_archive_parser.cpp.
References XNODE::GetNext(), XNODE::GetParent(), and THROW_UNKNOWN_NODE_IO_ERROR.
Referenced by CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL_SHAPE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADREASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIAREASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::TEXTFORMAT::Parse().
|
protectedinherited |
Updates m_progressReporter or throws if user cancelled.
Definition at line 2645 of file cadstar_archive_parser.cpp.
References _, PROGRESS_REPORTER::AdvanceProgress(), PROGRESS_REPORTER::KeepRefreshing(), CADSTAR_ARCHIVE_PARSER::m_progressReporter, and THROW_IO_ERROR.
Referenced by calculateZonePriorities(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), loadCoppers(), CADSTAR_SCH_ARCHIVE_LOADER::loadPartsLibrary(), CADSTAR_SCH_ARCHIVE_PARSER::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::Parse().
|
private |
Adds a new PCB_GROUP* to m_groupMap.
aName | Name to give the group. If name already exists, append "_1", "_2", etc. to the end to ensure it is unique |
Definition at line 4126 of file cadstar_pcb_archive_loader.cpp.
References BOARD::Add(), Format(), m_board, m_groupMap, and PCB_GROUP::SetName().
Referenced by loadBoards(), and loadDocumentationSymbols().
|
private |
Uses PCB_SHAPEs to draw the cutouts on m_board object.
aVertices | |
aKiCadLayer | KiCad layer to draw on |
aLineThickness | Thickness of line to draw with |
aContainer | to draw on (e.g. m_board) |
aCadstarGroupID | to add the shapes to |
aMoveVector | move shapes by this amount (in KiCad coordinates) |
aRotationAngle | rotate shapes by this amount (in tenth degrees) |
aScalingFactor | scale shapes by this amount |
aTransformCentre | around which all transforms are applied (KiCad coordinates) |
aMirrorInvert | if true, mirrors the shapes |
Definition at line 2727 of file cadstar_pcb_archive_loader.cpp.
References drawCadstarVerticesAsShapes().
Referenced by drawCadstarShape().
|
private |
aCadstarShape | |
aCadstarLayerID | KiCad layer to draw on |
aLineThickness | Thickness of line to draw with |
aShapeName | for reporting warnings/errors to the user |
aContainer | to draw on (e.g. m_board) |
aCadstarGroupID | to add the shape to |
aMoveVector | move shapes by this amount (in KiCad coordinates) |
aRotationAngle | rotate shapes by this amount (in tenth degrees) |
aScalingFactor | scale shapes by this amount |
aTransformCentre | around which all transforms are applied (KiCad coordinates) |
aMirrorInvert | if 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 2665 of file cadstar_pcb_archive_loader.cpp.
References _, FOOTPRINT::Add(), addToGroup(), APPEND, CADSTAR_ARCHIVE_PARSER::SHAPE::Cutouts, drawCadstarCutoutsAsShapes(), drawCadstarVerticesAsShapes(), Format(), SHAPE_POLY_SET::Fracture(), getPolySetFromCadstarShape(), CADSTAR_ARCHIVE_PARSER::HATCHED, isFootprint(), CADSTAR_ARCHIVE_PARSER::OPENSHAPE, CADSTAR_ARCHIVE_PARSER::OUTLINE, POLY, EDA_SHAPE::SetFilled(), BOARD_ITEM::SetLayer(), EDA_SHAPE::SetPolyShape(), EDA_SHAPE::SetWidth(), CADSTAR_ARCHIVE_PARSER::SOLID, CADSTAR_ARCHIVE_PARSER::SHAPE::Type, and CADSTAR_ARCHIVE_PARSER::SHAPE::Vertices.
Referenced by loadBoards(), loadDocumentationSymbols(), loadFigures(), loadLibraryCoppers(), and loadLibraryFigures().
|
private |
aCadstarText | |
aContainer | to draw on (e.g. m_board) |
aCadstarGroupID | to add the text to |
aCadstarLayerOverride | if not empty, overrides the LayerID in aCadstarText |
aMoveVector | move text by this amount (in KiCad coordinates) |
aRotationAngle | rotate text by this amount (in tenth degrees) |
aScalingFactor | scale text by this amount |
aTransformCentre | around which all transforms are applied (KiCad coordinates) |
aMirrorInvert | if true, it inverts the Mirror status of aCadstarText |
Definition at line 2517 of file cadstar_pcb_archive_loader.cpp.
References BOARD_ITEM_CONTAINER::Add(), BOARD::Add(), addToGroup(), CADSTAR_ARCHIVE_PARSER::TEXT::Alignment, APPEND, 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(), getAngleTenthDegree(), getKiCadLayer(), getKiCadLayerSet(), getKiCadLength(), getKiCadPoint(), getTextCode(), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, CADSTAR_ARCHIVE_PARSER::TEXTCODE::Height, isLayerSet(), KiROUND(), CADSTAR_ARCHIVE_PARSER::TEXT::LayerID, CADSTAR_ARCHIVE_PARSER::TEXTCODE::LineWidth, 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(), LSET::Seq(), EDA_TEXT::SetHorizJustify(), BOARD_ITEM::SetLayer(), EDA_TEXT::SetMirrored(), PCB_TEXT::SetPosition(), EDA_TEXT::SetText(), PCB_TEXT::SetTextAngle(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetTextThickness(), EDA_TEXT::SetVertJustify(), CADSTAR_ARCHIVE_PARSER::TEXT::Text, CADSTAR_ARCHIVE_PARSER::TEXT::TextCodeID, CADSTAR_ARCHIVE_PARSER::TOPCENTER, CADSTAR_ARCHIVE_PARSER::TOPLEFT, CADSTAR_ARCHIVE_PARSER::TOPRIGHT, CADSTAR_ARCHIVE_PARSER::TXT_HEIGHT_RATIO, and CADSTAR_ARCHIVE_PARSER::TEXTCODE::Width.
Referenced by loadDocumentationSymbols(), and loadTexts().
|
private |
Uses PCB_SHAPE to draw the vertices on m_board object.
aCadstarVertices | |
aKiCadLayer | KiCad layer to draw on |
aLineThickness | Thickness of line to draw with |
aContainer | to draw on (e.g. m_board) |
aCadstarGroupID | to add the shape to |
aMoveVector | move shape by this amount (in KiCad coordinates) |
aRotationAngle | rotate shape by this amount (in tenth degrees) |
aScalingFactor | scale shape by this amount |
aTransformCentre | around which all transforms are applied (KiCad coordinates) |
aMirrorInvert | if true, mirrors the shape |
aCadstarGroupID | to add the shape to |
Definition at line 2747 of file cadstar_pcb_archive_loader.cpp.
References BOARD_ITEM_CONTAINER::Add(), APPEND, and getShapesFromVertices().
Referenced by drawCadstarCutoutsAsShapes(), and drawCadstarShape().
|
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.
aKiCadTextItem | a Kicad item to correct |
Definition at line 2617 of file cadstar_archive_parser.cpp.
References EDA_TEXT::GetInterline(), EDA_TEXT::GetText(), EDA_TEXT::GetTextAngleDegrees(), LIB_FIELD_T, LIB_TEXT_T, EDA_TEXT::Offset(), RotatePoint(), text, and EDA_ITEM::Type().
Referenced by addAttribute(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), and drawCadstarText().
|
inlinestaticinherited |
Definition at line 1402 of file cadstar_archive_parser.h.
Referenced by CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary().
|
inlineprivate |
aCadstarAngle |
Definition at line 467 of file cadstar_pcb_archive_loader.h.
References getAngleTenthDegree().
Referenced by checkAndLogHatchCode(), getHatchCodeAngleDegrees(), and loadDimensions().
|
inlineprivate |
aCadstarAngle |
Definition at line 447 of file cadstar_pcb_archive_loader.h.
References CADSTAR_ARCHIVE_PARSER::HEADER::Format, CADSTAR_PCB_ARCHIVE_PARSER::Header, and CADSTAR_ARCHIVE_PARSER::FORMAT::Version.
Referenced by addAttribute(), drawCadstarText(), getAngleDegrees(), getKiCadPad(), loadComponents(), and loadDocumentationSymbols().
|
private |
Definition at line 3420 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_ARCHIVE_PARSER::CODEDEFS::AttributeNames, and CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs.
Referenced by addAttribute().
|
private |
Definition at line 3430 of file cadstar_pcb_archive_loader.cpp.
Referenced by loadComponentAttributes().
|
private |
Definition at line 3365 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, and CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::CopperCodes.
Referenced by loadCoppers(), loadLibraryCoppers(), and loadTemplates().
|
private |
Definition at line 3872 of file cadstar_pcb_archive_loader.cpp.
References m_componentMap.
Referenced by getKiCadNet(), and loadNets().
|
private |
Definition at line 3472 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, and CADSTAR_ARCHIVE_PARSER::CODEDEFS::HatchCodes.
Referenced by checkAndLogHatchCode(), getHatchCodeAngleDegrees(), getKiCadHatchCodeGap(), and getKiCadHatchCodeThickness().
|
private |
Definition at line 3483 of file cadstar_pcb_archive_loader.cpp.
References checkAndLogHatchCode(), getAngleDegrees(), BOARD_DESIGN_SETTINGS::GetDefaultZoneSettings(), BOARD::GetDesignSettings(), getHatchCode(), CADSTAR_ARCHIVE_PARSER::HATCHCODE::Hatches, m_board, and ZONE_SETTINGS::m_HatchOrientation.
Referenced by loadCoppers(), and loadTemplates().
|
private |
aLayerNum | Physical / logical layer number (starts at 1) |
aDetectMaxLayer | If true, returns B.Cu if the requested layer is the maximum layer |
Definition at line 4007 of file cadstar_pcb_archive_loader.cpp.
References B_Cu, F_Cu, In10_Cu, In11_Cu, In12_Cu, In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu, In19_Cu, In1_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu, In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In2_Cu, In30_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu, In7_Cu, In8_Cu, In9_Cu, m_numCopperLayers, and UNDEFINED_LAYER.
Referenced by loadNetVia().
Definition at line 3521 of file cadstar_pcb_archive_loader.cpp.
References m_groupMap.
Referenced by loadBoards().
|
private |
Definition at line 3509 of file cadstar_pcb_archive_loader.cpp.
References checkAndLogHatchCode(), BOARD_DESIGN_SETTINGS::GetDefaultZoneSettings(), BOARD::GetDesignSettings(), getHatchCode(), getKiCadLength(), CADSTAR_ARCHIVE_PARSER::HATCHCODE::Hatches, m_board, and ZONE_SETTINGS::m_HatchGap.
Referenced by loadCoppers(), and loadTemplates().
|
private |
Definition at line 3496 of file cadstar_pcb_archive_loader.cpp.
References checkAndLogHatchCode(), BOARD_DESIGN_SETTINGS::GetDefaultZoneSettings(), BOARD::GetDesignSettings(), getHatchCode(), getKiCadLength(), CADSTAR_ARCHIVE_PARSER::HATCHCODE::Hatches, m_board, and ZONE_SETTINGS::m_HatchThickness.
Referenced by loadCoppers(), and loadTemplates().
|
private |
aCadstarLayerID |
Definition at line 4076 of file cadstar_pcb_archive_loader.cpp.
References getLayerType(), m_layermap, CADSTAR_PCB_ARCHIVE_PARSER::NOLAYER, and UNDEFINED_LAYER.
Referenced by addAttribute(), applyDimensionSettings(), drawCadstarText(), getKiCadLayerSet(), getKiCadPad(), loadAreas(), loadCoppers(), loadFigures(), loadLibraryAreas(), loadLibraryCoppers(), loadLibraryFigures(), loadNetTracks(), and loadTemplates().
aCadstarLayerID |
Definition at line 4092 of file cadstar_pcb_archive_loader.cpp.
References LSET::AllCuMask(), CADSTAR_PCB_ARCHIVE_PARSER::ALLDOC, CADSTAR_PCB_ARCHIVE_PARSER::ALLELEC, CADSTAR_PCB_ARCHIVE_PARSER::ALLLAYER, LSET::AllLayersMask(), Cmts_User, Dwgs_User, Eco1_User, Eco2_User, getKiCadLayer(), getLayerType(), m_numCopperLayers, MAX_CU_LAYERS, and Rescue.
Referenced by drawCadstarText(), loadAreas(), loadDocumentationSymbols(), and loadLibraryAreas().
|
inlineprivate |
aCadstarLength |
Definition at line 437 of file cadstar_pcb_archive_loader.h.
References CADSTAR_PCB_ARCHIVE_PARSER::KiCadUnitMultiplier.
Referenced by addAttribute(), applyDimensionSettings(), calculateZonePriorities(), checkAndLogHatchCode(), drawCadstarText(), getKiCadHatchCodeGap(), getKiCadHatchCodeThickness(), getKiCadNet(), getKiCadPad(), getLineThickness(), initStackupItem(), loadCoppers(), loadDesignRules(), loadDimensions(), loadLibraryCoppers(), loadNets(), loadNetTracks(), loadNetVia(), and loadTemplates().
|
private |
Searches m_netMap and returns the NETINFO_ITEM pointer if exists.
Otherwise creates a new one and adds it to m_board.
aCadstarNetID |
Definition at line 3899 of file cadstar_pcb_archive_loader.cpp.
References _, NETCLASSES::Add(), BOARD::Add(), APPEND, CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, Format(), BOARD_DESIGN_SETTINGS::GetDefault(), BOARD::GetDesignSettings(), getFootprintFromCadstarID(), getKiCadLength(), BOARD_DESIGN_SETTINGS::GetNetClasses(), getRouteCode(), EDA_TEXT::GetText(), CADSTAR_PCB_ARCHIVE_PARSER::Layout, m_board, m_doneNetClassWarning, m_doneSpacingClassWarning, m_netClassMap, m_netMap, m_numNets, CADSTAR_ARCHIVE_PARSER::ROUTECODE::Name, CADSTAR_ARCHIVE_PARSER::CADSTAR_NETCLASS::Name, CADSTAR_ARCHIVE_PARSER::SPCCLASSNAME::Name, CADSTAR_ARCHIVE_PARSER::CODEDEFS::NetClasses, CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Nets, CADSTAR_ARCHIVE_PARSER::ROUTECODE::OptimalWidth, FOOTPRINT::Reference(), NETINFO_ITEM::SetNetClass(), and CADSTAR_ARCHIVE_PARSER::CODEDEFS::SpacingClassNames.
Referenced by loadCoppers(), loadNets(), loadNetTracks(), loadNetVia(), and loadTemplates().
|
private |
Definition at line 921 of file cadstar_pcb_archive_loader.cpp.
References _, LSET::AllCuMask(), CADSTAR_PCB_ARCHIVE_PARSER::ANNULUS, B_Cu, B_Mask, B_Paste, CADSTAR_PCB_ARCHIVE_PARSER::BULLET, CHAMFERED_RECT, CIRCLE, CADSTAR_PCB_ARCHIVE_PARSER::CIRCLE, SHAPE_POLY_SET::Contains(), CUSTOM, 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, Format(), getAngleTenthDegree(), BOARD::GetDesignSettings(), getKiCadLayer(), getKiCadLength(), getKiCadPoint(), getPadCode(), EDA_SHAPE::GetPolyShape(), FOOTPRINT::GetPosition(), 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, NPTH, CADSTAR_PCB_ARCHIVE_PARSER::OCTAGON, CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::OrientAngle, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::OrientAngle, OVAL, PAD, pad, PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::PadCodeID, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::PCBonlyPad, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Plated, POLY, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Position, PTH, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Reassigns, RECT, RECT_CHAMFER_ALL, RECT_CHAMFER_BOTTOM_LEFT, RECT_CHAMFER_TOP_LEFT, 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(), EDA_SHAPE::SetWidth(), 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, SMD, CADSTAR_PCB_ARCHIVE_PARSER::SQUARE, CADSTAR_PCB_ARCHIVE_PARSER::THROUGH_HOLE, and CADSTAR_ARCHIVE_PARSER::UNDEFINED_VALUE.
Referenced by loadComponents(), and loadLibraryPads().
|
private |
Scales, offsets and inverts y axis to make the point usable directly in KiCad.
aCadstarPoint |
Definition at line 3882 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::KiCadUnitMultiplier, and m_designCenter.
Referenced by addAttribute(), applyDimensionSettings(), drawCadstarText(), getKiCadPad(), getShapeFromVertex(), loadComponentLibrary(), loadComponents(), loadDimensions(), loadDocumentationSymbols(), loadLibraryCoppers(), and loadNetVia().
|
private |
Definition at line 3409 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, and CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::LayerPairs.
Referenced by loadNetVia().
|
private |
Definition at line 3441 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Layerdefs, CADSTAR_PCB_ARCHIVE_PARSER::LAYERDEFS::Layers, and CADSTAR_PCB_ARCHIVE_PARSER::UNDEFINED.
Referenced by getKiCadLayer(), getKiCadLayerSet(), and loadComponentLibrary().
|
private |
Returns a SHAPE_LINE_CHAIN object from a series of PCB_SHAPE objects.
aShapes |
Definition at line 2991 of file cadstar_pcb_archive_loader.cpp.
References SHAPE_LINE_CHAIN::Append(), ARC, EDA_SHAPE::GetArcAngle(), FP_SHAPE::GetCenter0(), FP_SHAPE::GetEnd0(), SHAPE_LINE_CHAIN::GetPoint(), FP_SHAPE::GetStart0(), SHAPE_LINE_CHAIN::PointCount(), SHAPE_ARC::Reverse(), SEGMENT, and SHAPE_LINE_CHAIN::SetClosed().
Referenced by getPolySetFromCadstarShape().
|
private |
Definition at line 3355 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, Edge_Cuts, BOARD::GetDesignSettings(), getKiCadLength(), BOARD_DESIGN_SETTINGS::GetLineThickness(), CADSTAR_ARCHIVE_PARSER::CODEDEFS::LineCodes, and m_board.
Referenced by loadBoards(), loadDocumentationSymbols(), loadFigures(), and loadLibraryFigures().
std::vector< FOOTPRINT * > CADSTAR_PCB_ARCHIVE_LOADER::GetLoadedLibraryFootpints | ( | ) | const |
Return a copy of the loaded library footprints (caller owns the objects)
Definition at line 169 of file cadstar_pcb_archive_loader.cpp.
References m_libraryMap.
Referenced by CADSTAR_PCB_ARCHIVE_PLUGIN::Load().
|
staticinherited |
Definition at line 2575 of file cadstar_archive_parser.cpp.
References XNODE::GetChildren(), and XNODE::GetNext().
Referenced by CADSTAR_ARCHIVE_PARSER::GetNumberOfStepsForReporting().
|
staticinherited |
Definition at line 2587 of file cadstar_archive_parser.cpp.
References XNODE::GetChildren(), XNODE::GetNext(), and CADSTAR_ARCHIVE_PARSER::GetNumberOfChildNodes().
Referenced by CADSTAR_SCH_ARCHIVE_PARSER::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::Parse().
|
private |
Definition at line 3387 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, and CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::PadCodes.
Referenced by getKiCadPad(), and loadLibraryCoppers().
|
private |
Definition at line 1251 of file cadstar_pcb_archive_loader.cpp.
References _, Format(), FOOTPRINT::GetReference(), FOOTPRINT::Pads(), and THROW_IO_ERROR.
Referenced by loadComponents(), loadLibraryCoppers(), and loadNets().
|
staticinherited |
Definition at line 1004 of file cadstar_pcb_archive_parser.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::MAXIMUM, CADSTAR_PCB_ARCHIVE_PARSER::MINIMUM, and CADSTAR_PCB_ARCHIVE_PARSER::THROUGH_HOLE.
Referenced by CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Parse().
|
private |
Definition at line 3452 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_ARCHIVE_PARSER::PARTS::PartDefinitions, and CADSTAR_PCB_ARCHIVE_PARSER::Parts.
Referenced by loadComponentAttributes(), and loadComponents().
|
private |
aPoint |
Definition at line 3893 of file cadstar_pcb_archive_loader.cpp.
References ArcTangente(), and NormalizeAnglePos().
Referenced by getShapeFromVertex().
|
private |
Returns a SHAPE_POLY_SET object from a Cadstar SHAPE.
aCadstarShape | |
aLineThickness | Thickness of line is used for expanding the polygon by half. |
aContainer | to draw on (e.g. m_board). Can be nullptr. |
aMoveVector | move poly by this amount (in KiCad coordinates) |
aRotationAngle | rotate poly by this amount (in tenth degrees) |
aScalingFactor | scale poly by this amount |
aTransformCentre | around which all transforms are applied (KiCad coordinates) |
aMirrorInvert | if true, mirrors the poly |
Definition at line 2931 of file cadstar_pcb_archive_loader.cpp.
References SHAPE_POLY_SET::AddHole(), 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().
|
private |
Definition at line 3461 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, and CADSTAR_ARCHIVE_PARSER::CODEDEFS::RouteCodes.
Referenced by getKiCadNet().
|
private |
Returns a pointer to a PCB_SHAPE object.
Caller owns the object.
aCadstarStartPoint | |
aCadstarVertex | |
aContainer | to draw on (e.g. m_board). Can be nullptr. |
aCadstarGroupID | to add the shape to |
aMoveVector | move shapes by this amount (in KiCad coordinates) |
aRotationAngle | rotate shapes by this amount (in tenth degrees) |
aScalingFactor | scale shapes by this amount |
aTransformCentre | around which all transforms are applied (KiCad coordinates) |
aMirrorInvert | if true, mirrors the shapes |
Definition at line 2805 of file cadstar_pcb_archive_loader.cpp.
References addToGroup(), CADSTAR_ARCHIVE_PARSER::ANTICLOCKWISE_ARC, CADSTAR_ARCHIVE_PARSER::ANTICLOCKWISE_SEMICIRCLE, ARC, CADSTAR_ARCHIVE_PARSER::VERTEX::Center, CADSTAR_ARCHIVE_PARSER::CLOCKWISE_ARC, CADSTAR_ARCHIVE_PARSER::CLOCKWISE_SEMICIRCLE, CADSTAR_ARCHIVE_PARSER::VERTEX::End, PCB_SHAPE::Flip(), getKiCadPoint(), getPolarAngle(), isFootprint(), KI_FALLTHROUGH, PCB_SHAPE::Move(), NormalizeAngleNeg(), NormalizeAnglePos(), CADSTAR_ARCHIVE_PARSER::POINT, PCB_SHAPE::Rotate(), PCB_SHAPE::Scale(), SEGMENT, EDA_SHAPE::SetArcAngleAndEnd(), EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetStart(), and CADSTAR_ARCHIVE_PARSER::VERTEX::Type.
Referenced by getShapesFromVertices(), and loadNetTracks().
|
private |
Returns a vector of pointers to PCB_SHAPE objects.
Caller owns the objects.
aCadstarVertices | |
aContainer | to draw on (e.g. m_board). Can be nullptr. |
aCadstarGroupID | to add the shape to |
aMoveVector | move shapes by this amount (in KiCad coordinates) |
aRotationAngle | rotate shapes by this amount (in tenth degrees) |
aScalingFactor | scale shapes by this amount |
aTransformCentre | around which all transforms are applied (KiCad coordinates) |
aMirrorInvert | if true, mirrors the shapes |
Definition at line 2773 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_ARCHIVE_PARSER::VERTEX::End, and getShapeFromVertex().
Referenced by drawCadstarVerticesAsShapes(), getPolySetFromCadstarShape(), and loadCoppers().
|
private |
Definition at line 3376 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, and CADSTAR_ARCHIVE_PARSER::CODEDEFS::TextCodes.
Referenced by addAttribute(), applyDimensionSettings(), and drawCadstarText().
|
private |
Definition at line 3398 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Codedefs, and CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::ViaCodes.
Referenced by loadNetVia().
|
staticinherited |
aNode | |
aID | |
aIsRequired | Prevents exception throwing if false. |
IO_ERROR | if attribute does not exist |
Definition at line 2447 of file cadstar_archive_parser.cpp.
References CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), THROW_PARSING_IO_ERROR, and CADSTAR_ARCHIVE_PARSER::UNDEFINED_VALUE.
Referenced by CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL_SHAPE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::PIN_NUM_LABEL_LOC::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPREASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMATTR::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::REASSIGN::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL::Parse(), CADSTAR_ARCHIVE_PARSER::FORMAT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse(), CADSTAR_ARCHIVE_PARSER::HATCH::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Parse(), CADSTAR_ARCHIVE_PARSER::FONT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR::Parse(), CADSTAR_ARCHIVE_PARSER::TEXTCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPCCLASSSPACE::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTECODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::Parse(), CADSTAR_ARCHIVE_PARSER::POINT::Parse(), CADSTAR_ARCHIVE_PARSER::LONGPOINT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TECHNOLOGY_SECTION::Parse(), CADSTAR_ARCHIVE_PARSER::GRID::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_ARCHIVE_PARSER::ATTRNAME::COLUMNORDER::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRNAME::COLUMNWIDTH::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT_LOCATION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SYMDEF_PCB::Parse(), CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::AREA::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::PIN::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::GATE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::COPPER_TERMINAL::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::Parse(), CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::COPPER_TERM::Parse(), CADSTAR_ARCHIVE_PARSER::PART::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Parse(), CADSTAR_ARCHIVE_PARSER::DOCUMENTATION_SYMBOL::Parse(), CADSTAR_ARCHIVE_PARSER::SETTINGS::ParseSubNode(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::ParseSubNode(), CADSTAR_ARCHIVE_PARSER::SYMDEF::ParseSubNode(), and CADSTAR_ARCHIVE_PARSER::NET::ParseSubNode().
|
staticinherited |
aNode | |
aID | |
aIsRequired | Prevents exception throwing if false. |
IO_ERROR | if attribute does not exist |
Definition at line 2428 of file cadstar_archive_parser.cpp.
References THROW_MISSING_PARAMETER_IO_ERROR.
Referenced by CADSTAR_ARCHIVE_PARSER::PART::GetPinType(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMINALCODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::PIN_NUM_LABEL_LOC::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SHEETS::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYERDEFS::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::COMP::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPREASSIGN::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::REASSIGN::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL::Parse(), CADSTAR_ARCHIVE_PARSER::FORMAT::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT::Parse(), CADSTAR_ARCHIVE_PARSER::TIMESTAMP::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SIGNALREFERENCELINK::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::Parse(), CADSTAR_ARCHIVE_PARSER::HEADER::Parse(), CADSTAR_ARCHIVE_PARSER::VARIANT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADREASSIGN::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse(), CADSTAR_ARCHIVE_PARSER::LINECODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SIGLOC::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Parse(), CADSTAR_ARCHIVE_PARSER::HATCHCODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::BUS::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIAREASSIGN::Parse(), CADSTAR_ARCHIVE_PARSER::FONT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::BLOCK::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR::Parse(), CADSTAR_ARCHIVE_PARSER::TEXTCODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPCCLASSSPACE::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTECODE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BUS_TERM::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::RULESET::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::Parse(), CADSTAR_ARCHIVE_PARSER::EVALUE::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::CONNECTION_SCH::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_COPPER::Parse(), CADSTAR_ARCHIVE_PARSER::SHAPE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_AREA::Parse(), CADSTAR_ARCHIVE_PARSER::GRID::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_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_PCB_ARCHIVE_PARSER::CADSTAR_BOARD::Parse(), CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Parse(), CADSTAR_ARCHIVE_PARSER::REUSEBLOCKREF::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::AREA::Parse(), CADSTAR_ARCHIVE_PARSER::GROUP::Parse(), CADSTAR_ARCHIVE_PARSER::FIGURE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT::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_ARCHIVE_PARSER::PART::DEFINITION::GATE::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_ARCHIVE_PARSER::PART::DEFINITION::PIN::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GROUP::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::Parse(), CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::Parse(), CADSTAR_ARCHIVE_PARSER::PART::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::DOCUMENTATION_SYMBOL::Parse(), CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRCOL::Parse(), CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::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().
|
private |
aCadstarShape | |
aLineThickness | Thickness of line to draw with |
aParentContainer | Parent object (e.g. BOARD or FOOTPRINT pointer) |
Definition at line 2904 of file cadstar_pcb_archive_loader.cpp.
References ZONE::AddPolygon(), SHAPE_POLY_SET::CHole(), SHAPE_POLY_SET::COutline(), DIAGONAL_FULL, getPolySetFromCadstarShape(), HATCH_PATTERN, CADSTAR_ARCHIVE_PARSER::HATCHED, SHAPE_POLY_SET::HoleCount(), isFootprint(), NO_HATCH, ZONE::SetFillMode(), ZONE::SetHatchStyle(), and CADSTAR_ARCHIVE_PARSER::SHAPE::Type.
Referenced by loadAreas(), loadCoppers(), loadLibraryAreas(), and loadTemplates().
|
staticinherited |
Convert a string with CADSTAR overbar characters to equivalent in KiCad.
aCadstarString | Input string |
Definition at line 2607 of file cadstar_archive_parser.cpp.
References ConvertToNewOverbarNotation().
Referenced by CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), CADSTAR_SCH_ARCHIVE_LOADER::loadBusses(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbol(), and CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary().
|
private |
Definition at line 209 of file cadstar_pcb_archive_loader.cpp.
References CADSTAR_PCB_ARCHIVE_PARSER::Assignments, CADSTAR_ARCHIVE_PARSER::EVALUE::GetDouble(), getKiCadLength(), CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Layerdefs, CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL::LossTangent, CADSTAR_PCB_ARCHIVE_PARSER::LAYER::MaterialId, CADSTAR_PCB_ARCHIVE_PARSER::LAYERDEFS::Materials, CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL::Name, CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Name, CADSTAR_PCB_ARCHIVE_PARSER::MATERIAL::Permittivity, BOARD_STACKUP_ITEM::SetEpsilonR(), BOARD_STACKUP_ITEM::SetLayerName(), BOARD_STACKUP_ITEM::SetLossTangent(), BOARD_STACKUP_ITEM::SetMaterial(), BOARD_STACKUP_ITEM::SetThickness(), and CADSTAR_PCB_ARCHIVE_PARSER::LAYER::Thickness.
Referenced by loadBoardStackup().
|
staticinherited |
Definition at line 2297 of file cadstar_archive_parser.cpp.
References Format().
Referenced by CADSTAR_ARCHIVE_PARSER::LoadArchiveFile().
|
inlineprivate |
Definition at line 517 of file cadstar_pcb_archive_loader.h.
References PCB_FOOTPRINT_T, and EDA_ITEM::Type().
Referenced by drawCadstarShape(), getShapeFromVertex(), and getZoneFromCadstarShape().
|
private |
aCadstarLayerID |