]> www.fi.muni.cz Git - things.git/blob - firefly-q6-hood.scad
small control horn for rc plane
[things.git] / firefly-q6-hood.scad
1 eps = 0.01;
2
3 // Q6 lens dimensions
4 yellow_ring_d = 19.5 + 0.5;
5 yellow_ring_h = 3.5;
6 lens_d = 17;
7
8 view_angle = 95;
9
10 hood_h = 20;
11 hood_top_d = 25;
12
13 lens_d = 8;
14 wall = 1.5;
15 rectangle_h = 120;
16 rectangle_w2h = 1.777;
17
18 rect_d2 = rectangle_h * tan(view_angle/2);
19 rect_x = 2*rect_d2/sqrt(1+rectangle_w2h*rectangle_w2h);
20 rect_y = rectangle_w2h * rect_x;
21 $fn = 128;
22
23 module view_field() {
24         minkowski() {
25         hull() {
26                 cube(eps);
27                 translate([-rect_x/2, -rect_y/2, rectangle_h])
28                         cube([rect_x, rect_y, eps]);
29         }
30         cylinder(r=lens_d/2, h = eps);
31         }
32 }
33
34
35 hood_r = 30;
36 hood_h = 60;
37
38 hood_y = 80;
39 hood_x = 50;
40
41 difference() {
42 /*
43         union() {
44                 translate([hood_x/2-wall, -hood_y/2, 0])
45                         cube([wall, hood_y, hood_h]);
46                 for (y = [-1,1]) scale([1, y, 1])
47                         translate([-hood_x/2, hood_y/2-wall, 0])
48                         cube([hood_x, wall, hood_h]);
49         }
50 */
51         scale([1, 1.5, 1])
52         cylinder(r = hood_r, h = hood_h);
53         scale([1, 1.5, 1])
54         translate([0, 0, -eps])
55                 cylinder(r = hood_r-wall, h = hood_h+2*eps);
56
57         view_field();
58 }
59
60 difference() {
61         cylinder(r = yellow_ring_d/2+wall, h = yellow_ring_h);
62         translate([0, 0, -eps])
63                 cylinder(r = yellow_ring_d/2, h = yellow_ring_h+2*eps);
64 }
65                 
66 /*
67 difference() {
68         // body
69         hull() {
70                 cylinder(r = yellow_ring_d/2 + wall, h = yellow_ring_h);
71                 translate([0, 0, hood_h-eps])
72                         cylinder(r = hood_top_d/2 + wall, h = eps);
73         }
74         translate([0, 0, -eps])
75                 cylinder(r = yellow_ring_d/2, h = yellow_ring_h+2*eps);
76         // walls of the cone
77         hull() {
78                 translate([0, 0, yellow_ring_h])
79                         cylinder(r = yellow_ring_d/2, h = eps);
80                 translate([0, 0, hood_h])
81                         cylinder(r = hood_top_d/2, h = eps);
82         }
83         hull() {
84                 cylinder(r = lens_d/2, h = eps);
85                 // translate([0, 0, rectangle_h])
86                 //      cylinder(r = rect_d2 - 5, h = eps);
87                 translate([-rect_x/2, -rect_y/2, rectangle_h])
88                         cube([rect_x, rect_y, eps]);
89         }
90
91 }
92         
93 */