From 86fb7c1279d7d4b90bd2002686e0b27cdebfc402 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 26 Sep 2019 08:12:43 +0800 Subject: [PATCH] format --- src/along_with.scad | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/along_with.scad b/src/along_with.scad index 54b742da..b1dde004 100644 --- a/src/along_with.scad +++ b/src/along_with.scad @@ -83,19 +83,19 @@ module along_with(points, angles, twist = 0, scale = 1.0, method = "AXIS_ANGLE") module axis_angle_align_with_pts_angles(i) { translate(points[i]) - rotate(angles[i]) - rotate(twist_step_a * i) - scale([1, 1, 1] + scale_step_vt * i) - children(0); + rotate(angles[i]) + rotate(twist_step_a * i) + scale([1, 1, 1] + scale_step_vt * i) + children(0); } module axis_angle_align_with_pts_init(a, s) { angleyz = __angy_angz(__to3d(points[0]), __to3d(points[1])); rotate([0, -angleyz[0], angleyz[1]]) - rotate([90, 0, -90]) - rotate(a) - scale(s) - children(0); + rotate([90, 0, -90]) + rotate(a) + scale(s) + children(0); } module axis_angle_align_with_pts_local_rotate(j, init_a, init_s, cumu_rot_matrice) { @@ -105,8 +105,8 @@ module along_with(points, angles, twist = 0, scale = 1.0, method = "AXIS_ANGLE") } else { multmatrix(cumu_rot_matrice[j - 1]) - axis_angle_align_with_pts_init(init_a, init_s) - children(0); + axis_angle_align_with_pts_init(init_a, init_s) + children(0); } } @@ -131,11 +131,11 @@ module along_with(points, angles, twist = 0, scale = 1.0, method = "AXIS_ANGLE") module euler_angle_align(i, angs) { translate(points[i]) - rotate(angs[i]) - rotate(angles_defined ? [0, 0, 0] : [90, 0, -90]) - rotate(twist_step_a * i) - scale([1, 1, 1] + scale_step_vt * i) - children(0); + rotate(angs[i]) + rotate(angles_defined ? [0, 0, 0] : [90, 0, -90]) + rotate(twist_step_a * i) + scale([1, 1, 1] + scale_step_vt * i) + children(0); } // <<< end: modules and functions for "EULER-ANGLE" @@ -159,20 +159,20 @@ module along_with(points, angles, twist = 0, scale = 1.0, method = "AXIS_ANGLE") ]); translate(points[0]) - axis_angle_align_with_pts_local_rotate(0, 0, [1, 1, 1], cumu_rot_matrice) - children(0); + axis_angle_align_with_pts_local_rotate(0, 0, [1, 1, 1], cumu_rot_matrice) + children(0); if($children == 1) { for(i = [0:leng_points - 2]) { translate(points[i + 1]) - axis_angle_align_with_pts_local_rotate(i, i * twist_step_a, [1, 1, 1] + scale_step_vt * i, cumu_rot_matrice) - children(0); + axis_angle_align_with_pts_local_rotate(i, i * twist_step_a, [1, 1, 1] + scale_step_vt * i, cumu_rot_matrice) + children(0); } } else { for(i = [0:min(leng_points, $children) - 2]) { translate(points[i + 1]) - axis_angle_align_with_pts_local_rotate(i, i * twist_step_a, [1, 1, 1] + scale_step_vt * i, cumu_rot_matrice) - children(i + 1); + axis_angle_align_with_pts_local_rotate(i, i * twist_step_a, [1, 1, 1] + scale_step_vt * i, cumu_rot_matrice) + children(i + 1); } } }