From 1dae5eb7c429a44043b39be0bfafc855b164cf98 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 10 Apr 2022 19:48:45 +0100 Subject: [PATCH] A better blob vs web detector. Since we're in a deflated state, a long web *could* still have a very small area. So check max extents instead. --- pcbnew/zone_filler.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index b7486148b9..83097beb77 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -1125,14 +1125,13 @@ bool ZONE_FILLER::fillCopperZone( const ZONE* aZone, PCB_LAYER_ID aLayer, PCB_LA // Min-thickness is the web thickness. On the other hand, a blob min-thickness by // min-thickness is not useful. Since there's no obvious definition of web vs. blob, we - // arbitrarily choose "at least 2X the area". - double minArea = (double) aZone->GetMinThickness() * aZone->GetMinThickness() * 2; - + // arbitrarily choose "at least 1/2 min-thickness on one axis". for( int ii = aFillPolys.OutlineCount() - 1; ii >= 0; ii-- ) { std::vector& island = aFillPolys.Polygon( ii ); + EDA_RECT islandExtents = island.front().BBox(); - if( island.empty() || island.front().Area() < minArea ) + if( islandExtents.GetSizeMax() < half_min_width ) aFillPolys.DeletePolygon( ii ); }