]> www.fi.muni.cz Git - things.git/blob - rc-plane-wheel.scad
zaves-clip
[things.git] / rc-plane-wheel.scad
1 infty = 100;
2 eps = 0.01;
3
4 /*
5 // FT Mini Scout - 5 cm, light
6 wheel_d = 50;
7 wheel_h = 3;
8 wheel_thick_outer = 0.5;
9 wheel_thick_inner = 1.5;
10 wheel_rim = 4.5;
11
12 min_wall = 0.5;
13
14 spokes = 5;
15 spoke_w =  3.5;
16 spoke_h = 2;
17 spoke_xoff = 10;
18 spoke_r = 11.5;
19 spoke_center_h = 5;
20
21 center_d = 12;
22 center_d2 = 6;
23 center_hole = 1.2 + 1.3;
24 center_h = 8;
25 */
26
27 // Sky Surfer 1400 - 6.5 cm, heavier
28 wheel_d = 65;
29 wheel_h = 5;
30 wheel_thick_outer = 1.0;
31 wheel_thick_inner = 2.0;
32 wheel_rim = 6;
33
34 min_wall = 1;
35
36 spokes = 5;
37 spoke_w =  5;
38 spoke_h = 3.5;
39 spoke_xoff = 12;
40 spoke_r = 15.3;
41 spoke_center_h = 8;
42
43 center_d = 16;
44 center_d2 = 9;
45 center_hole = 2.5 + 1.0;
46 center_h = 12;
47
48 wheel_d1 = wheel_d + wheel_h/2; // center of the rim
49
50 module spoke() {
51         intersection() {
52                 translate([-spoke_r, spoke_xoff, 0])
53                 rotate_extrude($fn = 128) {
54                         translate([spoke_r, 0, 0])
55                         polygon(points = [
56                                 [-spoke_w/2, 0], [spoke_w/2, 0],
57                                 [spoke_w/2, min_wall], [min_wall/2, spoke_h],
58                                 [-min_wall/2, spoke_h],
59                                 [-spoke_w/2, min_wall]]
60                         );
61                 }
62                 cylinder(r = wheel_d/2, h = infty);
63                 translate([-infty/2, spoke_xoff, 0]) cube(infty);
64         }
65         hull() {
66                 // front bottom
67                 translate([-spoke_w/2, spoke_xoff, 0])
68                         cube([spoke_w, eps, min_wall]);
69                 // front top
70                 translate([-min_wall/2, spoke_xoff, 0])
71                         cube([min_wall, eps, spoke_h]);
72                 // center bottom
73                 translate([-spoke_w, 0, 0])
74                         cube([2*spoke_w, eps, min_wall]);
75                 // center top
76                 translate([-min_wall/2, 0, spoke_center_h])
77                         cube([min_wall, eps, eps]);
78         }
79                         
80 }
81
82 module body() {
83         // rim
84         difference() {
85                 hull() {
86                         cylinder(r = wheel_d/2, h = wheel_h, $fn = 128);
87                         translate([0, 0, wheel_h/2-eps])
88                                 cylinder(r = wheel_d1/2, h = 2*eps, $fn = 128);
89                 }
90                 translate([0,0,min_wall-eps])
91                         cylinder(r1 = wheel_d/2 - wheel_thick_inner,
92                                 r2 = wheel_d/2 - wheel_thick_outer,
93                                 h = wheel_h - min_wall+ 2*eps);
94                 translate([0,0,-eps])
95                         cylinder(r = wheel_d/2 - wheel_rim,
96                                 h = min_wall+2*eps);
97         }
98
99         // spokes
100         for (a = [0:360/spokes:360-eps]) {
101                 rotate([0, 0, a])
102                 spoke();
103         }
104
105         // center cylinders
106         cylinder(r1 = center_d/2, r2 = center_d2/2, h = center_h/2+eps, $fn = 4*spokes);
107         translate([0, 0, center_h/2])
108                 cylinder(r1 = center_d2/2, r2 = center_hole/2 + 2*min_wall, h = center_h/2, $fn = 4*spokes);
109 }
110
111 module wheel() {
112         difference() {
113                 body();
114                 // center hole
115                 translate([0, 0, -eps])
116                         cylinder(r = center_hole/2, h = center_h + 2*eps);
117         }
118 }
119
120 stopper_d = 6;
121 stopper_h = 3;
122 stopper_hole = 1.2 + 0.5;
123
124 module stopper() {
125         difference() {
126                 cylinder(r1 = stopper_d/2, r2 = stopper_hole/2 + 2*min_wall, h = stopper_h);
127                 translate([0, 0, -eps])
128                         cylinder(r = stopper_hole/2, h = stopper_h + 2*eps);
129         }
130 }
131
132 for (y = [-1, 1]) scale([1, y, 1]) translate([0, wheel_d/2 + 3, 0]) {
133         wheel();
134
135 /*
136         translate([wheel_d/2 + stopper_d, 0, 0])
137                 stopper();
138 */
139 }