From 153c6e7f68633b21486e9fb35bfe07367920f6c0 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 8 Jan 2019 09:10:57 +0100 Subject: [PATCH] Extended limits in z for camera target movements - Fix of #1589 --- src/slic3r/GUI/GLCanvas3D.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 8cd80ad7d..f2de33bb7 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3979,6 +3979,12 @@ BoundingBoxf3 GLCanvas3D::scene_bounding_box() const { BoundingBoxf3 bb = volumes_bounding_box(); bb.merge(m_bed.get_bounding_box()); + if (m_config != nullptr) + { + double h = m_config->opt_float("max_print_height"); + bb.min(2) = std::min(bb.min(2), -h); + bb.max(2) = std::max(bb.max(2), h); + } return bb; }