This is a somewhat parametric draw-latch. Used to hold things shut. It works on a cam principle and has quite a bit of holding force.
This is somewhat parametric. I didn't test too many sizes or anything so not sure how the various settings at the top of the scad file will effect things. After I printed it out I added a "give" parameter which should make the latch easier to close.
If you want to add a latch to your project, you would add the "catch" and "base" parts to your model and then print the "cam" and "latch" seperately.
They pin together and work very well. If you use the non +give stl file you will have no play once the latch is closed. I didn't try it, but using filament for your pins may actually work really well since it would add elasticity.