ifcdiff

Module Contents

class ifcdiff.DiffTerminator
give_up_diffing(level, diff_instance) bool
match(level) bool
class ifcdiff.IfcDiff(old, new, relationships=None, is_shallow=True, filter_elements=None)

Main IfcDiff application

If you are using IfcDiff as a library, this is the class you should use.

Parameters:
  • old (ifcopenshell.file.file) – IFC file object for the old model

  • new (ifcopenshell.file.file) – IFC file object for the old model

  • relationships (list[string]) – List of relationships to check. None means that only geometry is compared.

  • is_shallow (bool) – 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 (string) – 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()
diff_element(old, new)
diff_element_basic_geometry(old, new)
diff_element_relationships(old, new)
diff_representation(old_rep_id, new_rep_id)
diff_representation_item(old_item, new_item)
export(path)
get_precision()
get_representation_id(element)
get_settings(ifc)
json_dump_default(obj)
summarise_shapes(ifc, elements)
ifcdiff.parser