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 c2353fd..131e859 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])