Skip to content

fix(ifc): fixtures and appliances follow their Export to IFC As, and on 2024 an export value belongs to its data object (#792) (RE-190) - #804

Merged
DrunkOnJava merged 7 commits into
mainfrom
fix/792-export-values
Oct 19, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
fix/792-export-values

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Waste, fire suppression, sanitary and air terminals and electric appliances now export as the entity their type's "Export to IFC As" names, with the type's predefined type, as Revit's 2024 export writes them on the BIM4LCA office. On Revit 2024 and later, an export value now belongs to the data object that holds it. Report: RE-190. Refs #792.

Motivation

After RE-188, #792's remaining class mismatches on the office are elements that follow their type's value in Revit's export but not in rvt-rs's: 78 waste terminals, 51 electric appliances, 40 fire suppression terminals, 15 wash-hand basins and an air terminal. On the permit file, RE-45's owner rule also gave IfcSpace values to doors, curtain walls, sketch lines and five drains. The drains' wrong IfcSpace hid their types' IfcWasteTerminalType, and their type was then written twice under one GlobalId, which is four schema-validation findings.

Changes

  • src/ifc/category_map.rs: the five entities join EXPORT_OVERRIDE_TARGETS, each defaulting to NOTDEFINED. Their IFC4 enumerators are added to PREDEFINED_TYPE_ENUMERATORS.
  • src/ifc/step_writer.rs: IfcWasteTerminalType and IfcFireSuppressionTerminalType.
  • src/ifc/export_content.rs: waste and fire suppression terminals are distribution elements, and a room's space contains the new entities (ROOM_CONTENT_TYPES).
  • src/partition_ifc_export_overrides.rs: find_export_parameters_in_objects. On 2024 and later an entry belongs to the data object (RE-153) whose payload holds it. 2023 and earlier keep the header rule.
  • examples/probe_re45_ifc_export_parameters.rs: an entries section with each entry's owner under both rules, and a tally.
  • tools/re/class_sets_vs_ifc.py:
    • each mismatched group's Revit category, PredefinedType and type object;
    • the RE-45 value rvt-rs read.
  • tools/re/export_parameters_vs_ifc.py: a new probe scorer.
  • tools/re/ports_vs_ifc.py: prints its first ten schema findings.
  • reports/element-framing/RE-190-office-export-values.md, CHANGELOG, README, docs/status.md, docs/supported-profile.md, docs/support-matrix.json.

Testing

Measure A/B against main (05cecf9), on GitHub's runners:

  • 39174180136 (-f nordic=true, the RE-45 probe and scorer):

    class (Revit's) as built permit
    IfcWasteTerminal 0 → 78 of 78 0 → 78 of 78
    IfcElectricAppliance 0 → 51 of 51 0 → 31 of 51
    IfcFireSuppressionTerminal 0 → 40 of 40 0 → 40 of 40
    IfcSanitaryTerminal 129 → 144 of 144 129 → 144 of 144
    IfcAirTerminal 0 → 1 of 1 0 → 1 of 1
    type entity is Revit's 12,170 → 12,355 of 12,358 11,761 → 11,926 of 11,929
    • On the permit file, 20 appliances stay proxies: rvt-rs joins no type to them, as on main.
    • Both exports have 0 schema-validation findings; the permit's 4 are gone.
    • Storeys and room containment are unchanged.
    • The six reference models are byte-identical. On Core Interior the two owner rules agree on all 48 entries.
  • 39174182276 (-f samples=true): the six reference IFCs and the samples' 147 diagnostics, schema and rvt-info outputs are unchanged.

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • If a limitation was resolved, the docs are updated: README row, status, supported profile, support matrix
  • If a new limitation was introduced, it is documented: RE-190 §5 lists what still differs
  • Commit messages describe what changed and why
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files
  • Reverse-engineering finding: probe under examples/ and the dated report RE-190

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0
  • This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content

Contributor declaration (CLEANROOM.md). The changes are based on byte observations of the BIM4LCA office's Revit files compared with Revit's own IFC exports of them (accepted source 1), on buildingSMART's IFC4 enumerations (source 4), and on reading Autodesk's open-source exporter revit-ifc (source 5) for the order in which it looks up an element's and its type's export value (ExporterUtil.GetIFCExportElementParameterInfo). No revit-ifc code is copied or translated.

Breaking changes

None. find_export_parameters keeps its signature; find_export_parameters_in_objects is new.


Note

Medium Risk
Changes IFC entity assignment, room containment, and partition parsing ownership on 2024+ files; reference models stay byte-identical but real projects may see different classes where export overrides apply.

Overview
Fixes IFC classing for office fixtures/appliances and corrects who owns “Export to IFC As” on Revit 2024+.

rvt-rs now honors type-level Export to IFC As for five MEP/furniture entities (IfcWasteTerminal, IfcFireSuppressionTerminal, IfcSanitaryTerminal, IfcAirTerminal, IfcElectricAppliance), including IFC4 predefined types, type objects for waste/fire terminals, distribution ports, and room-space containment—matching Revit on the BIM4LCA office (185 elements as-built).

On Revit 2024 and later, export-parameter bytes are attributed to the RE-153 data object that contains them instead of the nearest prior element-data header; 2023 and earlier keep the header window rule. That stops mis-owned IfcSpace values (e.g. on drains/doors) that blocked waste-terminal typing and caused duplicate type GlobalIds.

Research tooling adds export_parameters_vs_ifc.py, richer RE-45 probe owner comparison, and clearer class-set mismatch diagnostics; docs and RE-190 report capture measured results.

Reviewed by Cursor Bugbot for commit e3fb8d45871acaae0e3f61a68125edf5d06e39cc. Configure here.

…n the office: waste, fire suppression, sanitary and air terminals and electric appliances (#792)
… terminals and electric appliances, as Revit's export does (#792)
… object that holds it (#792)

RE-45 gave an entry to the last element-data header within 0x800 bytes
before it. On the BIM4LCA office's building permit file that rule handed
IfcSpace entries to doors, curtain walls, sketch lines and plumbing fixtures;
on five drains the misread own value hid their types' IfcWasteTerminalType,
and their type was written twice under one GlobalId (4 schema findings).
From 2024 an element's data is a data object whose Adler-32 verifies
(RE-153), so the entry's owner is the object whose payload holds it. The
RE-45 probe prints both owners for every entry and counts where they differ.
…t values (#792)

Measure run 39174180136 against main: on the BIM4LCA office as built 185
elements now have Revit's class (78 waste terminals, 51 electric
appliances, 40 fire suppression terminals, 15 wash-hand basins, an air
terminal), 165 on the permit file, where rvt-rs types none of 20
appliances. The type entity is Revit's on 12,355 of 12,358 elements (was
12,170). Both exports pass IfcOpenShell's validation with no finding, and
the six reference models are byte-identical.
@DrunkOnJava
DrunkOnJava force-pushed the fix/792-export-values branch from e3fb8d4 to c75bc8a Compare October 18, 2026 23:45
@DrunkOnJava
DrunkOnJava merged commit 9c39903 into main Oct 19, 2026
26 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/792-export-values branch October 19, 2026 00:14
DrunkOnJava added a commit that referenced this pull request Oct 19, 2026
…so its elements keep their type (#807) (RE-145) (#809)

## Summary

Two name readers dropped a name whose copies in different partitions
differed, so the elements joined through those names got no type. They
now take the latest partition's copy, following #800's rule (RE-145):
`partition_names::compute_element_names`, the family and type name index
family instances use, and `type_data_names`, the system families' type
names. Closes #807.

## Motivation

On the BIM4LCA office's building-permit file, rvt-rs typed none of 345
columns, 52 doors, 43 light fixtures and 20 appliances, nor 4 walls and
8 slabs (#807). On the as-built file of the same office it types them
all. Every family and type on the permit file has an older copy with its
Finnish name and a newer one with its English name, the copies #803
handled for rooms.

## Changes

- `src/partition_names.rs`: `unique_entries` takes `(partition, entry)`
pairs and keeps each ElementId's entry from its latest partition, with
none where that partition's entries disagree. `compute_element_names`
tags each entry with its stream's number.
- `src/partition_schema_mvp.rs`: `type_data_names` does the same through
#800's accumulator.
- `src/partition_room_parameters.rs`: that accumulator (`LatestCopy`,
`partition_number`) becomes crate-visible and gains `into_options`.
- `CHANGELOG.md`: a Fixed entry.

## Testing

Measure, step by step on the permit file (`-f nordic=true`), runs
[39176604593](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39176604593)
and
[39178084272](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39178084272):

- **`type_data_names`:** 4 walls and 8 slabs gain their types. Their
names now equal Revit's, and 8 more layer sets are written, all within
0.001 ft of Revit's.
- **`compute_element_names`:** the 465 untyped elements become 0, and
the untyped set equals the as-built file's: curtain walls 220, ramps 4,
slabs 21, pipe segments 12, proxies 9. Names equal to Revit's:
  - columns: 0 → 345 of 345;
  - doors: 216 → 268 of 269;
  - light fixtures: 0 → 43 of 43.

  Other measures on the permit file:
- elements with materials: 1,400 → 1,803, the same set as Revit's on
1,240 → 1,586;
  - ports: 24 → 67, Revit's count;
- property values equal to Revit's: 12,527 → 12,630; door `Reference`
equal on 268, door `IsExternal` on 254.
- **Everything else is unchanged.** The as-built file and the six
reference models export byte-identically. In the samples runs
([39176605767](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39176605767),
[39178085911](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39178085911)),
all 64 hashed exports are identical (#806's hashes).
- **Final A/B against `main` (9c39903, which includes #804):** run
[39180316648](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39180316648).
- **Permit:** the 20 newly typed appliances take their types'
`IfcElectricApplianceType`, so electric appliances with Revit's class go
from 31 to 51 of 51. Elements whose type entity is Revit's go from
11,926 of 11,929 to 12,400 of 12,403, and their type GlobalIds from
11,873 to 12,002.
- **Unchanged:** the as-built file and the six reference models are
byte-identical.

Not changed here: the eight newly typed permit slabs show the slab
`IsExternal` mismatch already present on that file (`different` 9 → 17):
their types' Function differs from Revit's `IsExternal` on those slabs
(RE-158's floor rule). No unit tests, by the repository's rule.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files
- N/A: applies RE-145's measured rule; no new format finding.

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0
- [x] This PR contains no Autodesk proprietary source, decompiled
internals, or NDA'd SDK content
- [x] No fixtures

## Breaking changes

None.
@DrunkOnJava DrunkOnJava mentioned this pull request Oct 19, 2026
6 tasks done
DrunkOnJava added a commit that referenced this pull request Oct 19, 2026
## Summary

Prepare v0.6.0. Merging this is not the release: the release is the signed `v0.6.0` tag on the merged commit, after the maintainer's go-ahead. This stays a draft until then.

## Motivation

Since 0.5.1, `main` has:

- **IFC4's own property sets (#822):** the IFC2X3 sets 0.5 took from Revit's exports of the RE1 models are gone or moved to where IFC4 and Revit's own IFC4 export put them (#825, #829, #833), and Measure checks every export's standard property sets against buildingSMART's published IFC4 property set definitions (#826). That is rvt-rs's own check: buildingSMART's Validation Service has not been run on the exports, and quantity sets are not checked.
- **More of what Revit's exporter writes:** parameters named for an IFC4 property set's property (RE-194, #815, #817/#821), each element's `IsExternal` (RE-193, #814), a type's Fire Rating (#830), a door's overall size (#788), Revit 2024 Areas as spaces (#811), port types and electrical flow directions (#832), rooms with no number (#818), pieces' property sets (#819), a room's floor finish in IFC4's set (#820).
- **Older and newer releases, experimentally:** Revit 2015 to 2022 (#742) and 2027 (#740) element records.
- **Fixes:** Export to IFC As on fixtures, stairs, doors, curtain walls and wall sweeps (#796, #804, #812, #813), the latest copy of an element's or type's data (#803, #809), declared ElementIds (#797), diagnostics naming the file, not its folders (#785), the browser viewer's wasm32 string-length panic (#835), and `rvt-inspect`, `rvt-corpus doctor` and the viewer's File Status taking Revit 2015 and 2027 as releases rvt-rs reads (#838).
- **CI and release:** IfcOpenShell 0.9.0.post1 (#795), Rust installed with rustup (#793), a tag publishes nothing until the maintainer approves it (#786, #787), and Measure's office, R2025, paired-probe and per-sample hashing (#790, #799, #805, #806).

## Changes

- **Versions 0.5.1 → 0.6.0** in the nine files that carry them: `rvt`, `rvt-py` and its pin, `rvt-wasm`, the `stream_evidence` pin, `CITATION.cff` (with `date-released`), `.release-please-manifest.json`, `viewer/package.json` and both lockfiles' workspace entries.
- **CHANGELOG:** `[0.6.0] — 2026-10-19`, with an introduction, **Upgrading from 0.5** (the property sets that moved, the public API changes, the releases that now export elements) and the outside contributors credited: puzzbobb (#740, #742, #798), Erry91 (#788) and MadsHolten (#835). The section's headings were already single; its 41 entries are all kept, with #835's and #838's added. Its introduction says the property sets match buildingSMART's published IFC4 definitions by rvt-rs's own check, as does the README's release summary.
- **README:** "Release 0.6.0 and main" names v0.6.0 and summarises what it added. The lines that said `main` reads Revit 2015 to 2022 and 2027 now say experimental (since 0.6.0). The opening and "Not yet" lines name those releases, and so does the capability table. The bullet list of what 0.5.0 added is gone; #832 had put 0.6.0's port types in it. As Codex found, the IFC4 export row, the viewer paragraph and the decoder-work paragraph also said 2022 and earlier export only the scaffold, and the by-input table skipped 2014; they name 2015 to 2022, 2026 and 2027 now.
- **Witnesses:** the IFC header carries the version, so both Core Interior `rvt-rs.json` observations and their verdicts are refreshed from this pull request's CI run.

## Testing

- CI on this pull request, the witness replays included.
- Measure on `main` at 23a9d76, which is everything in this release but #835's wasm32-only fix and #838's CLI and viewer version range, neither of which changes an export: run [39273188597](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39273188597). All 89 exports (the reference models, both BIM4LCA office files, Autodesk's 58 sample projects and the 23 R2025 models) have no finding in Measure's IFC4 property set check (#826, against buildingSMART's published definitions), and IfcOpenShell's schema validation finds nothing on any of the 89; none was too large to validate.
- Witnesses: both Core Interior observations and verdicts are taken from this pull request's CI run 39275014518; only `witness_version` and the verdict hashes differ, and CI's replay on b82c0c3 passes.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in committed files

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0
- [x] This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content

## Breaking changes

See **Upgrading from 0.5** in the CHANGELOG: standard property sets moved to IFC4's, and five public API changes.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Version and documentation-only release prep with no runtime code changes in this PR.
> 
> **Overview**
> **Bumps the workspace from 0.5.1 to 0.6.0** across `Cargo.toml`, `rvt-py` / `rvt-wasm` / `stream_evidence` pins, lockfiles, `viewer/package.json`, `.release-please-manifest.json`, and `CITATION.cff` (release date 2026-10-19).
> 
> **Documents the release:** adds the `[0.6.0]` section to `CHANGELOG.md` (IFC4 property sets, broader Revit export parity, experimental 2015–2022/2027 element export, wasm viewer fix, and **Upgrading from 0.5** breaking notes). **README** now treats v0.6.0 as the current release—updates the support matrix and “Release 0.6.0 and main” to describe shipped capabilities instead of the old 0.5.1 bullet list.
> 
> No application or library source changes in this diff; it packages and narrates work already on `main`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c8826b82982270fd4f47b8da656f2e3e6021c76b. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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