1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-06 06:47:46 +02:00
This commit is contained in:
Justin Lin
2019-05-31 09:55:02 +08:00
parent e081d03193
commit 1f3022a3cc

View File

@@ -21,9 +21,7 @@ module along_with(points, angles, twist = 0, scale = 1.0) {
leng_points_minus_one = leng_points - 1; leng_points_minus_one = leng_points - 1;
twist_step_a = twist / leng_points; twist_step_a = twist / leng_points;
function scale_step() = angles_defined = angles != undef;
let(s = (scale - 1) / leng_points_minus_one)
[s, s, s];
scale_step_vt = __is_float(scale) ? scale_step_vt = __is_float(scale) ?
scale_step() : scale_step() :
@@ -33,6 +31,11 @@ module along_with(points, angles, twist = 0, scale = 1.0) {
scale[2] == undef ? 0 : (scale[2] - 1) / leng_points_minus_one scale[2] == undef ? 0 : (scale[2] - 1) / leng_points_minus_one
]; ];
function scale_step() =
let(s = (scale - 1) / leng_points_minus_one)
[s, s, s];
// get rotation matrice for sections // get rotation matrice for sections
identity_matrix = [ identity_matrix = [
@@ -110,7 +113,7 @@ module along_with(points, angles, twist = 0, scale = 1.0) {
} }
} }
if(angles != undef) { if(angles_defined) {
if($children == 1) { if($children == 1) {
for(i = [0:leng_points_minus_one]) { for(i = [0:leng_points_minus_one]) {
align_with_pts_angles(i) children(0); align_with_pts_angles(i) children(0);