mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-29 21:07:11 +00:00
Fix bug: centroid calculation (#15399)
This commit is contained in:
@@ -229,7 +229,7 @@ public:
|
|||||||
m_bbox(bbox.min - Point(SCALED_EPSILON, SCALED_EPSILON), bbox.max + Point(SCALED_EPSILON, SCALED_EPSILON)) {}
|
m_bbox(bbox.min - Point(SCALED_EPSILON, SCALED_EPSILON), bbox.max + Point(SCALED_EPSILON, SCALED_EPSILON)) {}
|
||||||
size_t idx() const { return m_idx; }
|
size_t idx() const { return m_idx; }
|
||||||
const BoundingBox& bbox() const { return m_bbox; }
|
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:
|
private:
|
||||||
size_t m_idx;
|
size_t m_idx;
|
||||||
BoundingBox m_bbox;
|
BoundingBox m_bbox;
|
||||||
|
|||||||
Reference in New Issue
Block a user