ifcpatch.recipes.ExtractElements
¶
Module Contents¶
- class ifcpatch.recipes.ExtractElements.Patcher(src: str, file: ifcopenshell.file, logger: logging.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(element: ifcopenshell.entity_instance, new_element: ifcopenshell.entity_instance) None ¶
element is IfcObjectDefinition
- add_element(element: ifcopenshell.entity_instance) None ¶
- add_spatial_structures(element: ifcopenshell.entity_instance, new_element: ifcopenshell.entity_instance) None ¶
element is IfcElement
- append_asset(element: ifcopenshell.entity_instance) ifcopenshell.entity_instance | None ¶
- create_spatial_tree() None ¶
- patch()¶
- file¶
- logger¶
- query¶
- src¶