From 749d917424e20d6af61746c0d69fb54c50619f80 Mon Sep 17 00:00:00 2001 From: "Andrii Doroshenko (Xrayez)" Date: Tue, 3 Dec 2019 15:43:59 +0200 Subject: Fix severe performance drop while deflating polylines Underscaled arc tolerance produced very small values so that changes to this parameter were negligible when scaled internally, hence significant performance drop (lots of intermediate points inserted in an arc). Now the performance is mostly the same compared to other types of offsetting (SQUARE, MITER). --- core/math/geometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/math') diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index e0ead8446f..ada5107a2c 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -1158,7 +1158,7 @@ Vector > Geometry::_polypath_offset(const Vector &p_polyp case END_SQUARE: et = etOpenSquare; break; case END_ROUND: et = etOpenRound; break; } - ClipperOffset co; + ClipperOffset co(2.0, 0.25 * SCALE_FACTOR); // Defaults from ClipperOffset. Path path; // Need to scale points (Clipper's requirement for robust computation). -- cgit v1.2.3