From 67572fad3f957bd5e40f3575e5e7f8fa3aebc66a Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Tue, 4 May 2021 14:48:30 +0200 Subject: [PATCH] Tech ENABLE_ALLOW_NEGATIVE_Z-> Keep sinking objects and instances as sinking after copy/paste or add instance commands --- src/slic3r/GUI/Plater.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index cce2dd319..32ecef438 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -5838,9 +5838,17 @@ void Plater::changed_objects(const std::vector& object_idxs) return; for (size_t obj_idx : object_idxs) { +#if ENABLE_ALLOW_NEGATIVE_Z + if (obj_idx < p->model.objects.size()) { + if (p->model.objects[obj_idx]->bounding_box().min.z() >= 0.0) + // re - align to Z = 0 + p->model.objects[obj_idx]->ensure_on_bed(); + } +#else if (obj_idx < p->model.objects.size()) // recenter and re - align to Z = 0 p->model.objects[obj_idx]->ensure_on_bed(); +#endif // ENABLE_ALLOW_NEGATIVE_Z } if (this->p->printer_technology == ptSLA) { // Update the SLAPrint from the current Model, so that the reload_scene()