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,12 +101,15 @@ 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) {
// this point is too far from the mesh edge, probably because this is not a top surface. Do not contour it.
d = 0; d = 0;
} else {
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) {