chiark / gitweb /
filamentspool: Storarm: Mounting hole positions
[reprap-play.git] / filamentspool.scad
index 44a3f31da19088b2ba9bf39c3ecedf2a18313689..a7f2abb8ac28124569ea8117b331aad34c61876d 100644 (file)
@@ -458,12 +458,27 @@ storarm_hookheight = 5;
 storarm_thick = 10;
 storarm_axleslop = 4;
 
+storarm_base_w = 30;
+storarm_base_h = 100;
+storarm_base_d = 15;
+storarm_base_mind = 2;
+
+storarm_cope_hubaxle_mk1 = true;
+
+storarm_screw_hole = 4;
+storarm_screw_hole_slop = 0.5;
+storarm_besides_hole = 4;
+
 // calculated
 
 storarm_axlerad = hubaxlerad - storarm_axleslop;
-storarm_mainlen = hubaxlelen;
+storarm_mainlen = hubaxlelen + (storarm_cope_hubaxle_mk1 ? 10 : 0);
 storarm_totlen = storarm_mainlen + storarm_hooklen;
 
+storarm_mid_off_y = storarm_axlerad;
+
+storarm_base_off_y = storarm_mid_off_y + storarm_base_h/2;
+
 module StorageArmDiagPartSide(xmin, xmax){
   xsz = xmax-xmin;
   yuse = storarm_thick/2;
@@ -491,6 +506,28 @@ module StorageArmDiagPart(xmin, xmax, shear, adjbot){
   }
 }
 
+module StorageArmBaseTemplate(){
+  square([storarm_base_w, storarm_base_h]);
+}
+
+module StorageArmAtMountingHoles(){
+  bes = storarm_besides_hole + storarm_screw_hole;
+
+  x0 = bes;
+  x1 = storarm_base_w-bes;
+  y1 = storarm_base_h - bes;
+  y0 = bes;
+
+  for (pos=[ [x0, y1],
+            [x1, y1],
+            [x1, y0] ]) {
+    rotate([0,90,0])
+      translate([pos[0] - storarm_base_w,
+                pos[1] - storarm_base_off_y, -storarm_base_d])
+      children();
+  }
+}
+
 module StorageArm(){ ////toplevel
   shear = storarm_hookheight / (storarm_mainlen/2);
 
@@ -501,6 +538,21 @@ module StorageArm(){ ////toplevel
   translate([0, storarm_hookheight, 0])
     StorageArmDiagPart(storarm_mainlen, storarm_totlen,
                       shear/2, -storarm_hookheight/2);
+
+  difference(){
+    union(){
+      hull(){
+       translate([-storarm_base_d, -storarm_base_off_y, storarm_base_w])
+         rotate([0,90,0])
+         linear_extrude(height=storarm_base_mind)
+         StorageArmBaseTemplate();
+       StorageArmDiagPart(-1, 0, shear, 0);
+      }
+      StorageArmAtMountingHoles(){
+       cylinder(r=1, h=10);
+      }
+    }
+  }
 }