89 std::shared_ptr<NET_CONTEXT_MENU> netSubMenu = std::make_shared<NET_CONTEXT_MENU>();
90 netSubMenu->SetTool(
this );
93 auto showNetMenuFunc =
96 if( aSelection.Empty() )
99 for(
const EDA_ITEM* item : aSelection )
101 switch( item->Type() )
112 if( !
static_cast<const PCB_SHAPE*
>( item )->IsOnCopperLayer() )
130 menu.
AddMenu( netSubMenu.get(), showNetMenuFunc, 100 );
151 bool* aCourtyardError )
153 auto engine = std::make_unique<DRC_ENGINE>(
m_frame->GetBoard(),
154 &
m_frame->GetBoard()->GetDesignSettings() );
158 engine->InitEngine(
m_frame->GetDesignRulesPath() );
163 *aCompileError =
true;
167 zone->CacheBoundingBox();
172 zone->CacheBoundingBox();
177 *aCourtyardError =
true;
204 + wxString::Format(
_(
"[netclass %s]" ),
215 r->
Report(
_(
"Report incomplete: could not compile custom design rules." )
216 + wxS(
" " )
217 + wxS(
"<a href='$CUSTOM_RULES'>" ) +
_(
"Show design rules." ) + wxS(
"</a>" ) );
240 wxString layerStr =
_(
"Layer" ) + wxS(
" " ) +
m_frame->GetBoard()->GetLayerName( aLayer );
254 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
263 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
272 return wxT(
"<i>" ) +
_(
"undefined" ) + wxT(
"</i>" );
306 return wxEmptyString;
314 wxCHECK( drcTool &&
m_frame, );
335 bool compileError =
false;
336 bool courtyardError =
false;
337 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
342 wxString clearanceStr;
344 switch( aDRCItem->GetErrorCode() )
348 for(
KIID id : aDRCItem->GetIDs() )
357 reportHeader(
_(
"Diff pair uncoupled length resolution for:" ), ac, bc, r );
365 r->
Report( wxString::Format(
_(
"Resolved max uncoupled length: %s." ),
380 r->
Report( wxString::Format(
_(
"Resolved height constraints: min %s; max %s." ),
395 r->
Report( wxString::Format(
_(
"Resolved thickness constraints: min %s; max %s." ),
410 r->
Report( wxString::Format(
_(
"Resolved width constraints: min %s; max %s." ),
425 r->
Report( wxString::Format(
_(
"Resolved angle constraints: min %s; max %s." ),
432 reportHeader(
_(
"Track segment length resolution for:" ), a, r );
440 r->
Report( wxString::Format(
_(
"Resolved segment length constraints: min %s; max %s." ),
447 reportHeader(
_(
"Connection width resolution for:" ), a, b, r );
455 r->
Report( wxString::Format(
_(
"Resolved min connection width: %s." ),
469 r->
Report( wxString::Format(
_(
"Resolved diameter constraints: min %s; max %s." ),
476 reportHeader(
_(
"Via annular width resolution for:" ), a, r );
484 r->
Report( wxString::Format(
_(
"Resolved annular width constraints: min %s; max %s." ),
500 r->
Report( wxString::Format(
_(
"Resolved hole size constraints: min %s; max %s." ),
507 reportHeader(
_(
"Hole clearance resolution for:" ), a, b, r );
515 r->
Report(
_(
"Items belong to the same net. Clearance is 0." ) );
524 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
530 reportHeader(
_(
"Physical hole clearance resolution for:" ), a, b, layer, r );
539 r->
Report(
_(
"No 'physical_hole_clearance' constraints defined." ) );
544 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
551 reportHeader(
_(
"Hole-to-hole clearance resolution for:" ), a, b, r );
561 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
566 reportHeader(
_(
"Edge clearance resolution for:" ), a, b, r );
576 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
610 reportHeader(
_(
"Clearance resolution for:" ), a, b, layer, r );
618 r->
Report(
_(
"Items belong to the same net. Clearance is 0." ) );
627 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
633 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, layer, r );
642 r->
Report(
_(
"No 'physical_clearance' constraints defined." ) );
647 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ), clearanceStr ) );
659 drcEngine->ProcessAssertions( a, [](
const DRC_CONSTRAINT* c ){}, r );
669 dialog->
Show(
true );
679 wxCHECK( selTool, 0 );
685 m_frame->ShowInfoBarError(
_(
"Select two items for a clearance resolution report." ) );
689 if( !
selection.GetItem( 0 )->IsBOARD_ITEM() || !
selection.GetItem( 1 )->IsBOARD_ITEM() )
701 m_frame->ShowInfoBarError(
_(
"Cannot generate clearance report on empty group." ) );
714 m_frame->ShowInfoBarError(
_(
"Cannot generate clearance report on empty group." ) );
725 auto checkFootprint =
728 PAD* foundPad =
nullptr;
732 if( !foundPad ||
pad->SameLogicalPadAs( foundPad ) )
745 a = checkFootprint(
static_cast<FOOTPRINT*
>( a ) );
748 b = checkFootprint(
static_cast<FOOTPRINT*
>( b ) );
756 wxCHECK( dialog, 0 );
771 ZONE* zone =
dynamic_cast<ZONE*
>( a );
778 bool compileError =
false;
779 bool courtyardError =
false;
780 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
782 if( copperIntersection.any() && zone &&
pad && zone->
GetNetCode() ==
pad->GetNetCode() )
792 reportHeader(
_(
"Zone connection resolution for:" ), a, b, layer, r );
794 constraint = drcEngine->EvalZoneConnection(
pad, zone, layer, r );
800 reportHeader(
_(
"Thermal-relief gap resolution for:" ), a, b, layer, r );
809 r->
Report( wxString::Format(
_(
"Resolved thermal relief gap: %s." ),
810 m_frame->StringFromValue( gap,
true ) ) );
814 reportHeader(
_(
"Thermal-relief spoke width resolution for:" ), a, b, layer, r );
823 r->
Report( wxString::Format(
_(
"Resolved spoke width: %s." ),
824 m_frame->StringFromValue( width,
true ) ) );
828 reportHeader(
_(
"Thermal-relief min spoke count resolution for:" ), a, b, layer, r );
837 r->
Report( wxString::Format(
_(
"Resolved min spoke count: %d." ),
840 std::shared_ptr<CONNECTIVITY_DATA> connectivity =
pad->GetBoard()->GetConnectivity();
846 reportHeader(
_(
"Zone clearance resolution for:" ), a, b, layer, r );
850 r->
Report( wxString::Format(
_(
"Zone clearance: %s." ),
860 r->
Report( wxString::Format(
_(
"Overridden by larger physical clearance from %s;"
866 if( !
pad->FlashLayer( layer ) )
876 r->
Report( wxString::Format(
_(
"Overridden by larger physical hole clearance "
877 "from %s; clearance: %s." ),
887 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
894 reportHeader(
_(
"Zone clearance resolution for:" ), a, b, layer, r );
901 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
902 m_frame->StringFromValue( 0,
true ) ) );
907 else if( copperIntersection.any() && !aFP && !bFP )
911 if( !copperIntersection.test( layer ) )
912 layer = copperIntersection.
Seq().front();
915 reportHeader(
_(
"Clearance resolution for:" ), a, b, layer, r );
920 r->
Report(
_(
"Items belong to the same net. Min clearance is 0." ) );
935 r->
Report(
_(
"Min clearance is 0." ) );
939 r->
Report( wxString::Format(
_(
"Resolved clearance: %s; clearance will not be "
945 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
963 reportHeader(
_(
"Diff-pair gap resolution for:" ), ac, bc, active, r );
968 r->
Report( wxString::Format(
_(
"Resolved gap constraints: min %s; opt %s; max %s." ),
976 reportHeader(
_(
"Diff-pair max uncoupled length resolution for:" ), ac, bc,
982 r->
Report(
_(
"No 'diff_pair_uncoupled' constraints defined." ) );
989 r->
Report( wxString::Format(
_(
"Resolved max uncoupled length: %s." ),
996 auto isOnCorrespondingLayer=
1008 if( aItem->
IsOnLayer( correspondingMask ) )
1011 if( aItem->
IsTented( correspondingMask ) && aItem->
IsOnLayer( correspondingCopper ) )
1013 *aWarning = wxString::Format(
_(
"Note: %s is tented; clearance will only be "
1014 "applied to holes." ),
1026 if( ( a->
IsOnLayer( layer ) && isOnCorrespondingLayer( b, layer, &warning ) )
1027 || ( b->
IsOnLayer( layer ) && isOnCorrespondingLayer( a, layer, &warning ) ) )
1030 reportHeader(
_(
"Silkscreen clearance resolution for:" ), a, b, layer, r );
1040 if( !warning.IsEmpty() )
1043 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1055 if( aCourtyard && bCourtyard )
1058 reportHeader(
_(
"Courtyard clearance resolution for:" ), a, b, layer, r );
1067 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1077 bool pageAdded =
false;
1093 reportHeader(
_(
"Hole clearance resolution for:" ), a, b, layer, r );
1102 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1122 reportHeader(
_(
"Hole-to-hole clearance resolution for:" ), a, b, r );
1131 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1159 wxString layerName =
m_frame->GetBoard()->GetLayerName( edgeLayer );
1160 r = dialog->
AddHTMLPage( layerName + wxS(
" " ) +
_(
"Clearance" ) );
1161 reportHeader(
_(
"Edge clearance resolution for:" ), a, b, layer, r );
1170 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1186 r->
Report(
_(
"No 'physical_clearance' constraints defined." ) );
1190 LSET reportLayers = layerIntersection;
1191 bool reported =
false;
1197 reportLayers |= edgeInteractingLayers;
1204 reportLayers |= edgeInteractingLayers;
1210 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, layer, r );
1215 if( constraint.
IsNull() )
1218 r->
Report( wxString::Format(
_(
"No 'physical_clearance' constraints in effect on %s." ),
1219 m_frame->GetBoard()->GetLayerName( layer ) ) );
1224 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1235 reportHeader(
_(
"Physical clearance resolution for:" ), a, b, r );
1237 r->
Report(
_(
"Items share no relevant layers. No 'physical_clearance' constraints will "
1255 reportHeader(
_(
"Physical hole clearance resolution for:" ), a, b, layer, r );
1267 r->
Report(
_(
"No 'physical_hole_clearance' constraints defined." ) );
1272 r->
Report( wxString::Format(
_(
"Resolved min clearance: %s." ),
1280 dialog->
Show(
true );
1287#define EVAL_RULES( constraint, a, b, layer, r ) drcEngine->EvalRules( constraint, a, b, layer, r )
1293 wxCHECK( selTool, 0 );
1299 m_frame->ShowInfoBarError(
_(
"Select an item for a constraints resolution report." ) );
1305 wxCHECK( dialog, 0 );
1309 if( !
selection.GetItem( 0 )->IsBOARD_ITEM() )
1315 bool compileError =
false;
1316 bool courtyardError =
false;
1317 std::unique_ptr<DRC_ENGINE> drcEngine =
makeDRCEngine( &compileError, &courtyardError );
1324 reportHeader(
_(
"Track width resolution for:" ), item, r );
1332 r->
Report( wxString::Format(
_(
"Resolved width constraints: min %s; opt %s; max %s." ),
1343 reportHeader(
_(
"Via diameter resolution for:" ), item, r );
1352 r->
Report( wxString::Format(
_(
"Resolved diameter constraints: min %s; opt %s; max %s." ),
1360 reportHeader(
_(
"Via annular width resolution for:" ), item, r );
1369 r->
Report( wxString::Format(
_(
"Resolved annular width constraints: min %s; opt %s; max %s." ),
1389 r->
Report( wxString::Format(
_(
"Resolved hole size constraints: min %s; opt %s; max %s." ),
1400 reportHeader(
_(
"Solder mask expansion resolution for:" ), item, r );
1408 r->
Report( wxString::Format(
_(
"Resolved solder mask expansion: %s." ),
1417 reportHeader(
_(
"Solder paste absolute clearance resolution for:" ), item, r );
1425 r->
Report( wxString::Format(
_(
"Resolved solder paste absolute clearance: %s." ),
1428 reportHeader(
_(
"Solder paste relative clearance resolution for:" ), item, r );
1438 r->
Report( wxString::Format(
_(
"Resolved solder paste relative clearance: %s." ),
1447 reportHeader(
_(
"Text height resolution for:" ), item, r );
1455 r->
Report( wxString::Format(
_(
"Resolved height constraints: min %s; opt %s; max %s." ),
1463 reportHeader(
_(
"Text thickness resolution for:" ), item, r );
1471 r->
Report( wxString::Format(
_(
"Resolved thickness constraints: min %s; opt %s; max %s." ),
1487 if( courtyardError )
1490 r->
Report(
_(
"Report may be incomplete: some footprint courtyards are malformed." )
1491 + wxS(
" " )
1492 + wxS(
"<a href='$DRC'>" ) +
_(
"Run DRC for a full analysis." )
1499 r->
Report(
_(
"Item <b>disallowed</b> at current location." ) );
1501 r->
Report(
_(
"Item allowed at current location." ) );
1511 if( courtyardError )
1514 r->
Report(
_(
"Report may be incomplete: some footprint courtyards are malformed." )
1515 + wxS(
" " )
1516 + wxS(
"<a href='$DRC'>" ) +
_(
"Run DRC for a full analysis." )
1520 drcEngine->ProcessAssertions( item, [](
const DRC_CONSTRAINT* c ){}, r );
1524 dialog->
Show(
true );
1535 wxCHECK( selTool, 0 );
1541 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
1546 aCollector.
Remove( item );
1553 m_frame->ShowInfoBarError(
_(
"Select a footprint to diff with its library equivalent." ) );
1565 wxCHECK( selTool, 0 );
1571 m_frame->ShowInfoBarError(
_(
"Select a footprint for a footprint associations report." ) );
1599 r->
Report( wxS(
"<h7>" ) +
_(
"Board vs library diff for:" ) + wxS(
"</h7>" ) );
1601 + wxS(
"<li>" ) +
_(
"Library: " ) +
EscapeHTML( libName ) + wxS(
"</li>" )
1602 + wxS(
"<li>" ) +
_(
"Library item: " ) +
EscapeHTML( fpName ) + wxS(
"</li></ul>" ) );
1612 libTableRow = libTable->
FindRow( libName );
1620 r->
Report(
_(
"The library is not included in the current configuration." )
1621 + wxS(
"  " )
1622 + wxS(
"<a href='$CONFIG'>" ) +
_(
"Manage Footprint Libraries" )
1626 else if( !libTable->
HasLibrary( libName,
true ) )
1628 r->
Report(
_(
"The library is not enabled in the current configuration." )
1629 + wxS(
"  " )
1630 + wxS(
"<a href='$CONFIG'>" ) +
_(
"Manage Footprint Libraries" )
1636 std::shared_ptr<FOOTPRINT> libFootprint;
1640 libFootprint.reset( libTable->
FootprintLoad( libName, fpName,
true ) );
1648 r->
Report( wxString::Format(
_(
"The library no longer contains the item %s." ),
1654 r->
Report(
_(
"No relevant differences detected." ) );
1670 dialog->
Show(
true );
1676 wxBoxSizer* sizer =
new wxBoxSizer( wxVERTICAL );
1680 sizer->Add( diffWidget, 1, wxEXPAND | wxALL, 5 );
1681 aParentPanel->SetSizer( sizer );
1682 aParentPanel->Layout();
1692 m_frame->m_probingSchToPcb =
true;
1699 m_frame->m_probingSchToPcb =
false;
1701 bool request3DviewRedraw =
frame()->GetPcbNewSettings()->m_Display.m_Live3DRefresh;
1704 request3DviewRedraw =
false;
1707 if( request3DviewRedraw )
1708 m_frame->Update3DView(
false,
true );
1721 bool enableHighlight =
false;
1726 std::set<int> netcodes;
1731 netcodes.insert( ci->GetNetCode() );
1734 enableHighlight = !netcodes.empty();
1736 if( enableHighlight && netcodes.size() > 1 )
1741 board->ResetNetHighLight();
1743 for(
int multiNet : netcodes )
1744 board->SetHighLightNet( multiNet,
true );
1746 board->HighLightON();
1747 m_toolMgr->GetView()->UpdateAllLayersColor();
1751 else if( enableHighlight )
1753 net = *netcodes.begin();
1778 bool saved =
filter.lockedItems;
1779 filter.lockedItems =
true;
1783 filter.lockedItems = saved;
1791 for(
int i = collector.
GetCount() - 1; i >= 0; i-- )
1793 LSET itemLayers = collector[i]->GetLayerSet();
1796 ( highContrast && !itemLayers.
Contains( contrastLayer ) ) )
1803 enableHighlight = ( collector.
GetCount() > 0 );
1806 if( enableHighlight )
1811 m_frame->SendCrossProbeItem( targetItem );
1820 if( !aUseSelection && netcodes.size() == 1 && netcodes.contains( net ) )
1825 if( !netcodes.empty() )
1829 m_toolMgr->GetView()->UpdateAllLayersColor();
1833 if( enableHighlight && net >= 0 )
1836 board->SetHighLightNet( net );
1837 board->HighLightON();
1843 std::vector<MSG_PANEL_ITEM> items;
1845 m_frame->SetMsgPanel( items );
1852 board->ResetNetHighLight();
1854 m_frame->SendCrossProbeNetName(
"" );
1865 const std::set<int>& highlighted = settings->GetHighlightNetCodes();
1870 settings->SetHighlight(
true, netcode );
1871 m_toolMgr->GetView()->UpdateAllLayersColor();
1882 std::set<int> temp = highlighted;
1884 m_toolMgr->GetView()->UpdateAllLayersColor();
1892 m_toolMgr->GetView()->UpdateAllLayersColor();
1911 board->ResetNetHighLight();
1913 m_toolMgr->GetView()->UpdateAllLayersColor();
1915 m_frame->SendCrossProbeNetName(
"" );
1932 [
this](
const VECTOR2D& pt ) ->
bool
1938 EDIT_TOOL::PadFilter );
1945 EDIT_TOOL::FootprintFilter );
1954 for(
PAD*
pad : fp->Pads() )
1964 pad->SetLocalRatsnestVisible( !
pad->GetLocalRatsnestVisible() );
1968 if( !fp->Pads().empty() )
1970 bool enable = !fp->Pads()[0]->GetLocalRatsnestVisible();
1972 for(
PAD* childPad : fp->Pads() )
1973 childPad->SetLocalRatsnestVisible( enable );
1985 [
this](
int aCondition )
1991 for(
PAD*
pad : fp->Pads() )
2015 auto&
selection = selectionTool->GetSelection();
2020 connectivity->ClearLocalRatsnest();
2048 std::vector<BOARD_ITEM*> items;
2051 for( std::size_t i = 0; i < queued_items.size(); ++i )
2053 if( !queued_items[i]->IsBOARD_ITEM() )
2058 wxCHECK2( item,
continue );
2065 items.push_back(
pad );
2072 queued_items.push_back( aItem );
2078 if( boardItem->GetLocalRatsnestVisible() ||
displayOptions().m_ShowModuleRatsnest )
2079 items.push_back( boardItem );
2083 if( items.empty() || std::none_of( items.begin(), items.end(),
2086 return( aItem->Type() == PCB_TRACE_T
2087 || aItem->Type() == PCB_PAD_T
2088 || aItem->Type() == PCB_ARC_T
2089 || aItem->Type() == PCB_ZONE_T
2090 || aItem->Type() == PCB_FOOTPRINT_T
2091 || aItem->Type() == PCB_VIA_T
2092 || aItem->Type() == PCB_SHAPE_T );
2101 connectivity->BlockRatsnestItems( items );
2129 m_toolMgr->GetView()->GetPainter()->GetSettings() );
2134 if( aNetCode <= 0 && !
selection.Empty() )
2140 if( bci->GetNetCode() > 0 )
2153 if( !
m_frame->GetAppearancePanel()->IsTogglingNetclassRatsnestVisibility() )
2155 m_frame->GetCanvas()->RedrawRatsnest();
2156 m_frame->GetCanvas()->Refresh();
2158 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)
void SetUserItemID(const KIID &aID)
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 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.