]> www.fi.muni.cz Git - things.git/blob - kaze-fuselage-holder.scad
switch holder.scad
[things.git] / kaze-fuselage-holder.scad
1 eps = 0.01;
2 infty = 200;
3
4 tube_d = 8.0 + 0.5;
5 tube_slot = 6.5;
6 wall = 1.2;
7
8 side_w = 7;
9 corner_d = 10;
10
11 thin_wall = 0.6;
12 supp_xoff = 0.85 * side_w;
13
14 module body(fuse_w, fuse_h, body_h) {
15         // base_plate
16         translate([-fuse_w/2, -fuse_h/2, 0])
17                 cube([fuse_w, fuse_h, thin_wall]);
18
19         // fuse tube
20         translate([0, fuse_h/2-tube_d/2-wall, 0])
21                 cylinder(r = tube_d/2+wall, h = body_h);
22
23         // side walls
24         for (x = [-1, 1]) scale([x, 1, 1])
25         translate([fuse_w/2-thin_wall, -fuse_h/2, 0])
26                 cube([thin_wall, fuse_h, body_h]);
27         for (y = [-1, 1]) scale([1, y, 1])
28         translate([-fuse_w/2, fuse_h/2-thin_wall, 0])
29                 cube([fuse_w, thin_wall, body_h]);
30
31         // side wall supports
32         supp_zoff = body_h-thin_wall;
33         for (x = [-1, 1]) scale([x, 1, 1])
34         hull() {
35                 translate([fuse_w/2-supp_xoff, -fuse_h/2, 0])
36                         cube([thin_wall, fuse_h, thin_wall]);
37                 translate([fuse_w/2-thin_wall, -fuse_h/2, supp_zoff])
38                         cube([thin_wall, fuse_h, thin_wall]);
39         }
40         for (y = [-1, 1]) scale([1, y, 1])
41         hull() {
42                 translate([-fuse_w/2, fuse_h/2-supp_xoff, 0])
43                         cube([fuse_w, thin_wall, thin_wall]);
44                 translate([-fuse_w/2, fuse_h/2-thin_wall, supp_zoff])
45                         cube([fuse_w, thin_wall, thin_wall]);
46         }
47 }
48
49 module main(fuse_w, fuse_h, body_h) {
50         difference() {
51                 body(fuse_w, fuse_h, body_h);
52                 // hole in base plate
53                 hull() {
54                         for (x = [-1, 1])
55                         for (y = [-1, 1])
56                         scale([x, y, 1])
57                         translate([-fuse_w/2+side_w+corner_d/2,
58                                 -fuse_h/2+side_w+corner_d/2, -eps])
59                                 cylinder(r = corner_d/2, h = thin_wall + 2*eps);
60                 }
61                 // fuse tube
62                 translate([0, fuse_h/2-tube_d/2-wall, -eps])
63                         cylinder(r = tube_d/2, h = body_h + 2*eps);
64                 // fuse tube slot
65                 translate([-tube_slot/2, 0, -eps])
66                         cube([tube_slot, fuse_h/2-tube_d/2-wall, body_h +2*eps]);
67         }
68 }
69
70 main(42, 37, 12);
71
72 translate([45, 0, 0]) main(30, 25, 8);