chiark / gitweb /
wip pins
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Nov 2017 19:14:04 +0000 (19:14 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Nov 2017 19:14:04 +0000 (19:14 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
genscad
moebius-demo.scad

diff --git a/genscad b/genscad
index 26814fe974e86beda03e6095ab89c4f1d6fe737f..3440d188f923a28ae10829e8ddbfe799e7336f0f 100755 (executable)
--- a/genscad
+++ b/genscad
@@ -119,3 +119,4 @@ def make_pinlocations():
 make_moebius('MoebiusCore')
 make_pinlocations()
 print('moebiuscore_nomsize=%s;' % repr(nomsize))
+print('moebiuscore_sliceat=%s;' % repr(sliceat))
index 1b2c6ff019c1a414b12799a85e196e7c109de7a7..98b84699665f1dc79ae4d7af588e1638208130cf 100644 (file)
@@ -2,20 +2,27 @@
 
 include <moebius-core.scad>
 
-sliceat = 1.675 * moebiuscore_nomsize;
+sliceat = moebiuscore_sliceat * moebiuscore_nomsize;
 
-intersection(){
-  MoebiusCore();
-  translate([0,0, 200-sliceat])
-    cube(center=true, 400);
+module MainBody(){
+  intersection(){
+    MoebiusCore();
+    translate([0,0, 200-sliceat])
+      cube(center=true, 400);
+  }
 }
 
-%for (i=[0,1]) {
-  hull(){
-    translate( moebius_pin_locns[i] * moebiuscore_nomsize )
-      sphere(2 + i);
-    translate( moebius_pin_locns[i] * moebiuscore_nomsize +
-              moebius_pin_normals[i] * moebiuscore_nomsize*0.5 )
-      sphere(2 + i);
+module PinDemo(){
+  for (i=[0,1]) {
+    hull(){
+      translate( moebius_pin_locns[i] * moebiuscore_nomsize )
+       sphere(2 + i);
+      translate( moebius_pin_locns[i] * moebiuscore_nomsize +
+                moebius_pin_normals[i] * moebiuscore_nomsize*0.5 )
+       sphere(2 + i);
+    }
   }
 }
+
+MainBody();
+%PinDemo();