Add another type of Box Generator
This commit is contained in:
parent
c643cb5968
commit
9c05b265cc
38
Box_Type2_Generator.scad
Normal file
38
Box_Type2_Generator.scad
Normal file
@ -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]);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user