The optical calculation is simple when there is only one lens. There are many calculators online but a simple Excel sheet will also do the trick.
Formulas
Results
The distances are between the film, the sensor and the theoretical focal point of the lens. Add approximately 50mm and to be more precise consult the Componon diagram to have the position of the theoretical center of the object in relation to its front or rear face, 42 mm for the back focal
Note that the helical ring is to determine the length of the tube and therefore the magnification, for focusing we move the entire assembly. I highly recommend a 3-axis micrometer table but it is quite expensive. Certainly quite difficult in 3D printing because it is very sensitive and must be very stable.