chiark / gitweb /
Merge branch 'master' of chiark:/u/ianmdlvl/reprap/play
[reprap-play.git] / filamentspool.scad
index 2502d2805191f6fa23c031f77c0b58b045e1e121..44a3f31da19088b2ba9bf39c3ecedf2a18313689 100644 (file)
@@ -451,6 +451,59 @@ module FilamentCupPair(){ ////toplevel
     rotate([0,0,180]) FilamentCup();
 }
 
+//----- storarm -----
+
+storarm_hooklen = 8;
+storarm_hookheight = 5;
+storarm_thick = 10;
+storarm_axleslop = 4;
+
+// calculated
+
+storarm_axlerad = hubaxlerad - storarm_axleslop;
+storarm_mainlen = hubaxlelen;
+storarm_totlen = storarm_mainlen + storarm_hooklen;
+
+module StorageArmDiagPartSide(xmin, xmax){
+  xsz = xmax-xmin;
+  yuse = storarm_thick/2;
+
+  intersection(){
+    translate([xmin-1, -storarm_axlerad, storarm_thick/2])
+      rotate([0,90,0])
+      cylinder(r=storarm_axlerad, h=xsz+2, $fn=60);
+    translate([xmin, -yuse, 0])
+      cube([xsz, yuse, storarm_thick]);
+  }
+}
+
+module StorageArmDiagPart(xmin, xmax, shear, adjbot){
+  hull(){
+    StorageArmDiagPartSide(xmin,xmax);
+
+    multmatrix([[1,0,0,0],
+               [shear,1,0,0],
+               [0,0,1,0],
+               [0,0,0,1]])
+      translate([0, -storarm_axlerad*2 + adjbot, 0])
+      mirror([0,1,0])
+      StorageArmDiagPartSide(xmin,xmax);
+  }
+}
+
+module StorageArm(){ ////toplevel
+  shear = storarm_hookheight / (storarm_mainlen/2);
+
+  StorageArmDiagPart(-1, storarm_mainlen/2+1, shear, 0);
+  StorageArmDiagPart(storarm_mainlen/2-1, storarm_mainlen+1, shear/2,
+                    storarm_hookheight/2);
+
+  translate([0, storarm_hookheight, 0])
+    StorageArmDiagPart(storarm_mainlen, storarm_totlen,
+                      shear/2, -storarm_hookheight/2);
+}
+
+
 module Demo(){
   translate([-hubeffrad-30,50,0]) Hub();
   ArmEnd();
@@ -467,4 +520,5 @@ module Demo(){
 //AxleWasher();
 //AxlePin();
 //AxleFrictionWasher();
+StorageArm();
 //Demo();