diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index daf6b08e63..de7e40cda4 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -460,14 +460,17 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print // Now we check that no instance of convex_hull intersects any of the previously checked object instances. for (const PrintInstance &instance : print_object->instances()) { Polygon convex_hull_no_offset = convex_hull0, convex_hull; - convex_hull = offset(convex_hull_no_offset, + auto tmp = offset(convex_hull_no_offset, // Shrink the extruder_clearance_radius a tiny bit, so that if the object arrangement algorithm placed the objects // exactly by satisfying the extruder_clearance_radius, this test will not trigger collision. float(scale_(0.5 * print.config().extruder_clearance_max_radius.value - EPSILON)), - jtRound, scale_(0.1)).front(); - // instance.shift is a position of a centered object, while model object may not be centered. - // Convert 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()); + jtRound, scale_(0.1)); + if (!tmp.empty()) { // tmp may be empty due to clipper's bug, see STUDIO-2452 + convex_hull = tmp.front(); + // instance.shift is a position of a centered object, while model object may not be centered. + // Convert 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()); + } convex_hull_no_offset.translate(instance.shift - print_object->center_offset()); //juedge the exclude area if (!intersection(exclude_polys, convex_hull_no_offset).empty()) {