From 04f6f04bed47b39a3d3a2484333230c0878c73f4 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 26 Mar 2023 13:26:30 +0100 Subject: [PATCH] Test silk/mask collisions on the correct layer. Fixes https://gitlab.com/kicad/code/kicad/issues/14417 --- pcbnew/drc/drc_test_provider_solder_mask.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/drc/drc_test_provider_solder_mask.cpp b/pcbnew/drc/drc_test_provider_solder_mask.cpp index 8fa42f2e00..7b6f14d39a 100644 --- a/pcbnew/drc/drc_test_provider_solder_mask.cpp +++ b/pcbnew/drc/drc_test_provider_solder_mask.cpp @@ -290,6 +290,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testSilkToMaskClearance() if( !item->IsOnLayer( layer ) ) continue; + PCB_LAYER_ID maskLayer = layer == F_SilkS ? F_Mask : B_Mask; BOX2I itemBBox = item->GetBoundingBox(); DRC_CONSTRAINT constraint = m_drcEngine->EvalRules( SILK_CLEARANCE_CONSTRAINT, item, nullptr, layer ); @@ -302,7 +303,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testSilkToMaskClearance() std::shared_ptr itemShape = item->GetEffectiveShape( layer ); - if( m_fullSolderMaskRTree->QueryColliding( itemBBox, itemShape.get(), layer, + if( m_fullSolderMaskRTree->QueryColliding( itemBBox, itemShape.get(), maskLayer, clearance, &actual, &pos ) ) { auto drce = DRC_ITEM::Create( DRCE_SILK_CLEARANCE );