Skip to content

fix(ifc): a roof drawn as its record box cuts no wall's top (#1471) (RE-351) - #1476

Merged
DrunkOnJava merged 6 commits into
mainfrom
fix/1471-box-roof-wall-tops
Nov 9, 2026
Merged

DrunkOnJava merged 6 commits into
mainfrom
fix/1471-box-roof-wall-tops

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

#1471 asks whether the 16 rac_basic walls that its 2025 and 2026 saves draw to different extents are a reader defect or an edit of the project. They are a reader defect. The probe on all 13 saves (Measure run 42106436497, head b2b5716) shows the 16 walls' record boxes, base and top Levels, joins and top-join element equal on every save, so the project was not edited; what differs is the top. On the 2026 and 2027 saves each of the 16 is cut at 5.7265 m, the underside of roof 243274's record box (15 of them on 2024, 428745 not), and on the 2025 save none is cut, though the 2025 save's walls name the same roof as top cutter. The roof is a roof by extrusion on every save that only the 2025 reader reads (SKETCH_SPLINE_SUPPORTED_REVIT_VERSIONS is 2025 alone), so the other readers draw it as its record box, 3.472 m deep, and the wall-top pass (RE-267) takes a record box for a roof with a level underside.

The change: a roof is a cutter of a wall's top only where its record box is exactly its type's layers (the proof its underside is level) and its plan outline is read (an L-shaped plate roof drawn over its box's rectangle would cover a wall it does not reach); slabs and footings are as before.

Smaller error, not the right body. The second read finds Revit's walls attach to the gable's sloped underside: for 13 of the 16 the stored box top equals the roof underside's highest point over the wall's plan to 0.0001 m. The prism this restores is not Revit's body either; the read's rough estimate is about +5.1 m3 over across the 16, against about -13.5 m3 under with the flat cut (not reproduced). Wall 506386 loses five values the roof's box let it carry (Height, net and gross volume and side area) and keeps Length and Width, as on 2025.

What exercises it. Only roof 243274 exercises the roof-cover path anywhere, and no wall is cut by a plate roof, so the retained plates.contains branch is unmeasured.

The same-project pins go. #1454 pinned these 16 walls in the same-project check (PINNED_WALLS, Griffin 2026-11-05) until this work healed them. All 16 are now the 2025 save's, so this removes them: PINNED_WALLS is empty and PINNED_MOST is 0 in tools/re/readers_across_saves.py and tools/ci/check_same_project_projects.py. The exception in docs/maintaining.md now reads as closed.

Held-out wall heights are now counted. The held-out AA house (Revit 2026) is the only Revit export whose walls this rule changes. Its scrubbed counts held no wall-height line, so tools/ci/scrub-holdout-results.sh now keeps the wall heights: count lines of tools/re/wall_heights_vs_ifc.py. These are numbers beside the scorer's fixed words, never a Tag, a height or the files' offset.

Motivation

#1471. Griffin, 2026-11-05: #1454's check pins these 16 walls to their exact source and volume until this work shrinks the list; once this lands they leave it.

Changes

  • src/ifc/export_content/wall_tops.rs, src/ifc/export_content.rs: level_underside and the set of roofs whose box is exactly their layers and whose outline is read (plate_roofs); cut_wall_tops skips any other roof as a cutter.
  • tools/re/readers_across_saves.py, tools/ci/check_same_project_projects.py: the 16 pins removed, PINNED_MOST 0.
  • tools/ci/scrub-holdout-results.sh: the wall heights: count lines kept for held-out models.
  • probes/examples/probe_re351_wall_top_covers.rs (RE-351): the record frames, decoded fields, native SWall records (for all 16 walls, read false where the reader leaves one out) and written bodies of the 16 walls and of roof 243274, on every rac_basic save; and each wall's sets and profile_openings.
  • reports/element-framing/RE-351-rac-basic-wall-tops-across-saves.md, an addendum to RE-346, a changelog fragment, docs/maintaining.md, docs/status.md, docs/supported-profile.md, docs/evidence.md, docs/support-matrix.json and docs/format-reconnaissance.md.

Testing

Unit tests are banned in this repository: nothing is added.

  • tools/check-local.sh passes: not run locally (no local builds); CI is the build
  • Verified end to end on real Revit files.
    • Unfiltered Measure 42554270370 (head 584c8a89 against main at fc29acb; the reference models, the BIM4LCA office as built and at permit, R2025, Autodesk's samples of every year, the held-out models; 118 exports):
      • 4 exports move: rac_basic 2024, 2026 and 2027, and the held-out AA house (Revit 2026).
      • The other 114 are byte for byte main's, the office's among them (606 of 607 walls with Revit's base and top as built, on both sides).
      • On the 2026 and 2027 saves all 16 walls are the 2025 save's bodies: of 441 bodies, 424 are the same and 1 differs, roof 243274, the record box ROOFS_LEFT_AS_BOXES expects.
      • The 11 cut-opening hosts are equal with their openings (5 on main), and the 16 walls no longer carry the BodyHeightSource, TopCoverElementId and 506386's five quantities that the 2025 save does not write.
      • The run's same-project check failed only because the 16 pins healed ("remove its pin" on each). This head removes them.
    • Measure 42556745265 (head 8ddb0ad2, the pins removed, against main at 9c66e9b; samples 2024 to 2027 and the held-out models):
      • same-project gates passes on 8ddb0ad2, with pinned walls as pinned 0 of 0 and 440 of 441 bodies the 2025 save's on each of rac_basic's 2026 and 2027 saves; the 441st is roof 243274, the expected record box.
      • The held-out AA house (Revit 26.4, IFC4X3, counts only) now keeps its wall heights: lines. Its walls with Revit's base and top go from 43 to 56 of 59, and those with Revit's base and not its top from 16 to 3, all on Revit's storey. Nothing else in its counts moves.
      • One more export moves than in 42554270370, the held-out Gdynia 2021. That is the branch's base, which was older than main (feat(ifc): Revit 2015 to 2023 beams are drawn along their location line (#1190) (RE-362) #1509's beams), and not this change: Gdynia's export on this head equals its export in 42554270370.
    • Since then the branch is rebased on main (the release of 0.16.0). The one conflict, in docs/format-reconnaissance.md, kept both addenda (RE-362's and RE-351's). The figures are written into RE-351 section 4, the fragment and docs/status.md. No source changed after 584c8a89.
    • Not run: Snowdon Towers (local only), and the probe on the scoring head.
  • If this touches the IFC exporter: the witness verdicts replay: Core Interior's export is byte for byte main's in run 42554270370, so they do not move.

Audit-honesty checklist

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0
  • No Autodesk proprietary source, decompiled internals or NDA'd SDK content (the oracle is the same Autodesk sample saved by another release, never stored)
  • No new fixtures

Breaking changes

None.

Related issues

Closes #1471

DrunkOnJava added a commit to puzzbobb/rvt-rs that referenced this pull request Nov 5, 2026
…asured, and what DrunkOnJava#1476 removes (DrunkOnJava#1190)

The evidence matrix says the ObjectType of a stair, a flight and a stringer is the value left out on 2026 and 2027, and the report names the type objects the holdout run decides, a stringer's unscored type-derived values, and that DrunkOnJava#1476 removes rac_basic from ROOFS_LEFT_AS_BOXES along with the pins.
@DrunkOnJava
DrunkOnJava force-pushed the fix/1471-box-roof-wall-tops branch from 67003ee to 584c8a8 Compare November 9, 2026 03:02
…basic save, and the probe prints profile openings (#1471)
…the probe lists every wall's native record; the report names what is a smaller error and what is unmeasured (#1471) (RE-351)
…ins, and held-out models keep counts of walls at Revit's base and top (#1471) (RE-351)
@DrunkOnJava
DrunkOnJava force-pushed the fix/1471-box-roof-wall-tops branch from 8ddb0ad to 9318fc0 Compare November 9, 2026 04:07
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 9, 2026 04:26
@DrunkOnJava
DrunkOnJava merged commit 32d52bf into main Nov 9, 2026
74 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1471-box-roof-wall-tops branch November 9, 2026 04:38
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
… starts, so two rac_basic 2027 doors keep their Width and Height (#1489) (RE-373) (#1568)

## Summary

Two `Single-Flush:800 x 2100` doors of `rac_basic`'s 2027 save wrote no
`Qto_DoorBaseQuantities` Width and Height. The cause: three family
instances' own Width, Height, Rough Width and Rough Height (1500 × 2700
mm) are stored right after the doors' symbol's native record, with no
value block mark between. The length scans gave them to the symbol,
which then held two of each and, failing closed, wrote neither (RE-373).

The fix bounds each value block by the native record index: a length
entry is a block's only while no native record starts between the
block's mark and the entry. A type's block lies inside its own
`FamilySymbol` record (on `rac_basic`, the mark sits 68 bytes past the
record's start), and records don't nest, so the cut can only drop
entries outside the owner's record.

## Changes

- `src/research/partition_type_parameters.rs`:
- `bounded_value_blocks` cuts each owned block at the first record start
after its mark, where that comes before the next mark.
- `record_starts` reads the starts from the handle's record index,
building it with a pass that selects nothing and decodes nothing if no
native pass has. Whether it exists depends on the file alone, so the
export doesn't depend on the order of its reads; with no index, blocks
end at their marks as before.
- The export path's two length scans, `type_lengths_at` and
`type_named_lengths_at`, use it. These scans run on Revit 2024 to 2027
only, inside the native reader's 2023 to 2027, so 2015 to 2023 are not
reached.
- Unchanged: the RE-354 text scan (`FireRating`, `Manufacturer`), whose
entries lie up to 3.2 MB from their mark, and the public research scans
the probes use.
- `tools/re/readers_across_saves.py`: `rac_basic`'s property minimum is
418 on both saves, from 414 on 2027.
- `probes/examples/probe_1489_door_size_entries.rs`: the probe, which
names the native record whose bytes hold each length entry.
-
`reports/element-framing/RE-373-value-blocks-end-at-the-next-record.md`,
an addendum to RE-346, `docs/status.md`, and a changelog fragment.

## Testing

Unit tests are banned in this repository: nothing is added.

- [x] Verified end to end on real Revit files.
- **The mechanism**, from Measure runs 42555155286, 42557123494 and
42557901914 (`probe_1489_door_size_entries` on `rac_basic` 2026 and
2027): every length entry lies inside exactly one native record.
431054's own entries are in its `FamilySymbol` record, the three 1500 ×
2700 groups in `FamilyInstance` records 457479, 457534 and 457542, and
the three control symbols' entries in their own records. Two other
bounds were ruled out: the RE-35 record chain (every Width entry, owned
or not, lies outside it) and the mark itself (it carries no length).
- **Measure 42558908204**, head 1e62821d against `main` at 9c66e9b: the
reference models, the BIM4LCA office, R2025, Autodesk's samples of every
year and the held-out models, with timing. It had no `racadv` or
BIMcollab model, which are 2015 to 2020 files this doesn't reach.
    - 2 of 111 exports move.
- `rac_basic` 2027: the doors' Width and Height go from 9 to 11 equal to
the 2025 save's, "only there" from 2 to 0, and the compared values from
414 to 418, the 2026 save's.
- The held-out AA house (Revit 26.4, IFC4X3, counts only): door
`Qto_DoorBaseQuantities.Width`, `Height` and `Area` each go from 11 to
13 of 13 equal. Its quantities equal to Revit's go from 200 to 206 of
846, and the MCP server's answers hold 27 quantity values equal to
Revit's, from 24. It is the one Revit export the rule changes, and it is
out of sample: the rule was read off `rac_basic`.
- No property value or quantity goes from equal to different or missing
on any model, so RE-354's counts are unchanged.
- Export time is 0.98 to 1.01 times `main`'s (0.993 in total over 68
files), and peak memory 0.95 to 1.06 times (Snowdon HVAC 215 to 227
MiB). The viewer's wasm memory is not measured.
    - `same-project gates` passes on 1e62821d.
- **Measure 42561086714** (efc66c67, which holds every change but the
fragment's wording; gates from this branch, samples 2024 to 2027): the
gate with the raised minimum. Passed: `same-project gates` on efc66c67
reads "pass: 15 samples held to their earlier saves, and the Areas on 4
saves", with `rac_basic`'s 2025, 2026 and 2027 saves each PASS.
- **Measure 42563501765** (af6bcf6, this head, rebased on `main` at
32d52bf after #1476 emptied `PINNED_WALLS`; gates from this branch,
samples 2024 to 2027): the two PRs' gate files together. Passed:
`same-project gates` on af6bcf6 reads "pass: 15 samples held to their
earlier saves, and the Areas on 4 saves", with `rac_basic`'s 2025, 2026
and 2027 saves each PASS.
- [x] If this touches the IFC exporter: the witness verdicts replay,
since Core Interior's export is byte for byte `main`'s in 42558908204.

## Audit-honesty checklist

- [x] README / docs reflect the state after this PR: `docs/status.md` no
longer lists the two doors as a gap, and RE-346 has a dated addendum.
- [x] The change has its entry as a fragment under `changelog.d/fixed/`.
- [x] No emojis, no private paths.
- [x] Reverse-engineering finding: a probe under `probes/examples/` and
the dated report RE-373.

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0.
- [x] No Autodesk proprietary source, decompiled internals or NDA'd SDK
content. Contributor declaration: this finding comes from public byte
observations of Autodesk's published sample files and from Revit's own
IFC exports only.
- [x] No new fixtures.

## Breaking changes

None.

## Related issues

Closes #1489.
@DrunkOnJava DrunkOnJava mentioned this pull request Nov 9, 2026
4 tasks done
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
## Summary

Release 0.16.1, the first published release of 0.16. The `v0.16.0` tag
(on 2bb0f3b) was never published. Its publish run,
[42559733687](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42559733687),
stopped at the viewer load smoke test, which needed `rvt-elements` on
its PATH, before crates.io, PyPI, the release page or ghcr.io. A tag
cannot be moved, so #1569 fixed the workflow and 0.16.1 replaces 0.16.0.
Everything under `[0.16.0]` ships in 0.16.1, with:

- a door type's value block ending at the next native record, so the two
`rac_basic` 2027 doors write their Width and Height (#1568, #1489,
RE-373);
- a roof drawn as its record box cutting no wall's top (#1476, #1471,
RE-351);
- the sealed registry for the 1.0 check's fresh held-out pairs (#1566,
#1565);
- RE-364's addendum on Revit 2015 to 2020 angled walls (#1567, #1535);
- the publish workflow's fix and its dry run before a tag (#1569).

## Changes

- Version 0.16.0 -> 0.16.1 in:
  - Cargo.toml;
  - rvt-py/Cargo.toml and its `=` pin;
  - rvt-mcp/Cargo.toml and its `=` pin;
  - rvt-wasm/Cargo.toml;
  - tools/stream_evidence/Cargo.toml's pin;
  - viewer/package.json;
  - CITATION.cff (version and date);
  - Cargo.lock and fuzz/Cargo.lock.
- `python3 tools/release/changelog.py assemble`: 4 fragments go into
`[0.16.1]`, with an introduction saying why 0.16.0 was not published.
`[0.16.0]` gains one line saying the same. The introduction links
0.16.0's notes and "Upgrading from 0.15" at the `v0.16.1` tag, since the
release page carries this section alone. It says to read 0.16.1 where
those notes say 0.16.0: the IFC header, and the attestation's
`--source-ref refs/tags/v0.16.1`. It also says this section's entries
hold over the 0.16.0 notes on the 2027 doors and on what the release
adds to the measured commit.
- README: the latest release and the "after 0.16.1" fragments sentence.
- `publish.yml`: the viewer smoke's comment gives its longest run, 15.8
minutes (v0.16.0's tag run), in place of 14.7.
- 2daaa17 refreshes the Core Interior witness observations and
verdicts, and the synthetic fixtures, from CI run
[42565027784](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42565027784)'s
artifacts at 772267d. Only `witness_version` (0.16.0 -> 0.16.1), the
two verdict hashes and the fixtures' version strings (in `FILE_NAME` and
`IFCAPPLICATION`) change. Replaying `tools/ci/witness-verdict.py` with
CI's arguments passes for both artifacts, and every witness's replay
matches.

## Testing

- `python3 tools/ci/release_preflight.py check --event workflow_dispatch
--ref-type branch --ref-name checkout --sha HEAD`: ok, version 0.16.1.
- `python3 tools/release/changelog.py check`: ok.
- The dry run RELEASE.md step 7 asks for, `publish.yml` dispatched on
this branch at 772267d:
[42564989175](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42564989175),
success. The viewer artifact load smoke passed 54 tests and skipped 13,
with none failed. The wheels, sdist, docs.rs preview, CLI smoke and all
seven install-and-open jobs passed, and the four publish jobs skipped,
as a dispatch does. The later commits change only the notes, witness
files and fixtures. Of those, the workflow reads only CHANGELOG.md's `##
[0.16.1]` heading, which they leave as it was, and the preflight run at
2daaa17 is ok, version 0.16.1.

Unit tests: N/A.

## Audit-honesty checklist

- [x] The changelog says 0.16.0 was never published and why, and that
0.16.1 carries everything in it.
- [x] Each entry keeps its caveats.
- [x] No emojis, private paths or PII.

## Legal and contribution hygiene

- [x] Apache-2.0. No Autodesk source, internals or NDA material.

## Breaking changes

None beyond 0.16.0's ("Upgrading from 0.15", read with 0.16.1 for
0.16.0).
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.

rac_basic's 16 walls differ between its 2025 and 2026 saves by up to 3.19 m: reader defect or project edit

1 participant