Repository navigation
feat(ifc): a door takes its own or its type's predefined type where it is an IFC4 enumerator, so the wall hatches of the BIM4LCA files are TRAPDOOR as in Revit's export (#1713) - #2001
Merged
Conversation
…t is an IFC4 enumerator, so the wall hatches of the BIM4LCA files are TRAPDOOR as in Revit's export (#1713)
…predefined type as a wall does (#1713)
DrunkOnJava
marked this pull request as ready for review
November 14, 2026 08:39
This was referenced Nov 14, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Nov 14, 2026
…fined type where that is an IFC4 enumerator, so the USERDEFINED proxy of each BIM4LCA file is written as in Revit's export (#1713) (#2009) ## Summary A building element proxy takes its own or its type's "IFC Predefined Type" where that is one of IFC4's `IfcBuildingElementProxyTypeEnum` enumerators, 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 carries `USERDEFINED` as its own "IFC Predefined Type" under an "Export to IFC As" of `IfcBuildingElementProxy` (probe, Measure 43588996635: element 1337778 of the housing files, 1337610 of the office), Revit's export writes `USERDEFINED` on it, and rvt-rs left it unset. A proxy with no value keeps the `NOTDEFINED` of `NOTDEFINED_DEFAULTS`. Part of #1713. Measure 43589444447 (`5e15df52` against `main`, unfiltered) moves those 12 exports and no other: - `IfcBuildingElementProxy`: 116 in both, same 104 to 116, unset 12 to 0; differs and `NOTDEFINED` where Revit writes none stay 0. Per file the proxy reads `USERDEFINED`: 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's `USERDEFINED` goes from 0 to 12 (Revit's 12) and its `NOTDEFINED` from 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: `IfcBuildingElementProxy` 116 in both, 104 same, 12 unset where Revit writes `USERDEFINED`, 0 differs, 0 `NOTDEFINED` where Revit writes none. The class was left out of `PREDEFINED_TYPE_ENUMERATORS` because 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`: `IFCBUILDINGELEMENTPROXY` and its seven enumerators in `PREDEFINED_TYPE_ENUMERATORS`, with the evidence in the table's doc comment. - A changelog fragment. ## Testing Measure [43589444447](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43589444447): `5e15df52` against `main` at `32ed4e6a`, unfiltered with nordic, r2025, samples, holdout and racadv. 1. **Holds.** The 12 unset proxies read `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. 2. **Holds.** 114 of 126 exports are identical to `main`'s, and so are all 102 `diagnostics.json` files; the 60 scorer lines that move are the proxy and proxy-type rows of the 12 files (5 each). 3. **Not shown.** A proxy whose "IFC Predefined Type" is text that is no enumerator is left unset, as before: no measured file holds one. - [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes; CI runs the rest. ## Audit-honesty checklist - [x] The Summary states each change the run showed, with its count. - [x] A changelog fragment. - [x] No private paths or emojis. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk source (the rule is Revit's measured export); no fixtures. ## Breaking changes None. ## Related issues Part of #1713.
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 door takes its own or its type's "IFC Predefined Type" where that is one of IFC4's
IfcDoorTypeEnumenumerators, as a railing, a wall, a ramp, a light fixture and a pipe segment already do (#1765, #1787). Revit's export writesTRAPDOORon 52 doors of the BIM4LCA files, the wall hatches of its familyLU-3.VSSamong them (3 on each of the four housing files, 10 on each of the four office files), andDOORon every other door of every model measured; rvt-rs wroteDOORon all. A door with no value keepsDOOR. Part of #1713.Motivation
#1713's table:
IfcDoor1,508 in both, 1,456 same, 52 differs,TRAPDOORwhere rvt-rs writesDOOR.IfcDoorwas left out ofPREDEFINED_TYPE_ENUMERATORSsince #792 because listing it would apply every door's own value as well, which was not measured. The baseline scorer run (Measure 43573832361,mainatdc6b4721) shows where that matters: the 52 are the only doors that differ on the 42 models with a Revit export, and the held-out pairs showDOORon all of theirs but the 2027 pair's, where Revit's export writes none (IfcDooris among the classes rvt-rs leaves off from Revit 2027, #1692).Changes
src/ifc/category_map.rs:("IFCDOOR", ["DOOR", "GATE", "TRAPDOOR", "USERDEFINED", "NOTDEFINED"])inPREDEFINED_TYPE_ENUMERATORS, and the doc comment says whyIfcStairalone stays out.Testing
Registered before the run. Measure unfiltered against
main, with nordic, r2025, samples, holdout and racadv:IfcDoordiffers goes from 3, 3, 3, 3 and 10, 10, 10, 10 to 0 and "same" rises by the same; on every other model "differs" and "unset" stay 0 and "same" does not move.IfcDoorTypereads Revit's on those files too: the office's 5 types withTRAPDOOR(rvt-rs{'DOOR': 95}against Revit{'DOOR': 90, 'TRAPDOOR': 5}before).DOOR(listed from the run). Every other export is byte-identical tomain's; held-out counts do not move for the worse.same-project gatespass.tools/check-local.sh: no local builds;rustfmt --checkpasses; CI runs the rest.Result
Measure 43574526160:
f5f37841againstmainatdc6b4721, unfiltered with nordic, r2025, samples, holdout and racadv. The commit after it changesdocs/compatibility.mdonly.IfcDoordiffers goes from 3, 3, 3, 3 on the housing files (74 of 74, 74 of 74, 76 of 76, 76 of 76 same) and 10, 10, 10, 10 on the office files (269 of 269, 269 of 269, 266 of 266, 266 of 266) to 0; "unset" and "NOTDEFINED where Revit writes none" stay 0.IfcDoorTypereads Revit's on all eight: the office's types go from{'DOOR': 95}against Revit's{'DOOR': 90, 'TRAPDOOR': 5}to{'DOOR': 90, 'TRAPDOOR': 5}, and the housing's from{'DOOR': 31}against{'DOOR': 29, 'TRAPDOOR': 2}to Revit's (the other files alike).diagnostics.jsonfiles are identical, so no other door anywhere carries a value other thanDOOR.same-project gatespass onf5f37841, and so does the semantic check (1 finding in 42 models).Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.
Related issues
Part of #1713.