Skip to content

feat(cli): rvt-gltf --progress, with saved-graphics stages in WalkerControl - #1073

Merged
DrunkOnJava merged 2 commits into
DrunkOnJava:mainfrom
n3ur0m4n:feat/progress
Oct 27, 2026
Merged

DrunkOnJava merged 2 commits into
DrunkOnJava:mainfrom
n3ur0m4n:feat/progress

Conversation

@n3ur0m4n

Copy link
Copy Markdown
Contributor

Summary

rvt-gltf --progress prints the conversion's progress to stderr in the progress: <stage> <done>/<total> lines
of rvt-elements --progress, now including two new stages for saved graphics. The .glb is byte-identical with
or without the flag.

Motivation

Closes #1072. A front end running rvt-gltf cannot tell progress from a hang: the export walked the elements
without a WalkerControl, and reading saved graphics, about half of the time with --saved-meshes, had no stage.

Changes

  • src/control.rs: Stage::SavedGraphics (saved-graphics, 0 then 1/1) and Stage::SavedMeshes
    (saved-meshes, done/total are elements).
  • src/native_saved_scene.rs: extract_at_detail_with_control, which reports both stages and checks the token
    before each pass over the file and before each element's mesh. Elements meshed in parallel report under a lock,
    so done rises by one per element. extract_at_detail calls it with the default control.
  • src/ifc/saved_meshes.rs: attach_with_control; attach calls it with the default control.
  • src/ifc/mod.rs: RvtDocExporter::export_with_mode_limits_and_control walks the elements through
    iter_elements_with_control. A walk that fails still leaves the metadata-only model, as before; a cancelled
    one now returns Error::Cancelled instead of being taken for a failed walk.
  • src/bin/rvt_gltf.rs: --progress.
  • tests/rvt_gltf_progress_cli.rs (class cli): stderr lines and an unchanged .glb on the tier-1 fixture;
    on RE1-Architecture (skipped unless RVT_PROJECT_CORPUS_DIR holds it) one saved-meshes line per element in
    order up to n/n, and a cancelled token stopping both the export and the saved-graphics read.
  • changelog.d/added/rvt-gltf-progress.md: the entry.
  • A second commit takes up the note from the review of perf(saved-graphics): read and mesh saved graphics faster, same output #882: the parallel meshing joins its workers with
    resume_unwind, so a worker's panic keeps its own message instead of expect's.

Testing

  • tools/check-local.sh passes, with the reference models from tools/fetch-reference-models.sh in place.
  • Verified end to end on real files: rvt-gltf <file> --saved-meshes writes the same bytes as main, with
    and without --progress, on the six redistributable reference models and the three tier-1 fixtures.
  • N/A: does not change the IFC exporter's output.
  • N/A: no performance change (one callback per element, only when a callback is attached).

Audit-honesty checklist

  • README / docs reflect the current state: no claims change.
  • The user-visible change has its entry in changelog.d/added/rvt-gltf-progress.md.
  • N/A: no limitation resolved.
  • No new limitation.
  • Commit message describes what changed and why.
  • No emojis.
  • No private paths, personal email addresses, or internal jargon in committed files.
  • N/A: not a reverse-engineering finding.

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0.
  • No proprietary source, decompiled internals, or NDA'd SDK content: the change only threads the existing
    WalkerControl through existing rvt-rs code. The work was done with the help of Claude, as the commit's
    Co-Authored-By trailer says, under the same clean-room rules.
  • N/A: no new fixtures.

Breaking changes

None. control::Stage gains two variants, and it is #[non_exhaustive]; no function signature changes.

Screenshots or output samples

rvt-gltf RE1-Electrical.rvt --saved-meshes --progress (repeated lines elided):

progress: schema-parse 0
progress: schema-parse 1/1
progress: candidate-scan 0/1312996
progress: candidate-scan 1048576/1312996
progress: candidate-scan 1312996/1312996
progress: element-decode 0/0
progress: partition-scan 0
progress: partition-scan 1/1
progress: saved-graphics 0
progress: saved-graphics 1/1
progress: saved-meshes 0/49
progress: saved-meshes 1/49
...
progress: saved-meshes 49/49

Related issues

Closes #1072. Follows #882.

🤖 Generated with Claude Code

n3ur0m4n and others added 2 commits October 27, 2026 17:51
…ontrol

rvt-gltf gave no sign of life while converting: the export walked the
elements without a WalkerControl, and reading saved graphics had no stage.

- control::Stage gains SavedGraphics (0 then 1/1) and SavedMeshes (one
  report per element meshed).
- native_saved_scene::extract_at_detail_with_control,
  ifc::saved_meshes::attach_with_control and
  RvtDocExporter::export_with_mode_limits_and_control take a WalkerControl;
  the existing functions call them with the default one. A cancelled walk
  now stops the export with Error::Cancelled instead of being taken for a
  failed walk.
- rvt-gltf --progress prints the lines of rvt-elements --progress.

The .glb is byte-identical with and without the flag on the reference
models and the tier-1 fixtures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013R5i8yaee9fxwTCUC1Qkbg
The parallel meshing joined its workers with expect(), which panics again
with a new message and loses the worker's. resume_unwind carries the
original panic through, as suggested in the review of DrunkOnJava#882.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@n3ur0m4n
n3ur0m4n requested a review from DrunkOnJava as a code owner October 27, 2026 17:06
@DrunkOnJava

Copy link
Copy Markdown
Owner

Thanks, this is a clean change. I checked:

  • Export mode. rvt-gltf used Exporter::export, which is export_with_mode_and_limits(Scaffold, WalkerLimits::default()). The new call passes the same mode and limits, so only the control is new.
  • No token, no change. With the default control, check() never fails and report() calls nothing. Every existing caller of extract_at_detail, attach and export_with_mode_and_limits goes through it.
  • API. The two stages come last in the #[non_exhaustive] Stage enum, and semver checks passes.
  • Measure, against main (5a81e74), on all 31 reference models (Core Interior, Einhoven, RE1's four, both BIM4LCA offices, puzzbobb's 23 R2025 models):
run flags IFC byte-identical to main
40557530610 default 31 of 31
40557542838 --saved-meshes 31 of 31

The second run goes through the new extract_at_detail_with_control: Core Interior draws 138 of 138 bounding-box bodies from their saved graphics, as on main. The resume_unwind follow-up from #882 is welcome too.

Merging. The squash message keeps your description and leaves the commit trailers out, as with #882.

@DrunkOnJava
DrunkOnJava merged commit e5846fe into DrunkOnJava:main Oct 27, 2026
29 checks passed
@n3ur0m4n

Copy link
Copy Markdown
Contributor Author

Thanks a lot for the thorough review and for merging! Checking it against all 31 reference models, with and without --saved-meshes, is far more than I expected, and it's reassuring to see the IFC output byte-identical across the board. Thanks also for keeping the description in the squash message.

And thanks for rvt-rs in general: it has been really valuable for our work with Revit models.

@DrunkOnJava DrunkOnJava mentioned this pull request Oct 30, 2026
4 tasks done
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
## Summary

Release metadata for v0.11.0 (RELEASE.md steps 4 to 7). Merging this is
not the release: the signed `v0.11.0` tag on its squash commit is.

## Motivation

`main` holds user-facing fixes that installed users do not have yet,
above all #1075 (a model over the reader's limits exported empty with
exit status 0; the reporter can verify only from a release) and #421
(files that kept an older schema read as zero elements). It also holds
the breaking removal of unused stable API (#1128), which makes this a
minor release.

## Changes

- Version 0.11.0 in `Cargo.toml`, `rvt-py/Cargo.toml` (and its `=0.11.0`
pin), `rvt-wasm/Cargo.toml`, `tools/stream_evidence/Cargo.toml`,
`viewer/package.json`, `CITATION.cff` (dated 2026-10-30), both
lockfiles' workspace entries, and the `FILE_NAME` / `IFCAPPLICATION`
lines of the two synthetic IFC fixtures, which the contract checks
compare byte for byte since #1133. RELEASE.md's version list now names
those fixtures.
- `CHANGELOG.md`: `changelog.py assemble` moved the 33 fragments into
`[0.11.0] — 2026-10-30`, with an introduction, credits (puzzbobb: #1074,
#1076, #1077, #1081; n3ur0m4n: #1073) and "Upgrading from 0.10" (removed
API, exit status 3 for a model over the limits, saved meshes on by
default, properties no longer written, `Flagged` schema fields, the
probes crate).
- `README.md`: "Release 0.11.0 and main", and the reconnaissance probes
point at `probes/examples/` (#1132).
- `rvt-py/README.md` (packed into the wheel): what `write_ifc()` does
when part of a file was over the limits.

## Testing

CI is the gate. After this PR's CI, both Core Interior `rvt-rs.json`
witness observations and their verdicts are refreshed from its
`octetproof-core-interior` artifact (only `witness_version` and the
verdict hashes may differ); the PR stays unarmed until then.

## Audit-honesty checklist

- [x] The changelog section and README release section state only what
the entries measured
- [x] No emojis, private paths or internal jargon

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content

## Breaking changes

The release carries #1128's removal of unused public API; "Upgrading
from 0.10" lists what a user changes.
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.

feat(cli): rvt-gltf --progress, with saved-graphics stages in WalkerControl

2 participants