2023-08-26 17:35:09 -07:00
parent 63a32834b0
commit bcdbe0efbc
4 changed files with 239 additions and 189 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*~
*.stl

View File

@@ -20,3 +20,19 @@ compatible with the things listed above) in a variety of configurations and
near the top of the source code and you can produce whatever size you want.
You could probably even make replacement drawers for an off-the-shelf parts
cabinet, so long as you feed it the right dimensions.
Notes:
======
Print with vase mode (or spiral mode) enabled, with 2 bottom layers, no top
layer, 0.2 mm layer height, and 0.35 mm first-layer height. With Cura 3.x
at least, this should work. If your slicer has trouble, try increasing the
gap to 0.1 mm.
For newer versions of PrusaSlicer (and possibly others), if the internal
partitions don't show up, set slice gap closing radius (under advanced print
settings) to zero.
If your printer doesn't have a 0.4-mm nozzle, you'll probably want to set
nozzle_width to whatever you're using.

View File

@@ -6,7 +6,7 @@ do
openscad -o frame-medium-${x}x${y}.stl -D x_count=${x} -D y_count=${y} drawers_and_frame.scad
done
done
openscad -o drawer-medium.stl -D make_frame=0 drawers_and_frame.scad
openscad -o drawer-medium.stl -D make_frame=0 -D y_divisions=1 -D enable_tag_holder=1 drawers_and_frame.scad
openscad -o frame-small-10x10.stl -D x_count=10 -D y_count=10 -D width=18 -D height=12 drawers_and_frame.scad
openscad -o drawer-small.stl -D make_frame=0 -D width=18 -D height=12 drawers_and_frame.scad
openscad -o drawer-small.stl -D make_frame=0 -D width=18 -D height=12 -D y_divisions=1 drawers_and_frame.scad

406
drawers_and_frame.scad Executable file → Normal file
View File

@@ -1,187 +1,219 @@
// Parametric Vase-Mode Parts Cabinet
// Scott Alfter
// 3 Oct 18
//
// CC-BY
make_frame=1; // 0=make drawer, 1=make frame
// drawer parameters
width=40; // width
height=20; // height
depth=80; // depth
enable_tag_holder=1; // set to 0 to disable (auto-disabled for width<18mm or height<12mm)
// frame parameters
x_count=4; // number of columns of drawers
y_count=4; // number of rows of drawers
// printer and slicer parameters
gap=0.05; // width of cuts to make (adjust if needed to slice correctly)
nozzle_width=0.4; // nozzle width
base_thickness=0.55; // thickness of first two layers
// nothing configurable below here
total_width=x_count*(width+2)+(x_count-1)*gap; // frame width
total_height=y_count*(height+2)+(y_count-1)*gap; // frame height
module drawer()
{
$fn=30;
difference()
{
// main body
translate([2,2,0])
minkowski()
{
cylinder(r=2, h=height/2);
cube([width-4,depth-4,height/2]);
}
// chamfer underneath
translate([width,0,0])
rotate([90,-90,-90])
linear_extrude(width, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
translate([0,depth,0])
rotate([180,-90,0])
linear_extrude(width, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
rotate([90,-90,180])
linear_extrude(depth, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
translate([width,depth,0])
rotate([90,-90,0])
linear_extrude(depth, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
}
// handle
translate([width/2-3,0.05,4.5])
rotate([-90,0,-90])
linear_extrude(6, convexity=10)
polygon([[0,0],[0,4],[4,0]]);
// tag holder
if (width>=18 && height>=12 && enable_tag_holder==1)
{
translate([3,.05,0])
drawer_tag_holder();
translate([width-3,.05,0])
mirror([1,0,0])
drawer_tag_holder();
}
}
module drawer_tag_holder()
{
translate([2*nozzle_width+2,0,4.5])
difference()
{
rotate([90,0,-90])
linear_extrude(2*nozzle_width+2, convexity=10)
polygon([[0,0],[0,height-4.5],[4*nozzle_width,height-4.5],[4*nozzle_width,4*nozzle_width]]);
translate([0,0,4*nozzle_width])
rotate([90,0,-90])
linear_extrude(2, convexity=10)
polygon([[0,0],[0,height-4.5-4*nozzle_width],[2*nozzle_width,height-4.5-4*nozzle_width],[2*nozzle_width,0]]);
}
}
module frame_base()
{
difference()
{
// main body
cube([total_width,total_height,depth]);
// chamfer
translate([total_width,0,0])
rotate([90,-90,-90])
linear_extrude(total_width, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
translate([0,total_height,0])
rotate([180,-90,0])
linear_extrude(total_width, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
rotate([90,-90,180])
linear_extrude(total_height, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
translate([total_width,total_height,0])
rotate([90,-90,0])
linear_extrude(total_height, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
}
}
module frame(c,d)
{
difference()
{
frame_base();
if (d==1)
{
if (c>1)
for (i=[1:c-1])
translate([i*total_width/x_count-gap/2,0,base_thickness])
cube([gap,total_height-2*nozzle_width,depth]);
}
else if (c==1)
{
if (d>1)
for (i=[1:d-1])
translate([0,i*total_height/y_count-gap/2,base_thickness])
cube([total_width-2*nozzle_width,gap,depth]);
}
else
{
if (d>1)
translate([0,total_height/y_count-gap/2,base_thickness])
cube([total_width-2*nozzle_width,gap,depth]);
if (c>1)
for (i=[1:c-1])
translate([i*total_width/x_count-gap/2,2*nozzle_width,base_thickness])
cube([gap,total_height-4*nozzle_width,depth]);
if (c>1 && d>1)
for (i=[0:c-2])
for (j=[1:d-1])
translate([i*total_width/x_count+2*nozzle_width,j*total_height/y_count-gap/2,base_thickness])
cube([total_width/x_count-2*nozzle_width,gap,depth]);
if (c>1 && d>1)
for (i=[1:d-1])
translate([(c-1)*total_width/x_count,i*total_height/y_count-gap/2,base_thickness])
cube([total_width/x_count-2*nozzle_width,gap,depth]);
}
}
}
if (make_frame==1)
frame(x_count,y_count);
else
drawer();
// Parametric Vase-Mode Parts Cabinet
// Scott Alfter
// 3 Oct 18
// https://www.printables.com/model/189349-parametric-vase-mode-component-drawers
//
// Add: Divisions/Compartments
// Add: Extra wall to block drawer hole
// Jose Ferreira - 13 March 21
// https://www.printables.com/model/225855-parametric-vase-mode-drawers-with-dividers
//
// CC-BY
make_frame=0; // 0=make drawer, 1=make frame
// drawer parameters
width=40; // width
height=20; // height
depth=80; // depth
y_divisions=3; // vertical divisions
enable_extra_wall=1; // set to 1 to enable
// If you are using a transparent filament, you can use the pocket created by the extra wall to put your tag
enable_tag_holder=0; // set to 0 to disable (auto-disabled for width<18mm or height<12mm),
// frame parameters
x_count=4; // number of columns of drawers
y_count=4; // number of rows of drawers
// printer and slicer parameters
gap=0.05; // width of cuts to make (adjust if needed to slice correctly)
nozzle_width=0.4; // nozzle width
base_thickness=0.55; // thickness of first two layers
// nothing configurable below here
y_spacing=depth/y_divisions; // spacing between divisions
total_width=x_count*(width+2)+(x_count-1)*gap; // frame width
total_height=y_count*(height+2)+(y_count-1)*gap; // frame height
module drawer()
{
$fn=30;
difference()
{
difference()
{
// main body
translate([2,2,0])
minkowski()
{
cylinder(r=2, h=height/2);
cube([width-4,depth-4,height/2]);
}
// chamfer underneath
translate([width,0,0])
rotate([90,-90,-90])
linear_extrude(width, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
translate([0,depth,0])
rotate([180,-90,0])
linear_extrude(width, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
rotate([90,-90,180])
linear_extrude(depth, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
translate([width,depth,0])
rotate([90,-90,0])
linear_extrude(depth, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
}
// Extra wall
if(enable_extra_wall)
{
translate([0,4*nozzle_width, base_thickness])
cube([width-2*nozzle_width,gap,height]);
}
// Y Divisions
for(i= [1:y_divisions])
{
translate([0,y_spacing*i,base_thickness])
cube([width-2*nozzle_width,gap,height]);
}
}
// handle
translate([width/2-3,0.05,4.5])
rotate([-90,0,-90])
linear_extrude(6, convexity=10)
polygon([[0,0],[0,4],[4,0]]);
// tag holder
if (width>=18 && height>=12 && enable_tag_holder==1)
{
translate([3,.05,0])
drawer_tag_holder();
translate([width-3,.05,0])
mirror([1,0,0])
drawer_tag_holder();
}
}
module drawer_tag_holder()
{
translate([2*nozzle_width+2,0,4.5])
difference()
{
rotate([90,0,-90])
linear_extrude(2*nozzle_width+2, convexity=10)
polygon([[0,0],[0,height-4.5],[4*nozzle_width,height-4.5],[4*nozzle_width,4*nozzle_width]]);
translate([0,0,4*nozzle_width])
rotate([90,0,-90])
linear_extrude(2, convexity=10)
polygon([[0,0],[0,height-4.5-4*nozzle_width],[2*nozzle_width,height-4.5-4*nozzle_width],[2*nozzle_width,0]]);
}
}
module frame_base()
{
difference()
{
// main body
cube([total_width,total_height,depth]);
// chamfer
translate([total_width,0,0])
rotate([90,-90,-90])
linear_extrude(total_width, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
translate([0,total_height,0])
rotate([180,-90,0])
linear_extrude(total_width, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
rotate([90,-90,180])
linear_extrude(total_height, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
translate([total_width,total_height,0])
rotate([90,-90,0])
linear_extrude(total_height, convexity=10)
polygon([[0,0],[0,.5],[.5,0]]);
}
}
module frame(c,d)
{
difference()
{
frame_base();
if (d==1)
{
if (c>1)
for (i=[1:c-1])
translate([i*total_width/x_count-gap/2,0,base_thickness])
cube([gap,total_height-2*nozzle_width,depth]);
}
else if (c==1)
{
if (d>1)
for (i=[1:d-1])
translate([0,i*total_height/y_count-gap/2,base_thickness])
cube([total_width-2*nozzle_width,gap,depth]);
}
else
{
if (d>1)
translate([0,total_height/y_count-gap/2,base_thickness])
cube([total_width-2*nozzle_width,gap,depth]);
if (c>1)
for (i=[1:c-1])
translate([i*total_width/x_count-gap/2,2*nozzle_width,base_thickness])
cube([gap,total_height-4*nozzle_width,depth]);
if (c>1 && d>1)
for (i=[0:c-2])
for (j=[1:d-1])
translate([i*total_width/x_count+2*nozzle_width,j*total_height/y_count-gap/2,base_thickness])
cube([total_width/x_count-2*nozzle_width,gap,depth]);
if (c>1 && d>1)
for (i=[1:d-1])
translate([(c-1)*total_width/x_count,i*total_height/y_count-gap/2,base_thickness])
cube([total_width/x_count-2*nozzle_width,gap,depth]);
}
}
}
if (make_frame==1)
frame(x_count,y_count);
else
drawer();