ifcpatch.recipes.MergeProject

Module Contents

class ifcpatch.recipes.MergeProject.Patcher(src: str, file: ifcopenshell.file, logger: logging.Logger, filepath: str)

Merge two IFC models into one

Note that other than combining the two IfcProject elements into one, no further processing will be done. This means that you may end up with duplicate spatial hierarchies (i.e. 2 sites, 2 buildings, etc).

Will automatically convert length units in the second model to the main model’s unit before merging.

Parameters:

filepath (str) – The filepath of the second IFC model to merge into the first. The first model is already specified as the input to IfcPatch.

Example:

ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "MergeProject", "arguments": ["/path/to/model2.ifc"]})
get_equivalent_existing_context(added_context: ifcopenshell.entity_instance) ifcopenshell.entity_instance | None
get_unit_name(ifc_file: ifcopenshell.file) str
patch()
reuse_existing_contexts()