From 3effea8c47913e3057ff375598c04b5ade810c18 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 23 Dec 2020 07:50:39 +0800 Subject: [PATCH] use line2d when two points --- src/polyline2d.scad | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/polyline2d.scad b/src/polyline2d.scad index b28476bb..0c346fa3 100644 --- a/src/polyline2d.scad +++ b/src/polyline2d.scad @@ -86,8 +86,13 @@ module polyline2d(points, width, startingStyle = "CAP_SQUARE", endingStyle = "CA } } - lines(1); - joins(points, width / 2, leng_pts - 2, 0); + if(leng_pts == 2) { + line2d(points[0], points[1], width, startingStyle, endingStyle); + } + else { + lines(1); + joins(points, width / 2, leng_pts - 2, 0); + } } // override it to test