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

#include <cadstar_sch_archive_loader.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_LOADER:
CADSTAR_SCH_ARCHIVE_PARSER CADSTAR_ARCHIVE_PARSER

Public Types

enum class  TERMINAL_SHAPE_TYPE {
  ANNULUS , BOX , BULLET , CIRCLE ,
  CROSS , DIAMOND , FINGER , OCTAGON ,
  PLUS , POINTER , RECTANGLE , ROUNDED_RECT ,
  SQUARE , STAR , TRIANGLE , UNDEFINED
}
 
typedef wxString TERMINALCODE_ID
 
typedef wxString SYMBOL_ID
 
typedef wxString BUS_ID
 
typedef wxString BLOCK_ID
 
typedef wxString SHEET_NAME
 
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_SCH_ARCHIVE_LOADER (wxString aFilename, REPORTER *aReporter, PROGRESS_REPORTER *aProgressReporter)
 
 ~CADSTAR_SCH_ARCHIVE_LOADER ()
 
std::vector< LIB_SYMBOL * > LoadPartsLib (const wxString &aFilename)
 
const std::vector< LIB_SYMBOL * > & GetLoadedSymbols () const
 
void SetFpLibName (const wxString &aLibName)
 
void Load (SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet)
 Loads a CADSTAR Schematic Archive file into the KiCad SCHEMATIC object given.
 
void Parse ()
 Parses the file.
 

Static Public Member Functions

static TERMINAL_SHAPE_TYPE ParseTermShapeType (const wxString &aShapeStr)
 
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

const int SMALL_LABEL_SIZE = KiROUND( (double) SCH_IU_PER_MM * 0.4 )
 
const double ARC_ACCURACY = SCH_IU_PER_MM * 0.01
 
wxString Filename
 
HEADER Header
 
ASSIGNMENTS_SCM Assignments
 
LIBRARY_SCM Library
 
PARTS Parts
 
SHEETS Sheets
 
CADSTAR_SCHEMATIC Schematic
 
ATTRCOLORS AttrColors
 
PARTNAMECOL SymbolPartNameColor
 
int KiCadUnitDivider
 Use this value to convert units in this CSA 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

typedef std::pair< BLOCK_ID, TERMINAL_IDBLOCK_PIN_ID
 
typedef std::pair< PART_ID, GATE_IDPART_GATE_ID
 
typedef std::map< TERMINAL_ID, wxString > TERMINAL_TO_PINNUM_MAP
 Map between a terminal ID in a symbol definition to the pin number that should be imported into KiCad.
 
typedef std::map< wxString, TERMINAL_IDPINNUM_TO_TERMINAL_MAP
 

Private Member Functions

void loadSheets ()
 
void loadHierarchicalSheetPins ()
 
void loadPartsLibrary ()
 
void loadSchematicSymbolInstances ()
 
void loadBusses ()
 
void loadNets ()
 
void loadFigures ()
 
void loadTexts ()
 
void loadDocumentationSymbols ()
 
void loadTextVariables ()
 
std::unique_ptr< LIB_SYMBOLloadLibPart (const CADSTAR_PART_ENTRY &aPart)
 
void copySymbolItems (std::unique_ptr< LIB_SYMBOL > &aSourceSym, std::unique_ptr< LIB_SYMBOL > &aDestSym, int aDestUnit, bool aOverrideFields=true)
 
void loadSheetAndChildSheets (LAYER_ID aCadstarSheetID, const VECTOR2I &aPosition, VECTOR2I aSheetSize, const SCH_SHEET_PATH &aParentSheet)
 
void loadChildSheets (LAYER_ID aCadstarSheetID, const SCH_SHEET_PATH &aSheet)
 
std::vector< LAYER_IDfindOrphanSheets ()
 
int getSheetNumber (LAYER_ID aCadstarSheetID)
 
void loadItemOntoKiCadSheet (LAYER_ID aCadstarSheetID, SCH_ITEM *aItem)
 
const LIB_SYMBOLloadSymdef (const SYMDEF_ID &aSymdefID)
 
void loadSymbolGateAndPartFields (const SYMDEF_ID &aSymdefID, const PART &aCadstarPart, const GATE_ID &aGateID, LIB_SYMBOL *aSymbol)
 
void setFootprintOnSymbol (std::unique_ptr< LIB_SYMBOL > &aKiCadSymbol, const wxString &aFootprintName, const wxString &aFootprintAlternate)
 
void loadLibrarySymbolShapeVertices (const std::vector< VERTEX > &aCadstarVertices, const VECTOR2I &aSymbolOrigin, LIB_SYMBOL *aSymbol, int aGateNumber, int aLineThickness)
 
void applyToLibraryFieldAttribute (const ATTRIBUTE_LOCATION &aCadstarAttrLoc, const VECTOR2I &aSymbolOrigin, SCH_FIELD *aKiCadField)
 
SCH_SYMBOLloadSchematicSymbol (const SYMBOL &aCadstarSymbol, const LIB_SYMBOL &aKiCadPart, EDA_ANGLE &aComponentOrientation)
 
void loadSymbolFieldAttribute (const ATTRIBUTE_LOCATION &aCadstarAttrLoc, const EDA_ANGLE &aComponentOrientation, bool aIsMirrored, SCH_FIELD *aKiCadField)
 
int getComponentOrientation (const EDA_ANGLE &aOrientAngle, EDA_ANGLE &aReturnedOrientation)
 
POINT getLocationOfNetElement (const NET_SCH &aNet, const NETELEMENT_ID &aNetElementID)
 
wxString getNetName (const NET_SCH &aNet)
 
void loadShapeVertices (const std::vector< VERTEX > &aCadstarVertices, LINECODE_ID aCadstarLineCodeID, LAYER_ID aCadstarSheetID, SCH_LAYER_ID aKiCadSchLayerID, const VECTOR2I &aMoveVector={ 0, 0 }, const EDA_ANGLE &aRotation=ANGLE_0, const double &aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false)
 
void loadFigure (const FIGURE &aCadstarFigure, const LAYER_ID &aCadstarSheetIDOverride, SCH_LAYER_ID aKiCadSchLayerID, const VECTOR2I &aMoveVector={ 0, 0 }, const EDA_ANGLE &aRotation=ANGLE_0, const double &aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false)
 
void applyTextCodeIfExists (EDA_TEXT *aKiCadTextItem, const TEXTCODE_ID &aCadstarTextCodeID)
 
void applyTextSettings (EDA_TEXT *aKiCadTextItem, const TEXTCODE_ID &aCadstarTextCodeID, const ALIGNMENT &aCadstarAlignment, const JUSTIFICATION &aCadstarJustification, const long long aCadstarOrientAngle=0, bool aMirrored=false, bool aInvertY=false)
 
SCH_TEXTgetKiCadSchText (const TEXT &aCadstarTextElement)
 
SYMDEF_ID getSymDefFromName (const wxString &aSymdefName, const wxString &aSymDefAlternate)
 
bool isAttributeVisible (const ATTRIBUTE_ID &aCadstarAttributeID)
 
int getLineThickness (const LINECODE_ID &aCadstarLineCodeID)
 
LINE_STYLE getLineStyle (const LINECODE_ID &aCadstarLineCodeID)
 
PART getPart (const PART_ID &aCadstarPartID)
 
ROUTECODE getRouteCode (const ROUTECODE_ID &aCadstarRouteCodeID)
 
TEXTCODE getTextCode (const TEXTCODE_ID &aCadstarTextCodeID)
 
int getTextHeightFromTextCode (const TEXTCODE_ID &aCadstarTextCodeID)
 
wxString getAttributeName (const ATTRIBUTE_ID &aCadstarAttributeID)
 
PART::DEFINITION::PIN getPartDefinitionPin (const PART &aCadstarPart, const GATE_ID &aGateID, const TERMINAL_ID &aTerminalID)
 
ELECTRICAL_PINTYPE getKiCadPinType (const CADSTAR_PIN_TYPE &aPinType)
 
int getKiCadUnitNumberFromGate (const GATE_ID &aCadstarGateID)
 
SPIN_STYLE getSpinStyle (const long long &aCadstarOrientation, bool aMirror)
 
SPIN_STYLE getSpinStyle (const EDA_ANGLE &aOrientation)
 
ALIGNMENT mirrorX (const ALIGNMENT &aCadstarAlignment)
 
ALIGNMENT rotate180 (const ALIGNMENT &aCadstarAlignment)
 
LIB_SYMBOLgetScaledLibPart (const LIB_SYMBOL *aSymbol, long long aScalingFactorNumerator, long long aScalingFactorDenominator)
 
void fixUpLibraryPins (LIB_SYMBOL *aSymbolToFix, int aGateNumber)
 
std::pair< VECTOR2I, VECTOR2IgetFigureExtentsKiCad (const FIGURE &aCadstarFigure)
 
VECTOR2I getKiCadPoint (const VECTOR2I &aCadstarPoint)
 
VECTOR2I getKiCadLibraryPoint (const VECTOR2I &aCadstarPoint, const VECTOR2I &aCadstarCentre)
 
VECTOR2I applyTransform (const VECTOR2I &aPoint, const VECTOR2I &aMoveVector={ 0, 0 }, const EDA_ANGLE &aRotation=ANGLE_0, const double &aScalingFactor=1.0, const VECTOR2I &aTransformCentre={ 0, 0 }, const bool &aMirrorInvert=false)
 
void checkDesignLimits ()
 
int getKiCadLength (long long aCadstarLength)
 
EDA_ANGLE getAngle (const long long &aCadstarAngle)
 
long long getCadstarAngle (const EDA_ANGLE &aAngle)
 
double getPolarRadius (const VECTOR2I &aPoint)
 

Static Private Member Functions

static SCH_FIELDaddNewFieldToSymbol (const wxString &aFieldName, std::unique_ptr< LIB_SYMBOL > &aKiCadSymbol)
 

Private Attributes

REPORTERm_reporter
 
SCHEMATICm_schematic
 
SCH_SHEETm_rootSheet
 
wxString m_footprintLibName
 Name of the footprint library to prepend all footprints with.
 
VECTOR2I m_designCenter
 Required for calculating the offset to apply to the Cadstar design so that it fits in the KiCad canvas.
 
std::map< LAYER_ID, SCH_SHEET * > m_sheetMap
 Cadstar->KiCad Sheets.
 
std::map< BLOCK_PIN_ID, SCH_HIERLABEL * > m_sheetPinMap
 Cadstar->KiCad Sheet Pins.
 
std::map< PART_ID, LIB_SYMBOL * > m_partMap
 Cadstar->KiCad Parts.
 
std::map< SYMBOL_ID, SCH_SYMBOL * > m_powerSymMap
 Cadstar->KiCad Power Symbols.
 
std::map< wxString, LIB_SYMBOL * > m_powerSymLibMap
 NetName->KiCad Power Lib Symbol.
 
std::map< SYMBOL_ID, SCH_GLOBALLABEL * > m_globalLabelsMap
 Cadstar->KiCad Global Labels.
 
std::map< BUS_ID, std::shared_ptr< BUS_ALIAS > > m_busesMap
 Cadstar->KiCad Buses.
 
std::map< PART_ID, TERMINAL_TO_PINNUM_MAPm_pinNumsMap
 Cadstar Part->KiCad Pin number map.
 
std::map< SYMDEF_ID, PINNUM_TO_TERMINAL_MAPm_symDefTerminalsMap
 
std::map< std::pair< wxString, wxString >, SYMDEF_IDm_SymDefNamesCache
 Cache storing symbol names and alternates to symdef IDs.
 
std::map< wxString, SYMDEF_IDm_DefaultSymDefNamesCache
 Cache storing symbol names (default alternate) to symdef IDs.
 
std::map< SYMDEF_ID, std::unique_ptr< const LIB_SYMBOL > > m_symDefMap
 Cadstar->KiCad Lib Symbols loaded so far.
 
std::vector< LIB_SYMBOL * > m_loadedSymbols
 Loaded symbols so far.
 
std::map< PART_GATE_ID, SYMDEF_IDm_partSymbolsMap
 Map holding the symbols loaded so far for a particular PART_ID and GATE_ID.
 
XNODEm_rootNode
 

Detailed Description

Definition at line 57 of file cadstar_sch_archive_loader.h.

Member Typedef Documentation

◆ ATTRIBUTE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_ID
inherited

Definition at line 108 of file cadstar_archive_parser.h.

◆ BLOCK_ID

typedef wxString CADSTAR_SCH_ARCHIVE_PARSER::BLOCK_ID
inherited

Definition at line 61 of file cadstar_sch_archive_parser.h.

◆ BLOCK_PIN_ID

Definition at line 101 of file cadstar_sch_archive_loader.h.

◆ BUS_ID

typedef wxString CADSTAR_SCH_ARCHIVE_PARSER::BUS_ID
inherited

Definition at line 60 of file cadstar_sch_archive_parser.h.

◆ COLOR_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::COLOR_ID
inherited

Definition at line 122 of file cadstar_archive_parser.h.

◆ DOCUMENTATION_SYMBOL_ID

Definition at line 121 of file cadstar_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.

◆ LINECODE_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::LINECODE_ID
inherited

Definition at line 100 of file cadstar_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.

◆ PART_DEFINITION_PIN_ID

Pin identifier in the part definition.

Definition at line 113 of file cadstar_archive_parser.h.

◆ PART_GATE_ID

Definition at line 102 of file cadstar_sch_archive_loader.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.

◆ PINNUM_TO_TERMINAL_MAP

Definition at line 110 of file cadstar_sch_archive_loader.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.

◆ SHEET_NAME

typedef wxString CADSTAR_SCH_ARCHIVE_PARSER::SHEET_NAME
inherited

Definition at line 62 of file cadstar_sch_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.

◆ SYMBOL_ID

typedef wxString CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL_ID
inherited

Definition at line 59 of file cadstar_sch_archive_parser.h.

◆ SYMDEF_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::SYMDEF_ID
inherited

Definition at line 109 of file cadstar_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.

◆ TERMINAL_TO_PINNUM_MAP

Map between a terminal ID in a symbol definition to the pin number that should be imported into KiCad.

Definition at line 108 of file cadstar_sch_archive_loader.h.

◆ TERMINALCODE_ID

typedef wxString CADSTAR_SCH_ARCHIVE_PARSER::TERMINALCODE_ID
inherited

Definition at line 58 of file cadstar_sch_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.

◆ VARIANT_ID

typedef wxString CADSTAR_ARCHIVE_PARSER::VARIANT_ID
inherited

Definition at line 107 of file cadstar_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.

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

◆ LINESTYLE

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

Definition at line 288 of file cadstar_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.

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

◆ TERMINAL_SHAPE_TYPE

Enumerator
ANNULUS 
BOX 
BULLET 
CIRCLE 

Keyword "ROUND".

CROSS 
DIAMOND 
FINGER 
OCTAGON 
PLUS 
POINTER 
RECTANGLE 
ROUNDED_RECT 

Keyword "ROUNDED".

SQUARE 
STAR 
TRIANGLE 
UNDEFINED 

Only used for error checking (not a real shape)

Definition at line 65 of file cadstar_sch_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_SCH_ARCHIVE_LOADER()

CADSTAR_SCH_ARCHIVE_LOADER::CADSTAR_SCH_ARCHIVE_LOADER ( wxString  aFilename,
REPORTER aReporter,
PROGRESS_REPORTER aProgressReporter 
)
inlineexplicit

◆ ~CADSTAR_SCH_ARCHIVE_LOADER()

CADSTAR_SCH_ARCHIVE_LOADER::~CADSTAR_SCH_ARCHIVE_LOADER ( )
inline

Definition at line 81 of file cadstar_sch_archive_loader.h.

Member Function Documentation

◆ addNewFieldToSymbol()

SCH_FIELD * CADSTAR_SCH_ARCHIVE_LOADER::addNewFieldToSymbol ( const wxString &  aFieldName,
std::unique_ptr< LIB_SYMBOL > &  aKiCadSymbol 
)
staticprivate

◆ applyTextCodeIfExists()

◆ applyTextSettings()

void CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings ( EDA_TEXT aKiCadTextItem,
const TEXTCODE_ID aCadstarTextCodeID,
const ALIGNMENT aCadstarAlignment,
const JUSTIFICATION aCadstarJustification,
const long long  aCadstarOrientAngle = 0,
bool  aMirrored = false,
bool  aInvertY = false 
)
private

◆ applyToLibraryFieldAttribute()

◆ applyTransform()

VECTOR2I CADSTAR_SCH_ARCHIVE_LOADER::applyTransform ( const VECTOR2I aPoint,
const VECTOR2I aMoveVector = { 0, 0 },
const EDA_ANGLE aRotation = ANGLE_0,
const double &  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
const bool &  aMirrorInvert = false 
)
private

◆ checkDesignLimits()

◆ CheckNoChildNodes()

◆ CheckNoNextNodes()

◆ checkPoint()

◆ copySymbolItems()

void CADSTAR_SCH_ARCHIVE_LOADER::copySymbolItems ( std::unique_ptr< LIB_SYMBOL > &  aSourceSym,
std::unique_ptr< LIB_SYMBOL > &  aDestSym,
int  aDestUnit,
bool  aOverrideFields = true 
)
private

◆ EscapeFieldText()

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

Definition at line 1404 of file cadstar_archive_parser.h.

Referenced by loadSymbolGateAndPartFields().

◆ findOrphanSheets()

◆ FixTextPositionNoAlignment()

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

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

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

Parameters
aKiCadTextItema Kicad item to correct

Definition at line 2778 of file cadstar_archive_parser.cpp.

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

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

◆ fixUpLibraryPins()

◆ generateLibName()

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

◆ getAngle()

◆ getAttributeName()

wxString CADSTAR_SCH_ARCHIVE_LOADER::getAttributeName ( const ATTRIBUTE_ID aCadstarAttributeID)
private

◆ getCadstarAngle()

long long CADSTAR_SCH_ARCHIVE_LOADER::getCadstarAngle ( const EDA_ANGLE aAngle)
inlineprivate

◆ getComponentOrientation()

int CADSTAR_SCH_ARCHIVE_LOADER::getComponentOrientation ( const EDA_ANGLE aOrientAngle,
EDA_ANGLE aReturnedOrientation 
)
private

◆ getFigureExtentsKiCad()

◆ getKiCadLength()

int CADSTAR_SCH_ARCHIVE_LOADER::getKiCadLength ( long long  aCadstarLength)
inlineprivate

◆ getKiCadLibraryPoint()

VECTOR2I CADSTAR_SCH_ARCHIVE_LOADER::getKiCadLibraryPoint ( const VECTOR2I aCadstarPoint,
const VECTOR2I aCadstarCentre 
)
private

◆ getKiCadPinType()

ELECTRICAL_PINTYPE CADSTAR_SCH_ARCHIVE_LOADER::getKiCadPinType ( const CADSTAR_PIN_TYPE aPinType)
private

Definition at line 2837 of file cadstar_sch_archive_loader.cpp.

Referenced by loadLibPart(), and loadSymbolGateAndPartFields().

◆ getKiCadPoint()

◆ getKiCadSchText()

◆ getKiCadUnitNumberFromGate()

int CADSTAR_SCH_ARCHIVE_LOADER::getKiCadUnitNumberFromGate ( const GATE_ID aCadstarGateID)
private

◆ getLineStyle()

◆ getLineThickness()

◆ GetLoadedSymbols()

const std::vector< LIB_SYMBOL * > & CADSTAR_SCH_ARCHIVE_LOADER::GetLoadedSymbols ( ) const
inline

Definition at line 87 of file cadstar_sch_archive_loader.h.

References m_loadedSymbols.

Referenced by SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile().

◆ getLocationOfNetElement()

◆ getNetName()

wxString CADSTAR_SCH_ARCHIVE_LOADER::getNetName ( const NET_SCH aNet)
private

◆ GetNumberOfChildNodes()

long CADSTAR_ARCHIVE_PARSER::GetNumberOfChildNodes ( XNODE aNode)
staticinherited

◆ GetNumberOfStepsForReporting()

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

◆ getPart()

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

◆ getPartDefinitionPin()

CADSTAR_SCH_ARCHIVE_LOADER::PART::DEFINITION::PIN CADSTAR_SCH_ARCHIVE_LOADER::getPartDefinitionPin ( const PART aCadstarPart,
const GATE_ID aGateID,
const TERMINAL_ID aTerminalID 
)
private

◆ getPolarRadius()

double CADSTAR_SCH_ARCHIVE_LOADER::getPolarRadius ( const VECTOR2I aPoint)
private
Parameters
aPoint
Returns
Radius of polar representation of the point

Definition at line 3442 of file cadstar_sch_archive_loader.cpp.

References VECTOR2< T >::x, and VECTOR2< T >::y.

◆ getRouteCode()

◆ getScaledLibPart()

◆ getSheetNumber()

int CADSTAR_SCH_ARCHIVE_LOADER::getSheetNumber ( LAYER_ID  aCadstarSheetID)
private

◆ getSpinStyle() [1/2]

SPIN_STYLE CADSTAR_SCH_ARCHIVE_LOADER::getSpinStyle ( const EDA_ANGLE aOrientation)
private

◆ getSpinStyle() [2/2]

SPIN_STYLE CADSTAR_SCH_ARCHIVE_LOADER::getSpinStyle ( const long long &  aCadstarOrientation,
bool  aMirror 
)
private

◆ getSymDefFromName()

CADSTAR_SCH_ARCHIVE_LOADER::SYMDEF_ID CADSTAR_SCH_ARCHIVE_LOADER::getSymDefFromName ( const wxString &  aSymdefName,
const wxString &  aSymDefAlternate 
)
private

◆ getTextCode()

◆ getTextHeightFromTextCode()

int CADSTAR_SCH_ARCHIVE_LOADER::getTextHeightFromTextCode ( const TEXTCODE_ID aCadstarTextCodeID)
private

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

◆ 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 applyTextCodeIfExists(), loadBusses(), loadLibPart(), loadNets(), loadSchematicSymbol(), and loadSymbolGateAndPartFields().

◆ InsertAttributeAtEnd()

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

◆ isAttributeVisible()

bool CADSTAR_SCH_ARCHIVE_LOADER::isAttributeVisible ( const ATTRIBUTE_ID aCadstarAttributeID)
private

◆ IsValidAttribute()

◆ Load()

void CADSTAR_SCH_ARCHIVE_LOADER::Load ( SCHEMATIC aSchematic,
SCH_SHEET aRootSheet 
)

Loads a CADSTAR Schematic Archive file into the KiCad SCHEMATIC object given.

Parameters
aSchematicSchematic to add the design onto
aRootSheetRoot sheet to add the design onto

Definition at line 313 of file cadstar_sch_archive_loader.cpp.

References _, CADSTAR_SCH_ARCHIVE_PARSER::Assignments, EE_RTREE::begin(), PROGRESS_REPORTER::BeginPhase(), BOX2< Vec >::Centre(), checkDesignLimits(), CADSTAR_ARCHIVE_PARSER::checkPoint(), EE_RTREE::end(), CADSTAR_ARCHIVE_PARSER::FRACTIONALGRID, SCH_SYMBOL::GetBodyAndPinsBoundingBox(), SCH_TEXT::GetBoundingBox(), SCH_SYMBOL::GetFields(), getKiCadLength(), SCH_SCREEN::GetPageSettings(), SCH_SHEET::GetScreen(), BOX2< Vec >::GetSize(), PAGE_INFO::GetSizeIU(), EDA_TEXT::GetText(), grid, CADSTAR_SCH_ARCHIVE_PARSER::ASSIGNMENTS_SCM::Grids, CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Groups, SCH_SCREEN::Items(), EDA_IU_SCALE::IU_PER_MILS, EDA_IU_SCALE::IUToMils(), loadBusses(), loadDocumentationSymbols(), loadFigures(), loadHierarchicalSheetPins(), loadNets(), loadPartsLibrary(), loadSchematicSymbolInstances(), loadSheets(), loadTexts(), loadTextVariables(), m_designCenter, CADSTAR_ARCHIVE_PARSER::m_progressReporter, m_reporter, m_rootSheet, m_schematic, m_sheetMap, BOX2< Vec >::Merge(), CADSTAR_ARCHIVE_PARSER::GRID::Param1, CADSTAR_ARCHIVE_PARSER::GRID::Param2, CADSTAR_SCH_ARCHIVE_PARSER::Parse(), CADSTAR_ARCHIVE_PARSER::PARTS::PartDefinitions, CADSTAR_SCH_ARCHIVE_PARSER::Parts, REPORTER::Report(), CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::ReuseBlocks, RPT_SEVERITY_WARNING, SCH_SYMBOL_T, SCH_TEXT_T, CADSTAR_SCH_ARCHIVE_PARSER::Schematic, schIUScale, CADSTAR_ARCHIVE_PARSER::GRIDS::ScreenGrid, PAGE_INFO::SetHeightMils(), PROGRESS_REPORTER::SetMaxProgress(), PROGRESS_REPORTER::SetNumPhases(), SCH_SCREEN::SetPageSettings(), PAGE_INFO::SetWidthMils(), sign(), CADSTAR_ARCHIVE_PARSER::GRID::Type, SCH_SCREEN::Update(), CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::VariantHierarchy, CADSTAR_ARCHIVE_PARSER::VARIANT_HIERARCHY::Variants, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile().

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

◆ loadBusses()

◆ loadChildSheets()

◆ loadDocumentationSymbols()

◆ loadFigure()

void CADSTAR_SCH_ARCHIVE_LOADER::loadFigure ( const FIGURE aCadstarFigure,
const LAYER_ID aCadstarSheetIDOverride,
SCH_LAYER_ID  aKiCadSchLayerID,
const VECTOR2I aMoveVector = { 0, 0 },
const EDA_ANGLE aRotation = ANGLE_0,
const double &  aScalingFactor = 1.0,
const VECTOR2I aTransformCentre = { 0, 0 },
const bool &  aMirrorInvert = false 
)
private

◆ loadFigures()

void CADSTAR_SCH_ARCHIVE_LOADER::loadFigures ( )
private

◆ loadHierarchicalSheetPins()

◆ loadItemOntoKiCadSheet()

void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet ( LAYER_ID  aCadstarSheetID,
SCH_ITEM aItem 
)
private

◆ loadLibPart()

std::unique_ptr< LIB_SYMBOL > CADSTAR_SCH_ARCHIVE_LOADER::loadLibPart ( const CADSTAR_PART_ENTRY aPart)
private

Definition at line 99 of file cadstar_sch_archive_loader.cpp.

References _, addNewFieldToSymbol(), copySymbolItems(), CTX_LIBID, delta, EscapeString(), CADSTAR_ARCHIVE_PARSER::generateLibName(), getKiCadPinType(), getSymDefFromName(), CADSTAR_ARCHIVE_PARSER::HandleTextOverbar(), CADSTAR_SCH_ARCHIVE_PARSER::Library, loadSymdef(), CADSTAR_PART_ENTRY::m_AcceptancePartName, CADSTAR_PART_ENTRY::m_ComponentStem, CADSTAR_PART_ENTRY::m_Description, CADSTAR_PART_ENTRY::m_HiddenPins, CADSTAR_PART_ENTRY::m_Name, CADSTAR_PART_ENTRY::m_Number, CADSTAR_PART_ENTRY::m_PartAttributes, CADSTAR_PART_ENTRY::m_Pcb_alternate, CADSTAR_PART_ENTRY::m_Pcb_component, CADSTAR_PART_ENTRY::m_PcbAttributes, CADSTAR_PART_ENTRY::m_PinLabelsMap, CADSTAR_PART_ENTRY::m_PinNamesMap, CADSTAR_PART_SYMBOL_ENTRY::m_Pins, CADSTAR_PART_ENTRY::m_PinsVisible, m_reporter, CADSTAR_PART_ENTRY::m_SchAndPcbAttributes, CADSTAR_PART_ENTRY::m_SchAttributes, CADSTAR_PART_ENTRY::m_SpiceModel, CADSTAR_PART_SYMBOL_ENTRY::m_SymbolAlternateName, CADSTAR_PART_SYMBOL_ENTRY::m_SymbolName, CADSTAR_PART_ENTRY::m_Symbols, m_symDefTerminalsMap, CADSTAR_PART_ENTRY::m_UserAttributes, CADSTAR_PART_ENTRY::m_Value, CADSTAR_PART_ENTRY::m_Version, EDA_IU_SCALE::MilsToIU(), PartAcceptanceFieldName, PartNameFieldName, PartNumberFieldName, PartVersionFieldName, pin, REPORTER::Report(), RPT_SEVERITY_ERROR, schIUScale, setFootprintOnSymbol(), SCH_FIELD::SetText(), SIM_DEVICE_FIELD, SIM_PARAMS_FIELD, CADSTAR_SCH_ARCHIVE_PARSER::LIBRARY_SCM::SymbolDefinitions, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by LoadPartsLib().

◆ loadLibrarySymbolShapeVertices()

◆ loadNets()

void CADSTAR_SCH_ARCHIVE_LOADER::loadNets ( )
private

Definition at line 1085 of file cadstar_sch_archive_loader.cpp.

References SHAPE_LINE_CHAIN::Append(), applyTextSettings(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BlockTerminals, CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Buses, CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BusTerminals, SCH_SHEET::ClassOf(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::Connections, alg::contains(), SHAPE_LINE_CHAIN::CPoints(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::Danglers, SHAPE_LINE_CHAIN::FindSegment(), getAngle(), SCH_LINE::GetEndPoint(), getKiCadPoint(), getLineThickness(), getLocationOfNetElement(), EDA_ITEM::GetParent(), SCH_SHEET::GetPosition(), SCH_TEXT::GetPosition(), SCH_SHEET::GetSize(), getSpinStyle(), SCH_LINE::GetStartPoint(), CADSTAR_ARCHIVE_PARSER::HandleTextOverbar(), CADSTAR_ARCHIVE_PARSER::NET::ID, CADSTAR_SCH_ARCHIVE_PARSER::BUS::ID, SHAPE_LINE_CHAIN::Intersect(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::Junctions, LAYER_WIRE, CADSTAR_SCH_ARCHIVE_PARSER::BUS::LayerID, m_busesMap, m_globalLabelsMap, m_powerSymMap, m_sheetMap, m_sheetPinMap, SPIN_STYLE::MirrorX(), SPIN_STYLE::MirrorY(), CADSTAR_ARCHIVE_PARSER::NET::Name, CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Nets, SHAPE_LINE_CHAIN::Replace(), SHAPE_LINE_CHAIN::Reverse(), SCH_SHEET_PIN_T, CADSTAR_SCH_ARCHIVE_PARSER::Schematic, EDA_TEXT::SetBold(), SCH_LINE::SetEndPoint(), SCH_ITEM::SetLayer(), SCH_LINE::SetLineWidth(), SCH_FIELD::SetPosition(), SCH_JUNCTION::SetPosition(), SCH_LABEL_BASE::SetPosition(), SCH_BUS_ENTRY_BASE::SetSize(), SCH_LABEL_BASE::SetSpinStyle(), SCH_HIERLABEL::SetSpinStyle(), SCH_LINE::SetStartPoint(), EDA_TEXT::SetText(), SCH_FIELD::SetText(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetVisible(), CADSTAR_ARCHIVE_PARSER::NET::SignalNum, SMALL_LABEL_SIZE, CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Symbols, CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::Terminals, EDA_ITEM::Type(), CADSTAR_ARCHIVE_PARSER::UNDEFINED_VALUE, VALUE_FIELD, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Load().

◆ LoadPartsLib()

◆ loadPartsLibrary()

◆ loadSchematicSymbol()

◆ loadSchematicSymbolInstances()

void CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances ( )
private

Definition at line 704 of file cadstar_sch_archive_loader.cpp.

References _, SCH_SYMBOL::AddField(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::Alignment, CADSTAR_ARCHIVE_PARSER::SYMDEF::Alternate, ANGLE_0, ANGLE_180, SCH_SCREEN::Append(), applyTextSettings(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::AttributeID, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::AttributeLocation, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::AttributeValues, CADSTAR_SCH_ARCHIVE_PARSER::COMP::AttrLoc, CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::AttrLoc, SCH_LABEL_BASE::AutoplaceFields(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::ComponentRef, copy, CTX_LIBID, CADSTAR_SCH_ARCHIVE_PARSER::COMP::Designator, EscapeString(), SCH_SYMBOL::FindField(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::GateID, LIB_SYMBOL::GetAllLibPins(), getAngle(), getAttributeName(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFieldCount(), getKiCadLibraryPoint(), getKiCadPoint(), SCH_FIELD::GetName(), getPart(), LIB_SYMBOL::GetReferenceField(), getScaledLibPart(), getSpinStyle(), EDA_TEXT::GetText(), LIB_SYMBOL::GetValueField(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::HasLocation, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::HasPartRef, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::ID, isAttributeVisible(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::IsComponent, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::IsSymbolVariant, CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::IsVisible, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::Justification, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::LayerID, CADSTAR_SCH_ARCHIVE_PARSER::Library, LINK_ORIGIN_ATTRID, loadSchematicSymbol(), loadSymbolFieldAttribute(), loadSymbolGateAndPartFields(), loadSymdef(), m_globalLabelsMap, m_loadedSymbols, m_partMap, m_partSymbolsMap, m_powerSymLibMap, m_powerSymMap, m_reporter, m_sheetMap, EDA_IU_SCALE::MilsToIU(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Mirror, CADSTAR_ARCHIVE_PARSER::PART::Name, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::OrientAngle, CADSTAR_ARCHIVE_PARSER::SYMDEF::Origin, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Origin, CADSTAR_ARCHIVE_PARSER::PARTS::PartDefinitions, PartNameFieldName, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PartRef, CADSTAR_SCH_ARCHIVE_PARSER::Parts, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::Position, CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::Position, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT::Reference, REFERENCE_FIELD, CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::RefID, REPORTER::Report(), RotatePoint(), RPT_SEVERITY_ERROR, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::ScaleRatioDenominator, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::ScaleRatioNumerator, CADSTAR_SCH_ARCHIVE_PARSER::Schematic, schIUScale, LIB_SYMBOL::SetName(), SCH_FIELD::SetPosition(), SCH_LABEL_BASE::SetPosition(), LIB_SYMBOL::SetPower(), SCH_LABEL_BASE::SetShape(), SYMBOL::SetShowPinNames(), SYMBOL::SetShowPinNumbers(), SCH_GLOBALLABEL::SetSpinStyle(), EDA_TEXT::SetText(), SCH_FIELD::SetText(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetVisible(), SIGNALNAME_ORIGIN_ATTRID, CADSTAR_SCH_ARCHIVE_PARSER::LIBRARY_SCM::SymbolDefinitions, CADSTAR_SCH_ARCHIVE_PARSER::SymbolPartNameColor, CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Symbols, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::SymbolVariant, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::SymdefID, CADSTAR_SCH_ARCHIVE_PARSER::SYMDEF_SCM::Terminals, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::TextCodeID, CADSTAR_ARCHIVE_PARSER::SYMDEF::TextLocations, THROW_IO_ERROR, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT::Type, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::Value, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::VariantID, and CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::VariantParentSymbolID.

Referenced by Load().

◆ loadShapeVertices()

◆ loadSheetAndChildSheets()

◆ loadSheets()

◆ loadSymbolFieldAttribute()

◆ loadSymbolGateAndPartFields()

◆ loadSymdef()

const LIB_SYMBOL * CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef ( const SYMDEF_ID aSymdefID)
private

Definition at line 1597 of file cadstar_sch_archive_loader.cpp.

References addNewFieldToSymbol(), CADSTAR_ARCHIVE_PARSER::TEXT::Alignment, applyTextCodeIfExists(), applyTextSettings(), applyToLibraryFieldAttribute(), ARC_ACCURACY, CADSTAR_ARCHIVE_PARSER::SYMDEF::AttributeValues, CADSTAR_ARCHIVE_PARSER::SYMDEF::BuildLibName(), CADSTAR_ARCHIVE_PARSER::SHAPE::ConvertToPolySet(), CADSTAR_ARCHIVE_PARSER::SYMDEF::Figures, fixUpLibraryPins(), getAttributeName(), BOX2< Vec >::GetBottom(), getKiCadLibraryPoint(), BOX2< Vec >::GetLeft(), getLineStyle(), getLineThickness(), SCH_FIELD::GetName(), getTextHeightFromTextCode(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_BOTTOM, CADSTAR_ARCHIVE_PARSER::HATCHED, CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::ID, CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::IsVisible, CADSTAR_ARCHIVE_PARSER::TEXT::Justification, LAYER_DEVICE, CADSTAR_SCH_ARCHIVE_PARSER::Library, CADSTAR_ARCHIVE_PARSER::FIGURE::LineCodeID, LINK_ORIGIN_ATTRID, loadLibrarySymbolShapeVertices(), m_symDefMap, m_symDefTerminalsMap, CADSTAR_ARCHIVE_PARSER::TEXT::Mirror, CADSTAR_ARCHIVE_PARSER::OPENSHAPE, CADSTAR_ARCHIVE_PARSER::TEXT::OrientAngle, CADSTAR_ARCHIVE_PARSER::SYMDEF::Origin, CADSTAR_ARCHIVE_PARSER::OUTLINE, PART_NAME_ATTRID, PartNameFieldName, pin, CADSTAR_SCH_ARCHIVE_PARSER::SYMDEF_SCM::PinLabelLocations, CADSTAR_SCH_ARCHIVE_PARSER::SYMDEF_SCM::PinNumberLocations, CADSTAR_ARCHIVE_PARSER::TEXT::Position, CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::Position, RotatePoint(), EDA_SHAPE::SetFillMode(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetMultilineAllowed(), EDA_SHAPE::SetPolyShape(), SCH_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextPos(), SCH_ITEM::SetUnit(), EDA_TEXT::SetVertJustify(), EDA_TEXT::SetVisible(), CADSTAR_ARCHIVE_PARSER::FIGURE::Shape, SIGNALNAME_ORIGIN_ATTRID, CADSTAR_ARCHIVE_PARSER::SOLID, SYMBOL_NAME_ATTRID, CADSTAR_SCH_ARCHIVE_PARSER::LIBRARY_SCM::SymbolDefinitions, CADSTAR_SCH_ARCHIVE_PARSER::SymbolPartNameColor, CADSTAR_SCH_ARCHIVE_PARSER::SYMDEF_SCM::Terminals, CADSTAR_ARCHIVE_PARSER::TEXT::Text, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION::TextCodeID, CADSTAR_ARCHIVE_PARSER::TEXT::TextCodeID, CADSTAR_ARCHIVE_PARSER::SYMDEF::TextLocations, CADSTAR_ARCHIVE_PARSER::SYMDEF::Texts, CADSTAR_ARCHIVE_PARSER::SHAPE::Type, CADSTAR_ARCHIVE_PARSER::SHAPE::Vertices, and wxStringSplit().

Referenced by loadLibPart(), loadSchematicSymbolInstances(), and loadSymbolGateAndPartFields().

◆ loadTexts()

◆ loadTextVariables()

◆ mirrorX()

◆ Parse()

void CADSTAR_SCH_ARCHIVE_PARSER::Parse ( )
inherited

Parses the file.

Exceptions
IO_ERRORif file could not be opened or there was an error while parsing

Definition at line 33 of file cadstar_sch_archive_parser.cpp.

References CADSTAR_SCH_ARCHIVE_PARSER::Assignments, CADSTAR_SCH_ARCHIVE_PARSER::AttrColors, PROGRESS_REPORTER::BeginPhase(), CADSTAR_ARCHIVE_PARSER::checkPoint(), CADSTAR_ARCHIVE_PARSER::PARSER_CONTEXT::CheckPointCallback, CADSTAR_SCH_ARCHIVE_PARSER::Filename, XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetNumberOfStepsForReporting(), CADSTAR_SCH_ARCHIVE_PARSER::Header, CADSTAR_ARCHIVE_PARSER::HUNDREDTH_MICRON, CADSTAR_SCH_ARCHIVE_PARSER::KiCadUnitDivider, CADSTAR_SCH_ARCHIVE_PARSER::Library, CADSTAR_ARCHIVE_PARSER::LoadArchiveFile(), CADSTAR_ARCHIVE_PARSER::m_context, CADSTAR_ARCHIVE_PARSER::m_progressReporter, CADSTAR_SCH_ARCHIVE_PARSER::m_rootNode, CADSTAR_ARCHIVE_PARSER::HEADER::Parse(), CADSTAR_ARCHIVE_PARSER::PARTS::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRCOLORS::Parse(), CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::ASSIGNMENTS_SCM::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::LIBRARY_SCM::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SHEETS::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::Parts, CADSTAR_ARCHIVE_PARSER::HEADER::Resolution, SCH_IU_PER_MM, CADSTAR_SCH_ARCHIVE_PARSER::Schematic, PROGRESS_REPORTER::SetMaxProgress(), CADSTAR_SCH_ARCHIVE_PARSER::Sheets, CADSTAR_SCH_ARCHIVE_PARSER::SymbolPartNameColor, THROW_MISSING_NODE_IO_ERROR, and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by Load(), and LoadPartsLib().

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

◆ ParseTermShapeType()

◆ ParseTextFields()

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

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

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

Definition at line 856 of file cadstar_archive_parser.cpp.

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

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

◆ ParseUnits()

◆ rotate180()

◆ setFootprintOnSymbol()

void CADSTAR_SCH_ARCHIVE_LOADER::setFootprintOnSymbol ( std::unique_ptr< LIB_SYMBOL > &  aKiCadSymbol,
const wxString &  aFootprintName,
const wxString &  aFootprintAlternate 
)
private

◆ SetFpLibName()

void CADSTAR_SCH_ARCHIVE_LOADER::SetFpLibName ( const wxString &  aLibName)
inline

Member Data Documentation

◆ ARC_ACCURACY

const double CADSTAR_SCH_ARCHIVE_LOADER::ARC_ACCURACY = SCH_IU_PER_MM * 0.01

Definition at line 62 of file cadstar_sch_archive_loader.h.

Referenced by loadSymdef().

◆ Assignments

◆ AttrColors

ATTRCOLORS CADSTAR_SCH_ARCHIVE_PARSER::AttrColors
inherited

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

◆ Filename

wxString CADSTAR_SCH_ARCHIVE_PARSER::Filename
inherited

◆ FONT_BOLD

const long CADSTAR_ARCHIVE_PARSER::FONT_BOLD = 700
staticinherited

Definition at line 330 of file cadstar_archive_parser.h.

Referenced by applyTextCodeIfExists().

◆ FONT_NORMAL

const long CADSTAR_ARCHIVE_PARSER::FONT_NORMAL = 400
staticinherited

Definition at line 329 of file cadstar_archive_parser.h.

◆ Header

HEADER CADSTAR_SCH_ARCHIVE_PARSER::Header
inherited

◆ KiCadUnitDivider

int CADSTAR_SCH_ARCHIVE_PARSER::KiCadUnitDivider
inherited

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

Definition at line 462 of file cadstar_sch_archive_parser.h.

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

◆ Library

◆ m_busesMap

std::map<BUS_ID, std::shared_ptr<BUS_ALIAS> > CADSTAR_SCH_ARCHIVE_LOADER::m_busesMap
private

Cadstar->KiCad Buses.

Definition at line 129 of file cadstar_sch_archive_loader.h.

Referenced by loadBusses(), and loadNets().

◆ m_context

◆ m_DefaultSymDefNamesCache

std::map<wxString, SYMDEF_ID> CADSTAR_SCH_ARCHIVE_LOADER::m_DefaultSymDefNamesCache
private

Cache storing symbol names (default alternate) to symdef IDs.

Definition at line 141 of file cadstar_sch_archive_loader.h.

Referenced by getSymDefFromName().

◆ m_designCenter

VECTOR2I CADSTAR_SCH_ARCHIVE_LOADER::m_designCenter
private

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

Definition at line 121 of file cadstar_sch_archive_loader.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER(), getKiCadPoint(), and Load().

◆ m_footprintLibName

wxString CADSTAR_SCH_ARCHIVE_LOADER::m_footprintLibName
private

Name of the footprint library to prepend all footprints with.

Definition at line 115 of file cadstar_sch_archive_loader.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER(), setFootprintOnSymbol(), and SetFpLibName().

◆ m_globalLabelsMap

std::map<SYMBOL_ID, SCH_GLOBALLABEL*> CADSTAR_SCH_ARCHIVE_LOADER::m_globalLabelsMap
private

Cadstar->KiCad Global Labels.

Definition at line 128 of file cadstar_sch_archive_loader.h.

Referenced by loadNets(), and loadSchematicSymbolInstances().

◆ m_loadedSymbols

std::vector<LIB_SYMBOL*> CADSTAR_SCH_ARCHIVE_LOADER::m_loadedSymbols
private

Loaded symbols so far.

Definition at line 150 of file cadstar_sch_archive_loader.h.

Referenced by GetLoadedSymbols(), loadPartsLibrary(), and loadSchematicSymbolInstances().

◆ m_partMap

std::map<PART_ID, LIB_SYMBOL*> CADSTAR_SCH_ARCHIVE_LOADER::m_partMap
private

Cadstar->KiCad Parts.

Definition at line 125 of file cadstar_sch_archive_loader.h.

Referenced by loadPartsLibrary(), and loadSchematicSymbolInstances().

◆ m_partSymbolsMap

std::map<PART_GATE_ID, SYMDEF_ID> CADSTAR_SCH_ARCHIVE_LOADER::m_partSymbolsMap
private

Map holding the symbols loaded so far for a particular PART_ID and GATE_ID.

Definition at line 151 of file cadstar_sch_archive_loader.h.

Referenced by loadPartsLibrary(), and loadSchematicSymbolInstances().

◆ m_pinNumsMap

std::map<PART_ID, TERMINAL_TO_PINNUM_MAP> CADSTAR_SCH_ARCHIVE_LOADER::m_pinNumsMap
private

Cadstar Part->KiCad Pin number map.

Definition at line 130 of file cadstar_sch_archive_loader.h.

Referenced by loadSchematicSymbol(), and loadSymbolGateAndPartFields().

◆ m_powerSymLibMap

std::map<wxString, LIB_SYMBOL*> CADSTAR_SCH_ARCHIVE_LOADER::m_powerSymLibMap
private

NetName->KiCad Power Lib Symbol.

Definition at line 127 of file cadstar_sch_archive_loader.h.

Referenced by loadSchematicSymbolInstances().

◆ m_powerSymMap

std::map<SYMBOL_ID, SCH_SYMBOL*> CADSTAR_SCH_ARCHIVE_LOADER::m_powerSymMap
private

Cadstar->KiCad Power Symbols.

Definition at line 126 of file cadstar_sch_archive_loader.h.

Referenced by loadNets(), and loadSchematicSymbolInstances().

◆ m_progressReporter

◆ m_reporter

◆ m_rootNode

XNODE* CADSTAR_SCH_ARCHIVE_PARSER::m_rootNode
privateinherited

◆ m_rootSheet

SCH_SHEET* CADSTAR_SCH_ARCHIVE_LOADER::m_rootSheet
private

◆ m_schematic

SCHEMATIC* CADSTAR_SCH_ARCHIVE_LOADER::m_schematic
private

◆ m_sheetMap

◆ m_sheetPinMap

std::map<BLOCK_PIN_ID, SCH_HIERLABEL*> CADSTAR_SCH_ARCHIVE_LOADER::m_sheetPinMap
private

Cadstar->KiCad Sheet Pins.

Definition at line 124 of file cadstar_sch_archive_loader.h.

Referenced by loadHierarchicalSheetPins(), and loadNets().

◆ m_symDefMap

std::map<SYMDEF_ID, std::unique_ptr<const LIB_SYMBOL> > CADSTAR_SCH_ARCHIVE_LOADER::m_symDefMap
private

Cadstar->KiCad Lib Symbols loaded so far.

Note that in CADSTAR each symbol represents just a gate, so the LIB_SYMBOLs contained here are not imported directly - they are just an interim step.

Definition at line 148 of file cadstar_sch_archive_loader.h.

Referenced by loadSymdef().

◆ m_SymDefNamesCache

std::map<std::pair<wxString, wxString>, SYMDEF_ID> CADSTAR_SCH_ARCHIVE_LOADER::m_SymDefNamesCache
private

Cache storing symbol names and alternates to symdef IDs.

Definition at line 136 of file cadstar_sch_archive_loader.h.

Referenced by getSymDefFromName().

◆ m_symDefTerminalsMap

std::map<SYMDEF_ID, PINNUM_TO_TERMINAL_MAP> CADSTAR_SCH_ARCHIVE_LOADER::m_symDefTerminalsMap
private

◆ Parts

PARTS CADSTAR_SCH_ARCHIVE_PARSER::Parts
inherited

◆ Schematic

◆ Sheets

◆ SMALL_LABEL_SIZE

const int CADSTAR_SCH_ARCHIVE_LOADER::SMALL_LABEL_SIZE = KiROUND( (double) SCH_IU_PER_MM * 0.4 )

Definition at line 61 of file cadstar_sch_archive_loader.h.

Referenced by loadNets().

◆ SymbolPartNameColor

PARTNAMECOL CADSTAR_SCH_ARCHIVE_PARSER::SymbolPartNameColor
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 CADSTAR_PCB_ARCHIVE_LOADER::applyTextCode(), applyTextCodeIfExists(), and getTextHeightFromTextCode().

◆ UNDEFINED_VALUE


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