Fixed wrong Miter limit when offsetting contours to build a Z-graph

of layer islands.
Partial fix of SPE-1729 #10632
This commit is contained in:
Vojtech Bubnik 2023-08-29 15:57:25 +02:00
parent 532913bade
commit 9da03dfc9f

View File

@ -81,7 +81,8 @@ void Layer::make_slices()
// Top / bottom surfaces must overlap more than 2um to be chained into a Z graph.
// Also a larger offset will likely be more robust on non-manifold input polygons.
static constexpr const float delta = scaled<float>(0.001);
co.MiterLimit = scaled<double>(3.);
// Don't scale the miter limit, it is a factor, not an absolute length!
co.MiterLimit = 3.;
// Use the default zero edge merging distance. For this kind of safety offset the accuracy of normal direction is not important.
// co.ShortestEdgeLength = delta * ClipperOffsetShortestEdgeFactor;
// static constexpr const double accept_area_threshold_ccw = sqr(scaled<double>(0.1 * delta));