From 63a5e535727b4e75c1b4d10c764ee9e4d1ffab01 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 4 Oct 2021 12:39:16 +0800 Subject: [PATCH] refactor --- src/_impl/_contours_impl.scad | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/_impl/_contours_impl.scad b/src/_impl/_contours_impl.scad index f1837b86..fa5888cc 100644 --- a/src/_impl/_contours_impl.scad +++ b/src/_impl/_contours_impl.scad @@ -116,8 +116,10 @@ function _isolines_of(cell_pts, threshold) = function _marching_squares_isolines(points, threshold) = let(labeled_pts = _isolines_pn_label(points, threshold)) [ - for(y = [0:len(labeled_pts) - 2]) - for(x = [0:len(labeled_pts[0]) - 2]) + for( + y = [0:len(labeled_pts) - 2], + x = [0:len(labeled_pts[0]) - 2] + ) let( p0 = labeled_pts[y][x], p1 = labeled_pts[y + 1][x], @@ -1391,8 +1393,10 @@ function _isobands_of(cell_pts, lower, upper) = function _marching_squares_isobands(points, lower, upper) = let(labeled_pts = _isobands_tri_label(points, lower, upper)) [ - for(y = [0:len(labeled_pts) - 2]) - for(x = [0:len(labeled_pts[0]) - 2]) + for( + y = [0:len(labeled_pts) - 2], + x = [0:len(labeled_pts[0]) - 2] + ) let( p0 = labeled_pts[y][x], p1 = labeled_pts[y + 1][x],