Skip to content

feat(ifc): a door's OverallWidth and OverallHeight from its type's Width and Height (RE-187) (#759) - #788

Merged
DrunkOnJava merged 3 commits into
DrunkOnJava:mainfrom
Erry91:feat/door-overall-size-from-type
Oct 18, 2026
Merged

DrunkOnJava merged 3 commits into
DrunkOnJava:mainfrom
Erry91:feat/door-overall-size-from-type

Conversation

@Erry91

@Erry91 Erry91 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Summary

A door whose opening is not read now writes its type's Width and Height as its OverallWidth / OverallHeight, instead of $. On Core Interior and RE1 Architecture that is 136 of 137 doors, all equal to Revit's own export; the last door's type holds no size and keeps $. Windows keep failing closed.

Motivation

Closes #759. rvt-rs wrote those two attributes only from the opening it cuts (RE-93, RE-94), so all 143 doors and windows of these two models had $, while Revit's export has them on every one. A door's size is one of the first things a schedule, a take-off or an accessibility check reads.

Built on the RE-187 probe and scorer from re/re187-door-window-sizes (the first commit here, unchanged apart from the scorer's export mode below). Their Measure run (39116389615) showed the rule: a door type's Width/Height built-ins equal Revit's OverallWidth/OverallHeight on 136 of 136 doors, and a window's do not (Core Interior: 1010 mm against 1500 × 2700 mm).

Changes

  • src/partition_type_parameters.rs: type_door_sizes, reading a door type's Width (−1001301) and Height (−1001300) the way type_door_openings reads the rough pair.
  • src/partition_schema_mvp.rs: attach_door_sizes gives each door whose type size is read DOOR_TYPE_SIZE_FIELDS, whether or not its opening is read; an opening-only door (RE-84) gets none.
  • src/ifc/export_content.rs: the door reports them as TypeWidth / TypeHeight in RvtElementRecordGeometry, as RE-103 reports a type's section.
  • src/ifc/step_writer.rs: OverallHeight / OverallWidth are the opening's size where one is read (unchanged, so RE-94's rough-size doors keep Revit's rough size), and otherwise the door's type size.
  • tools/re/door_window_sizes_vs_ifc.py: given an rvt-rs export instead of the probe's output, it scores the OverallWidth / OverallHeight rvt-rs writes against Revit's; added to IFC_SCORERS in tools/ci/measure-reference-models.sh.
  • tests/door_overall_sizes.rs (registered in tests/integration/main.rs and tools/ci/test-targets.txt): the sizes on both models, through RVT_PROJECT_CORPUS_DIR.
  • reports/element-framing/RE-187-door-overall-sizes.md, the RE-187 addendum in docs/rvt-moat-break-reconnaissance.md, CHANGELOG.md, README.md, docs/supported-profile.md, docs/support-matrix.json.
  • research/witness/magnetar-2024-core-interior-slim/observations/rvt-rs.json: refreshed; the only change is IFCPROPERTYSINGLEVALUE 19856 → 20120 (132 doors × 2).

Testing

  • tools/check-local.sh passes (fmt, clippy, rustdoc, build, real-file / CLI / contract checks) with RVT_PROJECT_CORPUS_DIR on Core Interior, Einhoven and the four RE1 models: 243 passed. The one failure, project_count_fixtures, needs Revit's full 2024_Core_Interior.ifc export, which I don't have, and fails the same way on main. The counts it checks (132 IFCDOOR, 3802 IFCPROPERTYSET) don't change here: the two properties go into each door's existing RvtElementRecordGeometry set.
  • Verified end to end on real Revit files: below
  • If this touches the IFC exporter: the changed observation is refreshed in this PR (Core Interior slim)
  • N/A: not a performance change

Files: 2024_Core_Interior.rvt (magnetar-io/revit-test-datasets, MIT, sha256 c805df44…) against 2024_Core_Interior_slim.ifc, and RE1-Architecture.rvt (Drshelden/IFC-ECS, MIT, sha256 4a78bdd6…) against RE1-Architecture.ifc.

./target/release/rvt-ifc 2024_Core_Interior.rvt -o model.ifc
python3 tools/re/door_window_sizes_vs_ifc.py model.ifc 2024_Core_Interior_slim.ifc --list
OverallWidth / OverallHeight against Revit's, by Tag, within 0.001 ft main this PR
Core Interior doors (132): equal 0 132
Core Interior windows (6): $ 6 6
RE1 Architecture doors (5): equal 0 4
RE1 Architecture doors: $ 5 1
Different from Revit's 0 0

Einhoven and RE1 Electrical, Mechanical and Plumbing export byte-identical to main's apart from the timestamp. tests/door_overall_sizes.rs fails on main and passes here.

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • Resolved limitation updated in the docs (README and supported-profile rows, support matrix, CHANGELOG)
  • New limitations documented: windows still fail closed (their type size is not Revit's on Core Interior), and Snowdon Towers is not measured. Measure reads it with -f samples=true since corpus: put Snowdon Towers, BIM4LCA and the R2025 test models in front of CI #766, but Revit's export of it, which the scorer needs, is local only. Its 57 rough-size doors keep their opening's size as before, but its other doors now take their type's Width and Height and are not checked against Revit's there. It would be good to run door_window_sizes_vs_ifc.py on it with your local export.
  • 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: the probe is examples/probe_re187_door_window_sizes.rs, and the dated addendum is in docs/rvt-moat-break-reconnaissance.md

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
  • No new fixtures; the test reads the corpus models through RVT_PROJECT_CORPUS_DIR

The changes in this PR are based on public byte observations of the redistributable corpus files above (Revit's own IFC exports of them as the reference) and the IFC specification. I have not used Autodesk SDK source, ODA SDK source, leaked internal documentation, NDA material, or decompiled internal Revit implementation code beyond public symbol exports.

Breaking changes

None: attributes that were $ now have values, and RvtElementRecordGeometry gains two properties on those doors.

Screenshots or output samples

RE1 Architecture, door 416336 ("Door-Double-Sliding:84" x 94""):

main:    IFCDOOR(…,'416336',$,$,.DOOR.,$,$);
this PR: IFCDOOR(…,'416336',2.400000,2.150000,.DOOR.,$,$);
Revit:   OverallHeight 2399.9999999999968 mm, OverallWidth 2149.9999999999964 mm

Related issues

Closes #759. Refs #227 (RE-93, RE-94).

@Erry91
Erry91 requested a review from DrunkOnJava as a code owner October 18, 2026 14:15
@Erry91
Erry91 force-pushed the feat/door-overall-size-from-type branch 2 times, most recently from a928a32 to 363660c Compare October 18, 2026 14:39
DrunkOnJava and others added 3 commits October 18, 2026 13:07
…runkOnJava#759)

The probe prints, per door and window, the sizes its type holds (Width
and Height, Rough Width and Rough Height, family parameters named Width
and Height) and its record box; the scorer joins them to Revit's export
by Tag and counts which candidate equals OverallWidth and OverallHeight.
…dth and Height (RE-187) (DrunkOnJava#759)

rvt-rs wrote a door's or window's OverallWidth / OverallHeight only from
the opening it cuts (RE-93, RE-94), so a door whose cut is not read had
`$` even where its type's size is read: all 143 doors and windows of Core
Interior and RE1 Architecture. A door type's Width (-1001301) and Height
(-1001300) are Revit's OverallWidth / OverallHeight on every door where
they are read, 136 of 136 (RE-187, Measure run 39116389615).

type_door_sizes reads them, attach_door_sizes gives each door that size
(not an opening-only door), the export reports it as TypeWidth /
TypeHeight in RvtElementRecordGeometry, and the writer uses it where no
opening gives the size, so RE-94's rough-size doors keep Revit's rough
size. Windows keep failing closed: their type size is not Revit's on Core
Interior.

Core Interior writes 132 of 132 doors equal to Revit's (0 before) and RE1
Architecture 4 of 5; Einhoven and RE1 Electrical, Mechanical and Plumbing
are byte-identical apart from the timestamp. door_window_sizes_vs_ifc.py
gains an export mode and joins IFC_SCORERS; tests/door_overall_sizes.rs
checks both models; the Core Interior slim witness observation is
refreshed (IFCPROPERTYSINGLEVALUE 19856 -> 20120).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…new property values (DrunkOnJava#759)

The full Core Interior edge replayed with drift: its rvt-rs observation counted 25,577 IFCPROPERTYSINGLEVALUE, and the export now writes 25,841, the doors' OverallWidth and OverallHeight in RvtElementRecordGeometry, 132 doors times two. Refreshed from CI run 39136990343's octetproof-core-interior artifact; witness-verdict.py on the refreshed files gives PASS with three replay matches, and the committed verdict is unchanged.
@DrunkOnJava
DrunkOnJava force-pushed the feat/door-overall-size-from-type branch from 363660c to 2a3cfaf Compare October 18, 2026 17:09
@DrunkOnJava

Copy link
Copy Markdown
Owner

Thank you, this is careful work. The rule holds where you measured it, the test reads real files, and the declaration is in place. I pushed three things to your branch (maintainer edits were on):

  1. Signed commits. main requires signed commits and yours weren't, so I replaced them with the same changes, signed, keeping you as author. The squash will be yours. I also rebased onto main instead of keeping the merge commit, since history here is linear. Apart from CHANGELOG.md, every file this PR touches is byte-identical to your head 363660c. CHANGELOG.md had a conflict with ci(corpus): the tier-two job reads the BIM4LCA models CI's targets need (#766) #789, which I resolved by keeping your entry as written.
  2. The full Core Interior witness. CI's IfcOpenShell job failed on the full Core Interior edge (magnetar-2024-core-interior). Its rvt-rs observation counted 25,577 IFCPROPERTYSINGLEVALUE, and the export now writes 25,841, your 132 doors times two. The slim edge you refreshed was right. I refreshed the full one from the CI run's octetproof-core-interior artifact. witness-verdict.py on the refreshed files gives PASS with three replay matches, and the committed verdict doesn't change.
  3. Snowdon Towers. Revit's export of Snowdon that I have locally comes without a licence, so it stays off CI, and I don't run measurements on this machine. Snowdon's non-rough-size doors therefore stay unmeasured against Revit. Thanks for spelling that out in the checklist. The rule held on 136 of 136 doors across your two models, which is the evidence we have.

The runs on the new head are approved. Once CI is green I'll merge it.

@DrunkOnJava
DrunkOnJava merged commit f7f378c into DrunkOnJava:main Oct 18, 2026
30 checks passed
@DrunkOnJava

Copy link
Copy Markdown
Owner

Merged as f7f378c with you as author. Thank you. Doors now carry Revit's size on both measured models, and the scorer is part of Measure's set from now on. It ships in the next release.

@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 -->
@DrunkOnJava

Copy link
Copy Markdown
Owner

This shipped in v0.6.0, on crates.io, PyPI, the release archives and the container image: each door's OverallWidth and OverallHeight come from its type's Width and Height, and the release notes credit you. Thank you.

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.

IFC export: doors and windows of Core Interior and RE1 Architecture have no OverallHeight/OverallWidth (0 of 143; Revit's export has all)

2 participants