chiark / gitweb /
warptest3: try this
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Nov 2015 22:21:49 +0000 (22:21 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Nov 2015 22:21:49 +0000 (22:21 +0000)
warptest3.scad [new file with mode: 0644]

diff --git a/warptest3.scad b/warptest3.scad
new file mode 100644 (file)
index 0000000..f6f260f
--- /dev/null
@@ -0,0 +1,30 @@
+// -*- C -*-
+
+dy= 145;
+dx=  65;
+
+h1= 8;
+h2= 12;
+ratio = 0.8;
+
+module Plan(){
+  polygon([[ -dx/2,  0    ],
+          [     0,  dy/2 ],
+          [  dx/2,  0    ],
+          [     0, -dy/2 ]]);
+}
+
+module Solid(){
+  rotate([0,0, -45]) {
+    hull(){
+      linear_extrude(height= h1) {
+       Plan();
+      }
+      linear_extrude(height= h2) {
+       scale(ratio) Plan();
+      }
+    }
+  }
+}
+
+Solid();