Closed LarsSkiba closed 3 months ago
Further minimized example:
Clipper2Lib::ClipperOffset offset;
Clipper2Lib::Paths64 closedPaths = {
{{667680768, -36382704},
{737202688, -87034880},
{742581888, -86055680},
{747603968, -84684800}}};
Clipper2Lib::Paths64 solution;
offset.AddPaths(closedPaths, Clipper2Lib::JoinType::Miter, Clipper2Lib::EndType::Polygon);
offset.Execute(-249561088, solution);
7714d940ca86eb7cc8cf5f9eda2b1486daf32cb1 caused the regression
This tolerance does not seem to be sufficient.
if (cos_a < 0.99) path_out.push_back(path[j]); // (#405)
In this example 0.996268 does cause the issue.
I changed the tolerance to 0.999 which is consistent with the tolerances used in surrounding code and updated the pull request.
Hello Angus,
after updating from 1.2.3 to 1.4.0 i found this regression. The result should be empty, because of a large negative offset.
Input shown in white. Offset result shown in red.
The geometry has a maximum width of ~5.2 and the is empty till an offset of -10, at -11 the issue appears and grows in size with larger negative offsets. These numbers are unscaled, the scaling is 8388608.
This following minimal example reproduces the issue and uses an offset of -29.75 * 8388608 :
Would be nice if you could help out, let me know if more details are needed.
Thanks, Lars