chiark / gitweb /
flyscreen-handle: Peg, wip, PegSectionSlice (not much functional change)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 26 Aug 2016 19:25:35 +0000 (20:25 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 26 Aug 2016 19:25:35 +0000 (20:25 +0100)
flyscreen-handle.scad

index 4515e110c714e3423e617b4ad09a255df9580a1e..60622789b5753ccbca74fecaa1a263902acb66ff 100644 (file)
@@ -193,13 +193,18 @@ module BasicSection(){
   HandleSection();
 }
 
+module PegSectionSlice(lambda) {
+  delta = peg_wedge_more * (1-lambda) + -peg_wedge_less * lambda;
+  z = peg_len * lambda;
+  translate([0,0, z])
+    linear_extrude(height=0.1)
+    PegSection(delta);
+}  
+
 module Peg(){
   hull(){
-    linear_extrude(height=0.1)
-      PegSection(+peg_wedge_more);
-    translate([0,0, peg_len - 0.1])
-      linear_extrude(height=0.1)
-      PegSection(-peg_wedge_less);
+    PegSectionSlice(0);
+    PegSectionSlice(1);
   }
 }