Skip to content

Instantly share code, notes, and snippets.

@woodworker
Last active January 29, 2019 20:33
Show Gist options
  • Save woodworker/13697630c284c6f84815b8b85dcacbd9 to your computer and use it in GitHub Desktop.
Save woodworker/13697630c284c6f84815b8b85dcacbd9 to your computer and use it in GitHub Desktop.
drawerCountV = 6;
drawerCountH = 4;
// x1, x10, x100, x1K, x10K, x100K, x1M = 7 values
drawerSubsections = 7;
drawerCountTotal = drawerCountV * drawerCountH;
// ikea kallax standard
boxSides = 330;
boxDepth = 370;
E_24 = [100,110,120,130,150,160,180,200,220,240,270,300,330,360,390,430,470,510,560,620,680,750,820,910];
// default balsa wood thickness
materialThickness = 3;
fingerGroove = 20;
drawerHeight = (boxSides-(2*materialThickness))/(drawerCountV);
drawerWidth = (boxSides-(materialThickness))/(drawerCountH);
subsectionWidth = (boxDepth-(2*materialThickness))/drawerSubsections;
module ridge(height, width, materialThickness) {
ridgeThickness = 1;//ceil(materialThickness/3);
// front left
translate([
ridgeThickness,
-ridgeThickness,
ridgeThickness
])
cube([
ridgeThickness,
ridgeThickness + 1,
(height-ridgeThickness)
]);
// front right
translate([
(width - (ridgeThickness*2)),
-ridgeThickness,
ridgeThickness
])
cube([
ridgeThickness,
ridgeThickness + 1,
(height-ridgeThickness)
]);
// front bottom
translate([
ridgeThickness,
-ridgeThickness,
ridgeThickness
])
cube([
(width - (ridgeThickness*2)),
ridgeThickness + 1,
ridgeThickness
]);
}
module part(height, width, depth, materialThickness) {
innerDrawerWidth = width-(materialThickness*2);
innerDrawerHeight = height-(materialThickness*2);
union() {
difference() {
cube([
width, // width
depth, // depth
height // height
]);
translate([
materialThickness,
materialThickness,
materialThickness,
])
cube([
innerDrawerWidth, // width
depth, // depth
innerDrawerHeight + materialThickness + 1 // height
]);
translate([
0,
depth,
0
])
ridge(height, width, materialThickness);
}
ridge(height, width, materialThickness);
}
}
drawerHeight = 20;
drawerWidth = 40;
subsectionWidth = 40;
part(drawerHeight,drawerWidth,subsectionWidth,materialThickness);
/**/
translate([
0,
subsectionWidth + 4,
0
])
part(drawerHeight,drawerWidth,subsectionWidth,materialThickness);
/**/
/**/
translate([
0,
(subsectionWidth*2) + (4 * 2),
0
])
part(drawerHeight,drawerWidth,materialThickness,materialThickness);
/**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment