]> www.fi.muni.cz Git - things.git/commitdiff
Clip for Smartube for AZUB headrest
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 4 Mar 2014 08:37:27 +0000 (09:37 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 4 Mar 2014 08:37:27 +0000 (09:37 +0100)
smartube-clip.scad [new file with mode: 0644]

diff --git a/smartube-clip.scad b/smartube-clip.scad
new file mode 100644 (file)
index 0000000..05de940
--- /dev/null
@@ -0,0 +1,35 @@
+infty = 300;
+eps = 0.01;
+
+wall = 1.5;
+t1_diam  = 10;
+t2_diam  = 12;
+cyl_h = 30;
+
+module cyl_clip(d, angle) {
+       difference() {
+               cylinder(r = d/2 + wall, h = cyl_h);
+               translate([0, 0, -eps]) cylinder(r = d/2, h = cyl_h + 2*eps);
+               intersection() {
+                       rotate([0, 0, 180 - angle/2])
+                               translate([-infty/2, 0, -infty/2]) cube(infty);
+                       rotate([0, 0, angle/2])
+                               translate([-infty/2, 0, -infty/2]) cube(infty);
+               }
+       }
+};
+
+intersection() {
+       union() {
+               rotate([30, 0, 0])
+               translate([-t1_diam/2-wall/2, 0, -cyl_h/2])
+                       color("blue")cyl_clip(t1_diam, 260);
+               rotate([30, 0, 180])
+               translate([-t2_diam/2-wall/2, 0, -cyl_h/2])
+                       color("red") cyl_clip(t2_diam, 240);
+       };
+
+       translate([-infty/2, -infty/2, -7.5]) cube(infty);
+       translate([-infty/2, -infty/2, 7.5-infty]) cube(infty);
+};
+