|
|
@ -1165,35 +1165,39 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const |
|
|
|
|
|
|
|
void BOARD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) |
|
|
|
{ |
|
|
|
wxString txt; |
|
|
|
int viasCount = 0; |
|
|
|
int trackSegmentsCount = 0; |
|
|
|
int padCount = 0; |
|
|
|
int viaCount = 0; |
|
|
|
int trackSegmentCount = 0; |
|
|
|
std::set<int> netCodes; |
|
|
|
int unconnected = GetConnectivity()->GetUnconnectedCount(); |
|
|
|
|
|
|
|
for( PCB_TRACK* item : m_tracks ) |
|
|
|
{ |
|
|
|
if( item->Type() == PCB_VIA_T ) |
|
|
|
viasCount++; |
|
|
|
viaCount++; |
|
|
|
else |
|
|
|
trackSegmentsCount++; |
|
|
|
} |
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), GetPadCount() ); |
|
|
|
aList.emplace_back( _( "Pads" ), txt ); |
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), viasCount ); |
|
|
|
aList.emplace_back( _( "Vias" ), txt ); |
|
|
|
trackSegmentCount++; |
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), trackSegmentsCount ); |
|
|
|
aList.emplace_back( _( "Track Segments" ), txt ); |
|
|
|
if( item->GetNetCode() > 0 ) |
|
|
|
netCodes.insert( item->GetNetCode() ); |
|
|
|
} |
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), GetNodesCount() ); |
|
|
|
aList.emplace_back( _( "Nodes" ), txt ); |
|
|
|
for( FOOTPRINT* footprint : Footprints() ) |
|
|
|
{ |
|
|
|
for( PAD* pad : footprint->Pads() ) |
|
|
|
{ |
|
|
|
padCount++; |
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), m_NetInfo.GetNetCount() - 1 /* Don't include "No Net" in count */ ); |
|
|
|
aList.emplace_back( _( "Nets" ), txt ); |
|
|
|
if( pad->GetNetCode() > 0 ) |
|
|
|
netCodes.insert( pad->GetNetCode() ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
txt.Printf( wxT( "%d" ), GetConnectivity()->GetUnconnectedCount() ); |
|
|
|
aList.emplace_back( _( "Unrouted" ), txt ); |
|
|
|
aList.emplace_back( _( "Pads" ), wxString::Format( "%d", padCount ) ); |
|
|
|
aList.emplace_back( _( "Vias" ), wxString::Format( "%d", viaCount ) ); |
|
|
|
aList.emplace_back( _( "Track Segments" ), wxString::Format( "%d", trackSegmentCount ) ); |
|
|
|
aList.emplace_back( _( "Nets" ), wxString::Format( "%d", (int) netCodes.size() ) ); |
|
|
|
aList.emplace_back( _( "Unrouted" ), wxString::Format( "%d", unconnected ) ); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1925,17 +1929,6 @@ const std::vector<PAD*> BOARD::GetPads() const |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
unsigned BOARD::GetPadCount() const |
|
|
|
{ |
|
|
|
unsigned retval = 0; |
|
|
|
|
|
|
|
for( FOOTPRINT* footprint : Footprints() ) |
|
|
|
retval += footprint->Pads().size(); |
|
|
|
|
|
|
|
return retval; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const std::vector<BOARD_CONNECTED_ITEM*> BOARD::AllConnectedItems() |
|
|
|
{ |
|
|
|
std::vector<BOARD_CONNECTED_ITEM*> items; |
|
|
|