Add safety offset before search for overhangs

Prevent numerical instability => supports on the vertical wall
This commit is contained in:
Filip Sykala - NTB T15p 2025-01-29 18:36:39 +01:00 committed by Lukas Matena
parent 7c4396446c
commit fff42fb53d

View File

@ -408,7 +408,7 @@ Points sample_overhangs(const LayerPart& part, double dist2) {
// Collect previous expolygons by links collected in loop before
ExPolygons prev_shapes = get_shapes(part.prev_parts);
assert(!prev_shapes.empty());
ExPolygons overhangs = diff_ex(shape, prev_shapes);
ExPolygons overhangs = diff_ex(shape, prev_shapes, ApplySafetyOffset::Yes);
if (overhangs.empty()) // above part is smaller in whole contour
return {};