diff --git a/src/slic3r/GUI/Jobs/RotoptimizeJob.cpp b/src/slic3r/GUI/Jobs/RotoptimizeJob.cpp index b277aa206c..0980326d31 100644 --- a/src/slic3r/GUI/Jobs/RotoptimizeJob.cpp +++ b/src/slic3r/GUI/Jobs/RotoptimizeJob.cpp @@ -118,8 +118,6 @@ void RotoptimizeJob::finalize(bool canceled, std::exception_ptr &eptr) // Correct the z offset of the object which was corrupted be // the rotation o->ensure_on_bed(); - -// m_plater->find_new_position(o->instances); } if (!canceled) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 4fc59db625..d4e0b8fbd0 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3116,38 +3116,6 @@ void Plater::priv::mirror(Axis axis) view3D->mirror_selection(axis); } -void Plater::find_new_position(const ModelInstancePtrs &instances) -{ - arrangement::ArrangePolygons movable, fixed; - arrangement::ArrangeParams arr_params = get_arrange_params(this); - - for (const ModelObject *mo : p->model.objects) - for (ModelInstance *inst : mo->instances) { - auto it = std::find(instances.begin(), instances.end(), inst); - auto arrpoly = get_arrange_poly(inst, this); - - if (it == instances.end()) - fixed.emplace_back(std::move(arrpoly)); - else { - arrpoly.setter = [it](const arrangement::ArrangePolygon &p) { - if (p.is_arranged() && p.bed_idx == 0) { - Vec2d t = p.translation.cast(); - (*it)->apply_arrange_result(t, p.rotation); - } - }; - movable.emplace_back(std::move(arrpoly)); - } - } - - if (auto wt = get_wipe_tower_arrangepoly(*this)) - fixed.emplace_back(*wt); - - arrangement::arrange(movable, fixed, this->build_volume().polygon(), arr_params); - - for (auto & m : movable) - m.apply(); -} - void Plater::priv::split_object() { int obj_idx = get_selected_object_idx(); diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 1997293d84..1ecbeb1906 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -330,7 +330,6 @@ public: GLCanvas3D* get_current_canvas3D(); void arrange(); - void find_new_position(const ModelInstancePtrs &instances); void set_current_canvas_as_dirty(); void unbind_canvas_event_handlers();