Bed3D::is_circle() - Use Geometry::circle_center_taubin_newton() to detect candidate center

This commit is contained in:
enricoturri1966 2021-10-22 14:46:07 +02:00
parent d34c9cec9a
commit 4fd9a99f5b

View File

@ -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<double> vertex_distances;
double avg_dist = 0.0;
for (const Vec2d& pt : shape) {