From cb12836e8b0c2539848eef7a6d7548e9cdad1370 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 21 Jun 2021 08:47:14 +0800 Subject: [PATCH] fix face_normal error --- src/surface/sf_splines.scad | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/surface/sf_splines.scad b/src/surface/sf_splines.scad index 4a4108f7..808b6f8a 100644 --- a/src/surface/sf_splines.scad +++ b/src/surface/sf_splines.scad @@ -17,9 +17,16 @@ function sf_splines(ctrl_pts, row_spline, column_spline) = row_spline(ctrl_pts[r]) ], leng_r_pts0 = len(r_pts[0]), - leng_r_pts = len(r_pts) + leng_r_pts = len(r_pts), + sf = [ + for(c = 0; c < leng_r_pts0; c = c + 1) + cspline([for(r = 0; r < leng_r_pts; r = r + 1) r_pts[r][c]]) + ] ) [ - for(c = 0; c < leng_r_pts0; c = c + 1) - cspline([for(r = 0; r < leng_r_pts; r = r + 1) r_pts[r][c]]) + for(y = 0; y < len(sf[0]); y = y + 1) + [ + for(x = 0; x < len(sf); x = x + 1) + sf[x][y] + ] ]; \ No newline at end of file