diff --git a/src/along_with.scad b/src/along_with.scad index 5ceac562..d31395e8 100644 --- a/src/along_with.scad +++ b/src/along_with.scad @@ -59,9 +59,9 @@ module along_with(points, angles, twist = 0, scale = 1.0, method = "AXIS_ANGLE") children(0); } + angleyz_pts01 = __angy_angz(pts[0], pts[1]); module axis_angle_align_with_pts_rs(a, s) { - angleyz = __angy_angz(pts[0], pts[1]); - rotate([0, -angleyz[0], angleyz[1]]) + rotate([0, -angleyz_pts01[0], angleyz_pts01[1]]) rotate(a - 90) scale(s) children(0); diff --git a/src/path_extrude.scad b/src/path_extrude.scad index eea6511a..0da30e6f 100644 --- a/src/path_extrude.scad +++ b/src/path_extrude.scad @@ -69,12 +69,9 @@ module path_extrude(shape_pts, path_pts, triangles = "SOLID", twist = 0, scale = ]; // get all sections - + angleyz_pts01 = __angy_angz(pth_pts[0], pth_pts[1]); function init_section(a, s) = - let( - angleyz = __angy_angz(pth_pts[0], pth_pts[1]), - transform_m = m_rotation([0, -angleyz[0], angleyz[1]]) * m_rot_90_0_n90 * m_rotation(a) * m_scaling(s) - ) + let(transform_m = m_rotation([0, -angleyz_pts01[0], angleyz_pts01[1]]) * m_rot_90_0_n90 * m_rotation(a) * m_scaling(s)) [ for(p = sh_pts) let(transformed = transform_m * p)