Don't consider heatsink, castellated or fiducial pads for THT vs SMD.

Also fixes a bug where the Footprint Checker's marker list wasn't cleared
correctly from the last run.

Fixes https://gitlab.com/kicad/code/kicad/issues/9821
This commit is contained in:
Jeff Young 2021-11-29 16:44:45 +00:00
parent dede3f5709
commit 3af65936c1
2 changed files with 21 additions and 1 deletions

View File

@ -96,6 +96,8 @@ void DIALOG_FOOTPRINT_CHECKER::runChecks()
FOOTPRINT* footprint = board->GetFirstFootprint();
wxString msg;
SetMarkersProvider( new BOARD_DRC_ITEMS_PROVIDER( board ) );
deleteAllMarkers();
if( !footprint )
@ -150,7 +152,7 @@ void DIALOG_FOOTPRINT_CHECKER::runChecks()
footprint->CheckFootprintTHPadNoHoles( &tstHoleInTHPad );
m_checksRun = true;
SetMarkersProvider( new BOARD_DRC_ITEMS_PROVIDER( m_frame->GetBoard() ) );
SetMarkersProvider( new BOARD_DRC_ITEMS_PROVIDER( board ) );
refreshEditor();
}

View File

@ -657,14 +657,32 @@ int FOOTPRINT::GetLikelyAttribute() const
for( PAD* pad : m_pads )
{
switch( pad->GetProperty() )
{
case PAD_PROP::FIDUCIAL_GLBL:
case PAD_PROP::FIDUCIAL_LOCAL:
continue;
case PAD_PROP::HEATSINK:
case PAD_PROP::CASTELLATED:
continue;
case PAD_PROP::NONE:
case PAD_PROP::BGA:
case PAD_PROP::TESTPOINT:
break;
}
switch( pad->GetAttribute() )
{
case PAD_ATTRIB::PTH:
tht_count++;
break;
case PAD_ATTRIB::SMD:
smd_count++;
break;
default:
break;
}