Introduction.
This has been initialy developped in order to have Gridfinity boxes for a few of my flashlights, (CONVOY, OLIGHT, …) but in the end it's of course working for any kind of rounded item (glue sticks, flasks, bottles, any other round flashlights, …).
The basic usage is for “1x1” box (of any height), but more advanced usages are possible as “Do-It-Yourself” (there is one example in the .scad file).
Pre-requesites.
You have to download the “1x1” models from here : https://www.printables.com/model/210548-filled-in-gridfinity-boxes-for-customization/files (it will be used by the script as a basis) and put the proper models from there (= the ones you want to use) inside the same folder than the “.scad” source file (probably mainly the 1x1 files).
Of course you need OpenSCAD.
Generating your own STL files.
In OpenSCAD, configure in the .scad file :
Then just generate the STL file (F6 under OpenSCAD) and export it as .STL, and you'll be ready to print.
Preconfigured STL.
A few preconfigured STL files are available for easy try out. They are all with “0.5” extra margin.
Printing.
Nothing special, supports probably needed for the bottom holes of the underlying Gridfinity model if you are taking the versions with holes.
The author marked this model as their own original creation.