put sketches and 3d printables into sub-dirs
[challenge-bot] / 3d-printables / caster-standoff.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 // use 10 ish for development, 60 or so for printing
8 $fn = 60;
9
10 standoff_radius = 14.732 / 2; // 0.580 / 2 inches from spec sheet
11 standoff_height = 55; // eyeballed
12
13 nut_short_side = 4.7; // from calipers
14 nut_height = 1.6; // from calipers
15
16 // eyeballed caster flange height, (0.580/5) inches, times 2 to be stronger
17 caster_flange_height = 5;
18 caster_flange_width = 20.32; // 0.800 inches
19 caster_flange_screw_radius = 2.286 / 2; // 0.090 inches
20 caster_flange_screw_length = 8; // eyeballed
21
22 deck_grid_width = 25.4; // measured center to center on grid on pegboard
23 deck_flange_height = 2.9464;
24 deck_flange_screw_radius = 3.556 / 2; // For #6 machine screws
25 deck_flange_radius = (deck_grid_width) / 2 + deck_flange_screw_radius + 3;
26
27 module deck_flange(){
28 difference(){
29 cylinder(h = deck_flange_height, r = deck_flange_radius);
30 for(ii = [-1, 1]){
31 translate([deck_grid_width / 2 * ii, 0, -.1])
32 cylinder(h = deck_flange_height * 1.1,
33 r = deck_flange_screw_radius);
34 translate([0, deck_grid_width / 2 * ii, -.1])
35 cylinder(h = deck_flange_height * 1.1,
36 r = deck_flange_screw_radius);}}}
37
38 module deck_flange_reinforcement(){
39 translate([-deck_flange_radius,
40 -.5 * deck_flange_height / 2,
41 deck_flange_height]){
42 difference (){
43 cube([deck_flange_radius, deck_flange_height / 2, deck_flange_radius]);
44 translate([-.1, -.05 * deck_flange_height, 0]){
45 rotate([0, -45, 0]){
46 cube([deck_flange_radius * 1.5, // 1.5 is bigger than sqrt(2)
47 deck_flange_height * 1.1, // 1.1 is bigger than 1
48 deck_flange_radius]);}}}}}
49
50 module caster_flange_screws(){
51 translate([standoff_radius, 0, 0])
52 cylinder(h = caster_flange_screw_length,
53 r = caster_flange_screw_radius);
54 translate([-standoff_radius, 0, 0])
55 cylinder(h = caster_flange_screw_length,
56 r = caster_flange_screw_radius);}
57
58 module caster_flange(){
59 side_radius = caster_flange_width / 2 - standoff_radius;
60 hull(){
61 cylinder(h = caster_flange_height, r = standoff_radius);
62 translate([standoff_radius, 0, 0])
63 cylinder(h = caster_flange_height, r = side_radius);
64 translate([-standoff_radius, 0, 0])
65 cylinder(h = caster_flange_height, r = side_radius);}}
66
67 module nut(size, height){
68 width = size/1.75;
69 for (r = [-60, 0, 60]) rotate([0,0,r]) cube([width, size, height], true);}
70
71 module nuts(){
72 translate([standoff_radius, 0, nut_height/2])
73 nut(nut_short_side, nut_height + .1);
74 translate([-standoff_radius, 0, nut_height/2])
75 nut(nut_short_side, nut_height + .1);}
76
77 module _2_screw (){
78 //measured with calipers
79 screw_length = 8;
80 thread_radius = 2.17 / 2 - 0.1; // subtract 0.1 to make squeeze fit
81 head_height = 1.8;
82 head_radius = 4.1 / 2;
83 cylinder(r = thread_radius, h = screw_length);
84 cylinder(r = head_radius, h = head_height);}
85
86 module caster_standoff_deck_side(){
87 difference(){
88 cylinder(h = standoff_height - caster_flange_height,
89 r = standoff_radius);
90 translate([0, 0, standoff_height - caster_flange_screw_length * 1.1 + 0.1])
91 scale([1, 1, 1.1])
92 caster_flange_screws();
93 translate([0, 0, standoff_height - (caster_flange_height + nut_height)])
94 nuts();
95 translate([0, 0, standoff_height]){
96 // make hole to get to screw head depth
97 cylinder(r = 4.1 / 2, h = 3, center = true);
98 translate([0, 0, -0.7])
99 rotate([180, 0, 0])
100 _2_screw(r = 0.5, h = 5);}}
101 deck_flange();
102 for(ii = [0:3]){
103 rotate([0, 0, 45 + 90 * ii])
104 deck_flange_reinforcement();}}
105
106 module caster_standoff_caster_side(){
107 difference(){
108 caster_flange();
109 translate([0, 0, caster_flange_height - 0.7]){
110 rotate([180, 0, 0]){
111 _2_screw();}}
112 // make hole to get to screw head
113 translate([0, 0, caster_flange_height - 0.8]){
114 cylinder(r = 4.1 / 2, h = 10);}
115 translate([0, 0, -.1]){
116 caster_flange_screws();}}}
117
118 caster_standoff_deck_side();
119 translate([caster_flange_width / 2 + deck_flange_radius + 1, 0, 0]){
120 caster_standoff_caster_side();}