chiark / gitweb /
filamentspool: Reorg so axle hole is subtracted from whole hub: move some local varia...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 14 Dec 2015 00:54:18 +0000 (00:54 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 14 Dec 2015 00:54:18 +0000 (00:54 +0000)
filamentspool.scad

index 57cdce1..3194112 100644 (file)
@@ -236,18 +236,20 @@ module TowerDoveClipPin(){ ////toplevel
 }
 
 module Hub(){ ////toplevel
+  axlerad = hubaxlerad + slop;
+  xmin = axlerad+hublwidth/2;
+  xmax = hubbigrad-hublwidth/2;
+  hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
+  holewidth = DoveClipPairSane_width() - hubstemwidth*2;
   difference(){
     cylinder($fn=60, h=hublthick, r=hubbigrad);
     translate([0,0,-1])
       cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
   }
-  axlerad = hubaxlerad + slop;
   difference(){
     cylinder(h=hubaxlelen, r=axlerad+hublwidth);
     translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
   }
-  hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
-  holewidth = DoveClipPairSane_width() - hubstemwidth*2;
   for (ang=[0,120,240])
     rotate([0,0,ang]) {
       difference() {
@@ -261,8 +263,6 @@ module Hub(){ ////toplevel
        }
       }
     }
-  xmin = axlerad+hublwidth/2;
-  xmax = hubbigrad-hublwidth/2;
   for (ang = [0 : 60 : 359])
     rotate([0,0,ang]) rotate([90,0,0]) {
       translate([0,0,-hublwidth/2])