use global variables for everything
[challenge-bot] / caster-standoff.scad
CommitLineData
858028a5 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
6bb05589 7standoff_height = 55; // eyeballed
8nut_short_side = 4.7; // from calipers
9nut_height = 1.6; // from calipers
10standoff_radius = 14.732 / 2; // 0.580 / 2 inches from spec sheet
11screw_radius = 2.286/2; // 0.090 inches
12caster_flange_screw_length = 8; // eyeballed
13// eyeballed caster flange height, (0.580/5) inches, times 2 to be stronger
14caster_flange_height = 2.9464 * 2;
15caster_flange_width = 20.32; // 0.800 inches
16ziptie_width = 4.7625; // 3/16 inch
17ziptie_height = 3; // i'm guessing
18
19module caster_flange_screws(){
20 translate([standoff_radius, 0, 0])
21 cylinder(h = caster_flange_screw_length, r = screw_radius, $fn = 20);
22 translate([-standoff_radius, 0, 0])
23 cylinder(h = caster_flange_screw_length, r = screw_radius, $fn = 20);}
858028a5 24
f2a874c1 25module caster_flange(){
6bb05589 26 side_radius = caster_flange_width / 2 - standoff_radius;
54d7ed6b 27 hull(){
6bb05589 28 cylinder(h = caster_flange_height, r = standoff_radius);
29 translate([standoff_radius, 0, 0])
30 cylinder(h = caster_flange_height, r = side_radius);
31 translate([-standoff_radius, 0, 0])
32 cylinder(h = caster_flange_height, r = side_radius);}}
54d7ed6b 33
6bb05589 34module nut(size, height){
35 width = size/1.75;
36 for (r = [-60, 0, 60]) rotate([0,0,r]) cube([width, size, height], true);}
f2a874c1 37
54d7ed6b 38module nuts(){
6bb05589 39 translate([standoff_radius, 0, nut_height/2])
40 nut(nut_short_side, nut_height);
41 translate([-standoff_radius, 0, nut_height/2])
42 nut(nut_short_side, nut_height);}
54d7ed6b 43
44module ziptie(){
6bb05589 45 translate([-standoff_radius, -ziptie_width/2, 0])
46 cube([standoff_radius * 2, ziptie_width, ziptie_height]);}
858028a5 47
48module caster_standoff(){
858028a5 49 difference(){
50 union(){
6bb05589 51 cylinder(h = standoff_height, r = standoff_radius);
f2a874c1 52 caster_flange();}
6bb05589 53 translate([0, 0, -.1]) scale([1, 1, 1.1])
54 caster_flange_screws();
55 translate([0, 0, caster_flange_height])
56 nuts();
57 translate([0, 0, standoff_height * 3 / 4]) scale([1.1, 1, 1])
58 ziptie();
59 rotate([0, 0, 90]) translate([0, 0, standoff_height * 1 / 2])
60 scale([1.1, 1, 1])
61 ziptie();}}
858028a5 62
63caster_standoff();