ifcdiff#

Module Contents#

ifcdiff.parser#
class ifcdiff.DiffTerminator#
give_up_diffing(self, level, diff_instance) bool#
match(self, 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(self)#
diff_element(self, old, new)#
diff_element_basic_geometry(self, old, new)#
diff_element_relationships(self, old, new)#
diff_representation(self, old_rep_id, new_rep_id)#
diff_representation_item(self, old_item, new_item)#
export(self, path)#
get_precision(self)#
get_representation_id(self, element)#
get_settings(self, ifc)#
json_dump_default(self, obj)#
summarise_shapes(self, ifc, elements)#