From f34aa947d329ead34fcd6d3ed6225791142c6b0b Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 31 Jan 2023 12:28:19 -0800 Subject: [PATCH] Allow on-outline zones to be considered inside Also ensure that calculated areas for island removal are absolute. The on-outline zone can happen when the clearance to the edge is particularly small. Fixes https://gitlab.com/kicad/code/kicad/issues/13717 --- pcbnew/zone_filler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index b66bfa467f..8ca4210f44 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -525,7 +525,7 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWindow* aPare if( mode == ISLAND_REMOVAL_MODE::ALWAYS ) poly->DeletePolygonAndTriangulationData( idx, false ); - else if ( mode == ISLAND_REMOVAL_MODE::AREA && outline.Area() < minArea ) + else if ( mode == ISLAND_REMOVAL_MODE::AREA && outline.Area( true ) < minArea ) poly->DeletePolygonAndTriangulationData( idx, false ); else zone.m_zone->SetIsIsland( layer, idx ); @@ -563,8 +563,8 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWindow* aPare std::vector& island = poly->Polygon( ii ); if( island.empty() - || !m_boardOutline.Contains( island.front().CPoint( 0 ) ) - || island.front().Area() < minArea ) + || !m_boardOutline.Contains( island.front().CPoint( 0 ), -1, 1 ) + || island.front().Area( true ) < minArea ) { poly->DeletePolygonAndTriangulationData( ii, false ); }