[OpenSCAD] How can I tell what OpenSCAD is doing?

Parkinbot rudolf at parkinbot.com
Mon Oct 10 10:54:33 EDT 2016


I understood it as some kind of exercise. Let's say the sin/cos part is meant
to produce a rotation. Doing that properly you'd get some (rough) moebius
code


> testTorus(); 
> twists = 3; 
> // twists = 1; 
> module testTorus() {
>   step = 1; 
>   for (i = [0:step:360]) 
>       rotate([0, 0, i])
>       rotate_extrude(angle=step, convexity=10){      
>         translate([20,0,0]) 
>        //rotate([0, 0, i/2*twists]) square([1,30], center=true);    
>        rotate([0, 0, i/4*twists]) circle(10, $fn=4);
>   }
> }

<http://forum.openscad.org/file/n18652/Unbenannt.png>   
<http://forum.openscad.org/file/n18652/Unbenannt2.png> 

or look at this hypocyloide approach 


> testTorus(); 
> module testTorus() {
>   step = 1; 
>   for (i = [0:step:360]) 
>       rotate([0, 0, i])
>       rotate_extrude(angle=step, convexity=10){      
>         translate([20+5*sin(2*i),0,0]) 
>        circle(10, $fn=4);
>   }
> }

to get 
<http://forum.openscad.org/file/n18652/Unbenannt1.png> 

As results are unions of rough interpolations it will be fruitless (and a
waste of CPU-time) to F6-render code like this. 





--
View this message in context: http://forum.openscad.org/How-can-I-tell-what-OpenSCAD-is-doing-tp18632p18652.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list