a3bb53aac8d6b9923d3f5a96bbebd73324679043
[challenge-bot] / wheel.scad
1 // challenge-bot
2 // GNU AGPLv3 (or later at your option)
3 // project available at these locations:
4 // https://gitorious.org/ozzloy/challenge-bot
5 // https://github.com/waynegramlich/challenge-bot
6
7 wheel_depth = 6;
8 wheel_radius = 68/2;
9
10 module encoder_shaft(){
11 motor_shaft_big = 3.7;
12 motor_shaft_small = 4.8;
13 motor_shaft_length = wheel_depth / 2;
14
15 intersection(){
16 cylinder(h = motor_shaft_length,
17 r = motor_shaft_big,
18 center = true,
19 $fn=30);
20 cube([motor_shaft_big * 2.1, motor_shaft_small, motor_shaft_length],
21 center = true);}}
22
23 module mounting_screw(){
24 cylinder(h = wheel_depth * 1.1, r = 1, $fn = 30, center = true);}
25
26 module wheel(){
27 translate([0, 0, wheel_depth / 2]){
28 difference(){
29 cylinder(h = wheel_depth, r = wheel_radius, center = true, $fn = 30);
30 translate([0, 0, wheel_depth / 4]){
31 scale([1, 1, 2]){
32 encoder_shaft();}}
33 mounting_screw();
34 for(i = [1 : 5]){
35 rotate(i * 360/5, [0, 0, 1]){
36 translate([0, 0, -0.6 * wheel_depth])
37 between_spokes();}}
38 translate([0, 0, wheel_depth / 4]){
39 difference(){
40 cylinder(h = wheel_depth / 1.2,
41 r = 0.85 * wheel_radius,
42 center = true);
43 cylinder(h = wheel_depth / 1.2,
44 r = 0.23 * wheel_radius,
45 center = true);}}}}}
46
47 module wheel_block(){
48 cube([wheel_radius, wheel_radius, wheel_depth]);}
49
50 module pie_slice(){
51 intersection(){
52 translate([0, 0, wheel_depth / 2]){
53 cylinder(h = wheel_depth,
54 r = 0.85 * wheel_radius,
55 center = true);}
56 translate([0, wheel_radius * 0.3, 0]){
57 rotate([0, 0, (360 / 5) / 2]){
58 intersection(){
59 wheel_block();
60 rotate([0, 0, 90 - 360 / 5])
61 wheel_block();}}}}}
62
63 module between_spokes(){
64 minkowski(){
65 pie_slice();
66 cylinder(h = wheel_depth / 2, r = 1, $fn = 30);}}
67
68 wheel();