EdgeGrid refactoring to support both open and closed contours.

Squashed commit of the following:

commit 4e13a8fe19abcc9aae39a9bc4c7953a743196504
Merge: 6ae766409 6f89da1f3
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Fri Feb 5 11:19:35 2021 +0100

    Merge remote-tracking branch 'remotes/origin/master' into vb_edgegrid_open_lines

commit 6ae76640942269993c942861f0444088843e3fa1
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Fri Feb 5 11:14:48 2021 +0100

    EdgeGrid enhancement to accept both the open and closed lines.

commit 36a5efcd558bd5fd5f46b5f561387a2c73221553
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Fri Feb 5 10:52:14 2021 +0100

    EdgeGrid improvements: Documentation, one bug fix after recent refactoring.

commit 6f89da1f39
Author: tamasmeszaros <meszaros.q@gmail.com>
Date:   Thu Feb 4 20:31:50 2021 +0100

    Disable libicu for boost-regex

    Should have been disabled from the beginning

commit ffc77b1a72a0be9b5622fd33defeebb24bf07b34
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Thu Feb 4 18:40:33 2021 +0100

    EdgeGrid: Annotated those methods that do not work with open contours.

commit 8039a645b4bf0c46c99b90a9c34e7189d7442f86
Author: Vojtech Bubnik <bubnikv@gmail.com>
Date:   Thu Feb 4 18:28:21 2021 +0100

    Refactoring of EdgeGrid structure to support both closed and open lines.
This commit is contained in:
Vojtech Bubnik 2021-02-05 11:20:04 +01:00
parent 6f89da1f39
commit 5f86d11c74
6 changed files with 272 additions and 187 deletions

View file

@ -1129,7 +1129,7 @@ void Fill::connect_infill(Polylines &&infill_ordered, const std::vector<const Po
intersection_points.reserve(infill_ordered.size() * 2);
for (const Polyline &pl : infill_ordered)
for (const Point *pt : { &pl.points.front(), &pl.points.back() }) {
EdgeGrid::Grid::ClosestPointResult cp = grid.closest_point(*pt, coord_t(SCALED_EPSILON));
EdgeGrid::Grid::ClosestPointResult cp = grid.closest_point_signed_distance(*pt, coord_t(SCALED_EPSILON));
if (cp.valid()) {
// The infill end point shall lie on the contour.
assert(cp.distance <= 3.);