Skip to content

fix(ifc): a wall whose floor covers all of its plan but a stub inside another wall is cut whole, as Revit cuts it, and counted apart (#1067) (RE-375) - #1596

Merged
DrunkOnJava merged 2 commits into
mainfrom
feat/1067-stub-cut-whole
Nov 9, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
feat/1067-stub-cut-whole

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Wall 3004978 of the BIM4LCA office as built is the one of the office's 607 walls whose top is not Revit's: its roof covers all of its plan but a 0.0853 ft stub of its end, inside the wall it abuts, and Revit cuts the stub with the rest of the wall, while rvt-rs left the wall at its full height (9.24 ft over Revit's top, 14.94 ft³ of body over). This cuts such a wall whole at the covering floor's underside, as Revit does, and marks it with TopCoverStub and a count in exported.wall_top_stubs_cut. The rule rests on that one wall.

Motivation

#1067's remainder. RE-320 section 4 found nothing that separates the stub from the pieces Revit keeps outside a floor, except that it is all of the wall that lies outside the floor, and wall_tops::embedded already tests that, but leaves the wall untouched. RE-375 (#1591) read Revit's own bodies over 225 pieces of five buildings: Revit keeps the wall's own height on 191 and cuts it on 5, no feature the scorer reads separates them on more than one wall, and the stub is the only piece under 0.05 ft² and wholly inside other walls. So the rule fits the one measured wall and disagrees with no other piece; it is a labelled, counted-apart rule on one wall, which is what this ships.

Changes

  • src/ifc/export_content/wall_tops.rs: steps drops what the lowest underside leaves of a wall's plan where embedded says it is a stub (under 0.05 ft², wholly inside other walls) instead of refusing the wall, so that decide cuts the wall whole (Cut::Whole, now with a stub flag), and cut_wall_tops writes TopCoverStub (inside_another_wall) on it. The wall's BodyHeightSource is the whole cut's, wall_top_cut_at_covering_floor, which every consumer already reads.
  • src/ifc/export_content.rs: WALL_TOP_STUB_PROPERTY and WALL_TOP_STUB_INSIDE_WALL.
  • src/ifc/mod.rs, docs/schemas/export-diagnostics.schema.json, docs/export-diagnostics.md: exported.wall_top_stubs_cut, counted from the property like wall_end_sources.
  • tools/re/wall_rule_counts.py: prints it (wall rules: top stubs cut), so every Measure run shows the count, held-out models included.
  • reports/element-framing/RE-320-stepped-wall-tops.md, docs/format-reconnaissance.md: the stub is no longer left whole.
  • reports/element-framing/RE-375-wall-top-outside-floor.md: section 8 records the rule's Measure, and section 7's commands name main, which carries the scorer since research(walls): what Revit's export does with the part of a wall's plan a floor leaves uncovered, over 225 pieces of five buildings (#1067) (RE-375) #1591.
  • changelog.d/changed/1067-wall-top-stub.md.

Testing

Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.

  • full / CI passed on the final head
  • Verified end to end on real Revit files: unfiltered Measure 42598250689 (abc505ad against main at 4ad2ce90, -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true, every scorer), 118 models a side. RE-375 section 8 has the detail.
    • The office as built moves, and only because of this change: wall 3004978's top goes from 255.5446 to 246.3025 ft, Revit's, and wall_heights_vs_ifc gives base and top Revit's on 607 of 607 walls (606 before).
    • wall rules: top stubs cut reads inside_another_wall=1 on the office as built and none on the other 117 models, the 18 held-out ones included, whose exports are byte-identical to main's.
    • Six more exports differ from main's, and not because of this rule: the branch predates build(deps): earcut 0.4.12, shown to triangulate the same surfaces on the six exports it moves (#1553) #1592, so it builds earcut 0.4.11 against main's 0.4.12. They are the six that PR names (rac_advanced on 2023 to 2027, Snowdon Towers Architectural 2024). Their diagnostics.json differ only by the new, empty wall_top_stubs_cut, their stub count is none, and no scorer output of theirs changes. The other 111 exports are byte-identical.
    • No other scorer output or W7 value moves: the scorer diff holds the office's wall_heights_vs_ifc.txt and wall_rules.txt and the two Areas gate results, which only the head side runs.
    • same-project gates passed on abc505ad: 15 samples held to their earlier saves, and the Areas on 4 saves and on the 2021 save.
  • Performance: N/A. The rule is a branch in a pass that already runs.

For the reader

The branch is not rebased on main. abc505ad is the commit the same-project gates passed on and Measure measured; the commit after it changes the RE-375 report only. main has taken #1592 (earcut) and #1595 (dependency bumps) since, neither of which this touches.

Audit-honesty checklist

  • README / docs reflect the current state after this PR: the diagnostics table and schema, RE-320 and the reconnaissance addendum.
  • A user-visible change has its entry as a fragment under changelog.d/changed/
  • If a limitation was resolved, the docs are updated: the stub of 3004978 no longer keeps its full height.
  • If a new limitation was introduced, it is documented: the rule rests on one wall (the property, the diagnostics row, the module docs and RE-375 say so). A wall whose floor leaves a stub that is not under 0.05 ft² and wholly inside other walls is as before.
  • 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: RE-375 (landed in research(walls): what Revit's export does with the part of a wall's plan a floor leaves uncovered, over 225 pieces of five buildings (#1067) (RE-375) #1591) holds the scorer and the report; this applies its rule and adds section 8 with the Measure.

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0 (see CONTRIBUTING.md)
  • This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see CLEANROOM.md). Contributor declaration: every fact here comes from byte observations of the BIM4LCA office and Revit's own IFC4 exports of it. No Autodesk or ODA SDK source, disassembly, leaked document or NDA material was used, and nothing was copied or translated from revit-ifc.
  • No new test fixtures

Breaking changes

None. ExportedModelDiagnostics (#[non_exhaustive]) gains wall_top_stubs_cut, with #[serde(default)].

Related issues

Refs #1067. The other walls RE-320 section 7 lists as not drawn are as before.

… another wall is cut whole, as Revit cuts it, and counted apart (#1067) (RE-375)
…it's, 117 models read none, six exports move by earcut alone (#1067) (RE-375)

Section 8 holds the unfiltered Measure of the rule (run 42598250689, 118 models a side, the 18 held-out ones byte-identical), why six more exports differ (the head predates the earcut 0.4.12 bump), and its reproduce command. Section 7's commands name main, which carries the scorer since #1591, instead of the branch it landed from.
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 9, 2026 10:30
@DrunkOnJava
DrunkOnJava merged commit eadfa96 into main Nov 9, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1067-stub-cut-whole branch November 9, 2026 10:42
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
… box ends at the profile's highest point, and its Height is the profile's (#1600) (RE-378) (#1604)

## Summary

A wall whose edited elevation profile closes below its record box now
ends at the profile's highest point, and its
`Qto_WallBaseQuantities.Height` is the profile's. The BIM4LCA office's
terrain files hold one such wall, 1387731: Revit's body ends at 196.5223
ft where rvt-rs drew the box's 200.1988 ft, and Revit writes `Height`
4.4 m where rvt-rs wrote 5.520605 m. The rule rests on that one wall
(two files), so it is as narrow as the wall allows.

## Motivation

#1600, found while measuring #1067's last piece (#1596): the wall has no
top join and no cut pair, so no floor, roof or footing was ever going to
cut it. Its record holds an elevation profile, a closed loop of seven
lines from the base up to a falling top, and the profile's highest point
is Revit's top. rvt-rs's openings (RE-151) are cut from the profile's
own bounding rectangle, so the strip between that rectangle's top and
the box's top stayed solid (3.6765 ft over the whole 173.9 ft), and the
quantity took the box's height. The probe is `probe_1067_native_dump`
(Measure
[42608767799](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42608767799));
the findings are in [the comment on
#1600](#1600 (comment)).

## Changes

- `src/research/partition_schema_mvp/fields.rs`, `walls.rs`:
`m_profile_height`, the lowest and highest height of a profile's lines,
kept with the wall's openings on Revit 2024
(`WALL_PROFILE_TOP_REVIT_VERSIONS`, its own list).
- `src/ifc/export_content/wall_profile.rs`, `export_content.rs`:
`take_top_at_profile` lowers the extrusion to the profile's highest
point where the record names nothing joined to or cutting the wall, the
profile spans the whole wall within a thousandth of a foot and starts at
its base, and its highest point lies below the box's top; the wall then
carries `ProfileTopSource` (`wall_top_at_profile_top`). It runs before
the quantities, so `Height` follows. `top_at_profile` is pure and has
unit tests of its failure modes next to it. A wall that goes on past its
profile keeps the box's top: `rac_basic`'s wall 493612, whose box holds
the profile's line carried on (RE-358), is why full span is a hard
condition.
- `src/ifc/mod.rs`, `docs/export-diagnostics.md`,
`docs/schemas/export-diagnostics.schema.json`,
`tools/re/wall_rule_counts.py`: `exported.wall_profile_top_sources`, so
every Measure run shows the count on every model, held-out ones included
(`wall rules: profile top sources`).
- `changelog.d/fixed/1600-profile-edited-wall-top.md`; the report RE-378
(the wall, the rule, the Measure's results and how to reproduce them)
and a dated addendum to `docs/format-reconnaissance.md`.

## Testing

Unit tests are banned in this repository; the one exception is a pure
helper, and `top_at_profile` (no I/O) has eight fast failure-first tests
next to it (a profile short of an end, starting above the base, as high
as or above the box, with no height, on a turned wall and one longer in
depth, and non-finite numbers). The change itself is shown end to end on
real files:

- [ ] `full / CI passed` on the final head (the full set runs once the
PR is ready)
- [x] Verified end to end on real Revit files: the terrain files'
filtered Measure
([42614195315](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42614195315))
and an unfiltered Measure with every flag and `holdout=true`
([42614629885](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42614629885),
118 models, `8a5b2225` against `b969296e`). Only the two terrain exports
moved. Wall 1387731's top is Revit's 196.5223 ft and its `Height` equal
(4.4 m); base and top are Revit's on 1,560 of 1,560 walls of the five
Revit 2024 files with Revit's export (1,558 before); `diagnostics.json`
differs on every model that keeps one by the new
`wall_profile_top_sources` alone; the 25 held-out, BIMcollab and
`rac_advanced` models' counts are identical; `same-project gates` pass.
The rebase onto `main` at `f0842b30` changed the commits' SHAs, so the
run was repeated on the head `dcf9976d`
([42621509872](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42621509872)):
the same two exports moved, the same diagnostics differ, and
`same-project gates` pass on the head.
- [x] If this touches the IFC exporter: Core Interior's export is
byte-identical (`ifc.sha256` equal), so its witness observations need no
refresh.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR: the
diagnostics table and schema.
- [x] A user-visible change has its entry as a fragment under
`changelog.d/fixed/`.
- [x] If a limitation was resolved, the docs are updated: with the
report.
- [x] If a new limitation was introduced, it is documented in the PR
body and in-code: the rule rests on one wall; a wall that goes on past
its profile, starts above its base, is joined or cut, or whose profile
reaches its box keeps the box's top.
- [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
- [x] Reverse-engineering finding: the report RE-378 and a dated
addendum to `docs/format-reconnaissance.md` come with the Measure.

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0 (see
`CONTRIBUTING.md`)
- [x] This PR contains no Autodesk proprietary source, decompiled
internals, or NDA'd SDK content (see `CLEANROOM.md`). Contributor
declaration: every fact here comes from byte observations of the BIM4LCA
office's terrain files (CC BY-SA 4.0) and Revit's own IFC4 exports of
them. No Autodesk or ODA SDK source, disassembly, leaked document or NDA
material was used, and nothing was copied or translated from revit-ifc.
- [x] No new test fixtures

## Breaking changes

None. `ExportedModelDiagnostics` (`#[non_exhaustive]`) gains
`wall_profile_top_sources`, with `#[serde(default)]`.

## Related issues

Closes #1600. Refs #1067 (the terrain residual it split off) and #1607
(the unfilled openings RE-151's rule writes on these walls and on the
office's, which this PR does not move).
DrunkOnJava added a commit that referenced this pull request Nov 14, 2026
…volutions read as the code does (#96, #227, #1067, #1189) (#1963)

## Summary

Ten doc lines that said less than the code does, found by the issue
triage batch (batch 10) and each checked against `main`:

- `docs/supported-profile.md`, Pipes row: "ducts and fittings keep their
box" was stale. A duct is its record's swept section, its box within
0.01 ft of Revit's on all 1,053 ducts of Snowdon Towers HVAC and all 25
of RE1 Mechanical (RE-371). A fitting whose saved mesh decodes whole is
drawn from it on 2023 to 2027 (#1191), RE-443 adding 105 duct fittings
of `rme_basic` 2023 checked against a native reference that is not
shared, not a Revit export; any other keeps its box. Flex ducts are not
read. (#96)
- `docs/supported-profile.md` (doors, windows and openings row) and
`docs/evidence.md` (openings row): the cut-loop opening was said to be
2024 and 2025 only. `CUT_LOOP_REVIT_VERSIONS` is 2024 to 2027 (RE-346)
and `CUT_LOOP_32BIT_REVIT_VERSIONS` 2015 to 2023 (RE-450). On 2015 to
2023 the size is the 2024 save's and the place too, but for 24 windows
of `rac_advanced`'s 2015 to 2020 saves 0.0075 m off (RE-450); on 2026
and 2027 the 2025 save's (RE-346); neither is held to a Revit export of
those releases, and the lines say so. (#227)
- `docs/release-1.0-criteria.md`, W4's wall-top line: the stub wall
3004978 "keeps its full height" was stale. #1596 (RE-375) cuts it whole,
labelled and counted apart, by a rule that rests on that one wall. The
counts beside it are from before that change, and the line now says so.
(#1067)
- `docs/supported-profile.md`, Family row, and
`docs/release-1.0-criteria.md`, W3: the family geometry said "none". A
standalone Revit 2020 family's one visible positive revolution is
exported, confirmed against Revit's own IFC of the family (RE-394), as
`docs/compatibility.md` and the support matrix already say, marked
experimental as the README marks it. W3 stays **failed**. (#1189)
- `docs/rooms.md` and `docs/reference-models.md`: BIM Whale's held-out
Revit 2021 project was said to write 0 of its 8 Areas. Since RE-333 it
writes 6 of 8 with no extras, and 2 of Revit's are still missing
(Measure run 42003913780, counts only). (#1261)

- `docs/supported-profile.md`, "Not supported": rebar, Structural Beam
Systems and Revit assemblies now say why they are not read (RE-350 §3,
§3.3), which #1444's done-when asks for. The files hold rebar and beam
systems as framed boxes, but no Revit export in reach shows what Revit
writes for them. (#1444)
- `docs/support-matrix.json`, the raised embed-host claim ("all are
drawn from their mesh and every base is Revit's", run 41973316830):
since RE-444 (#1799), 2177212 at permit is drawn from its newest frame's
record box, its base 8.2021 ft below Revit's, and the matrix now says
so. (#1407)

## Testing

Docs only. `tools/ci/api-doc-ids.py` and `tools/ci/measured_numbers.py`
pass locally (276 of 294 numbers name a model of the index).

## Audit-honesty checklist

- [x] Each line now says what the code does, with the source it rests
on; nothing claims a measurement that was not made.
- [x] No status changes.
- [x] No private paths or emojis.
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