Parametric Box maker

by savorywatt, published

Parametric Box maker by savorywatt Mar 8, 2013
Tip Designer Report Thing

Thing Info

5018Views 719Downloads Found in Electronics


T-slot based case generator. You specify what size object you want it to surround and your material width and it makes a printable box with slots for you to use screws to put it together. The github version allows you to export a file you can cut with a laser.


  1. Open in Customizer
  2. Specify your params - in MM
  3. Export each face
  4. Print and assemble! (or modify STLs to accommodate I/O holes)

First this customizer-enabled object was designed to be a library to be able to generate cubes with different types of attachment mechanism. The first pass was t-slot (I think that is the right term) but I hope to expand it to be more versatile. That said full files that power this as well as examples of more complex boxes to hold PCB-electronics are located on github here.


The default settings will allow you to just pick the size of the internal object and it will have 3 t-slot points on each face (you will be able to change this through the anchor count). You can use the library to customize each face as well as adjust the offsets to build your own custom case bases. The customizer version is not able to punch holes for your specific enclosures though I'm hoping to expand the library with some standard I/O holes (USB, Power, HDMI).

The main parameters you can customize with the customizer are below

// The dimensions of the size of the object you want to have inside
internal_x = 100;
internal_y = 100;
internal_z = 100;

// How thick your material is to cut, or how thick of walls you want to print
material_z = 4;

// Measure whatever screws you want to use with whatever nuts and set it accordingly
screw_outside_diameter = 3;
screw_length = 12;

nut_outside_diameter = 5.5;
nut_height = 2.5;

// Related to the anchors themselves
// Anchor Count determines how many anchoring points there will be along a face
anchor_count = 3;
// Determines how wide the teeth are that will be pushed into the opposing face
tooth_width = 3;
// Determines where the nut will rest, based on a percentage
channel_position =70; // [0:100]

//Select what part you want to export - make your own build plates
part = "assembled"; // [assembled:Assembled, bottom:Bottom, top:Top, west:West Wall, east:East Wall, north:North Wall, south:South Wall]

Part - Select what part you want to get or see an assembled preview

Edit - Update - How to use the library
Based on some comments I've received I through social media I thought I would point out the biggest benefit of this library, being able to generate a face with parametric specifications for how many holes and how many 'anchors' you want.

So this Thing is a use for the library itself, that abstracts so it works with customizer. It doesn't expose the more powerful parts of the library because the customizer doesn't handle arrays very well and I felt it would be too complex. Here is how you create a face using this library.

North, East, South, West - 1 denotes exists
anchors = [0,1,0,1];

A 1 is an anchor, a 0 is a harbor
types = [1,1,1,1];

If your face has to mate to a smaller face (because all the faces on a box cannot be equal and still grip each other) then you can specify how much to subtract. So the harbors in the ASCI below would have a negative offest.


North, East, South, West sides
offsets = [offset, offset,offset, offset];

An offcenter actually moves the entire grid of harbors or anchors on the face.

offcenters = [0,0,0,0];

generate_cube([east_x,east_y,main_z], true, anchors, types, offsets, offcenters);

More from Electronics

view more
Tip Designer Report Thing

Thing Info

5018Views 719Downloads Found in Electronics

Liked By

View All


BSD License
Parametric Box maker by savorywatt is licensed under the BSD License license.

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

All Apps

Customizer is the easiest way to take great 3D printable designs and make them your own. Make your OpenSCAD designs infinitely more valuable by empowering the community to customize them.

App Info Launch App
Customizer Thing App

Thanks a lot for sharing! This saved me a lot of time. Just received the laser cut parts and everything fits perfectly.

Had to modify the code a bit to support rectangular box shapes:

Very usefull!

thanks FMA, I hope people will find this a useful base class to build their own enclosures. Hoping to support different anchor types (dove tail, flat, push/fit) in the future.