So we have goats, one of whom refuses to be a "scapegoat" but instead is an "escapegoat"! And on top of being a jerk, she most recently closed the door to the hut the herd lives in, and somehow (despite only have 2 fingers) threw the deadbolt locking her friends inside while she jumped the fence and ran around the barn. So we needed a latch to hold their door open (but it had to be easily closable by a person). So I made up a pivoting holder that contains a pair of these 30mm epoxy coated magnets (each one with 18lbs force!). The model is designed to use a 4mm button cap M4 bolt going as the hinge pin. Originally I tried tapping the bottom hole but discovered it didn't work particularly well, so ended up using a 4mm long M4 heated brass insert (put in with a soldering iron). Worked perfectly. I made these in PLA (as it was a trial run). But for permanent use I'd suggest either PETG/ABS or PC-Blend.
I included the STEP files if you want to modify the design. The counter suck holes are for standard drywall screws (a #10 screw to be precise). I used 4-perimeters and 7 top/bottom layers to make it durable.
Latch works great, but Oreo is still a jerk (and doesn't feel the least bit guilty about it). But luckily she is adorable.
Note you do need supports between the 2 plates of the hinge piece and in the magnet pocket in the pivoting part.
BEFORE GLUING IN THE MAGNETS MAKE SURE THE POLARITY MATCHES (or you door will never be openable!). The magnets come with mounting stickers in the box.
The author hasn't provided the model origin yet.