Skip to content

Commit 2bfca2c

Browse files
committed
removed
1 parent 44dec67 commit 2bfca2c

File tree

3 files changed

+25
-257
lines changed

3 files changed

+25
-257
lines changed

src/compas/geometry/_core/analytical.py

Lines changed: 0 additions & 142 deletions
This file was deleted.

src/compas/geometry/_core/constructors.py

Lines changed: 0 additions & 113 deletions
This file was deleted.

src/compas/geometry/curves/circle.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,33 @@ def from_three_points(cls, a, b, c):
255255
256256
"""
257257
from compas.geometry import Plane
258-
from compas.geometry import circle_from_points
259258

260-
(point, normal), radius = circle_from_points(a, b, c)
259+
a = Point(*a)
260+
b = Point(*b)
261+
c = Point(*c)
262+
263+
ab = b - a
264+
cb = b - c
265+
ba = a - b
266+
ca = a - c
267+
ac = c - a
268+
bc = c - b
269+
270+
normal = ab.cross(ac).unitized()
271+
272+
d = 2 * ba.cross(cb).length ** 2
273+
274+
A = cb.length**2 * ba.dot(ca) / d
275+
B = ca.length**2 * ab.dot(cb) / d
276+
C = ba.length**2 * ac.dot(bc) / d
277+
Aa = a.scaled(A)
278+
Bb = b.scaled(B)
279+
Cc = c.scaled(C)
280+
281+
point = Aa + Bb + Cc
282+
radius = (a - point).length
261283
plane = Plane(point, normal)
284+
262285
return cls.from_plane_and_radius(plane, radius)
263286

264287
@classmethod

0 commit comments

Comments
 (0)