chiark / gitweb /
pawn wip new template
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Oct 2012 17:24:08 +0000 (18:24 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Oct 2012 17:24:08 +0000 (18:24 +0100)
pawn.scad

index b7c2bed..2aeaae1 100644 (file)
--- a/pawn.scad
+++ b/pawn.scad
@@ -29,6 +29,9 @@ x5 = xc5 - r5 * cos(a6);
 
 x6 = x5 - h6 * tan(a6);
 
+htotal = r1 - z6;
+echo("height", htotal);
+
 $fa=1;
 $fs=0.1;
 
@@ -60,4 +63,14 @@ module PawnTemplate(){
           [0.01, z6]]);
 }
 
-PawnTemplate();
+module Pawn(h=htotal){
+  scale(h/htotal) {
+    rotate_extrude($fn=100){
+      assign($fn=undef){
+       PawnTemplate();
+      }
+    }
+  }
+}
+
+Pawn(h=20);