Skip to content

build(deps): earcut 0.4.12, shown to triangulate the same surfaces on the six exports it moves (#1553) - #1592

Merged
DrunkOnJava merged 1 commit into
mainfrom
deps/earcut-0.4.12
Nov 9, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
deps/earcut-0.4.12

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

earcut moves from 0.4.11 to 0.4.12. It re-splits six exports, and tools/re/ifc_surfaces_same.py shows that every surface of those six is the same surface it was: the same polygons, or the same points with the same faces and boundaries and only the diagonals that cut them different. Dependabot's ignore of earcut (#1557), which held it until that was shown, is removed.

Closes #1553.

Motivation

earcut 0.4.12 ("speed up triangulation with slice inputs and faster hole bridging") changed which exports rvt-rs writes. Measure run 42538445237 found six moved of 92: Autodesk's rac_advanced sample on 2023, 2024, 2025, 2026 and 2027, and Snowdon Towers' architectural sample on 2024. Their diagnostics.json, schema.txt and stage counts were identical, so only the bodies could differ, and no scorer reads the bodies of those samples but bodies_across_saves. #1547 held the crate at 0.4.11 until a change of triangulation was shown to leave the surfaces as they were. rvt-rs calls earcut in src/ifc/export_content.rs and src/research/native_saved_mesh.rs.

Changes

  • Cargo.lock, fuzz/Cargo.lock: earcut 0.4.11 to 0.4.12. Cargo.toml asks for 0.4.5, so it is the lockfiles alone.
  • tools/re/ifc_surfaces_same.py (new): two exports of one file by builds that differ in nothing but a triangulator, paired entity by entity by STEP id (it stops if an id has another entity type on the other side). Each IfcTriangulatedFaceSet and IfcFacetedBrep is reduced to its polygons, rounded to a micrometre, and the two sides are compared: same polygons (the same multiset, in any order and from any corner), same surface (the same points, and in every plane the same total area to 1e-9 and the same boundary: the edges an odd number of its polygons hold, since a diagonal is held by two triangles and drops out), or different. It exits 1 on any different one. It reads no Revit export and writes nothing.
  • .github/dependabot.yml: the earcut ignore and its comment are removed.

Testing

Unit tests: N/A. The check is the script on the exports it was written for.

  • The six moved exports, surface by surface. Measure run 42593569119 (keep_ifc, head 441e4781 against main at f8238889), then tools/re/ifc_surfaces_same.py base.ifc head.ifc on each pair:

    export surfaces compared same polygons same surface different
    rac_advanced 2023 124 123 1 0
    rac_advanced 2024 125 124 (one a faceted brep) 1 0
    rac_advanced 2025 125 124 (one a faceted brep) 1 0
    rac_advanced 2026 124 123 1 0
    rac_advanced 2027 124 123 1 0
    Snowdon Towers Architectural 2024 172 170 2 0

    The 2023 pair is the one the first attempt could not pair: the earlier head was cut before feat(ifc): Revit 2015 to 2023 curtain walls are IfcCurtainWall with their parts under them (#1190) (RE-366) #1519, so its 2023 export held other entities and the STEP ids did not line up. This head is on current main.

  • Nothing else moves. Measure run 42593566009, the head against main, -f samples=true -f nordic=true -f r2025=true -f racadv=true -f bimcollab=true -f holdout=true, every scorer: 112 of the 118 exports are byte-identical and the six that differ are the six above; the scorer diff is empty (the held-out models, racadv and bimcollab included, whose results leave the runner as counts), and the same-project gates check run on the head reads pass: 15 samples held to their earlier saves, and the Areas on 4 saves and on the 2021 save.

  • cargo deny, cargo audit and the semver check run in this pull request's CI.

Audit-honesty checklist

  • A moved surface is judged by what it is, not by its hash: a triangulator that changed a boundary or an area would read different and exit 1.
  • The script's limit is stated: it compares surfaces of two exports of one file that keep their STEP ids, which two builds that differ only in a triangulator do. A change that adds or drops an entity is outside it.
  • No emojis, private paths or PII.

Legal and contribution hygiene

  • Apache-2.0. No Autodesk source, internals or NDA material.

Breaking changes

None. The exports of six samples change in the order and split of their triangles; the surfaces they draw do not.

… the same surfaces, and Dependabot's hold on earcut lifted (#1553)

earcut 0.4.12 moved the triangulation of six exports (Measure run 42538445237).
tools/re/ifc_surfaces_same.py pairs the surface entities of a base and a head
export by STEP id and tells a re-split face from a changed one; the bump's
evidence is its output on those exports. Dependabot's ignore of earcut (#1557),
which held it until that showed the surfaces the same, is removed.
@DrunkOnJava
DrunkOnJava merged commit 4ad2ce9 into main Nov 9, 2026
42 checks passed
@DrunkOnJava
DrunkOnJava deleted the deps/earcut-0.4.12 branch November 9, 2026 10:00
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
… another wall is cut whole, as Revit cuts it, and counted apart (#1067) (RE-375) (#1596)

## 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 #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
- [x] Verified end to end on real Revit files: unfiltered Measure
[42598250689](https://github.com/DrunkOnJava/rvt-rs/actions/runs/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 #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.
- [x] 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

- [x] README / docs reflect the current state after this PR: the
diagnostics table and schema, RE-320 and the reconnaissance addendum.
- [x] A user-visible change has its entry as a fragment under
`changelog.d/changed/`
- [x] If a limitation was resolved, the docs are updated: the stub of
3004978 no longer keeps its full height.
- [x] 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.
- [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: RE-375 (landed in #1591) holds the
scorer and the report; this applies its rule and adds section 8 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 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.
- [x] 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.
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.

earcut 0.4.12 moves six exports: show the surfaces are the same before taking it

1 participant