diff --git a/src/blenderbim/blenderbim/bim/module/geometry/data.py b/src/blenderbim/blenderbim/bim/module/geometry/data.py index 8b1849b200..6a3ece41c9 100644 --- a/src/blenderbim/blenderbim/bim/module/geometry/data.py +++ b/src/blenderbim/blenderbim/bim/module/geometry/data.py @@ -114,7 +114,13 @@ class ConnectionsData: else: related_element = rel.RelatedElement - if element.is_a("IfcRelConnectsPathElements"): + realizing_elements = [] + realizing_elements_connection_type = "" + if rel.is_a("IfcRelConnectsWithRealizingElements"): + realizing_elements.extend(rel.RealizingElements) + realizing_elements_connection_type = rel.ConnectionType + + if rel.is_a("IfcRelConnectsPathElements"): related_element_connection_type = rel.RelatedConnectionType else: related_element_connection_type = "" @@ -125,6 +131,8 @@ class ConnectionsData: "is_relating": True, "Name": related_element.Name or "Unnamed", "ConnectionType": related_element_connection_type, + "realizing_elements": realizing_elements, + "realizing_elements_connection_type": realizing_elements_connection_type } ) @@ -134,7 +142,13 @@ class ConnectionsData: else: relating_element = rel.RelatingElement - if element.is_a("IfcRelConnectsPathElements"): + realizing_elements = [] + realizing_elements_connection_type = "" + if rel.is_a("IfcRelConnectsWithRealizingElements"): + realizing_elements.extend(rel.RealizingElements) + realizing_elements_connection_type = rel.ConnectionType + + if rel.is_a("IfcRelConnectsPathElements"): relating_element_connection_type = rel.RelatingConnectionType else: relating_element_connection_type = "" @@ -145,6 +159,8 @@ class ConnectionsData: "is_relating": False, "Name": relating_element.Name or "Unnamed", "ConnectionType": relating_element_connection_type, + "realizing_elements": realizing_elements, + "realizing_elements_connection_type": realizing_elements_connection_type } ) diff --git a/src/blenderbim/blenderbim/bim/module/geometry/ui.py b/src/blenderbim/blenderbim/bim/module/geometry/ui.py index ee18b60875..69520f7a51 100644 --- a/src/blenderbim/blenderbim/bim/module/geometry/ui.py +++ b/src/blenderbim/blenderbim/bim/module/geometry/ui.py @@ -146,6 +146,20 @@ class BIM_PT_connections(Panel): op = row.operator("bim.remove_connection", icon="X", text="") op.connection = connection["id"] + if connection["realizing_elements"]: + row = self.layout.row(align=True) + connection_type = connection["realizing_elements_connection_type"] + connection_type = f" ({connection_type})" if connection_type else "" + row.label(text=f"Realizing elements{connection_type}:") + + for element in connection["realizing_elements"]: + row = self.layout.row(align=True) + obj = tool.Ifc.get_object(element) + row.label(text=obj.name) + row.operator( + "bim.select_entity", text="", icon="RESTRICT_SELECT_OFF" + ).ifc_id = element.id() + class BIM_PT_mesh(Panel): bl_label = "Representation Utilities"