diff --git a/src/bijection_offset.scad b/src/bijection_offset.scad index 19733f1c..b3e885fd 100644 --- a/src/bijection_offset.scad +++ b/src/bijection_offset.scad @@ -51,6 +51,7 @@ function bijection_offset(pts, d, epsilon = 0.0001) = last_p = __line_intersection(offset_es[leng_minus_one], offset_es[0], epsilon) ) concat( + last_p != [] && last_p == last_p ? [last_p] : [], [ for(i = 0; i < leng_minus_one; i = i + 1) let( @@ -60,7 +61,6 @@ function bijection_offset(pts, d, epsilon = 0.0001) = ) // p == p to avoid [nan, nan], because [nan, nan] != [nan, nan] if(p != [] && p == p) p - ], - last_p != [] && last_p == last_p ? [last_p] : [] + ] ); \ No newline at end of file