mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Fixed crash on Mac m1 on removing unused types (similar to 4d0be1972)
This commit is contained in:
@@ -34,8 +34,8 @@ def assign_type(ifc, type_tool, element=None, type=None):
|
||||
def purge_unused_types(ifc, type):
|
||||
for element_type in type.get_model_types():
|
||||
if not type.get_type_occurrences(element_type):
|
||||
ifc.run("root.remove_product", product=element_type)
|
||||
obj = ifc.get_object(element_type)
|
||||
ifc.run("root.remove_product", product=element_type)
|
||||
if obj:
|
||||
ifc.unlink(obj=obj)
|
||||
type.remove_object(obj)
|
||||
|
||||
Reference in New Issue
Block a user