Skip to content

fix(ifc): a wall side's outer-loop area is summed from each loop's lowest vertex, so two exports of one file write the same GrossSideArea and GrossVolume (#1862) - #1863

Merged
DrunkOnJava merged 1 commit into
mainfrom
fix/1862-outer-loop-order
Nov 13, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
fix/1862-outer-loop-order

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Two exports of one file now write the same wall Qto_WallBaseQuantities.GrossSideArea and GrossVolume to the last bit. outer_loop_area (src/ifc/mesh_wall_quantities.rs) summed each boundary loop of a wall side from whichever vertex a HashMap yielded first. Each export added the same terms in another order, so the area moved by up to 2e-14 of its value.

#1852's element diff, comparing a file's export with itself, listed 4 to 117 walls as changed on seven of eleven models (run 43335692114, table on #1862). No other field or property moved on any of the eleven.

Motivation

rvt-diff --elements (#1843, PR #1852) compares the values an export holds. A value that moves from one export to the next shows as a change between two saves that did not change it.

Changes

  • outer_loop_area sums each loop from its lowest vertex: the loop starts are sorted before the walk. Vertex ids follow the triangles' order, which is the file's.
  • Whether a face's boundary closes into loops, and so whether it gets a gross area, does not depend on the start order and is unchanged.
  • Changelog fragment changelog.d/fixed/1862-outer-loop-order.md.

Testing

Rows, registered before the runs:

  1. Unfiltered Measure against the merge-base: every export's ifc.sha256 and diagnostics.json identical. A written value can move only at the sixth decimal of a wall GrossSideArea or GrossVolume that sat on a rounding boundary; any such move is listed here by model and wall. The same-project gates pass.
  2. feat(cli): rvt-diff --elements compares two saves of a model element by element, keyed by the GlobalId the IFC export writes (#1843) #1852's self-diff (probe_1843_element_diff, a file's export against itself) on a scratch merge of this branch and feat(cli): rvt-diff --elements compares two saves of a model element by element, keyed by the GlobalId the IFC export writes (#1843) #1852: no element changed on any of the eleven models of run 43335692114.

Results will be posted here.

  • tools/check-local.sh: CI is the compiler; rustfmt --edition 2024 --check passes locally
  • Verified end to end on real Revit files: rows 1 and 2
  • Touches the IFC exporter: witness verdicts replay unless row 1 shows Core Interior moved
  • Performance: n/a (one sort of a face's loop starts)

Audit-honesty checklist

  • README / docs reflect the current state after this PR: no doc states the gross areas move between exports
  • Changelog fragment under changelog.d/fixed/
  • No limitation resolved or introduced in the docs
  • Commit message says what and why
  • No emojis
  • No private paths or personal details
  • Not a format finding

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary source, decompiled internals or NDA material
  • No fixtures

Breaking changes

None.

Screenshots or output samples

None; rows 1 and 2.

Related issues

Closes #1862. Found by #1843's element diff (PR #1852).

…west vertex, so two exports of one file write the same GrossSideArea and GrossVolume (#1862)
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Row 2 holds. #1852's self-diff on scratch/1862-selfdiff (d53c3e27, #1852 with this branch merged in), run 43337607598: all eleven models report added=0 removed=0 changed=0, with unchanged equal to left. Before this fix, 7 of the 11 had 4 to 117 walls changed (run 43335692114).

The pair diff on the same scratch head (run 43337710630, 2025 samples against their 2026 saves) no longer lists any wall GrossSideArea or GrossVolume change either.

Row 1 is read on run 43337536977.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Row 1 holds. Unfiltered Measure 43337536977 at 3289a8c1, against the merge-base 925c482d:

  • 126 of 126 ifc.sha256 are identical, and 102 of 102 diagnostics.json.
  • No scorer line differs.
  • So no written value moved: no wall GrossSideArea or GrossVolume sat on a six-decimal rounding boundary in any model.

same-project gates passed on 3289a8c1. With row 2 (comment 6840322222), both rows hold. Ready for review.

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 13, 2026 01:05
@DrunkOnJava
DrunkOnJava merged commit f6622a4 into main Nov 13, 2026
65 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1862-outer-loop-order branch November 13, 2026 01:54
DrunkOnJava added a commit that referenced this pull request Nov 13, 2026
## Summary

Release metadata for v0.20.0 (RELEASE.md, steps 4 to 7), cut from `main`
at `925c482d` and merged with `main` up to `58395b62` (#1855, #1860,
#1861, #1863, #1866, #1867 and #1868 among it):
- every version file moves to 0.20.0 (`tools/release/bump_version.py`),
and `CITATION.cff` is dated 2026-11-12;
- the fragments under `changelog.d/` are assembled into a `[0.20.0]`
section, with its introduction and "Upgrading from 0.19" (the
work-budget bullet says a stop warns and the export is still written, as
#1855 settled);
- the README's release lines name v0.20.0;
- Core Interior's two witness observations and verdicts, and the two
synthetic IFC fixtures, are taken from CI's artifacts for `e10580d0`:
only `witness_version`, the verdict hashes, the retired "Unmapped Revit
unit identifiers" warning (RE-445) and an unset transparency (#1820)
differ.

Measured and rehearsed:
- the comparison with 0.19.0 is in the section, from Measure runs
[43357862138](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43357862138)
(unfiltered, `58395b62` against `v0.19.0`'s `09b18bd3`: 49 of 146
exports move, 0 census regressions, 0 body regressions) and
[43357979238](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43357979238)
(timing: no file more than 3% slower except one that reads 0.98 in the
earlier run of the same code, no peak higher by more than 2%, the
samples of 2023 to 2027 at a median 0.76 times the peak memory). The
release adds only notes, witness files, version strings and fixtures to
`58395b62`, so a run of `main` is the run of the release; a run of this
branch would move every export through the header's version string;
- `publish.yml` rehearsal on `d9946f4b`:
[43359414819](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43359414819)
passed. Only the changelog changed since.

**Why now.** `main` holds today's crafted-file and security fixes
(#1815, #1831, #1833, #1845), and neither GlobalId move. #1850 is back
in draft until the tag, and #1854's fix is #1859. Those two ship
together in 0.21.0 (#1854 comment 6841360704).

## Testing

- `python3 tools/release/changelog.py check` passes: no fragment is
left.
- `bump_version.py` checks the version files with the preflight's own
`check_versions`.
- The PII guard runs `release_preflight.py` on this PR.
- Timing against 0.19.0 is in the section, from run 43357979238 on
`58395b62`.

## Related issues

Release 0.20.0. Milestone `0.20.0`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ifc Work in the ifc area. type:bug Correctness defect or regression.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two exports of one file write different wall GrossSideArea and GrossVolume in their last bits

1 participant