After a few only moderately successful attempts to add snap-lock features to some of my things, I spent about an hour looking for a snap connector library. I couldn't find one, so put this one together remixing various ideas from other things. My collection of snapfit parts (which all contributed to the development of this library) is: https://www.thingiverse.com/dgm3333/collections/snapfit
Hopefully it will make it easier to create snap fit parts.
I haven't created a zillion stls, as there are tons of parameters you are likely to want to adjust, so just have a play in openSCAD.
The examples are all at the bottom of the file just switch the viewing variables to true or false to turn them off. Also some of the items are relatively processor intensive so have their own seperate switch.
NB I currently use the 2018 version of openSCAD which for some bizarre reason is at the bottom of the download page not the 2015 version at the top
There's quite a bit more that could be done with this library, so I'll probably edit as I need new parts for things
NB with an FDM printer the "spring" should be printed horizontally in the x or y axis to maximise strength