This trick box has a hidden latch mechanism that will keep it securely closed until you twist a particular section of the lid.
The part that twists... can be almost anything! This project comes with several topper designs, but you can easily make your own. https://youtu.be/1muiuHjyLlU
3d model print parameters
This model can be printed entirely without supports!
For strength, use at least 3 perimeters and 15% infill.
The spring should be printed with e...nough perimeters so that the thin arms of the spring are made entirely out of perimeter lines. This will make sure it bends in the correct way.
I've tested printing the spring in PLA and PETG. So far, it has worked well, but some filament may bend and withstand regular use better than others.
Base.stl and its various sizes has 15mm long bridges. These need to be printed straight or the latches won't slide as easily into place.
Assembly
See the video above for a complete assembly.
Many of these pieces have intentionally tight clearances so that they'll hold rigidly together. If parts are too tight to assemble, use sandpaper to improve the fit.
For the most rigid construction, glue the following connections:
The edge of Spring.stl (not the part that flexes) to Cap.stl
The hex peg of Gear.stl to the hex hole in your topper.
When placing the spring into the lid, gently pre-tension it so that the latch arms are being pulled in slightly even when they are in their locked position. One gear tooth should be sufficient.