From 46d423a1643d5f68385701b311ae068eaebb48a9 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 4 Mar 2022 12:11:07 +0000 Subject: [PATCH] Must clear arcs before calling Clipper. --- pcbnew/zone.cpp | 2 +- pcbnew/zone_filler.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index b4c4231ef8..1e0a0d51fd 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -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(); diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 0e3de6f269..32b48069f8 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -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 ); } };