diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 69bb438781..92632c5336 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -1188,6 +1188,19 @@ bool ZONE_FILLER::computeRawFilledArea( const ZONE* aZone, if( half_min_width - epsilon > epsilon ) aRawPolys.Deflate( half_min_width - epsilon, numSegs, cornerStrategy ); + // 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; + + for( int ii = aFillPolys.OutlineCount() - 1; ii >= 0; ii-- ) + { + std::vector& island = aFillPolys.Polygon( ii ); + + if( island.empty() || island.front().Area() < minArea ) + aFillPolys.DeletePolygon( ii ); + } + DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In9_Cu, wxT( "deflated" ) ); if( m_progressReporter && m_progressReporter->IsCancelled() )