I designed this extremely simple door latch to use with my 4040 extruded aluminum enclosure. It drops into a T-slot 8 mm in width, turns 90º to the right, and clamps snug against an 1/8"-thick (or 3-mm thick) acrylic door frame.
Photo attached. I printed mine on its flat sides, without supports, using PETG. Any filament and reasonable settings should be fine.
The author marked this model as their own original creation.