From 4fd9a99f5b5906853b1cd840e2f3fa33e53dc2f1 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Fri, 22 Oct 2021 14:46:07 +0200 Subject: [PATCH] Bed3D::is_circle() - Use Geometry::circle_center_taubin_newton() to detect candidate center --- src/slic3r/GUI/3DBed.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index 18c017da1..8e6867311 100644 --- a/src/slic3r/GUI/3DBed.cpp +++ b/src/slic3r/GUI/3DBed.cpp @@ -271,7 +271,8 @@ bool Bed3D::is_circle(const Pointfs& shape, Vec2d* center, double* radius) // Analyze the array of points. // Do they reside on a circle ? - const Vec2d box_center = BoundingBoxf(shape).center(); + const Vec2d box_center = Geometry::circle_center_taubin_newton(shape); + std::vector vertex_distances; double avg_dist = 0.0; for (const Vec2d& pt : shape) {