From bb5caf2e08ca3be318501ff0580242e84d1e4355 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 18 Dec 2018 18:41:20 +0100 Subject: [PATCH] Fixed scaling of the object, if it was loaded too big. Here the large object was not scaled uniformly, and the Z height of the bed was set incorrectly to one. --- src/slic3r/GUI/Plater.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index ab7141e919..a261e7e05a 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1526,9 +1526,8 @@ std::vector Plater::priv::load_model_objects(const ModelObjectPtrs &mode if (max_ratio > 10000) { // the size of the object is too big -> this could lead to overflow when moving to clipper coordinates, // so scale down the mesh - // const Vec3d inverse = ratio.cwiseInverse(); - // object->scale(inverse); - object->scale(ratio.cwiseInverse()); + double inv = 1. / max_ratio; + object->scale(Vec3d(inv, inv, inv)); scaled_down = true; } else if (max_ratio > 5) { const Vec3d inverse = ratio.cwiseInverse();