Must clear arcs before calling Clipper.

This commit is contained in:
Jeff Young 2022-03-04 12:11:07 +00:00
parent 7aebc4b11f
commit 46d423a164
2 changed files with 8 additions and 2 deletions

View File

@ -1149,7 +1149,7 @@ bool ZONE::BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly, PCB_LAYER_ID aLayer
return false;
// Processing of arc shapes in zones is not yet supported because Clipper can't do boolean
// operations on them. The poly outline must be flattened first.
// operations on them. The poly outline must be converted to segments first.
SHAPE_POLY_SET flattened = *m_Poly;
flattened.ClearArcs();

View File

@ -1006,7 +1006,13 @@ void ZONE_FILLER::subtractHigherPriorityZones( const ZONE* aZone, PCB_LAYER_ID a
if( aKnockout->GetCachedBoundingBox().Intersects( aZone->GetCachedBoundingBox() ) )
{
aRawFill.BooleanSubtract( *aKnockout->Outline(), SHAPE_POLY_SET::PM_FAST );
// Processing of arc shapes in zones is not yet supported because Clipper
// can't do boolean operations on them. The poly outline must be converted to
// segments first.
SHAPE_POLY_SET outline = *aKnockout->Outline();
outline.ClearArcs();
aRawFill.BooleanSubtract( outline, SHAPE_POLY_SET::PM_FAST );
}
};