Repository navigation
feat(ifc): a building element proxy takes its own or its type's predefined type where that is an IFC4 enumerator, so the USERDEFINED proxy of each BIM4LCA file is written as in Revit's export (#1713) - #2009
Merged
Conversation
…fined type where that is an IFC4 enumerator, so the USERDEFINED proxy of each BIM4LCA file is written as in Revit's export (#1713)
DrunkOnJava
marked this pull request as ready for review
November 14, 2026 11:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A building element proxy takes its own or its type's "IFC Predefined Type" where that is one of IFC4's
IfcBuildingElementProxyTypeEnumenumerators, as a railing, a wall, a ramp, a light fixture, a pipe segment and a door already do (#1765, #1787, #2001). In each of the twelve BIM4LCA files (six housing, six office) one proxy carriesUSERDEFINEDas its own "IFC Predefined Type" under an "Export to IFC As" ofIfcBuildingElementProxy(probe, Measure 43588996635: element 1337778 of the housing files, 1337610 of the office), Revit's export writesUSERDEFINEDon it, and rvt-rs left it unset. A proxy with no value keeps theNOTDEFINEDofNOTDEFINED_DEFAULTS. Part of #1713. Measure 43589444447 (5e15df52againstmain, unfiltered) moves those 12 exports and no other:IfcBuildingElementProxy: 116 in both, same 104 to 116, unset 12 to 0; differs andNOTDEFINEDwhere Revit writes none stay 0. Per file the proxy readsUSERDEFINED: same 2 to 3 of 3 on the four large housing files, 0 to 1 of 1 on the two housing terrain files, 11 to 12 of 12 on the office as built and at permit, 10 to 11 of 11 on its two timber files, 0 to 1 of 1 on its two terrain files.IfcBuildingElementProxyType: each type object follows its proxy, so rvt-rs'sUSERDEFINEDgoes from 0 to 12 (Revit's 12) and itsNOTDEFINEDfrom 54 to 42 (Revit's 36; the 6 type objects more than Revit's are not this change).diagnostics.json: 102 of 102 identical. The held-out pairs and every other export are identical.Motivation
#1713's census after #2002:
IfcBuildingElementProxy116 in both, 104 same, 12 unset where Revit writesUSERDEFINED, 0 differs, 0NOTDEFINEDwhere Revit writes none. The class was left out ofPREDEFINED_TYPE_ENUMERATORSbecause listing a class applies the own value of every element a category maps to it, which was not measured for proxies.Changes
src/ifc/category_map.rs:IFCBUILDINGELEMENTPROXYand its seven enumerators inPREDEFINED_TYPE_ENUMERATORS, with the evidence in the table's doc comment.Testing
Measure 43589444447:
5e15df52againstmainat32ed4e6a, unfiltered with nordic, r2025, samples, holdout and racadv.USERDEFINED, equal to Revit's; no proxy of the 42 models, nor of the held-out pairs (counts only: 48 of 48 same, before and after), changes value otherwise.main's, and so are all 102diagnostics.jsonfiles; the 60 scorer lines that move are the proxy and proxy-type rows of the 12 files (5 each).tools/check-local.sh: no local builds;rustfmt --checkpasses; CI runs the rest.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.
Related issues
Part of #1713.