]> www.fi.muni.cz Git - things.git/blob - rc-control-horn-big.scad
bddfa97decfddee1c7f5af996bec7d2d707a7921
[things.git] / rc-control-horn-big.scad
1 eps = 0.01;
2 infty = 100;
3
4 foam_w = 3;
5
6 horn_w = 1;
7 horn_vert_h = 3 + foam_w;
8 horn_h = 10 + foam_w;
9
10 slot_off = 3.5; // from the hinge line
11
12 slot_l = 10;
13
14 hole_d = 2;
15 hole_d2 = 5;
16
17 // base
18 baseplate_l = 20;
19 baseplate_w = 35;
20 baseplate_h = 0.6;
21
22 difference() {
23         translate([slot_l/2 + slot_off, 0, 0])
24                 scale([1, baseplate_w/baseplate_l, 1])
25                 cylinder(r = baseplate_l/2, h = baseplate_h);
26         translate([slot_off - infty, -infty/2, -infty/2]) cube(infty);
27 }
28
29 support_l = 1*baseplate_w;
30 support_w = 0.8;
31 support_h = foam_w; // including the baseplate
32 supports_d = 10;
33
34 module support() {
35         hull() {
36                 translate([0, -support_l/2, baseplate_h-eps])
37                         cube([support_w, support_l, eps]);
38                 translate([0, -support_w/2, support_h - eps])
39                         cube([support_w, horn_w, eps]);
40         }
41 }
42
43 /*
44 translate([slot_off, 0, 0])
45         support();
46
47 translate([slot_off + slot_l - support_w, 0, 0])
48         support();
49 */
50
51 translate([slot_off + slot_l/2 - support_w, 0, 0])
52         support();
53
54 // bottom part of the horn
55 hull() {
56         translate([slot_off, -horn_w/2, 0])
57                 cube([slot_l/2 + baseplate_l/2, horn_w, baseplate_h]);
58         translate([slot_off, -horn_w/2, horn_vert_h])
59                 cube([slot_l, horn_w, eps]);
60 }
61
62 difference() {
63         hull() {
64                 translate([slot_off, -horn_w/2, horn_vert_h])
65                         cube([slot_l, horn_w, eps]);
66                 translate([0, -horn_w/2, horn_h])
67                         rotate([-90, 0, 0])
68                                 cylinder(r = hole_d2/2, h = horn_w, $fn = 6);
69         }
70         translate([0, -horn_w/2, horn_h])
71                 rotate([-90, 0, 0])
72                         translate([0, 0, -eps])
73                                 cylinder(r = hole_d/2, h = horn_w + 2*eps, $fn = 6);
74 }
75
76
77
78
79
80
81
82 /*
83 module horn() {
84         difference() {
85         hull() {
86                 // base
87                 translate([slot_off, 0, 0])
88                         cube([base_l, wall, wall]);
89
90                         for (y = [1:n_holes]) {
91                                 translate([0, hole_h -(y-1)*hole_step, 0])
92                                         cylinder(r = hole_d/2 + hole_side,
93                                                 h = wall, $fn = 6);
94                         }
95                 }
96
97                 for (y = [1:n_holes]) {
98                         translate([0, hole_h -(y-1)*hole_step, -eps])
99                                 cylinder(r = hole_d/2, h = wall + 2*eps, $fn = 6);
100                 }
101         }
102
103
104         // side support
105         translate([slot_off, 0, 0])
106                 cube([base_l, wall, side_w]);
107
108         // slot
109         hull() {
110                 translate([slot_off + (base_l - slot_l)/2, -slot_depth/2, 0])
111                         cube([slot_l, slot_depth/2, wall]);
112                 translate([slot_off + (base_l - slot_l)/2 + wall, -slot_depth, 0])
113                         cube([slot_l - 2*wall, slot_depth/2+eps, wall]);
114         }
115 }
116
117 for (x = [-1, 1]) scale([x, 1, 1])
118         translate([hole_side + hole_d/2 + 2*wall, 0, 0]) horn();
119
120 */