Skip to content

feat(ifc): a railing's PredefinedType is its own or its type's value (#1713) - #1765

Merged
DrunkOnJava merged 15 commits into
mainfrom
feat/1713-railing-predefined-type
Nov 11, 2026
Merged

DrunkOnJava merged 15 commits into
mainfrom
feat/1713-railing-predefined-type

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Revit's export gives every IfcRailing a PredefinedType; rvt-rs wrote $ on all 378 railings of the 42 models with a Revit export (#1713). This adds IFCRAILING to category_map::PREDEFINED_TYPE_ENUMERATORS with the IFC4 IfcRailingTypeEnum enumerators, so a railing takes its own or its type's "IFC Predefined Type" where that value is an enumerator of the entity — the same rule RE-45 and RE-419 already apply to slabs, coverings, shading devices, roofs, the waste, electric, fire-suppression, sanitary and air terminals, and furniture. Nothing else changes: the Railing mapping keeps no default, and category_map::predefined_type_left_out still keeps the occurrence's value off a Revit 2027 save (#1692).

Evidence

What Revit writes. The office's own IFC4 export (revit.ifc) holds 41 IFCRAILING, and rvt-rs's export of the same file holds the same 41 by Tag, each with $ in the last attribute. Tabulated by the type name (the text before the last colon of Name) and the last attribute:

type railings Revit's PredefinedType
KAI-4 10 HANDRAIL
KJO-1 22 HANDRAIL
KAI-1 1 GUARDRAIL
KAI-2 2 GUARDRAIL
KAI-3 2 GUARDRAIL
KAI-5 3 GUARDRAIL
KAI-6 1 NOTDEFINED

32 HANDRAIL, 8 GUARDRAIL, 1 NOTDEFINED, and every railing of a type has that type's value: 7 types, 7 values.

What does not decide it. Not the name: KAI-4 is HANDRAIL and KAI-1 is GUARDRAIL, and KAI-6 is NOTDEFINED. Not the host: RE-390 counts 26 of the office's railings naming a stair and 8 naming a ramp, where 32 are HANDRAIL, so a stair-hosted railing is not the rule and a ramp-hosted one is not either.

What does. A value that is constant per railing type is the type's own, which is what RE-45's "IFC Predefined Type" reads (the instance's, else its type's, ExportParameters::effective_predefined_type). RE-190 measured 40 IfcRailing export-parameter values in the office's railings' data objects, so the office's railings do carry IFC export parameters, and attach_ifc_export_overrides already attaches them to the railing as m_ifc_predefined_type; the only thing that kept the value out of the export was that IFCRAILING was not in the enumerator table, so predefined_type_for returned None and the mapping's own None was written. The mechanism is proven on other classes: RE-419 reads 872 of 884 furniture equal to Revit's with none different, and RE-190 78 of 78 waste terminals, 51 of 51 electric appliances, 40 of 40 fire-suppression terminals, 15 of 15 sanitary terminals and 1 of 1 air terminal. revit-ifc's IFCExportInfoPair keeps a value that is an enumerator of the entity and defaults the rest (RE-419, cited by class, CLEANROOM.md source 5).

What stays $. A railing with no "IFC Predefined Type" of its own or its type's, and one whose value is not an IfcRailingTypeEnum enumerator. I did not add the NOTDEFINED default RE-419 gave furniture: the only railing measured with NOTDEFINED is the office's one KAI-6, and I cannot tell whether its type carries the value or nothing, so a default would write NOTDEFINED where Revit writes HANDRAIL on any file whose export parameters are not read (Revit 2023 and earlier, where attach_ifc_export_overrides does not run). On the office that leaves at most that one railing unset; on the other 41 models the railings whose types carry no value stay unset too. A Revit 2027 save keeps none, through predefined_type_left_out.

Changes

No test is edited. tests/railing_type.rs finds the railing by the last quoted attribute of its IFCRAILING line, which is the Tag before and after this change, and the type object's Tag likewise.

Measured

One Measure run scored this change together with the four others it was drafted beside (run 43058225020, head d17975d3, base aa5dc4c6): every model, with the BIM4LCA office and housing, the 23 Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs. All 39 shards and both same-project gates passed, and the check run same-project gates on d17975d3 reads pass. 20 of 126 exports change; each changed row carries the name of the value its change writes, so the rows below are this change's alone. A second run kept both sides' exports of the 25 sample saves of 2024 to 2027, which no Revit export scores, and they were compared entity by entity with the step ids taken out (run 43073245751). A third measured the four office files with --revit-set-placement, as W7 is measured (run 43073951032). After the second read's two fixes, the stack's final head with main merged (e41d96b5 against 39826420) was measured again in full (run 43077331708, rows registered on #1636 before it was read): every row below repeats, 24 of 126 exports move and no other, and both same-project gates pass on that head.

Model IfcRailing.PredefinedType same as Revit, before after differs unset where Revit writes NOTDEFINED
Office as built 0 of 41 40 of 41 0 1
Office at permit 0 of 41 40 of 41 0 1
Timber office as built 0 of 41 38 of 41 0 3
Timber office at permit 0 of 41 38 of 41 0 3
Office terrain, concrete and timber 0 of 1 each 1 of 1 each 0 0
Housing terrain, concrete and timber 0 of 2 each 2 of 2 each 0 0
Concrete housing as built and at permit, on main with #1738 0 of 43 each 43 of 43 each 0 0
Timber housing as built and at permit, on main with #1738 0 of 56 each 56 of 56 each 0 0
  • No railing differs from Revit's on any model. The ones left are railings whose type holds no value: Revit writes NOTDEFINED there and rvt-rs writes nothing, as before.
  • The four housing rows are from the final run: feat(elements): a housing railing's type takes its name from the latest copy of its type object, which gives it Reference and Height (#1193) (RE-431) #1738, which landed between the two runs, reads the housing's railing types from their latest copy, and with it all 198 housing railings take Revit's value. On the first run's base they were unchanged.
  • No other model moves: the Revit 2025 models, the held-out pairs and every sample save are unchanged by this change.
  • FENCE is not listed: it is a railing type in IFC4X3 only, and the first draft of this change listed it (found by the second read, fixed in d8944595). A railing holding it keeps no PredefinedType.
  • Type objects, which no export scores. rvt-rs writes an IfcRailingType where Revit's exports of these models write none (the census's "typed in ours but not in Revit's export", unchanged), and a railing type now takes its value as the types of the other listed classes do: on the office 4 GUARDRAIL, 2 HANDRAIL and 1 NOTDEFINED where all 7 were NOTDEFINED. On the timber office one type whose railings hold two different values is written as two type objects, by the rule that already keys a type object by entity and predefined type, so its type objects go from 1,432 to 1,433 as built and 1,399 to 1,400 at permit. No WHERE rule finding is added on any model.

Still open

  • The 1 and 3 railings Revit writes NOTDEFINED on are left unset. Writing NOTDEFINED where a type holds no value would close them on these files, but RE-427 found the 2027 exporter leaves the attribute off, so it is not written without a measurement per release.

The four changes measured with this one are merged (#1761 to #1764). main is merged into this branch, its diff is the railing change alone (three files, checked equal to its own two commits), and that head is measured again on its own: run 43089839851, rows registered on #1636 before it is read. First draft: #1729.

Testing

  • Built, linted and tested by CI on this head; nothing was built on a workstation.
  • Verified end to end on real Revit files against Revit's own exports: the Measure runs named above, which anyone can repeat with gh workflow run measure.yml --ref main -f ref=<this head> -f base=aa5dc4c6d93e861015c10e0a0d8f9f16c8b57e71 -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true.
  • No test was added: no unit test, and no pinned count moves except where the body says so.

Audit-honesty checklist

  • Docs state what this change writes and what it leaves out
  • A changelog fragment under changelog.d/
  • No emojis, private paths or personal data in committed files
  • Limits are in the body above and in the code's doc comments

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary source, decompiled internals or NDA material. Where revit-ifc (CLEANROOM.md source 5) is cited, it is read and cited by file and class, and no code is copied.
  • No fixture with real-world personal data

Breaking changes

None.

…ng devices' Pset_ShadingDeviceCommon (#1016)

Both artifacts' observations are the ones Measure run 43058225020 wrote for
this change (IFCPROPERTYSET 6578 to 6598, IFCPROPERTYSINGLEVALUE 28569 to
28589, IFCRELDEFINESBYPROPERTIES 7107 to 7127); tools/ci/witness-verdict.py
replays both to PASS with the committed verdicts unchanged.
…ing it keeps no PredefinedType (#1713)

IfcRailingTypeEnum is HANDRAIL, GUARDRAIL, BALUSTRADE, USERDEFINED and
NOTDEFINED in IFC4; FENCE joins it in IFC4X3 only, so writing it into an
IFC4 file is invalid. A value outside the list keeps the entity's default,
which for a railing is no PredefinedType.
…nges below it landed; its delta against main is the railing change alone
@DrunkOnJava
DrunkOnJava merged commit e8a99d0 into main Nov 11, 2026
82 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1713-railing-predefined-type branch November 11, 2026 20:16
DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
…finedType is its own or its type's (#1713) (#1787)

## Summary

Revit's export gives a `PredefinedType` to every `IfcWall`, `IfcRamp`,
`IfcLightFixture` and `IfcPipeSegment`; rvt-rs wrote `NOTDEFINED` on
3,842 of 4,359 walls and `$` on all 38 ramps, 174 light fixtures and 48
pipe segments of the 42 models with a Revit export (#1713). This adds
four rows to `category_map::PREDEFINED_TYPE_ENUMERATORS` with the IFC4
enumerators of `IfcWallTypeEnum`, `IfcRampTypeEnum`,
`IfcLightFixtureTypeEnum` and `IfcPipeSegmentTypeEnum`, so an element of
one of the four takes its own or its type's "IFC Predefined Type" where
that value is an enumerator of the entity — the same rule RE-45, RE-419
and #1765 already apply to slabs, coverings, shading devices, roofs, the
terminals, furniture and railings.

Nothing else changes. The `Wall`, `ArcWall`, `Ramp`, `LightingFixture`,
`Pipe` and `Gutter` mapping rows keep their `predefined_type`
(`NOTDEFINED` for the two wall rows, `None` for the other four), so a
wall with no value keeps `NOTDEFINED` and a ramp, light fixture or pipe
segment with none keeps `$`. `category_map::predefined_type_left_out`
still keeps the occurrence's value off a Revit 2027 save, walls included
(#1692).

## Evidence

**What Revit writes, per class, on the BIM4LCA office as built**
(`revit.ifc`, Revit 2024), paired with `rvt-rs.ifc` by `Tag`:

| class | in both | Revit's `PredefinedType` | rvt-rs's today |
|---|---:|---|---|
| `IfcWall` | 607 | `PARTITIONING` 450, `SOLIDWALL` 96, `SHEAR` 53,
`PARAPET` 4, `PLUMBINGWALL` 2, `NOTDEFINED` 2 | `NOTDEFINED` 607 |
| `IfcRamp` | 5 | `STRAIGHT_RUN_RAMP` 5 | `$` 5 |
| `IfcLightFixture` | 43 | `SECURITYLIGHTING` 43 | `$` 43 |
| `IfcPipeSegment` | 12 | `GUTTER` 12 | `$` 12 |

Every value is an enumerator of its entity, and no element of the four
carries a value outside the list. The issue's widened scorer on the 42
models with a Revit export reads the same: 3,842 of 4,359 walls, all 38
ramps, all 174 light fixtures and all 48 pipe segments unset or
`NOTDEFINED` in rvt-rs where Revit writes a value, `differs` 0 on all
four classes.

**Where the value comes from.** Each class's type objects carry it: the
office's `IfcPipeSegmentType` `JSV-3` is `GUTTER`, its two
`IfcLightFixtureType` (`OPA-1`, `OPA-2`) are `SECURITYLIGHTING`, its
four `IfcRampType` `AP-ulkoluiska` are `STRAIGHT_RUN_RAMP`, and its 25
`IfcWallType` carry the wall values. That is the type's "IFC Predefined
Type", which `attach_ifc_export_overrides` already attaches to the
element as `m_ifc_predefined_type`
(`ExportParameters::effective_predefined_type`: the element's own, else
its type's). RE-45 measured the same parameter on a wall type:
`teste_export_2025` wall type 402 carries
`IFC_EXPORT_PREDEFINEDTYPE_TYPE = "CLADDING"` and Revit writes its 3
walls `IFCCOVERING .CLADDING.`, so a wall's occurrence value does fall
back to its type's. The only thing that kept the value out of the export
was that the four entities were not in the enumerator table, so
`predefined_type_for` returned `None` and the mapping's own value was
written.

**The one place the value is not the type's alone.** The office's wall
type `KS-3` has 6 walls: 4 `SOLIDWALL` and 2 `NOTDEFINED`. Revit writes
two `IfcWallType` objects for it, `SOLIDWALL` and `STANDARD`, and its
two `IfcRelDefinesByType` type the 4 `SOLIDWALL` walls by the first and
the 2 `NOTDEFINED` ones by the second. So the occurrence's value is the
element's own before its type's, which is the order
`effective_predefined_type` already takes; the 2 walls carry their own
`NOTDEFINED`. This is the case the measurement has to confirm: if the
reader does not find a wall's own value, those 2 would be written
`STANDARD` and the wall row would read `differs` 2.

**What stays as it is.** A wall with no value of its own or its type's
keeps the mapping's `NOTDEFINED`, which is what Revit writes on the 517
walls it writes `NOTDEFINED` on. A ramp, light fixture or pipe segment
with no value keeps `$`: Revit writes `NOTDEFINED` on some of the 38
ramps, and no 2027 export of those three classes is measured, so no
`NOTDEFINED` default is added to their rows (the reason RE-419's
furniture default is release-gated). A value that is no enumerator of
the entity is left to the mapping, as before.

**Why `IfcStair` and `IfcDoor` are still not listed.** The table's doc
comment says listing them would apply every door's and stair's own
predefined type as well, which is not measured. That reason does not
apply to the four: each is reached by the rows of one or two Revit
categories (Wall and ArcWall, Ramp, LightingFixture, Pipe and Gutter),
and the elements of those rows are the ones measured above.

**The CI check on Core Interior.** `tools/ci/ifc_schema_arity.py
--witness-agreement` asserts every written `IfcWall` `PredefinedType` is
in `{"NOTDEFINED"}`, the value Revit's own export of
`2024_Core_Interior_slim.ifc` writes on all 360 walls. A wall there can
only take another value if the reader finds one Revit's export does not
write, which the measurement would show as `differs`; the check cannot
move otherwise. `IfcWall` stays in `PREDEFINED_TYPE_REQUIRED`, since the
mapping's `NOTDEFINED` still fills the slot on a wall with no value.

## Changes

- `src/ifc/category_map.rs`: `IFCWALL`, `IFCRAMP`, `IFCLIGHTFIXTURE` and
`IFCPIPESEGMENT` join `PREDEFINED_TYPE_ENUMERATORS` with exactly the
IFC4 enumerators of `IfcWallTypeEnum`, `IfcRampTypeEnum`,
`IfcLightFixtureTypeEnum` and `IfcPipeSegmentTypeEnum`, in schema order;
the table's doc comment records the office's per-class counts, the
`KS-3` case and why the `IfcStair`/`IfcDoor` reason does not apply.
-
`changelog.d/fixed/1713-wall-ramp-light-fixture-pipe-predefined-type.md`:
the user-visible change.
- `docs/compatibility.md`: the sentence that reads the Core Interior
walls' `.NOTDEFINED.` as the value rvt-rs writes now says it is the
default, replaced by a wall's own or its type's value where that is an
`IfcWallTypeEnum` enumerator.
- `docs/evidence.md`: the conduit, conduit fitting and gutter row no
longer says a gutter carries no `PredefinedType`.

No test is edited. `tests/fixtures/synthetic-project.ifc` holds four
`IFCWALL .NOTDEFINED.` whose elements are synthesized and carry no
export parameter, so they keep the mapping's value.

## The rows the measurement must show

Unfiltered Measure against `main` at `aa5dc4c6d9`, with the BIM4LCA
office and housing, the 23 Revit 2025 models, Autodesk's samples,
`rac_advanced`, BIMcollab and the held-out pairs:

| class | model | same | differs | still unset |
|---|---|---:|---:|---|
| `IfcWall` | office as built and at permit, timber office, concrete and
timber housing, every model with a Revit export | 4,359 of 4,359 | 0 | 0
|
| `IfcRamp` | office as built and at permit (5 each) | 5 of 5 | 0 | the
ramps Revit writes `NOTDEFINED` on |
| `IfcLightFixture` | office as built (43) | 43 of 43 | 0 | the light
fixtures whose type rvt-rs does not join (RE-190: the permit file's 43)
|
| `IfcPipeSegment` | office as built (12) | 12 of 12 | 0 | the untyped
gutters (the concrete housing's 1) |

- The wall row is the one to read first: `differs` 0 on all 4,359, and
the 2 `KS-3` walls of the office still `NOTDEFINED`.
- The ramp, light fixture and pipe segment rows cannot read `unset` 0:
Revit writes `NOTDEFINED` on some ramps, and a light fixture or gutter
whose type rvt-rs does not join has no value to take. Those stay `$`, as
before.
- Type objects, which no export scores: a wall, ramp, light fixture and
pipe segment type now takes its value as the types of the other listed
classes do, so `type_objects_vs_ifc`'s tallies move on the office (its
25 `IfcWallType` from `NOTDEFINED` to the wall values, its 4
`IfcRampType` to `STRAIGHT_RUN_RAMP`, its 2 `IfcLightFixtureType` to
`SECURITYLIGHTING`, its `IfcPipeSegmentType` to `GUTTER`). No WHERE rule
finding is expected: `USERDEFINED` with no `ObjectType` is still left
unset by the writer (#1430).
- No other model should move: the Revit 2025 models, the held-out pairs
and the sample saves hold no export parameter on these four classes, so
their exports should be byte-identical.

## What was not checked

- Nothing was compiled, linted or run: no `cargo build`, no `cargo
clippy`, no `cargo test`. CI builds and tests this head.
- Nothing was measured. The four rows above are what the measurement
must show, not what it has shown; the `KS-3` pair is the one element of
the evidence that could make the wall row read `differs` 2, and if it
does, the wall row must come out of this change until the reader's
own-value path is shown to reach a wall.
- The reader's own-value path for a wall is inferred, not measured:
`attach_ifc_export_overrides` runs over `out.walls` and reads the
element's own `IFC_EXPORT_PREDEFINEDTYPE` before its type's, and RE-45
measured a wall type's value reaching the occurrence, but no probe has
listed a wall's own value.
- An element of another class redirected to one of the four by its
"Export to IFC As" would now take its own predefined type there. No such
element is measured on the office; the measurement would show it as
`differs`.
- `docs/release-1.0-criteria.md`'s RE-427 sentence still reads the wall
row of #1713 as open. It is left alone here: it is the line #1765 edits,
and its numbers are a Measure run this change does not have yet. It
should be updated with the measurement's row.
- The 2027 exporter's answer for ramps, light fixtures and pipe segments
is not measured, which is why no `NOTDEFINED` default is added to their
rows.

## Measured

Unfiltered Measure 43100947234 with the held-out pairs (head `4d047255`,
this change's commit `438473f9` with #1789's one commit on top, against
`main` at `e8a99d03`; rows registered on #1636 before it was read; 42
shards and both same-project gates pass). Exactly 12 of 126 exports
move, the 12 BIM4LCA files: every Revit 2025 model, held-out pair,
sample save and Core Interior is byte-identical.

| Class | Same as Revit, before | after | differs | still unset |
|---|---:|---:|---:|---:|
| `IfcWall` (12 files) | 19 of 3,861 | 3,821 of 3,861 | 0 | 40, on the
three permit files |
| `IfcRamp` (6 files) | 0 of 32 | 32 of 32 | 0 | 0 |
| `IfcLightFixture` (4 files) | 0 of 174 | 174 of 174 | 0 | 0 |
| `IfcPipeSegment` (4 files) | 0 of 48 | 48 of 48 | 0 | 0 |

- The office as built reads 607 of 607 walls, the two `KS-3` walls that
hold their own `NOTDEFINED` among them: the reader finds a wall's own
value before its type's.
- The permit office's 43 light fixtures, which this description expected
to stay unset, read as Revit's.
- No property or quantity census row moves. The type objects of the four
classes take the values and no WHERE rule finding is added.
- The enumerators equal IfcOpenShell's IFC4 schema tables for all four
classes (checked by both sessions).

## Still open

- 40 walls on the three permit files stay unset (19, 13 and 8).
- A ramp, light fixture or pipe segment with no value keeps none: Revit
writes `NOTDEFINED` on some ramps, and no 2027 export of the three is
measured.
- #1713 stays open for roofs, proxies, stairs and the doors' `TRAPDOOR`.

## Testing

- Built, linted and tested by CI on this head; nothing was built on a
workstation.
- Measure 43100947234 measured 4d04725, which holds 438473f plus
#1789's cherry-picked patch; #1787's rows are on classes #1789 does not
touch (Wall, Ramp, LightingFixture and Pipe against Floor, Furniture,
Planting and SpecialtyEquipment). The same-project gates verdict (pass)
is on that commit.
- No test was added, and no pinned count moves: Core Interior's export
is byte-identical.

## Breaking changes

None.
DrunkOnJava added a commit that referenced this pull request Nov 14, 2026
… is NOTDEFINED on Revit 2024 to 2026, as Revit's export writes it (#1713) (#2000)

## Summary

A railing with no "IFC Predefined Type" of its own or its type's is
written with the `PredefinedType` `NOTDEFINED` on Revit 2024 to 2026, as
Revit's export writes it. #1765 made a railing take its own or its
type's value; the railings with none stayed unset: 18 on the public
models with a Revit export (the BIM4LCA office files and the R2025
models 13 to 17) and 6 on the held-out pairs of 2024 to 2026, each
`NOTDEFINED` in Revit's export. The entry joins furniture, roofs,
stairs, stair flights and proxies in `NOTDEFINED_DEFAULTS`. Part of
#1713.

## Motivation

#1713's table: `IfcRailing` 378 in both, 360 same after #1765, 18 unset
where Revit writes `NOTDEFINED`. The scorer of the baseline run (Measure
[43573832361](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43573832361),
`main` at `dc6b4721`) shows every one of the 18 and no railing where
Revit writes another value: the four BIM4LCA office files 1, 1, 3 and 3
(2024), the R2025 models 13 to 17 two each (2025), the held-out pairs of
2024, 2025 and 2026 two each; the 2022 pair's two are unset too, but a
2022 file's export parameters are not read, so the default cannot tell a
railing with a value from one without, and the 2027 pair's two carry no
value in Revit's export.

## Changes

- `src/research/partition_schema_mvp/fields.rs`: `("IFCRAILING", &[2024,
2025, 2026])` in `NOTDEFINED_DEFAULTS`, with its evidence in the table's
doc comment.
- A changelog fragment.

## Testing

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

1. On the four BIM4LCA office files and the R2025 models 13 to 17,
`IfcRailing` "unset in rvt-rs" goes from 1, 1, 3, 3 and 2 each to 0 and
"same" rises by the same; "differs" and "NOTDEFINED where Revit writes
none" stay 0 on every model.
2. On the held-out pairs (counts only), the 2024, 2025 and 2026 railings
go from 2 unset to 0; the 2022 and 2027 pairs do not move.
3. The exports that move are those of 2024 to 2026 with a railing that
has no value: the models above, the held-out pairs and Autodesk's
samples of 2024 to 2026 with railings (no Revit export: listed). Every
other export is byte-identical to `main`'s; diagnostics move only in
counts the new values feed.
4. `same-project gates` pass.

- [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes;
CI runs the rest.

## Result

Measure
[43574375317](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43574375317):
`ca150450` against `main` at `dc6b4721`, unfiltered with nordic, r2025,
samples, holdout and racadv.

1. **Holds.** `IfcRailing` "unset in rvt-rs" goes to 0 and "same" rises
by the same on every model that had one: the office as built and at
permit 1 each (41 of 41), the timber office as built and at permit 3
each (41 of 41), and the R2025 models 13 to 17 two each (2 of 2).
"Differs" and "NOTDEFINED where Revit writes none" are 0 on every model,
as before.
2. **Holds.** On the held-out pairs (counts only), the 2024, 2025 and
2026 railings go from 2 unset to 0 each (2 of 2 same); the 2022 and 2027
pairs do not move.
3. **Holds, with the moves listed.** 26 of 126 exports move and 102 of
102 `diagnostics.json` files are identical: the three held-out pairs,
the four office files, the R2025 models 13 to 17, RE1 Architecture
(Revit 2025; its Revit export is IFC2X3, which has no `PredefinedType`
on a railing, so it is not scored), and 13 Autodesk samples with no
Revit export (`rac_basic`, `rac_advanced`, `rme_basic` and
`rme_advanced` of 2024, 2025 and 2026, and Snowdon Towers
architectural). The other 100 are byte-identical. The 42 scorer lines
that move are the railing rows above.
4. **Holds.** `same-project gates` pass on `ca150450`, and so does the
semantic check (1 finding in 42 models).

## Audit-honesty checklist

- [x] No claim beyond what the run will show.
- [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, and `revit-ifc`'s `IFCExportInfoPair` is cited, not quoted); no
fixtures.

## Breaking changes

None.

## Related issues

Part of #1713.
DrunkOnJava added a commit that referenced this pull request Nov 14, 2026
…t is an IFC4 enumerator, so the wall hatches of the BIM4LCA files are TRAPDOOR as in Revit's export (#1713) (#2001)

## 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](https://github.com/DrunkOnJava/rvt-rs/actions/runs/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](https://github.com/DrunkOnJava/rvt-rs/actions/runs/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

- [x] No claim beyond what the run will show.
- [x] A changelog fragment.
- [x] No private paths or emojis.

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk source; no fixtures.

## Breaking changes

None.

## Related issues

Part of #1713.
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