From 7dcf44cd676e31af6ed604775e1e6081172fbd25 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 19 Sep 2019 17:53:11 +0800 Subject: [PATCH] refactor --- src/function_grapher.scad | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/function_grapher.scad b/src/function_grapher.scad index 8cbd5c00..7b285963 100644 --- a/src/function_grapher.scad +++ b/src/function_grapher.scad @@ -24,9 +24,9 @@ module function_grapher(points, thickness, style = "FACES", slicing = "SLASH") { function xy_to_index(x, y, columns) = y * columns + x; top_pts = [ - for(row_pts = points) - for(pt = row_pts) - pt + for(row_pts = points) + for(pt = row_pts) + pt ]; base_pts = [ @@ -72,14 +72,15 @@ module function_grapher(points, thickness, style = "FACES", slicing = "SLASH") { ] ]; + offset_v = [leng_pts, leng_pts, leng_pts]; base_tri_faces1 = [ for(face = top_tri_faces1) - __reverse(face) + [leng_pts, leng_pts, leng_pts] + __reverse(face) + offset_v ]; base_tri_faces2 = [ for(face = top_tri_faces2) - __reverse(face) + [leng_pts, leng_pts, leng_pts] + __reverse(face) + offset_v ]; side_faces1 = [