From 2d69f6e17c56c7506520be03b0f1ea595ddd98a8 Mon Sep 17 00:00:00 2001 From: Tommaso Bianchi Date: Sat, 6 Jun 2026 16:00:37 +0200 Subject: [PATCH] belt: expose MachineFrameTransform's composed matrix Add a const accessor for the shear*scale transform so the G-code viewer can build the machine->model back-transform for the upright belt preview. --- src/libslic3r/GCode/MachineFrameTransform.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libslic3r/GCode/MachineFrameTransform.hpp b/src/libslic3r/GCode/MachineFrameTransform.hpp index 425fe3004b..f5e71398da 100644 --- a/src/libslic3r/GCode/MachineFrameTransform.hpp +++ b/src/libslic3r/GCode/MachineFrameTransform.hpp @@ -33,6 +33,11 @@ public: bool is_active() const { return m_active; } + // The composed shear*scale transform (identity when inactive). Exposed so the + // G-code viewer can build the machine->model back-transform for the upright + // ("designed") belt preview. + const Transform3d& transform() const { return m_transform; } + private: bool m_active = false; Transform3d m_transform = Transform3d::Identity();