cylinder()

The Cylinder() primitive command will add a cylinder or tapered cylinder to your model.

In it’s basic form like the cube() and sphere(), the cylinder() command does not need any parameters.

cylinder();

You can create a cube with the unit measure of 1 by adding the above command, here is the result:

SO while that does not look like a cylinder, according to OpenSCAD it is a cylinder. OpenSCAD forms cylinders using faces. If you would like a smoother looking cylinder you can increase the resulting number of faces by changing the $fn variable.

$fn=25;

The $fn variable, fragment number, with a value of 25 will result in the following object. You can add the $fn before or after the object.

The cylinder in it’s basic form can receive a height and radius.

cylinder(h=5,r=4);

In it’s final form we can create cones and truncated cones. By providing two radii, r1 and r2.

cylinder( h=8,r1=5,r2=1);

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: