1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-29 11:58:39 +01:00
This commit is contained in:
Justin Lin 2022-05-13 08:03:52 +08:00
parent 7b301bdc74
commit 038429ede7

View File

@ -5,12 +5,11 @@ function __line_intersection2(line_pts1, line_pts2, epsilon = 0.0001) =
b1 = line_pts2[0],
b2 = line_pts2[1],
a = a2 - a1,
b = b2 - b1,
s = b1 - a1,
b = b2 - b1,
c = cross(a, b)
)
abs(c) < epsilon ? [] : // they are parallel or conincident edges
a1 + a * cross(s, b) / c;
a1 + a * cross(b1 - a1, b) / c;
function __line_intersection3(line_pts1, line_pts2, epsilon = 0.0001) =
let(