fix frustum for off-bed origins

This commit is contained in:
Michael Kirsch 2022-07-08 21:52:43 +02:00 committed by Lukas Matena
parent 559173c2a1
commit a1e37803f7

View file

@ -342,6 +342,8 @@ BoundingBoxf3 Bed3D::calc_extended_bounding_box() const
// Reset the build volume Z, we don't want to zoom to the top of the build volume if it is empty.
out.min.z() = 0.0;
out.max.z() = 0.0;
// extend to origin in case origin is off bed
out.merge(m_axes.get_origin());
// extend to contain axes
out.merge(m_axes.get_origin() + m_axes.get_total_length() * Vec3d::Ones());
#if ENABLE_WORLD_COORDINATE