mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
add purge
This commit is contained in:
1 parent
cc3649fcb8
commit
5164891928
2 files changed
+41
No files matched your search
@@ -204,3 +204,11 @@ class PointXYZ(Point, SQLSubModel):
|
||||
Euclidean distance between the two points
|
||||
"""
|
||||
return dist((p1.x, p1.y, p1.z), (p2.x, p2.y, p2.z))
|
||||
|
||||
@staticmethod
|
||||
def areatriangle3d(p1, p2, p3):
|
||||
a = PointXYZ.distance(p1, p2)
|
||||
b = PointXYZ.distance(p2, p3)
|
||||
c = PointXYZ.distance(p3, p1)
|
||||
s = (a + b + c) / 2
|
||||
return (s*(s-a) * (s-b)*(s-c)) ** 0.5
|
||||
Reference in new issue
Block a user