# Can't figure out how to draw thin cylinders.

7 messages
Open this post in threaded view
|

## Can't figure out how to draw thin cylinders.

Open this post in threaded view
|

## Re: Can't figure out how to draw thin cylinders.

Open this post in threaded view
|

## Re: Can't figure out how to draw thin cylinders.

 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) difference() { color("red"); 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);
Open this post in threaded view
|

## Re: Can't figure out how to draw thin cylinders.

Open this post in threaded view
|

## Re: Can't figure out how to draw thin cylinders.

 You are perfectly right. As almost all tools downstream will interpret units as mm, it's worth mentioning it, to prevent unexpected results. And if you remind this discussion it is not advisable to use very small values in OpenSCAD, because there is some unexpected rounding "magic" going on behind the scenes. So it is not a good idea to use inches for a design that is going to be specified in fractions of inches.