mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +00:00
Disable batching for removal as it doesn't seem to help mostly from experience. Still testing.
This commit is contained in:
@@ -947,7 +947,7 @@ def remove_deep2(ifc_file, element, also_consider=[], do_not_delete=[]):
|
|||||||
:param element: The starting element that defines the subgraph
|
:param element: The starting element that defines the subgraph
|
||||||
:type element: ifcopenshell.entity_instance.entity_instance
|
:type element: ifcopenshell.entity_instance.entity_instance
|
||||||
"""
|
"""
|
||||||
ifc_file.batch()
|
# ifc_file.batch()
|
||||||
to_delete = set()
|
to_delete = set()
|
||||||
subgraph = list(ifc_file.traverse(element, breadth_first=True))
|
subgraph = list(ifc_file.traverse(element, breadth_first=True))
|
||||||
subgraph.extend(also_consider)
|
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
|
# 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]):
|
for subelement in filter(lambda e: e in to_delete, subgraph[::-1]):
|
||||||
ifc_file.remove(subelement)
|
ifc_file.remove(subelement)
|
||||||
ifc_file.unbatch()
|
# ifc_file.unbatch()
|
||||||
|
|
||||||
|
|
||||||
def copy(ifc_file, element):
|
def copy(ifc_file, element):
|
||||||
|
|||||||
Reference in New Issue
Block a user