From 9556f600506000d96a5b5b6479e9fa6617cc2bfc Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 3 Oct 2019 08:16:33 +0800 Subject: [PATCH] fix point order --- src/bijection_offset.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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