Fixed function lineSegmentPolygonsIntersection() in the Lightning infill that wasn't returns the intersection point.

It fixed the issue that sometimes the Lightning infill produced extrusions that hung in the air without proper support.
This commit is contained in:
Lukáš Hejl 2022-05-12 14:16:32 +02:00
parent 11004b4bbd
commit 331da74510

View file

@ -180,7 +180,11 @@ bool lineSegmentPolygonsIntersection(const Point& a, const Point& b, const EdgeG
} visitor { outline_locator, a.cast<double>(), b.cast<double>() };
outline_locator.visit_cells_intersecting_line(a, b, visitor);
return visitor.d2min < double(within_max_dist) * double(within_max_dist);
if (visitor.d2min < double(within_max_dist) * double(within_max_dist)) {
result = Point(visitor.intersection_pt);
return true;
}
return false;
}
bool Node::realign(const Polygons& outlines, const EdgeGrid::Grid& outline_locator, std::vector<NodeSPtr>& rerooted_parts)