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.
This commit is contained in:
harrierpigeon
2026-10-02 01:07:44 -05:00
parent 0701f64ba9
commit c0ba2c8c44
+3 -1
View File
@@ -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();