From 0bb8e96ed93f5f28bb43c28401ddcaa1cd5b4cbf Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 5 Nov 2017 19:14:04 +0000 Subject: [PATCH] wip pins Signed-off-by: Ian Jackson --- genscad | 1 + moebius-demo.scad | 31 +++++++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/genscad b/genscad index 26814fe..3440d18 100755 --- 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)) diff --git a/moebius-demo.scad b/moebius-demo.scad index 1b2c6ff..98b8469 100644 --- a/moebius-demo.scad +++ b/moebius-demo.scad @@ -2,20 +2,27 @@ include -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(); -- 2.30.2