Rectangular case generator. The inset lid is held in place with friction so using thicker layers can help to keep the case closed (I'm using 200 micron layers).
The hinge flexes so flexible plastics will work better for this design (I'm using MadeSolid PET+), but less flexible materials may also work (I haven't tried ABS or PLA, but making the hinge longer or thinner may help).
-- MadeSolid Clear PET+
-- MadeSolid Blue PET+