From 9c05b265ccfcb7e6dddf68fe62d62eb90968b56c Mon Sep 17 00:00:00 2001 From: maride Date: Mon, 20 Nov 2017 16:23:52 +0100 Subject: [PATCH] Add another type of Box Generator --- ...Generator.scad => Box_Type1_Generator.scad | 0 Box_Type2_Generator.scad | 38 +++++++++++++++++++ 2 files changed, 38 insertions(+) rename Box_Generator.scad => Box_Type1_Generator.scad (100%) create mode 100644 Box_Type2_Generator.scad diff --git a/Box_Generator.scad b/Box_Type1_Generator.scad similarity index 100% rename from Box_Generator.scad rename to Box_Type1_Generator.scad diff --git a/Box_Type2_Generator.scad b/Box_Type2_Generator.scad new file mode 100644 index 0000000..5911c75 --- /dev/null +++ b/Box_Type2_Generator.scad @@ -0,0 +1,38 @@ +INNER_X=60; +INNER_Y=60; +INNER_Z=30; +WALLSIZE=4; + +NOTCH_WIDTH=5; +NOTCH_DEPTH=2; +/* + * NOTCH_DEPTH < WALLSIZE for obvious reasons. + * Set NOTCH_DEPTH to 0 to deactivate the notch at all. + * Idea behind the notch: you can secure the box lid with e.g. a rubber band + */ + +difference() { + union() { + // The main box + difference() { + cube([INNER_X+WALLSIZE*2, INNER_Y+WALLSIZE*2, INNER_Z+WALLSIZE*2]); + translate([WALLSIZE, WALLSIZE, WALLSIZE]) + cube([INNER_X, INNER_Y, INNER_Z+WALLSIZE]); + } + + // Box lid + translate([WALLSIZE, WALLSIZE, INNER_Z+WALLSIZE*4]) { + cube([INNER_X, INNER_Y, WALLSIZE]); + translate([-WALLSIZE, -WALLSIZE, WALLSIZE]) + cube([INNER_X+WALLSIZE*2, INNER_Y+WALLSIZE*2, WALLSIZE]); + } + } + + // The notch + union() { + translate([INNER_X/2-NOTCH_WIDTH/2+WALLSIZE, 0, 0]) + cube([NOTCH_WIDTH, NOTCH_DEPTH, INNER_Z+WALLSIZE*6]); + translate([INNER_X/2-NOTCH_WIDTH/2+WALLSIZE, INNER_Y+WALLSIZE+NOTCH_DEPTH, 0]) + cube([NOTCH_WIDTH, NOTCH_DEPTH, INNER_Z+WALLSIZE*6]); + } +} \ No newline at end of file