From 91f94443ab8c0262a1d0e22722d8fc4333d9f7ac Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 15 Oct 2016 19:48:48 -0300 Subject: [PATCH] Arch small fixes in windows --- src/Mod/Arch/ArchWindow.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index a151d0256..a29c19c27 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -682,7 +682,7 @@ class _Window(ArchComponent.Component): if self.clone(obj): return - import Part, DraftGeomUtils + import Part,DraftGeomUtils,math pl = obj.Placement base = None if obj.Base: @@ -738,7 +738,9 @@ class _Window(ArchComponent.Component): b.translate(FreeCAD.Vector(bb.XMin,bb.YMin+i*step,bb.ZMin)) boxes.append(b) self.boxes = Part.makeCompound(boxes) - self.boxes.Placement = obj.Base.Placement + rot = obj.Base.Placement.Rotation + self.boxes.rotate(self.boxes.BoundBox.Center,rot.Axis,math.degrees(rot.Angle)) + self.boxes.translate(shape.BoundBox.Center.sub(self.boxes.BoundBox.Center)) shape = shape.common(self.boxes) shapes.append(shape) if shapes: