Skip to content

fix(ifc): an export names the model by its file name, not the path it was saved at (#782) - #783

Merged
DrunkOnJava merged 1 commit into
mainfrom
fix/export-name-without-path
Oct 18, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
fix/export-name-without-path

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

An export of a Revit file without a PartAtom title, as most projects are, is named after the file name in its original path rather than the whole path. Closes #782.

Motivation

The name came from BasicFileInfo's original path with every folder in it, so the author's Windows account and client or project folder names reached:

  • the IFC header's FILE_NAME;
  • the IfcProject's Name;
  • the glTF scene root and the viewer's project node;
  • the export diagnostics' input.project_name, though the diagnostics redact the same path as input.original_path.

Changes

  • src/ifc/mod.rs: original_file_stem takes the path's last segment without a .rvt, .rfa, .rte or .rft extension. It splits on both \ and /, since the path is Windows-style on every host, and an empty result falls back to "Untitled" as before. Both fallbacks use it: RvtDocExporter's and PlaceholderExporter's.
  • CHANGELOG.md: a Fixed entry.
  • rvt-info still reports the original path (redacted with --redact), as inspection of the file.

Testing

  • Measure, this branch against main with the Autodesk samples (39126109068): 465 output files on each side, 347 of them byte-identical, among them every scorer's output, info.json and schema check on all 55 models. What differs is only what the change names:
    • each of the 55 diagnostics.json in input.project_name alone, for example B:\Git\revit-test-datasets\Revit\2024_Core_Interior.rvt → 2024_Core_Interior, a C:\Users\<account>\Documents\…\RE1.rvt → RE1, and C:\Content_Inst_P4\…\rac_basic_sample_project3.rvt → rac_basic_sample_project3;
    • the six reference models' IFC hashes, and the byte counts the rvt-ifc logs report (Core Interior's IFC is 82 bytes shorter: the escaped path, twice);
    • the timings and the runner's CPU.
  • CI: every job, the witness replays included, passed. The Core Interior export in the run's witness artifact reads FILE_NAME('2024_Core_Interior.ifc',…) and IFCPROJECT(…,'2024_Core_Interior',…), where it carried the B:\Git\… path before.
  • Deploy viewer: the browser tests pass, 21 of 21, as on main.

Breaking changes

IfcProject.Name, FILE_NAME and the diagnostics' project_name change for files without a PartAtom title, from a path to a file name.

… was saved at (#782)

A Revit file without a PartAtom title, as most projects are, took its
export's name from BasicFileInfo's original path, with every folder in
it: the author's Windows account and client or project folder names
reached the IFC header's FILE_NAME, the IfcProject's Name, the glTF scene
root, the viewer's project node and the export diagnostics' project_name,
though the diagnostics redact the same path as original_path. Both
fallbacks now take the path's last segment without its Revit extension,
splitting on either separator because the path is Windows-style on every
host. rvt-info still reports the original path, as inspection of the file.
@DrunkOnJava DrunkOnJava added area:ifc Work in the ifc area. type:bug Correctness defect or regression. labels Oct 18, 2026
@DrunkOnJava
DrunkOnJava merged commit 4fe8cb2 into main Oct 18, 2026
27 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/export-name-without-path branch October 18, 2026 12:24
DrunkOnJava added a commit that referenced this pull request Oct 18, 2026
## Summary

Prepare v0.5.1, a patch release of 0.5.0: exports are named by the model's file name rather than the path it was saved at (#782, fixed in #783), and the README names the release it ships in. Merging this is not the release: the release is the signed `v0.5.1` tag on the merged commit.

## Motivation

crates.io and PyPI show the README packed into each version, and a published version's README can never be edited. 0.5.0's README still called 0.4.0 the latest release and listed 0.5.0's changes as "what `main` adds since 0.4.0", both on [crates.io](https://crates.io/crates/rvt/0.5.0) and on [PyPI](https://pypi.org/project/rvt/0.5.0/). That happened because `RELEASE.md` moved the README's release section only after publishing.

While 0.5.0 was being checked, its exports turned out to name a model after the full path it was saved at, which can carry the author's Windows account and folder names (#782). #783 fixed that on `main`, measured to change nothing but the names, and this release carries it.

## Changes

- **Versions 0.5.0 → 0.5.1** in the nine files that carry them: `rvt`, `rvt-py` and its pin, `rvt-wasm`, the `stream_evidence` pin, `CITATION.cff`, `.release-please-manifest.json`, `viewer/package.json` and both lockfiles' workspace entries.
- **README:** "Release 0.5.1 and main" names v0.5.1 and summarises what 0.5.0 added, and Revit 2026 support is "experimental (since 0.5.0)" rather than "on `main`". It states no channel checks.
- **`RELEASE.md`:** the release pull request moves the README's release section (step 8). The post-release pull request moves the other docs and records the checks.
- **`CHANGELOG.md`:** `[0.5.1] — 2026-10-18`, covering the export name fix (#782), the README fix, serde_json 1.0.154 (#776) and the Snowdon pins for Measure (#779), with an **Upgrading from 0.5.0** note on the name change.
- **Witnesses:** the IFC header carries the version, so both Core Interior `rvt-rs.json` observations and verdicts are refreshed from this pull request's CI run.

## Testing

- CI on this pull request, the witness replays included.
- Since 0.5.0, `main` changed the export name (#783), serde_json's patch version (#776), the Snowdon pins for Measure (#779, no crate code) and Dependabot's configuration (#780). #783's Measure run against `main` ([39126109068](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39126109068)) differs only in the names, the IFC hashes and byte counts that follow from them, and timings.

## Breaking changes

For a file without a PartAtom title, `IfcProject.Name`, `FILE_NAME` and the diagnostics' `project_name` are the file name rather than its saved path (#782).
DrunkOnJava added a commit that referenced this pull request Oct 18, 2026
… under, not its folders (#782) (#785)

## Summary

Export diagnostics report the file name the model was saved under as `input.original_path`, without its folders. Follow-up to #782.

## Motivation

#783 named exports by the original path's file name. But the diagnostics, which people attach to bug reports and the viewer offers as a download, still carried the whole path. Only the Windows account folder was redacted, so `C:\Users\<redacted>\Documents\Clients\…\model.rvt` still named the client and project folders.

## Changes

- `src/ifc/mod.rs`: `original_file_name` takes the path's last segment, splitting on both separators. It fills `ExportInputDiagnostics::original_path`, now documented, and `original_file_stem` builds on it.
- `docs/export-diagnostics.md`: the `input` row and the example say what the field holds.
- `CHANGELOG.md`: a Fixed entry under `[Unreleased]`.
- Unchanged: `rvt-info` and `rvt-inspect` still report the path, redacted with `--redact`, as inspection of the file. The JSON schema already types the field as a string or null.

## Testing

- CI, the JSON schema contracts and the witness replays included.
- Measure, this branch against `main` with the Autodesk samples ([39131786066](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39131786066)). 465 files on each side, 353 byte-identical, among them every IFC hash, scorer output and `info.json`. Each of the 55 `diagnostics.json` differs in `input.original_path` alone: `B:\Git\revit-test-datasets\Revit\2024_Core_Interior.rvt` became `2024_Core_Interior.rvt`, and `C:\Users\<redacted>\Documents\…\RE1.rvt` became `RE1.rvt`. The `rvt-ifc` logs differ in their timing and the diagnostics' byte count.

## Breaking changes

`input.original_path` in export diagnostics is the file name rather than the redacted path.
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.

Exports name the model by its saved path, which can carry the author's account and folder names

1 participant