Fix of [2.3.0-alpha4] Crash - several models cause crash when slicing #5208

Fixed some issues in internal anchors of the Adaptive Cubic infill.
The ugly and dangerous implicit casting operators in Line, MultiPoint,
Polyline and Polygon were made explicit.
This commit is contained in:
Vojtech Bubnik 2020-11-24 16:00:46 +01:00
parent 10c41290fd
commit 62bdc192d8
25 changed files with 237 additions and 110 deletions

View file

@ -1220,9 +1220,9 @@ static inline bool sequential_print_horizontal_clearance_valid(const Print &prin
// instance.shift is a position of a centered object, while model object may not be centered.
// Conver the shift from the PrintObject's coordinates into ModelObject's coordinates by removing the centering offset.
convex_hull.translate(instance.shift - print_object->center_offset());
if (! intersection(convex_hulls_other, convex_hull).empty())
if (! intersection(convex_hulls_other, (Polygons)convex_hull).empty())
return false;
polygons_append(convex_hulls_other, convex_hull);
convex_hulls_other.emplace_back(std::move(convex_hull));
}
}
return true;