mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
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:
committed by
Thomas Krijnen
parent
65ce0f71c4
commit
040bebedfb
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user