chiark / gitweb /
doveclip fix pin dimensions more
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Sep 2012 22:44:41 +0000 (23:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Sep 2012 22:44:41 +0000 (23:44 +0100)
doveclip.scad

index 52f123073caa84e7bcc324acbf9e969239174048..5291c4946434292f254c967b6a7dbcdf6c6b5137 100644 (file)
@@ -3,7 +3,7 @@
 toothheight = 1.2;
 webthick = 1.8;
 height = 7;
 toothheight = 1.2;
 webthick = 1.8;
 height = 7;
-pindepth = 10;
+pinlengthfact = 1.2;
 nomrad = height/2 - toothheight;
 minrad = nomrad - 0.75;
 maxrad = nomrad + 0.25;
 nomrad = height/2 - toothheight;
 minrad = nomrad - 0.75;
 maxrad = nomrad + 0.25;
@@ -15,19 +15,20 @@ basepinclear = 1.0;
 toothgap = webthick + webgap*2;
 basethick = toothheight;
 
 toothgap = webthick + webgap*2;
 basethick = toothheight;
 
-module DoveClipPin(h=pindepth) {
+module DoveClipPin(h=height) {
+  pinh = h * pinlengthfact;
   pinheight = nomrad*2 + jawthick*2;
   translate([0,0, pinheight/2]) intersection(){
     union(){
       for (m=[0,1]) {
        mirror([0,0,m]) translate([0,0,pinheight/2]) rotate([90,0,0])
   pinheight = nomrad*2 + jawthick*2;
   translate([0,0, pinheight/2]) intersection(){
     union(){
       for (m=[0,1]) {
        mirror([0,0,m]) translate([0,0,pinheight/2]) rotate([90,0,0])
-         cylinder($fn=20, r1=minrad, r2=maxrad, h=h);
+         cylinder($fn=20, r1=minrad, r2=maxrad, h=pinh);
       }
       }
-      translate([-webthick/2, -h, -pinheight/2-1])
-       cube([webthick, h, pinheight+2]);
+      translate([-webthick/2, -pinh, -pinheight/2-1])
+       cube([webthick, pinh, pinheight+2]);
     }
     }
-    translate([-maxrad-1, -h-1, -pinheight/2])
-      cube([maxrad*2+2, h+2, pinheight]);
+    translate([-maxrad-1, -pinh-1, -pinheight/2])
+      cube([maxrad*2+2, pinh+2, pinheight]);
   }
 }
 
   }
 }