Fixup of cc44089 (bed bounding box 2D vs 3D)

The mentioned commit has changed behaviour of GLCanvas3D::get_size_proportional_to_max_bed_size(double)
function so that it uses XYZ bounding box instead od just XY. As a result, adding a box object through
the right panel added a huge box when printer max_print_z was higher than x/y. Offset at which a new
object instance is added was also affected.
This commit is contained in:
Lukas Matena 2021-11-24 10:24:11 +01:00
parent 9e3e565bb6
commit eb389559b5

View File

@ -3751,7 +3751,8 @@ Linef3 GLCanvas3D::mouse_ray(const Point& mouse_pos)
double GLCanvas3D::get_size_proportional_to_max_bed_size(double factor) const
{
return factor * m_bed.build_volume().bounding_volume().max_size();
const BoundingBoxf& bbox = m_bed.build_volume().bounding_volume2d();
return factor * std::max(bbox.size()[0], bbox.size()[1]);
}
void GLCanvas3D::set_cursor(ECursorType type)