summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-12-03 15:43:59 +0200
committerAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-12-03 15:43:59 +0200
commit749d917424e20d6af61746c0d69fb54c50619f80 (patch)
tree9054aab5da527b8df4fa343996c9710d9eae9c5e /core/math
parent2b824b4e455cfd43ab9442387c2333c134cf88cf (diff)
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).
Diffstat (limited to 'core/math')
-rw-r--r--core/math/geometry.cpp2
1 files changed, 1 insertions, 1 deletions
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<Vector<Point2> > Geometry::_polypath_offset(const Vector<Point2> &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).