chiark / gitweb /
doveclip introduce DoveClipPariSane_width; abolish DoveClip_width; NFC
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Sep 2012 13:37:36 +0000 (14:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Sep 2012 13:37:36 +0000 (14:37 +0100)
doveclip.scad
filamentspool.scad

index a58859c716f0bf3b7a8bde852a452a190b0a3ab9..6e9bb1d5d1b940c7eaaaa16d205eac426ec58c17 100644 (file)
@@ -34,8 +34,6 @@ module DoveClipPin(h=height) {
 
 function DoveClip_depth() =
   basethick + nomrad*2 + toothheight;
 
 function DoveClip_depth() =
   basethick + nomrad*2 + toothheight;
-function DoveClip_width() =
-  nomrad*2 + jawthick*2 + toothgap;
 
 module DoveClipEnd(baseextend=1, h=7) {
   cubex = nomrad*2 + jawthick*2;
 
 module DoveClipEnd(baseextend=1, h=7) {
   cubex = nomrad*2 + jawthick*2;
@@ -52,7 +50,7 @@ module DoveClipEnd(baseextend=1, h=7) {
 }
 
 module DoveClipPair(baseextend=1, h=7) {
 }
 
 module DoveClipPair(baseextend=1, h=7) {
-  delta = DoveClip_width();
+  delta =  nomrad*2 + jawthick*2 + toothgap;
   for (x=[-delta/2,delta/2])
     translate([x,0,0])
       DoveClipEnd(baseextend=baseextend, h=h);
   for (x=[-delta/2,delta/2])
     translate([x,0,0])
       DoveClipEnd(baseextend=baseextend, h=h);
@@ -74,3 +72,6 @@ module DoveClipPairSane(baseextend=0, h=7, count=2) {
     translate([0, DoveClip_depth(), 0])
     DoveClipPairBase(baseextend=baseextend, h=h, count=count);
 }
     translate([0, DoveClip_depth(), 0])
     DoveClipPairBase(baseextend=baseextend, h=h, count=count);
 }
+
+function DoveClipPairSane_width(count=2) =
+  2 * (nomrad + jawthick + ((nomrad*2 + jawthick) * (count-1)/2));
index 487d853b0645b524d5d6ca1f7dc8a0f8aa016b39..6b35646bffd39cd676aba4c5199dec68e0f73b7e 100644 (file)
@@ -197,7 +197,7 @@ module Hub(){ ////toplevel
     translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
   }
   hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
     translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
   }
   hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
-  holewidth = DoveClip_width() - hubstemwidth*2;
+  holewidth = DoveClipPairSane_width() - hubstemwidth*2;
   for (ang=[0,120,240])
     rotate([0,0,ang]) {
       difference() {
   for (ang=[0,120,240])
     rotate([0,0,ang]) {
       difference() {