misc_openscad/Sink Organizer/sink_organizer.scad

160 lines
4.5 KiB
OpenSCAD
Raw Permalink Normal View History

2023-08-15 00:57:45 +00:00
// Sink Organizer
// units: mm g s
$fn=128;
// Variables
// Base Variables
overall_width=(4.75*25.4);
overall_length=(9.5*25.4);
outer_radius=25.4;
base_thickness=3;
lip_height=8;
lip_width=3;
// Ribs
rib_thickness=5;
rib_width=3;
rib_gap_width=5;
rib_inset=3;
// Soap Variables
soap_width=77;
soap_depth=3;
// Brush Dish Variables
brush_width=86;
brush_depth=3;
// Drain Variables
drain_width=10;
// Sponge Variables
sponge_width=36;
sponge_support_width=3;
sponge_support_height=35;
sponge_support_offset=24;
module perimeter() {
hull()
for ( i = [
[0,0],
[0,overall_width-outer_radius*2],
[overall_length-outer_radius*2,overall_width-outer_radius*2],
[overall_length-outer_radius*2,0]
]) {
translate(i)
circle(r=outer_radius);
}
}
difference() {
translate([outer_radius,outer_radius,0])
union() {
// Base
linear_extrude(height=base_thickness)
perimeter();
// Lip
translate([0,0,base_thickness])
difference() {
linear_extrude(height=lip_height)
perimeter();
linear_extrude(height=lip_height+.01) {
offset(delta=-lip_width)
perimeter();
}
}
// Rib structure
// There are a lot of magic numbers here in the rib spacing, angles, and offsets
translate([0,0,base_thickness])
intersection() {
difference() {
// ribs
union() {
translate([125,-150,0])
rotate([0,0,45])
linear_extrude(height=rib_thickness) {
for (i = [0:20:275]) {
translate([i,0])
square([rib_width,300]);
}
}
}
// cuts
union() {
translate([-85,60,-0.1])
rotate([0,0,-45])
linear_extrude(height=rib_thickness+0.2) {
for (i = [0:25:275]) {
translate([i,0])
square([rib_gap_width,300]);
}
}
}
}
linear_extrude(rib_thickness)
offset(r=-(lip_width+rib_inset))
perimeter();
}
}
// Soap Cutout
translate([50,(overall_width)/2,base_thickness+rib_thickness-soap_depth])
cylinder(d=soap_width,h=soap_depth+.01);
// Brush Cutout
translate([overall_length-50,overall_width/2,base_thickness+rib_thickness-brush_depth])
cylinder(d=brush_width, h=brush_depth+.01);
// Drain
// NOTE Adjust this length to look good with whatever rib arrangement was selected.
translate([overall_length/2-drain_width/2,0,base_thickness])
cube([drain_width,13,10]);
}
// Sponge holder
translate([overall_length/2,sponge_support_offset/2,base_thickness])
for (i = [
[sponge_width/2,0,0],
[-sponge_width/2,0,0]
]) {
translate(i)
translate([-sponge_support_width/2,0,0])
rotate([90,0,90])
linear_extrude(height=sponge_support_width)
hull() {
square([overall_width-sponge_support_offset, sponge_support_height-outer_radius]);
translate([outer_radius,sponge_support_height-outer_radius])
difference() {
circle(r=outer_radius);
translate([0,-outer_radius])
square([outer_radius,outer_radius*2]);
translate([-outer_radius,-outer_radius])
square([outer_radius,outer_radius]);
}
translate([overall_width-sponge_support_offset-outer_radius,sponge_support_height-outer_radius])
rotate(-90)
difference() {
circle(r=outer_radius);
translate([0,-outer_radius])
square([outer_radius,outer_radius*2]);
translate([-outer_radius,-outer_radius])
square([outer_radius,outer_radius]);
}
}
}