This is a generic 2 part case, consisting of a box and lid.
It's all parametric, and is designed to be held together with screws.
The idea is that you can customise it to the sizes and wall thickness you need for housing your project, and use OpenSCAD to 'cut' the holes in it you need for openings, and to add 'standoffs' etc for mounting PCBs inside!
Hopefully it will be useful to people!
This is not likely to be useful printed as is without customising it for your project.
Inside the main function, you will find a list of parameters:
//Define your screw hole diameter and depth for fixing the lid on
screw_hole_dia = 3;
screw_hole_depth = 10;
screw_hole_head_countersink_dia = 6;
screw_hole_head_countersink_depth = 0.5;
//This usually seems sensible, but you might need to adjust it for strange combinations of screw hole and box corner radius to ensure your pillars are 'fused' suitably with the sides of the box. - can go negative as well as positive if needed.
pillar_offset_tweak = 0;
Customise these to specify the box you want to create. Enjoy!
Any bugfixes etc, please contact me so I can improve this thing!