Skip to content

fix(research): a room outline's straight-turn test takes a sine under 1e-8 as straight, so two timber office rooms drop a vertex Revit's outline does not have (#1825) - #1866

Merged
DrunkOnJava merged 2 commits into
mainfrom
fix/1825-straight-turn
Nov 13, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
fix/1825-straight-turn

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

native_area_regions.rs's continues_straight decides whether two straight edges of a room's outline run on in one line, so that the point between them is left out. It took a turn as straight only where its sine was under 1e-12. The threshold is now 1e-8.

On the BIM4LCA timber office, at both saves, two rooms (TSTO5, TSTO9) kept such a point, and Revit's own outline does not have it. #1825 row 7's variant at 1e-9 brought both rooms within 0.01 ft of Revit's (run 43338166730, named by kept-IFC run 43343069460; comments 6840784694 and 6840989096).

Motivation

#1825 counts the geometric tests whose threshold a small drift can tip. Row 7's census (comment 6839299460) found:

  • 8 turns with a sine between 1e-12 and 1e-9, all on the two timber office files, which the 1e-12 test kept as vertices;
  • none between 1e-9 and 1e-6 on those 102 published models.

The census on the 24 held-out, BIMcollab and rac_advanced IFC2X3 models (run 43344511881, counts only) adds one held-out Revit 2021 model. It holds 2 turns between 1e-12 and 1e-9, which row 7's variant moved without changing any scorer line, and 2 between 1e-9 and 1e-8. So on all 126 models the band with no value is 1e-8 to 1e-6, and 1e-8 also turns those last 2 into straight continuations. What that does to the held-out model is row 3.

Changes

  • continues_straight: 1e-12 → 1e-8, relative to the two edges' lengths as before, with a comment saying why.
  • Changelog fragment changelog.d/fixed/1825-straight-turn.md.

Testing

Rows, registered before the run:

  1. What moves. The exports that differ are the two timber office files, with TSTO5 and TSTO9 losing 2 outline points each, and the held-out Revit 2021 model that row 7's variant moved. Every other ifc.sha256 and diagnostics.json is identical. A move anywhere else is named here.
  2. Toward Revit's. On both timber office files, space_profiles_vs_ifc counts vertices within 0.01 ft 120 → 122. No line of any scorer moves away from Revit's export, the held-out models included.
  3. The held-out Revit 2021 model. Its 2 turns between 1e-9 and 1e-8 become straight here, beyond what row 7's variant measured. Its export moving is expected. Any scorer line of it moving is reported (counts only). If none moves, the 1e-8 to 1e-9 choice has no Revit evidence on that model either way, and the PR says so before it is marked ready.
  4. same-project gates pass.

The run: unfiltered Measure of this head against its merge-base, every scorer, with the samples, BIM4LCA, R2025, rac_advanced and the held-out models.

  • rustfmt --edition 2024 --check passes; CI runs the rest
  • Verified end to end on real Revit files: rows 1 to 4
  • Touches the IFC exporter: Core Interior's counts are not expected to move (row 1)
  • Performance: n/a

Audit-honesty checklist

Legal and contribution hygiene

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

Breaking changes

None.

Related issues

Part of #1825 (row 7).

… 1e-8 as straight, so two timber office rooms drop a vertex Revit's outline does not have (#1825)
…o turn as 1e-8 to 1e-6, a held-out model holding two between 1e-9 and 1e-8 (#1825)
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Unfiltered Measure 43344855602 at fc41289b against the merge-base 925c482d, read against the rows above.

  1. What moves. 3 of 126 exports: the two timber office files and the held-out Revit 2021 model. Every diagnostics.json is identical. Holds.

  2. Toward Revit's. On both timber office files, space-profile vertices within 0.01 ft go 120 → 122, from TSTO5 and TSTO9. No other scorer line of any model moves, the held-out models included. Holds.

  3. The held-out Revit 2021 model. Its export at 1e-8 (f7a1aa60…) differs from its export at row 7's 1e-9 variant (2857bcba…, run 43338166730). So its 2 turns between 1e-9 and 1e-8 do change it. Neither run moves any of its scored lines. So, as registered: the choice between 1e-9 and 1e-8 has no Revit evidence on that model either way.

    The PR keeps 1e-8 for Geometric tests at 1e-9 to 1e-12 that a line drifting 5e-8 ft can tip: count each on the corpus before changing any #1825's own reason. No value of the 126 models lies between 1e-8 and 1e-6, so a drift cannot tip any turn there. At 1e-9 the threshold would sit within a decade of values on both sides. 6cdd715f corrects the code comment to name that band; comment only.

  4. same-project gates pass on fc41289b.

Ready for review.

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 13, 2026 02:09
@DrunkOnJava
DrunkOnJava merged commit 6036f12 into main Nov 13, 2026
64 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1825-straight-turn branch November 13, 2026 02:38
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.

1 participant