From da4b269783c4c67fd01755ac81171db1ad45c6a6 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 13 Jan 2021 12:27:58 +0000 Subject: [PATCH] Make sure pad local clearances get in to m_worstClearance. --- pcbnew/drc/drc_test_provider_copper_clearance.cpp | 9 +++++++++ pcbnew/zone_filler.cpp | 2 ++ 2 files changed, 11 insertions(+) diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index bf9b3e0e37..40a1fe18b6 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -128,15 +128,24 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run() for( ZONE* zone : m_board->Zones() ) { if( !zone->GetIsRuleArea() ) + { m_zones.push_back( zone ); + m_largestClearance = std::max( m_largestClearance, zone->GetLocalClearance() ); + } } for( FOOTPRINT* footprint : m_board->Footprints() ) { + for( PAD* pad : footprint->Pads() ) + m_largestClearance = std::max( m_largestClearance, pad->GetLocalClearance() ); + for( ZONE* zone : footprint->Zones() ) { if( !zone->GetIsRuleArea() ) + { m_zones.push_back( zone ); + m_largestClearance = std::max( m_largestClearance, zone->GetLocalClearance() ); + } } } diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 9c56e93873..8e123ae159 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -130,6 +130,8 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWindow* aPare pad->BuildEffectiveShapes( UNDEFINED_LAYER ); pad->BuildEffectivePolygon(); } + + m_worstClearance = std::max( m_worstClearance, pad->GetLocalClearance() ); } for( ZONE* zone : footprint->Zones() )