chiark / gitweb /
filamentspool fix cup dimensions
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Sep 2012 23:01:38 +0000 (00:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Sep 2012 23:01:38 +0000 (00:01 +0100)
filamentspool.scad

index c2353fdbb7b79a8e8cfb89f12cb7a0e6b92b7dc4..131e859fe9f85119bfebf0e0f6d0d00a033a3c2a 100644 (file)
@@ -13,7 +13,11 @@ ratchettoothheight=5;
 ratchettoothsmoothr=1;
 ratchettoothslope=0.75;
 overlap=0.5;
-cupbigrad=35;
+cupbigrad=20;
+
+xstraightmul = 1.75;
+
+propxshift = 0;
 
 doveclipheight = 10;
 
@@ -22,7 +26,7 @@ teethgapx=4+fdia;
 
 prongstalkxwidth=3;
 
-stalklength=40;
+stalklength=35;
 overclipcupgap=5;
 overclipdepth=15;
 overcliproundr=2.0;
@@ -98,7 +102,7 @@ module FilamentCupHandle(){
 }
 
 module FilamentCupCup(){
-  xstraight = cupbigrad;
+  xstraight = cupbigrad * xstraightmul;
   linear_extrude(height=prongthick) {
     FlatArc(0,0, cupbigrad,cupbigrad+prongwidth, 89,271, $fn=80);
   }
@@ -122,13 +126,14 @@ module FilamentCup() {
 
   midrad = cupbigrad + prongwidth/2;
 
-  propshift = stalklength - overclipdepth - prongthick;
+  propshift = stalklength - overclipdepth - prongthick + propxshift;
   proptaken = propshift;
   echo(cupbigrad, dx, midrad, propshift, proptaken);
 
   translate([propshift, -1, 0]) {
+    // something is wrong with the y calculation
     cube([prongwidth,
-         dy - sqrt(midrad*midrad - proptaken*proptaken),
+         dy - sqrt(midrad*midrad - proptaken*proptaken) - prongwidth/2,
          prongthick]);
   }
   translate([stalklength + overclipdepth, gapy, 0])