chiark / gitweb /
fix python incompatibilities
[moebius3.git] / meshscad
index bccd0b682679dc9eeb77621da03192e0005965cf..ad3194929243001d5942498650ceee7216fe159d 100755 (executable)
--- a/meshscad
+++ b/meshscad
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from __future__ import print_function
 
@@ -9,17 +9,20 @@ from moebius import *
 from scad import *
 
 nomsize = 30;
-wire = 2.000;
+wire = 1.500;
 
 # number of wires
-kv = 7
-kw = 4
+kv = 24
+kw = 16
 
 # resolution
-nv = 7
-nw = 20
+nv = 200
+nw = 200
 ns = 4 # around tube, should be even
 
+from moedebug import *
+dbg_file(sys.stderr)
+
 nv += -nv % kv
 nw += -nw % kw
 
@@ -75,9 +78,9 @@ def make_moebius(objname):
         #print('VWS',v,w,s, sigmas, file=sys.stderr)
         if not w % each_w:
           extents[extw].quad([ cnr for cnr in qc(v,w,sigmas,False) ])
-        if False and not v % each_v and w < nw:
+        if not v % each_v and w < nw:
           travers[v].rquad([ cnr for cnr in qc(v,w,sigmas,True) ])
-    if False and not v % each_v:
+    if not v % each_v:
       for w in 0, nw:
         p, norm, extt, trav = m.details(v, w)
         cnrs = points_round_wire(p, norm, extt, calc_sigmas(range(0,ns)))