smooth out the cylinders
[challenge-bot] / caster-standoff.scad
index 973aa00b32980c2b88811c48df19b54333551d7c..47fb8102db382ac02ba53039d80532fc1b8918fd 100644 (file)
@@ -11,19 +11,19 @@ nut_short_side = 4.7; // from calipers
 nut_height = 1.6; // from calipers
 
 // eyeballed caster flange height, (0.580/5) inches, times 2 to be stronger
-caster_flange_height = 2.9464 * 2;
+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_grid_width = 17.4; // guessing
-deck_flange_height = 2.9464 * 2;
+deck_grid_width = 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_grid_width * 1.5;
+deck_flange_radius = deck_grid_width * 1.22;
 
 module deck_flange(){
   difference(){
-    cylinder(h = deck_flange_height, r = deck_flange_radius);
+    cylinder(h = deck_flange_height, r = deck_flange_radius, $fn = 50);
     for(ii = [-1, 1]){
       translate([deck_grid_width * ii, 0, -.1])
         cylinder(h = deck_flange_height * 1.1,
@@ -37,10 +37,10 @@ module deck_flange(){
 
 module deck_flange_reinforcement(){
   translate([-deck_flange_radius,
-             -.5 * deck_flange_height,
+             -.5 * deck_flange_height / 2,
              deck_flange_height]){
     difference (){
-      cube([deck_flange_radius, deck_flange_height, deck_flange_radius]);
+      cube([deck_flange_radius, deck_flange_height / 2, deck_flange_radius]);
       translate([-.1, -.05 * deck_flange_height, 0]){
         rotate([0, -45, 0]){
           cube([deck_flange_radius * 1.5, // 1.5 is bigger than sqrt(2)
@@ -60,11 +60,11 @@ module caster_flange_screws(){
 module caster_flange(){
   side_radius = caster_flange_width / 2 - standoff_radius;
   hull(){
-    cylinder(h = caster_flange_height, r = standoff_radius);
+    cylinder(h = caster_flange_height, r = standoff_radius, $fn = 100);
     translate([standoff_radius, 0, 0])
-      cylinder(h = caster_flange_height, r = side_radius);
+      cylinder(h = caster_flange_height, r = side_radius, $fn = 40);
     translate([-standoff_radius, 0, 0])
-      cylinder(h = caster_flange_height, r = side_radius);}}
+      cylinder(h = caster_flange_height, r = side_radius, $fn = 40);}}
 
 module nut(size, height){
     width = size/1.75;
@@ -72,24 +72,52 @@ module nut(size, height){
 
 module nuts(){
   translate([standoff_radius, 0, nut_height/2])
-    nut(nut_short_side, nut_height);
+    nut(nut_short_side, nut_height + .1);
   translate([-standoff_radius, 0, nut_height/2])
-    nut(nut_short_side, nut_height);}
+    nut(nut_short_side, nut_height + .1);}
 
-module caster_standoff(){
+module _2_screw (){
+  //measured with calipers
+  screw_length = 8;
+  thread_radius = 2.17 / 2 - 0.1; // subtract 0.1 to make squeeze fit
+  head_height = 1.8;
+  head_radius = 4.1 / 2;
+  cylinder(r = thread_radius, h = screw_length, $fn = 20);
+  cylinder(r = head_radius, h = head_height, $fn = 20);}
+
+module caster_standoff_deck_side(){
   difference(){
-    union(){
-      cylinder(h = standoff_height, r = standoff_radius);
-      translate([0, 0, standoff_height - caster_flange_height])
-        caster_flange();}
+    cylinder(h = standoff_height - caster_flange_height,
+             r = standoff_radius,
+             $fn = 50);
     translate([0, 0, standoff_height - caster_flange_screw_length * 1.1 + 0.1])
       scale([1, 1, 1.1])
         caster_flange_screws();
     translate([0, 0, standoff_height - (caster_flange_height + nut_height)])
-      nuts();}
+      nuts();
+    translate([0, 0, standoff_height]){
+      // make hole to get to screw head depth
+      cylinder(r = 4.1 / 2, h = 3, center = true, $fn = 20);
+      translate([0, 0, -0.7])
+        rotate([180, 0, 0])
+          _2_screw(r = 0.5, h = 5, $fn = 20);}}
   deck_flange();
   for(ii = [0:3]){
     rotate([0, 0, 45 + 90 * ii])
       deck_flange_reinforcement();}}
 
-caster_standoff();
+module caster_standoff_caster_side(){
+  difference(){
+    caster_flange();
+    translate([0, 0, caster_flange_height - 0.7]){
+      rotate([180, 0, 0]){
+        _2_screw();}}
+    // make hole to get to screw head
+    translate([0, 0, caster_flange_height - 0.8]){
+      cylinder(r = 4.1 / 2, h = 10, $fn = 20);}
+    translate([0, 0, -.1]){
+      caster_flange_screws();}}}
+
+caster_standoff_deck_side();
+translate([caster_flange_width / 2 + deck_flange_radius + 1, 0, 0]){
+  caster_standoff_caster_side();}