mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
You can now add and edit monetary units, and basic editing of other unit types.
This commit is contained in:
@@ -18,6 +18,17 @@ def is_a(entity, ifc_class):
|
||||
return False
|
||||
|
||||
|
||||
def get_subtypes(entity):
|
||||
def get_classes(declaration):
|
||||
results = []
|
||||
if not declaration.is_abstract():
|
||||
results.append(declaration)
|
||||
for subtype in declaration.subtypes():
|
||||
results.extend(get_classes(subtype))
|
||||
return results
|
||||
return get_classes(entity)
|
||||
|
||||
|
||||
def reassign_class(ifc_file, element, new_class):
|
||||
try:
|
||||
new_element = ifc_file.create_entity(new_class)
|
||||
|
||||
Reference in New Issue
Block a user