From f600450ee62ab566b4f283a981f730efc01fb314 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 1 Nov 2020 12:22:29 +0000 Subject: [PATCH] DRC_TEST_PROVIDER_COPPER_CLEARANCES is for copper only. Fixes https://gitlab.com/kicad/code/kicad/issues/6248 --- pcbnew/drc/drc_test_provider_copper_clearance.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index 23678540e4..b9c7b42148 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -194,7 +194,13 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run() zone->CacheBoundingBox(); m_zoneTrees[ zone ] = std::make_unique(); - m_zoneTrees[ zone ]->insert( zone ); + + for( int layer : zone->GetLayerSet().Seq() ) + { + if( IsCopperLayer( layer ) ) + m_zoneTrees[ zone ]->insert( zone, layer ); + } + } reportAux( "Testing %d copper items and %d zones...", count, m_zones.size() );