]> www.fi.muni.cz Git - things.git/blob - shaver-holder.scad
firefly q6 case: side hooks
[things.git] / shaver-holder.scad
1 epsilon = 0.01;
2 infty = 100;
3
4 diam = 25;
5 wall = 1.5;
6 height = 18;
7 angle=75;
8 dist = -4;
9
10 module pin() {
11         translate([0, dist, 0])
12         rotate([-10, 0, 0]) rotate([0, 0, angle/2]) {
13                 difference() {
14                         cylinder(r=diam/2, h=height);
15                         translate([0, 0, -epsilon]) cylinder(r=diam/2-wall, h=height+2*epsilon);
16                         translate([-infty, -infty/2, -infty/2]) cube(infty);
17                         rotate([0, 0, 180-angle])
18                                 translate([-infty, -infty/2, -infty/2]) cube(infty);
19                 };
20                 translate([0, diam/2-wall, 0]) cylinder(r=wall, h=height);
21         };
22 }
23
24
25 module pins() {
26         difference() {
27                 union() {
28                         pin();
29                         scale([1, -1, 1]) pin();
30                 };
31                 translate([-infty/2, -infty/2, -infty]) cube(infty);
32         };
33 };
34
35 module rear() {
36         difference() {
37                 hull() intersection() {
38                         pins();
39                         translate([4, -infty/2, -infty/2])
40                                 cube([3*wall, infty, infty]);
41                 };
42                 translate([0, 0, height/2]) rotate([0, 90, 0])
43                         cylinder(r=2, h = infty, $fn=6);
44                 translate([0, 0, height/2]) rotate([0, 90, 0])
45                         cylinder(r=4.5, h = 5.5);
46         };
47 };
48
49 module main() {
50         pins();
51         rear();
52 };
53
54 main($fn=128);
55
56 // color("red") translate([-1, 0, 0]) cylinder(r=4.25, h=1);