]> www.fi.muni.cz Git - things.git/commitdiff
shaver holder
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 7 Apr 2014 19:54:16 +0000 (21:54 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 7 Apr 2014 19:54:16 +0000 (21:54 +0200)
shaver-holder.scad [new file with mode: 0644]

diff --git a/shaver-holder.scad b/shaver-holder.scad
new file mode 100644 (file)
index 0000000..2a9db00
--- /dev/null
@@ -0,0 +1,56 @@
+epsilon = 0.01;
+infty = 100;
+
+diam = 25;
+wall = 1.5;
+height = 18;
+angle=75;
+dist = -4;
+
+module pin() {
+       translate([0, dist, 0])
+       rotate([-10, 0, 0]) rotate([0, 0, angle/2]) {
+               difference() {
+                       cylinder(r=diam/2, h=height);
+                       translate([0, 0, -epsilon]) cylinder(r=diam/2-wall, h=height+2*epsilon);
+                       translate([-infty, -infty/2, -infty/2]) cube(infty);
+                       rotate([0, 0, 180-angle])
+                               translate([-infty, -infty/2, -infty/2]) cube(infty);
+               };
+               translate([0, diam/2-wall, 0]) cylinder(r=wall, h=height);
+       };
+}
+
+
+module pins() {
+       difference() {
+               union() {
+                       pin();
+                       scale([1, -1, 1]) pin();
+               };
+               translate([-infty/2, -infty/2, -infty]) cube(infty);
+       };
+};
+
+module rear() {
+       difference() {
+               hull() intersection() {
+                       pins();
+                       translate([4, -infty/2, -infty/2])
+                               cube([3*wall, infty, infty]);
+               };
+               translate([0, 0, height/2]) rotate([0, 90, 0])
+                       cylinder(r=2, h = infty, $fn=6);
+               translate([0, 0, height/2]) rotate([0, 90, 0])
+                       cylinder(r=4.5, h = 5.5);
+       };
+};
+
+module main() {
+       pins();
+       rear();
+};
+
+main($fn=128);
+
+// color("red") translate([-1, 0, 0]) cylinder(r=4.25, h=1);