mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-24 07:13:34 +02:00
add an option
This commit is contained in:
@@ -16,7 +16,7 @@ include <__private__/__to3d.scad>;
|
||||
// For backward compatibility, I directly include m_rotation here.
|
||||
include <m_rotation.scad>;
|
||||
|
||||
module along_with(points, angles, twist = 0, scale = 1.0) {
|
||||
module along_with(points, angles, twist = 0, scale = 1.0, method = "AXIS_ANGLE") {
|
||||
leng_points = len(points);
|
||||
leng_points_minus_one = leng_points - 1;
|
||||
twist_step_a = twist / leng_points;
|
||||
@@ -113,6 +113,11 @@ module along_with(points, angles, twist = 0, scale = 1.0) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Sadly, children(n) cannot be used with inner modules
|
||||
so I have to do things in the first level. Ugly!!
|
||||
*/
|
||||
if(method == "AXIS_ANGLE") {
|
||||
if(angles_defined) {
|
||||
if($children == 1) {
|
||||
for(i = [0:leng_points_minus_one]) {
|
||||
@@ -149,3 +154,5 @@ module along_with(points, angles, twist = 0, scale = 1.0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user