chiark / gitweb /
axlepin provide AxlePin_zoffset
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 18 Oct 2012 00:45:53 +0000 (01:45 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 18 Oct 2012 00:45:53 +0000 (01:45 +0100)
axlepin.scad

index 0f29a4f49c6cb815b5c24d19db65bdf9c4469ec3..554a382a66950be25f11c4db54ef1319febf59da 100644 (file)
@@ -1,6 +1,7 @@
 // -*- C -*-
 
 function AxlePin_holerad() = 2;
 // -*- C -*-
 
 function AxlePin_holerad() = 2;
+function AxlePin_zoffset(holerad=2, slop=0.5) = (holerad - slop)*0.7;
 
 module AxlePin(axlerad, pinlen, holerad=2, tabthick=5, slop=0.5){
   pinr = holerad - slop;
 
 module AxlePin(axlerad, pinlen, holerad=2, tabthick=5, slop=0.5){
   pinr = holerad - slop;
@@ -11,7 +12,8 @@ module AxlePin(axlerad, pinlen, holerad=2, tabthick=5, slop=0.5){
       translate([-tabthick, axlerad, -holerad])
        cube([tabthick*2, holerad*2, holerad*2]);
     }
       translate([-tabthick, axlerad, -holerad])
        cube([tabthick*2, holerad*2, holerad*2]);
     }
-    translate([-50,-50, -pinr*0.7]) cube([100,100,50]);
+    translate([-50,-50,-AxlePin_zoffset(holerad,slop)])
+      cube([100,100,50]);
   }
 }
 
   }
 }