ifcdiff
¶
Module Contents¶
- class ifcdiff.IfcDiff(old: ifcopenshell.file, new: ifcopenshell.file, relationships: list[RELATIONSHIP_TYPE] | None = None, is_shallow: bool = True, filter_elements: str | None = None)¶
Main IfcDiff application
If you are using IfcDiff as a library, this is the class you should use.
- Parameters:
old – IFC file object for the old model
new – IFC file object for the new model
relationships – List of relationships to check. None means that only geometry is compared. See RELATIONSHIP_TYPE for available relationships.
is_shallow – True if you want only the first difference to be listed. False if you want all differences to be checked. Choosing False means that comparisons will take longer.
filter_elements – An IFC filter query if you only want to compare a subset of elements. For example:
IfcWall
to only compare walls.
Example:
from ifcdiff import IfcDiff ifc_diff = IfcDiff("/path/to/old.ifc", "/path/to/new.ifc", "/path/to/diff.json") ifc_diff.diff() print(ifc_diff.change_register) ifc_diff.export()
- diff() None ¶
- diff_element(old, new)¶
- diff_element_basic_geometry(old, new)¶
- diff_element_relationships(old, new)¶
- diff_representation(old_rep_id: int, new_rep_id: int) bool ¶
- diff_representation_item(old_item: ifcopenshell.entity_instance, new_item: ifcopenshell.entity_instance) bool ¶
- export(path: str) None ¶
- get_precision() float ¶
- get_representation_id(element: ifcopenshell.entity_instance) int | None ¶
- get_settings(ifc: ifcopenshell.file) ifcopenshell.geom.settings ¶
- json_dump_default(obj)¶
- summarise_shapes(ifc: ifcopenshell.file, elements: list[ifcopenshell.entity_instance]) dict[str, dict[str, Any]] ¶
- added_elements: set[ifcopenshell.entity_instance]¶
- change_register: dict[str, dict[str, Any]]¶
- deleted_elements: set[ifcopenshell.entity_instance]¶
- filter_elements¶
- is_shallow¶
- new¶
- old¶
- precision = 0.0001¶
- relationships¶
- representation_ids¶
- ifcdiff.RELATIONSHIP_TYPE¶
- ifcdiff.parser¶