diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 674f47fa5..12414f866 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -1186,7 +1186,8 @@ ModelInstance::transform_mesh(TriangleMesh* mesh, bool dont_translate) const TransformationMatrix ModelInstance::get_trafo_matrix(bool dont_translate) const { - TransformationMatrix trafo = TransformationMatrix::mat_rotation(this->rotation, Axis::Z); + TransformationMatrix trafo = this->additional_trafo; + trafo.applyLeft(TransformationMatrix::mat_rotation(this->rotation, Axis::Z)); trafo.applyLeft(TransformationMatrix::mat_scale(this->scaling_factor)); if(!dont_translate) { diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 56645e3f5..80734acde 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -589,6 +589,7 @@ class ModelInstance double rotation; ///< Rotation around the Z axis, in radians around mesh center point. double scaling_factor; ///< uniform scaling factor. Pointf offset; ///< offset in unscaled coordinates. + TransformationMatrix additional_trafo; ///< 3mf instance transformation cannot be completely represented by the other properties /// Get the owning ModelObject /// \return ModelObject* pointer to the owner ModelObject