From 513efcba0ef5e912e42a14b852a377e698549acf Mon Sep 17 00:00:00 2001 From: Keith Sloan Date: Thu, 11 May 2017 08:28:45 +0100 Subject: [PATCH] Fix for linearextrude with twist --- src/Mod/OpenSCAD/OpenSCADFeatures.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Mod/OpenSCAD/OpenSCADFeatures.py b/src/Mod/OpenSCAD/OpenSCADFeatures.py index 50e38d5559..d214282fac 100644 --- a/src/Mod/OpenSCAD/OpenSCADFeatures.py +++ b/src/Mod/OpenSCAD/OpenSCADFeatures.py @@ -382,7 +382,9 @@ class Twist: facetransform.rotateZ(math.radians(fp.Angle.Value)) facetransform.move(FreeCAD.Vector(0,0,fp.Height.Value)) faceu.transformShape(facetransform) - step = 2 + int(fp.Angle.Value // 90) #resolution in z direction + step = 2 + abs(int(fp.Angle.Value // 90)) #resolution in z direction + # print abs(int(fp.Angle.Value // 90)) #resolution in z direction + # print step zinc = fp.Height.Value/(step-1.0) angleinc = math.radians(fp.Angle.Value)/(step-1.0) spine = Part.makePolygon([(0,0,i*zinc) \ @@ -395,7 +397,9 @@ class Twist: pipeshell=Part.BRepOffsetAPI.MakePipeShell(spine) pipeshell.setSpineSupport(spine) pipeshell.add(wire) - pipeshell.setAuxiliarySpine(auxspine,True,False) + # Was before function change + # pipeshell.setAuxiliarySpine(auxspine,True,False) + pipeshell.setAuxiliarySpine(auxspine,True,long(0)) print(pipeshell.getStatus()) assert(pipeshell.isReady()) #fp.Shape=pipeshell.makeSolid()