]> www.fi.muni.cz Git - things.git/blob - firefly-q6-hood.scad
Firefly Q6 lens hood - first version
[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
7 view_angle = 95;
8
9 hood_h = 20;
10 hood_top_d = 30;
11
12 lens_d = 15;
13 wall = 1.5;
14 rectangle_h = 80;
15 rectangle_w2h = 1.777;
16
17 rect_d2 = rectangle_h * tan(view_angle/2);
18 rect_x = 2*rect_d2/sqrt(1+rectangle_w2h*rectangle_w2h);
19 rect_y = rectangle_w2h * rect_x;
20 $fn = 128;
21 difference() {
22         // body
23         hull() {
24                 cylinder(r = yellow_ring_d/2 + wall, h = yellow_ring_h);
25                 translate([0, 0, hood_h-eps])
26                         cylinder(r = hood_top_d/2 + wall, h = eps);
27         }
28         translate([0, 0, -eps])
29                 cylinder(r = yellow_ring_d/2, h = yellow_ring_h+2*eps);
30         // walls of the cone
31         hull() {
32                 translate([0, 0, yellow_ring_h])
33                         cylinder(r = yellow_ring_d/2, h = eps);
34                 translate([0, 0, hood_h])
35                         cylinder(r = hood_top_d/2, h = eps);
36         }
37         hull() {
38                 cylinder(r = lens_d/2, h = eps);
39                 // translate([0, 0, rectangle_h])
40                 //      cylinder(r = rect_d2 - 5, h = eps);
41                 translate([-rect_x/2, -rect_y/2, rectangle_h])
42                         cube([rect_x, rect_y, eps]);
43         }
44
45 }
46         
47
48