mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +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):
|
def purge_unused_types(ifc, type):
|
||||||
for element_type in type.get_model_types():
|
for element_type in type.get_model_types():
|
||||||
if not type.get_type_occurrences(element_type):
|
if not type.get_type_occurrences(element_type):
|
||||||
ifc.run("root.remove_product", product=element_type)
|
|
||||||
obj = ifc.get_object(element_type)
|
obj = ifc.get_object(element_type)
|
||||||
|
ifc.run("root.remove_product", product=element_type)
|
||||||
if obj:
|
if obj:
|
||||||
ifc.unlink(obj=obj)
|
ifc.unlink(obj=obj)
|
||||||
type.remove_object(obj)
|
type.remove_object(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user