1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00

don't turn them into 3D

This commit is contained in:
Justin Lin 2022-05-12 08:10:36 +08:00
parent f2e437fdd4
commit 4fad71c352

View File

@ -1,9 +1,7 @@
function __in_line(line_pts, pt, epsilon = 0.0001) =
let(
pts = len(line_pts[0]) == 2 ? [for(p = line_pts) [each p, 0]] : line_pts,
pt3d = len(pt) == 2 ? [each pt, 0] : pt,
v1 = pts[0] - pt3d,
v2 = pts[1] - pt3d
v1 = line_pts[0] - pt,
v2 = line_pts[1] - pt
)
v1 * v2 <= epsilon && (
let(v = cross(v1, v2))