132 bestPosition.
x = pageSize.
x / 2;
133 bestPosition.
y = pageSize.
y / 2;
146 msg.Printf(
_(
"Cannot add %s (no footprint assigned)." ),
155 if( footprint ==
nullptr )
157 msg.Printf(
_(
"Cannot add %s (footprint '%s' not found)." ),
170 msg.Printf(
_(
"Add %s (footprint '%s')." ),
185 pad->SetNetCode( 0 );
200 msg.Printf(
_(
"Added %s (footprint '%s')." ),
213 wxString curClassName, newClassName;
217 curClassName = curClass->
GetName();
229 newClassName = newClass->
GetName();
232 if( curClassName == newClassName )
239 if( curClassName == wxEmptyString && newClassName != wxEmptyString )
241 msg.Printf(
_(
"Change %s component class to '%s'." ),
245 else if( curClassName != wxEmptyString && newClassName == wxEmptyString )
247 msg.Printf(
_(
"Remove %s component class (currently '%s')." ),
253 msg.Printf(
_(
"Change %s component class from '%s' to '%s'." ),
261 wxASSERT_MSG( newClass !=
nullptr,
"Component class should not be nullptr" );
265 if( curClassName == wxEmptyString && newClassName != wxEmptyString )
267 msg.Printf(
_(
"Changed %s component class to '%s'." ),
271 else if( curClassName != wxEmptyString && newClassName == wxEmptyString )
273 msg.Printf(
_(
"Removed %s component class (was '%s')." ),
279 msg.Printf(
_(
"Changed %s component class from '%s' to '%s'." ),
297 msg.Printf(
_(
"Cannot update %s (no footprint assigned)." ),
306 if( newFootprint ==
nullptr )
308 msg.Printf(
_(
"Cannot update %s (footprint '%s' not found)." ),
320 msg.Printf(
_(
"Cannot change %s footprint from '%s' to '%s' (footprint is locked)."),
331 msg.Printf(
_(
"Change %s footprint from '%s' to '%s'."),
345 msg.Printf(
_(
"Could not change %s footprint from '%s' to '%s' (footprint is locked)."),
358 msg.Printf(
_(
"Changed %s footprint from '%s' to '%s'."),
381 copy->SetParentGroup(
nullptr );
384 bool changed =
false;
391 msg.Printf(
_(
"Change %s reference designator to %s." ),
397 msg.Printf(
_(
"Changed %s reference designator to %s." ),
413 msg.Printf(
_(
"Change %s value from %s to %s." ),
420 msg.Printf(
_(
"Changed %s value from %s to %s." ),
435 if( !aNetlistComponent->
GetKIIDs().empty() )
436 new_path.push_back( aNetlistComponent->
GetKIIDs().front() );
438 if( aPcbFootprint->
GetPath() != new_path )
442 msg.Printf(
_(
"Update %s symbol association from %s to %s." ),
449 msg.Printf(
_(
"Updated %s symbol association from %s to %s." ),
455 aPcbFootprint->
SetPath( new_path );
461 nlohmann::ordered_map<wxString, wxString> fpFieldsAsMap;
466 if( field->IsReference() || field->IsValue() || field->IsComponentClass() )
471 fpFieldsAsMap[field->GetName()] = field->GetText();
475 nlohmann::ordered_map<wxString, wxString> compFields = aNetlistComponent->
GetFields();
481 compFields.erase( wxT(
"Component Class" ) );
488 for(
const auto& [
name, value] : compFields )
490 if( fpFieldsAsMap.count(
name ) == 0 || fpFieldsAsMap[
name] != value )
497 for(
const auto& [
name, value] : fpFieldsAsMap )
499 if( compFields.count(
name ) == 0 )
512 msg.Printf(
_(
"Update %s fields." ), aPcbFootprint->
GetReference() );
519 if( field->IsMandatory() )
522 if( compFields.count( field->GetName() ) == 0 )
526 msg.Printf(
_(
"Remove %s footprint fields not in symbol." ),
539 msg.Printf(
_(
"Updated %s fields." ), aPcbFootprint->
GetReference() );
545 for(
auto& [
name, value] : compFields )
554 aPcbFootprint->
Add( newField );
576 std::vector<PCB_FIELD*> fieldList;
577 aPcbFootprint->
GetFields( fieldList,
false );
581 if( field->IsMandatory() )
584 if( compFields.count( field->GetName() ) == 0 )
589 msg.Printf(
_(
"Removed %s footprint fields not in symbol." ),
594 aPcbFootprint->
Remove( field );
612 if( !humanSheetPath.empty() )
613 sheetname = humanSheetPath;
614 else if( aNetlistComponent->
GetProperties().count( wxT(
"Sheetname" ) ) > 0 )
615 sheetname = aNetlistComponent->
GetProperties().at( wxT(
"Sheetname" ) );
617 if( aNetlistComponent->
GetProperties().count( wxT(
"Sheetfile" ) ) > 0 )
618 sheetfile = aNetlistComponent->
GetProperties().at( wxT(
"Sheetfile" ) );
620 if( aNetlistComponent->
GetProperties().count( wxT(
"ki_fp_filters" ) ) > 0 )
621 fpFilters = aNetlistComponent->
GetProperties().at( wxT(
"ki_fp_filters" ) );
627 msg.Printf(
_(
"Update %s sheetname to '%s'." ),
634 msg.Printf(
_(
"Updated %s sheetname to '%s'." ),
646 msg.Printf(
_(
"Update %s sheetfile to '%s'." ),
653 msg.Printf(
_(
"Updated %s sheetfile to '%s'." ),
661 if( fpFilters != aPcbFootprint->
GetFilters() )
665 msg.Printf(
_(
"Update %s footprint filters to '%s'." ),
672 msg.Printf(
_(
"Updated %s footprint filters to '%s'." ),
680 if( ( aNetlistComponent->
GetProperties().count( wxT(
"exclude_from_bom" ) ) > 0 )
685 if( aNetlistComponent->
GetProperties().count( wxT(
"exclude_from_bom" ) ) )
687 msg.Printf(
_(
"Add %s 'exclude from BOM' fabrication attribute." ),
692 msg.Printf(
_(
"Remove %s 'exclude from BOM' fabrication attribute." ),
700 if( aNetlistComponent->
GetProperties().count( wxT(
"exclude_from_bom" ) ) )
703 msg.Printf(
_(
"Added %s 'exclude from BOM' fabrication attribute." ),
708 attributes &= ~FP_EXCLUDE_FROM_BOM;
709 msg.Printf(
_(
"Removed %s 'exclude from BOM' fabrication attribute." ),
720 if( ( aNetlistComponent->
GetProperties().count( wxT(
"dnp" ) ) > 0 )
725 if( aNetlistComponent->
GetProperties().count( wxT(
"dnp" ) ) )
727 msg.Printf(
_(
"Add %s 'Do not place' fabrication attribute." ),
732 msg.Printf(
_(
"Remove %s 'Do not place' fabrication attribute." ),
740 if( aNetlistComponent->
GetProperties().count( wxT(
"dnp" ) ) )
743 msg.Printf(
_(
"Added %s 'Do not place' fabrication attribute." ),
748 attributes &= ~FP_DNP;
749 msg.Printf(
_(
"Removed %s 'Do not place' fabrication attribute." ),
772 msg.Printf(
_(
"Added %s 'duplicate pad numbers are jumpers' attribute." ),
777 msg.Printf(
_(
"Removed %s 'duplicate pad numbers are jumpers' attribute." ),
785 msg.Printf(
_(
"Add %s 'duplicate pad numbers are jumpers' attribute." ),
790 msg.Printf(
_(
"Remove %s 'duplicate pad numbers are jumpers' attribute." ),
804 msg.Printf(
_(
"Updated %s jumper pad groups" ), aPcbFootprint->
GetReference() );
808 msg.Printf(
_(
"Update %s jumper pad groups" ), aPcbFootprint->
GetReference() );
814 if( changed &&
copy )
837 copy->SetParentGroup(
nullptr );
840 bool changed =
false;
849 KIID existingGroupKIID = existingGroup ? existingGroup->
m_Uuid : 0;
854 return group->m_Uuid == newGroupKIID;
862 if( newGroupKIID == existingGroupKIID )
866 if( existingGroupKIID != 0 )
870 msg.Printf(
_(
"Remove %s from group '%s'." ),
876 msg.Printf(
_(
"Removed %s from group '%s'." ),
881 m_commit.
Modify( existingGroup,
nullptr, RECURSE_MODE::NO_RECURSE );
889 if( newGroupKIID != 0 )
893 msg.Printf(
_(
"Add %s to group '%s'." ),
899 msg.Printf(
_(
"Added %s group '%s'." ),
905 if( newGroup ==
nullptr )
908 const_cast<KIID&
>( newGroup->
m_Uuid ) = newGroupKIID;
921 newGroup->
AddItem( aPcbFootprint );
927 if( changed &&
copy )
947 copy->SetParentGroup(
nullptr );
950 bool changed =
false;
953 std::deque<PAD*> pads = aFootprint->
Pads();
954 std::set<wxString> padNetnames;
956 std::sort( pads.begin(), pads.end(),
959 return a->m_Uuid < b->m_Uuid;
966 wxString pinFunction;
977 if(
pad->GetPinFunction() != pinFunction )
980 pad->SetPinFunction( pinFunction );
983 if(
pad->GetPinType() != pinType )
986 pad->SetPinType( pinType );
995 if( !net.
IsValid() || !
pad->IsOnCopperLayer() )
997 if( !
pad->GetNetname().IsEmpty() )
1001 msg.Printf(
_(
"Disconnect %s pin %s." ),
1007 msg.Printf(
_(
"Disconnected %s pin %s." ),
1014 else if(
pad->IsOnCopperLayer() && !
pad->GetNumber().IsEmpty() )
1017 msg.Printf(
_(
"No net found for component %s pad %s (no pin %s in symbol)." ),
1032 if(
pad->GetNetname().IsEmpty() )
1033 pad->SetPinFunction( wxEmptyString );
1045 if(
pad->IsNoConnectPad() )
1047 netName = wxString::Format( wxS(
"%s" ),
1050 for(
int jj = 1; !padNetnames.insert( netName ).second; jj++ )
1052 netName = wxString::Format( wxS(
"%s_%d" ),
1062 if(
pad->GetNetname() != netName )
1065 if( netinfo ==
nullptr )
1072 if( netinfo ==
nullptr )
1084 msg.Printf(
_(
"Add net %s." ),
1089 if( !
pad->GetNetname().IsEmpty() )
1095 msg.Printf(
_(
"Reconnect %s pin %s from %s to %s."),
1103 msg.Printf(
_(
"Reconnected %s pin %s from %s to %s."),
1114 msg.Printf(
_(
"Connect %s pin %s to %s."),
1121 msg.Printf(
_(
"Connected %s pin %s to %s."),
1133 pad->SetNet( netinfo );
1143 if( changed &&
copy )
1156 if( !zone->IsOnCopperLayer() || zone->GetIsRuleArea() )
1167 std::set<wxString> netlistNetnames;
1169 for(
int ii = 0; ii < (int) aNetlist.
GetCount(); ii++ )
1173 for(
unsigned jj = 0; jj < component->
GetNetCount(); jj++ )
1185 if( netlistNetnames.count(
via->GetNetname() ) == 0 )
1187 wxString updatedNetname = wxEmptyString;
1196 if( !updatedNetname.IsEmpty() )
1200 wxString originalNetname =
via->GetNetname();
1202 msg.Printf(
_(
"Reconnect via from %s to %s." ),
1217 wxString originalNetname =
via->GetNetname();
1220 via->SetNet( netinfo );
1222 msg.Printf(
_(
"Reconnected via from %s to %s." ),
1232 msg.Printf(
_(
"Via connected to unknown net (%s)." ),
1243 if( !zone->IsOnCopperLayer() || zone->GetIsRuleArea() )
1246 if( netlistNetnames.count( zone->GetNetname() ) == 0 )
1251 wxString updatedNetname = wxEmptyString;
1264 if( updatedNetname.IsEmpty() &&
m_oldToNewNets.count( zone->GetNetname() ) )
1269 if( !updatedNetname.IsEmpty() )
1273 wxString originalNetname = zone->GetNetname();
1275 if( !zone->GetZoneName().IsEmpty() )
1277 msg.Printf(
_(
"Reconnect copper zone '%s' from %s to %s." ),
1278 zone->GetZoneName(),
1284 msg.Printf(
_(
"Reconnect copper zone from %s to %s." ),
1300 wxString originalNetname = zone->GetNetname();
1303 zone->SetNet( netinfo );
1305 if( !zone->GetZoneName().IsEmpty() )
1307 msg.Printf(
_(
"Reconnected copper zone '%s' from %s to %s." ),
1314 msg.Printf(
_(
"Reconnected copper zone from %s to %s." ),
1325 if( !zone->GetZoneName().IsEmpty() )
1327 msg.Printf(
_(
"Copper zone '%s' has no pads connected." ),
1344 msg.Printf(
_(
"Copper zone on layer %s at (%s, %s) has no pads connected." ),
1371 if( netlistGroup ==
nullptr )
1374 if( netlistGroup->
name != pcbGroup->GetName() )
1379 msg.Printf(
_(
"Change group name to '%s' to '%s'." ),
EscapeHTML( pcbGroup->GetName() ),
1386 msg.Printf(
_(
"Changed group name to '%s' to '%s'." ),
EscapeHTML( pcbGroup->GetName() ),
1388 m_commit.
Modify( pcbGroup->AsEdaItem(),
nullptr, RECURSE_MODE::NO_RECURSE );
1389 pcbGroup->SetName( netlistGroup->
name );
1393 if( netlistGroup->
libId != pcbGroup->GetDesignBlockLibId() )
1398 msg.Printf(
_(
"Change group library link to '%s'." ),
1405 msg.Printf(
_(
"Changed group library link to '%s'." ),
1407 m_commit.
Modify( pcbGroup->AsEdaItem(),
nullptr, RECURSE_MODE::NO_RECURSE );
1408 pcbGroup->SetDesignBlockLibId( netlistGroup->
libId );
1418 std::map<COMPONENT*, FOOTPRINT*>& aFootprintMap )
1426 for(
int i = 0; i < (int) aNetlist.
GetCount(); i++ )
1429 FOOTPRINT* footprint = aFootprintMap[component];
1435 for(
unsigned jj = 0; jj < component->
GetNetCount(); jj++ )
1439 if( padNumber.IsEmpty() )
1442 msg.Printf(
_(
"Symbol %s has pins with no number. These pins can not be matched "
1452 msg.Printf(
_(
"%s pad %s not found in %s." ),
1468 FOOTPRINT* lastPreexistingFootprint =
nullptr;
1471 std::unordered_set<wxString> sheetPaths;
1477 std::map<COMPONENT*, FOOTPRINT*> footprintMap;
1490 net->SetIsCurrent( net->GetNetCode() == 0 );
1498 for(
unsigned i = 0; i < aNetlist.
GetCount(); i++ )
1502 if( component->
GetProperties().count( wxT(
"exclude_from_board" ) ) )
1505 msg.Printf(
_(
"Processing symbol '%s:%s'." ),
1521 base.push_back( uuid );
1523 if( footprint->GetPath() == base )
1532 match = footprint->GetReference().CmpNoCase( component->
GetReference() ) == 0;
1547 footprintMap[ component ] = tmp;
1554 sheetPaths.insert( footprint->GetSheetname() );
1560 if( footprint == lastPreexistingFootprint )
1567 if( matchCount == 0 )
1573 footprintMap[ component ] = footprint;
1583 else if( matchCount > 1 )
1585 msg.Printf(
_(
"Multiple footprints found for %s." ),
1600 bool matched =
false;
1611 if( component && component->
GetProperties().count( wxT(
"exclude_from_board" ) ) == 0 )
1614 if( doDelete && !matched && footprint->IsLocked() && !
m_overrideLocks )
1618 msg.Printf(
_(
"Cannot remove unused footprint %s (footprint is locked)." ),
1619 footprint->GetReference() );
1623 msg.Printf(
_(
"Could not remove unused footprint %s (footprint is locked)." ),
1624 footprint->GetReference() );
1632 if( doDelete && !matched )
1636 msg.Printf(
_(
"Remove unused footprint %s." ),
1637 footprint->GetReference() );
1642 msg.Printf(
_(
"Removed unused footprint %s." ),
1643 footprint->GetReference() );
1653 for(
PAD*
pad : footprint->Pads() )
1656 pad->GetNet()->SetIsCurrent(
true );
1672 if( !net->IsCurrent() )
1674 msg.Printf(
_(
"Removed unused net %s." ),
1700 for(
const std::pair<const wxString, NETINFO_ITEM*>& addedNet :
m_addedNets )
1701 delete addedNet.second;
constexpr EDA_IU_SCALE pcbIUScale
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
wxString GetNetname() const
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
std::map< PAD *, wxString > m_padNets
bool m_deleteUnusedFootprints
void cacheNetname(PAD *aPad, const wxString &aNetname)
bool UpdateNetlist(NETLIST &aNetlist)
Update the board's components according to the new netlist.
wxString getNetname(PAD *aPad)
wxString getPinFunction(PAD *aPad)
std::vector< FOOTPRINT * > m_addedFootprints
std::map< wxString, wxString > m_oldToNewNets
void updateComponentClass(FOOTPRINT *aFootprint, COMPONENT *aNewComponent)
bool updateFootprintGroup(FOOTPRINT *aPcbFootprint, COMPONENT *aNetlistComponent)
bool updateFootprintParameters(FOOTPRINT *aPcbFootprint, COMPONENT *aNetlistComponent)
std::map< wxString, NETINFO_ITEM * > m_addedNets
bool testConnectivity(NETLIST &aNetlist, std::map< COMPONENT *, FOOTPRINT * > &aFootprintMap)
bool updateCopperZoneNets(NETLIST &aNetlist)
void cachePinFunction(PAD *aPad, const wxString &aPinFunction)
bool updateGroups(NETLIST &aNetlist)
BOARD_NETLIST_UPDATER(PCB_EDIT_FRAME *aFrame, BOARD *aBoard)
bool updateComponentPadConnections(FOOTPRINT *aFootprint, COMPONENT *aNewComponent)
VECTOR2I estimateFootprintInsertionPosition()
std::map< PAD *, wxString > m_padPinFunctions
std::map< ZONE *, std::vector< PAD * > > m_zoneConnectionsCache
FOOTPRINT * replaceFootprint(NETLIST &aNetlist, FOOTPRINT *aFootprint, COMPONENT *aNewComponent)
void cacheCopperZoneConnections()
FOOTPRINT * addNewFootprint(COMPONENT *aComponent)
Information pertinent to a Pcbnew printed circuit board.
const NETINFO_LIST & GetNetInfo() const
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
const BOX2I GetBoardEdgesBoundingBox() const
Return the board bounding box calculated using exclusively the board edges (graphics on Edge....
const PAGE_INFO & GetPageSettings() const
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
const ZONES & Zones() const
const GROUPS & Groups() const
The groups must maintain the following invariants.
bool BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
void RemoveUnusedNets(BOARD_COMMIT *aCommit)
const FOOTPRINTS & Footprints() const
const TRACKS & Tracks() const
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
COMPONENT_CLASS_MANAGER & GetComponentClassManager()
Gets the component class manager.
bool SynchronizeComponentClasses(const std::unordered_set< wxString > &aNewSheetPaths) const
Copy component class / component class generator information from the project settings.
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
constexpr size_type GetWidth() const
constexpr Vec Centre() const
constexpr size_type GetHeight() const
constexpr coord_type GetBottom() const
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Remove a new item from the model.
COMMIT & Added(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been added.
COMMIT & Modified(EDA_ITEM *aItem, EDA_ITEM *aCopy, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
int GetStatus(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Returns status of an item.
COMPONENT_CLASS * GetEffectiveStaticComponentClass(const std::unordered_set< wxString > &classNames)
Gets an effective component class for the given constituent class names.
static wxString GetFullClassNameForConstituents(const std::unordered_set< wxString > &classNames)
Gets the full effective class name for the given set of constituent classes.
void FinishNetlistUpdate()
Cleans up the manager after a board update Must be called after updating the PCB from the netlist.
const COMPONENT_CLASS * GetNoneComponentClass() const
Returns the unassigned component class.
void InitNetlistUpdate()
Prepare the manager for a board update Must be called prior to updating the PCB from the netlist.
A lightweight representation of a component class.
const wxString & GetName() const
Fetches the full name of this component class.
Used to store the component pin name to net name (and pin function) associations stored in a netlist.
const wxString & GetNetName() const
const wxString & GetPinFunction() const
const wxString & GetPinName() const
const wxString & GetPinType() const
Store all of the related footprint information found in a netlist.
const wxString & GetHumanReadablePath() const
const COMPONENT_NET & GetNet(unsigned aIndex) const
const KIID_PATH & GetPath() const
const wxString & GetReference() const
const wxString & GetValue() const
const nlohmann::ordered_map< wxString, wxString > & GetFields() const
const std::map< wxString, wxString > & GetProperties() const
NETLIST_GROUP * GetGroup() const
const std::vector< KIID > & GetKIIDs() const
bool GetDuplicatePadNumbersAreJumpers() const
const LIB_ID & GetFPID() const
unsigned GetNetCount() const
std::unordered_set< wxString > & GetComponentClassNames()
std::vector< std::set< wxString > > & JumperPadGroups()
void RemoveItem(EDA_ITEM *aItem)
Remove item from group.
void AddItem(EDA_ITEM *aItem)
Add item to group.
void SetName(const wxString &aName)
virtual EDA_GROUP * GetParentGroup() const
virtual void SetParent(EDA_ITEM *aParent)
virtual void SetVisible(bool aVisible)
virtual void SetText(const wxString &aText)
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
wxString AsString() const
wxString GetUniStringLibId() const
Handle the data for a net.
void SetIsCurrent(bool isCurrent)
static const int UNCONNECTED
Constant that holds the "unconnected net" number (typically 0) all items "connected" to this net are ...
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
unsigned GetCount() const
COMPONENT * GetComponentByPath(const KIID_PATH &aPath)
Return a COMPONENT by aPath.
COMPONENT * GetComponentByReference(const wxString &aReference)
Return a COMPONENT by aReference.
NETLIST_GROUP * GetGroupByUuid(const KIID &aUuid)
Return a NETLIST_GROUP by aUuid.
COMPONENT * GetComponent(unsigned aIndex)
Return the COMPONENT at aIndex.
static REPORTER & GetInstance()
const wxString & GetPinFunction() const
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
DISPLAY_OPTIONS m_Display
PCBNEW_SETTINGS * GetPcbNewSettings() const
FOOTPRINT * LoadFootprint(const LIB_ID &aFootprintId)
Attempt 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.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Return the BOARD_DESIGN_SETTINGS for the open project.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
The main frame for Pcbnew.
void OnModify() override
Must be called after a board change to set the modified flag.
void ExchangeFootprint(FOOTPRINT *aExisting, FOOTPRINT *aNew, BOARD_COMMIT &aCommit, bool deleteExtraTexts=true, bool resetTextLayers=true, bool resetTextEffects=true, bool resetFabricationAttrs=true, bool resetTextContent=true, bool resetClearanceOverrides=true, bool reset3DModels=true, bool *aUpdated=nullptr)
Replace aExisting footprint by aNew footprint using the Existing footprint settings (position,...
void SetName(const wxString &aName)
A set of BOARD_ITEMs (i.e., without duplicates).
EDA_ITEM * AsEdaItem() override
void StyleFromSettings(const BOARD_DESIGN_SETTINGS &settings) override
virtual void SetPosition(const VECTOR2I &aPos) override
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
virtual REPORTER & ReportTail(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the end of the list, for objects that support report ordering.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID
A quick note on layer IDs:
KICOMMON_API wxString MessageTextFromValue(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A helper to convert the double length aValue to a string in inches, millimeters, or unscaled units.
Class to handle a set of BOARD_ITEMs.
wxString EscapeHTML(const wxString &aString)
Return a new wxString escaped for embedding in HTML.
wxString UnescapeString(const wxString &aSource)
constexpr int mmToIU(double mm) const
bool m_DisplayInvertYAxis
bool m_DisplayInvertXAxis
bool m_ShowGlobalRatsnest
wxString GetCanonicalFieldName(FIELD_T aFieldType)
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)