From dc8c53e82eac26c95a8546c8e6eeec1d55431d10 Mon Sep 17 00:00:00 2001 From: surynek Date: Wed, 22 Jan 2025 23:55:24 +0100 Subject: [PATCH] Hacked height calculation when making object slices for sequential scheduling. --- src/slic3r/GUI/ArrangeHelper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/ArrangeHelper.cpp b/src/slic3r/GUI/ArrangeHelper.cpp index 9bcbe716e9..69f59e88ea 100644 --- a/src/slic3r/GUI/ArrangeHelper.cpp +++ b/src/slic3r/GUI/ArrangeHelper.cpp @@ -77,7 +77,9 @@ static std::vector get_objects_to_print(const Model& objects.emplace_back(Sequential::ObjectToPrint{int(inst_id == 0 ? mo->id().id : mi->id().id), inst_id + 1 < mo->instances.size(), scaled(mo->instance_bounding_box(inst_id).size().z()), {}}); for (double height : heights) { - Polygon pgn = its_convex_hull_2d_above(raw_mesh.its, mi->get_matrix_no_offset().cast(), height); + // It seems that zero level in the object instance is mi->get_offset().z(), however need to have bed as zero level, + // hence substracting mi->get_offset().z() from height seems to be an easy hack + Polygon pgn = its_convex_hull_2d_above(raw_mesh.its, mi->get_matrix_no_offset().cast(), height - mi->get_offset().z()); objects.back().pgns_at_height.emplace_back(std::make_pair(scaled(height), pgn)); } ++inst_id;