mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-13 10:14:41 +02:00
supported twist
This commit is contained in:
@@ -13,8 +13,10 @@
|
|||||||
|
|
||||||
include <__private__/__angy_angz.scad>;
|
include <__private__/__angy_angz.scad>;
|
||||||
|
|
||||||
module along_with(points, angles) {
|
module along_with(points, angles, twist = 0) {
|
||||||
leng_points = len(points);
|
leng_points = len(points);
|
||||||
|
twist_step_a = twist / leng_points;
|
||||||
|
echo(twist_step_a);
|
||||||
|
|
||||||
function _path_angles(i = 0) =
|
function _path_angles(i = 0) =
|
||||||
i == leng_points - 1 ?
|
i == leng_points - 1 ?
|
||||||
@@ -38,10 +40,12 @@ module along_with(points, angles) {
|
|||||||
translate(points[i])
|
translate(points[i])
|
||||||
rotate(angs[i])
|
rotate(angs[i])
|
||||||
if(angles_defined) {
|
if(angles_defined) {
|
||||||
children(0);
|
rotate(twist_step_a * i)
|
||||||
|
children(0);
|
||||||
} else {
|
} else {
|
||||||
rotate([90, 0, -90])
|
rotate([90, 0, -90])
|
||||||
children(0);
|
rotate(twist_step_a * i)
|
||||||
|
children(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user