Just got the model seen in the screen from an landscape architect. 180 MB but probably 95% data volumes are trees which I do not need at all ... Let BBIM help myself to get something to easily work with ...
First idea:
Open the file in BBIM and delete the trees works fine, but takes two hours on my machanine. But BBIM did not crash :-) But there must be a better way ... Actually there is ...
Second idea, use the filter and IfcPatch
Start by finding the correct filter by python ...
from ifcopenshell.util import selector
query = "IfcBuildingElement"
len(ifcopenshell.util.selector.filter_elements(ifcfile, query))
query = "IfcBuildingElement, Name!=/^Platane/, Name!=/^Bush/, Name!=/^Willow/, Name!=/^Black_Maple/, Name!=/^Nordmann/, Name!=/^Elm_Tree/, Name!=/^Chestnut_Tree/"
len(ifcopenshell.util.selector.filter_elements(ifcfile, query))
results in:
>>>
>>> from ifcopenshell.util import selector
>>> query = "IfcBuildingElement"
>>> len(ifcopenshell.util.selector.filter_elements(ifcfile, query))
724
>>> query = "IfcBuildingElement, Name!=/^Platane/, Name!=/^Bush/, Name!=/^Willow/, Name!=/^Black_Maple/, Name!=/^Nordmann/, Name!=/^Elm_Tree/, Name!=/^Chestnut_Tree/"
>>> len(ifcopenshell.util.selector.filter_elements(ifcfile, query))
576
>>>
Since it seams to work fine, use IfcPatch tool from BBIM Gui with the query from above:
IfcBuildingElement, Name!=/^Platane/, Name!=/^Bush/, Name!=/^Willow/, Name!=/^Black_Maple/, Name!=/^Nordmann/, Name!=/^Elm_Tree/, Name!=/^Chestnut_Tree/
takes just 10 minutes all together and results in a ifc of around 11.4 MB ... :-) More than 10 times faster than open the file in BBBIM Gui, deleting the elems and save the file and much more robust.


