]> www.fi.muni.cz Git - things.git/blob - rc-landing-gear.scad
Mini arrow fuselage components
[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_d = 83;
14 base_w = base_d;
15 base_wall = 0.8;
16 base_l = 35;
17
18 axle_cube = 7;
19 axle_hole = 3;
20
21 leg_wall = 1;
22 top_l = axle_cube;
23
24 wheel_h = axle_cube/2+base_d/2 - leg_wall; // under the base_d/2
25 wheel_base = 110;
26
27
28
29         // bottom arc
30         difference() {
31                 $fn = 128;
32                 cylinder(r = base_d/2, h = base_l);
33                 translate([0, 0, -eps])
34                         cylinder(r = base_d/2 - base_wall, h = base_l + 2*eps);
35                 // cut the top half
36                 translate([-infty/2, 0, -infty/2]) cube(infty);
37                 // angled cut to top_l
38                 for (i = [-1, 1]) scale([i, 1, 1])
39                         translate([0, 0, base_l])
40                 // rotate([atan((base_d/2-base_wall)/(base_l - top_l)), 0, 0])
41                         rotate([0, 57, 0])
42                                 translate([-infty, -infty/2, -infty/2]) cube(infty);
43         }
44
45         // wheel cubes
46         difference() {
47                 for (x = [-1, 1]) scale([x, 1, 1])
48                         translate([wheel_base/2-axle_cube, 
49                                 -wheel_h-axle_cube/2, 0])
50                                 cube(axle_cube);
51                 translate([-infty/2, -wheel_h, axle_cube/2])
52                         rotate([0, 90, 0])
53                         cylinder(r = axle_hole/2, h = infty);
54         }
55
56         // bottom struts
57         for (x = [-1, 1]) scale([x, 1, 1]) hull() {
58                 // center
59                 rotate([0, 0, 30])
60                 translate([0, -base_d/2 + base_wall/2, 0])
61                         cylinder(r = leg_wall/2, h = (base_l-axle_cube)*(90-30)/90, $fn = 16);
62                 // side
63                 translate([wheel_base/2-axle_cube+leg_wall/2,
64                         -wheel_h+axle_cube/2-leg_wall/2 , 0])
65                         cylinder(r = leg_wall/2, h = axle_cube, $fn = 16);
66         }
67
68         // top struts
69         for (x = [-1, 1]) scale([x, 1, 1]) hull() {
70                 // top
71                 translate([base_d/2 - base_wall/2, -leg_wall/2, 0])
72                         cylinder(r = leg_wall/2, h = top_l+1, $fn = 16);
73                 // bottom
74                 translate([wheel_base/2-leg_wall/2,
75                         -wheel_h+axle_cube/2-leg_wall/2 , 0])
76                         cylinder(r = leg_wall/2, h = axle_cube, $fn = 16);
77         }
78
79
80 /*
81 module body() {
82         // bottom arc
83         difference() {
84                 cylinder(r = base_d/2, h = base_l);
85                 translate([0, 0, -eps])
86                         cylinder(r = base_d/2 - base_wall, h = base_l + 2*eps);
87                 translate([-infty/2, 0, -infty/2]) cube(infty);
88         }
89
90         // side top arcs
91         for (x = [-1, 1]) scale([x, 1, 1])
92         translate([base_d/2+side_d/2-base_wall, 0, 0])
93         difference() {
94                 cylinder(r = side_d/2, h = base_l);
95                 translate([0, 0, -eps])
96                         cylinder(r = side_d/2 - base_wall, h = base_l + 2*eps);
97                 translate([-infty/2, -infty, -infty/2]) cube(infty);
98         }
99
100         // side beams
101         for (x = [-1, 1]) scale([x, 1, 1])
102         translate([base_d/2 + side_d-2*base_wall, -base_d/2-wheel_h, 0])
103                 cube([base_wall, base_d/2+wheel_h, base_l]);
104
105         // bottom springs
106         for (x = [-1, 1]) scale([x, 1, 1])
107         hull() {
108                 translate([0, -base_d/2, 0]) cube([base_wall, base_wall, base_l]);
109                 translate([base_d/2+side_d-2*base_wall, -base_d/2-wheel_h, 0]) cube([base_wall, base_wall, base_l]);
110         }
111         // wheel cubes
112         for (x = [-1, 1]) scale([x, 1, 1])
113                 translate([base_d/2+side_d-2*base_wall, -base_d/2-wheel_h-axle_cube/2, 0])
114                         cube(axle_cube);
115 }
116
117 difference() {
118         body();
119         for (x = [-1, 1]) scale([x, 1, 1])
120         translate([base_d/2+wheel_h, -base_d/2-wheel_h, axle_cube])
121         translate([-infty/2, -base_d/2-wheel_h, axle_cube/2])
122         % rotate([0, 90, 0])
123                 cylinder(r = axle_hole/2, h = infty);
124
125 }
126
127 */