Must clear arcs before calling Clipper.

This commit is contained in:
Jeff Young 2022-03-04 12:11:07 +00:00
parent c837209f45
commit 878c4d2f6b
2 changed files with 10 additions and 2 deletions

View File

@ -1056,7 +1056,7 @@ bool ZONE::BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly, PCB_LAYER_ID aLayer
return false; return false;
// Processing of arc shapes in zones is not yet supported because Clipper can't do boolean // 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; SHAPE_POLY_SET flattened = *m_Poly;
flattened.ClearArcs(); flattened.ClearArcs();

View File

@ -936,7 +936,15 @@ void ZONE_FILLER::subtractHigherPriorityZones( const ZONE* aZone, PCB_LAYER_ID a
return; return;
if( aKnockout->GetCachedBoundingBox().Intersects( aZone->GetCachedBoundingBox() ) ) 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 );
}
}; };
for( ZONE* otherZone : m_board->Zones() ) for( ZONE* otherZone : m_board->Zones() )