1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-13 18:24:28 +02:00

add error message

This commit is contained in:
Justin Lin
2021-05-16 09:50:53 +08:00
parent f2bf6bcaba
commit 6d9e2d0822

View File

@@ -47,10 +47,11 @@ function _bijection_offset_impl(pts, d, epsilon) =
let(
this_edge = offset_es[i],
next_edge = offset_es[i + 1],
p = __line_intersection2(this_edge, next_edge, epsilon)
p = __line_intersection2(this_edge, next_edge, epsilon),
// p == p to avoid [nan, nan], because [nan, nan] != [nan, nan],
_ = assert(p != [] && p == p, "bijection_offset failed. Parallel or conincident edges found")
)
// p == p to avoid [nan, nan], because [nan, nan] != [nan, nan]
if(p != [] && p == p) p
p
]
);