]> www.fi.muni.cz Git - things.git/commitdiff
wide PET bottle opener
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 8 Feb 2021 15:47:02 +0000 (16:47 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 8 Feb 2021 15:47:02 +0000 (16:47 +0100)
pet-bottle-opener.scad [new file with mode: 0644]

diff --git a/pet-bottle-opener.scad b/pet-bottle-opener.scad
new file mode 100644 (file)
index 0000000..8bcfaf0
--- /dev/null
@@ -0,0 +1,62 @@
+eps = 0.01;
+infty = 200;
+
+// lid_diam = 40; // w/o the protrusions
+body_diam = 7;
+body_l = 110;
+body_h1 = 7;
+body_h2 = 12;
+wall = 4;
+
+w_to_h = 0.2;
+
+$fn = 128;
+
+module cyl_with_round_top(r, h, w_to_h) {
+       cylinder(r = r, h = h);
+       translate([0, 0, h]) scale([1, 1, w_to_h])
+               sphere(r = r);
+}
+
+module cyl4(r1, h1, d1, r2, h2, d2, w_to_h) {
+       hull() {
+               for (y = [-1, 1]) scale([1, y, 1])
+                       translate([0, d1, 0])
+                               cyl_with_round_top(r=r1, h=h1, w_to_h = w_to_h);
+               for (y = [-1, 1]) scale([1, y, 1])
+                       translate([0, d2, 0])
+                               cyl_with_round_top(r=r2, h=h2, w_to_h = w_to_h);
+       }
+}
+
+params = [
+       [7, body_h1, body_l/2],
+       [11, body_h1 + 1*(body_h2-body_h1)/5, body_l/3],
+       [14, body_h1 + 2*(body_h2-body_h1)/5, body_l/4],
+       [19, body_h1 + 3*(body_h2-body_h1)/5, body_l/7],
+       [22, body_h1 + 4*(body_h2-body_h1)/5, body_l/12],
+       [26, body_h2, 0],
+];
+
+module body() {
+       for (i = [0:len(params)-2]) {
+               cyl4(params[i][0], params[i][1], params[i][2],
+                       params[i+1][0], params[i+1][1], params[i+1][2],
+                       w_to_h);
+       }
+}
+
+difference() {
+       body();
+       difference() {
+               translate([0, 0, -eps])
+                       cylinder(r1 = 43/2, r2 = 41/2, h = body_h2 + 44*w_to_h);
+               for (angle = [0:360/30:360]) rotate([0, 0, angle]) hull() {
+                       translate([-43/2, 0, -2*eps])
+                               cylinder(r=1.5, h=eps, $fn = 3);
+                       translate([-41/2, 0, body_h2+46*w_to_h+2*eps])
+                               cylinder(r=1.5, h=eps, $fn = 3);
+               }
+       }
+}
+