]> www.fi.muni.cz Git - things.git/commitdiff
sponge holder
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Thu, 6 May 2021 06:42:31 +0000 (08:42 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Thu, 6 May 2021 06:42:31 +0000 (08:42 +0200)
sponge-holder.scad [new file with mode: 0644]

diff --git a/sponge-holder.scad b/sponge-holder.scad
new file mode 100644 (file)
index 0000000..f54ea65
--- /dev/null
@@ -0,0 +1,90 @@
+eps = 0.01;
+infty = 200;
+
+v_tube_d = 28.2 - 0.5;
+h_tube_d = 45;
+x_off = 35;
+
+sponge_l = 45; // original size is 85 + 5;
+sponge_w = 58 + 8;
+sponge_h = 30 + 3;
+
+wall = 1.5;
+
+clip_h = 15;
+
+module clip() {
+       difference() {
+               cylinder(r = v_tube_d/2 + 2*wall, h = clip_h, $fn = 128);
+               translate([0, 0, -eps])
+               cylinder(r = v_tube_d/2 + wall, h = clip_h+2*eps);
+               translate([-infty-v_tube_d/5, -infty/2, -eps])
+                       cube(infty);
+       }
+       for (angle = [-1.5*72:72:1.5*72]) rotate([0, 0, angle])
+       translate([v_tube_d/2 + wall, 0, 0])
+               cylinder(r = wall, h = clip_h);
+}
+
+module perf_wall(w, h, d, hx, hy, dx, dy, side) {
+       difference() {
+               translate([-w/2, -h/2, -d/2])
+                       cube([w, h, d]);
+               for (y = [0:1:1 + h/(hy+dy)])
+               for (y1 = [-1,1]) scale([1, y1, 1])
+               for (x1 = [-1,1]) scale([x1, 1, 1]) {
+                       for (x = [0:1:1 + w/(hx+dx)]) {
+                               translate([x*(hx+dx), y*(hy+dy), -d/2-eps])
+                                       scale([1, hy/hx, 1])
+                                       cylinder(r = hx/2, h = d + 2*eps, $fn = 4);
+                       }
+                       for (x = [0.5:1:1 + w/(hx+dx)]) {
+                               translate([x*(hx+dx), (y+0.5)*(hy+dy), -d/2-eps])
+                                       scale([1, hy/hx, 1])
+                                       cylinder(r = hx/2, h = d + 2*eps, $fn = 4);
+                       }
+               }
+       }
+       for (x = [-1, 1]) scale ([x, 1, 1])
+       translate([w/2-side, -h/2, -d/2])
+               cube([side, h, d]);
+       for (y = [-1, 1]) scale ([1, y, 1])
+       translate([-w/2, h/2-side, -d/2])
+               cube([w, side, d]);
+}
+
+module box() {
+       for (x = [0, sponge_h + wall]) translate([x + wall/2, 0, (sponge_l+wall)/2])
+       rotate([0, 90, 0])
+       perf_wall(h = sponge_w + 2*wall, w = sponge_l + wall, d = wall,
+               hx = 20, hy = 10, dx = 2, dy = 3, side=2);
+
+       for (y = [-1, 1]) scale ([1, y, 1])
+       translate([sponge_h/2+wall, sponge_w/2+wall/2, (sponge_l+wall)/2])
+       rotate([90, 0, 0])
+       perf_wall(w = sponge_h + 2*wall, h = sponge_l + wall, d = wall,
+               hy = 20, hx = 10, dx = 3, dy = 2, side=2);
+
+       for (y = [-sponge_w/4, 0, sponge_w/4])
+       translate ([0, y, sponge_l])
+               cube([sponge_h + 2*wall, wall, wall]);
+}
+
+module side_handlers() {
+       for (y = [-1, 1]) scale ([1, y, 1])
+       hull() {
+               translate([0, sponge_w/2, 0])
+                       cube([wall, wall, clip_h]);
+               translate([-v_tube_d/2-x_off, v_tube_d/2+wall, 0])
+                       cube([wall, wall, clip_h]);
+       }
+
+}
+
+translate([-v_tube_d/2-x_off, 0, 0])
+       clip();
+
+side_handlers();
+
+box();
+