diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-08-13 17:16:37 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-08-13 17:16:37 +0300 |
commit | 6742735596eb342d8166ce00aa370cf0fba15c1f (patch) | |
tree | cd4680450bbd9b7c49260aad4d682545e022612b /xs/src/libslic3r/Model.cpp | |
parent | 93b8f3147c174e2b024f9162581ef18cb56b3b82 (diff) |
Better fix for minimum z of object to lay on the bed after rotations
Diffstat (limited to 'xs/src/libslic3r/Model.cpp')
-rw-r--r-- | xs/src/libslic3r/Model.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index bceeea258..f9936537f 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -771,21 +771,12 @@ void ModelObject::scale(const Pointf3 &versor) void ModelObject::rotate(float angle, const Axis &axis) { - float min_z = FLT_MAX; for (ModelVolume *v : this->volumes) { v->mesh.rotate(angle, axis); - min_z = std::min(min_z, v->mesh.stl.stats.min.z); } - if (min_z != 0.0f) - { - // translate the object so that its minimum z lays on the bed - for (ModelVolume *v : this->volumes) - { - v->mesh.translate(0.0f, 0.0f, -min_z); - } - } + center_around_origin(); this->origin_translation = Pointf3(0, 0, 0); this->invalidate_bounding_box(); |