These are replacement caps for my Vandy Vape Pulse, one of the originals broke and while I was waiting for the replacement to come, I decided to do it myself with some modification.
It depends on the printer
Depending on the 3D printer and the quality of the printing, this is how the post-processing should be treated. in my place I had to make some adjustments to fit as perfectly as possible.
Use magnets with a diameter of 3mm x 1.5mm thick.
I did the design with Sketchup 2017