Improved fix of export to 3mf of objects splitted into parts

This commit is contained in:
Enrico Turri 2018-11-19 15:49:59 +01:00
parent c5bb8bb4a1
commit 946d43bc95

View file

@ -1875,11 +1875,15 @@ namespace Slic3r {
vertices_count += stl.stats.shared_vertices; vertices_count += stl.stats.shared_vertices;
#if ENABLE_MODELVOLUME_TRANSFORM
Transform3d matrix = volume->get_matrix();
#endif // ENABLE_MODELVOLUME_TRANSFORM
for (int i = 0; i < stl.stats.shared_vertices; ++i) for (int i = 0; i < stl.stats.shared_vertices; ++i)
{ {
stream << " <" << VERTEX_TAG << " "; stream << " <" << VERTEX_TAG << " ";
#if ENABLE_MODELVOLUME_TRANSFORM #if ENABLE_MODELVOLUME_TRANSFORM
Vec3d v = volume->get_matrix() * stl.v_shared[i].cast<double>(); Vec3d v = matrix * stl.v_shared[i].cast<double>();
stream << "x=\"" << v(0) << "\" "; stream << "x=\"" << v(0) << "\" ";
stream << "y=\"" << v(1) << "\" "; stream << "y=\"" << v(1) << "\" ";
stream << "z=\"" << v(2) << "\" />\n"; stream << "z=\"" << v(2) << "\" />\n";