]> www.fi.muni.cz Git - things.git/blob - rc-control-horn-long.scad
switch holder.scad
[things.git] / rc-control-horn-long.scad
1 eps = 0.01;
2 infty = 100;
3
4 /* Quasar elevons */
5 /*
6 slot_off_x = 8;
7 slot_off_z = 0;
8 horn_l = 40;
9 slot_depth_front = 6;
10 slot_depth_rear = 2.5;
11 base_angle = 0;
12 top_hole_h = 18;
13 */
14
15 /* Quasar rudder */
16 slot_off_x = 8;
17 slot_off_z = -2.5;
18 horn_l = 40;
19 slot_depth_front = 8;
20 slot_depth_rear = 5;
21 base_angle = 0;
22 top_hole_h = 18;
23
24 wall = 1;
25
26 hole_d = 1.6;
27 hole_step = 3;
28 n_holes = 3;
29
30
31 hole_side = 2*wall;
32
33 module horn_body() {
34         // slot
35         hull() {
36                 translate([slot_off_x, slot_off_z, 0])
37                         cube([eps, slot_depth_front, wall]);
38                 translate([horn_l - eps, slot_off_z, 0])
39                         cube([eps, slot_depth_rear, wall]);
40         }
41         hull() {
42                 // base
43                         translate([slot_off_x,
44                                 slot_depth_front+slot_off_z-eps, 0])
45                                 cube([eps, eps, wall]);
46                         translate([horn_l - eps,
47                                 slot_depth_rear+slot_off_z-eps, 0])
48                                 cube([eps, eps, wall]);
49
50                         rotate([0, 0, -base_angle]) for (y = [1:n_holes]) {
51                                 translate([0, top_hole_h -(y-1)*hole_step, 0])
52                                         cylinder(r = hole_d/2 + hole_side,
53                                                 h = wall, $fn = 6);
54                         }
55                 }
56 }
57
58 module horn() {
59         difference() {
60                 horn_body();
61                 // holes
62                 rotate([0, 0, -base_angle]) for (y = [1:n_holes]) {
63                         translate([0, top_hole_h -(y-1)*hole_step, -eps])
64                                 cylinder(r = hole_d/2, h = wall + 2*eps, $fn = 6);
65                 }
66         }
67
68 }
69
70 horn();