// Q6 lens dimensions
yellow_ring_d = 19.5 + 0.5;
yellow_ring_h = 3.5;
+lens_d = 17;
view_angle = 95;
hood_h = 20;
-hood_top_d = 30;
+hood_top_d = 25;
-lens_d = 15;
+lens_d = 8;
wall = 1.5;
-rectangle_h = 80;
+rectangle_h = 120;
rectangle_w2h = 1.777;
rect_d2 = rectangle_h * tan(view_angle/2);
rect_x = 2*rect_d2/sqrt(1+rectangle_w2h*rectangle_w2h);
rect_y = rectangle_w2h * rect_x;
$fn = 128;
+
+module view_field() {
+ minkowski() {
+ hull() {
+ cube(eps);
+ translate([-rect_x/2, -rect_y/2, rectangle_h])
+ cube([rect_x, rect_y, eps]);
+ }
+ cylinder(r=lens_d/2, h = eps);
+ }
+}
+
+
+hood_r = 30;
+hood_h = 60;
+
+hood_y = 80;
+hood_x = 50;
+
+difference() {
+/*
+ union() {
+ translate([hood_x/2-wall, -hood_y/2, 0])
+ cube([wall, hood_y, hood_h]);
+ for (y = [-1,1]) scale([1, y, 1])
+ translate([-hood_x/2, hood_y/2-wall, 0])
+ cube([hood_x, wall, hood_h]);
+ }
+*/
+ scale([1, 1.5, 1])
+ cylinder(r = hood_r, h = hood_h);
+ scale([1, 1.5, 1])
+ translate([0, 0, -eps])
+ cylinder(r = hood_r-wall, h = hood_h+2*eps);
+
+ view_field();
+}
+
+difference() {
+ cylinder(r = yellow_ring_d/2+wall, h = yellow_ring_h);
+ translate([0, 0, -eps])
+ cylinder(r = yellow_ring_d/2, h = yellow_ring_h+2*eps);
+}
+
+/*
difference() {
// body
hull() {
}
-
-
+*/