mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
don't repeat calc angleyz_pts01
This commit is contained in:
parent
060e695a1a
commit
bf13db43eb
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user