Fix z-height calculation to correctly handle case when height == min_z

This commit is contained in:
Aleksandr Dobkin
2026-03-26 05:47:00 -07:00
parent 39ef7a5b7a
commit fb675e3193

View File

@@ -101,13 +101,16 @@ static bool contour_extrusion_path(LayerRegion *region, const sla::IndexedMesh &
} }
} }
if (d > max_up + 0.03 || d < min_down) { if (d < -height || d > max_up + 0.03) {
d = 0; // this point is too far from the mesh edge, probably because this is not a top surface. Do not contour it.
} else { d = 0;
if (d > max_up) { }
d = max_up;
} if (d < min_down) {
} d = min_down;
} else if (d > max_up) {
d = max_up;
}
if (is_perimeter(path.role()) && d > 0) { if (is_perimeter(path.role()) && d > 0) {
// do not increase height of perimeters as this may create an appearance of a seam // do not increase height of perimeters as this may create an appearance of a seam