From cd5b54e240fbecd48c169b97cf82eb614917337e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 31 Oct 2023 12:31:05 +1100 Subject: [PATCH] Disable batching for removal as it doesn't seem to help mostly from experience. Still testing. --- src/ifcopenshell-python/ifcopenshell/util/element.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py index ed121ac95d..f3654407d6 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -947,7 +947,7 @@ def remove_deep2(ifc_file, element, also_consider=[], do_not_delete=[]): :param element: The starting element that defines the subgraph :type element: ifcopenshell.entity_instance.entity_instance """ - ifc_file.batch() + # ifc_file.batch() to_delete = set() subgraph = list(ifc_file.traverse(element, breadth_first=True)) subgraph.extend(also_consider) @@ -982,7 +982,7 @@ def remove_deep2(ifc_file, element, also_consider=[], do_not_delete=[]): # We delete elements from subgraph in reverse order to allow batching to work for subelement in filter(lambda e: e in to_delete, subgraph[::-1]): ifc_file.remove(subelement) - ifc_file.unbatch() + # ifc_file.unbatch() def copy(ifc_file, element):