chiark / gitweb /
tube-crossdrill-jig: reorder so mainframehole ca depend on slot stuff, nfc
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 May 2013 14:42:55 +0000 (15:42 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 May 2013 14:42:55 +0000 (15:42 +0100)
tube-crossdrill-jig.scad

index 0b18eccd9269bb45729ce65a9c827dcbfce83b7b..4e80849746a5c6e9de906d3de402d705886e823e 100644 (file)
@@ -41,6 +41,12 @@ keepslotclear = 10;
 
 // computed values
 
+slotslopediag = sqrt(1 + slotslope*slotslope);
+slotwidthx = slotwidth * slotslopediag;
+
+slotxperlen = slotslope / slotslopediag;
+slotyperlen =         1 / slotslopediag;
+
 mainframeholex = backslotedgespace/2 + slotwidth/sqrt(2) +
   backslotmid2screwhole / sqrt(2);
 
@@ -50,14 +56,6 @@ mainframemaxx = mainframeholex + mainframeextraside;
 mainframeminy = mainframeholey - mainframeextrafront;
 mainframemaxz = keepslotstartz + keepslotlen;
 
-slotslopediag = sqrt(1 + slotslope*slotslope);
-slotwidthx = slotwidth * slotslopediag;
-
-slotxperlen = slotslope / slotslopediag;
-slotyperlen =         1 / slotslopediag;
-
-echo(slotslope, slotslopediag, slotwidthx);
-
 module MainFrame(){
   for (m=[0,1]) {
     mirror([m,0,0]) {