From 8300e17b692a0e67428b511785ba2a89f065365a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 26 Dec 2020 16:05:07 +0000 Subject: [PATCH] Fix botched attempt to report hole violations between no-net items. Fixes https://gitlab.com/kicad/code/kicad/issues/6851 --- .../drc_test_provider_copper_clearance.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index 9ddea1aec0..b1b54aad4e 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -271,16 +271,6 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( TRACK* track, SHA int actual; VECTOR2I pos; - // It would really be better to know what particular nets a nettie should allow, but for now - // it is what it is. - if( isNetTie( other ) ) - testClearance = false; - - BOARD_CONNECTED_ITEM* otherCItem = dynamic_cast( other ); - - if( otherCItem && otherCItem->GetNetCode() == track->GetNetCode() ) - testClearance = false; - if( testClearance ) { constraint = m_drcEngine->EvalRulesForItems( CLEARANCE_CONSTRAINT, track, other, layer ); @@ -470,6 +460,16 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances() // Filter: [&]( BOARD_ITEM* other ) -> bool { + // It would really be better to know what particular nets a nettie + // should allow, but for now it is what it is. + if( isNetTie( other ) ) + return false; + + auto otherCItem = dynamic_cast( other ); + + if( otherCItem && otherCItem->GetNetCode() == track->GetNetCode() ) + return false; + BOARD_ITEM* a = track; BOARD_ITEM* b = other;