38#include <wx/filename.h>
39#include <wx/strconv.h>
43 std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs,
44 const std::vector<wxString>& aAsyFileNames )
50 bbox.
Merge( asc.BoundingBox );
58 int margin =
grid * 10;
62 if( bbox.
GetWidth() > pageSize.
x - margin )
78 projectPath = schematic->Project().GetProjectPath();
80 if( !projectPath.IsEmpty() )
82 wxFileName cmpDir(
m_lt_schematic->GetLTspiceDataDir().GetFullPath(), wxEmptyString );
83 cmpDir.AppendDir( wxS(
"cmp" ) );
85 wxFileName outDir( projectPath, wxEmptyString );
86 outDir.AppendDir( wxS(
"ltspice_cmp" ) );
87 outDir.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL );
89 for(
const wxString&
name :
90 { wxS(
"standard.dio" ), wxS(
"standard.bjt" ), wxS(
"standard.jft" ), wxS(
"standard.mos" ) } )
92 includeText << wxS(
".include ltspice_cmp/" ) <<
name << wxS(
"\n" );
94 wxFileName src = cmpDir;
95 src.SetFullName(
name );
97 if( !src.FileExists() )
100 wxFileName dst = outDir;
101 dst.SetFullName(
name );
103 if( dst.FileExists() )
106 wxFFile in( src.GetFullPath(), wxS(
"rb" ) );
111 wxFileOffset len = in.Length();
116 wxMemoryBuffer buffer(
static_cast<size_t>( len ) );
117 void* writePtr = buffer.GetWriteBuf(
static_cast<size_t>( len ) );
119 if( !writePtr || in.Read( writePtr, len ) !=
static_cast<size_t>( len ) )
122 buffer.UngetWriteBuf(
static_cast<size_t>( len ) );
124 const char* data =
static_cast<const char*
>( buffer.GetData() );
128 if( len >= 4 && ( len % 2 ) == 0 && data[1] == 0 && data[3] == 0 )
129 text = wxString( data, wxMBConvUTF16LE(), len );
131 text = wxString::FromUTF8( data, len );
134 text = wxString( data, wxCSConv( wxFONTENCODING_CP1252 ), len );
136 wxFFile out( dst.GetFullPath(), wxS(
"wb" ) );
138 if( !out.IsOpened() )
141 out.Write(
text, wxConvUTF8 );
145 if( !includeText.IsEmpty() )
189 std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs,
190 const std::vector<wxString>& aAsyFiles )
194 std::vector<LTSPICE_SCHEMATIC::LT_SYMBOL> symbols = lt_asc.Symbols;
195 std::map<wxString, LIB_SYMBOL*> existingSymbol;
196 std::map<wxString, SCH_SYMBOL*> existingSchematicSymbol;
204 if( existingSymbol.count( lt_symbol.Name ) == 0 )
206 lib_symbol =
new LIB_SYMBOL( lt_symbol.Name );
210 existingSymbol.emplace( lt_symbol.Name, lib_symbol );
214 lib_symbol = existingSymbol[lt_symbol.Name];
217 LIB_ID libId( wxS(
"ltspice" ), lt_symbol.Name );
222 for(
int j = 0; j < (int) lt_symbol.Wires.size(); j++ )
232 for(
int j = 0; j < (int) lt_symbol.Lines.size(); j++ )
235 for(
int j = 0; j < (int) lt_symbol.Circles.size(); j++ )
238 for(
int j = 0; j < (int) lt_symbol.Arcs.size(); j++ )
241 for(
int j = 0; j < (int) lt_symbol.Rectangles.size(); j++ )
248 LTSPICE_FILE tempAsyFile( lt_symbol.Name +
".asy", { 0, 0 } );
251 tempSymbol =
m_lt_schematic->SymbolBuilder( lt_symbol.Name, dummyAsc );
260 int botRightX = lt_symbol.Offset.x
263 int botRightY = lt_symbol.Offset.y
273 if( wire.
Start == ( pinPos + lt_symbol.Offset ) )
276 if( wire.
End.
x == ( pinPos + lt_symbol.Offset ).x )
278 if( wire.
End.
y <= topLeftY )
280 else if( wire.
End.
y >= botRightY )
282 else if( wire.
End.
y < botRightY && wire.
End.
y > topLeftY )
286 else if( wire.
End.
y == ( pinPos + lt_symbol.Offset ).y )
288 if( wire.
End.
x <= topLeftX )
290 else if( wire.
End.
x >= botRightX )
292 else if( wire.
End.
x < botRightX && wire.
End.
x > topLeftX )
296 else if( wire.
End == ( pinPos + lt_symbol.Offset ) )
299 if( wire.
Start.
x == ( pinPos + lt_symbol.Offset ).x )
301 if( wire.
Start.
y <= topLeftY )
303 else if( wire.
Start.
y > botRightY )
305 else if( wire.
Start.
y < botRightY && wire.
End.
y > topLeftY )
309 else if( wire.
Start.
y == ( pinPos + lt_symbol.Offset ).y )
311 if( wire.
Start.
x <= topLeftX )
313 else if( wire.
Start.
x >= botRightX )
315 else if( wire.
Start.
x < botRightX && wire.
Start.
x > topLeftX )
330 for(
int j = 0; j < (int) aLtSymbol.
Lines.size(); j++ )
338 for(
int j = 0; j < (int) aLtSymbol.
Circles.size(); j++ )
346 for(
int j = 0; j < (int) aLtSymbol.
Arcs.size(); j++ )
354 for(
int j = 0; j < (int) aLtSymbol.
Rectangles.size(); j++ )
362 for(
int j = 0; j < (int) aLtSymbol.
Pins.size(); j++ )
394 if( aLTFontSize == 1 )
return MILS_SIZE( 36 );
395 else if( aLTFontSize == 2 )
return MILS_SIZE( 42 );
396 else if( aLTFontSize == 3 )
return MILS_SIZE( 50 );
397 else if( aLTFontSize == 4 )
return MILS_SIZE( 60 );
398 else if( aLTFontSize == 5 )
return MILS_SIZE( 72 );
399 else if( aLTFontSize == 6 )
return MILS_SIZE( 88 );
400 else if( aLTFontSize == 7 )
return MILS_SIZE( 108 );
505 std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs )
511 for(
int j = 0; j < (int) lt_asc.Lines.size(); j++ )
514 for(
int j = 0; j < (int) lt_asc.Circles.size(); j++ )
517 for(
int j = 0; j < (int) lt_asc.Arcs.size(); j++ )
520 for(
int j = 0; j < (int) lt_asc.Rectangles.size(); j++ )
523 for(
int j = 0; j < (int) lt_asc.Bustap.size(); j++ )
545 for(
int j = 0; j < (int) lt_asc.Wires.size(); j++ )
548 for(
int j = 0; j < (int) lt_asc.Iopins.size(); j++ )
553 if( lt_flag.
Value == wxS(
"0" ) )
556 aSheet, lt_asc.Wires ) );
574 lt_flag.Expression, lt_flag.
FontSize, lt_asc.Wires ) );
585 for(
int k = 0; k < (int) aAscfile.
Wires.size(); k++ )
587 if( ( aAscfile.
Wires[k].Start == bustap.
Start )
588 || ( aAscfile.
Wires[k].End == bustap.
Start ) )
591 aAscfile.
Wires.erase( aAscfile.
Wires.begin() + k );
596 bustap.
Start.
y - 16 } ) );
621 for(
unsigned int k = 0; k < aAscfile.
Flags.size(); k++ )
626 ioPinName = aAscfile.
Flags[k].Value;
627 aAscfile.
Flags.erase( aAscfile.
Flags.begin() + k );
739 switch( aJustification )
778 switch( aJustification )
800 if( wxSplit( aText->
GetText(),
'\n',
'\0' ).size() > 1 )
802 switch( aJustification )
858 const wxString& aValue,
860 std::vector<LTSPICE_SCHEMATIC::WIRE>& aWires )
886 LIB_ID libId( wxS(
"ltspice" ), wxS(
"GND" ) );
899 if( aOffset == wire.Start )
901 if( wire.Start.x == wire.End.x )
903 if( wire.Start.y < wire.End.y )
911 if( wire.Start.x < wire.End.x )
913 else if( wire.Start.x > wire.End.x )
917 else if( aOffset == wire.End )
919 if( wire.Start.x == wire.End.x )
921 if( wire.Start.y > wire.End.y )
929 if( wire.Start.x < wire.End.x )
931 else if( wire.Start.x > wire.End.x )
943 const wxString& aValue,
int aFontSize,
944 std::vector<LTSPICE_SCHEMATIC::WIRE>& aWires )
972 UNIMPLEMENTED_FOR( wxString::Format( wxT(
"Type not supported %d" ), (
int)aType ) );
981 std::vector<SPIN_STYLE> preferredSpins;
985 if( aOffset == wire.Start )
987 if( wire.Start.x == wire.End.x )
989 if( wire.Start.y < wire.End.y )
991 else if( wire.Start.y > wire.End.y )
996 if( wire.Start.x < wire.End.x )
998 else if( wire.Start.x > wire.End.x )
1002 else if( aOffset == wire.End )
1004 if( wire.Start.x == wire.End.x )
1006 if( wire.Start.y > wire.End.y )
1008 else if( wire.Start.y < wire.End.y )
1013 if( wire.Start.x > wire.End.x )
1015 else if( wire.Start.x < wire.End.x )
1021 if( preferredSpins.size() == 1 )
1031 wxString symbolName = aLTSymbol.
Name.Upper();
1032 wxString type = aLTSymbol.
SymAttributes[wxS(
"TYPE" )].Upper();
1033 wxString prefix = aLTSymbol.
SymAttributes[wxS(
"PREFIX" )].Upper();
1034 wxString instName = aLTSymbol.
SymAttributes[wxS(
"INSTNAME" )].Upper();
1038 if( value.IsEmpty() )
1041 value2 = wxEmptyString;
1045 [&](
const wxString& aFieldName,
const wxString& aFieldValue )
1049 newField.
SetText( aFieldValue );
1053 aSymbol->
SetRef( aSheet, instName );
1056 if( !value2.IsEmpty() )
1057 addField( wxS(
"Value2" ), value2 );
1059 auto setupNonInferredPassive =
1060 [&](
const wxString& aDevice,
const wxString& aValueKey )
1062 addField( wxS(
"Sim.Device" ), aDevice );
1063 addField( wxS(
"Sim.Params" ), aValueKey + wxS(
"=${VALUE}" ) );
1066 auto setupBehavioral =
1067 [&](
const wxString& aDevice,
const wxString& aType )
1071 addField( wxS(
"Sim.Device" ), aDevice );
1072 addField( wxS(
"Sim.Type" ), aType );
1073 addField( wxS(
"Sim.Params" ), value );
1076 static const std::set<wxString> prefixWithGain = { wxS(
"E" ), wxS(
"F" ), wxS(
"G" ), wxS(
"H" ) };
1078 if( prefix == wxS(
"R" ) )
1080 setupNonInferredPassive( prefix, wxS(
"R" ) );
1082 else if( prefix == wxS(
"C" ) )
1084 setupNonInferredPassive( prefix, wxS(
"C" ) );
1086 else if( prefix == wxS(
"L" ) )
1088 setupNonInferredPassive( prefix, wxS(
"L" ) );
1090 else if( prefixWithGain.count( prefix ) > 0 )
1092 setupNonInferredPassive( prefix, wxS(
"gain" ) );
1094 else if( prefix == wxS(
"B" ) )
1096 if( symbolName.StartsWith( wxS(
"BV" ) ) )
1097 setupBehavioral( wxS(
"V" ), wxS(
"=" ) );
1098 else if( symbolName.StartsWith( wxS(
"BI" ) ) )
1099 setupBehavioral( wxS(
"I" ), wxS(
"=" ) );
1101 else if( prefix == wxS(
"T" ) )
1105 addField( wxS(
"Sim.Device" ), wxS(
"TLINE" ) );
1106 addField( wxS(
"Sim.Params" ), value );
1108 else if( prefix == wxS(
"V" ) || symbolName == wxS(
"I" ) )
1110 addField( wxS(
"Sim.Device" ), wxS(
"SPICE" ) );
1113 simParams <<
"type=" <<
'"' << prefix <<
'"' <<
' ';
1115 if( value2.IsEmpty() )
1116 simParams <<
"model=" <<
'"' <<
"${VALUE}" <<
'"' <<
' ';
1118 simParams <<
"model=" <<
'"' <<
"${VALUE} ${VALUE2}" <<
'"' <<
' ';
1120 addField( wxS(
"Sim.Params" ), simParams );
1124 wxString libFile = aLTSymbol.
SymAttributes[wxS(
"MODELFILE" )];
1126 if( prefix == wxS(
"X" ) )
1131 else if( libFile.IsEmpty() )
1133 if( type.IsEmpty() )
1137 if( !libFile.IsEmpty() )
1139 addField( wxS(
"Sim.Library" ), libFile );
1140 addField( wxS(
"Sim.Name" ), symbolName );
1143 wxString spiceLine = aLTSymbol.
SymAttributes[wxS(
"SPICELINE" )];
1145 if( type == wxS(
"X" ) )
1147 addField( wxS(
"Sim.Device" ), wxS(
"SUBCKT" ) );
1149 if( !spiceLine.IsEmpty() )
1150 addField( wxS(
"Sim.Params" ), spiceLine );
1154 addField( wxS(
"Sim.Device" ), wxS(
"SPICE" ) );
1156 if( !spiceLine.IsEmpty() )
1157 addField( wxS(
"Sim.Params" ), spiceLine );
1159 addField( wxS(
"Sim.Params" ),
"model=\"" + value +
"\"" );
1183 case 38: field = aSymbol->
GetField( wxS(
"Sim.Name" ) );
break;
1184 case 39: field = aSymbol->
GetField( wxS(
"Sim.Params" ) );
break;
1307 if( aLTSymbol.
SymAttributes[wxS(
"Prefix" )] == wxS(
"X" ) )
1333 wxString device = aLTSymbol.
Name.Lower();
1335 if( aLTSymbol.
Pins.size() == 2 && ( device == wxS(
"res" )
1336 || device == wxS(
"cap" )
1337 || device == wxS(
"ind" ) ) )
1350 aPin->
SetNumber( wxString::Format( wxS(
"%d" ), aIndex + 1 ) );
constexpr EDA_IU_SCALE schIUScale
constexpr void SetOrigin(const Vec &pos)
constexpr size_type GetWidth() const
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
constexpr const Vec GetCenter() const
constexpr void SetSize(const SizeVec &size)
constexpr size_type GetHeight() const
constexpr coord_type GetLeft() const
constexpr const Vec & GetOrigin() const
constexpr const SizeVec & GetSize() const
constexpr coord_type GetTop() const
constexpr void Offset(coord_type dx, coord_type dy)
virtual void SetEnd(const VECTOR2I &aEnd)
void SetCenter(const VECTOR2I &aCenter)
void SetFillMode(FILL_T aFill)
virtual void SetStart(const VECTOR2I &aStart)
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
virtual void SetTextSize(VECTOR2I aNewSize, bool aEnforceMinTextSize=true)
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual int GetTextHeight() const
void SetVertJustify(GR_TEXT_V_ALIGN_T aType)
virtual void Offset(const VECTOR2I &aOffset)
virtual void SetVisible(bool aVisible)
virtual void SetText(const wxString &aText)
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
void SetMultilineAllowed(bool aAllow)
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
A logical library item identifier and consists of various portions much like a URI.
Define a library symbol object.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
POLARITY
Polarity enum represents polarity of pin.
JUSTIFICATION
Defines in what ways the PIN or TEXT can be justified.
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
Holds all the data relating to one schematic.
void SetSize(const VECTOR2I &aSize)
Class for a wire to bus entry.
void SetPosition(const VECTOR2I &aPosition) override
void SetText(const wxString &aText) override
int ToLtSpiceCoords(int aCoordinate)
Method converts kicad coordinate(i.e scale) to ltspice coordinates.
void CreateCircle(LTSPICE_SCHEMATIC::LT_ASC &aAscfile, int aIndex, SCH_SHEET_PATH *aSheet)
Method for plotting circle from Asc files.
void setTextJustification(EDA_TEXT *aText, LTSPICE_SCHEMATIC::JUSTIFICATION aJustification)
SCH_TEXT * CreateSCH_TEXT(const VECTOR2I &aOffset, const wxString &aText, int aFontSize, LTSPICE_SCHEMATIC::JUSTIFICATION aJustification)
Create schematic text.
void CreateWires(LTSPICE_SCHEMATIC::LT_SYMBOL &aLTSymbol, int aIndex, SCH_SHEET_PATH *aSheet)
Method for plotting wires.
void Parse(SCH_SHEET_PATH *aSheet, std::vector< LTSPICE_SCHEMATIC::LT_ASC > &outLT_ASCs, const std::vector< wxString > &aAsyFileNames)
Function responsible for loading the .asc and .asy files in intermediate data structure.
STROKE_PARAMS getStroke(const LTSPICE_SCHEMATIC::LINEWIDTH &aLineWidth, const LTSPICE_SCHEMATIC::LINESTYLE &aLineStyle)
void CreateKicadSYMBOLs(SCH_SHEET_PATH *aSheet, std::vector< LTSPICE_SCHEMATIC::LT_ASC > &outLT_ASCs, const std::vector< wxString > &aAsyFiles)
Main Method for loading indermediate data to kicacd object from asy files.
SCH_SYMBOL * CreatePowerSymbol(const VECTOR2I &aOffset, const wxString &aValue, int aFontSize, SCH_SHEET_PATH *aSheet, std::vector< LTSPICE_SCHEMATIC::WIRE > &aWires)
Create a power symbol.
void CreateLine(LTSPICE_SCHEMATIC::LT_ASC &aAscfile, int aIndex, SCH_SHEET_PATH *aSheet)
Method for plotting Line from Asc files.
int getLineWidth(const LTSPICE_SCHEMATIC::LINEWIDTH &aLineWidth)
void RotateMirror(LTSPICE_SCHEMATIC::LT_SYMBOL &aLTSymbol, SCH_SYMBOL *aSchSymbol)
Methods for rotating and mirroring objects.
void CreateBusEntry(LTSPICE_SCHEMATIC::LT_ASC &aAscfile, int aIndex, SCH_SHEET_PATH *aSheet)
Method for plotting Bustap from Asc files.
void CreateRect(LTSPICE_SCHEMATIC::LT_ASC &aAscfile, int aIndex, SCH_SHEET_PATH *aSheet)
Method for plotting rectangle from Asc files.
void CreateWire(LTSPICE_SCHEMATIC::LT_ASC &aAscfile, int aIndex, SCH_SHEET_PATH *aSheet, SCH_LAYER_ID aLayer)
Create a schematic wire.
void CreateLines(LIB_SYMBOL *aSymbol, LTSPICE_SCHEMATIC::LT_SYMBOL &aLTSymbol, int aIndex, SCH_SHAPE *aShape)
Method for plotting Lines from Asy files.
void CreatePin(LTSPICE_SCHEMATIC::LT_ASC &aAscfile, int aIndex, SCH_SHEET_PATH *aSheet)
Method for plotting Iopin from Asc files.
void CreateArc(LTSPICE_SCHEMATIC::LT_ASC &aAscfile, int aIndex, SCH_SHEET_PATH *aSheet)
Method for plotting Arc from Asc files.
LINE_STYLE getLineStyle(const LTSPICE_SCHEMATIC::LINESTYLE &aLineStyle)
LTSPICE_SCHEMATIC * m_lt_schematic
int ToKicadCoords(int aCoordinate)
Method converts ltspice coordinate(i.e scale) to kicad coordinates.
void CreateFields(LTSPICE_SCHEMATIC::LT_SYMBOL &aLTSymbol, SCH_SYMBOL *aSymbol, SCH_SHEET_PATH *aSheet)
void RotateMirrorShape(LTSPICE_SCHEMATIC::LT_SYMBOL &aLTSymbol, SCH_SHAPE *aShape)
SCH_LABEL_BASE * CreateSCH_LABEL(KICAD_T aType, const VECTOR2I &aOffset, const wxString &aValue, int aFontSize, std::vector< LTSPICE_SCHEMATIC::WIRE > &aWires)
Create a label.
void CreateKicadSCH_ITEMs(SCH_SHEET_PATH *aSheet, std::vector< LTSPICE_SCHEMATIC::LT_ASC > &outLT_ASCs)
Main method for loading intermediate data structure from Asc file to kicad.
VECTOR2I ToKicadFontSize(int aLTFontSize)
void CreateSymbol(LTSPICE_SCHEMATIC::LT_SYMBOL &aLtSymbol, LIB_SYMBOL *aLibSymbol)
void SetLayer(SCH_LAYER_ID aLayer)
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
void AddField(const SCH_FIELD &aField)
void SetShape(LABEL_FLAG_SHAPE aShape)
void SetPosition(const VECTOR2I &aPosition) override
void AutoplaceFields(SCH_SCREEN *aScreen, AUTOPLACE_ALGO aAlgo) override
virtual void SetSpinStyle(SPIN_STYLE aSpinStyle)
Segment description base class to describe items which have 2 end points (track, wire,...
void SetStartPoint(const VECTOR2I &aPosition)
void SetLineWidth(const int aSize)
void SetLineStyle(const LINE_STYLE aStyle)
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
virtual void SetStroke(const STROKE_PARAMS &aStroke) override
void SetEndPoint(const VECTOR2I &aPosition)
void SetNumber(const wxString &aNumber)
void SetOrientation(PIN_ORIENTATION aOrientation)
void SetName(const wxString &aName)
void SetPosition(const VECTOR2I &aPos) override
void SetLength(int aLength)
void SetShape(GRAPHIC_PINSHAPE aShape)
void SetType(ELECTRICAL_PINTYPE aType)
void SetNameTextSize(int aSize)
const PAGE_INFO & GetPageSettings() const
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
SCHEMATIC * Schematic() const
void SetPosition(const VECTOR2I &aPos) override
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
void Move(const VECTOR2I &aOffset) override
Move the item by aMoveVector to a new position.
void SetStroke(const STROKE_PARAMS &aStroke) override
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
void AddPoint(const VECTOR2I &aPosition)
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
SCH_SCREEN * LastScreen()
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
void SetRef(const SCH_SHEET_PATH *aSheet, const wxString &aReference)
Set the reference for the given sheet path for this symbol.
void SetOrientation(int aOrientation)
Compute the new transform matrix based on aOrientation for the symbol which is applied to the current...
void SetValueFieldText(const wxString &aValue, const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString)
SCH_FIELD * AddField(const SCH_FIELD &aField)
Add a field to the symbol.
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
Simple container to manage line stroke parameters.
virtual void SetShowPinNumbers(bool aShow)
Set or clear the pin number visibility flag.
static constexpr EDA_ANGLE ANGLE_VERTICAL
static constexpr EDA_ANGLE ANGLE_HORIZONTAL
@ RECTANGLE
Use RECTANGLE instead of RECT to avoid collision in a Windows header.
@ FILLED_WITH_BG_BODYCOLOR
SCH_LAYER_ID
Eeschema drawing layers.
#define UNIMPLEMENTED_FOR(type)
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
@ PT_PASSIVE
pin for passive symbols: must be connected, and can be connected to any pin.
@ PIN_UP
The pin extends upwards from the connection point: Probably on the bottom side of the symbol.
@ PIN_RIGHT
The pin extends rightwards from the connection point.
@ PIN_LEFT
The pin extends leftwards from the connection point: Probably on the right side of the symbol.
@ PIN_DOWN
The pin extends downwards from the connection: Probably on the top side of the symbol.
LABEL_FLAG_SHAPE getLabelShape(LTSPICE_SCHEMATIC::POLARITY aPolarity)
LINE_STYLE
Dashed line types.
The ARC is represented inside a rectangle whose opposite site are given.
The CIRCLE is represented in Ltpsice inside a rectangle whose two opposite points and line style are ...
IOPIN is special contact on symbol used for IO operations.
A struct to hold .asc file definition.
std::vector< CIRCLE > Circles
std::vector< IOPIN > Iopins
std::vector< BUSTAP > Bustap
std::vector< LINE > Lines
std::vector< WIRE > Wires
std::vector< RECTANGLE > Rectangles
std::vector< FLAG > Flags
JUSTIFICATION PinJustification
std::map< wxString, wxString > PinAttribute
A struct to hold SYMBOL definition.
std::map< wxString, wxString > SymAttributes
std::vector< RECTANGLE > Rectangles
std::vector< LT_WINDOW > Windows
std::vector< LT_PIN > Pins
std::vector< WIRE > Wires
ORIENTATION SymbolOrientation
std::vector< CIRCLE > Circles
std::vector< LINE > Lines
JUSTIFICATION Justification
A 4-sided polygon with opposite equal sides, used in representing shapes.
JUSTIFICATION Justification
A metallic connection, used for transfer, between two points or pin.
@ SYM_ROTATE_COUNTERCLOCKWISE
@ USER
The field ID hasn't been set yet; field is invalid.
@ REFERENCE
Field Reference of part, i.e. "IC21".
@ VALUE
Field Value of part, i.e. "3.3K".
SHAPE_CIRCLE circle(c.m_circle_center, c.m_circle_radius)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
T rescale(T aNumerator, T aValue, T aDenominator)
Scale a number (value) by rational (numerator/denominator).
VECTOR2< int32_t > VECTOR2I