diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-09-26 12:24:19 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-09-26 12:24:19 +0300 |
commit | 025fdc1359a7f4e72cdf186bae58f380d092ab51 (patch) | |
tree | 56d9a27abeb297e0c6ce510c774a9b6640f104bc /xs | |
parent | 51cf964b517c3f82c670e5015d7d4bb9d786432a (diff) |
Fixed #1244 - c++ partcpp_threads
Diffstat (limited to 'xs')
-rw-r--r-- | xs/src/libslic3r/Model.cpp | 5 | ||||
-rw-r--r-- | xs/src/libslic3r/Model.hpp | 1 | ||||
-rw-r--r-- | xs/src/slic3r/GUI/GUI_ObjectParts.cpp | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index bd96aa3b9..23c1853b8 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -988,6 +988,11 @@ const TriangleMesh& ModelVolume::get_convex_hull() const return m_convex_hull; } +TriangleMesh& ModelVolume::get_convex_hull() +{ + return m_convex_hull; +} + ModelVolume::Type ModelVolume::type_from_string(const std::string &s) { // Legacy support diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 7a186df5d..d3752eded 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -196,6 +196,7 @@ public: void calculate_convex_hull(); const TriangleMesh& get_convex_hull() const; + TriangleMesh& get_convex_hull(); // Helpers for loading / storing into AMF / 3MF files. static Type type_from_string(const std::string &s); diff --git a/xs/src/slic3r/GUI/GUI_ObjectParts.cpp b/xs/src/slic3r/GUI/GUI_ObjectParts.cpp index 949c77171..0c7eb6285 100644 --- a/xs/src/slic3r/GUI/GUI_ObjectParts.cpp +++ b/xs/src/slic3r/GUI/GUI_ObjectParts.cpp @@ -1235,7 +1235,10 @@ void load_part( ModelObject* model_object, part_names.Add(new_volume->name); if (delta != Vec3d::Zero()) + { new_volume->mesh.translate((float)delta(0), (float)delta(1), (float)delta(2)); + new_volume->get_convex_hull().translate((float)delta(0), (float)delta(1), (float)delta(2)); + } // set a default extruder value, since user can't add it manually new_volume->config.set_key_value("extruder", new ConfigOptionInt(0)); |