Pass previously set arc tolerance to concave hull

This commit is contained in:
tamasmeszaros 2021-10-21 11:42:00 +02:00
parent 3f1fc8329b
commit dc588e2db5

View File

@ -133,7 +133,8 @@ ExPolygons offset_waffle_style_ex(const ConcaveHull &hull, coord_t delta)
Polygons offset_waffle_style(const ConcaveHull &hull, coord_t delta)
{
Polygons res = closing(hull.polygons(), 2 * delta, delta, ClipperLib::jtRound);
auto arc_tolerance = scaled<double>(0.01);
Polygons res = closing(hull.polygons(), 2 * delta, delta, ClipperLib::jtRound, arc_tolerance);
auto it = std::remove_if(res.begin(), res.end(), [](Polygon &p) { return p.is_clockwise(); });
res.erase(it, res.end());