From 9ca35cbcee47ec844d491b4d4a9047b518e8aced Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 10 Mar 2022 09:10:48 -0800 Subject: [PATCH] Rework of a24cdcb3f0 Inflate with linked holes needs to account for fractured polygons, otherwise inflating with positive value will create rounded divots where overlapping fracture lines meet and inflating with negative value will create spaces between fracture lines. Calling Simplify before Inflate takes an inordinate amount of time as the Clipper healing routine is rather slow. Our own Unfracture is meant to heal the results of our Fracture routine and works much more quickly. After healing, we still call the Simplify routine --- libs/kimath/src/geometry/shape_poly_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/kimath/src/geometry/shape_poly_set.cpp b/libs/kimath/src/geometry/shape_poly_set.cpp index e9ff25b66b..c7502fbc64 100644 --- a/libs/kimath/src/geometry/shape_poly_set.cpp +++ b/libs/kimath/src/geometry/shape_poly_set.cpp @@ -717,8 +717,8 @@ void SHAPE_POLY_SET::BooleanIntersection( const SHAPE_POLY_SET& a, const SHAPE_P void SHAPE_POLY_SET::InflateWithLinkedHoles( int aFactor, int aCircleSegmentsCount, POLYGON_MODE aFastMode ) { + Unfracture( aFastMode ); Inflate( aFactor, aCircleSegmentsCount ); - Simplify( aFastMode ); Fracture( aFastMode ); }