From c0ba2c8c4447b4c361cf0e75b3610d1bba4472c7 Mon Sep 17 00:00:00 2001 From: harrierpigeon Date: Fri, 2 Oct 2026 01:07:44 -0500 Subject: [PATCH] Belt brim: read the belt axis from the config in the instance check belt_brim_instances_compatible() runs while the slicing parameters can be stale, like the rest of the brim predicates, which read the print config. Raised in Hanif Koh's review of #14394. --- src/libslic3r/PrintObject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 6b9c5842bf..8100241ef8 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1249,7 +1249,9 @@ bool PrintObject::belt_brim_instances_compatible() const // matters for configurations that do not. if (m_instances.size() <= 1) return true; - const int axis = m_slicing_params.belt_floor_from_axis; + // From the config, not m_slicing_params: this runs while those can be stale. A tilt + // about Y runs the belt along X, any other tilt along Y (see compute_belt_height_and_floor). + const int axis = m_print->config().belt_slice_rotation.value == BeltRotationAxis::Y ? 0 : 1; const Point &ref = m_instances.front().shift; for (const PrintInstance &inst : m_instances) { const coord_t along = axis == 0 ? inst.shift.x() - ref.x() : inst.shift.y() - ref.y();