From f71b151e960f40540cfebd40f76344a577e9d05c Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 7 Jan 2021 15:57:29 +0800 Subject: [PATCH] rename --- src/_impl/_contours_impl.scad | 68 +++++++++++++++++------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/_impl/_contours_impl.scad b/src/_impl/_contours_impl.scad index 94b43b97..225e79c5 100644 --- a/src/_impl/_contours_impl.scad +++ b/src/_impl/_contours_impl.scad @@ -50,8 +50,8 @@ function _case4_isolines(cell_pts, threshold) = [ ]; function _case5_isolines(cell_pts, threshold) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz >= threshold ? + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z >= threshold ? [ [interpolated_pt(cell_pts[0], cell_pts[1], threshold), interpolated_pt(cell_pts[1], cell_pts[2], threshold)], [interpolated_pt(cell_pts[0], cell_pts[3], threshold), interpolated_pt(cell_pts[2], cell_pts[3], threshold)] @@ -75,8 +75,8 @@ function _case8_isolines(cell_pts, threshold) = _case7_isolines(cell_pts, thresh function _case9_isolines(cell_pts, threshold) = _case6_isolines(cell_pts, threshold); function _case10_isolines(cell_pts, threshold) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz >= threshold ? + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z >= threshold ? [ [interpolated_pt(cell_pts[0], cell_pts[1], threshold), interpolated_pt(cell_pts[0], cell_pts[3], threshold)], [interpolated_pt(cell_pts[1], cell_pts[2], threshold), interpolated_pt(cell_pts[2], cell_pts[3], threshold)] @@ -565,8 +565,8 @@ function _case2201_isobands(cell_pts, lower, upper) = // Saddles function _case2020_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < lower ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < lower ? [ [ interpolated_pt(cell_pts[0], cell_pts[1], lower), interpolated_pt(cell_pts[1], cell_pts[2], lower), @@ -579,7 +579,7 @@ function _case2020_isobands(cell_pts, lower, upper) = interpolated_pt(cell_pts[2], cell_pts[3], upper), interpolated_pt(cell_pts[2], cell_pts[3], lower) ] ] : - mdpz >= lower && mdpz < upper ? [ + center_p_z >= lower && center_p_z < upper ? [ [ interpolated_pt(cell_pts[0], cell_pts[1], lower), interpolated_pt(cell_pts[0], cell_pts[3], lower), @@ -606,8 +606,8 @@ function _case2020_isobands(cell_pts, lower, upper) = ]; function _case0202_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < lower ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < lower ? [ [ interpolated_pt(cell_pts[0], cell_pts[1], upper), interpolated_pt(cell_pts[0], cell_pts[3], upper), @@ -621,7 +621,7 @@ function _case0202_isobands(cell_pts, lower, upper) = interpolated_pt(cell_pts[1], cell_pts[2], upper) ] ] : - mdpz >= lower && mdpz < upper ? [ + center_p_z >= lower && center_p_z < upper ? [ [ interpolated_pt(cell_pts[0], cell_pts[1], upper), interpolated_pt(cell_pts[0], cell_pts[3], upper), @@ -648,8 +648,8 @@ function _case0202_isobands(cell_pts, lower, upper) = ]; function _case0101_isobands(cell_pts, threshold) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < threshold ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < threshold ? [ [ [cell_pts[0][0], cell_pts[0][1], cell_pts[0][2]], interpolated_pt(cell_pts[0], cell_pts[3], threshold), @@ -672,8 +672,8 @@ function _case0101_isobands(cell_pts, threshold) = ]; function _case1010_isobands(cell_pts, threshold) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < threshold ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < threshold ? [ [ interpolated_pt(cell_pts[0], cell_pts[1], threshold), interpolated_pt(cell_pts[1], cell_pts[2], threshold), @@ -696,8 +696,8 @@ function _case1010_isobands(cell_pts, threshold) = ]; function _case2121_isobands(cell_pts, threshold) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < threshold ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < threshold ? [ [ [cell_pts[0][0], cell_pts[0][1], cell_pts[0][2]], interpolated_pt(cell_pts[0], cell_pts[3], threshold), @@ -720,8 +720,8 @@ function _case2121_isobands(cell_pts, threshold) = ]; function _case1212_isobands(cell_pts, threshold) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < threshold ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < threshold ? [ [ interpolated_pt(cell_pts[0], cell_pts[3], threshold), [cell_pts[3][0], cell_pts[3][1], cell_pts[3][2]], @@ -744,8 +744,8 @@ function _case1212_isobands(cell_pts, threshold) = ]; function _case2120_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < upper ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < upper ? [ [ interpolated_pt(cell_pts[0], cell_pts[3], lower), interpolated_pt(cell_pts[0], cell_pts[3], upper), @@ -770,8 +770,8 @@ function _case2120_isobands(cell_pts, lower, upper) = ]; function _case0102_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < lower ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < lower ? [ [ interpolated_pt(cell_pts[0], cell_pts[3], upper), interpolated_pt(cell_pts[0], cell_pts[3], lower), @@ -796,8 +796,8 @@ function _case0102_isobands(cell_pts, lower, upper) = ]; function _case2021_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < upper ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < upper ? [ [ [cell_pts[0][0], cell_pts[0][1], cell_pts[0][2]], interpolated_pt(cell_pts[0], cell_pts[3], upper), @@ -822,8 +822,8 @@ function _case2021_isobands(cell_pts, lower, upper) = ]; function _case0201_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < lower ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < lower ? [ [ [cell_pts[0][0], cell_pts[0][1], cell_pts[0][2]], interpolated_pt(cell_pts[0], cell_pts[3], lower), @@ -848,8 +848,8 @@ function _case0201_isobands(cell_pts, lower, upper) = ]; function _case1202_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < upper ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < upper ? [ [ interpolated_pt(cell_pts[0], cell_pts[3], upper), interpolated_pt(cell_pts[0], cell_pts[3], lower), @@ -874,8 +874,8 @@ function _case1202_isobands(cell_pts, lower, upper) = ]; function _case1020_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < lower ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < lower ? [ [ interpolated_pt(cell_pts[0], cell_pts[1], lower), interpolated_pt(cell_pts[1], cell_pts[2], lower), @@ -900,8 +900,8 @@ function _case1020_isobands(cell_pts, lower, upper) = ]; function _case0212_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < upper ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < upper ? [ [ interpolated_pt(cell_pts[0], cell_pts[3], upper), [cell_pts[3][0], cell_pts[3][1], cell_pts[3][2]], @@ -926,8 +926,8 @@ function _case0212_isobands(cell_pts, lower, upper) = ]; function _case2010_isobands(cell_pts, lower, upper) = - let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) - mdpz < lower ? [ + let(center_p_z = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4) + center_p_z < lower ? [ [ interpolated_pt(cell_pts[0], cell_pts[1], lower), interpolated_pt(cell_pts[1], cell_pts[2], lower),