So, to get the best hex nut capture socket fit, I wrote a parametric OpenSCAD script to produce a simple test part.

Any screw size with either a hex head or a round capped head can be configured to produce a test part for 3d printing.

Use the Thingiverse Customizer to produce custom STL files.

The project with variable setting details are published here:

Discuss this model in the 3D-Printing-Community