]> www.fi.muni.cz Git - things.git/commitdiff
terarium glass clip
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sun, 12 Apr 2015 20:09:02 +0000 (22:09 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sun, 12 Apr 2015 20:09:02 +0000 (22:09 +0200)
terarium-glass-clip.scad [new file with mode: 0644]

diff --git a/terarium-glass-clip.scad b/terarium-glass-clip.scad
new file mode 100644 (file)
index 0000000..8e852ca
--- /dev/null
@@ -0,0 +1,48 @@
+eps = 0.01;
+infty = 100;
+
+// TODO: subtract 2*spring_w - something from these:
+v_thick = 4 + 0.3; // thickness of the vertical glass
+h_thick = 2 + 0.3; // thickness of the horizontal glass
+
+o_wall = 2.5;
+i_wall = 1.5;
+body = 14;
+
+spring_r = 4;
+spring_w = 0.7;
+spring_off = 2.5;
+
+module spring() {
+       intersection() {
+               translate([-eps, -infty/2, -infty/2])
+                       cube(infty);
+               
+               translate([-spring_r + spring_w, 0, 0])
+                       cylinder(r = spring_r, h = body, $fn = 24);
+       }
+}
+
+module body() {
+       difference() {
+               cube([2*o_wall+i_wall+v_thick+h_thick, body, body]);
+               // vertical glass
+               translate([o_wall, body-o_wall-infty, -infty/2])
+                       cube([v_thick, infty, infty]);
+               // horizontal glass
+               translate([o_wall+v_thick+i_wall, -infty/2, body-o_wall-infty])
+                       cube([h_thick, infty, infty]);
+       }
+       translate([o_wall, spring_off, 0])
+               rotate([0,0,0]) spring();
+       translate([o_wall+v_thick, spring_off, 0])
+               rotate([0,0,180]) spring();
+       translate([o_wall+v_thick+i_wall, 0, spring_off])
+               rotate([-90,0,0]) spring();
+       translate([o_wall+v_thick+i_wall+h_thick, 0, spring_off])
+               rotate([-90,180,0]) spring();
+}
+
+translate([0, 0, body]) scale([-1,1,1]) rotate([180, 0, 0])
+       body();
+