chiark / gitweb /
fix pin z in Kit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Nov 2017 23:01:42 +0000 (23:01 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Nov 2017 23:01:42 +0000 (23:01 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
moebius-demo.scad

index dcb85680e4a38f867ecaa67d1d84177b365950bf..b8c82d5311a46b03d04a2219144ad2de61691cd9 100644 (file)
@@ -21,6 +21,7 @@ pin_height = 5;
 // computed
 
 sliceat = moebiuscore_sliceat * moebiuscore_nomsize;
+pin_slopeheight = (pin_headwidth - pin_stemwidth)/2;
 
 module TopSlice(){
   translate([0,0, 200-sliceat])
@@ -40,7 +41,7 @@ module HalfPinHeadProfile(xslop, yadj, lenadj) {
   th = pin_headheight + lenadj - yadj;
   hull(){
     translate([ -tw/2,
-               pin_stemlen/2 + yadj + (pin_headwidth - pin_stemwidth)/2 ])
+               pin_stemlen/2 + yadj + pin_slopeheight ])
       square([ tw, th ]);
     translate([ -sw/2,
                pin_stemlen/2 + yadj ])
@@ -142,6 +143,9 @@ module Demo(){ ////toplevel
 
 module Kit(){ ////toplevel
   off = moebiuscore_nomsize*2.5;
+  pt = pin_stemlen/2 + pin_headheight
+    + pin_pin_yadj_range[1] + pin_slopeheight;
+
   translate([0,0,sliceat])
     Top();
   translate([ 0, -off, 0 ])
@@ -149,9 +153,8 @@ module Kit(){ ////toplevel
     translate([0,0,sliceat])
     Bottom();
   for (d = [0,1] * pin_height * 2)
-    translate([ off, d, 0 ])
+    translate([ off, d, pt ])
     rotate([90,0,0])
-    translate([ 0,0, pin_height/2 ])
     Pin();
 }