From 386e8b934e4598cc8ae34a5ed36726c926e5cf21 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 21 Sep 2019 08:25:26 +0800 Subject: [PATCH] refactor --- src/bspline_curve.scad | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bspline_curve.scad b/src/bspline_curve.scad index b34f527a..70bb381a 100644 --- a/src/bspline_curve.scad +++ b/src/bspline_curve.scad @@ -40,11 +40,12 @@ function _bspline_curve_nvi(v, i, l, t, degree, knots) = function _bspline_curve_nvl(v, l, s, t, degree, knots, i) = i == (s - degree - 1 + l) ? v : let( + leng_v = len(v), nvi = _bspline_curve_nvi(v, i, l, t, degree, knots), nv = concat( [for(j = 0; j < i; j = j + 1) v[j]], nvi, - [for(j = i + 1; j < len(v); j = j + 1) v[j]] + [for(j = i + 1; j < leng_v; j = j + 1) v[j]] ) ) _bspline_curve_nvl(nv, l, s, t, degree, knots, i - 1);