From 8366ac4a07e607174c44cec2f2deeb097dc3e3ef Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 24 Jan 2019 13:32:45 +0100 Subject: [PATCH] Fixed output of volumes to .amf files --- src/libslic3r/Format/AMF.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/Format/AMF.cpp b/src/libslic3r/Format/AMF.cpp index 83f931b0cf..a9ebca8047 100644 --- a/src/libslic3r/Format/AMF.cpp +++ b/src/libslic3r/Format/AMF.cpp @@ -918,12 +918,14 @@ bool store_amf(const char *path, Model *model, const DynamicPrintConfig *config) auto &stl = volume->mesh.stl; if (stl.v_shared == nullptr) stl_generate_shared_vertices(&stl); - for (size_t i = 0; i < stl.stats.shared_vertices; ++ i) { + const Transform3d& matrix = volume->get_matrix(); + for (size_t i = 0; i < stl.stats.shared_vertices; ++i) { stream << " \n"; stream << " \n"; - stream << " " << stl.v_shared[i](0) << "\n"; - stream << " " << stl.v_shared[i](1) << "\n"; - stream << " " << stl.v_shared[i](2) << "\n"; + Vec3d v = matrix * stl.v_shared[i].cast(); + stream << " " << v(0) << "\n"; + stream << " " << v(1) << "\n"; + stream << " " << v(2) << "\n"; stream << " \n"; stream << " \n"; }