56 #include <compoundfilereader.h> 71 int red =
color & 0x0000FF;
72 int green = (
color & 0x00FF00 ) >> 8;
73 int blue = (
color & 0xFF0000 ) >> 16;
158 wxASSERT( !aFileName || aSchematic !=
NULL );
160 wxFileName fileName( aFileName );
165 std::unique_ptr<SCH_SHEET> deleter( aAppendToMe ?
nullptr :
m_rootSheet );
169 wxCHECK_MSG( aSchematic->
IsValid(),
nullptr,
"Can't append to a schematic with no root!" );
187 wxCHECK_MSG( libTable,
NULL,
"Could not load symbol lib table." );
189 m_pi.
set( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_KICAD ) );
197 wxString libTableUri =
"${KIPRJMOD}/" +
getLibFileName().GetFullName();
201 wxString(
"KiCad" ) ) );
210 libTable->
Format( &formatter, 0 );
237 FILE* fp = wxFopen( aFileName,
"rb" );
245 fseek( fp, 0, SEEK_END );
246 long len = ftell( fp );
251 THROW_IO_ERROR(
"Reading error, cannot determine length of file" );
254 std::unique_ptr<unsigned char[]> buffer(
new unsigned char[len] );
255 fseek( fp, 0, SEEK_SET );
257 size_t bytesRead = fread( buffer.get(),
sizeof(
unsigned char ), len, fp );
260 if( static_cast<size_t>( len ) != bytesRead )
265 CFB::CompoundFileReader reader( buffer.get(), bytesRead );
268 catch( CFB::CFBException& exception )
277 const CFB::COMPOUND_FILE_ENTRY* file =
FindStream( aReader,
"FileHeader" );
279 if( file ==
nullptr )
290 std::map<wxString, wxString> properties = reader.
ReadProperties();
308 std::map<wxString, wxString> properties = reader.
ReadProperties();
448 auto kpart =
m_symbols.find( component.first );
451 THROW_IO_ERROR(
"every component should have a symbol attached" );
456 component.second->SetLibSymbol( kpart->second );
484 return component->second.displaymode == aOwnerpartdisplaymode;
489 const std::map<wxString, wxString>& aProperties )
540 const auto& component =
m_components.at( symbol->first );
543 symbol->second->AddDrawItem( pin );
551 wxPoint pinLocation = elem.
location;
572 wxLogWarning(
"Pin has unexpected orientation" );
610 wxLogWarning(
"Pin has unexpected electrical type" );
615 wxLogWarning(
"Pin has unexpected outer edge type" );
618 wxLogWarning(
"Pin has unexpected inner edge type" );
665 switch( justification )
686 switch( justification )
720 size_t fontId = static_cast<int>( elem.
fontId );
722 if(
m_altiumSheet && fontId > 0 && fontId <= m_altiumSheet->fonts.size() )
745 const auto& component =
m_components.at( symbol->first );
748 symbol->second->AddDrawItem( text );
756 size_t fontId = static_cast<int>( elem.
fontId );
758 if(
m_altiumSheet && fontId > 0 && fontId <= m_altiumSheet->fonts.size() )
773 if( elem.
points.size() < 2 )
775 wxLogWarning(
wxString::Format(
"Bezier has %d control points. At least 2 are expected.",
776 static_cast<int>( elem.
points.size() ) ) );
782 for(
size_t i = 0; i + 1 < elem.
points.size(); i += 3 )
784 if( i + 2 == elem.
points.size() )
800 std::vector<wxPoint> bezierPoints;
801 std::vector<wxPoint> polyPoints;
802 for(
size_t j = i; j < elem.
points.size() && j < i + 4; j++ )
808 converter.
GetPoly( polyPoints );
810 for(
size_t k = 0; k + 1 < polyPoints.size(); k++ )
839 const auto& component =
m_components.at( symbol->first );
841 for(
size_t i = 0; i + 1 < elem.
points.size(); i += 3 )
843 if( i + 2 == elem.
points.size() )
847 symbol->second->AddDrawItem( line );
851 for(
size_t j = i; j < elem.
points.size() && j < i + 2; j++ )
863 symbol->second->AddDrawItem( bezier );
867 for(
size_t j = i; j < elem.
points.size() && j < i + 4; j++ )
896 for(
size_t i = 0; i + 1 < elem.
points.size(); i++ )
923 const auto& component =
m_components.at( symbol->first );
926 symbol->second->AddDrawItem( line );
930 for( wxPoint& point : elem.
points )
947 for(
size_t i = 0; i + 1 < elem.
points.size(); i++ )
984 const auto& component =
m_components.at( symbol->first );
987 symbol->second->AddDrawItem( line );
991 for( wxPoint& point : elem.
points )
1017 const wxPoint topLeft = { sheetBottomLeft.x, sheetTopRight.y };
1018 const wxPoint bottomRight = { sheetTopRight.x, sheetBottomLeft.y };
1057 wxLogWarning(
wxString::Format(
"Rounded Rectangle has non-existent ownerindex %d",
1065 const auto& component =
m_components.at( symbol->first );
1069 symbol->second->AddDrawItem( rect );
1093 wxLogError(
"Arc drawing is not possible for now on schematic." );
1109 const auto& component =
m_components.at( symbol->first );
1114 symbol->second->AddDrawItem( circle );
1125 symbol->second->AddDrawItem( arc );
1169 const auto& component =
m_components.at( symbol->first );
1172 symbol->second->AddDrawItem( line );
1193 const wxPoint topLeft = { sheetBottomLeft.x, sheetTopRight.y };
1194 const wxPoint bottomRight = { sheetTopRight.x, sheetBottomLeft.y };
1232 wxLogWarning(
wxString::Format(
"Rectangle has non-existent ownerindex %d",
1240 const auto& component =
m_components.at( symbol->first );
1243 symbol->second->AddDrawItem( rect );
1262 int aIndex,
const std::map<wxString, wxString>& aProperties )
1280 m_sheets.insert( { aIndex, sheet } );
1291 wxLogError(
wxString::Format(
"Sheet Entry has non-existent ownerindex %d",
1297 sheet->second->AddPin( sheetPin );
1304 wxPoint pos = sheet->second->GetPosition();
1305 wxSize size = sheet->second->GetSize();
1359 line1->
AddPoint( { 0, Mils2iu( -50 ) } );
1367 circle->
SetPosition( { Mils2iu( 0 ), Mils2iu( -75 ) } );
1374 line2->
AddPoint( { Mils2iu( -25 ), Mils2iu( -50 ) } );
1375 line2->
AddPoint( { Mils2iu( 25 ), Mils2iu( -50 ) } );
1376 line2->
AddPoint( { Mils2iu( 0 ), Mils2iu( -100 ) } );
1377 line2->
AddPoint( { Mils2iu( -25 ), Mils2iu( -50 ) } );
1380 return { 0, Mils2iu( 150 ) };
1388 line->
AddPoint( { 0, Mils2iu( -72 ) } );
1393 bezier->
AddPoint( { Mils2iu( 30 ), Mils2iu( -50 ) } );
1394 bezier->
AddPoint( { Mils2iu( 30 ), Mils2iu( -87 ) } );
1395 bezier->
AddPoint( { Mils2iu( -30 ), Mils2iu( -63 ) } );
1396 bezier->
AddPoint( { Mils2iu( -30 ), Mils2iu( -100 ) } );
1398 return { 0, Mils2iu( 150 ) };
1409 line1->
AddPoint( { 0, Mils2iu( -100 ) } );
1416 line2->
AddPoint( { Mils2iu( -100 ), Mils2iu( -100 ) } );
1417 line2->
AddPoint( { Mils2iu( 100 ), Mils2iu( -100 ) } );
1422 line3->
AddPoint( { Mils2iu( -70 ), Mils2iu( -130 ) } );
1423 line3->
AddPoint( { Mils2iu( 70 ), Mils2iu( -130 ) } );
1428 line4->
AddPoint( { Mils2iu( -40 ), Mils2iu( -160 ) } );
1429 line4->
AddPoint( { Mils2iu( 40 ), Mils2iu( -160 ) } );
1434 line5->
AddPoint( { Mils2iu( -10 ), Mils2iu( -190 ) } );
1435 line5->
AddPoint( { Mils2iu( 10 ), Mils2iu( -190 ) } );
1442 line2->
AddPoint( { Mils2iu( -100 ), Mils2iu( -100 ) } );
1443 line2->
AddPoint( { Mils2iu( 100 ), Mils2iu( -100 ) } );
1444 line2->
AddPoint( { Mils2iu( 0 ), Mils2iu( -200 ) } );
1445 line2->
AddPoint( { Mils2iu( -100 ), Mils2iu( -100 ) } );
1452 line2->
AddPoint( { Mils2iu( -150 ), Mils2iu( -200 ) } );
1453 line2->
AddPoint( { Mils2iu( -100 ), Mils2iu( -100 ) } );
1454 line2->
AddPoint( { Mils2iu( 100 ), Mils2iu( -100 ) } );
1455 line2->
AddPoint( { Mils2iu( 50 ), Mils2iu( -200 ) } );
1460 line3->
AddPoint( { Mils2iu( 0 ), Mils2iu( -100 ) } );
1461 line3->
AddPoint( { Mils2iu( -50 ), Mils2iu( -200 ) } );
1468 line2->
AddPoint( { Mils2iu( -25 ), Mils2iu( -50 ) } );
1469 line2->
AddPoint( { Mils2iu( 0 ), Mils2iu( -100 ) } );
1470 line2->
AddPoint( { Mils2iu( 25 ), Mils2iu( -50 ) } );
1472 return { 0, Mils2iu( 150 ) };
1475 return { 0, Mils2iu( 250 ) };
1484 line1->
AddPoint( { 0, Mils2iu( -160 ) } );
1489 line2->
AddPoint( { Mils2iu( -100 ), Mils2iu( -160 ) } );
1490 line2->
AddPoint( { Mils2iu( 100 ), Mils2iu( -160 ) } );
1495 line3->
AddPoint( { Mils2iu( -60 ), Mils2iu( -200 ) } );
1496 line3->
AddPoint( { Mils2iu( 60 ), Mils2iu( -200 ) } );
1501 line4->
AddPoint( { Mils2iu( -20 ), Mils2iu( -240 ) } );
1502 line4->
AddPoint( { Mils2iu( 20 ), Mils2iu( -240 ) } );
1505 return { 0, Mils2iu( 300 ) };
1511 circle->
SetPosition( { Mils2iu( 0 ), Mils2iu( -160 ) } );
1513 return { 0, Mils2iu( 350 ) };
1521 line1->
AddPoint( { 0, Mils2iu( -200 ) } );
1526 line2->
AddPoint( { Mils2iu( -100 ), Mils2iu( -200 ) } );
1527 line2->
AddPoint( { Mils2iu( 100 ), Mils2iu( -200 ) } );
1529 return { 0, Mils2iu( 250 ) };
1534 wxLogWarning(
"Power Port has unknown style, use bar instead. " );
1540 line1->
AddPoint( { 0, Mils2iu( -100 ) } );
1545 line2->
AddPoint( { Mils2iu( -50 ), Mils2iu( -100 ) } );
1546 line2->
AddPoint( { Mils2iu( 50 ), Mils2iu( -100 ) } );
1548 return { 0, Mils2iu( 150 ) };
1564 kpart = symbol->second;
1568 kpart =
new LIB_PART( wxEmptyString );
1605 component->
SetRef( &sheetpath,
"#PWR?" );
1641 wxLogWarning(
"Pin has unexpected orientation" );
1653 wxPoint end = start;
1655 switch( aElem.
style )
1662 end.x += aElem.
width;
1668 end.y -= aElem.
width;
1683 bool connectionFound = startIsWireTerminal
1684 || startIsBusTerminal
1685 || endIsWireTerminal
1686 || endIsBusTerminal;
1688 if( !connectionFound )
1690 wxLogError(
wxString::Format(
"There is a Port for \"%s\", but no connections towards it?",
1695 wxPoint position = ( startIsWireTerminal || startIsBusTerminal ) ? start : end;
1718 switch( aElem.
style )
1725 if( ( startIsWireTerminal || startIsBusTerminal ) )
1734 if( ( startIsWireTerminal || startIsBusTerminal ) )
1745 if( ( startIsWireTerminal && endIsWireTerminal ) || !connectionFound )
1753 else if( startIsBusTerminal && endIsBusTerminal )
1811 for(
size_t i = 0; i + 1 < elem.
points.size(); i++ )
1828 for(
size_t i = 0; i + 1 < elem.
points.size(); i++ )
1854 m_altiumSheet = std::make_unique<ASCH_SHEET>( aProperties );
1863 pageInfo.
SetType(
"A4", isPortrait );
1866 pageInfo.
SetType(
"A3", isPortrait );
1869 pageInfo.
SetType(
"A2", isPortrait );
1872 pageInfo.
SetType(
"A1", isPortrait );
1875 pageInfo.
SetType(
"A0", isPortrait );
1878 pageInfo.
SetType(
"A", isPortrait );
1881 pageInfo.
SetType(
"B", isPortrait );
1884 pageInfo.
SetType(
"C", isPortrait );
1887 pageInfo.
SetType(
"D", isPortrait );
1890 pageInfo.
SetType(
"E", isPortrait );
1893 pageInfo.
SetType(
"USLetter", isPortrait );
1896 pageInfo.
SetType(
"USLegal", isPortrait );
1899 pageInfo.
SetType(
"A3", isPortrait );
1902 pageInfo.
SetType(
"A", isPortrait );
1905 pageInfo.
SetType(
"B", isPortrait );
1908 pageInfo.
SetType(
"C", isPortrait );
1911 pageInfo.
SetType(
"D", isPortrait );
1914 pageInfo.
SetType(
"E", isPortrait );
1926 switch( aOrientation )
2012 wxLogWarning(
wxString::Format(
"Designator has non-existent ownerindex %d",
2017 const auto& component =
m_components.at( symbol->first );
2022 component->SetRef( &sheetpath, elem.
text );
2043 busWireEntry->
SetSize( { vector.x, vector.y } );
2057 if( elem.
text ==
"*" )
2063 if( elem.
name ==
"SheetNumber" )
2065 else if( elem.
name ==
"Title" )
2067 else if( elem.
name ==
"Revision" )
2069 else if( elem.
name ==
"Date" )
2071 else if( elem.
name ==
"CompanyName" )
2085 const auto& component =
m_components.at( symbol->first );
2091 if( elem.
name ==
"Value" )
2098 int fieldIdx = component->GetFieldCount();
2099 field = component->AddField( { position, fieldIdx, component, elem.
name } );
Field Reference of part, i.e. "IC21".
void ParsePort(const ASCH_PORT &aElem)
power input (GND, VCC for ICs). Must be connected to a power output.
static const wxString & GetSymbolLibTableFileName()
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
std::unique_ptr< PROPERTIES > m_properties
ASCH_RECORD_ORIENTATION orientation
void SetShape(PINSHEETLABEL_SHAPE aShape)
static int PropertiesReadInt(const std::map< wxString, wxString > &aProperties, const wxString &aKey, int aDefault)
void ParseLabel(const std::map< wxString, wxString > &aProperties)
static UTF8 FixIllegalChars(const UTF8 &aLibItemName, bool aLib=false)
Replace illegal LIB_ID item name characters with underscores '_'.
void SetLibSymbol(LIB_PART *aLibSymbol)
Set this schematic symbol library symbol reference to aLibSymbol.
Hold a record identifying a symbol library accessed by the appropriate symbol library SCH_PLUGIN obje...
void SetLibId(const LIB_ID &aName)
bool HasLibrary(const wxString &aNickname, bool aCheckEnabled=false) const
Test for the existence of aNickname in the library table.
void ParseBezier(const std::map< wxString, wxString > &aProperties)
COLOR4D & FromCSSRGBA(int aRed, int aGreen, int aBlue, double aAlpha=1.0)
Initialize the color from a RGBA value with 0-255 red/green/blue and 0-1 alpha.
void SetEdaTextJustification(EDA_TEXT *text, ASCH_LABEL_JUSTIFICATION justification)
void ParsePowerPort(const std::map< wxString, wxString > &aProperties)
SCH_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Returns a mandatory field in this symbol.
void SetOrientation(int aOrientation)
void ParseJunction(const std::map< wxString, wxString > &aProperties)
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
void SetSize(const wxSize &aSize)
wxPoint GetPosition() const override
bool InsertRow(LIB_TABLE_ROW *aRow, bool doReplace=false)
Adds aRow if it does not already exist or if doReplace is true.
Define a symbol library graphical text item.
void GetPoly(std::vector< wxPoint > &aOutput, int aMinSegLen=0)
Convert a Bezier curve to a polygon.
void SetShape(GRAPHIC_PINSHAPE aShape)
void SetLineWidth(const int aSize)
void ParseParameter(const std::map< wxString, wxString > &aProperties)
size_t GetRemainingBytes() const
void Parse(const CFB::CompoundFileReader &aReader)
SCH_SHEET * Load(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const PROPERTIES *aProperties=nullptr) override
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
void ParseRoundRectangle(const std::map< wxString, wxString > &aProperties)
std::vector< wxPoint > points
void SetItalic(bool isItalic)
void SetFillMode(FILL_TYPE aFillMode)
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
pin for passive components: must be connected, and can be connected to any pin
bool IsValid() const
A simple test if the schematic is loaded, not a complete one.
const wxString GetName() const override
Returns a brief hard coded name for this SCH_PLUGIN.
void SetVisible(bool aVisible)
void SetFirstRadiusAngle(int aAngle)
bool SetType(const wxString &aStandardPageDescriptionName, bool aIsPortrait=false)
Set the name of the page type and also the sizes and margins commonly associated with that type name.
ASCH_LABEL_JUSTIFICATION justification
LIB_FIELD & GetValueField()
Return reference to the value field.
void ParseBusEntry(const std::map< wxString, wxString > &aProperties)
unknown electrical properties: creates always a warning when connected
void SetPageSettings(const PAGE_INFO &aPageSettings)
void ParseSheet(const std::map< wxString, wxString > &aProperties)
void SetLength(int aLength)
void SetPosition(const wxPoint &aPosition) override
ASCH_POWER_PORT_STYLE style
void ParsePolygon(const std::map< wxString, wxString > &aProperties)
void set(SCH_PLUGIN *aPlugin)
void SetTextSize(const wxSize &aNewSize)
std::map< int, ASCH_COMPONENT > m_altiumComponents
A logical library item identifier and consists of various portions much like a URI.
const wxPoint GetRelativePosition(const wxPoint &aPosition, const SCH_COMPONENT *aComponent)
A name/value tuple with unique names and optional values.
void SetPosition(const wxPoint &aPos) override
void SetWidth(int aWidth) override
SCH_SCREEN * GetScreen() const
virtual const wxString GetProjectPath() const
Return the full path of the project.
std::map< wxString, LIB_PART * > m_powerSymbols
void SetPageNumber(const SCH_SHEET_PATH &aInstance, const wxString &aPageNumber)
Set the page number for the sheet instance aInstance.
std::map< int, SCH_SHEET * > m_sheets
COLOR4D GetColorFromInt(int color)
void SetEndPoint(const wxPoint &aPosition)
void ParseRectangle(const std::map< wxString, wxString > &aProperties)
void ParsePolyline(const std::map< wxString, wxString > &aProperties)
virtual void SetElem(ELEM_T aIndex, _ELEM *aElem)
ASCH_RECORD_ORIENTATION orientation
void SetNumber(const wxString &aNumber)
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
const CFB::COMPOUND_FILE_ENTRY * FindStream(const CFB::CompoundFileReader &aReader, const char *aStreamName)
std::vector< ASCH_PORT > m_altiumPortsCurrentSheet
ASCH_RECORD_ORIENTATION orientation
void SetLineStyle(const PLOT_DASH_TYPE aStyle)
ASCH_RECORD_ORIENTATION orientation
std::map< wxString, wxString > ReadProperties()
void SetType(ELECTRICAL_PINTYPE aType)
void SetFileName(wxString aFilename)
void SetBackgroundColor(KIGFX::COLOR4D aColor)
LIB_FIELD & GetReferenceField()
Return reference to the reference designator field.
void SetFlags(STATUS_FLAGS aMask)
Field Value of part, i.e. "3.3K".
virtual void SetText(const wxString &aText)
void ParseLine(const std::map< wxString, wxString > &aProperties)
void SetWidth(int aWidth) override
void SetFieldOrientation(SCH_FIELD &aField, ASCH_RECORD_ORIENTATION aOrientation)
void AddDrawItem(LIB_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
wxFileName getLibFileName()
Describe the page size and margins of a paper page on which to eventually print or plot.
void SetVertJustify(EDA_TEXT_VJUSTIFY_T aType)
void SetDescription(const wxString &aDescription)
std::unique_ptr< ASCH_SHEET > m_altiumSheet
void ParseSheetEntry(const std::map< wxString, wxString > &aProperties)
void SetEdge(SHEET_SIDE aEdge)
std::vector< wxPoint > points
void SetRadius(int aRadius)
Define a library symbol object.
void SetBorderColor(KIGFX::COLOR4D aColor)
Definition of file extensions used in Kicad.
void SetVisible(bool aVisible)
void SetLabelSpinStyle(LABEL_SPIN_STYLE aSpinStyle) override
Set a spin or rotation angle, along with specific horizontal and vertical justification styles with e...
int GetModifyHash() const override
Return the modification hash from the library cache.
wxPoint HelperGeneratePowerPortGraphics(LIB_PART *aKPart, ASCH_POWER_PORT_STYLE aStyle)
Define a sheet pin (label) used in sheets to create hierarchical schematics.
ASCH_RECORD_ORIENTATION orientation
void SetUnit(int aUnit)
Change the unit number to aUnit.
TRANSFORM & GetTransform()
void ParseFileName(const std::map< wxString, wxString > &aProperties)
LIB_ID AltiumToKiCadLibID(wxString aLibName, wxString aLibReference)
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
virtual void Format(OUTPUTFORMATTER *aOutput, int aIndentLevel) const override
Generate the table in s-expression format to aOutput with an indention level of aIndentLevel.
wxString GetFileName() const
Return the filename corresponding to this sheet.
void AddPoint(const wxPoint &aPoint)
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
void ParseNoERC(const std::map< wxString, wxString > &aProperties)
std::vector< wxPoint > points
void SetSecondRadiusAngle(int aAngle)
SCH_SHEET * m_currentSheet
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetSize(const wxSize &aSize)
PLOT_DASH_TYPE
Dashed line types.
PROJECT & Prj() const override
Return a reference to the project this schematic is part of.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
wxString componentdescription
const wxString GetLibraryFileExtension() const override
Return the library file extension for the SCH_PLUGIN object.
void SetPosition(const wxPoint &aPosition) override
void SetRef(const SCH_SHEET_PATH *aSheet, const wxString &aReference)
Set the reference for the given sheet path for this symbol.
bool LocatePathOfScreen(SCH_SCREEN *aScreen, SCH_SHEET_PATH *aList)
Search the existing hierarchy for an instance of screen loaded from aFileName.
void ParseComponent(int aIndex, const std::map< wxString, wxString > &aProperties)
Bezier curves to polygon converter.
bool IsTerminalPoint(const wxPoint &aPosition, int aLayer)
Test if aPosition is a connection point on aLayer.
void SetEnd(const wxPoint &aEnd)
void ParseSheetSymbol(int aIndex, const std::map< wxString, wxString > &aProperties)
void SetName(const wxString &aName)
Segment description base class to describe items which have 2 end points (track, wire,...
void Append(SCH_ITEM *aItem)
ASCH_SHEET_ENTRY_SIDE side
ASCH_RECORD_ORIENTATION orientation
void SetHorizJustify(EDA_TEXT_HJUSTIFY_T aType)
ASCH_PIN_SYMBOL_OUTEREDGE symbolOuterEdge
usual pin input: must be connected
void ParseWire(const std::map< wxString, wxString > &aProperties)
void ParseSheetName(const std::map< wxString, wxString > &aProperties)
void SetKeyWords(const wxString &aKeyWords)
const wxString GetFileExtension() const override
Returns the file extension for the SCH_PLUGIN.
void SetRadius(int aRadius)
std::map< int, LIB_PART * > m_symbols
const std::string KiCadSchematicFileExtension
wxPoint GetPosition() const override
void ParseArc(const std::map< wxString, wxString > &aProperties)
ASCH_POLYLINE_LINESTYLE linestyle
void ParseBus(const std::map< wxString, wxString > &aProperties)
Class for a wire to bus entry.
void SetWidth(int aWidth) override
virtual void SetName(const wxString &aName)
void SetPosition(const wxPoint &aPosition) override
ASCH_RECORD_ORIENTATION orientation
virtual const wxString GetProjectName() const
Return the short name of the project.
input or output (like port for a microprocessor)
const int ALTIUM_COMPONENT_NONE
std::vector< wxPoint > points
void ParseAltiumSch(const wxString &aFileName)
virtual void SetTextAngle(double aAngle)
void ParseDesignator(const std::map< wxString, wxString > &aProperties)
void SetFileName(const wxString &aFileName)
virtual void SetLabelSpinStyle(LABEL_SPIN_STYLE aSpinStyle)
Set a spin or rotation angle, along with specific horizontal and vertical justification styles with e...
void SetValue(const SCH_SHEET_PATH *sheet, const wxString &aValue)
ASCH_PIN_ELECTRICAL electrical
bool CheckHeader(const wxString &aFileName) override
Return true if the first line in aFileName begins with the expected header.
void ParsePin(const std::map< wxString, wxString > &aProperties)
void SetWidth(int aWidth) override
std::map< int, SCH_COMPONENT * > m_components
SCH_PLUGIN::SCH_PLUGIN_RELEASER m_pi
ASCH_PIN_SYMBOL_INNEREDGE symbolInnerEdge
void ParseNetLabel(const std::map< wxString, wxString > &aProperties)
void SetLibId(const LIB_ID &aLibId)
void SetPosition(const wxPoint &aPosition) override
#define THROW_IO_ERROR(msg)
#define IS_NEW
New item, just created.
void AddPoint(const wxPoint &aPoint)
bool IsComponentPartVisible(int aOwnerindex, int aOwnerpartdisplaymode) const
std::unique_ptr< TITLE_BLOCK > m_currentTitleBlock
Define a bezier curve graphic body item.
std::vector< wxPoint > points
const std::string KiCadSymbolLibFileExtension
void SetOrientation(int aOrientation)
Compute the new transform matrix based on aOrientation for the symbol which is applied to the current...
A color representation with 4 components: red, green, blue, alpha.