From 040bebedfbd2e75669817a3ae914b93e731a5450 Mon Sep 17 00:00:00 2001 From: Petru Conduraru Date: Sun, 30 Aug 2026 15:15:01 +0300 Subject: [PATCH] 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'. --- src/ifcdiff/ifcdiff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcdiff/ifcdiff.py b/src/ifcdiff/ifcdiff.py index 7fc46faba1..6a23675c0f 100755 --- a/src/ifcdiff/ifcdiff.py +++ b/src/ifcdiff/ifcdiff.py @@ -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