28using namespace std::placeholders;
61 &aNetlist, aFilename, wxEmptyString ) );
63 if( !netlistReader.get() )
65 msg.Printf(
_(
"Cannot open netlist file '%s'." ), aFilename );
71 netlistReader->LoadNetlist();
76 msg.Printf(
_(
"Error loading netlist.\n%s" ), ioe.
What().GetData() );
115 if( netNamesCfg == 2 || netNamesCfg == 3 )
118 else if(
dynamic_cast<PAD*
>( aItem ) )
120 if( netNamesCfg == 1 || netNamesCfg == 3 )
128 text->ClearRenderCache();
129 text->ClearBoundingBoxCache();
144 if( !newFootprints.empty() )
147 std::copy( newFootprints.begin(), newFootprints.end(), std::back_inserter( items ) );
150 *aRunDragCommand =
true;
172 for(
unsigned ii = 0; ii < aNetlist.
GetCount(); ii++ )
179 msg.Printf(
_(
"No footprint defined for symbol %s." ),
193 path.push_back( uuid );
202 bool footprintMisMatch = fpOnBoard && fpOnBoard->
GetFPID() != component->
GetFPID();
206 msg.Printf(
_(
"Footprint of %s changed: board footprint '%s', netlist footprint '%s'." ),
216 footprintMisMatch =
false;
218 if( fpOnBoard && !footprintMisMatch )
221 if( component->
GetFPID() != lastFPID )
229 msg.Printf(
_(
"%s footprint ID '%s' is not valid." ),
242 lastFPID = component->
GetFPID();
246 msg.Printf(
_(
"%s footprint '%s' not found in any libraries in the footprint "
Update the BOARD with a new netlist.
std::vector< FOOTPRINT * > GetAddedFootprints() const
Information pertinent to a Pcbnew printed circuit board.
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
FOOTPRINT * FindFootprintByPath(const KIID_PATH &aPath) const
Search for a FOOTPRINT within this board with the given path.
FOOTPRINT * FindFootprintByReference(const wxString &aReference) const
Search for a FOOTPRINT within this board with the given reference designator.
Store all of the related footprint information found in a netlist.
const KIID_PATH & GetPath() const
const wxString & GetReference() const
void SetFootprint(FOOTPRINT *aFootprint)
const std::vector< KIID > & GetKIIDs() const
const LIB_ID & GetFPID() const
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
An abstract base class for deriving all objects that can be added to a VIEW.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
A logical library item identifier and consists of various portions much like a URI.
const UTF8 & GetLibItemName() const
static NETLIST_READER * GetNetlistReader(NETLIST *aNetlist, const wxString &aNetlistFileName, const wxString &aCompFootprintFileName=wxEmptyString)
Attempt to determine the net list file type of aNetlistFileName and return the appropriate NETLIST_RE...
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
bool GetReplaceFootprints() const
unsigned GetCount() const
COMPONENT * GetComponent(unsigned aIndex)
Return the COMPONENT at aIndex.
bool IsFindByTimeStamp() const
DISPLAY_OPTIONS m_Display
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
wxString GetDesignRulesPath()
Return the absolute path to the design rules file for the currently-loaded board.
PCBNEW_SETTINGS * GetPcbNewSettings() const
FOOTPRINT * loadFootprint(const LIB_ID &aFootprintId)
Attempts to load aFootprintId from the footprint library table.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void Compile_Ratsnest(bool aDisplayStatus)
Create the entire board ratsnest.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
bool ReadNetlistFromFile(const wxString &aFilename, NETLIST &aNetlist, REPORTER &aReporter)
Read a netlist from a file into a NETLIST object.
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
void LoadFootprints(NETLIST &aNetlist, REPORTER &aReporter)
Load the footprints for each #SCH_COMPONENT in aNetlist from the list of libraries.
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
std::string::size_type size() const
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
@ REPAINT
Item needs to be redrawn.
@ GEOMETRY
Position or shape has changed.
Class that computes missing connections on a PCB.
A filename or source description, a problem input line, a line number, a byte offset,...