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-03 18:15:27 +08:00
parent 7792030765
commit 4276c31b97

View File

@ -14,5 +14,5 @@ use <__comm__/__in_line.scad>;
function lines_intersection(line1, line2, ext = false, epsilon = 0.0001) =
let(pt = len(line1[0]) == 2 ? __line_intersection2(line1, line2, epsilon) :
__line_intersection3(line1, line2, epsilon))
ext ? pt :
pt != [] && __in_line(line1, pt, epsilon) && __in_line(line2, pt, epsilon) ? pt : [];
ext || pt == [] ? pt :
__in_line(line1, pt, epsilon) && __in_line(line2, pt, epsilon) ? pt : [];