Commit | Line | Data |
---|---|---|
608a50b3 | 1 | // challenge-bot |
9c3b4d1b P |
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 | // using | |
8 | // https://github.com/josefprusa/Prusa3/blob/master/box_frame/x-carriage.scad | |
9 | // as an example of how to code in scad | |
10 | ||
c423550e | 11 | scale=10; |
12 | ||
a7d043a3 | 13 | deck_width = 8; |
14 | deck_length = 8; | |
15 | deck_depth = 3/16; | |
16 | deck_dimensions = [deck_width, deck_length, deck_depth]; | |
9c3b4d1b | 17 | |
c423550e | 18 | module deck(scale){ |
a8f16f3a | 19 | cube(deck_dimensions * scale, center = true);} |
c423550e | 20 | |
21 | module collar_hole(scale){ | |
b565c0f7 | 22 | cylinder(h = 5/16 * scale, r = 0.362/2 * scale);} |
c423550e | 23 | |
28d0154b | 24 | module nubbin_hole(scale){ |
b565c0f7 | 25 | cylinder(h = 5/16 * scale, r = 0.145/2 * scale);} |
c423550e | 26 | |
27 | module mounting_screw_hole(scale){ | |
b565c0f7 | 28 | cylinder(h = 5/16 * scale, r = 0.114/2 * scale);} |
c423550e | 29 | |
0316dce2 | 30 | module wheel_mount_reinforcement(scale){ |
a7d043a3 | 31 | diagonal = sqrt(deck_depth * deck_depth + deck_depth * deck_depth); |
0316dce2 | 32 | difference(){ |
a7d043a3 | 33 | cube([deck_depth * 2, deck_depth * 2, deck_depth * 2] * scale); |
34 | translate([-(diagonal - deck_depth) / 2, 0, 0] * scale) | |
0316dce2 | 35 | rotate([45, 0, 0]) |
a7d043a3 | 36 | translate([0, -(diagonal * 1.1 - deck_depth) / 2, 0]) |
37 | cube([diagonal * 2, diagonal * 2 * 1.1, deck_depth * 2] * scale);}} | |
0316dce2 | 38 | |
608a50b3 | 39 | module wheel_motor_holes(scale){ |
40 | translate([0.5, 0.938, -1/16] * scale) { | |
41 | collar_hole(scale);} | |
42 | translate([0.5 + 0.875 - 0.425, 0.938, -1/16] * scale){ | |
43 | nubbin_hole(scale);} | |
44 | translate([0.5 + 1.213 - 0.425, 0.938 - 0.687/2, -1/16] * scale){ | |
45 | mounting_screw_hole(scale);} | |
46 | translate([0.5 + 1.213 - 0.425, 0.938 + 0.687/2, -1/16] * scale){ | |
47 | mounting_screw_hole(scale);}} | |
48 | ||
c423550e | 49 | module wheel_mount(scale){ |
608a50b3 | 50 | width = 1.5; |
51 | length = 2; | |
52 | depth = deck_depth; | |
c423550e | 53 | |
608a50b3 | 54 | difference(){ |
55 | cube([width, length, depth] * scale); | |
56 | wheel_motor_holes(scale);} | |
57 | translate([2 * depth, 2 * depth, depth] * scale) | |
58 | rotate([0, 0, 180]) | |
59 | wheel_mount_reinforcement(scale); | |
60 | translate([width, 2 * depth, depth] * scale) | |
61 | rotate([0, 0, 180]) | |
62 | wheel_mount_reinforcement(scale);} | |
0316dce2 | 63 | |
608a50b3 | 64 | module robot(scale){ |
65 | translate([0, 0, (deck_depth)/2 * scale]){ | |
66 | color("blue") deck(scale); | |
67 | translate([1.5, 4, (deck_depth)/2] * scale) | |
68 | rotate([90, 0, 0]) | |
69 | wheel_mount(scale); | |
70 | mirror([0, 1, 0]) | |
71 | translate([1.5, 4, (deck_depth)/2] * scale) | |
72 | rotate([90, 0, 0]) | |
73 | wheel_mount(scale);}} | |
0316dce2 | 74 | |
608a50b3 | 75 | robot(scale); |