Talk:OpenSCAD User Manual/undersized circular objects

I understand how the holes would come out too small due to the segments being inside the circle.

But surely it would also be true of any circle, and thus all cones & cylinders, not just holes.....?

If so, why does OpenSCAD not add the fudge factor for all circles (or at least if fn > some value, such as 20)?

The fn threshold would preserve the creation of regular polygonal prisms.

That way, when we specify a cylinder of diameter 6 (fn=50) we get a cylinder with diameter 6.

If there is concern for backward bug compatibility, set a flag/parameter such as: truecircle=true  or  circumscribe=true

Anyway, this may be a more flexible approach:

'''function fudgeR (r,fn=$fn) = r / cos(180/fn); // return fudged radius to obtain accurate circle made from fn polygons '''

then that function can be called to adjust the radius with any of the primitive solids, for example:

cylinder(h=5,r=fudgeR(100,64),$fn=64, center=true);

The advantage is that other parameters (such as center= can also be specified)