All credits and thanks must go to Lorenzo Aspesi, the author of the original script!
I only modified it in order to print on horizontal (instead of vertical) for the following reasons:
- the screw/nut holes are better defined when printing in this position (at least on my printer, without cooling fan...)
- the final part has more strength, due to the orientation of the the layers
I included the .stl files for my particular adapter: 5mm nema17 axis - 8mm threaded rod, with two different heights: 30 and 35mm respectively. The script can also be opened in OpenSCAD and modified to obtain any other adapter variation that is needed.