Fix: crashes when slicing small objects with wipe_tower.

jira: STUDIO-10572
Change-Id: I37312673a87e542120ee7282c22f80e16c894cd9
(cherry picked from commit 8d32d29016a96ae3e9fcaec3fc9d261bff39dd22)
This commit is contained in:
jiangkai.zhao 2025-02-25 15:51:10 +08:00 committed by Noisyfox
parent 13f920b12a
commit 4a12032cd3

View file

@ -189,6 +189,7 @@ public:
float get_depth() const { return m_wipe_tower_depth; }
float get_brim_width() const { return m_wipe_tower_brim_width_real; }
BoundingBoxf get_bbx() const {
if (m_outer_wall.empty()) return BoundingBoxf({Vec2d(0,0)});
BoundingBox box = get_extents(m_outer_wall.begin()->second);
BoundingBoxf res = BoundingBoxf(unscale(box.min), unscale(box.max));
res.translate(m_rib_offset.cast<double>());