ifcpatch.recipes.ExtractElements#

Module Contents#

class ifcpatch.recipes.ExtractElements.Patcher(src, file, logger, query: str = 'IfcWall')#

Extract certain elements into a new model

Extract a subset of elements from an existing IFC data set and save it to a new IFC file. For example, you might want to extract only the walls in a model and save it as a new model.

Parameters

query (str) – A query to select the subset of IFC elements.

Example:

# Extract all walls
ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "ExtractElements", "arguments": ["IfcWall"]})

# Extract all slabs
ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "ExtractElements", "arguments": ["IfcSlab"]})

# Extract all walls and slabs
ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "ExtractElements", "arguments": ["IfcWall, IfcSlab"]})
add_decomposition_parents(self, element, new_element) None#
add_element(self, element) None#
append_asset(self, element) Union[ifcopenshell.entity_instance, None]#
create_spatial_tree(self) None#
patch(self)#