MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / diff_element

Method diff_element

src/ifcdiff/ifcdiff.py:281–291  ·  view source on GitHub ↗
(self, old, new)

Source from the content-addressed store, hash-verified

279 return 1e-4
280
281 def diff_element(self, old, new):
282 diff = DeepDiff(
283 [a for a in old if not isinstance(a, (ifcopenshell.entity_instance, tuple))],
284 [a for a in new if not isinstance(a, (ifcopenshell.entity_instance, tuple))],
285 math_epsilon=self.precision,
286 ignore_string_type_changes=True,
287 ignore_numeric_type_changes=True,
288 )
289 if diff and new.GlobalId:
290 self.change_register.setdefault(new.GlobalId, {}).update({"attributes_changed": True})
291 return True
292
293 def diff_element_relationships(self, old, new):
294 if not self.relationships:

Callers 1

diffMethod · 0.95

Calls 2

setdefaultMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected