See Sune chair fix.
This parametric model allows you to quickly generate endcaps, furniture feet, spacers, caster wheel inserts, etc. The sky is the limit.
So far I have used this to:
How to use OpenScad
2. Open Endcap.scad and use the Customizer window, shown below:
3. Enter your dimensions in mm.
4. Success!
The scad file uses an Open Source library https://github.com/SebiTimeWaster/Chamfers-for-OpenSCAD.
The author marked this model as their own original creation.