From 64800bc322e9c161ae271f5e9cfbf1f05a954c5c Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 16 Dec 2017 09:43:02 -0200 Subject: [PATCH] Arch: Fixed wrong wall/structure extrusion direction --- src/Mod/Arch/ArchComponent.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index aa6dc86a20..cfe35ca3ff 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -444,6 +444,9 @@ class Component: return None def rebase(self,shape): + """returns a shape that is a copy ofthe original shape + but centered on the (0,0) origin, and a placement that is needed to + reposition that shape to its original location/orientation""" import DraftGeomUtils,math if not isinstance(shape,list): shape = [shape] @@ -453,7 +456,7 @@ class Component: v = shape[0].BoundBox.Center n = DraftGeomUtils.getNormal(shape[0]) r = FreeCAD.Rotation(FreeCAD.Vector(0,0,1),n) - if round(r.Angle,8) == round(math.pi,8): + if round(abs(r.Angle),8) == round(math.pi,8): r = FreeCAD.Rotation() shapes = [] for s in shape: