Arch: Bugfix in wall object

This commit is contained in:
Yorik van Havre 2012-06-06 16:45:34 -03:00
parent a4b593ddd3
commit 01681d66ec

View File

@ -382,10 +382,14 @@ class _Wall(ArchComponent.Component):
else: else:
FreeCAD.Console.PrintError(str(translate("Arch","Error: Invalid base object"))) FreeCAD.Console.PrintError(str(translate("Arch","Error: Invalid base object")))
if base:
for app in obj.Additions: for app in obj.Additions:
if hasattr(app,"Shape"): if hasattr(app,"Shape"):
if app.Shape:
if not app.Shape.isNull():
base = base.fuse(app.Shape) base = base.fuse(app.Shape)
app.ViewObject.hide() #to be removed app.ViewObject.hide() #to be removed
for hole in obj.Subtractions: for hole in obj.Subtractions:
if Draft.getType(hole) == "Window": if Draft.getType(hole) == "Window":
# window # window
@ -399,11 +403,11 @@ class _Wall(ArchComponent.Component):
if f: if f:
base = base.cut(f) base = base.cut(f)
elif hasattr(hole,"Shape"): elif hasattr(hole,"Shape"):
if hole.Shape:
if not hole.Shape.isNull(): if not hole.Shape.isNull():
base = base.cut(hole.Shape) base = base.cut(hole.Shape)
hole.ViewObject.hide() # to be removed hole.ViewObject.hide() # to be removed
if base:
if not base.isNull(): if not base.isNull():
try: try:
base = base.removeSplitter() base = base.removeSplitter()