make note about separating openscad
[challenge-bot] / 3d-printables / caster-standoff.scad
index c4a1130f34e1957332db08f843202211e829245e..328bc8b7f47987ce09043a2590fa1218fb377adf 100644 (file)
@@ -4,41 +4,12 @@
 // https://gitorious.org/ozzloy/challenge-bot
 // https://github.com/waynegramlich/challenge-bot
 
+include <caster-standoff-dimensions.scad>
 use <oshw.scad>
 
 // use 10 ish for development, 60 or so for printing
 $fn = 60;
 
-/* measured with calipers */
-ball_diameter = 12.7 + 0.80; // extra bit added for printing imprecision
-ball_radius = ball_diameter / 2;
-
-standoff_height = 60; // kyle eyeballed
-
-gap = 4;
-wall_thickness = 2;
-holder_floor = 3;
-holder_arms_length = 20;
-holder_height =
-  holder_floor + holder_arms_length + (11 / 16) * ball_diameter;
-
-holder_radius = ball_radius + wall_thickness;
-holder_diameter = holder_radius * 2;
-
-standoff_radius = holder_radius; // 0.580 / 2 inches from spec sheet
-standoff_lower_portion_height = standoff_height - holder_height;
-
-// eyeballed caster flange height, (0.580/5) inches, times 2 to be stronger
-caster_flange_height = 5;
-caster_flange_width = 20.32;  // 0.800 inches
-caster_flange_screw_radius = 2.286 / 2;  // 0.090 inches
-caster_flange_screw_length = 8; // eyeballed
-
-deck_pitch = 25.4; // measured center to center on grid on pegboard
-deck_flange_height = 2.9464;
-deck_flange_screw_radius = 3.556 / 2;  // For #6 machine screws
-deck_flange_radius = (deck_pitch) / 2 + deck_flange_screw_radius + 3;
-
 module deck_flange(){
   deck_pitch_diagonal = sqrt(2 * pow(deck_pitch, 2));
   difference(){
@@ -67,11 +38,23 @@ module deck_flange_reinforcement(){
 
 module ball_holder(){
   difference (){
-    cylinder(r = holder_radius, h = holder_height);
+    union(){
+      cylinder(r = holder_radius, h = holder_height);
+      translate([0, 0, holder_arms_length]){
+        cylinder(r1 = holder_radius,
+                 r2 = holder_radius + wall_thickness,
+                 h = wall_thickness);
+        translate([0, 0, wall_thickness]){
+          cylinder(r = wall_thickness + holder_radius,
+                   h = holder_height
+                       - holder_arms_length
+                       - wall_thickness); }}}
     translate([0, 0, ball_radius + holder_floor + holder_arms_length]){
       sphere(r = ball_radius);}
     translate([0, 0, holder_floor + (holder_height - holder_floor) / 2 + 0.5]){
-      cube([holder_diameter + 0.1, gap, holder_height - holder_floor + 0.1],
+      cube([holder_diameter + wall_thickness * 2 + 0.1,
+            gap,
+            holder_height - holder_floor + 0.1],
            center = true);}}}
 
 module caster_standoff(){