mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Fixed regression due to ExPolygonCollection to ExPolygons refactoring.
Fixed crashes in BridgeDetector due to unexpected implicit conversion to a const temporary.
This commit is contained in:
parent
546ad99306
commit
f8ff23638f
8 changed files with 29 additions and 26 deletions
|
@ -136,11 +136,11 @@ Polyline MotionPlanner::shortest_path(const Point &from, const Point &to)
|
|||
if (! grown_env.contains(from)) {
|
||||
// delete second point while the line connecting first to third crosses the
|
||||
// boundaries as many times as the current first to second
|
||||
while (polyline.points.size() > 2 && intersection_ln(Line(from, polyline.points[2]), grown_env).size() == 1)
|
||||
while (polyline.points.size() > 2 && intersection_ln(Line(from, polyline.points[2]), (Polygons)grown_env).size() == 1)
|
||||
polyline.points.erase(polyline.points.begin() + 1);
|
||||
}
|
||||
if (! grown_env.contains(to))
|
||||
while (polyline.points.size() > 2 && intersection_ln(Line(*(polyline.points.end() - 3), to), grown_env).size() == 1)
|
||||
while (polyline.points.size() > 2 && intersection_ln(Line(*(polyline.points.end() - 3), to), (Polygons)grown_env).size() == 1)
|
||||
polyline.points.erase(polyline.points.end() - 2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue