940228a82050b61680289bc8848668dd4276a317
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
7 // use $fn = 20 while developing, 100 when about to print
8 // 20 will make previews fast
9 // 100 will make printing smooth
18 wheel_radius
= sqrt(2 * pow(qr_size
/ 2, 2)) + wall_width
/ 2;
20 motor_shaft_radius
= 3.7;
21 motor_shaft_flat_width
= 4.8;
25 module
mounting_screw_flat() {
28 module
motor_shaft_flat(radius
, flat_width
) {
31 square([flat_width
, radius
* 2], center
= true); } }
33 module
motor_shaft(radius
,
36 linear_extrude(height
= shaft_length
) {
37 motor_shaft_flat(radius
, flat_width
); } }
39 module
rim(radius
, wall_width
, wheel_width
) {
40 linear_extrude(height
= wheel_width
) {
43 circle(radius
- wall_width
); } } }
45 module
motor_shaft_holder_flat(radius
, flat_width
, wall_width
) {
47 motor_shaft_flat(radius
+ wall_width
,
48 flat_width
+ wall_width
);
49 motor_shaft_flat(radius
, flat_width
); } }
51 module
motor_shaft_holder(radius
, flat_width
, wall_width
, height
) {
52 linear_extrude(height
= height
) {
53 motor_shaft_holder_flat(radius
, flat_width
, wall_width
); } }
55 module
tread(wheel_radius
, tread_radius
) {
56 rotate_extrude(convexity
= 10) {
57 translate([wheel_radius
, 0]) {
58 circle(tread_radius
); } } }
60 module
wheel_black(radius
,
68 rim(radius
, wall_width
, width
);
69 translate([0, 0, width
/ 2]) {
70 tread(radius
, tread_radius
); } }
71 linear_extrude(height
= qr_height
) {
74 mounting_screw_flat(); } }
75 translate([0, 0, qr_height
]) {
76 motor_shaft_holder(shaft_radius
,
79 width
- qr_height
); } } }
81 module
wheel_white() {
83 linear_extrude(height
= qr_height
) {
86 mounting_screw_flat(); } } } }
102 module
wheel_solid(radius
,
109 rim(radius
, wall_width
* 2, width
);
110 translate([0, 0, width
/ 2]) {
111 tread(radius
, tread_radius
); } }
112 linear_extrude(height
= qr_height
) {
114 square(qr_size
, center
= true);
115 mounting_screw_flat(); } }
116 translate([0, 0, qr_height
]) {
117 motor_shaft_holder(shaft_radius
,
120 width
- qr_height
); } }