mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-20 05:21:38 +02:00
add intersection_p
This commit is contained in:
9
src/experimental/intersection_p.scad
Normal file
9
src/experimental/intersection_p.scad
Normal 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 : [];
|
Reference in New Issue
Block a user