diff --git a/src/experimental/_impl/_convex_intersection_for_impl.scad b/src/experimental/_impl/_convex_intersection_for_impl.scad index 78e4a48f..b8b4bbc3 100644 --- a/src/experimental/_impl/_convex_intersection_for_impl.scad +++ b/src/experimental/_impl/_convex_intersection_for_impl.scad @@ -2,7 +2,9 @@ use ; function _convex_intersection_for(shapes, pre, leng, i = 2) = i == leng ? pre : - _convex_intersection_for(shapes, - convex_intersection(pre, shapes[i]), - leng, i + 1 - ); \ No newline at end of file + let(r = convex_intersection(pre, shapes[i])) + r == [] ? [] + : _convex_intersection_for(shapes, + r, + leng, i + 1 + ); \ No newline at end of file diff --git a/src/experimental/convex_intersection.scad b/src/experimental/convex_intersection.scad index f3311815..dc3d2207 100644 --- a/src/experimental/convex_intersection.scad +++ b/src/experimental/convex_intersection.scad @@ -4,6 +4,7 @@ use ; use ; function convex_intersection(shape1, shape2, epsilon = 0.0001) = + (shape1 == [] || shape2 == []) ? [] : let( leng = len(shape1), pts = concat(shape1, [shape1[0]])