Repository navigation
fix(compare): read each file's lengths in its own unit - #1093
Merged
Merged
Conversation
rvt-ifc-compare compared storey elevations and the bounding box as the numbers each file writes, so an rvt-rs export (metres) against Revit's (feet on Core Interior, millimetres on RE1 and the BIM4LCA office) differed on every storey. summarize_ifc_step now scales both by the file's LENGTHUNIT (compare::length_unit_scale_to_metres: an IfcSIUnit with its prefix, or an IfcConversionBasedUnit's ratio times its SI unit). The RE1 compare test now also checks that no storey is on one side only.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07ea8d1f32
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
DrunkOnJava
enabled auto-merge (squash)
October 29, 2026 20:33
DrunkOnJava
added a commit
that referenced
this pull request
Oct 29, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Oct 29, 2026
…evit's own (#874) (#1096) ## Summary Part of #874 (P1: three practitioners' reports on their own models). - `.github/ISSUE_TEMPLATE/practitioner_report.yml`: an issue form that asks for what P1 needs and never for a model file: the reporter's work, the rvt-rs version, each model's release, discipline and size, which workflow steps they ran (install, open, inspect, export, compare with Revit's own IFC, open in other software), the Revit export setup compared against, findings, and whether the report may count toward P1. It points at `--anonymize` and the diagnostics sidecar. - `docs/user-guide.md`: a "Compare with Revit's own export" section. It says which frame rvt-rs writes (IFC4, metres, the internal origin, `IfcSite` at identity, no latitude, longitude or `IfcMapConversion`), that a shared-coordinates or survey-point export sits elsewhere, and that which Revit coordinate base matches best is untested. It shows the `rvt-ifc` and `rvt-ifc-compare` commands and links the form from the "report a problem" steps. It also says `rvt-ifc-compare` reads each file in its own length unit, true since #1093. `--anonymize` is described as covering the diagnostics and the inspect report, not the IFC, in the form and in the guide's existing section. ## Verification - The form parses as YAML; both labels (`area:product`, `needs-triage`) exist. - `rvt-ifc-compare --json` and `rvt-ifc --anonymize --diagnostics` are existing flags (src/bin/rvt_ifc_compare.rs:32, user guide's existing anonymize section). Docs only; no export changes.
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
rvt-ifc-compareconverts storey elevations and the bounding box to metres by each file's ownLENGTHUNITbefore comparing.Motivation
The practitioner-workflow review of 2026-10-29 found the compare tool unit-blind:
src/ifc/compare.rsread the raw trailing number of eachIfcBuildingStoreyand the rawIfcCartesianPointcoordinates, while rvt-rs writes metres and Revit's exports of the reference models are in feet (Core Interior) or millimetres (RE1, the BIM4LCA office). Every storey then showed as a difference.Changes
src/ifc/compare.rs:length_unit_scale_to_metres(theIfcProject'sUnitsInContext→IfcUnitAssignment→ theLENGTHUNIT: anIfcSIUnitwith its prefix, or anIfcConversionBasedUnit'sIfcMeasureWithUnitratio times its SI unit);summarize_ifc_stepscales elevations and points by it; a file that declares no length unit is read as written.tests/cli_real_files.rs: the RE1 compare test also asserts thatstoreys_only_leftandstoreys_only_rightare empty against Revit's export.docs/ifc-compare.md,changelog.d/fixed/ifc-compare-units.md.Testing
Unit tests are banned in this repository: do not add them.
ifc_compare_tells_an_export_from_itself_and_from_revitsruns the built rvt-ifc and rvt-ifc-compare on RE1 Architecture (MIT) against Revit's own export, in the Corpus health job.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None to the API (one added function). Output: compare reports now give lengths in metres.
Related issues
Refs #874.