From 2a3596895f71637037acabcd8a888a4a5aade986 Mon Sep 17 00:00:00 2001 From: Dmitry Frolov Date: Tue, 1 May 2018 10:44:20 +0700 Subject: [PATCH] Remove excess point at the end of the bezier_curve() output --- src/bezier_curve.scad | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bezier_curve.scad b/src/bezier_curve.scad index 9f09cb62..38f41639 100644 --- a/src/bezier_curve.scad +++ b/src/bezier_curve.scad @@ -54,9 +54,8 @@ function _bezier_curve_point(t, points) = function bezier_curve(t_step, points) = let( - pts = concat([ - for(t = [0: t_step: 1]) - _bezier_curve_point(t, points) - ], [_bezier_curve_point(1, points)]) + pts = [ for(t = [0: t_step: 1]) + _bezier_curve_point(t, points) + ] ) - len(points[0]) == 3 ? pts : [for(pt = pts) __to2d(pt)]; \ No newline at end of file + len(points[0]) == 3 ? pts : [for(pt = pts) __to2d(pt)];