1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-18 20:41:18 +02:00

supported angles

This commit is contained in:
Justin Lin
2017-05-03 16:21:49 +08:00
parent 1db94682c0
commit 81bc779d64

View File

@@ -11,16 +11,25 @@
* *
**/ **/
module along_with(points) { module along_with(points, angles) {
module rotOrNot(i) {
if(angles == undef) {
children(0);
} else {
rotate(angles[i])
children(0);
}
}
if($children == 1) { if($children == 1) {
for(i = [0:len(points) - 1]) { for(i = [0:len(points) - 1]) {
translate(points[i]) translate(points[i])
children(0); rotOrNot(i) children(0);
} }
} else { } else {
for(i = [0:min(len(points), $children) - 1]) { for(i = [0:min(len(points), $children) - 1]) {
translate(points[i]) translate(points[i])
children(i); rotOrNot(i) children(i);
} }
} }
} }