Don't run clearance tests on unflashed NPTH pad layers.

This commit is contained in:
Jeff Young 2021-01-03 23:26:42 +00:00
parent d0b82ea26e
commit 33aa6edb01
1 changed files with 17 additions and 3 deletions

View File

@ -162,9 +162,6 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run()
if( !reportProgress( ii++, count, delta ) )
return false;
if( item->Type() == PCB_FP_TEXT_T && !static_cast<FP_TEXT*>( item )->IsVisible() )
return true;
m_copperTree.Insert( item, m_largestClearance );
return true;
};
@ -271,6 +268,14 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( TRACK* track, SHA
int actual;
VECTOR2I pos;
if( other->Type() == PCB_PAD_T )
{
PAD* pad = static_cast<PAD*>( other );
if( pad->GetAttribute() == PAD_ATTRIB_NPTH && !pad->FlashLayer( layer ) )
testClearance = false;
}
if( testClearance )
{
constraint = m_drcEngine->EvalRulesForItems( CLEARANCE_CONSTRAINT, track, other, layer );
@ -520,6 +525,12 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
testClearance = false;
}
if( pad->GetAttribute() == PAD_ATTRIB_NPTH && !pad->FlashLayer( layer ) )
testClearance = false;
if( !IsCopperLayer( layer ) )
testClearance = false;
// Track clearances are tested in testTrackClearances()
if( dynamic_cast<TRACK*>( other) )
testClearance = false;
@ -615,6 +626,9 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
// Pads of the same (defined) net get a waiver on clearance tests
if( pad->GetNetCode() && otherPad->GetNetCode() == pad->GetNetCode() )
testClearance = false;
if( otherPad->GetAttribute() == PAD_ATTRIB_NPTH && !otherPad->FlashLayer( layer ) )
testClearance = false;
}
if( testClearance )