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).
This commit is contained in:
parent
2b824b4e45
commit
749d917424
|
@ -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).
|
||||
|
|
Loading…
Reference in New Issue