Move drilled NPTH holes to hole-clearance checking. Edge-clearance

checking is just for milled holes (slots).

Fixes https://gitlab.com/kicad/code/kicad/issues/12980
This commit is contained in:
Jeff Young 2022-11-23 13:31:11 +00:00
parent 651b3f1349
commit 5de4bfde93
1 changed files with 7 additions and 2 deletions

View File

@ -239,8 +239,13 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run()
{
for( PAD* pad : footprint->Pads() )
{
if( pad->GetAttribute() == PAD_ATTRIB::NPTH )
edgesTree.Insert( pad, Edge_Cuts, m_largestEdgeClearance );
if( pad->GetAttribute() == PAD_ATTRIB::NPTH && pad->HasHole() )
{
// edge-clearances are for milling tolerances (drilling tolerances are handled
// by hole-clearances)
if( pad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG )
edgesTree.Insert( pad, Edge_Cuts, m_largestEdgeClearance );
}
if( pad->GetProperty() == PAD_PROP::CASTELLATED )
m_castellatedPads.push_back( pad );