Rounded Cylinder

I could not find any rounded cylinder in the thingiverse, so I decided to make my own.

This version can be used both as a library or customizer thing.

Note: After submission, I noticed that there are other rounded cylinders in the thingiverse, like (http://www.thingiverse.com/thing:58478). However, my design is different than others I found.

To use the design in a customizer, just click the "Open in Customizer" link. There are a few parameters that you can fill:

Since this thing is a cylinder, we have a radius and height for the main cylinder.

For the rounding on the edges, there is a "rounding" parameter, which is the rounding in millimeters on the edges.

There is another option, "roundTopOnly" which rounds only the top edge. That is because I frequently needed to round only the top edge.

Finally, there is "fn" parameter, which is the number of fragments on an edge.

If you want to use the design as a library, you just need to download the .scad file and add "" in your openscad file.

Our library supports global $fn, $fa, and $fs variables.

Edit: I noticed a few flaws for boundary cases. I fixed those problems.

i. There are now more controls on the rounding parameter: It cannot exceed the Radius of cylinder, it cannot exceed the height of the cylinder, and it cannot exceed half-height of the cylinder if both top and bottom are rounded.

ii. There appears incorrect (invisible) faces which may cause problems in some renderers. This faulty face is also corrected.