1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 04:51:26 +02:00

Remove excess point at the end of the bezier_curve() output

This commit is contained in:
Dmitry Frolov
2018-05-01 10:44:20 +07:00
parent b2bcb78ca3
commit 2a3596895f

View File

@@ -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)];
len(points[0]) == 3 ? pts : [for(pt = pts) __to2d(pt)];