Kindly @yossarianmtu gave me the idea to design a print-in-place version of the latch. Thanks again for this idea! :-)
I have now combined the lower mounting plate and the latch into one PIP part. This should make it possible to do without the additional metal pin. As I like the version with the metal pin better, I'll leave it in for now.
I have constructed a 3d-printable magnetic door latch system that is really cool! Instead of a normal latch and locking mechanism, it uses two magnets with different polarities to open and close the latch.
When you want to open the door, you push the hook upwards:
The magnet in the tab is now positioned in front of the upper magnet and is pushed away due to the opposite polarity, thereby lifting and unlocking it:
When you want to close the door lock bolt, you push the tab back into position and thus into the sphere of influence of the lower magnet. The lower magnet is polarised in such a way that it attracts the latch and thus locks it back in the closed position:
The author marked this model as their own original creation.