64 SetIcon( BITMAPS::show_ratsnest );
86 std::shared_ptr<NET_CONTEXT_MENU> netSubMenu = std::make_shared<NET_CONTEXT_MENU>();
87 netSubMenu->SetTool(
this );
90 auto showNetMenuFunc =
93 if( aSelection.Empty() )
96 for(
const EDA_ITEM* item : aSelection )
98 switch( item->Type() )
127 menu.
AddMenu( netSubMenu.get(), showNetMenuFunc, 100 );
135 m_frame = getEditFrame<PCB_EDIT_FRAME>();
148 bool* aCourtyardError )
160 *aCompileError =
true;
164 zone->CacheBoundingBox();
169 zone->CacheBoundingBox();
174 *aCourtyardError =
true;
201 + wxString::Format(
_(
"[netclass %s]" ),
212 r->
Report(
_(
"Report incomplete: could not compile custom design rules." )
213 + wxS(
" " )
214 + wxS(
"<a href='$CUSTOM_RULES'>" ) +
_(
"Show design rules." ) + wxS(
"</a>" ) );
251 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
260 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
269 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
275 auto menuDescription =
278 wxString menuItemLabel = aAction.GetMenuLabel();
279 wxMenuBar* menuBar =
m_frame->GetMenuBar();
281 for(
size_t ii = 0; ii < menuBar->GetMenuCount(); ++ii )
283 for( wxMenuItem* menuItem : menuBar->GetMenu( ii )->GetMenuItems() )
285 if( menuItem->GetItemLabelText() == menuItemLabel )
287 wxString menuTitleLabel = menuBar->GetMenuLabelText( ii );
289 menuTitleLabel.Replace( wxS(
"&" ), wxS(
"&&" ) );
290 menuItemLabel.Replace( wxS(
"&" ), wxS(
"&&" ) );
292 return wxString::Format(
_(
"Run %s > %s" ),
299 return wxString::Format(
_(
"Run %s" ), aAction.GetFriendlyName() );
335 return wxEmptyString;
368 bool compileError =
false;
369 bool courtyardError =
false;
370 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
375 wxString clearanceStr;
377 switch( aDRCItem->GetErrorCode() )
381 for(
KIID id : aDRCItem->GetIDs() )
390 reportHeader(
_(
"Diff pair uncoupled length resolution for:" ), ac, bc, r );
398 r->
Report( wxString::Format(
_(
"Resolved max uncoupled length: %s." ),
413 r->
Report( wxString::Format(
_(
"Resolved height constraints: min %s; max %s." ),
428 r->
Report( wxString::Format(
_(
"Resolved thickness constraints: min %s; max %s." ),
443 r->
Report( wxString::Format(
_(
"Resolved width constraints: min %s; max %s." ),
458 r->
Report( wxString::Format(
_(
"Resolved angle constraints: min %s; max %s." ),
465 reportHeader(
_(
"Track segment length resolution for:" ), a, r );
473 r->
Report( wxString::Format(
_(
"Resolved segment length constraints: min %s; max %s." ),
480 reportHeader(
_(
"Connection width resolution for:" ), a, b, r );
488 r->
Report( wxString::Format(
_(
"Resolved min connection width: %s." ),
502 r->
Report( wxString::Format(
_(
"Resolved diameter constraints: min %s; max %s." ),
509 reportHeader(
_(
"Via annular width resolution for:" ), a, r );
517 r->
Report( wxString::Format(
_(
"Resolved annular width constraints: min %s; max %s." ),
533 r->
Report( wxString::Format(
_(
"Resolved hole size constraints: min %s; max %s." ),
540 reportHeader(
_(
"Hole clearance resolution for:" ), a, b, r );
548 r->
Report(
_(
"Items belong to the same net. Clearance is 0." ) );
557 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
563 reportHeader(
_(
"Physical hole clearance resolution for:" ), a, b, layer, r );
572 r->
Report(
_(
"No 'physical_hole_clearance' constraints defined." ) );
577 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
584 reportHeader(
_(
"Hole-to-hole clearance resolution for:" ), a, b, r );
594 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
599 reportHeader(
_(
"Edge clearance resolution for:" ), a, b, r );
609 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
632 &&
static_cast<PAD*
>( a )->GetAttribute() == PAD_ATTRIB::SMD )
643 reportHeader(
_(
"Clearance resolution for:" ), a, b, layer, r );
651 r->
Report(
_(
"Items belong to the same net. Clearance is 0." ) );
660 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
666 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, layer, r );
675 r->
Report(
_(
"No 'physical_clearance' constraints defined." ) );
680 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
692 drcEngine->ProcessAssertions( a, [](
const DRC_CONSTRAINT* c ){}, r );
702 dialog->
Show(
true );
712 wxCHECK( selTool, 0 );
758 auto checkFootprint =
761 PAD* foundPad =
nullptr;
765 if( !foundPad ||
pad->SameLogicalPadAs( foundPad ) )
778 a = checkFootprint(
static_cast<FOOTPRINT*
>( a ) );
781 b = checkFootprint(
static_cast<FOOTPRINT*
>( b ) );
789 wxCHECK( dialog, 0 );
804 ZONE* zone =
dynamic_cast<ZONE*
>( a );
811 bool compileError =
false;
812 bool courtyardError =
false;
813 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
815 if( copperIntersection.any() && zone &&
pad && zone->
GetNetCode() ==
pad->GetNetCode() )
825 reportHeader(
_(
"Zone connection resolution for:" ), a, b, layer, r );
827 constraint = drcEngine->EvalZoneConnection(
pad, zone, layer, r );
833 reportHeader(
_(
"Thermal-relief gap resolution for:" ), a, b, layer, r );
842 r->
Report( wxString::Format(
_(
"Resolved thermal relief gap: %s." ),
847 reportHeader(
_(
"Thermal-relief spoke width resolution for:" ), a, b, layer, r );
856 r->
Report( wxString::Format(
_(
"Resolved spoke width: %s." ),
861 reportHeader(
_(
"Thermal-relief min spoke count resolution for:" ), a, b, layer, r );
870 r->
Report( wxString::Format(
_(
"Resolved min spoke count: %d." ),
873 std::shared_ptr<CONNECTIVITY_DATA> connectivity =
pad->GetBoard()->GetConnectivity();
879 reportHeader(
_(
"Zone clearance resolution for:" ), a, b, layer, r );
883 r->
Report( wxString::Format(
_(
"Zone clearance: %s." ),
893 r->
Report( wxString::Format(
_(
"Overridden by larger physical clearance from %s;"
899 if( !
pad->FlashLayer( layer ) )
909 r->
Report( wxString::Format(
_(
"Overridden by larger physical hole clearance "
910 "from %s; clearance: %s." ),
920 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
927 reportHeader(
_(
"Zone clearance resolution for:" ), a, b, layer, r );
934 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
940 else if( copperIntersection.any() && !aFP && !bFP )
944 if( !copperIntersection.test( layer ) )
945 layer = copperIntersection.
Seq().front();
948 reportHeader(
_(
"Clearance resolution for:" ), a, b, layer, r );
953 r->
Report(
_(
"Items belong to the same net. Min clearance is 0." ) );
968 r->
Report(
_(
"Min clearance is 0." ) );
972 r->
Report( wxString::Format(
_(
"Resolved clearance: %s; clearance will not be "
978 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
996 reportHeader(
_(
"Diff-pair gap resolution for:" ), ac, bc, active, r );
1001 r->
Report( wxString::Format(
_(
"Resolved gap constraints: min %s; opt %s; max %s." ),
1009 reportHeader(
_(
"Diff-pair max uncoupled length resolution for:" ), ac, bc,
1015 r->
Report(
_(
"No 'diff_pair_uncoupled' constraints defined." ) );
1022 r->
Report( wxString::Format(
_(
"Resolved max uncoupled length: %s." ),
1029 auto isOnCorrespondingLayer=
1041 if( aItem->
IsOnLayer( correspondingMask ) )
1044 if( aItem->
IsTented( correspondingMask ) && aItem->
IsOnLayer( correspondingCopper ) )
1046 *aWarning = wxString::Format(
_(
"Note: %s is tented; clearance will only be "
1047 "applied to holes." ),
1059 if( ( a->
IsOnLayer( layer ) && isOnCorrespondingLayer( b, layer, &warning ) )
1060 || ( b->
IsOnLayer( layer ) && isOnCorrespondingLayer( a, layer, &warning ) ) )
1063 reportHeader(
_(
"Silkscreen clearance resolution for:" ), a, b, layer, r );
1073 if( !warning.IsEmpty() )
1076 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1088 if( aCourtyard && bCourtyard )
1091 reportHeader(
_(
"Courtyard clearance resolution for:" ), a, b, layer, r );
1100 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1110 bool pageAdded =
false;
1135 reportHeader(
_(
"Hole clearance resolution for:" ), a, b, layer, r );
1144 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1164 reportHeader(
_(
"Hole-to-hole clearance resolution for:" ), a, b, r );
1173 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1202 r = dialog->
AddHTMLPage( layerName + wxS(
" " ) +
_(
"Clearance" ) );
1203 reportHeader(
_(
"Edge clearance resolution for:" ), a, b, layer, r );
1212 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1228 r->
Report(
_(
"No 'physical_clearance' constraints defined." ) );
1232 LSET reportLayers = layerIntersection;
1233 bool reported =
false;
1239 reportLayers |= edgeInteractingLayers;
1246 reportLayers |= edgeInteractingLayers;
1252 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, layer, r );
1257 if( constraint.
IsNull() )
1260 r->
Report( wxString::Format(
_(
"No 'physical_clearance' constraints in effect on %s." ),
1266 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1277 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, r );
1279 r->
Report(
_(
"Items share no relevant layers. No 'physical_clearance' constraints will "
1297 reportHeader(
_(
"Physical hole clearance resolution for:" ), a, b, layer, r );
1309 r->
Report(
_(
"No 'physical_hole_clearance' constraints defined." ) );
1314 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1322 dialog->
Show(
true );
1329#define EVAL_RULES( constraint, a, b, layer, r ) drcEngine->EvalRules( constraint, a, b, layer, r )
1335 wxCHECK( selTool, 0 );
1347 wxCHECK( dialog, 0 );
1357 bool compileError =
false;
1358 bool courtyardError =
false;
1359 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
1366 reportHeader(
_(
"Track width resolution for:" ), item, r );
1374 r->
Report( wxString::Format(
_(
"Resolved width constraints: min %s; opt %s; max %s." ),
1385 reportHeader(
_(
"Via diameter resolution for:" ), item, r );
1394 r->
Report( wxString::Format(
_(
"Resolved diameter constraints: min %s; opt %s; max %s." ),
1402 reportHeader(
_(
"Via annular width resolution for:" ), item, r );
1411 r->
Report( wxString::Format(
_(
"Resolved annular width constraints: min %s; opt %s; max %s." ),
1432 r->
Report( wxString::Format(
_(
"Resolved hole size constraints: min %s; opt %s; max %s." ),
1443 reportHeader(
_(
"Text height resolution for:" ), item, r );
1451 r->
Report( wxString::Format(
_(
"Resolved height constraints: min %s; opt %s; max %s." ),
1459 reportHeader(
_(
"Text thickness resolution for:" ), item, r );
1467 r->
Report( wxString::Format(
_(
"Resolved thickness constraints: min %s; opt %s; max %s." ),
1483 if( courtyardError )
1486 r->
Report(
_(
"Report may be incomplete: some footprint courtyards are malformed." )
1487 + wxS(
" " )
1488 + wxS(
"<a href='$DRC'>" ) +
_(
"Run DRC for a full analysis." )
1495 r->
Report(
_(
"Item <b>disallowed</b> at current location." ) );
1497 r->
Report(
_(
"Item allowed at current location." ) );
1507 if( courtyardError )
1510 r->
Report(
_(
"Report may be incomplete: some footprint courtyards are malformed." )
1511 + wxS(
" " )
1512 + wxS(
"<a href='$DRC'>" ) +
_(
"Run DRC for a full analysis." )
1516 drcEngine->ProcessAssertions( item, [](
const DRC_CONSTRAINT* c ){}, r );
1520 dialog->
Show(
true );
1531 wxCHECK( selTool, 0 );
1537 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
1539 BOARD_ITEM* item = aCollector[ i ];
1541 if( !dynamic_cast<FOOTPRINT*>( item ) )
1542 aCollector.Remove( item );
1562 wxCHECK( selTool, 0 );
1595 r->
Report( wxS(
"<h7>" ) +
_(
"Board vs library diff for:" ) + wxS(
"</h7>" ) );
1597 + wxS(
"<li>" ) +
_(
"Library: " ) +
EscapeHTML( libName ) + wxS(
"</li>" )
1598 + wxS(
"<li>" ) +
_(
"Library item: " ) +
EscapeHTML( fpName ) + wxS(
"</li></ul>" ) );
1608 libTableRow = libTable->
FindRow( libName );
1616 r->
Report(
_(
"The library is not included in the current configuration." )
1617 + wxS(
"  " )
1618 + wxS(
"<a href='$CONFIG'>" ) +
_(
"Manage Footprint Libraries" )
1622 else if( !libTable->
HasLibrary( libName,
true ) )
1624 r->
Report(
_(
"The library is not enabled in the current configuration." )
1625 + wxS(
"  " )
1626 + wxS(
"<a href='$CONFIG'>" ) +
_(
"Manage Footprint Libraries" )
1632 std::shared_ptr<FOOTPRINT> libFootprint;
1636 libFootprint.reset( libTable->
FootprintLoad( libName, fpName,
true ) );
1644 r->
Report( wxString::Format(
_(
"The library no longer contains the item %s." ),
1650 r->
Report(
_(
"No relevant differences detected." ) );
1662 dialog->
Show(
true );
1668 wxBoxSizer* sizer =
new wxBoxSizer( wxVERTICAL );
1672 sizer->Add( diffWidget, 1, wxEXPAND | wxALL, 5 );
1673 aParentPanel->SetSizer( sizer );
1674 aParentPanel->Layout();
1693 bool request3DviewRedraw =
frame()->GetPcbNewSettings()->m_Display.m_Live3DRefresh;
1696 request3DviewRedraw =
false;
1699 if( request3DviewRedraw )
1713 bool enableHighlight =
false;
1718 std::set<int> netcodes;
1723 netcodes.insert( ci->GetNetCode() );
1726 enableHighlight = !netcodes.empty();
1728 if( enableHighlight && netcodes.size() > 1 )
1735 for(
int multiNet : netcodes )
1743 else if( enableHighlight )
1745 net = *netcodes.begin();
1769 bool saved =
filter.lockedItems;
1770 filter.lockedItems =
true;
1774 filter.lockedItems = saved;
1782 for(
int i = collector.GetCount() - 1; i >= 0; i-- )
1784 LSET itemLayers = collector[i]->GetLayerSet();
1787 ( highContrast && !itemLayers.
Contains( contrastLayer ) ) )
1789 collector.Remove( i );
1794 enableHighlight = ( collector.GetCount() > 0 );
1797 if( enableHighlight )
1808 const std::set<int>& netcodes = settings->GetHighlightNetCodes();
1811 if( !aUseSelection && netcodes.size() == 1 && netcodes.contains( net ) )
1812 enableHighlight = !settings->IsHighlightEnabled();
1814 if( enableHighlight != settings->IsHighlightEnabled() || !netcodes.count( net ) )
1816 if( !netcodes.empty() )
1817 m_lastHighlighted = netcodes;
1819 settings->SetHighlight( enableHighlight, net );
1820 m_toolMgr->GetView()->UpdateAllLayersColor();
1824 if( enableHighlight && net >= 0 )
1826 m_currentlyHighlighted = netcodes;
1827 board->SetHighLightNet( net );
1828 board->HighLightON();
1834 std::vector<MSG_PANEL_ITEM> items;
1836 m_frame->SetMsgPanel( items );
1837 m_frame->SendCrossProbeNetName( netinfo->
GetNetname() );
1842 m_currentlyHighlighted.clear();
1843 board->ResetNetHighLight();
1844 m_frame->SetMsgPanel( board );
1845 m_frame->SendCrossProbeNetName(
"" );
1861 settings->SetHighlight(
true, netcode );
1873 std::set<int> temp = highlighted;
1919 picker->
SetCursor( KICURSOR::BULLSEYE );
1944 for(
PAD*
pad : fp->Pads() )
1952 if(
PAD*
pad = dyn_cast<PAD*>( item) )
1954 pad->SetLocalRatsnestVisible( !
pad->GetLocalRatsnestVisible() );
1956 else if(
FOOTPRINT* fp = dyn_cast<FOOTPRINT*>( item) )
1958 if( !fp->Pads().empty() )
1960 bool enable = !fp->Pads()[0]->GetLocalRatsnestVisible();
1962 for(
PAD* childPad : fp->Pads() )
1963 childPad->SetLocalRatsnestVisible( enable );
1975 [
this,
board](
int aCondition )
1981 for(
PAD*
pad : fp->Pads() )
2005 auto&
selection = selectionTool->GetSelection();
2006 auto connectivity = getModel<BOARD>()->GetConnectivity();
2010 connectivity->ClearLocalRatsnest();
2025 getModel<BOARD>()->GetConnectivity()->ClearLocalRatsnest();
2038 std::vector<BOARD_ITEM*> items;
2041 for( std::size_t i = 0; i < queued_items.size(); ++i )
2043 if( !queued_items[i]->IsBOARD_ITEM() )
2048 wxCHECK2( item,
continue );
2055 items.push_back(
pad );
2062 queued_items.push_back( aItem );
2064 RECURSE_MODE::RECURSE );
2068 if( boardItem->GetLocalRatsnestVisible() ||
displayOptions().m_ShowModuleRatsnest )
2069 items.push_back( boardItem );
2073 if( items.empty() || std::none_of( items.begin(), items.end(),
2076 return( aItem->Type() == PCB_TRACE_T
2077 || aItem->Type() == PCB_PAD_T
2078 || aItem->Type() == PCB_ARC_T
2079 || aItem->Type() == PCB_ZONE_T
2080 || aItem->Type() == PCB_FOOTPRINT_T
2081 || aItem->Type() == PCB_VIA_T
2082 || aItem->Type() == PCB_SHAPE_T );
2091 connectivity->BlockRatsnestItems( items );
2130 if( bci->GetNetCode() > 0 )
static TOOL_ACTION pickerTool
bool IsTogglingNetclassRatsnestVisibility()
void OnNetVisibilityChanged(int aNetCode, bool aVisibility)
Notifies the panel when a net has been hidden or shown via the external tool.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
wxString GetNetname() const
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual bool IsConnected() const
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
virtual bool IsTented(PCB_LAYER_ID aLayer) const
Checks if the given object is tented (its copper shape is covered by solder mask) on a given side of ...
virtual void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction, RECURSE_MODE aMode) const
Invoke a function on all children.
virtual bool HasDrilledHole() const
virtual bool IsOnCopperLayer() const
virtual bool HasHole() const
Information pertinent to a Pcbnew printed circuit board.
void SetHighLightNet(int aNetCode, bool aMulti=false)
Select the netcode to be highlighted.
BOARD_ITEM * GetItem(const KIID &aID) const
const ZONES & Zones() const
void ResetNetHighLight()
Reset all high light data to the init state.
const FOOTPRINTS & Footprints() const
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
PROJECT * GetProject() const
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
void HighLightON(bool aValue=true)
Enable or disable net highlighting.
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
int GetCount() const
Return the number of objects in the list.
void Move(const VECTOR2I &aDelta)
Moves the connectivity list anchors.
Dialog to show common board info.
wxPanel * AddBlankPage(const wxString &aTitle)
WX_HTML_REPORT_BOX * AddHTMLPage(const wxString &aTitle)
bool Show(bool show) override
ZONE_CONNECTION m_ZoneConnection
static int MatchDpSuffix(const wxString &aNetName, wxString &aComplementNet, wxString &aBaseDpName)
Check if the given net is a diff pair, returning its polarity and complement if so.
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, WX_INFOBAR::MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
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 base class for most all the KiCad significant classes used in schematics and boards.
virtual wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const
Return a user-visible description string of this item.
KICAD_T Type() const
Returns the type of object.
EDA_ITEM_FLAGS GetFlags() const
const FP_LIB_TABLE_ROW * FindRow(const wxString &aNickName, bool aCheckIfEnabled=false)
Return an FP_LIB_TABLE_ROW if aNickName is found in this table or in any chained fall back table frag...
FOOTPRINT * FootprintLoad(const wxString &aNickname, const wxString &aFootprintName, bool aKeepUUID=false)
Load a footprint having aFootprintName from the library given by aNickname.
A general implementation of a COLLECTORS_GUIDE.
void SetIgnoreZoneFills(bool ignore)
void SetPreferredLayer(PCB_LAYER_ID aLayer)
Used when the right click button is pressed, or when the select tool is in effect.
void Collect(BOARD_ITEM *aItem, const std::vector< KICAD_T > &aScanList, const VECTOR2I &aRefPos, const COLLECTORS_GUIDE &aGuide)
Scan a BOARD_ITEM using this class's Inspector method, which does the collection.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
PCB specific render settings.
std::set< int > & GetHiddenNets()
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
const std::set< int > & GetHighlightNetCodes() const
Return the netcode of currently highlighted net.
PCB_LAYER_ID GetPrimaryHighContrastLayer() const
Return the board layer which is in high-contrast mode.
bool GetHighContrast() const
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
bool IsBOARD_ITEM() const
void UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
virtual int GetTopLayer() const
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
void MarkTargetDirty(int aTarget)
Set or clear target 'dirty' flag.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
A logical library item identifier and consists of various portions much like a URI.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Hold a record identifying a library accessed by the appropriate plug in object in the LIB_TABLE.
bool HasLibrary(const wxString &aNickname, bool aCheckEnabled=false) const
Test for the existence of aNickname in the library table.
LSET is a set of PCB_LAYER_IDs.
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
static LSET PhysicalLayersMask()
Return a mask holding all layers which are physically realized.
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
bool Contains(PCB_LAYER_ID aLayer) const
See if the layer set contains a PCB layer.
const wxString GetHumanReadableName() const
Gets the consolidated name of this netclass (which may be an aggregate).
Handle the data for a net.
const wxString & GetNetname() const
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Return the information about the NETINFO_ITEM in aList to display in the message panel.
const VECTOR2I & GetDrillSize() const
PAD_ATTRIB GetAttribute() const
static TOOL_ACTION highlightItem
static TOOL_ACTION toggleNetHighlight
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
static TOOL_ACTION highlightNet
static TOOL_ACTION hideNetInRatsnest
static TOOL_ACTION hideLocalRatsnest
static TOOL_ACTION showNetInRatsnest
static TOOL_ACTION cleanupTracksAndVias
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION toggleLastNetHighlight
static TOOL_ACTION inspectConstraints
static TOOL_ACTION clearHighlight
static TOOL_ACTION inspectClearance
static TOOL_ACTION updateLocalRatsnest
static TOOL_ACTION diffFootprint
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
static TOOL_ACTION showFootprintAssociations
static TOOL_ACTION highlightNetSelection
static TOOL_ACTION boardStatistics
static TOOL_ACTION localRatsnestTool
wxString GetDesignRulesPath()
Return the absolute path to the design rules file for the currently-loaded board.
APPEARANCE_CONTROLS * GetAppearancePanel()
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual PCB_LAYER_ID GetActiveLayer() const
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
void RedrawRatsnest()
Return the bounding box of the view that should be used if model is not valid.
DIALOG_BOOK_REPORTER * GetInspectDrcErrorDialog()
void SendCrossProbeItem(BOARD_ITEM *aSyncItem)
Send a message to the schematic editor so that it may move its cursor to an item with the same refere...
DIALOG_BOOK_REPORTER * GetFootprintDiffDialog()
DIALOG_BOOK_REPORTER * GetInspectClearanceDialog()
void SendCrossProbeNetName(const wxString &aNetName)
Send a net name to Eeschema for highlighting.
DIALOG_BOOK_REPORTER * GetInspectConstraintsDialog()
A set of BOARD_ITEMs (i.e., without duplicates).
std::unordered_set< BOARD_ITEM * > & GetItems()
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
Container for project specific data.
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.
virtual KIGFX::VIEW_ITEM * GetItem(unsigned int aIdx) const override
int Size() const
Returns the number of selected parts.
bool Empty() const
Checks if there is anything selected.
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
wxString StringFromValue(double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
Converts aValue in internal units into a united string.
A slimmed down version of WX_HTML_REPORT_PANEL.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
void Flush()
Build the HTML messages page.
Handle a list of polygons defining a copper zone.
std::optional< int > GetLocalClearance() const override
virtual bool IsOnLayer(PCB_LAYER_ID) const override
Test to see if this object is on the given layer.
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
@ DRCE_DRILL_OUT_OF_RANGE
@ DRCE_TRACK_SEGMENT_LENGTH
@ DRCE_DRILLED_HOLES_TOO_CLOSE
@ DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG
@ DRCE_MICROVIA_DRILL_OUT_OF_RANGE
@ DRCE_LIB_FOOTPRINT_MISMATCH
@ ANNULAR_WIDTH_CONSTRAINT
@ COURTYARD_CLEARANCE_CONSTRAINT
@ VIA_DIAMETER_CONSTRAINT
@ DIFF_PAIR_GAP_CONSTRAINT
@ SILK_CLEARANCE_CONSTRAINT
@ EDGE_CLEARANCE_CONSTRAINT
@ MIN_RESOLVED_SPOKES_CONSTRAINT
@ TRACK_SEGMENT_LENGTH_CONSTRAINT
@ TEXT_THICKNESS_CONSTRAINT
@ PHYSICAL_HOLE_CLEARANCE_CONSTRAINT
@ THERMAL_SPOKE_WIDTH_CONSTRAINT
@ CONNECTION_WIDTH_CONSTRAINT
@ THERMAL_RELIEF_GAP_CONSTRAINT
@ MAX_UNCOUPLED_CONSTRAINT
@ HOLE_CLEARANCE_CONSTRAINT
@ PHYSICAL_CLEARANCE_CONSTRAINT
@ HOLE_TO_HOLE_CONSTRAINT
#define MALFORMED_COURTYARDS
bool IsFrontLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a front layer.
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
PCB_LAYER_ID
A quick note on layer IDs:
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
Class to handle a set of BOARD_ITEMs.
std::vector< FAB_LAYER_COLOR > dummy
wxString EscapeHTML(const wxString &aString)
Return a new wxString escaped for embedding in HTML.
A filename or source description, a problem input line, a line number, a byte offset,...
bool m_ShowGlobalRatsnest
This file contains data structures that are saved in the project file or project local settings file ...
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
VECTOR2< int32_t > VECTOR2I