Extended limits in z for camera target movements - Fix of #1589

This commit is contained in:
Enrico Turri 2019-01-08 09:10:57 +01:00
parent f013972d8b
commit 153c6e7f68

View file

@ -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;
}