Skip to content

feat(ifc): the export diagnostics list each wall's curve length, and the quantity census counts apart a Length whose two possible values differ (#1046) (RE-252) - #1052

Merged
DrunkOnJava merged 7 commits into
mainfrom
re/wall-length-apart
Oct 27, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
re/wall-length-apart

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

rvt-ifc's export diagnostics list each wall's native curve length (decoded.wall_curve_lengths_feet, by ElementId), and the quantity census counts a wall's missing Length apart where that length and the cut-back curve Revit's export draws as its Axis differ: Revit's export writes either one as the wall's Length (RE-252), and the maintainer chose (2026-10-26) to count those walls apart as an inconsistency of the export rather than as missing.

Motivation

#1046 and W7. RE-252 (#1049) writes a wall's Length only where its two possible values agree. The other walls stayed in W7's missing count though nothing in the model says which value Revit's export takes on them.

Changes

  • src/partition_schema_mvp.rs: WALL_CURVE_LENGTH_FIELD, set by attach_wall_lengths on every wall it matches.
  • src/ifc/mod.rs: DecodedExportDiagnostics::wall_curve_lengths_feet, read from the memoised production walk the diagnostics already take their class counts from. The value is not written in the IFC file: the maintainer chose (2026-10-27) to keep a value only the census reads out of users' files. docs/schemas/export-diagnostics.schema.json and docs/export-diagnostics.md describe it.
  • tools/re/qtos_vs_ifc.py: reads each wall's curve length from the diagnostics.json beside the rvt-rs IFC (as Measure writes it, or --diagnostics) and the length of Revit's Axis, and counts a missing Length apart where the two differ by more than 1e-4 ft. Half of that comparison is rvt-rs's reading, so it counts apart only on a model where Revit's Length is rvt-rs's curve's or its own Axis's on every wall, none neither; it prints the three counts.
  • README.md, docs/release-1.0-criteria.md (W7), RE-252 §7, changelog.d/added/wall-curve-length.md.
  • tools/ci/scrub-holdout-results.sh: keeps the census's two RE-252 count lines for the held-out models (counts only).

Testing

Measure 40448077811 (this change against main, unfiltered, -f nordic=true -f r2025=true, every scorer, the scorers from this branch), qtos_vs_ifc, Qto_WallBaseQuantities.Length:

model Revit's = rvt-rs's curve / = Axis / neither counted apart scored equal missing different
office as built 407 / 184 / 0 461 146 88 58 0
office at permit 329 / 181 / 0 388 201 81 120 0
R2025 models (21 with walls) 71 46 46 0 0
  • No wall's Length moves: the 88, 81 and 46 equal are feat(ifc): a wall carries its Length where its curve cut back at its joins is as long as the curve (#1046) (RE-252) #1049's. The office's walls left missing are those whose two lengths agree but whose ends the two readings do not.

  • Every model's export is byte-identical to main's (ifc.sha256), so no witness observation or project-count fixture moves; psets_vs_ifc and every other scorer: as on main. Each diagnostics.json lists the curve lengths, and the census's output is the same as on the earlier run of this PR that carried them in the IFC file (40445560304).

  • Verified end to end on real Revit files (BIM4LCA office, VTT, CC BY-SA 4.0; Core Interior and RE1, MIT; puzzbobb's R2025 models, Apache-2.0)

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • A user-visible change has its entry as a fragment under changelog.d/
  • What stays missing is stated (58 and 120 office walls)
  • 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

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content. revit-ifc's WallExporter and PropertyUtil were read for what its export does and not copied (CLEANROOM.md source 5).
  • No fixtures

Breaking changes

None.

… Lengths differ, from rvt-rs's curve length and Revit's Axis (#1046) (RE-252)
…Revit's Length is rvt-rs's curve or Revit's Axis on every wall (#1046) (RE-252)
…veLength values, and RE-252 states the R2025 result (#1046) (RE-252)
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 27, 2026 03:59
@DrunkOnJava
DrunkOnJava disabled auto-merge October 27, 2026 04:02
…its IFC file, and the census reads it there (#1046) (RE-252)
@DrunkOnJava DrunkOnJava changed the title feat(ifc): a wall carries its curve's length, and the quantity census counts apart a Length whose two possible values differ (#1046) (RE-252) feat(ifc): the export diagnostics list each wall's curve length, and the quantity census counts apart a Length whose two possible values differ (#1046) (RE-252) Oct 27, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 27, 2026 04:29
@DrunkOnJava
DrunkOnJava merged commit 47d825b into main Oct 27, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the re/wall-length-apart branch October 27, 2026 04:35
DrunkOnJava added a commit that referenced this pull request Oct 27, 2026
…d the census counts Revit's unscaled Perimeter apart (#1016) (#1053)

## Summary

A floor drawn as one extrusion whose type has one layer, as deep as the
extrusion, carries `Qto_SlabBaseQuantities.Depth` (the extrusion's
length) and `GrossVolume` (its profile's area times that length), as
Revit's export writes them. Its `Perimeter` is not written: Revit's
export writes it in feet as though they were the file's unit, and the
quantity census counts it apart as a Revit defect on each slab where
that is so (the maintainer's scope, 2026-10-26).

## Motivation

#1016 and W7. revit-ifc's `DepthCalculator`, `GrossVolumeCalculator` and
`PerimeterCalculator` (CLEANROOM.md source 5) were read for what the
export writes; the quantity candidate lister found `Depth` equal to the
extrusion's length and `GrossVolume` to its volume on the office's
single-layer floors.

## Changes

- `src/ifc/export_content.rs`: a floor with its `GrossArea` (RE-249)
gets `Depth` and `GrossVolume` only where its type has exactly one layer
and that layer is as deep as the extrusion. A layered floor gets
neither: Revit's export gives one layer's depth there.
- `tools/re/qtos_vs_ifc.py`: `SLAB_PERIMETER` in `REVIT_DEFECTS`,
counted apart per slab only where Revit's value, read as feet, equals
the perimeter of the profile Revit's own body for that slab extrudes
(relative 1e-4); every other slab's `Perimeter` stays scored, as
missing.
- RE-235 §5 (the defect row), `docs/supported-profile.md`, `README.md`,
`docs/release-1.0-criteria.md` (W7),
`changelog.d/added/slab-depth-volume.md`.
- `research/witness/*/observations/rvt-rs.json`: Core Interior's 78
single-layer floors gain the two quantities (78 more
`IfcQuantityLength`, 78 `IfcQuantityVolume`), refreshed from this PR's
Measure run; both verdicts replay PASS, unchanged.

## Testing

Measure
[40445558012](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40445558012)
(this change against `main`, unfiltered, `-f nordic=true -f r2025=true`,
every scorer), `qtos_vs_ifc`:

| model | `Depth` equal | `GrossVolume` equal | different | `Perimeter`
counted apart | quantities equal |
|---|---:|---:|---:|---:|---:|
| office as built | 0 → 13 of 42 | 0 → 13 of 42 | 0 | 13 | 20,556 →
20,582; scored 40,195 → 40,182 |
| office at permit | 0 → 13 of 42 | 0 → 13 of 42 | 0 | 13 | 20,543 →
20,569; scored 40,414 → 40,401 |

Rebased onto #1052, which counts 461 and 388 walls' `Length` apart:
together, 20,582 of 39,721 as built, 19,138 missing (README and W7 state
these), confirmed by the rebased branch's census (Measure
[40450968329](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40450968329)).
The rebase also corrects the census's comment on where the wall curve
lengths come from (the export diagnostics since #1052).

- Core Interior's export was made with base quantities off (RE-242): its
156 new quantities are counted apart (1,118 → 1,274). RE1 Architecture's
and every R2025 export are unchanged.
- Every other scorer's output is as on `main`; only the office and Core
Interior exports move. No project-count fixture pins the quantity entity
counts.

- [x] Verified end to end on real Revit files (BIM4LCA office, VTT, CC
BY-SA 4.0; Core Interior and RE1, MIT; puzzbobb's R2025 models,
Apache-2.0)
- [x] The witness verdicts replay with the refreshed observations

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A user-visible change has its entry as a fragment under
`changelog.d/`
- [x] What stays missing is stated (29 of 42 floors' `Depth` and
`GrossVolume`, 29 `Perimeter`s)
- [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] Apache-2.0
- [x] No Autodesk proprietary content. revit-ifc's calculators were read
for what its export does and not copied (CLEANROOM.md source 5).
- [x] No fixtures

## Breaking changes

None.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
DrunkOnJava added a commit that referenced this pull request Nov 4, 2026
#1308)

## Summary

Nineteen properties of `RvtElementRecordGeometry` were values one stage
of the export wrote so a later stage could read them back, not facts
about the element. They no longer reach the IFC. The exporter keeps them
to itself, works the opening cuts and each door's and window's
`OverallWidth` and `OverallHeight` out of them as before, and hands the
writer the result. Trust markers, provenance, identity and measured
facts stay in the set.

## Motivation

Griffin's decision of 2026-11-03 ("Move hand-offs out"): internal
hand-off values leave users' IFC, trust markers stay. It extends the
2026-10-27 rule for scorer-only values (a value only rvt-rs's own stages
or scorers read goes in internal state or the `rvt-ifc --diagnostics`
JSON, never in the IFC; #1052).

## Inventory

Every property written into `RvtElementRecordGeometry`, who reads it,
and what this PR does with it.

Hand-offs, moved out (19). No reader outside rvt-rs's own stages:
nothing in `tools/re`, `tests`, the viewer, Python or the docs reads any
of them, so the diagnostics JSON gets nothing.

| Property | Written for | Read by |
|---|---|---|
| `OpeningCentreX`, `OpeningCentreY`, `OpeningAxisX`, `OpeningAxisY`,
`OpeningBaseElevation`, `OpeningWidth`, `OpeningHeight` (RE-93, RE-94) |
doors, windows | `ifc::filler_type_cut` (the opening cut);
`OpeningWidth` and `OpeningHeight` also size `OverallWidth` and
`OverallHeight` |
| `InstanceOriginX`, `InstanceOriginY` (RE-87, RE-89) | turned family
instances | `ifc::tapered_host_window_cut` |
| `TypeWidth`, `TypeHeight` (RE-187) | doors | `OverallWidth`,
`OverallHeight`, last choice |
| `CutWidth`, `CutHeight` (RE-215) | doors, windows | `OverallWidth`,
`OverallHeight`, first choice; whether the opening gets
`Qto_OpeningElementBaseQuantities.Depth` (RE-244) |
| `CutSolidWidth`, `CutSolidDepth`, `CutSolidHeight` (RE-225) | windows
| `ifc::cut_solid_size` (the opening's depth and height) |
| `BoxWidth`, `BoxHeight` (#810) | doors, windows | `OverallWidth`,
`OverallHeight`, third choice |
| `SymbolWireWidth` (RE-318) | doors, windows | `OverallWidth`, ahead of
`BoxWidth` |

Kept, with what justifies it:

| Kind | Properties | Readers |
|---|---|---|
| Trust markers and provenance | `BodySource`, `ProfileResolved`,
`ProfileSource`, `BodyHeightSource`, `TopCoverElementId`,
`TopCoverElementIds`, `ThicknessResolved`, `Thickness`,
`ThicknessSource`, `SpaceOutlineSource`, `AreaBodyRefusal`,
`LevelBindSource`, `StoreyBindSource`, `FamilyNameSource` | 15
`tools/re` scorers, `saved_meshes.rs`, `schedule_csv.rs`, the quantity
passes, `rvt-ifc` diagnostics, tests |
| Identity and content | `LevelElementId`, `ElementId` (rooms),
`RoomNumber`, `RoomName`, `FamilyName`, `TypeName`, `RevitClass`,
`SourceStream`, the type's text parameters (RE-77), `NominalDiameter` |
the writer (`IfcSpace` and `ObjectType` names), `IDENTITY_PROPERTIES`,
`tests/fitting_nominal_diameter.rs`, `psets_vs_ifc` |
| Measured facts a scorer, test or the viewer reads |
`BoundingBoxHeight`, `AxisLength`, `SectionShape`, `SectionWidth`,
`SectionDepth`, `SectionWebThickness`, `SectionFlangeThickness`,
`Join{Start,End}WallElementId`, `Join{Start,End}RunsThrough`,
`JoinCutWallCount` | `tests/column_cut_body.rs`,
`beam_sections_in_ifc.py`, profile sets, the viewer's wall-join panel |
| Descriptive, read by nothing | `ProfileVertexCount`,
`ProfileVoidCount`, `ProfilePieceCount`, `TypeSymbolElementId`,
`TypeSectionWidth`, `TypeSectionDepth`, `JoinTrimStart`, `JoinTrimEnd`,
`JoinReachStart`, `JoinReachEnd`, `LevelBindResolved` | none; kept,
since the decision covers hand-offs, not properties nobody reads |

`AxisLength` and `SectionShape` are the borderline ones:
`add_beam_length` reads `AxisLength` back to write
`Qto_BeamBaseQuantities.Length` and
`material_profile_sets_from_sections` reads `SectionShape`, but both are
also the measured facts `beam_sections_in_ifc.py` scores from the IFC.
They stay (moving them would need a diagnostics key and a schema for no
change a user sees).

The other rvt-rs sets (`RvtWallGeometry`, `RvtArcWall`,
`RvtArcWallRectOpening`, `RvtFloorGeometry`, `RvtRsDiagnosticCandidate`)
carry nothing a later stage reads back.

## Changes

- `src/ifc/export_content.rs`: the 19 are collected in a separate list
(`RecordGeometry::handoffs`, `TypedProductionAppend::record_handoffs`,
by entity index) and never reach the entity's `property_set`. A mode
without geometry records none, as it wrote none. The `*_PROPERTIES`
constants stay `pub`, as the names of the hand-offs.
- `src/ifc/mod.rs`: `opening_cuts_through_hosts` reads the hand-offs
through new helpers, in place of the entity's property set.
`filler_sizes_from_handoffs` is the `OverallWidth` and `OverallHeight`
cascade (cut loop, opening, box or symbol wire width, type size), moved
here unchanged from the STEP writer. `IfcModel::filler_sizes` is new.
- `src/ifc/entities.rs`: `FillerSize` (width, height, whether the symbol
cuts an outline).
- `src/ifc/step_writer.rs`: reads `IfcModel::filler_sizes` instead of
working the sizes out of properties.
- `docs/support-matrix.json`: evidence names the new path.
`changelog.d/changed/handoffs-leave-ifc.md`.
- Witness observations of Core Interior (both artifacts), copied from
this PR's CI. `viewer/tests/journey.spec.ts`: the Core Interior journey
checks the downloaded IFC's door sizes.

## Serialised `IfcModel`

The model JSON the viewer holds changes in two ways: a door's or
window's `property_set` loses the 19 properties, and a `filler_sizes`
key appears when it is not empty (like `opening_cuts`). Nothing else
changes. The hand-offs are not in the model at all, so none reaches the
viewer's panel or Python. A first design kept them on the model under
`serde(skip)`; the viewer's "Download as IFC4 STEP" sends the model back
through `modelToIfcStep`, so a skipped table would have written every
door and window with `OverallWidth` and `OverallHeight` `$`.
`filler_sizes` is serialised for that reason.

Python's `rvt_to_ifc` calls `RvtDocExporter` and `write_step` on the
exporter's own model, with no JSON between. The opening cuts run inside
`export_rvt_doc_reporting`, before the model leaves the exporter; no
pass runs them on a deserialised model.

Viewer download path: `viewer/tests/journey.spec.ts` downloads the IFC
but checks its header and one element line, not its bytes against
`rvt-ifc`'s. No spec compares the two.

## Testing

Unit tests are banned in this repository: none added. Nothing was built
or run locally (`cargo fmt` only); the build, clippy, rustdoc and the
real-file gates are this PR's CI. Measured end to end on GitHub's
runners through Measure.

- [x] `tools/check-local.sh` passes: not run locally; this PR's CI (fmt,
clippy, rustdoc, the MSRV and platform builds, Corpus health,
IfcOpenShell, semver) passes
- [x] Verified end to end on real Revit files: see below
- [x] If this touches the IFC exporter: the witness verdicts replay:
both Core Interior observations refreshed from this PR's CI, replay
PASS, verdict files unchanged
- [x] Not a performance change

Measured result (Measure
[41755280111](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41755280111),
this change at `91bb0215` against `main` at `44b0b46c`, `-f nordic=true
-f r2025=true -f samples=true -f holdout=true -f keep_ifc=true`, every
scorer):

- **The IFC is `main`'s but for the 19 properties.** For each of the 93
models whose IFC the run kept (Core Interior, Einhoven, the four RE1
models, the office's four files, 24 R2025 models, 58 Autodesk samples
and the spent Vitoria pair), the base IFC with the 19
`IFCPROPERTYSINGLEVALUE` lines of `RvtElementRecordGeometry` removed,
their ids dropped from the set's list and every id renumbered in file
order, is byte for byte the head IFC (the run's clock in `FILE_NAME` and
`IfcOwnerHistory` masked, as Measure's own `ifc.sha256` masks it). 62 of
the 93 hold none of the 19 and are identical as written; 31 hold 22,338
between them (Core Interior 1,506; the office as built 3,959 and at
permit 3,925; RE1 Architecture 47; the R2025 Rooms_Door_Windows and its
five stair siblings 38 each; 21 Autodesk samples of 2024 to 2027, 10 to
2,501 each and 12,673 in all). `OverallWidth`, `OverallHeight`, the
openings and every other attribute and property are therefore what they
were. The comparison is `stepnorm.py` below.
- **Scorers.** `scorer-diff.txt` (artifact `compare-scorer-diff`) holds
two entries, both Core Interior's witness observation:
`IFCPROPERTYSINGLEVALUE` 29,214 to 27,708 (-1,506) and the observation
hash that follows from it. Every other scorer output of every model is
identical, `psets_vs_ifc` (W7), `qtos_vs_ifc` and
`door_window_sizes_vs_ifc` included, and so is every model's
`diagnostics.json` and `rvt-info` output.
- **Held-out models** (18, `-f holdout=true`, whose IFC is not kept):
counts and scorer outputs identical to `main`'s. The IFC hash differs on
10 of them, as it does on the measured models with doors or windows
above; their IFCs are not kept, so that is not checked line by line.
- **Core Interior witness.** The fresh observations are the ones this
PR's CI produced (`octetproof-core-interior`) for both artifacts, and
differ from the committed ones only in `IFCPROPERTYSINGLEVALUE` (29,214
to 27,708) and the hash. `tools/ci/witness-verdict.py` with CI's
arguments replays both to PASS (`replay: match` for all three
witnesses), and the committed `verdict.json` of each is byte for byte
what the replay writes, so no verdict file changes. The artifact's own
verdict, which reports the drift, is not committed.
`tests/fixtures/project-counts/2024-core-interior*.json` pin
`IFCPROPERTYSET` (6,510), which does not move (no set empties), and no
row pins `IFCPROPERTYSINGLEVALUE`, so neither fixture changes; Corpus
health passes.
- **The viewer's download.** `viewer/tests/journey.spec.ts` downloads
the IFC but checked its header and one element line, not its bytes
against `rvt-ifc`'s: no spec compared the two. The journey on Core
Interior now asserts that the downloaded STEP has an `IFCDOOR` line with
numeric `OverallHeight` and `OverallWidth` for every door the
diagnostics count (132). It passes in Deploy viewer
([41756212239](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41756212239)),
which runs the browser's path (`modelToIfcStep` on the model sent back
from JSON). Python's `rvt_to_ifc` writes the exporter's own model
without JSON.
- CI: all jobs pass, `semver checks` included (the `!` and the footer
announce the break).

The comparison script and the per-model log (`stepnorm.py <base.ifc>
<head.ifc>`, exit 0 when identical) are not committed; the IFCs are in
Measure's `measure-base` and `measure-head` artifacts for 90 days.


## Diagnostics

No key is added to `rvt-ifc --diagnostics` and
`docs/export-diagnostics.md` and
`docs/schemas/export-diagnostics.schema.json` do not change: no scorer
or test reads any of the 19. `parameter_value_count` counts `Pset_`
values only and does not move.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR: the only
doc naming these properties as written is the support matrix evidence,
updated; `reports/` and `CHANGELOG.md` keep the history they recorded
- [x] A user-visible change has its entry as a fragment under
`changelog.d/changed/`, with the upgrading note
- [x] No limitation is resolved or introduced
- [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] No Autodesk proprietary source, decompiled internals or NDA
content; no new byte-level finding
- [x] No new test fixtures; no real-world PII

## Breaking changes

BREAKING CHANGE: `rvt::ifc::IfcModel` has a new public field,
`filler_sizes`, and the property set of a door or window no longer holds
`OpeningCentreX`, `OpeningCentreY`, `OpeningAxisX`, `OpeningAxisY`,
`OpeningBaseElevation`, `OpeningWidth`, `OpeningHeight`,
`InstanceOriginX`, `InstanceOriginY`, `TypeWidth`, `TypeHeight`,
`CutWidth`, `CutHeight`, `CutSolidWidth`, `CutSolidDepth`,
`CutSolidHeight`, `BoxWidth`, `BoxHeight` and `SymbolWireWidth`. Nothing
user-facing changes value: `OverallWidth`, `OverallHeight` and the
openings are what they were.

## Related issues

Griffin's decision of 2026-11-03, "Move hand-offs out". Follows #1052
(scorer-only values) and #1300 (`SymbolWireWidth`).

---

An automated Claude Code agent (Sonnet 5.5) wrote this change and
measured it. The repo's Sonnet 5.5 xhigh review of a code-changing PR as
it leaves draft is the maintainer session's to run; it had not run when
this was written.
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