[OpenSCAD] Can't figure out how to draw thin cylinders.

Parkinbot rudolf at parkinbot.com
Thu Jun 30 11:35:39 EDT 2016

Another thing: OpenSCAD displays and exports in mm. To switch to inch you
have to introduce a factor: 

inch = 25.4; 

pcbradin = 2.5*inch; // inside radius of cktboard
pcbradout = 5.0*inch; // outside radius of cktboard
pcbthin = 1/16*inch;  // thickness of circuit board
pcbthick = 1/8*inch;  // thickness of the subtracted cylinder
//render (convexity=1) 
echo ("first",pcbthin, pcbthick);
color("red") cylinder(h=pcbthin,r=pcbradout,$fn=100, center = true);
echo ("second",pcbthin, pcbthick);
color("blue") cylinder(h=pcbthick+1 ,r=pcbradin,$fn=100,center=true);
color("blue") cube([pcbthick,pcbradin,5*inch], center=true); 

View this message in context: http://forum.openscad.org/Can-t-figure-out-how-to-draw-thin-cylinders-tp17841p17844.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

More information about the Discuss mailing list