]> www.fi.muni.cz Git - things.git/blob - 808-lens-holder.scad
ft scout landing gear - wider, baseplate added
[things.git] / 808-lens-holder.scad
1 infty = 100;
2 eps = 0.01;
3
4 lens_size = 9;
5 lens_depth = 2;
6 wall = 1.5;
7
8 difference() {
9         translate([-lens_size/2-wall, 0, 0])
10                 cube([lens_size+2*wall, 2*wall+lens_depth, wall+lens_size]);
11         // lens body
12         translate([-lens_size/2, wall, wall])
13                 cube([lens_size, lens_depth, lens_size + eps]);
14         // lens front
15         translate([-lens_size/2+wall, wall, -eps])
16                 cube([lens_size-2*wall, lens_depth+wall+eps, lens_size + wall + 2*eps]);
17 }
18
19 base_d = 5;
20 rear_l = 20;
21
22 // rear base
23 translate([-base_d/2, -rear_l, 0])
24         cube([base_d, base_d, wall]);
25
26 // rear stem
27 hull() {
28         translate([-wall/2, -rear_l+base_d/2, 0])
29                 cube([wall, base_d/2, wall]);
30         translate([-wall/2, 0, 0])
31                 cube([wall, eps, 3*wall]);
32 }
33
34 side_l = 20;
35 for (i=[-1, 1]) scale([i, 1, 1]) {
36         // side squares
37         translate([side_l-base_d, -base_d, 0])
38                 cube([base_d, base_d, wall]);
39
40         // side stem
41         hull() {
42                 translate([side_l-base_d/2, -base_d/2, 0])
43                         cylinder(r = wall, h = wall, $fn = 32);
44                 translate([lens_size/2+wall-eps, 0, 0])
45                         cube([eps, wall, 3*wall]);
46         }
47
48         // side to rear beam
49         hull() {
50                 translate([side_l-base_d/2, -base_d/2, 0])
51                         cylinder(r = wall/2, h = wall, $fn = 32);
52                 translate([0, -rear_l+base_d/2, 0])
53                         cylinder(r = wall, h = wall, $fn = 32);
54         }
55 }