diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index b3a18f26b..59df8eb61 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -419,7 +419,7 @@ bool Model::arrange_objects(coordf_t dist, const BoundingBoxf* bb) if (input[i].bed_idx != 0) ret = false; if (input[i].bed_idx >= 0) { input[i].translation += Vec2crd{input[i].bed_idx * stride, 0}; - instances[i]->apply_arrange_result(input[i].translation, + instances[i]->apply_arrange_result(input[i].translation.cast<double>(), input[i].rotation); } } diff --git a/src/libslic3r/Model.hpp b/src/libslic3r/Model.hpp index 2fbd58461..2ddad9e59 100644 --- a/src/libslic3r/Model.hpp +++ b/src/libslic3r/Model.hpp @@ -668,7 +668,7 @@ public: arrangement::ArrangePolygon get_arrange_polygon() const; // Apply the arrange result on the ModelInstance - void apply_arrange_result(const Vec2crd& offs, double rotation) + void apply_arrange_result(const Vec2d& offs, double rotation) { // write the transformation data into the model instance set_rotation(Z, rotation); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 67b63d8ad..880aa8223 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1489,7 +1489,7 @@ struct Plater::priv friend priv; public: - void apply_arrange_result(const Vec2crd& tr, double rotation) + void apply_arrange_result(const Vec2d& tr, double rotation) { m_pos = unscaled(tr); m_rotation = rotation; apply_wipe_tower(); @@ -1604,7 +1604,7 @@ struct Plater::priv ap.bed_idx = ap.translation.x() / bed_stride(); ap.setter = [obj, this](const ArrangePolygon &p) { if (p.is_arranged()) { - auto t = p.translation; + Vec2d t = p.translation.cast<double>(); t.x() += p.bed_idx * bed_stride(); obj->apply_arrange_result(t, p.rotation); } @@ -2861,7 +2861,7 @@ void Plater::priv::find_new_position(const ModelInstancePtrs &instances, for (size_t i = 0; i < instances.size(); ++i) if (movable[i].bed_idx == 0) - instances[i]->apply_arrange_result(movable[i].translation, + instances[i]->apply_arrange_result(movable[i].translation.cast<double>(), movable[i].rotation); }