Repository navigation
feat(ifc): saved meshes replace a family instance's turned box, and decode ellipses, curved ruled surfaces and repeated ring points (RE-385) - #1620
Conversation
|
Thank you, @puzzbobb. I read this PR's two commits in full (the probe, RE-381 and the five decoder changes), and the report is what I want from a decoder PR: it says what is not scored against a Revit export, and what the bits of Three things before it can go in:
I will run the unfiltered Measure on the rebased head. If it is easier, tell me and I will rebase and renumber on your branch (maintainer edits are enabled); I will not touch it without your word. |
eaea477 to
5d12789
Compare
|
Thank you, @DrunkOnJava. All three are done on the branch:
Everything was measured again, against |
…ecode ellipses, curved ruled surfaces and repeated ring points (RE-385) Squashed from puzzbobb's two commits (e0cf3524, 5d12789e) and rebased by the maintainer onto main with DrunkOnJava#1629 and DrunkOnJava#1637; the conflicts were the imports, the stand-in comment and the BodySource test in src/ifc/saved_meshes.rs (a roof's level block and a turned box are both stand-ins, both kept) and the addenda at the end of docs/format-reconnaissance.md (both kept).
5d12789 to
c6c7368
Compare
… request has (#1639) ## Summary A new CI step in the PII guard job, `tools/ci/check_re_id_reuse.py`, fails a pull request that adds a report (`reports/**/RE-NN-*.md`) whose id another report of the merged tree already has, or that an earlier open pull request (a lower number) also adds. The later pull request fails, as `docs/maintaining.md` already says it is renumbered. Griffin asked for it through the project questions on 2026-11-10. ## Motivation On 2026-11-10 two pull requests carried an RE-392 before either was opened, and a contributor's pull request took an id another was about to use: renumbering after both land means rewriting the code, probes and changelog entries that cite it. The rule existed on paper (`reports/README.md`, `docs/maintaining.md`); nothing enforced it. ## Changes - `tools/ci/check_re_id_reuse.py`: reads the reports a pull request adds from the API's file list (a report it only edits or renames is not new), looks for another path with the id in the checked-out tree (the merge of the pull request into `main`, so that is `main`'s, or the pull request's own second file), and for an earlier open pull request adding the same id. API failures are NOT MEASURED warnings, as `cited-commits.py` does, never red. A push checks nothing. - `.github/workflows/ci.yml`: the step, after the API docs step, with `GH_TOKEN`, and a step for the pure tests. - `tools/ci/test_check_re_id_reuse.py`: ten failure-first cases of the pure rule (an id on main at another path, two new reports under one id, an earlier open pull request, a fresh id, the pull request's own file, `RE-12.md`, `RE-3` against `RE-30`, non-report paths, a subdirectory, no new report). - `docs/maintaining.md`, `reports/README.md`: say that CI enforces it. ## Testing End to end against the real API and a real checkout, from a scratch worktree of `main` (the pure rule also has the failure-first tests this repository keeps for its CI scripts, `tools/ci/test_check_re_id_reuse.py`, run in the PII guard job: a pure helper, ten cases): - [x] PR #1620 (adds RE-385, no earlier open pull request): passes, "the 1 new report(s) of #1620 take ids that main and the earlier open pull requests do not have". - [x] The same with a tracked `reports/element-framing/RE-385-other.md` added to the tree: `::error::RE-385 is already the id of reports/element-framing/RE-385-other.md on main: take the next free id`, exit 1. - [x] A pull request numbered 1639 whose files are stubbed to add `RE-385-dup.md`, against the real open pull requests: `::error::RE-385 is also added by #1620, opened first (...)`, exit 1. - [x] A push event: "not a pull request, nothing to check", exit 0. A pull request that adds no report (#1638): "adds no report", exit 0. - [x] The pure rule (`reused`) tried against nine cases: an id on main at another path, two new reports under one id, an earlier open pull request, a fresh id, the pull request's own file in the merge tree, a `RE-12.md` name, non-report paths, `RE-3` against `RE-30`, a subdirectory report. All as expected. - [x] `actionlint` and a YAML load of `ci.yml` pass; the new file has the mode of its neighbours. ## Audit-honesty checklist - [x] No user-visible change: no changelog fragment. - Limits: a pull request that adds a report with an id main does not have and that no other open pull request has passes even if a draft claim exists elsewhere (a claims file is not read); a closed-unmerged pull request's id is free; only the first 100 open pull requests and 300 files per pull request are read. ## Breaking changes None. ## Related issues Griffin's 2026-11-10 project questions; follows the RE-392 collision (#1632, #1637).
…ainst Revit's export where Measure holds it (#1643) ## Summary RE-385 said no mesh it adds is scored against Revit's export. Measure 42870269070 (the run #1620 landed on) scores the four models with Revit's export that it moves: the office's turned-box `IfcElectricAppliance` (51 of 51 within 0.001 ft, as built and at permit) and, counts only, a held-out house's windows (15 of 15 within 0.01% of Revit's volume, 9 within 0.001 ft) and one window of `teste_export_2025`. This adds that as section 5.1 and points the report's earlier sentence at it. ## Motivation rvtDevelop's read of #1620 found the evidence in the run's scorers and asked for it in the report. ## Changes - `reports/element-framing/RE-385-saved-meshes-every-box.md`: section 5.1 and one sentence in section 4. ## Testing Docs only. Every figure is read from the run's `measure-head` and `measure-base` artifacts (`mesh_bodies_vs_ifc.txt` of the office, the held-out `counts.txt` lines) and `tools/re/cmp_measure.py` (census regressions 0, body scorer regressions 0): command in the report's section 7 and the run link in section 5.1. - [x] `tools/ci/api-doc-ids.py` passes. ## Audit-honesty checklist - [x] No code or user-visible change: no changelog fragment. ## Breaking changes None. ## Related issues Refs #1191.
…ed by the length of their parameter range (RE-385) (#1642) ## Summary `face_grid` in `native_parametric_mesh.rs` steps each profile of a ruled component by `(range end - range start) / angular step`, then takes the larger of the profiles' steps. For an arc or an ellipse whose parameter range runs the other way (end below start), that quotient is negative, `n.max(..)` ignores it, and the grid is coarser than the profile's curvature needs, with no error. This takes the length of the range (`.abs()`), as the revolution reader of #1632 does for arcs. ## Motivation rvtDevelop's read of #1620 (RE-385) named it as the one thing to harden: nothing in the measured models shows a reversed range, so nothing changes there; the grid bound the reader states ("the angular step of its radius across an arc") would otherwise not hold for one. ## Changes - `src/research/native_parametric_mesh.rs`: the arc and ellipse step counts of a ruled component's profiles take `(r[1] - r[0]).abs()`. ## Testing No unit tests (banned); the change is measured end to end. - [ ] Measure unfiltered against `main` (the run for this head): every export byte-identical and no scorer moves is the expectation, since no measured model holds a reversed range; the run's numbers follow in a comment. - [x] rustfmt passes on the file. ## Audit-honesty checklist - [x] No user-visible change that any measured model shows: no changelog fragment. A model whose arc runs the other way would draw a finer ruled surface than before; none is known. ## Breaking changes None. ## Related issues Follows #1620 (RE-385).
## Summary Release 0.18.0. Everything merged since 0.17.0 (61 pull requests, `main` at 979ec42): every element that would be a bounding box drawn from the mesh Revit saved for it by default on Revit 2023 to 2027, roofs, railings, instances and curved surfaces read for it, railings aggregated under their stairs, the quantities and properties of the bodies drawn from meshes (walls, mullions, panels, roofs, floors, openings, round columns), four more "Export to IFC As" values, unique type GlobalIds, standalone family revolutions, a reason on every box that stays one (#1645), and a cut in the saved-mesh pass's peak memory on large files (#1690), with a part that remains (#1694). puzzbobb's #1620 and #1633 and BIM4GIB's #1628 and #1632 are credited in the introduction. The release's own Measure found a cost #1191 had not disclosed: the default export of a Revit 2023 to 2027 file took 1.4 to 4.4 times the peak memory of 0.17.0 (Core Interior 305 to 647 MiB, Snowdon Towers Architectural 1,072 to 3,964 MiB). #1691 cut the large files' share without changing a body (Core Interior 437 MiB, Snowdon Towers Architectural 2,086), and what is left is 1.1 to 1.9 times the time and 1.4 to 4.4 times the peak memory on Autodesk's samples of Revit 2023 to 2027, the most on the small `rac_basic` samples (200 to 875 MiB), which #1691 did not move. The notes, README, docs and help text state the measured figures, and #1694 tracks the rest. The project owner was shown these figures before the release was armed and chose to tag with them stated (2026-11-11). ## Changes - Version 0.17.0 -> 0.18.0 in: - Cargo.toml; - rvt-py/Cargo.toml and its `=` pin; - rvt-mcp/Cargo.toml and its `=` pin; - rvt-wasm/Cargo.toml; - tools/stream_evidence/Cargo.toml's pin; - viewer/package.json; - CITATION.cff (version and date); - Cargo.lock and fuzz/Cargo.lock. - `python3 tools/release/changelog.py assemble`: 42 fragments go into `[0.18.0]`, with an introduction, what is not measured, the measured bullets and "Upgrading from 0.17"; #1690's entry arrived after the assembly and is written into `[0.18.0]` Fixed by hand. - README: the latest release, the "Upgrading from 0.17" and "after 0.18.0" fragments sentence, and two sentences that still described roofs on Revit 2023 to 2027 and the saved-mesh default as limited to family instances (`docs/evidence.md` row likewise). - The Core Interior witness observations and verdicts, and the synthetic fixtures, from this pull request's CI run 42949885323: only `witness_version`, the verdict hashes and the fixtures' version strings differ. - The measured cost of the saved-mesh default replaces #1191's first figures (24.4 s and 1,423 MiB against 21.2 s and 913, "1% to 17% more time and up to 59% more peak memory"): the changelog, README, `docs/python.md`, `docs/release-1.0-criteria.md`, `docs/support-matrix.json`, the `--no-saved-meshes` help text of `rvt-ifc` and `rvt-gltf` and the module doc of `src/ifc/saved_meshes.rs` quote Measure run 42956917709; the viewer's wasm memory in the changelog and `docs/viewer-api.md` is Deploy viewer run 42957158734 on `main` at 979ec42 (Core Interior 308 to 383 MiB, not 324). The source changes are help text and doc comments only. ## Testing - `python3 tools/ci/release_preflight.py check --event workflow_dispatch --ref-type branch --ref-name chore/release-0.18.0 --sha HEAD`: ok, version 0.18.0. - `python3 tools/release/changelog.py check`: ok. `rustfmt --edition 2024 --check` on the three Rust files: ok. - The release's baseline Measure, `main` at 8334726 against v0.17.0 with every flag, the held-out models and timing: run [42949360321](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42949360321), read into the changelog's "Measured against 0.17.0" bullets; #1691 moves no export, run [42954375538](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42954375538). - The timing of the final code: run [42956917709](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42956917709), v0.17.0 against #1691's head (the same source as `main` from 979ec42: `git diff --stat` over src, Cargo.toml and Cargo.lock is empty), one runner per file, the median of three exports, 58 files. - The dry run RELEASE.md step 7 asks for: `publish.yml` dispatched on this branch at b001cb3, [run 42949890449](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42949890449), every job green (the wheels installed and opening a model, `cargo install` with the CLI sample, the docs.rs preview, the viewer load smoke), and again at bd6875d after #1691 and the notes: [run 42959626601](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42959626601); the head since moved two commits that change CHANGELOG.md only: 4762e14 (the table's own minimum peak ratio, 1.42, an introduction sentence on the cost, a bullet's lead) and 13373e7 (every cost reads from 0.17.0's figure to 0.18.0's). Nothing was published. - The same-project gates, which `arm.sh` needs on a commit holding the PR's edits under `src/` (help text and doc comments only): Measure run [42961127420](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42961127420) on 4762e14, `samples=true`, default scorers: pass, 15 samples held to their earlier saves and the Areas on 4 saves and on the 2021 save. Unit tests: N/A. ## Audit-honesty checklist - [x] Each entry keeps its caveats; the introduction lists what is not measured. - [x] The saved-mesh cost is the measured one, with what is still above 0.17.0's named (#1694). - [x] No emojis, private paths or PII. ## Legal and contribution hygiene - [x] Apache-2.0. No Autodesk source, internals or NDA material. ## Breaking changes The saved-mesh default and its library names (`SavedMeshChoice::Default`, `saved_meshes::default_scope`, new `SavedMeshChoice::DoorsAndWindows`), listed under "Upgrading from 0.17".
Summary
After #1610, which draws every boxed element of a Revit 2023 to 2027 file from its saved mesh by default, this offers a family instance drawn as its turned record box (RE-87) to its saved mesh too, and reads three things the saved-graphics reader refused: a
GEllipseprofile, aRuledSurfbetween curves, and a trim ring that repeats its first point. Snowdon Towers Electrical keeps 18 of its 2,428 elements as boxes, against 300; 16 of them are pendant drops whose nestedGInstanceis forbidden the targets 10, which stays refused (RE-385 §3.5). Report: RE-385.Motivation
#1191 (W6: no body is a bounding box). Snowdon Towers Electrical (Revit 2025) opened in the viewer read "132 of 2428 drawn from the element's own data; 2296 are the element's bounding box". With #1610 every boxed element is offered its saved mesh, and the file still keeps 300 boxes.
probe_re385_saved_meshes_every_boxlists what each one's saved graphics report (the 2025 edition; the 2024 one, which CI can fetch, gives the same but for the two rows marked):partition_family_instance_turned_boxis not offered a saved meshunsupported parametric profile curve GEllipse(pendant domes)Curve::Ellipseboundary sample was discarded by triangulation(conduit end caps)instance target restrictions are unsupported(art-glass pendant drops)m_targetsname is not readnonlinear ruled profiles need a curvature policy(hand dryers)nested detail-family filter requires view semanticsmultiple cylinder trim loops unsupported(Pendant Light - Linear)The other box left is a floor, which
attach_scopednever offers a saved mesh.Changes
src/ifc/saved_meshes.rs:attach_scoped_with_controltakesINSTANCE_TURNED_BODY_SOURCEamong its candidates.src/research/native_parametric_surface.rs:Curve::Ellipse, read fromGEllipse'sm_center,m_xVec,m_yVec,m_xLen,m_yLenandm_endParams(unit, orthogonal axes and positive lengths checked);Curve::range, andevalvisible in the crate.src/research/native_parametric_mesh.rs: a revolved ellipse is stepped as a circle of its larger semi-axis; a ruled component's grid takes each profile's steps from its own curvature (lines one per foot, arcs and ellipses the angular step of their radius), with the twist bound it had.src/research/native_saved_mesh.rs:retain_boundary_pointstakes a sample that coincides with one already used as used.probes/examples/probe_re385_saved_meshes_every_box.rs,reports/element-framing/RE-385-saved-meshes-every-box.md, an addendum todocs/format-reconnaissance.md,docs/status.md,changelog.d/added/saved-meshes-every-box.md.Testing
Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.
tools/check-local.shpasses (fmt, clippy, rustdoc, build, real-file / CLI / contract checks)cargo fmt --all --checkandcargo clippy --profile ci --workspace --all-targets -- -D warningspass at the branch head. The fulltools/check-local.sh --corpuspassed before the rebase (300 of 301, the one failure a missing local 2027 family sample) and has not been rerun oncbeba4c7.probe_re385_saved_meshes_every_boxatmain(cbeba4c7) and at this branch on Snowdon Towers Electrical 2024 (pinned inresearch/autodesk-sample-projects.tsv) and 2025, Architectural and Facades 2025, and Core Interior (MIT,magnetar-io/revit-test-datasets): the tables above and in RE-385 §3 and §4.rvt-ifcatcbeba4c7against this branch, default, on 29 projects of Revit 2023 to 2027: Autodesk's sample projects of 2023 to 2027 and its five Snowdon Towers 2024 models (pinned), Core Interior, Einhoven, and, local only, the seven Snowdon Towers 2025 models and the two Golden Nugget models. No export fails; every file has the same number of building elements. 8 IFCs are identical (timestamps aside): Einhoven, Core Interior,rst_basic2023, 2024 and 2027,rac_advanced2026 and 2027,rst_advanced2027. The 21 others draw more bodies from saved meshes (RE-385 §5).cbeba4c7, none added here.cbeba4c7's, so neither observation changes.tools/bench.shand attached the before / afterAudit-honesty checklist
changelog.d/<section>/(seechangelog.d/README.md), not inCHANGELOG.mddocs/status.md.m_forbiddenTarget.m_targets10 is an existing limitation, now measured: RE-385 §3.5 and §6 count the elements it keeps as boxes and say what would decide it.probes/examples/and a dated addendum todocs/format-reconnaissance.mdare includedprobes/examples/probe_re385_saved_meshes_every_box.rs.Legal and contribution hygiene
CONTRIBUTING.md)CLEANROOM.md)Formats/Latest.testuser,111111,FY-20XX, etc.) and contain no real-world PIIBreaking changes
research::native_parametric_surface::Curve(unstable-research) has a new variant,Ellipse; an exhaustivematchon it outside the crate needs an arm for it.--no-saved-mesheskeeps the boxes, as before.Screenshots or output samples
probe_re385_saved_meshes_every_boxon Snowdon Towers Electrical 2025, atcbeba4c7and at this branch:Related issues
Refs #1191, #1610