X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=schematic-3d-printable.scad;h=b78304afea86cb19e80013d699001acf77cd5988;hb=3258faff19694018da36cab0c9dd30fe31737410;hp=3e11090dc14e170c732f37a12c4bb8014efa9813;hpb=9c3b4d1bcf18e9a2750ef1b111f44065d5a843b0;p=challenge-bot diff --git a/schematic-3d-printable.scad b/schematic-3d-printable.scad index 3e11090..b78304a 100644 --- a/schematic-3d-printable.scad +++ b/schematic-3d-printable.scad @@ -1,4 +1,4 @@ -// challenge-bot phase-2 +// challenge-bot // GNU AGPLv3 (or later at your option) // project available at these locations: // https://gitorious.org/ozzloy/challenge-bot @@ -8,33 +8,68 @@ // https://github.com/josefprusa/Prusa3/blob/master/box_frame/x-carriage.scad // as an example of how to code in scad -deck_dimensions = [8, 8, 3/16]; - -module deck() { - cube(deck_dimensions); -} - -module wheel_mount() { - difference() { - cube([1.5, 2.1, 3/16]); - // motor shaft and collar hole - translate([0.5, 0.938, -1/16]) { - cylinder(h = 5/16, r = 0.362/2, $fn = 100); - } - // nubbin hole - translate([0.5 + 0.875 - 0.425, 0.938, -1/16]) { - cylinder(h = 5/16, r = 0.145/2, $fn = 100); - } - // mounting screw hole - translate([0.5 + 1.213 - 0.425, 0.938 - 0.687/2, -1/16]) { - cylinder(h = 5/16, r = 0.114/2, $fn = 100); - } - translate([0.5 + 1.213 - 0.425, 0.938 + 0.687/2, -1/16]) { - cylinder(h = 5/16, r = 0.114/2, $fn = 100); - } - } -} - -color("blue") deck(); -rotate([90, 0, 0]) translate([1.5, -2, -(3/16)]) wheel_mount(); -rotate([90, 0, 0]) translate([1.5, -2, -8]) wheel_mount(); +scale=10; + +deck_width = 8; +deck_length = 8; +deck_depth = 3/16; +deck_dimensions = [deck_width, deck_length, deck_depth]; + +module deck(scale){ + cube(deck_dimensions * scale, center = true);} + +module collar_hole(scale){ + cylinder(h = 5/16 * scale, r = 0.362/2 * scale);} + +module nubbin_hole(scale){ + cylinder(h = 5/16 * scale, r = 0.145/2 * scale);} + +module mounting_screw_hole(scale){ + cylinder(h = 5/16 * scale, r = 0.114/2 * scale);} + +module wheel_mount_reinforcement(scale){ + diagonal = sqrt(deck_depth * deck_depth + deck_depth * deck_depth); + difference(){ + cube([deck_depth * 2, deck_depth * 2, deck_depth * 2] * scale); + translate([-(diagonal - deck_depth) / 2, 0, 0] * scale) + rotate([45, 0, 0]) + translate([0, -(diagonal * 1.1 - deck_depth) / 2, 0]) + cube([diagonal * 2, diagonal * 2 * 1.1, deck_depth * 2] * scale);}} + +module wheel_motor_holes(scale){ + translate([0.5, 0.938, -1/16] * scale) { + collar_hole(scale);} + translate([0.5 + 0.875 - 0.425, 0.938, -1/16] * scale){ + nubbin_hole(scale);} + translate([0.5 + 1.213 - 0.425, 0.938 - 0.687/2, -1/16] * scale){ + mounting_screw_hole(scale);} + translate([0.5 + 1.213 - 0.425, 0.938 + 0.687/2, -1/16] * scale){ + mounting_screw_hole(scale);}} + +module wheel_mount(scale){ + width = 1.5; + length = 2; + depth = deck_depth; + + difference(){ + cube([width, length, depth] * scale); + wheel_motor_holes(scale);} + translate([2 * depth, 2 * depth, depth] * scale) + rotate([0, 0, 180]) + wheel_mount_reinforcement(scale); + translate([width, 2 * depth, depth] * scale) + rotate([0, 0, 180]) + wheel_mount_reinforcement(scale);} + +module robot(scale){ + translate([0, 0, (deck_depth)/2 * scale]){ + color("blue") deck(scale); + translate([1.5, 4, (deck_depth)/2] * scale) + rotate([90, 0, 0]) + wheel_mount(scale); + mirror([0, 1, 0]) + translate([1.5, 4, (deck_depth)/2] * scale) + rotate([90, 0, 0]) + wheel_mount(scale);}} + +robot(scale);