From 6e7beb1a0b3e033125ca95567540e8777856050c Mon Sep 17 00:00:00 2001 From: Clemens Weissbacher <4752766+weimens@users.noreply.github.com> Date: Mon, 29 Oct 2018 17:18:13 +0100 Subject: [PATCH] py3: OpenSCAD: fix type cast --- src/Mod/OpenSCAD/OpenSCADFeatures.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/OpenSCAD/OpenSCADFeatures.py b/src/Mod/OpenSCAD/OpenSCADFeatures.py index d214282fac..83c9a41dbe 100644 --- a/src/Mod/OpenSCAD/OpenSCADFeatures.py +++ b/src/Mod/OpenSCAD/OpenSCADFeatures.py @@ -366,7 +366,7 @@ class Twist: # self.createGeometry(fp) def createGeometry(self,fp): - import FreeCAD,Part,math + import FreeCAD,Part,math,sys #tangle = -twist #openscad uses degrees clockwise if fp.Base and fp.Angle and fp.Height and \ fp.Base.Shape.isValid(): @@ -399,7 +399,10 @@ class Twist: pipeshell.add(wire) # Was before function change # pipeshell.setAuxiliarySpine(auxspine,True,False) - pipeshell.setAuxiliarySpine(auxspine,True,long(0)) + if sys.version_info.major < 3: + pipeshell.setAuxiliarySpine(auxspine,True,long(0)) + else: + pipeshell.setAuxiliarySpine(auxspine,True,0) print(pipeshell.getStatus()) assert(pipeshell.isReady()) #fp.Shape=pipeshell.makeSolid()