You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IFC export: the office at permit (timber) writes one mullion type as 6 type objects with one GlobalId (24 IfcRoot.UR1 findings) #1667
The BIM4LCA office at permit (timber) is the one Measure model whose export fails IfcOpenShell's validation: schema.txt reads validate: findings 24, all IfcRoot.UR1 ("The attribute GlobalId should be unique"). One mullion type, Rectangular Mullion:150 x 50 mm alumiini maalattu (Tag 1907093), is written as 6 IfcMemberType objects with the same GlobalId; the 12 IfcPropertySets and 6 IfcRelDefinesByType that take their GlobalIds from it repeat too (6 + 12 + 6 = 24). Every other model of the Measure set validates with 0 findings.
It is not new: the same 24 findings are in every Measure run read since #1650 (the base and the head of each), so it is on main and nothing a recent change did.
Why
A duplicated GlobalId is invalid IFC4 (IfcRoot.UR1), and importers that key objects by GlobalId merge or drop the later ones. Revit's own export has one GlobalId per object.
Where it comes from
src/ifc/step_writer.rs, in the type-object loop: a type object takes Revit's GlobalId when it has one that no earlier object used (used_gids.insert), and otherwise the writer's own gid(&["type", entity_name, tag]). That fallback is not entered in used_gids and does not depend on which group it is, so two groups of the same type and entity (RE-167 writes a type object per original symbol; type_objects keys a group by type, entity, predefined type and the symbol's GlobalId) that both fall back get one GlobalId. The sets and relationships derive theirs from the type's, so they repeat with it.
Done when
Every type object has a GlobalId of its own: validate reads 0 findings on every Measure model, the timber permit office included.
The exports of the other models are byte-identical (a type object that already had a unique GlobalId keeps it).
If Revit's export holds fewer type objects for this type than rvt-rs writes (6 here), the report says how many and why, and type_objects is narrowed only where Revit's export shows the grouping is wrong.
The change and its rows, registered before it is run on anything.
The change (fix/1667-unique-type-global-ids, src/ifc/step_writer.rs): in the type-object loop, a type object with no Revit GlobalId left to take gets the writer's fallback gid(&["type", entity_name, tag]) only if no earlier object used it; a later one takes gid(&["type", entity_name, tag, <its index>]). The fallback is entered in used_gids, which it was not.
Rows, on the unfiltered Measure of the change against main (107 models, every scorer):
nordic-office-timber-permit: validate reads 0 findings (24 on main), and the six IfcMemberType of Tag 1907093 have six different GlobalIds.
Every other export is byte-identical (ifc.sha256 of the other 106 does not move), since no other model has a repeated type GlobalId (their validate reads 0 on main).
The timber permit office keeps every object it wrote: its entity counts by class are unchanged, only GlobalIds differ (global_ids_vs_ifc equal on every element, and the type objects' count the same).
If 1 fails, the repeat comes from a second place and the report names it; if 2 or 3 fails, the guard changes something it should not and is narrowed.
Result of Measure 42934767155 (fix/1667-unique-type-global-ids at 0ef5551 against main; 100 models with results on each side), against the rows registered above:
Held. nordic-office-timber-permit: validate reads findings 0 (24 on main). The run keeps no IFC, so "six different GlobalIds" is read as the validator finding no repeated GlobalId anywhere in the file.
Held. One export moved, the timber permit office; the other 99 are byte-identical, and no scorer line of any other model changed.
Held on its substance, with one scorer line I did not foresee. Total entities (76,041), by_ifc_type, the whole diagnostics, global_ids_vs_ifc and class_sets_vs_ifc are identical. type_objects_vs_ifc.txt counts distinct GlobalIds and reads 1391 on main and 1397 here: the +6 is the repeats becoming distinct, not new objects. "The type objects' count the same" holds for the objects and not for that line.
A correction to the issue text: 7 IfcMemberType shared the GlobalId, not 6; IfcOpenShell flags each repeat after the first, which is why 6 + 12 + 6 findings (the sets and relationships repeat with their type).
Activity
feat(ifc): an element still drawn as its record's box says why its sa…
DrunkOnJava commentedon Nov 11, 2026
The change and its rows, registered before it is run on anything.
The change (
fix/1667-unique-type-global-ids,src/ifc/step_writer.rs): in the type-object loop, a type object with no Revit GlobalId left to take gets the writer's fallbackgid(&["type", entity_name, tag])only if no earlier object used it; a later one takesgid(&["type", entity_name, tag, <its index>]). The fallback is entered inused_gids, which it was not.Rows, on the unfiltered Measure of the change against
main(107 models, every scorer):nordic-office-timber-permit:validatereads 0 findings (24 onmain), and the sixIfcMemberTypeof Tag 1907093 have six different GlobalIds.ifc.sha256of the other 106 does not move), since no other model has a repeated type GlobalId (theirvalidatereads 0 onmain).global_ids_vs_ifcequal on every element, and the type objects' count the same).If 1 fails, the repeat comes from a second place and the report names it; if 2 or 3 fails, the guard changes something it should not and is narrowed.
DrunkOnJava commentedon Nov 11, 2026
Result of Measure 42934767155 (
fix/1667-unique-type-global-idsat 0ef5551 against main; 100 models with results on each side), against the rows registered above:nordic-office-timber-permit:validatereadsfindings 0(24 on main). The run keeps no IFC, so "six different GlobalIds" is read as the validator finding no repeated GlobalId anywhere in the file.by_ifc_type, the whole diagnostics,global_ids_vs_ifcandclass_sets_vs_ifcare identical.type_objects_vs_ifc.txtcounts distinct GlobalIds and reads 1391 on main and 1397 here: the +6 is the repeats becoming distinct, not new objects. "The type objects' count the same" holds for the objects and not for that line.A correction to the issue text: 7
IfcMemberTypeshared the GlobalId, not 6; IfcOpenShell flags each repeat after the first, which is why 6 + 12 + 6 findings (the sets and relationships repeat with their type).docs(ifc): the type GlobalId comment and its changelog entry say 7 mu…
feat(ifc): a box body the saved-mesh pass did not take as a candidate…
fix(ifc): every type object has a GlobalId of its own, so one type re…