From 6fdd4945c19348cc5fc9ed9ae2f26f22a778786b Mon Sep 17 00:00:00 2001 From: schneider007 Date: Thu, 27 Aug 2026 19:16:34 +0800 Subject: [PATCH] Fix bug: centroid calculation (#15399) --- src/libslic3r/AABBTreeIndirect.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/AABBTreeIndirect.hpp b/src/libslic3r/AABBTreeIndirect.hpp index 035982d876..483ca8efc4 100644 --- a/src/libslic3r/AABBTreeIndirect.hpp +++ b/src/libslic3r/AABBTreeIndirect.hpp @@ -229,7 +229,7 @@ public: m_bbox(bbox.min - Point(SCALED_EPSILON, SCALED_EPSILON), bbox.max + Point(SCALED_EPSILON, SCALED_EPSILON)) {} size_t idx() const { return m_idx; } const BoundingBox& bbox() const { return m_bbox; } - Point centroid() const { return (m_bbox.min() + m_bbox.max() / 2); } + Point centroid() const { return (m_bbox.min() + m_bbox.max()) / 2; } private: size_t m_idx; BoundingBox m_bbox;