Generic case (box and lid)

by davidmpye, published

Generic case (box and lid) by davidmpye Oct 11, 2012


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!

More from Hobby

view more

Liked By

view all


Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag


This is not likely to be useful printed as is without customising it for your project.

You will need to edit the first 3 lines of the .SCAD file to point to the file path on your local machine for where you have stored the aforementioned SCAD files. The roundedCornersCube.scad is available from the thing: http://www.thingiverse.com/thing:8812, of which my object is a derivative. The other two files are attached to this project - it is made by Nophead, and I got it from the mendel90 source code.


roundedCornersCube(generate_box, generate_lid);


roundedCornersCube(true, false) will generate you the box. roundedCornersCube(false, true) will generate you the lid.

true, true will generate you both the box and matching lid.

Inside the main function, you will find a list of parameters:

//Case details (these are *outer* diameters of the case 
sx = 95;             //X dimension
sy = 45;            //Y dimension
sz = 30;            //Z dimension
r = 2.5;            //The radius of the curves of the box walls.
wall_thickness = 1.5;//Thickness of the walls of the box (and lid)

//Screw hole details
screw_hole_dia = 2;      //Diameter of the screws you want to use
screw_hole_depth = 20;    //Depth of the screw hole

screw_head_dia = 5;        //Diameter of the screw head (for the recess)
screw_head_depth = 1.25;    //Depth of the recess to hold the screw head

Customise these to specify the box you want to create. Enjoy! Now fixed the thing so the lid has a lip on, which supports the walls and stops inward flexing.

Any bugfixes etc, please contact me so I can improve this thing!