Repository navigation
build(deps): earcut 0.4.12, shown to triangulate the same surfaces on the six exports it moves (#1553) - #1592
Merged
Merged
Conversation
… 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.
13 of 14 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
earcutmoves from 0.4.11 to 0.4.12. It re-splits six exports, andtools/re/ifc_surfaces_same.pyshows 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 ofearcut(#1557), which held it until that was shown, is removed.Closes #1553.
Motivation
earcut0.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'srac_advancedsample on 2023, 2024, 2025, 2026 and 2027, and Snowdon Towers' architectural sample on 2024. Theirdiagnostics.json,schema.txtand stage counts were identical, so only the bodies could differ, and no scorer reads the bodies of those samples butbodies_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 callsearcutinsrc/ifc/export_content.rsandsrc/research/native_saved_mesh.rs.Changes
Cargo.lock,fuzz/Cargo.lock:earcut0.4.11 to 0.4.12.Cargo.tomlasks for0.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). EachIfcTriangulatedFaceSetandIfcFacetedBrepis 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: theearcutignore 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, head441e4781againstmainatf8238889), thentools/re/ifc_surfaces_same.py base.ifc head.ifcon each pair:rac_advanced2023rac_advanced2024rac_advanced2025rac_advanced2026rac_advanced2027The 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,racadvandbimcollabincluded, whose results leave the runner as counts), and thesame-project gatescheck run on the head readspass: 15 samples held to their earlier saves, and the Areas on 4 saves and on the 2021 save.cargo deny,cargo auditand the semver check run in this pull request's CI.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None. The exports of six samples change in the order and split of their triangles; the surfaces they draw do not.