From fd9fd1df051bacc435512940cae4a2bf0c6d8407 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 4 Apr 2022 15:00:15 +0100 Subject: [PATCH] Careful of skipping non-flashed pads for performance: they might still have a hole. --- pcbnew/zone_filler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 6719a84553..8fb40e7c04 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -570,7 +570,7 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer EDA_RECT padBBox = pad->GetBoundingBox(); padBBox.Inflate( m_worstClearance ); - if( !pad->IsOnLayer( aLayer ) || !padBBox.Intersects( aZone->GetCachedBoundingBox() ) ) + if( !padBBox.Intersects( aZone->GetCachedBoundingBox() ) ) continue; if( pad->GetNetCode() != aZone->GetNetCode() || pad->GetNetCode() <= 0 ) @@ -669,15 +669,17 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa [&]( PAD* aPad ) { int gap = 0; + bool hasHole = aPad->GetDrillSize().x > 0; bool flashLayer = aPad->FlashLayer( aLayer ); + bool platedHole = hasHole && aPad->GetAttribute() == PAD_ATTRIB::PTH; - if( flashLayer || aPad->GetDrillSize().x > 0 ) + if( flashLayer || platedHole ) gap = evalRulesForItems( CLEARANCE_CONSTRAINT, aZone, aPad, aLayer ); if( flashLayer ) addKnockout( aPad, aLayer, gap + extra_margin, aHoles ); - if( aPad->GetDrillSize().x > 0 ) + if( hasHole ) { gap = std::max( gap, evalRulesForItems( HOLE_CLEARANCE_CONSTRAINT, aZone, aPad, aLayer ) );