diff --git a/src/Mod/Arch/ArchBuildingPart.py b/src/Mod/Arch/ArchBuildingPart.py index 940f76757c..691525b761 100644 --- a/src/Mod/Arch/ArchBuildingPart.py +++ b/src/Mod/Arch/ArchBuildingPart.py @@ -487,14 +487,21 @@ class BuildingPart(ArchIFC.IfcProduct): "Touches all descendents where applicable" - for child in obj.Group: + g = [] + if hasattr(obj,"Group"): + g = obj.Group + elif (Draft.getType(obj) in ["Wall","Structure"]): + g = obj.Additions + for child in g: if Draft.getType(child) in ["Wall","Structure"]: if not child.Height.Value: - print("Executing ",child.Label) + FreeCAD.Console.PrintLog("Auto-updating Height of "+child.Name+"\n") + self.touchChildren(child) child.Proxy.execute(child) elif Draft.getType(child) in ["Group","BuildingPart"]: self.touchChildren(child) + def addObject(self,obj,child): "Adds an object to the group of this BuildingPart" diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index c6a4013a8a..ae269bb6bd 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -403,6 +403,11 @@ class Component(ArchIFC.IfcProduct): if hasattr(parent,"Group"): if obj in parent.Group: return self.getParentHeight(parent) + # still not found? check if we are embedded + for parent in obj.InList: + if hasattr(parent,"Additions"): + if obj in parent.Additions: + return self.getParentHeight(parent) return 0 def clone(self,obj):