KiCad PCB EDA Suite
Loading...
Searching...
No Matches
cadstar_sch_archive_loader.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2020-2021 Roberto Fernandez Bautista <[email protected]>
5 * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
26#ifndef CADSTAR_SCH_ARCHIVE_LOADER_H_
27#define CADSTAR_SCH_ARCHIVE_LOADER_H_
28
30
31#include <layer_ids.h> // SCH_LAYER_ID
32#include <plotters/plotter.h> // LINE_STYLE
33#include <pin_type.h> // ELECTRICAL_PINTYPE
34
35#include <memory>
36#include <map>
37
38#include <wx/filename.h>
39#include <wx/string.h>
40
42class BUS_ALIAS;
43class EDA_TEXT;
44class SPIN_STYLE;
45class LIB_FIELD;
46class LIB_SYMBOL;
47class REPORTER;
48class SCH_SYMBOL;
49class SCH_ITEM;
50class SCH_FIELD;
51class SCH_GLOBALLABEL;
52class SCH_HIERLABEL;
53class SCH_SHEET;
54class SCH_SHEET_PATH;
55class SCH_TEXT;
56class SCHEMATIC;
57
59{
60public:
61 // Size of tiny net labels when none present in original design
62 const int SMALL_LABEL_SIZE = KiROUND( (double) SCH_IU_PER_MM * 0.4 );
63 const double ARC_ACCURACY = SCH_IU_PER_MM * 0.01; // 0.01mm
64
65 explicit CADSTAR_SCH_ARCHIVE_LOADER( wxString aFilename, REPORTER* aReporter,
66 PROGRESS_REPORTER* aProgressReporter ) :
68 {
69 m_schematic = nullptr;
70 m_rootSheet = nullptr;
71 m_designCenter.x = 0;
72 m_designCenter.y = 0;
73 m_reporter = aReporter;
74 m_progressReporter = aProgressReporter;
75
76 // Assume that the PCB footprint library name will be the same as the schematic filename
77 wxFileName schFilename( Filename );
78 m_footprintLibName = schFilename.GetName();
79 }
80
81
83 {
84 }
85
86 std::vector<LIB_SYMBOL*> LoadPartsLib( const wxString& aFilename );
87
88 const std::vector<LIB_SYMBOL*>& GetLoadedSymbols() const { return m_loadedSymbols; }
89
90 void SetFpLibName( const wxString& aLibName ) { m_footprintLibName = aLibName; };
91
92
98 void Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSheet );
99
100
101private:
102 typedef std::pair<BLOCK_ID, TERMINAL_ID> BLOCK_PIN_ID;
103 typedef std::pair<PART_ID, GATE_ID> PART_GATE_ID;
104
109 typedef std::map<TERMINAL_ID, wxString> TERMINAL_TO_PINNUM_MAP;
110
111 typedef std::map<wxString, TERMINAL_ID> PINNUM_TO_TERMINAL_MAP;
112
117
123
124 std::map<LAYER_ID, SCH_SHEET*> m_sheetMap;
125 std::map<BLOCK_PIN_ID, SCH_HIERLABEL*> m_sheetPinMap;
126 std::map<PART_ID, LIB_SYMBOL*> m_partMap;
127 std::map<SYMBOL_ID, SCH_SYMBOL*> m_powerSymMap;
128 std::map<wxString, LIB_SYMBOL*> m_powerSymLibMap;
129 std::map<SYMBOL_ID, SCH_GLOBALLABEL*> m_globalLabelsMap;
130 std::map<BUS_ID, std::shared_ptr<BUS_ALIAS>> m_busesMap;
131 std::map<PART_ID, TERMINAL_TO_PINNUM_MAP> m_pinNumsMap;
132 std::map<SYMDEF_ID, PINNUM_TO_TERMINAL_MAP> m_symDefTerminalsMap;
133
137 std::map<std::pair<wxString, wxString>, SYMDEF_ID> m_SymDefNamesCache;
138
142 std::map<wxString, SYMDEF_ID> m_DefaultSymDefNamesCache;
143
149 std::map<SYMDEF_ID, std::unique_ptr<const LIB_SYMBOL>> m_symDefMap;
150
151 std::vector<LIB_SYMBOL*> m_loadedSymbols;
152 std::map<PART_GATE_ID, SYMDEF_ID> m_partSymbolsMap;
154
155 void loadSheets();
157 void loadPartsLibrary();
159 void loadBusses();
160 void loadNets();
161 void loadFigures();
162 void loadTexts();
164 void loadTextVariables();
165
166 std::unique_ptr<LIB_SYMBOL> loadLibPart( const CADSTAR_PART_ENTRY& aPart );
167
168 void copySymbolItems( std::unique_ptr<LIB_SYMBOL>& aSourceSym,
169 std::unique_ptr<LIB_SYMBOL>& aDestSym, int aDestUnit,
170 bool aOverrideFields = true );
171
172 //Helper Functions for loading sheets
173 void loadSheetAndChildSheets( LAYER_ID aCadstarSheetID, const VECTOR2I& aPosition,
174 VECTOR2I aSheetSize, const SCH_SHEET_PATH& aParentSheet );
175
176 void loadChildSheets( LAYER_ID aCadstarSheetID, const SCH_SHEET_PATH& aSheet );
177
178 std::vector<LAYER_ID> findOrphanSheets();
179
180 int getSheetNumber( LAYER_ID aCadstarSheetID );
181
182 void loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetID, SCH_ITEM* aItem );
183
184 //Helper Functions for loading library items
185 const LIB_SYMBOL* loadSymdef( const SYMDEF_ID& aSymdefID );
186
187 void loadSymbolGateAndPartFields( const SYMDEF_ID& aSymdefID, const PART& aCadstarPart,
188 const GATE_ID& aGateID, LIB_SYMBOL* aSymbol );
189
190 void setFootprintOnSymbol( std::unique_ptr<LIB_SYMBOL>& aKiCadSymbol,
191 const wxString& aFootprintName,
192 const wxString& aFootprintAlternate );
193
194 void loadLibrarySymbolShapeVertices( const std::vector<VERTEX>& aCadstarVertices,
195 VECTOR2I aSymbolOrigin, LIB_SYMBOL* aSymbol,
196 int aGateNumber, int aLineThickness );
197
198 void applyToLibraryFieldAttribute( const ATTRIBUTE_LOCATION& aCadstarAttrLoc,
199 VECTOR2I aSymbolOrigin, LIB_FIELD* aKiCadField );
200
201 //Helper Functions for loading symbols in schematic
202 SCH_SYMBOL* loadSchematicSymbol( const SYMBOL& aCadstarSymbol, const LIB_SYMBOL& aKiCadPart,
203 EDA_ANGLE& aComponentOrientation );
204
205
206 void loadSymbolFieldAttribute( const ATTRIBUTE_LOCATION& aCadstarAttrLoc,
207 const EDA_ANGLE& aComponentOrientation, bool aIsMirrored,
208 SCH_FIELD* aKiCadField );
209
210 int getComponentOrientation( const EDA_ANGLE& aOrientAngle, EDA_ANGLE& aReturnedOrientation );
211
212 //Helper functions for loading nets
213 POINT getLocationOfNetElement( const NET_SCH& aNet, const NETELEMENT_ID& aNetElementID );
214
215 wxString getNetName( const NET_SCH& aNet );
216
217 //Helper functions for loading figures / graphical items
218 void loadShapeVertices( const std::vector<VERTEX>& aCadstarVertices,
219 LINECODE_ID aCadstarLineCodeID, LAYER_ID aCadstarSheetID,
220 SCH_LAYER_ID aKiCadSchLayerID, const VECTOR2I& aMoveVector = { 0, 0 },
221 const EDA_ANGLE& aRotation = ANGLE_0,
222 const double& aScalingFactor = 1.0,
223 const VECTOR2I& aTransformCentre = { 0, 0 },
224 const bool& aMirrorInvert = false );
225
226 void loadFigure( const FIGURE& aCadstarFigure, const LAYER_ID& aCadstarSheetIDOverride,
227 SCH_LAYER_ID aKiCadSchLayerID, const VECTOR2I& aMoveVector = { 0, 0 },
228 const EDA_ANGLE& aRotation = ANGLE_0, const double& aScalingFactor = 1.0,
229 const VECTOR2I& aTransformCentre = { 0, 0 },
230 const bool& aMirrorInvert = false );
231
232 //Helper functions for loading text elements
233 void applyTextCodeIfExists( EDA_TEXT* aKiCadTextItem, const TEXTCODE_ID& aCadstarTextCodeID );
234
235 void applyTextSettings( EDA_TEXT* aKiCadTextItem,
236 const TEXTCODE_ID& aCadstarTextCodeID,
237 const ALIGNMENT& aCadstarAlignment,
238 const JUSTIFICATION& aCadstarJustification,
239 const long long aCadstarOrientAngle = 0,
240 bool aMirrored = false );
241
242 SCH_TEXT* getKiCadSchText( const TEXT& aCadstarTextElement );
243
244
245 //Helper Functions for obtaining CADSTAR elements from the parsed structures
246 SYMDEF_ID getSymDefFromName( const wxString& aSymdefName, const wxString& aSymDefAlternate );
247 bool isAttributeVisible( const ATTRIBUTE_ID& aCadstarAttributeID );
248
249 int getLineThickness( const LINECODE_ID& aCadstarLineCodeID );
250 LINE_STYLE getLineStyle( const LINECODE_ID& aCadstarLineCodeID );
251 PART getPart( const PART_ID& aCadstarPartID );
252 ROUTECODE getRouteCode( const ROUTECODE_ID& aCadstarRouteCodeID );
253 TEXTCODE getTextCode( const TEXTCODE_ID& aCadstarTextCodeID );
254 int getTextHeightFromTextCode( const TEXTCODE_ID& aCadstarTextCodeID );
255 wxString getAttributeName( const ATTRIBUTE_ID& aCadstarAttributeID );
256
257 PART::DEFINITION::PIN getPartDefinitionPin( const PART& aCadstarPart, const GATE_ID& aGateID,
258 const TERMINAL_ID& aTerminalID );
259
260 //Helper Functions for obtaining individual elements as KiCad elements:
262
263 int getKiCadUnitNumberFromGate( const GATE_ID& aCadstarGateID );
264 SPIN_STYLE getSpinStyle( const long long& aCadstarOrientation, bool aMirror );
265 SPIN_STYLE getSpinStyle( const EDA_ANGLE& aOrientation );
266 ALIGNMENT mirrorX( const ALIGNMENT& aCadstarAlignment );
267 ALIGNMENT rotate180( const ALIGNMENT& aCadstarAlignment );
268
269 //General Graphical manipulation functions
270
271 LIB_SYMBOL* getScaledLibPart( const LIB_SYMBOL* aSymbol, long long aScalingFactorNumerator,
272 long long aScalingFactorDenominator );
273
274 void fixUpLibraryPins( LIB_SYMBOL* aSymbolToFix, int aGateNumber );
275
276 std::pair<VECTOR2I, VECTOR2I> getFigureExtentsKiCad( const FIGURE& aCadstarFigure );
277
278 VECTOR2I getKiCadPoint( const VECTOR2I& aCadstarPoint );
279
280 VECTOR2I getKiCadLibraryPoint( const VECTOR2I& aCadstarPoint, const VECTOR2I& aCadstarCentre );
281
282 VECTOR2I applyTransform( const VECTOR2I& aPoint, const VECTOR2I& aMoveVector = { 0, 0 },
283 const EDA_ANGLE& aRotation = ANGLE_0,
284 const double& aScalingFactor = 1.0,
285 const VECTOR2I& aTransformCentre = { 0, 0 },
286 const bool& aMirrorInvert = false );
287
288 void checkDesignLimits();
289
290 int getKiCadLength( long long aCadstarLength )
291 {
292 int mod = aCadstarLength % KiCadUnitDivider;
293 int absmod = sign( mod ) * mod;
294 int offset = 0;
295
296 // Round half-way cases away from zero
297 if( absmod >= KiCadUnitDivider / 2 )
298 offset = sign( aCadstarLength );
299
300 return ( aCadstarLength / KiCadUnitDivider ) + offset;
301 }
302
303 EDA_ANGLE getAngle( const long long& aCadstarAngle )
304 {
305 // CADSTAR v6 (which outputted Schematic Format Version 8) and earlier used 1/10 degree
306 // as the unit for angles/orientations. It is assumed that CADSTAR version 7 (i.e. Schematic
307 // Format Version 9 and later) is the version that introduced 1/1000 degree for angles.
308 if( Header.Format.Version > 8 )
309 {
310 return EDA_ANGLE( (double) aCadstarAngle / 1000.0, DEGREES_T );
311 }
312 else
313 {
314 return EDA_ANGLE( (double) aCadstarAngle, TENTHS_OF_A_DEGREE_T );
315 }
316 }
317
318 long long getCadstarAngle( const EDA_ANGLE& aAngle )
319 {
320 // CADSTAR v6 (which outputted Schematic Format Version 8) and earlier used 1/10 degree
321 // as the unit for angles/orientations. It is assumed that CADSTAR version 7 (i.e. Schematic
322 // Format Version 9 and later) is the version that introduced 1/1000 degree for angles.
323 if( Header.Format.Version > 8 )
324 {
325 return KiROUND( aAngle.AsDegrees() * 1000.0 );
326 }
327 else
328 {
329 return aAngle.AsTenthsOfADegree();
330 }
331 }
332
338 double getPolarRadius( const VECTOR2I& aPoint );
339
340
341 static LIB_FIELD* addNewFieldToSymbol( const wxString& aFieldName,
342 std::unique_ptr<LIB_SYMBOL>& aKiCadSymbol );
343
344}; // CADSTAR_SCH_ARCHIVE_LOADER
345
346
347#endif // CADSTAR_SCH_ARCHIVE_LOADER_H_
constexpr double SCH_IU_PER_MM
Definition: base_units.h:73
CADSTAR_PIN_TYPE
file: cadstar_archive_objects.h Contains common object definitions
long TERMINAL_ID
Terminal is the pin identifier in the schematic.
ALIGNMENT
From CADSTAR Help: "Text Alignment enables you to define the position of an alignment origin for all ...
wxString LAYER_ID
ID of a Sheet (if schematic) or board Layer (if PCB)
JUSTIFICATION
From CADSTAR Help: "Multi Line Text can also be justified as Left, Centre or Right.
PROGRESS_REPORTER * m_progressReporter
const std::vector< LIB_SYMBOL * > & GetLoadedSymbols() const
void Load(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet)
Loads a CADSTAR Schematic Archive file into the KiCad SCHEMATIC object given.
ROUTECODE getRouteCode(const ROUTECODE_ID &aCadstarRouteCodeID)
std::map< BLOCK_PIN_ID, SCH_HIERLABEL * > m_sheetPinMap
Cadstar->KiCad Sheet Pins.
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)
std::map< SYMBOL_ID, SCH_GLOBALLABEL * > m_globalLabelsMap
Cadstar->KiCad Global Labels.
SCH_SYMBOL * loadSchematicSymbol(const SYMBOL &aCadstarSymbol, const LIB_SYMBOL &aKiCadPart, EDA_ANGLE &aComponentOrientation)
void applyTextSettings(EDA_TEXT *aKiCadTextItem, const TEXTCODE_ID &aCadstarTextCodeID, const ALIGNMENT &aCadstarAlignment, const JUSTIFICATION &aCadstarJustification, const long long aCadstarOrientAngle=0, bool aMirrored=false)
wxString getAttributeName(const ATTRIBUTE_ID &aCadstarAttributeID)
std::vector< LIB_SYMBOL * > m_loadedSymbols
Loaded symbols so far.
PART getPart(const PART_ID &aCadstarPartID)
static LIB_FIELD * addNewFieldToSymbol(const wxString &aFieldName, std::unique_ptr< LIB_SYMBOL > &aKiCadSymbol)
std::vector< LAYER_ID > findOrphanSheets()
std::map< BUS_ID, std::shared_ptr< BUS_ALIAS > > m_busesMap
Cadstar->KiCad Buses.
int getSheetNumber(LAYER_ID aCadstarSheetID)
SCH_TEXT * getKiCadSchText(const TEXT &aCadstarTextElement)
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...
wxString getNetName(const NET_SCH &aNet)
std::pair< BLOCK_ID, TERMINAL_ID > BLOCK_PIN_ID
std::map< SYMBOL_ID, SCH_SYMBOL * > m_powerSymMap
Cadstar->KiCad Power Symbols.
std::pair< PART_ID, GATE_ID > PART_GATE_ID
void loadLibrarySymbolShapeVertices(const std::vector< VERTEX > &aCadstarVertices, VECTOR2I aSymbolOrigin, LIB_SYMBOL *aSymbol, int aGateNumber, int aLineThickness)
VECTOR2I getKiCadLibraryPoint(const VECTOR2I &aCadstarPoint, const VECTOR2I &aCadstarCentre)
PART::DEFINITION::PIN getPartDefinitionPin(const PART &aCadstarPart, const GATE_ID &aGateID, const TERMINAL_ID &aTerminalID)
std::map< wxString, TERMINAL_ID > PINNUM_TO_TERMINAL_MAP
std::map< SYMDEF_ID, PINNUM_TO_TERMINAL_MAP > m_symDefTerminalsMap
int getTextHeightFromTextCode(const TEXTCODE_ID &aCadstarTextCodeID)
double getPolarRadius(const VECTOR2I &aPoint)
void setFootprintOnSymbol(std::unique_ptr< LIB_SYMBOL > &aKiCadSymbol, const wxString &aFootprintName, const wxString &aFootprintAlternate)
void applyTextCodeIfExists(EDA_TEXT *aKiCadTextItem, const TEXTCODE_ID &aCadstarTextCodeID)
CADSTAR_SCH_ARCHIVE_LOADER(wxString aFilename, REPORTER *aReporter, PROGRESS_REPORTER *aProgressReporter)
void copySymbolItems(std::unique_ptr< LIB_SYMBOL > &aSourceSym, std::unique_ptr< LIB_SYMBOL > &aDestSym, int aDestUnit, bool aOverrideFields=true)
int getLineThickness(const LINECODE_ID &aCadstarLineCodeID)
TEXTCODE getTextCode(const TEXTCODE_ID &aCadstarTextCodeID)
SPIN_STYLE getSpinStyle(const long long &aCadstarOrientation, bool aMirror)
std::map< wxString, LIB_SYMBOL * > m_powerSymLibMap
NetName->KiCad Power Lib Symbol.
std::map< std::pair< wxString, wxString >, SYMDEF_ID > m_SymDefNamesCache
Cache storing symbol names and alternates to symdef IDs.
std::map< PART_ID, TERMINAL_TO_PINNUM_MAP > m_pinNumsMap
Cadstar Part->KiCad Pin number map.
void loadSheetAndChildSheets(LAYER_ID aCadstarSheetID, const VECTOR2I &aPosition, VECTOR2I aSheetSize, const SCH_SHEET_PATH &aParentSheet)
std::vector< LIB_SYMBOL * > LoadPartsLib(const wxString &aFilename)
ELECTRICAL_PINTYPE getKiCadPinType(const CADSTAR_PIN_TYPE &aPinType)
wxString m_footprintLibName
Name of the footprint library to prepend all footprints with.
void loadItemOntoKiCadSheet(LAYER_ID aCadstarSheetID, SCH_ITEM *aItem)
int getKiCadLength(long long aCadstarLength)
std::map< PART_ID, LIB_SYMBOL * > m_partMap
Cadstar->KiCad Parts.
bool isAttributeVisible(const ATTRIBUTE_ID &aCadstarAttributeID)
VECTOR2I getKiCadPoint(const VECTOR2I &aCadstarPoint)
EDA_ANGLE getAngle(const long long &aCadstarAngle)
std::map< wxString, SYMDEF_ID > m_DefaultSymDefNamesCache
Cache storing symbol names (default alternate) to symdef IDs.
void loadSymbolGateAndPartFields(const SYMDEF_ID &aSymdefID, const PART &aCadstarPart, const GATE_ID &aGateID, LIB_SYMBOL *aSymbol)
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)
std::map< PART_GATE_ID, SYMDEF_ID > m_partSymbolsMap
Map holding the symbols loaded so far for a particular PART_ID and GATE_ID.
void applyToLibraryFieldAttribute(const ATTRIBUTE_LOCATION &aCadstarAttrLoc, VECTOR2I aSymbolOrigin, LIB_FIELD *aKiCadField)
LIB_SYMBOL * getScaledLibPart(const LIB_SYMBOL *aSymbol, long long aScalingFactorNumerator, long long aScalingFactorDenominator)
SYMDEF_ID getSymDefFromName(const wxString &aSymdefName, const wxString &aSymDefAlternate)
std::pair< VECTOR2I, VECTOR2I > getFigureExtentsKiCad(const FIGURE &aCadstarFigure)
std::map< LAYER_ID, SCH_SHEET * > m_sheetMap
Cadstar->KiCad Sheets.
POINT getLocationOfNetElement(const NET_SCH &aNet, const NETELEMENT_ID &aNetElementID)
void fixUpLibraryPins(LIB_SYMBOL *aSymbolToFix, int aGateNumber)
std::map< SYMDEF_ID, std::unique_ptr< const LIB_SYMBOL > > m_symDefMap
Cadstar->KiCad Lib Symbols loaded so far.
std::unique_ptr< LIB_SYMBOL > loadLibPart(const CADSTAR_PART_ENTRY &aPart)
ALIGNMENT rotate180(const ALIGNMENT &aCadstarAlignment)
void SetFpLibName(const wxString &aLibName)
long long getCadstarAngle(const EDA_ANGLE &aAngle)
LINE_STYLE getLineStyle(const LINECODE_ID &aCadstarLineCodeID)
void loadChildSheets(LAYER_ID aCadstarSheetID, const SCH_SHEET_PATH &aSheet)
VECTOR2I m_designCenter
Required for calculating the offset to apply to the Cadstar design so that it fits in the KiCad canva...
ALIGNMENT mirrorX(const ALIGNMENT &aCadstarAlignment)
int getComponentOrientation(const EDA_ANGLE &aOrientAngle, EDA_ANGLE &aReturnedOrientation)
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)
const LIB_SYMBOL * loadSymdef(const SYMDEF_ID &aSymdefID)
int getKiCadUnitNumberFromGate(const GATE_ID &aCadstarGateID)
void loadSymbolFieldAttribute(const ATTRIBUTE_LOCATION &aCadstarAttrLoc, const EDA_ANGLE &aComponentOrientation, bool aIsMirrored, SCH_FIELD *aKiCadField)
Represents a CADSTAR Schematic Archive (*.csa) file.
int KiCadUnitDivider
Use this value to convert units in this CSA file to KiCad units.
int AsTenthsOfADegree() const
Definition: eda_angle.h:157
double AsDegrees() const
Definition: eda_angle.h:155
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:80
Field object used in symbol libraries.
Definition: lib_field.h:62
Define a library symbol object.
Definition: lib_symbol.h:99
A progress reporter interface for use in multi-threaded environments.
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
Holds all the data relating to one schematic.
Definition: schematic.h:75
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
Definition: sch_field.h:52
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:165
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:57
Schematic symbol object.
Definition: sch_symbol.h:109
static constexpr EDA_ANGLE ANGLE_0
Definition: eda_angle.h:435
@ TENTHS_OF_A_DEGREE_T
Definition: eda_angle.h:30
@ DEGREES_T
Definition: eda_angle.h:31
SCH_LAYER_ID
Eeschema drawing layers.
Definition: layer_ids.h:352
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition: pin_type.h:36
LINE_STYLE
Dashed line types.
Definition: stroke_params.h:48
long Version
Archive version number (e.g.
Represents a point in x,y coordinates.
int sign(T val)
Definition: util.h:135
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:85