Run hole clearance tests on NPTH pads, but not copper clearance.

Fixes https://gitlab.com/kicad/code/kicad/issues/8295
This commit is contained in:
Jeff Young 2021-04-25 17:49:59 +01:00
parent b7279c0bab
commit e3eacafbcb
2 changed files with 2 additions and 3 deletions

View File

@ -513,7 +513,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
testHoles = false; testHoles = false;
} }
if( pad->GetAttribute() == PAD_ATTRIB_NPTH && !pad->FlashLayer( layer ) ) if( pad->GetAttribute() == PAD_ATTRIB_NPTH )
testClearance = false; testClearance = false;
if( !IsCopperLayer( layer ) ) if( !IsCopperLayer( layer ) )

View File

@ -229,8 +229,7 @@ bool PAD::FlashLayer( int aLayer ) const
if( m_keepTopBottomLayer && ( aLayer == F_Cu || aLayer == B_Cu ) ) if( m_keepTopBottomLayer && ( aLayer == F_Cu || aLayer == B_Cu ) )
return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) ); return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
return board->GetConnectivity()->IsConnectedOnLayer( this, static_cast<int>( aLayer ), return board->GetConnectivity()->IsConnectedOnLayer( this, static_cast<int>( aLayer ), types );
types );
} }