chiark / gitweb /
osstest-arm-net-bracket: Make number of slots in tongue configurable (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 23 Oct 2014 16:25:57 +0000 (17:25 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 23 Oct 2014 16:25:57 +0000 (17:25 +0100)
osstest-arm-net-bracket.scad

index 8d022bd..4eccb82 100644 (file)
@@ -21,12 +21,14 @@ holedia = 3.5;
 
 tongue2x = tongue2width - holedist;
 
-module Tongue(tw,tt,ad){
+module Tongue(tw,tt,ad,slots=2){
+  y0=thick+0.1;
+  yn=ad-ridgewidth-strapwidth;
   difference(){
     translate([-tw, 0, 0])
       cube([tw, ad, tt+strapthick]);
-    for (y=[thick+0.1, ad-ridgewidth-strapwidth])
-      translate([-tw-1, y, tt])
+    for (yi=[0:slots-1])
+      translate([-tw-1, y0 + (yn-y0)*yi/(slots-1), tt])
        cube([tw+2, strapwidth, strapthick+1]);
   }
 }