mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-03 05:30:39 +08:00
SPE-1868: Fixed GCodeViewer max bounding box calculation leading to wrong camera near z plane
This commit is contained in:
parent
ca5f6da08d
commit
b33b28c076
@ -830,12 +830,16 @@ public:
|
|||||||
|
|
||||||
const BoundingBoxf3& get_paths_bounding_box() const { return m_paths_bounding_box; }
|
const BoundingBoxf3& get_paths_bounding_box() const { return m_paths_bounding_box; }
|
||||||
const BoundingBoxf3& get_shells_bounding_box() const { return m_shells_bounding_box; }
|
const BoundingBoxf3& get_shells_bounding_box() const { return m_shells_bounding_box; }
|
||||||
|
|
||||||
const BoundingBoxf3& get_max_bounding_box() const {
|
const BoundingBoxf3& get_max_bounding_box() const {
|
||||||
BoundingBoxf3& max_bounding_box = const_cast<BoundingBoxf3&>(m_max_bounding_box);
|
BoundingBoxf3& max_bounding_box = const_cast<BoundingBoxf3&>(m_max_bounding_box);
|
||||||
if (!max_bounding_box.defined) {
|
if (!max_bounding_box.defined) {
|
||||||
max_bounding_box = m_shells_bounding_box;
|
if (m_shells_bounding_box.defined)
|
||||||
max_bounding_box.merge(m_paths_bounding_box);
|
max_bounding_box = m_shells_bounding_box;
|
||||||
max_bounding_box.merge(m_paths_bounding_box.max + m_sequential_view.marker.get_bounding_box().size().z() * Vec3d::UnitZ());
|
if (m_paths_bounding_box.defined) {
|
||||||
|
max_bounding_box.merge(m_paths_bounding_box);
|
||||||
|
max_bounding_box.merge(m_paths_bounding_box.max + m_sequential_view.marker.get_bounding_box().size().z() * Vec3d::UnitZ());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return m_max_bounding_box;
|
return m_max_bounding_box;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user