MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_facility_parent

Function get_facility_parent

src/ifcfm/ifcfm/basic.py:207–216  ·  view source on GitHub ↗
(
    element: ifcopenshell.entity_instance, ifc_class: str
)

Source from the content-addressed store, hash-verified

205
206
207def get_facility_parent(
208 element: ifcopenshell.entity_instance, ifc_class: str
209) -> Union[ifcopenshell.entity_instance, None]:
210 parent = ifcopenshell.util.element.get_aggregate(element)
211 while parent:
212 if parent.is_a(ifc_class):
213 return parent
214 if parent.is_a("IfcProject"):
215 return
216 parent = ifcopenshell.util.element.get_aggregate(parent)
217
218
219def get_classification_identification(element: ifcopenshell.entity_instance) -> Union[str, None]:

Callers 2

get_facility_dataFunction · 0.70
get_space_dataFunction · 0.70

Calls 1

is_aMethod · 0.45

Tested by

no test coverage detected