Sorry I missed a sentence. I found the formula by printing a grid of holes
that had different sizes on one axis and different $fn on the other axis.
$fn can always be lower than the formula but when higher the holes start to
shrink because the vertices are too close for the tightness of the corner.
If I want the hole to look round and touch a cylinder in many places I set
the twist parameter to 2. The alternates the vertices but also offsets them
a bit more so they spirale around the hole. Alternating them gives a good
connection to the infill and the spiral makes it look round.
Sorry I missed a sentence. I found the formula by printing a grid of holes
that had different sizes on one axis and different $fn on the other axis.
$fn can always be lower than the formula but when higher the holes start to
shrink because the vertices are too close for the tightness of the corner.
If I want the hole to look round and touch a cylinder in many places I set
the twist parameter to 2. The alternates the vertices but also offsets them
a bit more so they spirale around the hole. Alternating them gives a good
connection to the infill and the spiral makes it look round.