To protect my printer from dust, I built an enclosure into my Ikea Hejne shelf.
This latch holds the PMMA glass door shut using magnets.
DoorStop part holds two Ø5 x 5 mm magnets. You can adjust the holding force by stacking multiple magnets or by changing their axial position.
The GripPlate part holds a M5 bolt and a nut. The bolt head engages with the magnets with a nice clicking sound if adjusted properly.
DoorStopClamp part is needed to clamp the magnets using two M4 x 16 bolts and nuts.
DoorStopCover is just to make a nice appearance on the wooden frame of the shelf, might be omitted.
To be used with 96 mm handle. I had mine laying arround, I believe it was also from IKEA.
If you want to print out a handle, you could use one of those: https://www.printables.com/social/347025-dozdoz/collections/303344 (I did not test any)
I printed all in PETG. Supports are needed for the DoorStop part. Alternatively, you try orienting it sideways to omit supports - came to my mind after printing.
The author marked this model as their own original creation.