Test pad:hole violations in footprints as long as not same pad number.

Fixes https://gitlab.com/kicad/code/kicad/issues/12124
This commit is contained in:
Jeff Young 2022-08-07 19:49:11 +01:00
parent 51b905ba32
commit 015bde8cb0
2 changed files with 4 additions and 3 deletions

View File

@ -497,8 +497,8 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
if( fp->IsNetTie() && ( other->Type() == PCB_FP_SHAPE_T || other->Type() == PCB_PAD_T ) )
testClearance = false;
// No hole testing within a footprint
testHoles = false;
if( other->Type() == PCB_PAD_T && pad->SameLogicalPadAs( static_cast<PAD*>( other ) ) )
testHoles = false;
}
PAD* otherPad = nullptr;

View File

@ -158,7 +158,8 @@ public:
bool SameLogicalPadAs( const PAD* other ) const
{
// hide tricks behind sensible API
return GetParentFootprint() == other->GetParentFootprint() && m_number == other->m_number;
return GetParentFootprint() == other->GetParentFootprint()
&& !m_number.IsEmpty() && m_number == other->m_number;
}
/**