diff options
author | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2019-12-03 15:43:59 +0200 |
---|---|---|
committer | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2019-12-03 15:43:59 +0200 |
commit | 749d917424e20d6af61746c0d69fb54c50619f80 (patch) | |
tree | 9054aab5da527b8df4fa343996c9710d9eae9c5e | |
parent | 2b824b4e455cfd43ab9442387c2333c134cf88cf (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).
-rw-r--r-- | core/math/geometry.cpp | 2 |
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). |