38 const wxString& aNetlistFile,
39 const wxString& aFinalFile,
40 const wxString& aProjectPath )
48 wxString ret = aFormatString;
49 wxFileName in = aNetlistFile;
50 wxFileName out = aFinalFile;
51 wxString str_out = out.GetFullPath();
53 ret.Replace( wxT(
"%P" ), aProjectPath,
true );
54 ret.Replace( wxT(
"%B" ), out.GetName(), true );
55 ret.Replace( wxT(
"%I" ), in.GetFullPath(), true );
63 if( !str_out.StartsWith( wxT(
"\\\\" ) ) )
64 str_out.Replace( wxT(
"\\" ), wxT(
"/" ) );
67 ret.Replace( wxT(
"%O" ), str_out,
true );
75 wxCHECK( aItem,
nullptr );
76 wxCHECK( aSheetPath,
nullptr );
88 ref = symbol->
GetRef( aSheetPath );
90 if( ref[0] == wxChar(
'#' ) )
95 wxCHECK( screen,
nullptr );
99 wxCHECK( libSymbol,
nullptr );
126 bool aKeepUnconnectedPins )
128 wxString ref( aSymbol->
GetRef( aSheetPath ) );
133 if( ref[0] == wxChar(
'#' ) )
153 aSheetPath, aKeepUnconnectedPins );
164 const wxString& netName = conn->Name();
166 if( !aKeepUnconnectedPins )
225 bool aKeepUnconnectedPins )
227 wxString ref = aSchSymbol->
GetRef( aSheetPath );
233 for(
unsigned i = 0; i < sheetList.size(); i++ )
239 SCH_SYMBOL* comp2 = static_cast<SCH_SYMBOL*>( item );
241 ref2 = comp2->
GetRef( &sheet );
243 if( ref2.CmpNoCase( ref ) != 0 )
250 const wxString& netName = conn->Name();
252 if( !aKeepUnconnectedPins )
CONNECTION_SUBGRAPH * FindSubgraphByName(const wxString &aNetName, const SCH_SHEET_PATH &aPath)
Returns the subgraph for a given net name on a given sheet.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
bool Lookup(const wxString &aString)
std::vector< PIN_INFO > m_sortedSymbolPinList
Used to temporarily store and filter the list of pins of a schematic symbol when generating schematic...
Calculates the connectivity of a schematic and generates netlists.
void eraseDuplicatePins()
Erase duplicate pins from m_sortedSymbolPinList (i.e.
virtual CONNECTION_GRAPH * ConnectionGraph() const =0
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const
Return the reference for the given sheet path.
static bool sortPinsByNum(PIN_INFO &aPin1, PIN_INFO &aPin2)
Comparison routine for sorting by pin numbers.
Define a library symbol object.
A subgraph is a set of items that are electrically connected on a single sheet.
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
SCH_SYMBOL * findNextSymbol(EDA_ITEM *aItem, SCH_SHEET_PATH *aSheetPath)
Check if the given symbol should be processed for netlisting.
SCHEMATIC_IFACE * m_schematic
The schematic we're generating a netlist for.
UNIQUE_STRINGS m_referencesAlreadyFound
Used for "multiple symbols per package" symbols to avoid processing a lib symbol more than once.
static wxString MakeCommandLine(const wxString &aFormatString, const wxString &aNetlistFile, const wxString &aFinalFile, const wxString &aProjectDirectory)
Build up a string that describes a command line for executing a child process.
wxString GetSchSymbolLibraryName() const
std::vector< SCH_ITEM * > m_items
int GetUnitCount() const override
For items with units, return the number of units.
void CreatePinList(SCH_SYMBOL *aSymbol, SCH_SHEET_PATH *aSheetPath, bool aKeepUnconnectedPins)
Find a symbol from the DrawList and builds its pin list in m_sortedSymbolPinList.
Definition for symbol library class.
std::map< wxString, LIB_SYMBOL * > & GetLibSymbols()
Fetch a list of unique LIB_SYMBOL object pointers required to properly render each SCH_SYMBOL in this...
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
SCH_SCREEN * LastScreen()
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void findAllUnitsOfSymbol(SCH_SYMBOL *aSchSymbol, LIB_SYMBOL *aLibSymbol, SCH_SHEET_PATH *aSheetPath, bool aKeepUnconnectedPins)
Find all units for symbols with multiple symbols per package.
A base class for most all the KiCad significant classes used in schematics and boards.
int StrNumCmp(const wxString &aString1, const wxString &aString2, bool aIgnoreCase)
Compare two strings with alphanumerical content.
SCH_ITEM * m_no_connect
No-connect item in graph, if any.
std::set< LIB_SYMBOL *, LIB_SYMBOL_LESS_THAN > m_libParts
unique library symbols used. LIB_SYMBOL items are sorted by names
virtual SCH_SHEET_LIST GetSheets() const =0
Base class for any item which can be embedded within the SCHEMATIC container class,...
std::vector< SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve a list of the SCH_PINs for the given sheet path.
KICAD_T Type() const
Returns the type of object.