Loading utilities.scad +2 −2 Changes for utilities.scad: 2 added lines, 2 removed lines. Original line number Original line Diff line number Diff line Loading @@ -26,8 +26,8 @@ function angleBetweenTwoPoints(a, b) = angle(normalized(b-a)); // TODO check that the axis parameter works as intended // TODO check that the axis parameter works as intended // Duplicate everything $no of times around an $axis, for $angle/360 rounds // Duplicate everything $no of times around an $axis, for $angle/360 rounds module spin(no, angle=360, axis=[0, 0, 1]){ module spin(no, angle=360, axis=[0, 0, 1]){ for (i = [0:no]){ for (i = [1:no]){ rotate(normalized(axis)*angle*i/no) union(){ rotate(normalized(axis)*angle*no/i) union(){ for (i = [0 : $children-1]) child(i); for (i = [0 : $children-1]) child(i); } } } } Loading Loading
utilities.scad +2 −2 Changes for utilities.scad: 2 added lines, 2 removed lines. Original line number Original line Diff line number Diff line Loading @@ -26,8 +26,8 @@ function angleBetweenTwoPoints(a, b) = angle(normalized(b-a)); // TODO check that the axis parameter works as intended // TODO check that the axis parameter works as intended // Duplicate everything $no of times around an $axis, for $angle/360 rounds // Duplicate everything $no of times around an $axis, for $angle/360 rounds module spin(no, angle=360, axis=[0, 0, 1]){ module spin(no, angle=360, axis=[0, 0, 1]){ for (i = [0:no]){ for (i = [1:no]){ rotate(normalized(axis)*angle*i/no) union(){ rotate(normalized(axis)*angle*no/i) union(){ for (i = [0 : $children-1]) child(i); for (i = [0 : $children-1]) child(i); } } } } Loading