Fix unstable contours from triangulated planar faces (redone) (#15316)

This commit is contained in:
Valerii Bokhan
2026-08-21 15:50:58 +02:00
committed by GitHub
parent 5ed56eb876
commit f05444dc94

View File

@@ -1499,6 +1499,13 @@ static std::vector<Polygons> make_loops(
Polygons &polygons = layers[line_idx];
polygons = make_loops(lines[line_idx]);
// Orca: A planar quad represented by two triangles contributes a point where the
// slicing plane crosses the shared diagonal. After rounding to coord_t this
// point may be very slightly off the otherwise straight contour edge. Apart
// from being redundant, such points make the subsequent contour
// simplification depend on the slice height (and may move seam candidates).
remove_collinear(polygons);
auto this_mode = line_idx < params.slicing_mode_normal_below_layer ? params.mode_below : params.mode;
if (! polygons.empty()) {
if (this_mode == MeshSlicingParams::SlicingMode::Positive) {