From 25886cd920287b3b545784c1edb0307df5322d00 Mon Sep 17 00:00:00 2001 From: supermerill Date: Mon, 17 Aug 2020 13:06:03 +0200 Subject: [PATCH] #404 missing support: bug in rectilinear2. --- src/libslic3r/Fill/FillRectilinear2.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/Fill/FillRectilinear2.cpp b/src/libslic3r/Fill/FillRectilinear2.cpp index b6619fbdd..54df23f0b 100644 --- a/src/libslic3r/Fill/FillRectilinear2.cpp +++ b/src/libslic3r/Fill/FillRectilinear2.cpp @@ -985,10 +985,14 @@ bool FillRectilinear2::fill_surface_by_lines(const Surface *surface, const FillP } else { // Vertical line intersects a contour segment at a general position (not at one of its end points). // or the contour just touches this vertical line with a vertical segment or a sequence of vertical segments. - // Keep both intersection points. - if (j < i) - sil.intersections[j] = sil.intersections[i]; - ++ j; + + //if you have to remove a point, be sure to remove also its sibling. + if (sil.intersections[j].pos() != sil.intersections[i].pos() || j + 1 != i) { + // Keep both intersection points. + if (j < i) + sil.intersections[j] = sil.intersections[i]; + ++j; + } } } else { // Vertical line intersects a contour segment at a general position (not at one of its end points).