fix(ifcdiff): resolve elements by GlobalId via by_guid, not by_id

diff() looked up common elements with self.old.by_id(global_id) /
self.new.by_id(global_id), passing a GlobalId string into a method
that expects a STEP integer id. On v0.8.0 file.by_id() was a Python
wrapper that transparently dispatched strings to by_guid(), so the
bug was silent. v0.9.0's file class binds by_id directly to the
C++ instance_by_id(int), so it now raises
TypeError: in method 'file_by_id', argument 2 of type 'int'.
This commit is contained in:
Petru Conduraru
2026-08-30 15:15:01 +03:00
committed by Thomas Krijnen
parent 65ce0f71c4
commit 040bebedfb
+2 -2
View File
@@ -152,8 +152,8 @@ class IfcDiff:
total_diffed += 1
if total_diffed % 250 == 0:
print("{}/{} diffed ...".format(total_diffed, total_same_elements), end="\r", flush=True)
old = self.old.by_id(global_id)
new = self.new.by_id(global_id)
old = self.old.by_guid(global_id)
new = self.new.by_guid(global_id)
if should_check_attributes:
if self.diff_element(old, new) and self.is_shallow:
continue