chiark / gitweb /
keyring-kay: wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 Sep 2013 15:57:03 +0000 (16:57 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 Sep 2013 15:57:03 +0000 (16:57 +0100)
keyring-kay.scad

index c12b891..0fb83ab 100644 (file)
@@ -5,21 +5,25 @@ linewidth = 3.5;
 letterthick = 2.5;
 
 kdiag = 1;
+kprop = 0.50;
+
+module kay_leg (transamount, llen, mir) {
+  translate([0,transamount,0])
+    mirror([0,mir,0])
+    translate([0,-0.1,0])
+    multmatrix([[1,kdiag,0,0],
+               [0,1,0,0],
+               [0,0,1,0],
+               [0,0,0,1]])
+    cube([linewidth * sqrt(1 + kdiag*kdiag),
+         llen + 0.1, letterthick]);
+}  
 
 module kay () {
   translate([0.1,0,0])
     cube([linewidth, letterheight, letterthick]);
-  translate([0,letterheight/2,0])
-    for (mir=[0,1]) {
-      mirror([0,mir,0])
-       translate([0,-0.1,0])
-       multmatrix([[1,kdiag,0,0],
-                   [0,1,0,0],
-                   [0,0,1,0],
-                   [0,0,0,1]])
-       cube([linewidth * sqrt(1 + kdiag*kdiag),
-             letterheight/2 + 0.1, letterthick]);
-    }
+  kay_leg(letterheight*kprop, letterheight*(1-kprop), 0);
+  kay_leg(letterheight*kprop, letterheight*kprop, 1);
 }
 
 kay();