1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-17 12:10:47 +02:00
This commit is contained in:
Justin Lin
2022-05-07 13:41:46 +08:00
parent 5f3802951f
commit 7f2e67b1b5

View File

@@ -18,11 +18,4 @@ function tri_incenter(shape_pts) =
c = norm(pa - pb),
abc = [a, b, c]
)
(len(pa) == 2 ? [
abc * [pa.x, pb.x, pc.x],
abc * [pa.y, pb.y, pc.y]
] : [
abc * [pa.x, pb.x, pc.x],
abc * [pa.y, pb.y, pc.y],
abc * [pa.z, pb.z, pc.z]
]) / (a + b + c);
[for(i = [0:len(pa) - 1]) abc * [pa[i], pb[i], pc[i]]] / (a + b + c);