
So what does parametric mean? Basically parametric refers to the ability to alter the structure of an object (usually a computer model) by simply changing one or a few parameters, and the model is structured in such a way that sub-elements have built in logic to adjust themselves accordingly. For example, programs from companies like Solidworks, Autodesk, and others have the ability to build parametric designs. The software I used for this box is an open source program called OpenSCAD, OpenSCAD.org.
OpenSCAD models 3D and 2D objects via a scripting language. The software allows you start off with basic primitives (2D: circle, square, polygons ; 3D: cube, cylinder, sphere) then add, subtract, union, etc until you get the object with the geometry you need. The language has features to define variables, for loops, modules and allows you to pass variables that will give the user the ability to redefine the model via these parameters.
My requirements was to build a script where I could supply an interior box dimension with a length, width and depth, and the script would spit out a parts outline document that I could just take to a laser cutter, cut out the parts and assemble with 3mm bolts.

When I was done building the script I had the basics of what I wanted. But I also added a parameter for the material thickness the panels were cut out of and the slots and bolts would adjust themselves accordingly. I also added a parameter for how thick the tabs are, how long and wide the bolts are, and the length of the nut is to secure the bolts. I also added a parameter for the number of tabs on the length, width, and depth dimensions individually. I also designed the code is such a way that I can cut square, circle and polygon holes through individual panels to pass wires and mount buttons and controls on. Finally I coded the ability to toggle the visualization of the design between an assembled box as shown above and the flat design files ready to be cut and assembled.


The box is then assembled with 16mm long 3mm bolts with the nut embedded into the panel and the bolt is inserted from the outside to hold the box together.
And finally the assembled box.

And below is an example of a prototyped Raspberry Pi device utilizing this script for an enclosure. As you can see the base of the box is plywood and the top is acrylic. The plywood is nice for a box because if you don’t quite have your holes in the right area ,or you just forgot to add the holes, or you want to mount it on a wall, you can easily drill out a hole.

I made a variant on the parametric box script where the tabs are nested into the receiving panel. This script became the basis of my 3D printer that I upgraded.