FIX:confirm volume box is less than plate box
jira:STUDIO-8261 code is from OrcaSlicer,thanks for OrcaSlicer and SoftFever commit bbfb9d77fadc63ca84d70b09aa1efa6d90889736 Author: SoftFever <softfeverever@gmail.com> Date: Sat Oct 21 12:20:30 2023 +0800 More camera tweaks (#2473) * fix camera regressions Handle multiple plates Change-Id: I0b74183fd9a53d99d1c936caae1e890b1f18d997
This commit is contained in:
parent
a415ab0c71
commit
c4a68a74d7
|
@ -1576,9 +1576,14 @@ BoundingBoxf3 GLCanvas3D::assembly_view_cur_bounding_box() const {
|
||||||
BoundingBoxf3 GLCanvas3D::volumes_bounding_box() const
|
BoundingBoxf3 GLCanvas3D::volumes_bounding_box() const
|
||||||
{
|
{
|
||||||
BoundingBoxf3 bb;
|
BoundingBoxf3 bb;
|
||||||
for (const GLVolume* volume : m_volumes.volumes) {
|
auto partplate_list_box = wxGetApp().plater()->get_partplate_list().get_bounding_box();
|
||||||
if (!m_apply_zoom_to_volumes_filter || ((volume != nullptr) && volume->zoom_to_volumes))
|
for (const GLVolume *volume : m_volumes.volumes) {
|
||||||
bb.merge(volume->transformed_bounding_box());
|
if (!m_apply_zoom_to_volumes_filter || ((volume != nullptr) && volume->zoom_to_volumes)) {
|
||||||
|
const auto v_bb = volume->transformed_bounding_box();
|
||||||
|
if (!partplate_list_box.overlap(v_bb))
|
||||||
|
continue;
|
||||||
|
bb.merge(v_bb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return bb;
|
return bb;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue