1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 13:01:37 +02:00

add intersection_p

This commit is contained in:
Justin Lin
2020-02-22 09:58:19 +08:00
parent b4a7ae46ad
commit 4026a206b6

View File

@@ -0,0 +1,9 @@
use <__comm__/__line_intersection.scad>;
use <__comm__/__in_line.scad>;
function intersection_p(line_pts1, line_pts2, ext = false, epsilon = 0.0001) =
let(
pt = __line_intersection(line_pts1, line_pts2, epsilon)
)
ext ? pt :
pt != [] && __in_line(line_pts1, pt, epsilon) && __in_line(line_pts2, pt, epsilon) ? pt : [];