Browse Source

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
7.0
Seth Hillbrand 3 years ago
parent
commit
f34aa947d3
  1. 6
      pcbnew/zone_filler.cpp

6
pcbnew/zone_filler.cpp

@ -525,7 +525,7 @@ bool ZONE_FILLER::Fill( std::vector<ZONE*>& 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<ZONE*>& aZones, bool aCheck, wxWindow* aPare
std::vector<SHAPE_LINE_CHAIN>& 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 );
}

Loading…
Cancel
Save