88 std::shared_ptr<NET_CONTEXT_MENU> netSubMenu = std::make_shared<NET_CONTEXT_MENU>();
89 netSubMenu->SetTool(
this );
92 auto showNetMenuFunc =
95 if( aSelection.Empty() )
98 for(
const EDA_ITEM* item : aSelection )
100 switch( item->Type() )
111 if( !
static_cast<const PCB_SHAPE*
>( item )->IsOnCopperLayer() )
129 menu.
AddMenu( netSubMenu.get(), showNetMenuFunc, 100 );
150 bool* aCourtyardError )
152 auto engine = std::make_unique<DRC_ENGINE>(
m_frame->GetBoard(),
153 &
m_frame->GetBoard()->GetDesignSettings() );
157 engine->InitEngine(
m_frame->GetDesignRulesPath() );
162 *aCompileError =
true;
166 zone->CacheBoundingBox();
171 zone->CacheBoundingBox();
176 *aCourtyardError =
true;
203 + wxString::Format(
_(
"[netclass %s]" ),
214 r->
Report(
_(
"Report incomplete: could not compile custom design rules." )
215 + wxS(
" " )
216 + wxS(
"<a href='$CUSTOM_RULES'>" ) +
_(
"Show design rules." ) + wxS(
"</a>" ) );
239 wxString layerStr =
_(
"Layer" ) + wxS(
" " ) +
m_frame->GetBoard()->GetLayerName( aLayer );
253 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
262 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
271 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
277 auto menuDescription =
280 wxString menuItemLabel = aAction.GetMenuLabel();
281 wxMenuBar* menuBar =
m_frame->GetMenuBar();
283 for(
size_t ii = 0; ii < menuBar->GetMenuCount(); ++ii )
285 for( wxMenuItem* menuItem : menuBar->GetMenu( ii )->GetMenuItems() )
287 if( menuItem->GetItemLabelText() == menuItemLabel )
289 wxString menuTitleLabel = menuBar->GetMenuLabelText( ii );
291 menuTitleLabel.Replace( wxS(
"&" ), wxS(
"&&" ) );
292 menuItemLabel.Replace( wxS(
"&" ), wxS(
"&&" ) );
294 return wxString::Format(
_(
"Run %s > %s" ),
301 return wxString::Format(
_(
"Run %s" ), aAction.GetFriendlyName() );
337 return wxEmptyString;
345 wxCHECK( drcTool &&
m_frame, );
372 bool compileError =
false;
373 bool courtyardError =
false;
374 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
379 wxString clearanceStr;
381 switch( aDRCItem->GetErrorCode() )
385 for(
KIID id : aDRCItem->GetIDs() )
394 reportHeader(
_(
"Diff pair uncoupled length resolution for:" ), ac, bc, r );
402 r->
Report( wxString::Format(
_(
"Resolved max uncoupled length: %s." ),
417 r->
Report( wxString::Format(
_(
"Resolved height constraints: min %s; max %s." ),
432 r->
Report( wxString::Format(
_(
"Resolved thickness constraints: min %s; max %s." ),
447 r->
Report( wxString::Format(
_(
"Resolved width constraints: min %s; max %s." ),
462 r->
Report( wxString::Format(
_(
"Resolved angle constraints: min %s; max %s." ),
469 reportHeader(
_(
"Track segment length resolution for:" ), a, r );
477 r->
Report( wxString::Format(
_(
"Resolved segment length constraints: min %s; max %s." ),
484 reportHeader(
_(
"Connection width resolution for:" ), a, b, r );
492 r->
Report( wxString::Format(
_(
"Resolved min connection width: %s." ),
506 r->
Report( wxString::Format(
_(
"Resolved diameter constraints: min %s; max %s." ),
513 reportHeader(
_(
"Via annular width resolution for:" ), a, r );
521 r->
Report( wxString::Format(
_(
"Resolved annular width constraints: min %s; max %s." ),
537 r->
Report( wxString::Format(
_(
"Resolved hole size constraints: min %s; max %s." ),
544 reportHeader(
_(
"Hole clearance resolution for:" ), a, b, r );
552 r->
Report(
_(
"Items belong to the same net. Clearance is 0." ) );
561 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
567 reportHeader(
_(
"Physical hole clearance resolution for:" ), a, b, layer, r );
576 r->
Report(
_(
"No 'physical_hole_clearance' constraints defined." ) );
581 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
588 reportHeader(
_(
"Hole-to-hole clearance resolution for:" ), a, b, r );
598 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
603 reportHeader(
_(
"Edge clearance resolution for:" ), a, b, r );
613 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
647 reportHeader(
_(
"Clearance resolution for:" ), a, b, layer, r );
655 r->
Report(
_(
"Items belong to the same net. Clearance is 0." ) );
664 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
670 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, layer, r );
679 r->
Report(
_(
"No 'physical_clearance' constraints defined." ) );
684 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
696 drcEngine->ProcessAssertions( a, [](
const DRC_CONSTRAINT* c ){}, r );
706 dialog->
Show(
true );
716 wxCHECK( selTool, 0 );
722 m_frame->ShowInfoBarError(
_(
"Select two items for a clearance resolution report." ) );
726 if( !
selection.GetItem( 0 )->IsBOARD_ITEM() || !
selection.GetItem( 1 )->IsBOARD_ITEM() )
738 m_frame->ShowInfoBarError(
_(
"Cannot generate clearance report on empty group." ) );
751 m_frame->ShowInfoBarError(
_(
"Cannot generate clearance report on empty group." ) );
762 auto checkFootprint =
765 PAD* foundPad =
nullptr;
769 if( !foundPad ||
pad->SameLogicalPadAs( foundPad ) )
782 a = checkFootprint(
static_cast<FOOTPRINT*
>( a ) );
785 b = checkFootprint(
static_cast<FOOTPRINT*
>( b ) );
793 wxCHECK( dialog, 0 );
808 ZONE* zone =
dynamic_cast<ZONE*
>( a );
815 bool compileError =
false;
816 bool courtyardError =
false;
817 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
819 if( copperIntersection.any() && zone &&
pad && zone->
GetNetCode() ==
pad->GetNetCode() )
829 reportHeader(
_(
"Zone connection resolution for:" ), a, b, layer, r );
831 constraint = drcEngine->EvalZoneConnection(
pad, zone, layer, r );
837 reportHeader(
_(
"Thermal-relief gap resolution for:" ), a, b, layer, r );
846 r->
Report( wxString::Format(
_(
"Resolved thermal relief gap: %s." ),
847 m_frame->StringFromValue( gap,
true ) ) );
851 reportHeader(
_(
"Thermal-relief spoke width resolution for:" ), a, b, layer, r );
860 r->
Report( wxString::Format(
_(
"Resolved spoke width: %s." ),
861 m_frame->StringFromValue( width,
true ) ) );
865 reportHeader(
_(
"Thermal-relief min spoke count resolution for:" ), a, b, layer, r );
874 r->
Report( wxString::Format(
_(
"Resolved min spoke count: %d." ),
877 std::shared_ptr<CONNECTIVITY_DATA> connectivity =
pad->GetBoard()->GetConnectivity();
883 reportHeader(
_(
"Zone clearance resolution for:" ), a, b, layer, r );
887 r->
Report( wxString::Format(
_(
"Zone clearance: %s." ),
897 r->
Report( wxString::Format(
_(
"Overridden by larger physical clearance from %s;"
903 if( !
pad->FlashLayer( layer ) )
913 r->
Report( wxString::Format(
_(
"Overridden by larger physical hole clearance "
914 "from %s; clearance: %s." ),
924 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
931 reportHeader(
_(
"Zone clearance resolution for:" ), a, b, layer, r );
938 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
939 m_frame->StringFromValue( 0,
true ) ) );
944 else if( copperIntersection.any() && !aFP && !bFP )
948 if( !copperIntersection.test( layer ) )
949 layer = copperIntersection.
Seq().front();
952 reportHeader(
_(
"Clearance resolution for:" ), a, b, layer, r );
957 r->
Report(
_(
"Items belong to the same net. Min clearance is 0." ) );
972 r->
Report(
_(
"Min clearance is 0." ) );
976 r->
Report( wxString::Format(
_(
"Resolved clearance: %s; clearance will not be "
982 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1000 reportHeader(
_(
"Diff-pair gap resolution for:" ), ac, bc, active, r );
1005 r->
Report( wxString::Format(
_(
"Resolved gap constraints: min %s; opt %s; max %s." ),
1013 reportHeader(
_(
"Diff-pair max uncoupled length resolution for:" ), ac, bc,
1019 r->
Report(
_(
"No 'diff_pair_uncoupled' constraints defined." ) );
1026 r->
Report( wxString::Format(
_(
"Resolved max uncoupled length: %s." ),
1033 auto isOnCorrespondingLayer=
1045 if( aItem->
IsOnLayer( correspondingMask ) )
1048 if( aItem->
IsTented( correspondingMask ) && aItem->
IsOnLayer( correspondingCopper ) )
1050 *aWarning = wxString::Format(
_(
"Note: %s is tented; clearance will only be "
1051 "applied to holes." ),
1063 if( ( a->
IsOnLayer( layer ) && isOnCorrespondingLayer( b, layer, &warning ) )
1064 || ( b->
IsOnLayer( layer ) && isOnCorrespondingLayer( a, layer, &warning ) ) )
1067 reportHeader(
_(
"Silkscreen clearance resolution for:" ), a, b, layer, r );
1077 if( !warning.IsEmpty() )
1080 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1092 if( aCourtyard && bCourtyard )
1095 reportHeader(
_(
"Courtyard clearance resolution for:" ), a, b, layer, r );
1104 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1114 bool pageAdded =
false;
1130 reportHeader(
_(
"Hole clearance resolution for:" ), a, b, layer, r );
1139 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1159 reportHeader(
_(
"Hole-to-hole clearance resolution for:" ), a, b, r );
1168 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1196 wxString layerName =
m_frame->GetBoard()->GetLayerName( edgeLayer );
1197 r = dialog->
AddHTMLPage( layerName + wxS(
" " ) +
_(
"Clearance" ) );
1198 reportHeader(
_(
"Edge clearance resolution for:" ), a, b, layer, r );
1207 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1223 r->
Report(
_(
"No 'physical_clearance' constraints defined." ) );
1227 LSET reportLayers = layerIntersection;
1228 bool reported =
false;
1234 reportLayers |= edgeInteractingLayers;
1241 reportLayers |= edgeInteractingLayers;
1247 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, layer, r );
1252 if( constraint.
IsNull() )
1255 r->
Report( wxString::Format(
_(
"No 'physical_clearance' constraints in effect on %s." ),
1256 m_frame->GetBoard()->GetLayerName( layer ) ) );
1261 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1272 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, r );
1274 r->
Report(
_(
"Items share no relevant layers. No 'physical_clearance' constraints will "
1292 reportHeader(
_(
"Physical hole clearance resolution for:" ), a, b, layer, r );
1304 r->
Report(
_(
"No 'physical_hole_clearance' constraints defined." ) );
1309 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1317 dialog->
Show(
true );
1324#define EVAL_RULES( constraint, a, b, layer, r ) drcEngine->EvalRules( constraint, a, b, layer, r )
1330 wxCHECK( selTool, 0 );
1336 m_frame->ShowInfoBarError(
_(
"Select an item for a constraints resolution report." ) );
1342 wxCHECK( dialog, 0 );
1346 if( !
selection.GetItem( 0 )->IsBOARD_ITEM() )
1352 bool compileError =
false;
1353 bool courtyardError =
false;
1354 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
1361 reportHeader(
_(
"Track width resolution for:" ), item, r );
1369 r->
Report( wxString::Format(
_(
"Resolved width constraints: min %s; opt %s; max %s." ),
1380 reportHeader(
_(
"Via diameter resolution for:" ), item, r );
1389 r->
Report( wxString::Format(
_(
"Resolved diameter constraints: min %s; opt %s; max %s." ),
1397 reportHeader(
_(
"Via annular width resolution for:" ), item, r );
1406 r->
Report( wxString::Format(
_(
"Resolved annular width constraints: min %s; opt %s; max %s." ),
1426 r->
Report( wxString::Format(
_(
"Resolved hole size constraints: min %s; opt %s; max %s." ),
1437 reportHeader(
_(
"Solder mask expansion resolution for:" ), item, r );
1445 r->
Report( wxString::Format(
_(
"Resolved solder mask expansion: %s." ),
1454 reportHeader(
_(
"Solder paste absolute clearance resolution for:" ), item, r );
1462 r->
Report( wxString::Format(
_(
"Resolved solder paste absolute clearance: %s." ),
1465 reportHeader(
_(
"Solder paste relative clearance resolution for:" ), item, r );
1475 r->
Report( wxString::Format(
_(
"Resolved solder paste relative clearance: %s." ),
1484 reportHeader(
_(
"Text height resolution for:" ), item, r );
1492 r->
Report( wxString::Format(
_(
"Resolved height constraints: min %s; opt %s; max %s." ),
1500 reportHeader(
_(
"Text thickness resolution for:" ), item, r );
1508 r->
Report( wxString::Format(
_(
"Resolved thickness constraints: min %s; opt %s; max %s." ),
1524 if( courtyardError )
1527 r->
Report(
_(
"Report may be incomplete: some footprint courtyards are malformed." )
1528 + wxS(
" " )
1529 + wxS(
"<a href='$DRC'>" ) +
_(
"Run DRC for a full analysis." )
1536 r->
Report(
_(
"Item <b>disallowed</b> at current location." ) );
1538 r->
Report(
_(
"Item allowed at current location." ) );
1548 if( courtyardError )
1551 r->
Report(
_(
"Report may be incomplete: some footprint courtyards are malformed." )
1552 + wxS(
" " )
1553 + wxS(
"<a href='$DRC'>" ) +
_(
"Run DRC for a full analysis." )
1557 drcEngine->ProcessAssertions( item, [](
const DRC_CONSTRAINT* c ){}, r );
1561 dialog->
Show(
true );
1572 wxCHECK( selTool, 0 );
1578 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
1583 aCollector.
Remove( item );
1590 m_frame->ShowInfoBarError(
_(
"Select a footprint to diff with its library equivalent." ) );
1602 wxCHECK( selTool, 0 );
1608 m_frame->ShowInfoBarError(
_(
"Select a footprint for a footprint associations report." ) );
1635 r->
Report( wxS(
"<h7>" ) +
_(
"Board vs library diff for:" ) + wxS(
"</h7>" ) );
1637 + wxS(
"<li>" ) +
_(
"Library: " ) +
EscapeHTML( libName ) + wxS(
"</li>" )
1638 + wxS(
"<li>" ) +
_(
"Library item: " ) +
EscapeHTML( fpName ) + wxS(
"</li></ul>" ) );
1648 libTableRow = libTable->
FindRow( libName );
1656 r->
Report(
_(
"The library is not included in the current configuration." )
1657 + wxS(
"  " )
1658 + wxS(
"<a href='$CONFIG'>" ) +
_(
"Manage Footprint Libraries" )
1662 else if( !libTable->
HasLibrary( libName,
true ) )
1664 r->
Report(
_(
"The library is not enabled in the current configuration." )
1665 + wxS(
"  " )
1666 + wxS(
"<a href='$CONFIG'>" ) +
_(
"Manage Footprint Libraries" )
1672 std::shared_ptr<FOOTPRINT> libFootprint;
1676 libFootprint.reset( libTable->
FootprintLoad( libName, fpName,
true ) );
1684 r->
Report( wxString::Format(
_(
"The library no longer contains the item %s." ),
1690 r->
Report(
_(
"No relevant differences detected." ) );
1706 dialog->
Show(
true );
1712 wxBoxSizer* sizer =
new wxBoxSizer( wxVERTICAL );
1716 sizer->Add( diffWidget, 1, wxEXPAND | wxALL, 5 );
1717 aParentPanel->SetSizer( sizer );
1718 aParentPanel->Layout();
1728 m_frame->m_probingSchToPcb =
true;
1735 m_frame->m_probingSchToPcb =
false;
1737 bool request3DviewRedraw =
frame()->GetPcbNewSettings()->m_Display.m_Live3DRefresh;
1740 request3DviewRedraw =
false;
1743 if( request3DviewRedraw )
1744 m_frame->Update3DView(
false,
true );
1757 bool enableHighlight =
false;
1762 std::set<int> netcodes;
1767 netcodes.insert( ci->GetNetCode() );
1770 enableHighlight = !netcodes.empty();
1772 if( enableHighlight && netcodes.size() > 1 )
1777 board->ResetNetHighLight();
1779 for(
int multiNet : netcodes )
1780 board->SetHighLightNet( multiNet,
true );
1782 board->HighLightON();
1783 m_toolMgr->GetView()->UpdateAllLayersColor();
1787 else if( enableHighlight )
1789 net = *netcodes.begin();
1814 bool saved =
filter.lockedItems;
1815 filter.lockedItems =
true;
1819 filter.lockedItems = saved;
1827 for(
int i = collector.
GetCount() - 1; i >= 0; i-- )
1829 LSET itemLayers = collector[i]->GetLayerSet();
1832 ( highContrast && !itemLayers.
Contains( contrastLayer ) ) )
1839 enableHighlight = ( collector.
GetCount() > 0 );
1842 if( enableHighlight )
1847 m_frame->SendCrossProbeItem( targetItem );
1856 if( !aUseSelection && netcodes.size() == 1 && netcodes.contains( net ) )
1861 if( !netcodes.empty() )
1865 m_toolMgr->GetView()->UpdateAllLayersColor();
1869 if( enableHighlight && net >= 0 )
1872 board->SetHighLightNet( net );
1873 board->HighLightON();
1879 std::vector<MSG_PANEL_ITEM> items;
1881 m_frame->SetMsgPanel( items );
1888 board->ResetNetHighLight();
1890 m_frame->SendCrossProbeNetName(
"" );
1901 const std::set<int>& highlighted = settings->GetHighlightNetCodes();
1906 settings->SetHighlight(
true, netcode );
1907 m_toolMgr->GetView()->UpdateAllLayersColor();
1918 std::set<int> temp = highlighted;
1920 m_toolMgr->GetView()->UpdateAllLayersColor();
1928 m_toolMgr->GetView()->UpdateAllLayersColor();
1947 board->ResetNetHighLight();
1949 m_toolMgr->GetView()->UpdateAllLayersColor();
1951 m_frame->SendCrossProbeNetName(
"" );
1968 [
this](
const VECTOR2D& pt ) ->
bool
1974 EDIT_TOOL::PadFilter );
1981 EDIT_TOOL::FootprintFilter );
1990 for(
PAD*
pad : fp->Pads() )
2000 pad->SetLocalRatsnestVisible( !
pad->GetLocalRatsnestVisible() );
2004 if( !fp->Pads().empty() )
2006 bool enable = !fp->Pads()[0]->GetLocalRatsnestVisible();
2008 for(
PAD* childPad : fp->Pads() )
2009 childPad->SetLocalRatsnestVisible( enable );
2021 [
this](
int aCondition )
2027 for(
PAD*
pad : fp->Pads() )
2051 auto&
selection = selectionTool->GetSelection();
2056 connectivity->ClearLocalRatsnest();
2084 std::vector<BOARD_ITEM*> items;
2087 for( std::size_t i = 0; i < queued_items.size(); ++i )
2089 if( !queued_items[i]->IsBOARD_ITEM() )
2094 wxCHECK2( item,
continue );
2101 items.push_back(
pad );
2108 queued_items.push_back( aItem );
2114 if( boardItem->GetLocalRatsnestVisible() ||
displayOptions().m_ShowModuleRatsnest )
2115 items.push_back( boardItem );
2119 if( items.empty() || std::none_of( items.begin(), items.end(),
2122 return( aItem->Type() == PCB_TRACE_T
2123 || aItem->Type() == PCB_PAD_T
2124 || aItem->Type() == PCB_ARC_T
2125 || aItem->Type() == PCB_ZONE_T
2126 || aItem->Type() == PCB_FOOTPRINT_T
2127 || aItem->Type() == PCB_VIA_T
2128 || aItem->Type() == PCB_SHAPE_T );
2137 connectivity->BlockRatsnestItems( items );
2165 m_toolMgr->GetView()->GetPainter()->GetSettings() );
2170 if( aNetCode <= 0 && !
selection.Empty() )
2176 if( bci->GetNetCode() > 0 )
2189 if( !
m_frame->GetAppearancePanel()->IsTogglingNetclassRatsnestVisibility() )
2191 m_frame->GetCanvas()->RedrawRatsnest();
2192 m_frame->GetCanvas()->Refresh();
2194 m_frame->GetAppearancePanel()->OnNetVisibilityChanged( aNetCode, !aHide );
std::function< void(const VECTOR2I &, GENERAL_COLLECTOR &, PCB_SELECTION_TOOL *)> CLIENT_SELECTION_FILTER
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
static TOOL_ACTION pickerTool
static TOOL_ACTION selectionClear
Clear the current selection.
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.
PROJECT * GetProject() const
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 Remove(int aIndex)
Remove the item at aIndex (first position is 0).
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.
std::unordered_set< EDA_ITEM * > & GetItems()
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.
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)
void SetIgnoreNoNets(bool ignore)
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 IsHighlightEnabled() const
Return current highlight setting.
bool GetHighContrast() const
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
virtual int GetTopLayer() const
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
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.
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
static LSET AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
static const LSET & PhysicalLayersMask()
Return a mask holding all layers which are physically realized.
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 highlightNet
static TOOL_ACTION hideNetInRatsnest
static TOOL_ACTION hideLocalRatsnest
static TOOL_ACTION showNetInRatsnest
static TOOL_ACTION cleanupTracksAndVias
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 showFootprintAssociations
static TOOL_ACTION highlightNetSelection
static TOOL_ACTION boardStatistics
static TOOL_ACTION localRatsnestTool
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
A set of BOARD_ITEMs (i.e., without duplicates).
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)
Report a string with a given severity.
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
@ SOLDER_PASTE_ABS_MARGIN_CONSTRAINT
@ SOLDER_MASK_EXPANSION_CONSTRAINT
@ PHYSICAL_CLEARANCE_CONSTRAINT
@ SOLDER_PASTE_REL_MARGIN_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
@ SMD
Smd pad, appears on the solder paste layer (default)
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,...
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)
Casted dyn_cast(From aObject)
A lightweight dynamic downcast.
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D
@ THERMAL
Use thermal relief for pads.
@ NONE
Pads are not covered.