diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index b1389556a..5b12b796c 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -339,17 +339,26 @@ class _Wall(ArchComponent.Component): base = base.oldFuse(app.Shape) app.ViewObject.hide() #to be removed for hole in obj.Subtractions: - cut = False - if hasattr(hole,"Proxy"): - if hasattr(hole.Proxy,"Subvolume"): - if hole.Proxy.Subvolume: - print "cutting subvolume",hole.Proxy.Subvolume - base = base.cut(hole.Proxy.Subvolume) - cut = True - if not cut: - if hasattr(obj,"Shape"): - base = base.cut(hole.Shape) - hole.ViewObject.hide() # to be removed + if Draft.getType(hole) == "Window": + # window + if hole.Base and obj.Width: + max_length = 0 + for w in hole.Base.Shape.Wires: + if w.BoundBox.DiagonalLength > max_length: + max_length = w.BoundBox.DiagonalLength + ext = w + f = Part.Face(ext) + l = obj.Width + n = f.normalAt(0,0) + v1 = fcvec.scaleTo(n,l) + f.translate(v1) + v2 = fcvec.neg(v1) + v2 = fcvec.scale(v1,-2) + f = f.extrude(v2) + base = base.cut(f) + elif hasattr(obj,"Shape"): + base = base.cut(hole.Shape) + hole.ViewObject.hide() # to be removed obj.Shape = base if not fcgeo.isNull(pl): obj.Placement = pl diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index f6f1303cb..0e9202f84 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -121,15 +121,16 @@ class _Window(ArchComponent.Component): max_length = w.BoundBox.DiagonalLength ext = w wires.remove(ext) - for w in wires: - w.reverse() - wires.insert(0, ext) - shape = Part.Face(wires) + shape = Part.Face(ext) norm = shape.normalAt(0,0) thk = float(obj.WindowParts[(i*5)+3]) if thk: exv = fcvec.scaleTo(norm,thk) shape = shape.extrude(exv) + for w in wires: + f = Part.Face(w) + f = f.extrude(exv) + shape = shape.cut(f) if obj.WindowParts[(i*5)+4]: zof = float(obj.WindowParts[(i*5)+4]) if zof: