mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
New IfcOpenShell utility to get instances of an element type easily
This commit is contained in:
@@ -78,6 +78,12 @@ def get_type(element):
|
||||
return relationship.RelatingType
|
||||
|
||||
|
||||
def get_types(type):
|
||||
for rel in getattr(type, "Types", []):
|
||||
return rel.RelatedObjects
|
||||
return []
|
||||
|
||||
|
||||
def get_material(element, should_skip_usage=False):
|
||||
if hasattr(element, "HasAssociations") and element.HasAssociations:
|
||||
for relationship in element.HasAssociations:
|
||||
|
||||
Reference in New Issue
Block a user