]> www.fi.muni.cz Git - things.git/blob - rc-landing-gear.scad
firewall for ITA plank wing
[things.git] / rc-landing-gear.scad
1 eps = 0.01;
2 infty = 300;
3
4 /*
5 sirka trupu u nabezne hrany 80mm
6 max sirka trupu 90 mm
7 sirka trupu 50mm pred nabeznou hranou 84mm
8 rozchod klidne 150mm
9 vyska osy se spodni hranou trupu az cca 30mm pod trupem
10 kolma cast asi vpredu
11 */
12
13 base_h = 95;
14 base_w = 83;
15 base_top = 5; // above the xz plane
16 base_wall = 0.6;
17 base_l = 45;
18
19
20 axle_cube = 7;
21 axle_hole = 3.5;
22
23 strut_wall = 1.2;
24 base_top_l = axle_cube;
25
26 bottom_strut_l = base_l-5;
27
28 wheel_h = 60;
29 wheel_base = 110;
30
31 module base() {
32         difference() {
33                 $fn = 128;
34                 scale([base_w/base_h, 1, 1])
35                         cylinder(r = base_h/2, h = base_l);
36                 // cut the top half
37                 translate([-infty/2, base_top, -infty/2]) cube(infty);
38         
39                 // cut the rear angle
40                 translate([0, base_top, base_top_l])
41                 rotate([-atan((base_l - base_top_l)/(base_h/2 + base_top)), 0, 0])
42                 translate([-infty/2, -infty/2, 0]) cube(infty);
43         }
44 }
45
46 module wheel_cube()
47 {
48         translate([wheel_base/2-axle_cube, 
49                 -wheel_h-axle_cube/2, 0])
50                 cube(axle_cube);
51 }
52
53 module top_strut() {
54         hull() {
55                 // top
56                 translate([base_w/2 - strut_wall/2, 0, 0])
57                         cylinder(r = strut_wall/2, h = base_top_l, $fn = 16);
58                 // bottom
59                 translate([wheel_base/2-strut_wall/2,
60                         -wheel_h+axle_cube/2, 0])
61                         cylinder(r = strut_wall/2, h = axle_cube, $fn = 16);
62         }
63 }
64
65 module bottom_strut() {
66         hull() {
67                 // center
68                 rotate([0, 0, 30])
69                 translate([0, -base_w/2 + base_wall/2, 0])
70                         cylinder(r = strut_wall/2, h = bottom_strut_l, $fn = 16);
71                 // side
72                 // translate([wheel_base/2-axle_cube+strut_wall/2,
73                 //      -wheel_h+axle_cube/2-strut_wall/2 , 0])
74                 translate([wheel_base/2-strut_wall/2,
75                         -wheel_h-axle_cube/2+strut_wall/2 , 0])
76                         cylinder(r = strut_wall/2, h = axle_cube, $fn = 16);
77         }
78 }
79
80 module horiz_strut() {
81         translate([-wheel_base/2, -wheel_h-axle_cube/2, 0])
82                 cube([wheel_base, strut_wall, axle_cube]);
83 }
84
85 module body() {
86         base();
87
88         for (x = [-1, 1]) scale([x, 1, 1]) {
89                 wheel_cube();
90                 top_strut();
91                 bottom_strut();
92         }
93
94         horiz_strut();
95 }
96
97 difference() {
98         body();
99
100         // hole in the base, no matter what gets in
101         translate([0, 0, -eps])
102                 scale([(base_w - base_wall)/(base_h - base_wall), 1, 1])
103                 cylinder(r = base_h/2 - base_wall, h = base_l + 2*eps, $fn=128);
104
105         // hole for the wheel axle
106         translate([-infty/2, -wheel_h, axle_cube/2])
107                 rotate([0, 90, 0])
108                 rotate([0, 0, 90])
109                 cylinder(r = axle_hole/2, h = infty);
110 }
111