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

Function yield_parents

src/ifcopenshell-python/ifcopenshell/draw.py:136–139  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

134 iterator_kwargs["exclude"] = settings.exclude_entities.split(",")
135
136 def yield_parents(el):
137 yield el
138 if par := ifcopenshell.util.element.get_parent(el):
139 yield from yield_parents(par)
140
141 def has_selected_parent(el):
142 return any(settings.storey_filter in (x.Name or x.GlobalId) for x in yield_parents(el))

Callers 1

has_selected_parentFunction · 0.85

Calls 1

get_parentMethod · 0.80

Tested by

no test coverage detected