pip install circle-fitting-3d
https://github.com/CristianoPizzamiglio/circle-fitting-3d
from circle_fitting_3d import Circle3D
points = [[3, 0, 0], [0, 3, 0], [0, 0, 3]]
circle_3d = Circle3D(points)
center = circle_3d.center
radius = circle_3d.radius
print(center)
print(radius)
实测三维点较多的话,需要等待一定的时间(700 点 20s 左右)。