mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-06 14:56:47 +02:00
refactor
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user