From: Jan "Yenya" Kasprzak Date: Sun, 12 Apr 2015 20:09:02 +0000 (+0200) Subject: terarium glass clip X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=8d3253d891c5f980cec5dc49efaf26b697e9d429;p=things.git terarium glass clip --- diff --git a/terarium-glass-clip.scad b/terarium-glass-clip.scad new file mode 100644 index 0000000..8e852ca --- /dev/null +++ b/terarium-glass-clip.scad @@ -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(); +