Skip to content

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
DrunkOnJava merged 2 commits into
mainfrom
fix/1713-door-predefined-type
Nov 14, 2026

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

A door takes its own or its type's "IFC Predefined Type" where that is one of IFC4's IfcDoorTypeEnum enumerators, as a railing, a wall, a ramp, a light fixture and a pipe segment already do (#1765, #1787). Revit's export writes TRAPDOOR on 52 doors of the BIM4LCA files, the wall hatches of its family LU-3.VSS among them (3 on each of the four housing files, 10 on each of the four office files), and DOOR on every other door of every model measured; rvt-rs wrote DOOR on all. A door with no value keeps DOOR. Part of #1713.

Motivation

#1713's table: IfcDoor 1,508 in both, 1,456 same, 52 differs, TRAPDOOR where rvt-rs writes DOOR. IfcDoor was left out of PREDEFINED_TYPE_ENUMERATORS since #792 because listing it would apply every door's own value as well, which was not measured. The baseline scorer run (Measure 43573832361, main at dc6b4721) 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 show DOOR on all of theirs but the 2027 pair's, where Revit's export writes none (IfcDoor is among the classes rvt-rs leaves off from Revit 2027, #1692).

Changes

  • src/ifc/category_map.rs: ("IFCDOOR", ["DOOR", "GATE", "TRAPDOOR", "USERDEFINED", "NOTDEFINED"]) in PREDEFINED_TYPE_ENUMERATORS, and the doc comment says why IfcStair alone stays out.
  • A changelog fragment.

Testing

Registered before the run. Measure unfiltered against main, with nordic, r2025, samples, holdout and racadv:

  1. On the four BIM4LCA housing files and the four office files, IfcDoor differs 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.
  2. IfcDoorType reads Revit's on those files too: the office's 5 types with TRAPDOOR (rvt-rs {'DOOR': 95} against Revit {'DOOR': 90, 'TRAPDOOR': 5} before).
  3. The exports that move are the eight BIM4LCA files and any model with a door whose value is an enumerator other than DOOR (listed from the run). Every other export is byte-identical to main's; held-out counts do not move for the worse.
  4. same-project gates pass.
  • tools/check-local.sh: no local builds; rustfmt --check passes; CI runs the rest.

Result

Measure 43574526160: f5f37841 against main at dc6b4721, unfiltered with nordic, r2025, samples, holdout and racadv. The commit after it changes docs/compatibility.md only.

  1. Holds. IfcDoor differs 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.
  2. Holds. IfcDoorType reads 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).
  3. Holds. Only the eight BIM4LCA files move: 118 of 126 exports are byte-identical (the R2025 models, the held-out pairs, the samples, RE1, Core Interior and the terrain files among them) and 102 of 102 diagnostics.json files are identical, so no other door anywhere carries a value other than DOOR.
  4. Holds. same-project gates pass on f5f37841, and so does the semantic check (1 finding in 42 models).

Audit-honesty checklist

  • No claim beyond what the run will show.
  • A changelog fragment.
  • No private paths or emojis.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk source; no fixtures.

Breaking changes

None.

Related issues

Part of #1713.

…t is an IFC4 enumerator, so the wall hatches of the BIM4LCA files are TRAPDOOR as in Revit's export (#1713)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 14, 2026 08:39
@DrunkOnJava
DrunkOnJava merged commit e8f2eef into main Nov 14, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1713-door-predefined-type branch November 14, 2026 08:54
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant