Repository navigation
Conversation
DrunkOnJava
left a comment
There was a problem hiding this comment.
Thanks for the contribution. Before this can be reviewed on substance, three things need to happen, each rooted in the repo's documented process.
1. Clean-room declaration. CLEANROOM.md (section "Contributor declaration") requires every PR to carry the statement that the work was derived only from the accepted sources and not from Autodesk SDK source, ODA SDK source, leaked documentation, NDA material, or decompiled internals. The PR template has that checkbox under "Legal and contribution hygiene"; this PR replaced the template, so it is missing. Please add the declaration to the description. A change of this size touching texture resources, saved materials, revisions, connector networks and family constraints cannot land without it.
2. Split into reviewable units. 42,085 additions across 100 files in one commit is not reviewable, and every other change in this repo lands as one issue, one finding, one decoder, with its probe under examples/ and its RE addendum per the template. Please open one PR per capability (record index, parameter definitions, saved meshes and GLB, wall cut/join, textures and materials, revision diff, networks, and so on). The workflow pin bumps belong to dependabot and should be dropped from the split.
3. Do not rewrite the witness manifests. The PR sets decoder_expected for rooms and materials to 0 in tests/fixtures/project-counts/2024-core-interior*.json and revit-ifc5-einhoven.json and adds an unsupported_feature_absence_reason escape hatch, on the basis that production now excludes unbound partition candidates. That is a behavior change to the shipped IFC exporter (Room and Material recovery removed from the production path), not a cleanup, and those manifests are the acceptance record for the OctetProof-gated recoveries. A change like that needs its own issue and a maintainer decision first, with the existing witnesses left intact until it is made.
CI has been approved to run, so fmt, clippy, doc, test and PII-guard results will show on the checks tab. Marking this "request changes" until 1 and 3 are addressed; the split in 2 is how the work can actually get reviewed and merged.
|
CI on the current head (32b806c): |
|
Concrete detail on the MSRV failure, since it is a quick fix: Worth knowing the same trap catches let-chains ( This is separate from the three items in the review: the clean-room declaration, the split into reviewable units, and leaving the witness manifests intact. |
|
ok, well I'm not using any SDK source code or leaked documentation or anything you mention. I've downloaded a dataset of diverse revit files from the web and I'm iteratively experimenting (in an automated way) with every family, attribute, etc., in order to understand the file format. I'm doing this in parallel with many agents, and so I come back after a day to a bunch of improvements. Breaking it all down into individual feature commits isn't really practical. Maybe I'll just get everything working and then you can pull in what you like from my fork. |
DrunkOnJava
left a comment
There was a problem hiding this comment.
Thank you for this. It is a large body of work, and several areas (saved meshes, parameter records, Extensible Storage, spatial boundaries) are exactly where the project needs to grow. It can't merge in its current form, for three reasons: clean-room provenance, reviewability, and CI.
1. Provenance of the two data files (blocking, CLEANROOM.md)
The crate may only ship knowledge derived from public byte observations, RevitAPI.dll exported symbol names, prior public reverse-engineering work and buildingSMART specifications. Two files need a stated origin before anything else.
src/data/builtin-parameter-definitions-2027.json(2,105 lines). It holds Revit 2027 built-in parameter ids with Autodesk's UI captions, storage types, spec type ids and group type ids, keyed by aschema_sha256. How was it produced?- From a running Revit, for example by enumerating
BuiltInParameterthrough the API and reading captions and data types: that is Autodesk runtime output, not a byte observation or an exported symbol name, and it can't ship in this crate. - From the bytes of a 2027 file: please add a probe under
examples/that regenerates it from a named sample, and state that sample's sha256. The file then becomes reproducible evidence rather than a vendored catalogue.
- From a running Revit, for example by enumerating
src/data/classification-vocabulary.json. These are OmniClass Table 23 codes and titles. OmniClass is a copyrighted classification with its own licence terms. Where did the table come from? Revit's installedOmniClassTaxonomy.txt, for instance, is Autodesk-distributed content. Under what licence can it be redistributed inside an Apache-2.0 crate? If that can't be settled, the code (already read fromFamily.m_omniClassCode) can be surfaced without shipping the titles.
2. Reviewability (blocking)
The PR is a single 42,085-line commit, and each capability claim here has to be backed by measured evidence (see "Reverse-engineering workflow" in CONTRIBUTING.md and docs/verification-protocol.md). Please split it into PRs by feature, each carrying its probe, a dated report with corpus counts, and a unit test pinning the byte pattern. For example:
- native record index and parameter records (
native_index,partition_parameter_records,native_parameters,schema_registry); - saved meshes and GLB (
native_saved_*,native_scene); - spatial context and room/space boundaries;
- MEP connectors, networks and equipment;
- appearance, materials and textures;
- wall joins and family constraints/geometry.
The behaviour changes to existing output also need their own PRs, each with measured before/after on the magnetar corpus:
- GLB switching to metres and Y-up;
- placeholder geometry removed for unsupported shapes;
- the legacy walker excluding unbound name and plan-loop candidates;
- the
gltf::Node::extrasfield, which breaks downstream struct literals.
3. CI and mechanics
- MSRV 1.85 job: fails on
unsigned_is_multiple_of(is_multiple_ofis stable from 1.87).x % n == 0works on 1.85. IfcOpenShell validates synthetic project: fails. The real-project export's unsupported-feature markers changed (revit_materials_and_compound_assembliesis expected), so the support matrix and the project-count manifests have to move with the behaviour.- Signing: the commit is unsigned, and the
mainruleset requires signed commits. - Rebase:
mainhas moved a long way (#284–#294), includingGlobal/ElemTablechanges (#290, #294) that the native index code may interact with.
I'm glad to review the split PRs one at a time, starting with whichever part you consider best evidenced.
|
Thanks for your patience. I built this branch (32b806c) and ran its CLIs on our reference files, so this review is measured rather than read. What holds up, measuredSaved graphics (
For doors and windows they are better than main. A "Single-Flush 3 x 8" door's saved mesh is the panel and frame, 3.50 x 0.83 x 8.25 ft in 26 primitives, where main draws the element record's box, 3.75 ft deep because it includes the swing. The 2.92 ft difference is exactly the door residual #227 records against Revit's own geometry. Windows: 0.70 ft deep against a 6.32 ft box. This is the family-instance geometry main lacks, and it is the most valuable part of this PR. Formats/Latest. Accepting the page strip only when the gzip trailer verifies is right. The trailer verifies after the strip on all 23 files we measured and fails without it on all 23. #412 now strips Formats/Latest on that condition, credited to you. Schema tags. What does not hold up yet
ProposalRather than ask you to split 42k lines, we will extract the saved-graphics path (saved meshes and the schema, graph and identity code it needs) into its own PR against current main. You will be credited as the commit author, the two data files and the witness manifest edits will be left out, and it will be measured against Revit's exports as above. If you'd rather we didn't, or would rather open that PR yourself, say so here and we'll hold. Everything else stays in this PR for you to continue. One thing the extracted PR needs from you: the clean-room statement from |
…e schema (#410) Formats/Latest is stored in checksum pages like the database streams but was inflated without the strip, so it drifted after about 140 KB while still decoding cleanly, and schema parsing stopped at 64 KB to keep the drift out. Stripped, its gzip CRC32 and ISIZE verify on all 23 files measured (they fail unstripped on all 23) and every file of one release inflates to the byte-identical schema. rvt-rs now reads all of it: 4,126 classes and 11,562 fields on Revit 2024 instead of 395 and 1,114. The integrity diagnostic reports ok only when the trailer verifies, as #255 proposed. IFC output is unchanged on every corpus file. Credit: STE1200 (Discussion #112) for the page layout and grammar, rosejn (#255) for accepting the strip on a verifying trailer.
…e schema (#410) (#412) Closes #410. Completes the `Formats/Latest` half of #151. ## What changes - `compression::is_checksum_paged_stream` includes `Formats/Latest`, so every reader of the schema (`RevitFile::schema`, the walker, the partition scanner, `rvt-analyze`, the diagnostics) inflates it page-stripped. - `formats::parse_schema` scans the whole stream. `SCHEMA_SCAN_LIMIT` stays as a constant for `parse_schema_with_scan_limit`, which the probe uses to show the old 64 KB window. - `diagnose_formats_latest_integrity` reports `ok` only when the stripped stream's gzip CRC32 and ISIZE trailer verifies, `uncertain` (`RVT_FORMATS_MULTIPAGE_UNVERIFIED`) when it inflates but does not verify, `incomplete` when it does not inflate. Accepting the strip on that condition is rosejn's idea from #255. ## Evidence `examples/probe_schema_page_strip.rs` (rewritten) over the 11 sample families and the project corpus: - **Checksums.** The stream ends in a real gzip trailer. After the strip it verifies on all 23 files measured; unstripped it fails on all 23. - **Cross-file identity.** Stripped, every file of one release inflates to the byte-identical schema: 2023 (4 files) `bce7907b…`, 2024 (5) `0bfb947b…`, 2025 (8) `c964f9aa…`. Unstripped, a family and a project of the same release differ. - **What the parser reads** (classes / fields / unclassified): | | first 64 KB (before) | whole stream, unstripped | whole stream, stripped (after) | |---|---|---|---| | 2016 family | 498 / 1,402 / 0 | 1,718 / 4,890 / 200 | 3,490 / 9,932 / 10 | | 2024 family, Core Interior, Snowdon | 395 / 1,114 / 0 | 1,354–1,612 / 3,454–4,217 / 221–590 | 4,126 / 11,562 / 9 | | 2026 family | 349 / 1,061 / 0 | 1,715 / 3,862 / 443 | 4,285 / 12,144 / 10 | Across the 11 releases: 122,107 fields (before: 13,570). The 64 KB cap was hiding drift, not "binary object data". - **No output change.** IFC exports of Core Interior, the four RE1 models, Einhoven and Snowdon Towers are identical before and after, GlobalIds and header timestamps aside. Both Core Interior OctetProof verdicts replay PASS with three matches; the rvt-rs observations are refreshed because they no longer carry the "multipage integrity uncertain" warning. - `rvt-inspect --json` now reports `checksum_tail_stripping: enabled, integrity_status: ok` for Formats/Latest on the 2026 family and Core Interior. ## Tests changed, not added - `tests/field_type_coverage.rs` inflated with the unstripped call; it now uses the gated one and fails on any `Unknown` field outside a listed residual of 14 fields (9 to 12 per release: `0e 04`, `0e 13`, `0e 53`, `0e 54` pointer and collection modifiers, a `0a` kind, `04 00 04 00`). The old "zero Unknown" gate held only because it saw 64 KB. - `tests/checksum_page_framing.rs` and the `compression` unit tests pinned `Formats/Latest` as ungated; they now assert it round-trips through the strip, and that a stream without a verifying trailer is `uncertain`. ## Checks - `tools/check-local.sh`: passed (204 suites) before the trailer check; compression tests, clippy and the corpus-gated `checksum_page_framing`, `json_schema_contracts`, `field_type_coverage`, `support_matrix` rerun after it. - All 48 integration test binaries with `RVT_SAMPLES_DIR` and `RVT_PROJECT_CORPUS_DIR` set: passed. ## Public claims corrected README, `docs/support-matrix.json`, `docs/compatibility.md`, `docs/status.md`, `ROADMAP.md`: the schema figures, and RE-20's note that `Level` is absent from the schema, which was an artifact of the 64 KB scan (`Level` is class 2422 of Revit 2024's schema; storeys already come from element records, so nothing else changes). ## Follow-ups - #154: class tags. The u16 after each class name is a base-class reference; the serialization tag is the definition ordinal (STE1200's grammar, and rosejn's `schema_registry.rs` in #255, agree). Element records name their class by it at +0x4a (#223, measured). - Classify the residual field encodings with byte evidence. ## Legal and contribution hygiene - [x] Apache-2.0. Findings credited to STE1200 (Discussion #112, F1/F4) and rosejn (#255, CRC-verified acceptance); no Autodesk or ODA material. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes core decompression for every schema consumer; behavior is gated by trailer verification and broad tests, but wrong strip logic would affect all class/field introspection downstream. > > **Overview** > **`Formats/Latest` is inflated with the same checksum-page strip as Partitions and Global streams**, fixing silent drift past ~140 KB that made unstripped inflation look valid while corrupting the tail. Production paths that already call `inflate_stream_at` (e.g. `RevitFile::schema`, walker, probes) therefore get the full, release-consistent schema instead of a truncated or garbage tail. > > **Schema parsing and CI gates move to the whole stream:** `parse_schema` scans all decompressed bytes (64 KB limit kept only via `parse_schema_with_scan_limit` for comparisons). `field_type_coverage` inflates through the gated path, expects ~122k fields corpus-wide, and allows a documented **RESIDUAL** set of 9–12 unclassified encodings per release. **`diagnose_formats_latest_integrity`** marks integrity **ok** when the stripped member’s gzip CRC32/ISIZE verify, otherwise **uncertain** with `RVT_FORMATS_MULTIPAGE_UNVERIFIED`; witness JSON drops the old multipage warning. > > Docs and README correct prior “100% field classification” and “Level absent from Formats” claims (artifacts of the 64 KB window). IFC exports on measured corpora are unchanged. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eb6f20b3f73e8b68884f9dab7a69326d72328cc4. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
… definition ordinal (#154, #223) (RE-76) The schema is read by its grammar, which gives each class its serialization tag: its definition ordinal in the file's own Formats/Latest. An element record names its class by that tag at +0x4a, so each record-backed element gets RevitClass (SWall, ArcWall, FaceWall, Floor, RoomElem, ProfileRoof, StairsElement, FamilyInstance, ...). Every exported element resolves on Core Interior, RE1 Architecture and Snowdon Towers, and Snowdon's 32 ArcWall records are exactly the 32 walls RE-75 found storing an arc. Credit: STE1200 and jakobhirn-bit (Discussion #112), rosejn (#255).
… definition ordinal (#154, #223) (RE-76) (#416) Part of #154; answers #223. Report: `reports/element-framing/RE-76-schema-class-tags.md`. Probe: `examples/probe_re76_schema_class_tags.rs`. ## What changes - `formats::schema_classes` / `RevitFile::schema_classes`: the `Formats/Latest` grammar, reading the whole page-stripped stream (#410) and giving every class its serialization tag, the definition ordinal (12 first, one more per top-level or inline definition; inline references repeat their tag, so a misread stops the parse). Bounded nesting, no panics on hostile input. - `PartitionElementRecord::class_tag`: the `u16` at `+0x4a`. - Every record-backed element gets `RevitClass` in `RvtElementRecordGeometry`. ## Evidence | | classes | stopped | |---|---|---| | 2016 family | 3,792 (tags 12..3803) | end of stream | | Core Interior, Snowdon (2024) | 4,492 (12..4503) | end of stream | | RE1 Architecture (2025) | 4,600 (12..4611) | end of stream | | 2026 family | 4,690 (12..4701) | end of stream | Every record of ten categories resolves, to the class a BIM user expects: walls `SWall` / `ArcWall` / `FaceWall`, floors `Floor`, rooms `RoomElem`, roofs `ProfileRoof`, stairs `StairsElement`, ceilings `Ceiling`, families `FamilyInstance` or, for type symbols, `FamilySymbol`. Independent check: Snowdon's 32 `ArcWall` records are exactly the 32 walls RE-75 found storing an arc (24 exported). `RevitClass` on export: Core Interior 970 of 970, RE1 Architecture 85 of 85, Snowdon Towers 6,081 of 6,081. The only other IFC change is that property. Both Core Interior verdicts replay PASS with refreshed rvt-rs observations (+970 `IFCPROPERTYSINGLEVALUE`). ## Not changed `SchemaTable.tag`, `class_tag_map` and the `Global/Latest` walker still use the `u16` after each class name, which is the base-class reference; moving them changes the walker's input and stays in #154. ## Checks `tools/check-local.sh` (205 suites) and all 48 corpus-gated integration test binaries before rebasing onto #412's squash; after it, fmt and `support_matrix`, `field_type_coverage`, `json_schema_contracts`, `element_records_2025` with the corpora. ## Legal and contribution hygiene - [x] Apache-2.0. Grammar and the `+0x4a` reading credited to STE1200 (Discussion #112, public Apache-2.0 scripts), `+0x46` to jakobhirn-bit (same thread), ordinal numbering also in rosejn's #255. Implemented independently in Rust; no Autodesk or ODA material. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches core partition decode and IFC property emission; schema grammar parsing is new surface area but fail-closed on parse errors and does not alter geometry or GlobalId behavior. > > **Overview** > **Adds Revit-native class names to record-backed elements** by parsing `Formats/Latest` with a grammar that assigns each class a **serialization tag** (definition ordinal from 12 upward), then resolving the `u16` at partition element record **`+0x4a`** against that table. > > New **`formats::schema_classes`** / **`RevitFile::schema_classes`** expose the class list; **`PartitionElementRecord::class_tag`** carries the raw tag. During MVP decode, **`attach_revit_classes`** maps tags to names like `SWall`, `ArcWall`, `FaceWall`, `Floor`, `FamilyInstance`, and `FamilySymbol`. IFC export writes a **`RevitClass`** text property on each element’s geometry property set (Core Interior +970 `IFCPROPERTYSINGLEVALUE`; witness hashes refreshed). > > **`SchemaTable.tag`**, **`class_tag_map`**, and the **`Global/Latest`** walker are **unchanged**—they still use the `u16` after each class name (base reference), not the definition ordinal. > > Docs: CHANGELOG, support-matrix row `element-record-revit-class`, RE-76 report, and **`probe_re76_schema_class_tags`** example. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 48bd6505a45516c332d763d9d8f775a043894875. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
|
@rosejn I've put the extraction I proposed up as a draft, #420, so you can see exactly what it would be: your native reader modules in a first commit authored by you, and a second commit that uses the saved graphics to replace the bounding-box bodies of doors, windows and furniture (opt-in Measured against Revit's own IFC exports: on Core Interior, all 158 doors, windows and shading devices are within 0.01 ft (the boxes had every door 2.92 ft too deep); on Snowdon Towers, 3,332 of the 3,736 replaced bodies are, against 1,138 for the boxes. It stays a draft until you say you're happy with it being merged this way, or would rather it were done differently. |
rosejn's reader for Revit's own object graph and the graphics a file saves for display, extracted from #255 (32b806c): the schema registry, the document and element graph, parameters, extensible storage, and the saved mesh and material decoders the saved scene needs. Changes made on extraction: - the unit-test modules are not included (the repository adds no unit tests; this work is measured end to end instead); - the built-in extensible-storage catalog is disabled, as its provenance is not recorded; - missing element flags and empty boundary edges return errors instead of panicking, and NaN-safe sorting replaces partial_cmp().unwrap(); - let-chains are rewritten for the 1.85 MSRV, and earcut is held below 0.4.10, whose is_multiple_of needs Rust 1.87.
|
You can go ahead and merge as you see fit. No requirements on my end. Just trying to pitch in. |
rosejn's reader for Revit's own object graph and the graphics a file saves for display, extracted from #255 (32b806c): the schema registry, the document and element graph, parameters, extensible storage, and the saved mesh and material decoders the saved scene needs. Changes made on extraction: - the unit-test modules are not included (the repository adds no unit tests; this work is measured end to end instead); - the built-in extensible-storage catalog is disabled, as its provenance is not recorded; - missing element flags and empty boundary edges return errors instead of panicking, and NaN-safe sorting replaces partial_cmp().unwrap(); - let-chains are rewritten for the 1.85 MSRV, and earcut is held below 0.4.10, whose is_multiple_of needs Rust 1.87.
…lay, opt-in (#255) (#227) (RE-78) (#420) ## Summary Opt-in `--saved-meshes` for `rvt-ifc` and `rvt-gltf`: every body that is only its element record's bounding box is replaced by the mesh Revit saved for the element's display, read by rosejn's native saved-graphics reader from #255. The first commit is theirs, extracted with their authorship; the second integrates it. rosejn confirmed on #255 (2026-09-28) that it can be merged as it stands. Rebased onto main (5f5f89d) on 2026-09-30. ## Motivation Doors, windows, furniture and fixtures were boxes (#227: every Core Interior door 2.92 ft too deep). #255 decodes the graphics Revit saves per element, which are the family's real shape. ## Changes - `22096f0` (author rosejn): the native document, element, parameter and saved-graphics modules the saved scene needs, from #255 (32b806c). Changes on extraction: unit-test modules not included (repository policy); the built-in extensible-storage catalog disabled (provenance not recorded); malformed-input panics returned as errors; let-chains rewritten for MSRV 1.85; `earcut` held below 0.4.10, whose `is_multiple_of` needs Rust 1.87. - `src/ifc/saved_meshes.rs`: replaces record-box bodies (no resolved profile) with the saved mesh in the element's own placement. Aggregate wholes (stairs, curtain walls) keep their parts; a Tag shared by several entities is left alone. - `SolidShape::TriangulatedFaceSet`, written as one `IfcCartesianPointList3D` plus one `IfcTriangulatedFaceSet` (Snowdon: 111 MB, against 456 MB as `IfcFacetedBrep`). glTF and plan output mesh it through `body_geometry`. - `rvt-ifc` / `rvt-gltf --saved-meshes`; when the reader declines a file (Revit 2025: "native record framing is unvalidated") the export goes ahead with its boxes and says so. Diagnostics recount body sources. - `tools/re/saved_meshes_vs_ifc.py`, `reports/element-framing/RE-78-saved-graphics-meshes.md`, README, supported profile, support matrix (`saved-graphics-meshes`, experimental), CHANGELOG. ## Testing Per element world box against Revit's own IFC export (IfcOpenShell 0.8.5): | file | elements | within 0.01 ft, saved mesh | within 0.01 ft, record box | |---|---:|---:|---:| | Core Interior (2024): doors, windows, shading devices | 158 | 158 | 0 doors | | Snowdon Towers (2024): every replaced body | 3,736 | 3,332 | 1,138 | Snowdon residuals (in the report): windows 66 of 68 (Revit's export draws parts the Fine-detail mesh does not), light fixtures 0.58 ft taller, 30 members 13.33 ft low. After the rebase (2026-09-30), on GitHub's runners: every required check, the MSRV 1.85 job, IfcOpenShell validation, corpus tier 2 and the wheel build pass, and Measure run 36717043673 (this branch against main) exports byte-identical IFC for Core Interior, Einhoven and the four RE1 models, with every scorer output unchanged. The Snowdon row is the measurement from before the rebase (that oracle is local-only). - [x] fmt, clippy `-D warnings`, rustdoc `-D warnings`, `cargo test --workspace --all-targets --all-features` - [x] corpus `cargo test --profile ci --no-fail-fast --test '*'` - [x] `cargo +1.85.0 check --profile ci --all-targets` - [x] default output unchanged: both Core Interior witness observations regenerate byte-identical - [x] `ifc_schema_arity.py` on the Snowdon saved-mesh IFC (156,768 instances); GLB on Core: 16,188 to 47,000 triangles ## Audit-honesty checklist - [x] Opt-in and `experimental`: 37 s and 5.6 GB peak on Snowdon; Revit 2024 only - [x] Residuals and the 2025 limitation documented - [x] No emojis, private paths or PII; the Snowdon oracle stays local ## Legal and contribution hygiene - [x] Apache-2.0; the reader is rosejn's, contributed through #255, with its authorship kept - [x] Clean-room: rosejn states on #255 that the reader comes from experiments on public files, with no SDK source or leaked documentation. The one component whose provenance was not recorded (the built-in catalog) is disabled. - [x] No new fixtures ## Breaking changes None. Off by default. ## Related issues Refs #255, #227. Credit: rosejn. Co-authored-by: Jeff Rose <[email protected]>
|
@rosejn Thank you for confirming. The extraction is merged as #420 (7386177): This repository only allows squash merges, so Measured against Revit's own IFC exports: on Core Interior all 158 doors, windows and shading devices are within 0.01 ft, where the record boxes had every door 2.92 ft too deep. Default output is unchanged: on GitHub's runners Core Interior, Einhoven and the four RE1 models export byte-identical IFC before and after (Measure run 36717043673). Everything else in this PR remains yours to continue in your fork. When a part is ready, one PR per capability against current |
… sets (#35) (RE-210) (#934) ## Summary `rvt-ifc --revit-property-sets` writes each element's named saved parameters (RE-207) the way Revit's exporter writes them with "Export Revit property sets": one property set per parameter group, named for the group (`Dimensions`, `Identity Data`, `Materials and Finishes`, ...), with the type's parameters in such sets on its type object (RE-210). Against Revit 2025's exports of Autodesk's Snowdon Towers HVAC and Site with "Export Revit property sets", every property rvt-rs writes is in the set of the same name, on the element or type object of the same Tag, with Revit's value: 28,906 and 718, counted per element. On Snowdon Architectural, 58,346 of 58,733 are; 369 of the rest are in sets Revit names with `(Type)` on 13 type objects it does export, which follows from the order of its export, and 18 are curtain panels' type category, written before this change. Revit writes 79,907, 948 and 118,432 more, nearly all built-in parameters, which rvt-rs does not name (#255). On the BIM4LCA office as built, `FireExit` written in `Identity Data` equals Revit's `Pset_DoorCommon` and `Pset_WindowCommon.FireExit` on 498 of 498 doors and windows. This is the second slice of #35. It is opt-in, and without the option the export is unchanged. This branch is stacked on #887 (slice 1, RE-207) at `f4e3c0e`. Until #887 is merged, its commits also show here; this PR's own are the last four. ## Motivation #35 (M4-07) asks for an element's instance and type parameter values in the exports. Slice 1 (#887) read and named them for `rvt-elements` and Python. This slice writes them to IFC in the form Revit's own exporter uses for the same parameters, so an rvt-rs export can be compared with, and stand in for, a Revit export made with Revit's property sets. It serves W7 (Properties) of `docs/release-1.0-criteria.md`. The rules are read in revit-ifc's `Release_25.x.x` branch (CLEANROOM.md source 5: read and cited, no code copied): | what | revit-ifc | rvt-rs | |---|---|---| | which parameters | `ParameterUtil.CacheParametersForElement`: visible, named, by parameter id; the IFC group left out; per group one parameter per name with its spaces removed, the first | RE-207's named parameters; the IFC group left out; per group the lowest parameter id per space-free name | | instance and type | `PropertyUtil.CreateInternalRevitPropertySets`: the element's own parameters on it, the type's on its type object, or on its elements with `(Type)` added where it has none when the element's sets are made (`ElementTypeToHandleCache.IsRegistered`), so a type object created later carries `(Type)` sets too | the same, the type's through `IfcModel::type_property_sets`; a type object's sets always under the group's name | | set name | `LabelUtils.GetLabelForGroup` | Revit's English labels for the 24 groups the measured models use (`GROUP_LABELS`) | | values | Yes/No `IfcBoolean`; an integer with a spec `IfcInteger`, with none its display text; a non-empty text; a real by its spec (`CreateRealPropertyByType`); an ElementId by the display name of what it names (`AsValueString`), none for −1 | Booleans, integers with a spec, non-empty texts, lengths (length, pipe and duct size), areas, volumes, angles, numbers, air flows, HVAC and piping pressures, apparent and electrical powers, electrical potentials, currents (in SI units), material names, and family types as `<family> : <type>` (the type's name alone where both are the same, as measured); enumerations and other specs left out and counted | ## Changes - `src/ifc/revit_property_sets.rs` (new): `attach(file, model)` reads the elements' parameters with `research::native_element_parameters::read` and adds the sets; `group_label` gives a parameter's set. `property` gives its property, and since it takes research's `ElementParameter` it is public only with `unstable-research`; `attach`, `Report`, `group_label`, `GROUP_LABELS` and `TYPE_SUFFIX` are stable. - `src/ifc/mod.rs`: the module, and `IfcModel::type_property_sets` (`#[serde(default)]`), a type object's further sets by type id. - `src/ifc/entities.rs`: `PropertyValue` gains `VolumetricFlowRate`, `Pressure`, `Power`, `ElectricVoltage` and `ElectricCurrent`, in SI units, written as `IfcVolumetricFlowRateMeasure`, `IfcPressureMeasure`, `IfcPowerMeasure`, `IfcElectricVoltageMeasure` and `IfcElectricCurrentMeasure`. `src/ifc/scene_graph.rs` formats them. - `src/ifc/step_writer.rs`: a type object's sets take `type_property_sets` too, merged by set name. The `IfcUnitAssignment` declares pascal, watt, volt, ampere and m³/s when a value of that kind is written, in an element's or a type object's set, as it already declared W/(m²·K) for a thermal transmittance; that check now also looks at type objects' sets. - `src/bin/rvt_ifc.rs`: `--revit-property-sets` (not with `--placeholder`). A file whose parameters cannot be read is still exported, with a warning on stderr. - `src/ifc/from_decoded.rs`, `tests/fuzz_regressions.rs`, `tests/ifc_synthetic_structural.rs`: the new field in `IfcModel` literals. - Tests: `tests/revit_property_sets.rs` (`nordic_office_fire_exit_is_revits_in_identity_data`, `re1_mep_flows_pressures_powers_and_voltages_are_in_si_units`, which covers currents too), listed in `tools/ci/test-targets.txt` and `tests/integration/main.rs`. It reuses `tests/element_parameters.rs`' IFC value reader, now `pub(crate)`. - Probe: `examples/probe_re210_revit_property_sets.rs`. - Scorer: `tools/re/revit_property_sets_vs_ifc.py`, for an export made with the option against Revit's export with "Export Revit property sets". It compares lengths, areas, volumes and angles after each file's units, and numbers within rvt-rs's rounding to six decimals. - Report: `reports/element-framing/RE-210-revit-property-sets.md`. - Docs: - `README.md` (summary, a reads-table row, the parameters gap); - `docs/status.md` (a dated RE-210 entry); - `docs/supported-profile.md`; - `docs/support-matrix.json` (`ifc-revit-property-sets`, partial); - `CHANGELOG.md`; - a dated addendum in `docs/rvt-moat-break-reconnaissance.md`. The commits run feat → test → research → docs. ## Testing Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead. - [x] `tools/check-local.sh` passes (fmt, clippy, rustdoc, build, real-file / CLI / contract checks) - `cargo fmt --all -- --check` passes. - `cargo clippy --workspace --all-targets --all-features -- -D warnings` passes. - `cargo doc -p rvt --no-deps` passes with `RUSTDOCFLAGS='-D warnings'`. - `cargo +1.87 check --profile ci --all-targets` (the MSRV job) passes. - `RUSTFLAGS='-D warnings -D unnameable_types' cargo check --lib --bins` (CI's check that the default features hand out no research type) passes. - `tools/ci/verify-real-files.sh --profile ci --no-fail-fast` passes 252 of 252. It ran with `RVT_SAMPLES_DIR` (phi-ag's Autodesk families), `RVT_PROJECT_CORPUS_DIR` (magnetar `fd755e1` with RE1 and `r2025/`) and `RVT_NORDIC_LCA_DIR` set, so both new tests ran rather than skipped. - [x] Verified end to end on real Revit files: the command, the files (and their licence), and the measured result against Revit's own export are in the PR body, with the script or probe that reproduces it - The command is `rvt-ifc MODEL.rvt -o ours.ifc --revit-property-sets`. The probe `probe_re210_revit_property_sets MODEL.rvt` prints what it adds, per set, and what it leaves out, by reason. - **Against Revit's own sets.** Autodesk's Snowdon Towers Sample HVAC, Site and Architectural, 2025 edition (sha256 `a1756cfd…31bfe`, `43140cd8…c1ff8`, `8ac90a85…0d334`), exported by Revit 2025.4 to IFC4X3 with "Export Revit property sets" ticked. The files are Autodesk's; they were measured locally and are not committed, as in `reports/validation/held-out-snowdon-mep-2026-09-27.md`. Command: `python tools/re/revit_property_sets_vs_ifc.py ours.ifc REVIT.ifc`. | level | sets | written by rvt-rs | equal to Revit's | Revit's, not written by rvt-rs | |---|---|---:|---:|---:| | element | Dimensions, Mechanical - Flow, Other | 14,445 | 14,445 | 26,771 | | element | Constraints, Graphics, Identity Data, Insulation, Lining, Mechanical, Phasing | 0 | — | 45,181 | | type object | Constraints, Dimensions, Electrical - Loads, Electrical Engineering, Identity Data, Mechanical, Mechanical - Flow, Model Properties, Other, Text | 14,461 | 14,461 | 7,955 | | | **total** | **28,906** | **28,906** | **79,907** | - HVAC, in the table. The counts are per element: a type object's property counts once for each element of the type. They include the Category, Family and Type values rvt-rs already wrote in `Other`. The option itself adds 5,772 properties on 1,469 elements and 17 type objects (the probe). - No property is written in a set where Revit's export lacks it, and none differs. So the group labels, the set each parameter lands in, the split between element and type object, and the values are Revit's on this model. - Two scorer fixes came first. Revit's export declares degrees, so angles are compared after each file's angle unit. rvt-rs writes six decimals, so numbers are compared within that rounding. Before them, 4,281 values counted as differing, all for those two reasons (`measure/` in the package). - The model also showed what was left out: 1,055 air flows, pressures, powers and voltages, and the group Electrical Engineering. They are now written, and all equal Revit's. - Revit's 79,907 more are built-in parameters, such as System Name, Phase Created, Size, Flow, the elevations, Family and Type, Mark and OmniClass, and two family parameters (`OffsetWidth`, `OffsetHeight`, 43 each) that are not among those rvt-rs reads on those duct transitions. - rvt-rs exports 2,596 of Revit's 2,627 elements; the other 31 are flex ducts, which rvt-rs does not export. - **Site** (walls, floors, railings, generic models): 718 of 718 equal, counted the same way; the parameters add 8 properties on 2 type objects. Revit writes 948 more, all built-ins (Phase Created, Area, Type Mark, constraints, construction, analytical properties). - Revit writes one floor as five `IfcSlab`s of one Tag, so the scorer now takes all products of a Tag together. Before that, 5 of that floor's properties counted as not written by Revit. - The Site export writes `(Type)` sets on 12 sites, 3 storeys and 5 openings, which confirms the suffix in a Revit 2025 English export. rvt-rs exports none of those as elements. - **Architectural** (doors, windows, stairs, curtain walls, furniture, lighting): 58,346 of 58,733 equal, counted the same way; the option adds 5,885 properties on 1,068 elements and 169 type objects. Revit writes 118,432 more. - 369 are in sets Revit names `Other(Type)`, `Identity Data(Type)` and so on, on 13 of the 1,286 type objects with its sets: 5 of 8 curtain wall types, 7 generic model type objects and 1 wall type. revit-ifc decides the suffix when an element's sets are made, by whether the type's type object exists yet (`ElementTypeToHandleCache.IsRegistered`), and keeps those sets for the type object. Which types are hit follows from the order of Revit's export, which the file does not record, so rvt-rs writes the group's name. 66 of the 369 are this slice's; 303 are the Category, Family Name and Type Name written before. - 18 are the type Category of curtain panels of a basic wall type: Revit exports them as `IfcPlate`s whose type says `Walls`, rvt-rs as curtain walls whose type took the panel's `Curtain Panels`. That value was written before this change. - The model showed 337 values left out, all now written and equal to Revit's: the groups Photometrics and Plumbing (the latter with 10 piping pressures), 42 currents, and 198 family type values. A family type is `<family> : <type>`, except the 34 whose family and type have the same name, written by the type's name (`Muntin Pattern_2x2`). - Of Revit's 118,432 more, 186 are parameters rvt-rs names: 66 written under the group's name as above, 117 `Family Thumbnail` (the name of the type's preview image, which rvt-rs does not name) and 3 family types rvt-rs does not name. The rest are built-ins. - **Against the local exports' common sets.** Revit's other exports at hand were made with the common property sets only. Where one also writes a property of the same name on the same element (by Tag, in any set), the values were compared: | model (licence) | properties added (per element, with its type object's) | same name in Revit's export | equal | |---|---:|---:|---:| | BIM4LCA office, as built (VTT, CC BY-SA 4.0) | 24,366 | 498 | 498 | | R2025 model 12 (puzzbobb, Apache-2.0, #356), RE1 Architecture, Core Interior, BIM4LCA housing on terrain | 1,979 | 0 | — | - The 498 are the Yes/No `FireExit` of 266 doors and 232 windows: rvt-rs writes it in `Identity Data` and Revit's export in `Pset_DoorCommon` and `Pset_WindowCommon`, both as `IfcBoolean`. `tests/revit_property_sets.rs` asserts them, and fails, 498 of 498, when the sets are not attached. - Every value written is one of RE-207's, which equal Revit's wherever its exports show them (#887: 7,606 of 7,606 on the office as built). - What is written, over 15 models (R2025 12 to 17, the four RE1 models, Core Interior, the BIM4LCA housing and office ×2): 32,812 properties on 4,995 elements and 283 type objects. Of the named parameters left out, 9,920 are empty texts and 2,425 ElementIds of −1, which Revit leaves out too; 324 are in the IFC group; 408 are ElementIds rvt-rs cannot name; 62 are reals of other specs (electrical frequency, demand factor and luminous intensity, HVAC temperature, currency). - The RE1 MEP models' 56 flows, pressures, powers, voltages and currents have no Revit export with these sets. `tests/revit_property_sets.rs` checks that each unit is declared where its values are written and that every voltage is nominal (120, 208 or 240 V). With the units not declared it fails: "RE1-Electrical: 17 values of IFCPOWERMEASURE, no POWERUNIT declared". - IfcOpenShell 0.9.0's validator finds no issue in the exports of R2025 model 12, RE1 Architecture and the housing on terrain made with the option, nor in RE1 Mechanical's and RE1 Electrical's, which between them declare all five new units. - **What is not measured:** no Snowdon model has an element that rvt-rs exports whose type lacks a type object. The RE1 MEP models' currents and R2025 models 12 to 17's family type values are written as on Snowdon Architectural, but have no Revit export with these sets. - One rule was checked against a public Revit export with Revit's property sets: web-ifc's test file `ISSUE_159_kleine_Wohnung_R22.ifc` (German Revit 2022) names a type's sets on its elements `ID-Daten(Type)`, `Sonstige(Type)`, …, so the `(Type)` suffix is not translated. - [x] If this touches the IFC exporter: the witness verdicts replay (see CONTRIBUTING.md) or the changed observations are refreshed in this PR - Without the option the exporter writes the same file as #887's head (`f4e3c0e`), apart from its timestamps, on all 17 models measured: R2025 12 to 17, the four RE1 models, Core Interior, the three BIM4LCA models and Snowdon HVAC, Site and Architectural. The witness tests in `verify-real-files.sh` pass. - [x] If this is a performance change: reran `tools/bench.sh` and attached the before / after - This is not a performance change, and without the option nothing is read. With it, reading the parameters costs time. `tools/bench.sh` times only family files, so `rvt-ifc` was timed with hyperfine (`-N --warmup 1 --runs 3`): | model | `rvt-ifc` (s) | with `--revit-property-sets` (s) | ratio | |---|---:|---:|---:| | Core Interior | 6.785 ± 0.027 | 7.809 ± 0.015 | 1.15 | | BIM4LCA office, as built | 24.262 ± 0.027 | 34.036 ± 0.206 | 1.40 | ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR — no claims of features that are not actually shipped in this PR - The README's summary, its reads table (a new "Revit's own property sets" row) and its parameters gap row are updated, as are `docs/status.md`, `docs/supported-profile.md`, `docs/support-matrix.json` (`ifc-revit-property-sets`, partial) and `CHANGELOG.md`. - Each gives the Snowdon HVAC measurement against Revit's own sets, counted per element, and says the file is measured locally and not committed; all but `docs/supported-profile.md` give Architectural's too. The report adds Site. - [x] If a limitation was resolved, the "Known limitations" / "What works today" section in the relevant docs is updated - The README's parameters gap row now says `--revit-property-sets` writes the parameters to IFC, and what it does not write. - [x] If a new limitation was introduced, it is documented in the PR body and in-code - With the option, `rvt-ifc` is 1.15 to 1.40 times slower on the models timed (report §8). - Not written: built-in parameters (no name, #255), enumerations, other specs, ElementIds naming what rvt-rs cannot name, and `(Type)` names on type objects Revit exports. The sets keep rvt-rs's own GlobalIds, not Revit's hashed ones (report §7). - These are in `src/ifc/revit_property_sets.rs`' module doc and the report. - [x] Commit messages describe WHAT changed and WHY, not "fix things" or "updates" - The four commits are Conventional Commits, each naming #35 and RE-210. - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files - The test and probe take their paths from `RVT_NORDIC_LCA_DIR` or arguments. - The commits are authored and committed with GitHub's noreply address, and signed. - [x] If this is a reverse-engineering finding: a reproducible probe under `examples/` and a dated addendum to `docs/rvt-moat-break-reconnaissance.md` are included - The probe is `examples/probe_re210_revit_property_sets.rs`, and the report is `reports/element-framing/RE-210-revit-property-sets.md`. - The addendum is dated 2026-10-22. ## 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`) - The exporter's rules come from revit-ifc (LGPL), CLEANROOM.md source 5: read and cited by class and method, no code copied. The group labels are Revit's English UI labels. - [x] Any new test fixtures use synthetic values (`testuser`, `111111`, `FY-20XX`, etc.) and contain no real-world PII - There are no new fixtures. The test reads the BIM4LCA office (CC BY-SA 4.0, fetched by CI). ## Breaking changes BREAKING CHANGE: `IfcModel` gains a public field, `type_property_sets`. Code that builds an `IfcModel` with a struct literal needs `type_property_sets: Default::default()`, as five sites in this repository did. It deserialises as empty when absent. `PropertyValue` gains five variants (`VolumetricFlowRate`, `Pressure`, `Power`, `ElectricVoltage`, `ElectricCurrent`); since #903 made it `non_exhaustive`, that is not breaking. The option is new and off by default; without it the IFC output is unchanged. ## Screenshots or output samples R2025 model 12, `rvt-ifc --revit-property-sets`, window 12538 (`Window-Fixed:24" x 36"`), its Revit sets and its type object's: ```text window Other: Category=IfcLabel('Windows'), Family=..., Type Id=IfcLabel('12499'), Frame Extension=IfcLengthMeasure(0.00635) window Construction: Window Inset=IfcLengthMeasure(0.0) window Dimensions: Interior Wall Closure=IfcLengthMeasure(0.05715), Exterior Wall Closure=IfcLengthMeasure(0.03175) window Graphics: Exterior Trim Visibility=IfcBoolean(True), Interior Trim Visibility=IfcBoolean(True) type object IfcWindowType Window-Fixed:24" x 36" type Other: Category=IfcLabel('Windows'), Family Name=IfcText('Window-Fixed'), Default Sill Height=IfcLengthMeasure(0.9144) type Identity Data: Type Name=IfcText('24" x 36"'), Fire Rating=IfcText('0.5h') type Graphics: Muntin Visibility=IfcBoolean(True) type Construction: Muntin Pattern=IfcLabel('Muntin Pattern_2x2'), Exterior Trim=IfcLabel('Trim-Window-Exterior-Flat : with Sill'), Interior Trim=IfcLabel('Trim-Window-Interior-Flat : Picture Frame') type Materials and Finishes: Interior Frame Material=IfcLabel('Wood - Stained'), Exterior Frame Material=IfcLabel('Clad - White'), Glass Panel Material=IfcLabel('Glass'), Exterior Trim Material=IfcLabel('Clad - White'), Interior Trim Material=IfcLabel('Wood - Stained') ``` `rvt-ifc` reports on stderr: ```text rvt-ifc: Revit property sets on 13 elements and 5 types, and type sets on 0 elements of types with no type object (87 properties, 0 named parameters left out) ``` ## Related issues - Refs #35: the second slice (IFC). Built-in parameter names, enumerations' display texts, a family's built-in slots, system-family type parameters, Revit's set GlobalIds and the viewer's Parameters row remain. - Depends on #887 (slice 1, RE-207). Refs #255 (the built-in catalog), RE-194 (parameters named for a property set's property), #356 (the R2025 models), and W7 of `docs/release-1.0-criteria.md`. --------- Co-authored-by: Griffin Long <[email protected]>
…l mesh; profile, 1.0 criteria and RE-78 follow (#255)
…ate, which draws the meshes the gate rejects (#255)
…workflow run takes a branch or tag (#255)
…ed graphics does not decode (#255) (RE-224) (#995) ## Summary `--saved-meshes` now keeps an element's record box where part of its saved graphics does not decode, instead of drawing a mesh that is only part of its body. On the BIM4LCA office, 1,294 of the 1,352 bodies then drawn from a saved mesh are Revit's, against 1,294 of 1,709 before (RE-224). The default export is unchanged, and the option stays opt-in, because some partial meshes record nothing. ## Motivation RE-78 left `--saved-meshes` opt-in because nothing in the file told a complete saved mesh from a partial one. `native_saved_scene` already records, per element, what its graphics walk could not read, and `saved_meshes::attach` ignored all of it. RE-224 sets that record against each mesh's agreement with Revit's export. ## Changes - **`src/ifc/saved_meshes.rs`**: - `attach` keeps the box where the element's saved graphics carry any diagnostic other than the two that only mark a branch left out for its view semantics. - `SavedMeshReport` gains `partial`. - **`src/native_graphics_traversal.rs`**: those two messages are now constants, `NESTED_DETAIL_FILTER_DIAGNOSTIC` and `VIEW_COMPONENT_DIAGNOSTIC`, shared with `attach`. - **`src/bin/rvt_ifc.rs`**: prints how many bodies kept their box. - **`reports/element-framing/RE-224-saved-mesh-completeness.md`**, with `examples/probe_re224_saved_mesh_status.rs` and `tools/re/saved_mesh_status_vs_ifc.py`. - **`docs/supported-profile.md`**, **`docs/release-1.0-criteria.md`** (W6) and **RE-78**. W6 also loses two stale bits: walls are now 482 of 607 (RE-223), and the residuals sit under 0.9.0. - **`changelog.d/fixed/saved-mesh-partial-gate.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.sh`: CI. - [x] Verified end to end on real Revit files. - Measure [40227454417](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40227454417) (the probe): a decode failure never marks an exact mesh on Core Interior, the office and RE1 Architecture, Mechanical and Plumbing. - Measure [40231871182](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40231871182) (this change against `main`, `--saved-meshes`): exact meshes stay at 1,294 and 1,376 on the two office files, while the bodies drawn fall from 1,709 to 1,352 and from 1,797 to 1,438. RE1 Electrical gives up 2 exact meshes, stated in the report. - N/A: performance (the same pass). ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR - [x] A user-visible change has its entry as a fragment under `changelog.d/` - [x] Resolved limitations updated (W6), and the partial meshes that record nothing stated as still open - [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: probe, report and measured counts against Revit's own export ## Legal and contribution hygiene - [x] Apache-2.0 - [x] No Autodesk proprietary content - [x] No fixtures ## Breaking changes `SavedMeshReport` gains a field. It is `#[non_exhaustive]`, so this is not a break.
… parameters (#35) (RE-256) (#1065) ## Summary A wall, floor, ceiling or roof now lists its type's saved parameters after its own in `rvt-elements` and Python's `decoded_elements()`, as a family instance already did (RE-256). Each one's native record names its type in a single member (`m_WallAttributesId`, `m_floorAttributesId`, `m_ceilingAttributesId`, `m_roofAttributesId`). On Snowdon Towers, every one of these type values that Revit's export writes is Revit's: 4,297 of 4,314. The 17 left are stair landings, which name no type this way. ## Motivation #35 (M4-07) asks for type-vs-instance precedence, and my RE-207 comment of 2026-10-22 left "the type parameters of walls and floors" for a later slice. RE-207 follows only `FamilyInstance.m_masterSymbolId`, so a system-family element listed none of its type's values: on Snowdon, 1 of the 1,380 walls, floors, ceilings and roofs Revit's export types had any (an in-place wall, which is a family instance). This also gives the type's built-in values, such as Type Mark and Assembly Code, under their ids, which naming the built-in parameters (#255) will build on. ## Changes - `src/native_element_parameters.rs`: a table `SYSTEM_TYPE_LINKS` of (element record class, member naming the type, type record class): `SWall`/`ArcWall` `m_WallAttributesId`, `FaceWall` `m_typeId` (`BasicWallType`), `Floor` `m_floorAttributesId` (`FloorAttributes`), `Ceiling` `m_ceilingAttributesId` (`CompoundCeilingType`), `ProfileRoof`/`Roof` `m_roofAttributesId` (`RoofAttributes`). `read` also reads the type classes' records, and follows the member as it follows `m_masterSymbolId`. The type's values come after the element's own, at level `type`, and a parameter the element holds is not repeated. - `src/native_metadata.rs`: a `CompoundCeilingType`'s and a `RoofAttributes`'s `SymbolInfo.m_name` is read as its Type Name (-1002001), as a `BasicWallType`'s and a `FloorAttributes`' already is. - Test: `tests/element_parameters.rs` (`r2025_walls_take_their_wall_types_name`): each wall of R2025 models 01, 08 and 18 lists its type's name at level `type`, from the type record whose ElementId is the `Tag` of the `IfcWallType` Revit's export relates the wall to. - Probe: `examples/probe_35_system_type_links.rs`. Scorer: `tools/re/system_type_parameters_vs_ifc.py`. - Report: `reports/element-framing/RE-256-system-family-type-parameters.md`. - Docs: the README's element-parameters row, a dated RE-256 entry in `docs/status.md`, a dated addendum in `docs/rvt-moat-break-reconnaissance.md`, and `changelog.d/added/system-family-type-parameters.md`. The commits run feat → test → research → docs. ## Testing Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead. - [x] `tools/check-local.sh` passes (fmt, clippy, rustdoc, build, real-file / CLI / contract checks) - `cargo fmt --all -- --check` passes. - `cargo clippy --workspace --all-targets --all-features -- -D warnings` passes. - `cargo doc -p rvt --no-deps` passes with `RUSTDOCFLAGS='-D warnings'`. - `cargo +1.87 check --profile ci --all-targets` (the MSRV job) passes. - `RUSTFLAGS='-D warnings -D unnameable_types' cargo check --lib --bins` passes. - `tools/ci/verify-real-files.sh --profile ci --no-fail-fast` passes 264 of 264. It ran with `RVT_SAMPLES_DIR` (phi-ag `d2eb1f3`'s Autodesk families), `RVT_PROJECT_CORPUS_DIR` (magnetar `fd755e1` with RE1 and `r2025/`) and `RVT_NORDIC_LCA_DIR` (the BIM4LCA office as built and at permit and the housing on terrain) set, so the new test ran rather than skipped. - [x] Verified end to end on real Revit files: the command, the files (and their licence), and the measured result against Revit's own export are in the PR body, with the script or probe that reproduces it - `rvt-elements --no-typed MODEL.rvt` on `main` and on this branch, then `tools/re/system_type_parameters_vs_ifc.py`. It compares each property Revit's export writes in its own sets on the type object of a wall, slab, covering or roof with the element's type-level values. The oracle is Snowdon Towers Architectural (Revit 2025) with my export made with "Export Revit property sets", the RE-210 evidence. That export can't be redistributed, so this part is local only, as RE-210's was: | property | `main` | this branch | parameter | |---|---:|---:|---| | `Identity Data.Type Name` | 1 | 1,363 of 1,380 | -1002001 | | `Identity Data.Assembly Code` | 0 | 1,362 of 1,362 | -1002500 | | `Identity Data.Type Mark` | 0 | 889 of 889 | -1001405 | | `Identity Data.Fire Rating` (walls) | 0 | 683 of 683 | -1001206 | | `Materials and Finishes.Parapet Cap Material` | 1 | 1 of 1 | 1996136 (project) | - Revit's other type properties are not saved values of the type: `Width` is the layers' sum, `Function` and the wrapping settings are written as labels, `Assembly Description` is looked up from the code, and the analytical properties come from the materials. Two coincidences are not counted: a slab type's `Coarse Scale Fill Color` 0 equals its Function 0, and two wall types' names equal their material's. - On every model, `rvt-elements`' output differs from `main`'s only by the added type-level values. No other field of any element changes, and no element is added or lost: Snowdon Architectural; the BIM4LCA office as built and at permit and the housing on terrain (VTT, CC BY-SA 4.0); and the 23 R2025 models (puzzbobb, Apache-2.0, #356). The counts are in the report's §4. - `rvt-ifc` writes the same file as `main` on all of them, apart from the timestamp. With `--revit-property-sets` it does too, except on the two office files, where 5 roof types also carry their project parameter `U_value` (1.0) in `Identity Data`: the type's record is read now, and RE-210 writes a type's named parameters. The office was exported without Revit's property sets, so whether Revit writes it there isn't measured. - [x] If this touches the IFC exporter: the witness verdicts replay (see CONTRIBUTING.md) or the changed observations are refreshed in this PR - The default export is unchanged on every model above, Core Interior included in the real-file suite's witness tests. - [x] If this is a performance change: reran `tools/bench.sh` and attached the before / after - Not a performance change. The type records are read in the same pass over the file as the family types. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR — no claims of features that are not actually shipped in this PR - [x] A user-visible change has its entry as a fragment under `changelog.d/<section>/` (see `changelog.d/README.md`), not in `CHANGELOG.md` - `changelog.d/added/system-family-type-parameters.md`; `tools/release/changelog.py check` passes. - [x] If a limitation was resolved, the "Known limitations" / "What works today" section in the relevant docs is updated - The README row now names walls', floors', ceilings' and roofs' type parameters. - [x] If a new limitation was introduced, it is documented in the PR body and in-code - No new limitation. Still open: stair landings name no type through their own record; built-in parameters have no name (#255); a type's computed values (a wall type's `Width`, its `Function` label) are not saved values and are not listed. - [x] Commit messages describe WHAT changed and WHY, not "fix things" or "updates" - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files - The test, probe and scorer take their paths from `RVT_PROJECT_CORPUS_DIR` or arguments. The commits are authored and committed with GitHub's noreply address, and signed. - [x] If this is a reverse-engineering finding: a reproducible probe under `examples/` and a dated addendum to `docs/rvt-moat-break-reconnaissance.md` are included ## 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`) - [x] Any new test fixtures use synthetic values (`testuser`, `111111`, `FY-20XX`, etc.) and contain no real-world PII - No fixtures. I declare that this format finding comes only from public byte observations of the reference models and Revit's own exports of them (CLEANROOM.md source 1); no Autodesk or ODA SDK source, disassembly or NDA material was used. ## Breaking changes None. `rvt-elements` and Python list more entries, all at level `type`; no entry changes. ## Screenshots or output samples An R2025 wall (01_Walls, 2787): ```json {"group_type_id": null, "kind": "built_in", "level": "type", "name": null, "parameter_id": -1002001, "source_class": "BasicWallType", "source_element_id": 1982, "storage_type": "String", "value": "Wall 1", ...} ``` ## Related issues Refs #35. Follows #887 (RE-207). --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>
…1089) ## Summary `rvt-ifc` and `rvt-gltf` now draw every door and window whose body would be its record's bounding box from the mesh Revit saved for it, by default, on Revit 2023 to 2027 and where the whole mesh decodes. `--no-saved-meshes` keeps the boxes; `--saved-meshes` still draws every other boxed class too. ## Motivation Griffin's decision, 2026-10-29 (asked with the measured numbers): doors and windows are the largest record-box gap on the CI models. Measure run 40932136360 with `--saved-meshes` on main af50068: every vertex within 0.001 ft of Revit's export on all 132 of Core Interior's doors and 6 windows (record-box bodies 138 to 0) and all 269 of the BIM4LCA office's windows; on the office 221 of 269 doors keep their box because their saved graphics do not decode whole (RE-224). ## Changes - `src/ifc/saved_meshes.rs`: `SavedMeshScope` (`All`, `DoorsAndWindows`) and `attach_scoped_with_control`; `attach` / `attach_with_control` keep `All`. - `src/bin/rvt_ifc.rs`, `src/bin/rvt_gltf.rs`: `--no-saved-meshes`; the default scope is doors and windows on 2023 to 2027 (where native saved graphics are read), none elsewhere; the stderr line names the scope (the `--saved-meshes` line keeps its wording, which ci.yml parses). - Docs: README, docs/supported-profile.md, docs/status.md, docs/compatibility.md, the W6 row; ci.yml's comment; `changelog.d/changed/saved-meshes-doors-windows.md`. ## Testing Unit tests are banned in this repository: do not add them. - [x] tools/check-local.sh: not run locally by policy; CI runs every gate. - [x] Verified end to end on real files: run 40932136360 above measured the bodies this default writes. Measure on this head against main follows (every model; the expected movement is the door and window bodies on 2023 to 2027 models). - [x] Exporter output changes on Core Interior and Einhoven, so the witness observations and any pinned counts move; refreshed from this PR's CI artifacts in a follow-up commit. ## Audit-honesty checklist - [x] Docs say doors and windows are drawn from saved meshes by default, and that the office's 221 doors keep their box. - [x] Changelog fragment under changelog.d/changed/. - [x] No emojis, private paths or internal jargon. ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk material. ## Breaking changes Rust API: additive (`SavedMeshScope`, `attach_scoped_with_control`). Behaviour: default exports of Revit 2023 to 2027 files draw doors and windows from their saved meshes; `--no-saved-meshes` restores the boxes. ## Related issues Refs #227, #255, #409.
… with its own sets (RE-210) (#885) (#1116) ## Summary Measure now scores `rvt-ifc --revit-property-sets` (RE-210) against Revit's own exports with "Export Revit property sets" ticked: puzzbobb's `R2025_Models_wRVTSets.zip` (#885, Apache-2.0), 19 Revit 2025 models. It is the first redistributable Revit export with these sets; RE-210 §6 asked for exactly this one. ## Motivation RE-210 was measured on Autodesk's Snowdon samples, which are local only. CI could not check the option, and the R2025 models' family type values had no export to score against. ## Changes - `research/r2025-models.tsv`: each export in the archive whose `.rvt` is in `R2025_Models.zip` (19 of 21) is extracted as `<model>.revit-sets.ifc`. - `tools/ci/measure-reference-models.sh`: where `<model>.revit-sets.ifc` is beside a model, it exports again with `--revit-property-sets` (once, whatever `ifc_flags` holds) and runs `tools/re/revit_property_sets_vs_ifc.py --list` into `revit_property_sets_vs_ifc.txt`; `scorers=revit_property_sets_vs_ifc` selects it. - `tools/re/revit_property_sets_vs_ifc.py`: counts, among the values that differ, those whose value in Revit's export is rvt-rs's divided by 304.8 squared. - `reports/element-framing/RE-210-revit-property-sets.md`: §9, the measurement. ## Testing Measure [40978087421](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40978087421) (every R2025 model) and [40978621247](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40978621247) (models 12, 13 and 16, listed), `-f ref=main`: | | properties | |---|---:| | rvt-rs writes in Revit's own sets | 2,646 | | ... equal | 2,502 | | ... different | 126 | | ... not written by Revit | 18 | | Revit's that rvt-rs does not write | 4,403 | - The 126 different are Revit's export writing the window type's `Default Sill Height` and its nested muntin and trim families' `Width`, `Height`, `Opening Width` and `Opening Height` at 1/304.8² of their value (a 914.4 mm sill as 0.0098 mm), on the three windows of models 12 to 17. rvt-rs's values are the windows' size. - The 18 are the stringer type's `Category`, `Family Name` and `Type Name`, which Revit writes as `Other(Type)` on the stringers, not on the `IfcMemberType` rvt-rs puts them on (RE-210 §2's late type object). - The 4,403 are almost all built-in parameters, which rvt-rs does not name (#255). No code or export changes; unit tests: none (banned). ## Audit-honesty checklist - [x] RE-210 states what is measured and what differs - [x] No changelog fragment: measurement only, no user-visible change - [x] No private paths, emojis or jargon ## Legal and contribution hygiene - [x] Apache-2.0; the archive is puzzbobb's, released under Apache-2.0 on #885, fetched at run time by its sha256 and never committed - [x] No Autodesk proprietary material (`CLEANROOM.md`) ## Breaking changes None. ## Related issues Refs #885, #35, #255.
… Rotation is 0 (W7) (RE-276) (#1174) ## Summary rvt-rs reads a beam's Cross-Section Rotation from its native record and writes `Pset_BeamCommon.Roll` 0 on a beam whose rotation is exactly 0. 8 of 8 beams of the BIM4LCA office are Revit's value as built and at building permit; nothing else moves. Stacked on #1173 (beams' `Slope`): its commit comes first in this branch. ## Motivation W7: Revit's IFC4 export writes `Pset_BeamCommon.Roll` on each of the office's 8 beams (`Putkipalkki - suorakaide:PA-1`), 0.0 on all, and rvt-rs wrote none (Measure run 41104131261). revit-ifc's `RollCalculator` (CLEANROOM.md source 5; read and cited, no code copied) takes the roll from the beam's Cross-Section Rotation built-in parameter (`STRUCTURAL_BEND_DIR_ANGLE`), in radians, and answers true even for 0. A built-in parameter keeps its negative id and no name in the file (#255), so the probe `probe_w7_office_gaps` looked in the beam's native record: its `FamInstCurveDriver` object holds `m_rotation`, a radian value, 0.0 on each of the 8 beams in both files, beside the driver's other instance settings (RE-276). No other member of the record is a rotation: `FamilyInstance` holds `m_RefDir` and `m_zAxis`, and `InstanceInfo` its transform's origin. ## Changes - `src/research/partition_schema_mvp/framing.rs`, `fields.rs`, `partition_schema_mvp.rs`: `attach_beam_rotations` gives each structural-framing element `m_beam_cross_section_rotation` (`BEAM_ROTATION_FIELD`), the `m_rotation` its native record's copies agree on, in one `extract_graphs` pass over the beams. - `src/ifc/export_content.rs`: `add_beam_roll` writes `Roll` 0 where the beam also has the extrusion length (`add_beam_length`) and its rotation is 0. - `reports/element-framing/RE-276-beam-cross-section-rotation.md`, `changelog.d/added/beam-roll.md`, `docs/release-1.0-criteria.md` (W7 lists unrotated beams' `Roll`). ## Testing Measure run 41118816912, unfiltered (`-f base=main -f nordic=true -f r2025=true`, every scorer), head 0ba5813 (this branch with main merged: this PR's code, #1173's commit and #1163's old commit) against main 80442f8. The branch has since only merged main again, where #1163 landed. | `psets_vs_ifc` | before | after | |---|---|---| | office as built, `Pset_BeamCommon.Roll` | 8 values, equal 0, missing 8 | 8 values, equal 8, missing 0 | | office at permit | 8 values, equal 0, missing 8 | 8 values, equal 8, missing 0 | Only the office's two files change; every other model's outputs, `ifc.sha256` included, are identical to main's. The main the run compared against did not yet hold #1163's `Span` (landed since), so the same run also shows `Span` and #1173's `Slope` going from 0 to 8 of 8 equal on each file: as built equal 44,079 to 44,103, missing 13,638 to 13,614; at permit equal 44,261 to 44,285, missing 13,598 to 13,574, the 24 values being 8 each of `Span`, `Slope` and `Roll`. None different, none written that Revit's export omits ("values Revit does not write" unchanged: 10 as built, 14 at permit). `diagnostics.decoded.parameter_value_count` goes up by those 24 (44,356 to 44,380 as built, 44,542 to 44,566 at permit), as the `Pset_` values of the file do. Roll's share is 8 on each file. - [x] Verified end to end on real Revit files: the BIM4LCA office (CC BY-SA 4.0) as built and at building permit, and the R2025 models, RE1 and Core Interior, against Revit's own exports, by Measure run 41118816912 - [x] Revit's IFC4 export is the oracle; nothing is written that it omits, none differs ## Limits All 8 measured beams are unrotated, so what `m_rotation` carries for a rotated beam is not measured. A rotated beam gets no `Roll` (fails closed); a model with rotated beams and Revit's export would decide it. The extra `extract_graphs` pass reads only the beams' records. ## Breaking changes None. ## Related issues Refs W7 (`docs/release-1.0-criteria.md`), #1173.
… trimmed parametric faces draw the BIM4LCA office's 43 toilets, none of them Revit's body, at 3.7 times the triangles, so the readers stay off main (#1247) (RE-302) (#1264) ## Summary A measured negative for #1247, landed the way RE-303's was: the report, its two probes and a reconnaissance addendum, with no reader change. The readers for ellipse profiles, curved ruled surfaces and parametric faces trimmed by any single loop draw the BIM4LCA office's 43 toilets from their saved meshes. None of them is Revit's body, and the office's triangles grow 3.7 times, so the readers stay on `research/1247-ellipse-profiles` at f4d82ed. ## Motivation After RE-304, the office's census of saved meshes kept as boxes (#255, RE-224) was led by three gaps in the parametric readers: `GEllipse` profiles, non-rectangular trims and curved ruled profiles. Negative results bind future work, so the measurement and the two mechanisms a next attempt has to address are recorded. ## Changes - `reports/element-framing/RE-302-ellipse-profiles-and-trimmed-parametric-faces.md`: - the readings; - the census at each reader step, 124 kept boxes to 84; - the 43 toilets against Revit's export: 1.027 to 1.047 of its volume, up to 0.0218 ft off, two of four shells over; - the cost: 568,965 to 2,097,501 triangles and an 82 to 182 MB IFC, over Measure's 120 MB validation limit; - the two mechanisms: quadratic slivers from cutting earcut triangles at every knot, and extra surface that is not a second branch of the edge trace. - `probes/examples/probe_re302_ellipse_profiles.rs`: what a `GEllipse` holds, and what points to it. - `probes/examples/probe_re302_plane_edges.rs`: how far an edge a plane shares with a curved face lies from the plane, at Revit's samples and between them, and how many sign changes each traced point's search sees. - `docs/format-reconnaissance.md`: the dated addendum. ## Testing No reader change. Measured on GitHub's runners: - Measure 41585460305: the readers at f4d82ed against `main` at 30756e9, `--saved-meshes`, `mesh_bodies_vs_ifc` and `schema`. Core Interior and RE1 are byte-identical. - The census 41585448251. - The probes 41559823434 (the ellipse census, at 6efd70b), 41578601400 and 41587751357 (the plane edges, at 970d1b3 and 827718f). - A review read every number against these runs; its corrections (the base commit, the samples that move, the ellipse counts, the probes' commits) are in 8dd8649. The report's section 5 names each command by commit. `tools/ci/api-doc-ids.py` passes with 284 reports. ## Audit-honesty checklist - [x] No capability claim changes; the report states what is not claimed - [x] No user-visible change, so no changelog fragment (as RE-303) - [x] A reproducible probe under `probes/examples/` and a dated addendum to `docs/format-reconnaissance.md` - [x] No emojis, private paths or internal jargon ## Legal and contribution hygiene - [x] Apache-2.0 - [x] Contributor declaration (`CLEANROOM.md`): the findings come from public byte observations of the saved graphics of the BIM4LCA office and Autodesk's sample projects, and are scored against Revit's own IFC exports of the same files. No Autodesk SDK source, decompiled internals, leaked or NDA material was used. ## Breaking changes None.
…aws 30 more BIM4LCA office fittings, none of them Revit's body, so the change stays off main (#1247) (RE-305) (#1265) ## Summary A measured negative for #1247, as RE-303's and RE-302's (#1264) are: the report and a reconnaissance addendum, with no reader change. Meshing a cylinder face trimmed by several loops draws 30 more BIM4LCA office bodies from their saved meshes. All are `Stay_Wall_Mounted_:VAR-1`, and none is Revit's body, so the change stays on `research/1247-cylinder-holes` at 0f37766. ## Motivation After RE-304, `multiple cylinder trim loops unsupported` keeps 45 office elements as boxes, 30 for it alone (#255, RE-224). Negative results bind future work. ## Changes - `reports/element-framing/RE-305-cylinder-holes.md`: - the reading; - the 30 fittings against Revit's export: 1.109 to 1.120 of its volume where the scorer lists them, at most 0.0118 ft off, three of five shells over; - the triangle cost, 568,965 to 822,135; - what it has in common with RE-302's toilets, with no shared cause shown. - `docs/format-reconnaissance.md`: the dated addendum, placed apart from #1264's so the two land without conflict. ## Testing No reader change. Measure 41573475107: the change at 0f37766 against `main` at 8979384, `--saved-meshes`, `mesh_bodies_vs_ifc` and `schema`. Core Interior, RE1 and the 24 R2025 models are unchanged. A review read every number against the run; its corrections are in the second commit. This lands after #1264, whose RE-302 report it cites. `tools/ci/api-doc-ids.py` passes. ## Audit-honesty checklist - [x] No capability claim changes; the report states what is not claimed - [x] No user-visible change, so no changelog fragment - [x] A dated addendum to `docs/format-reconnaissance.md`; the census probe is RE-224's `probe_re224_saved_mesh_status` - [x] No emojis, private paths or internal jargon ## Legal and contribution hygiene - [x] Apache-2.0 - [x] Contributor declaration (`CLEANROOM.md`): the findings come from public byte observations of the BIM4LCA office's saved graphics, scored against Revit's own IFC export of the same file. No Autodesk SDK source, decompiled internals, leaked or NDA material was used. ## Breaking changes None.
…t-ifc --revit-property-sets in CI, per model (#35) (RE-210) (#1274) ## Summary Measure scores `rvt-ifc --revit-property-sets` (RE-210) against puzzbobb's Revit 2025 exports made with "Export Revit property sets" on every run with `-f r2025=true` (and `scorers` empty or naming `revit_property_sets_vs_ifc`). That wiring landed in #1116; this PR adds the per-model measurement it never stated and puts the CI evidence on the pages that still cited only the local Snowdon measurement. Docs only: the workflow, the scorer and the export are unchanged. ## Motivation #35 (the evidence for `--revit-property-sets`) and #885, where puzzbobb attached `R2025_Models_wRVTSets.zip` and the owner asked for it to be scored with `tools/re/revit_property_sets_vs_ifc.py`. RE-210 section 9 gave only the 19-model total from 2026-10-29, and `docs/evidence.md`, `docs/status.md`, `docs/supported-profile.md`, `docs/format-reconnaissance.md` and the support matrix's notes said the evidence was Snowdon, measured locally. ## Changes - `reports/element-framing/RE-210-revit-property-sets.md`: section 9 gains the per-model table, the pairing in both directions and the reproduce command; the status line and section 6 say the R2025 models are scored in CI (section 6 said "models 01 and 12 to 17" have an export; 19 of the 24 do). - `docs/evidence.md`, `docs/status.md`, `docs/supported-profile.md`, `docs/format-reconnaissance.md`, `docs/support-matrix.json` (the `notes` string only; no status moves): the CI measurement beside the Snowdon one, with the caveats kept (Snowdon is local only, `(Type)` sets follow Revit's export order, built-in parameters are not named, #255). ## Testing Unit tests are banned in this repository: none added. `tools/check-local.sh` was not run: nothing it checks changed (documentation and one JSON string, parsed with `json.load`). - [ ] `tools/check-local.sh` passes (not run; docs-only change, no local builds here) - [x] Verified end to end on real Revit files: Measure run [41636859789](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41636859789), `main` at 42e07b8, puzzbobb's R2025 models and exports (Apache-2.0, fetched by sha256 and never committed): ```bash gh workflow run measure.yml --ref main -f ref=42e07b8ff34d33df9183c06a4014af19dc78356b -f base=none -f r2025=true -f models="r2025-*" -f scorers=revit_property_sets_vs_ifc ``` Properties rvt-rs writes in Revit's own sets, over the 19 paired models (the same counts as the 2026-10-29 run, [40978087421](https://github.com/DrunkOnJava/rvt-rs/actions/runs/40978087421), model by model): | | properties | |---|---:| | rvt-rs writes in Revit's own sets | 2,646 | | equal | 2,502 | | different | 126 | | in another set than Revit's | 0 | | not written by Revit | 18 | | Revit's, not written by rvt-rs | 4,403 | - The 126 different are on models 12 to 17, 21 each: Revit's export writes a window type's `Default Sill Height` and its nested families' `Width`, `Height`, `Opening Width` and `Opening Height` at rvt-rs's value divided by 304.8 squared (the scorer counts all 126 so). - The 18 are the stringer type's `Category`, `Family Name` and `Type Name` on models 13 to 15: Revit writes them in `Other(Type)` and `Identity Data(Type)` on the stringers and gives its `IfcMemberType` no sets. - The 4,403 are almost all built-in parameters, which rvt-rs does not name (#255). Per model (rvt-rs writes / equal / different / not written by Revit / Revit's, not written by rvt-rs): 01_Walls 40/40/0/0/125; 02_1Slope_Rafter2PlumbCut, 03_2Slope_Rafter2SquareCut, 04_Gable, 06_1Slope_ArrowDefined_SetToSlope and 07_1Slope_ArrowDefined_2Cut50mmFascia 48/48/0/0/144; 04_Gable_Swapped_Slopes and 05_1Slope_ArrowDefined 48/48/0/0/143; 08 to 11 (the hip roofs and the extrusion) 64/64/0/0/193; 12_Rooms_Door_Windows 289/268/21/0/303; 13, 14 and 15 (stairs) 337/310/21/6/403; 16_Rooms_Stairs_Monolithic 321/300/21/0/381; 17_Rooms_Stairs_Spiral 321/300/21/0/382; 18_WallJoins 72/72/0/0/225. RE-210 section 9 has the table. Exports that could not be paired: `01_Walls_Phases_Demo` and `19_1Slope_ArrowDefined_SetToSlope_HeadHalfway` have no `.rvt` in either archive. `.rvt` files with no export made with Revit's property sets, so not scored: `00_Blank`, `02_1Slope`, `02_1Slope_Rafter2SquareCut`, `02_1Slope_Rafter2SquareCut_Overhang` and `20_T_U_Roof`. The export of 07 doubles as its reference export. - [x] If this touches the IFC exporter: not touched. - [x] If this is a performance change: not one. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR; no capability claimed beyond what the run measured - [x] A user-visible change has its entry as a fragment: N/A, no capability changes (documentation of an existing measurement) - [x] If a limitation was resolved: none was - [x] If a new limitation was introduced: none - [x] Commit message describes 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: N/A, a measurement of an existing option ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 - [x] No Autodesk proprietary source, decompiled internals, or NDA'd SDK content (`CLEANROOM.md`) - [x] No new test fixtures; the archives are puzzbobb's, released under Apache-2.0 on #356 and #885, fetched at run time and never committed ## Breaking changes None. ## Screenshots or output samples Not applicable (no IFC output changed). ## Related issues Refs #35, #885, #1116.
…rees the office's toilets at 1.006 of Revit's volume, and what is left is Revit's faceting, so the readers stay off main (#1247) (RE-302) (#1321) ## Summary A second attempt at #1247's RE-302 readers, recorded as a measured negative like the first (#1264): the report gains section 6, the toilet-faces probe and its scorer land, and the readers stay on `re/1247-per-cell-clip` (reader code at b5d5546, tip d5d26fb). No reader change on `main`. ## Motivation The first attempt left two mechanisms open: the office's triangles grew 3.7 times, and the 43 freed toilets were 1.027 to 1.047 of Revit's volume with "extra surface in two of four shells". Negative results bind future work, so what the second attempt measured is recorded. ## Changes - `reports/element-framing/RE-302-ellipse-profiles-and-trimmed-parametric-faces.md`: Result and the first attempt's two conclusions corrected in place; section 6: - clipping each trimmed loop to the grid cells it covers (Sutherland–Hodgman, a fan or an earcut per piece, the pieces' corners shared): the office goes from 2,097,501 to 1,191,138 triangles (568,885 on `main`) and from 181.8 to 104.6 MB, so IfcOpenShell validates it again; three grid variants measured (1,354,151 / 110.4 MB, 1,187,075 / 104.4 MB, 1,191,138 / 104.6 MB); - the 43 toilets are within 1% of Revit's volume (1.0059 to 1.0060, constant across instances), their area 0.5% above Revit's: the extra surface was not there; - per face against Revit's mesh: the 0.022 ft is Revit's faceting of four surfaces of revolution (Revit's vertices there are on our surface); 66 of Revit's 808 vertices lie 0.003 to 0.005 ft off ours where two of our faces meet, which this run cannot assign to Revit or to our boundary; - what a next attempt needs. - `probes/examples/probe_re302_toilet_faces.rs`: every decoded face of a few toilets, in document feet (run it at d5d26fb). - `tools/re/toilet_faces_vs_ifc.py`: scores each face against Revit's mesh of the toilet, places Revit's off-surface vertices and measures Revit's sag. - `docs/format-reconnaissance.md`: the RE-302 addendum updated. ## Testing No reader change. Measured on GitHub's runners (section 5 names each command by commit): - Measure 41765801884 (per-cell clip with every trim vertex a knot, 301c209, against `main` at 8b8f1fe), 41765805196 (406e4b5) and 41766414367 (b5d5546, the branch's): the office pair, `--saved-meshes`, `mesh_bodies_vs_ifc` and `schema`. - Probe runs 41766357243 (5380e8b) and 41767705968 (d5d26fb): the toilet faces against Revit's export of the office (development data, not held out). - Not measured: Core Interior, RE1, the Revit 2025 models and the 2024 samples with the second attempt, since its readers do not land (stated in the report). - `tools/ci/api-doc-ids.py` passes with 300 reports. The report states one decision for the maintainers: whether the toilets are kept on "ref on ours" as RE1's elbows were (#1280). They fail it (0 of 43), so it does not arise until the 66 vertices are settled. ## Audit-honesty checklist - [x] No capability claim changes; the report states what is not claimed - [x] No user-visible change, so no changelog fragment (as RE-303 and the first RE-302 report) - [x] A reproducible probe under `probes/examples/` and a dated addendum to `docs/format-reconnaissance.md` - [x] No emojis, private paths or internal jargon ## Legal and contribution hygiene - [x] Apache-2.0 - [x] Contributor declaration (`CLEANROOM.md`): the findings come from public byte observations of the saved graphics of the BIM4LCA office, scored against Revit's own IFC export of the same file. No Autodesk SDK source, decompiled internals, leaked or NDA material was used. - [x] No fixtures added ## Breaking changes None. ## Related issues Refs #1247, #255.
…ead on selection (#35) (RE-207) (#1468) ## Summary The viewer's info panel lists a selected element's saved parameters (RE-207): instance, then type, named ones first, nameless ones behind a fold grouped by why they have no name (#255), each row saying where its parameter is defined. They are read for that element only, on selection, by a new `savedParameters` binding in a worker of its own; the open and every export are unchanged. File Status's Parameters row no longer says the rest are "still to be decoded". **Nothing is requested once the first file is open** (Griffin, 2026-11-05, "Keep the claim, no request"): selecting an element, exporting IFC, plan or glTF, and opening the file again fetch nothing, and a page taken offline after it loaded does all of them. ## Motivation The last open acceptance item of #35 that is not blocked: "Viewer info panel displays them in readable form". The CLI, Python and IFC (`--revit-property-sets`) expose the saved parameters; the viewer showed a count and a sentence that RE-207 had already made wrong. ## Changes - `rvt-wasm/src/lib.rs`, `rvt-wasm/Cargo.toml`, `Cargo.lock`: `savedParameters(bytes, ids, limits)` returns JSON text: each entry is `serde_json::to_value` of the parameter `native_element_parameters::read` gives, the call `rvt-elements` makes, with the release and how far it is read. `rvt` gets `unstable-research` here, which "adds paths and changes nothing else" (`src/research.rs`); no file under `src/` changes, so no export can move, and `arm.sh`'s `src/` gate path does not match `rvt-wasm/src/`. **The result's keys are a 1.0-stable surface** (`RELEASE.md`): `release`, `release_read`, `release_experimental`, `releases_read`, `releases_measured`, `elements`, `unresolved_family_slots`, `instance_parameters_without_value`. I chose them to say what they mean (not the research module's "native"): the read range, the measured range (Revit 2015 to 2022 are read experimentally, RE-281), and what could not be listed. `ids` is a `Float64Array`. - `viewer/src/parameters-worker.ts`, `viewer/src/saved-parameters.ts`, `viewer/src/wasm-failure.ts` (new; the out-of-memory test both workers use), `viewer/src/worker.ts`, `viewer/src/main.ts`, `viewer/src/styles.css`, `viewer/index.html`, `viewer/src/env.d.ts`: the panel group and its states (loading, ready, empty, release not read, experimental release, no ElementId, error with Try again, read-when-asked), the page's map of answers, focus and a live region, the status row text, and the no-request mechanics below. The "Not recovered" note for an element with no IFC property set now says "IFC property sets". - `viewer/tests/parameters-row.spec.ts`, `viewer/tests/no-network.spec.ts`, `viewer/tests/worker-failures.spec.ts` (now patches the inline worker's blob where it routed a worker URL), `viewer/tests/folded-pieces.spec.ts` (prints what a read does and what the page keeps on the BIM4LCA office, and fails if the read errors). - `.github/workflows/viewer-test.yml`, `.github/workflows/deploy-viewer.yml`: after #1458, `--bin rvt-elements` is built beside `gen-fixture` in the `build` job, copied into the artifact and checked to run in each leg; Deploy viewer builds and uploads its own artifact for `tests` and `measure`, so it carries the binary the same way. A local `pnpm test:browser` needs `rvt-elements` on PATH (`viewer/README.md`); the `parameters-row` specs skip without it locally and fail in CI. - Docs: `docs/viewer-api.md`, `docs/viewer-privacy-posture.md` (the CSP change, below), `README.md` (13 bindings), `docs/status.md`, `docs/support-matrix.json` (it also drops the "wall's or floor's type parameters are not joined" caveat RE-256 made stale), `docs/evidence.md`, `docs/export-diagnostics.md`, `docs/user-guide.md`, `docs/viewer-build-pipeline.md`, `docs/maintaining.md`, `viewer/README.md`, and `changelog.d/added/35-viewer-saved-parameters.md`. ## Design **A worker of its own, nothing resident.** `extract` is a pass over the file, so the read is lazy, per selected element. The open's worker keeps no `RevitFile` and no bytes: a held handle would keep the file's bytes and every partition it inflates for the session, and its reads would hold up the panel (Core Interior's take seconds). Instead the page opens a worker for one element, which reads the `File` the page already holds, calls the binding, answers and is terminated, or is terminated at once when another element, a storey or a scaffold panel replaces the group. wasm linear memory only grows, so ending the worker gives a read's memory back. A worker the browser ends with no word (no event) is found by a Web Lock it holds, so "Reading" cannot show for ever. **No request once the file is open; the CSP change.** The page's `worker-src` was `'self'`; it is now `'self' blob:`, and nothing else in the policy moves (`docs/viewer-privacy-posture.md` says so and why). Both workers (the open's and the reader) are bundled into the page (`?worker&inline`) and start from blob URLs; the decoder's glue is a static import (the main thread's exports used to `import()` it, and fetch the wasm, at the first export click). The first open's worker fetches the wasm once, compiles it and hands the module to the page, which keeps it: the next open (another phase, the saved-mesh toggle, the large-model retry), the readers (`initSync({ module })`) and the main thread's exports (`default({ module_or_path })`; the main thread does not allow `initSync` of a large module) start from it. The lazy loads in `viewer/src` that could run after the open were: `import('../pkg/rvt.js')` (static now), `new Worker(new URL('./worker.ts', ...))` (inline now), the worker's `fetch(new URL('../pkg/rvt_bg.wasm', ...))` (the page resolves the URL once, and fetches only at the first open). Opening a gallery demo still fetches the demo, which is an open. **First page load.** The page's one script is 999.56 kB (271.47 kB gzipped) against 959.29 kB (262.82 kB) in the build of `d1de8adf`: 40.27 kB, 8.65 kB gzipped, more, mostly the glue and the two workers it used to fetch later; the built site holds one script, one stylesheet and the wasm. **When a selection is read on its own.** A read has taken 0.74 to 1.04 times the open's wasm memory, and the ratio rises with the file (Einhoven 23 MiB, Core Interior 326, the office 910). Nothing above the office has been measured, so a selection is read on its own only while the wasm memory the page holds (the open's, plus the main thread's instance if an export made one) is at most 1 GiB (a quarter of `?memoryCeilingBytes=` where that lowers the 4 GiB ceiling), and above that the panel asks first with a button whose copy says clicking may close the tab: a renderer out of memory takes the tab and the model with it, with no error. After a read that ran out of memory, or a worker that went without a word, that file is read only when asked. This replaces the rule that two instances stay inside the ceiling, which extrapolated past what is measured. **What the page keeps.** Each element's answer, in a map on the page: at most 64 (`?parametersRemembered=` lowers it for the test), the least recently selected going first, emptied when a file is opened. Selecting an element again starts no worker. On the office after the test's selections it held 2 answers, 4,654 characters of JSON (the entries are small; the answers there have 8 entries). ## Testing Unit tests are banned in this repository: none added. Measured in **Viewer tests run 42125048710**, dispatched on head `3146f14e6fcf221adc4f632ac1a5cfa31a3b885d` (the merge of main with #1457's changes included), `release_wasm=false`, on a CI runner: success in all three legs, `check-wasm-in-site.sh` finding the one wasm sha256 in the site in each. **Deploy viewer run 42125109395**, dispatched on the same head, on the release (LTO) wasm: success. Its `tests` job passed all 61 tests of the suite (the whole of it, on the wasm the site publishes), its `measure` job 6, and `check-wasm-in-site.sh` found the artifact's one sha256 (`d2b60a7e…`) in the built site in each of the three jobs that build it; the page's one script is the same size as in the viewer tests' build (999.56 kB, 271.47 kB gzipped). On the office with that wasm a read took 3.3 s in 942 MiB beside the open's 910 MiB, on selection, and the page kept 3 answers, 4,929 characters; the real capped read ran out of memory as in the other run. (`deploy` is skipped on a branch, by design.) This PR's head is `3146f14e` plus documentation (the figures, in the changelog, `docs/status.md` and `docs/viewer-api.md`) plus a merge of main as it stood at #1470, whose export changes (#1456, #1470, `src/ifc`) were not part of either run; the full CI of the ready PR runs the viewer tests on this head. Earlier runs on earlier code are not counted; Deploy viewer 42122627698 and viewer tests 42122623374, on `7663a4f3`, each failed once, in the test of a worker ended with no word, which ended a worker that had already answered (a read of Einhoven takes a fraction of a second); the test now holds the file back first. `viewer/tests/parameters-row.spec.ts`, in the viewer's leg 1/3 (no new spec file). The oracle is the command line: the test runs `rvt-elements` on the same file. | | Einhoven (2023) | Core Interior (2024) | BIM4LCA office as built | |---|---|---|---| | Compared with `rvt-elements`, whole entries | 37 of 37 tree elements: 28 with parameters (369 entries: 332 instance, 37 type, 8 named) equal, 7 with none show the empty state, 2 have no ElementId in the export (shown as such) | 4 elements, IFCSLAB 22756 (4 entries), IFCWALL 22771 (11), IFCCOLUMN 22798 (17), IFCDOOR 80750 (21), equal | **not compared** | | A read, time (a CI runner's) | median 153 ms, most 210 ms | 1.5 to 1.9 s | 3.9 s (8 entries, IFCCOVERING 2097832) | | That read's wasm memory | 17 MiB | 275 MiB | 943 MiB | | The open's worker | 23 MiB, 0.7 s in the open call | 326 MiB, 17.3 s | 910 MiB, 66.6 s | | Read over open (memory) | 0.74 | 0.84 | 1.04 | | How it was read | on selection | on selection | on selection (no button) | | Kept by the page | | | 2 answers, 4,654 characters of JSON | Also in the spec (each passed in 42125048710): - **A real out-of-memory read.** A Chromium whose V8 caps wasm memory at 927 MiB (`--wasm-max-mem-pages`, the pattern of `memory-ceiling-capped.spec.ts`) opens the office (910 MiB) and the read (943 MiB) really runs out: the page says "The tab ran out of memory reading the file a second time (unreachable)... read only when asked from now on", and the next element asks. A read of Einhoven cannot fail after its open succeeds (17 MiB against 23), so the office is the only file in CI where a cap separates the two. - **No request, offline.** After the load the page is taken offline and every request is recorded (workers included): three elements are read and equal `rvt-elements`', an IFC, a plan and a glTF export are made, the file is opened again (the saved-mesh toggle), an element is read again, and no http(s) request was made. `no-network.spec.ts` runs the same exports and re-open, and a selection, in phases that allow nothing, and fails if the sample has no element to select, if the wasm is fetched to boot the page or more than once. - The gate at its edge (a limit 8 MiB over and 8 MiB under Einhoven's measured open memory: read on selection, then asked); the bare-`unreachable` branch and its copy, and the file read only when asked afterwards; a worker ended with no word, with the file held back four seconds so it is still reading; a read for an element no longer shown ended (another element, a storey), and the shown element's read not started over by selecting it again; an element selected again starting no worker; a copy of the file opened under another name emptying the map; the bound; a read that fails with a panic, with Try again, and focus on the result; the empty state; the Parameters row text; Revit 2013 (the worker's answer replaced) and Revit 2019 experimental (replaced). Not verified: - **The release-not-read and experimental-release states.** No file of a release outside Revit 2015 to 2027, or of 2015 to 2022, is in the viewer's job, so those two tests replace the worker's answer to the page with the binding's shape for one (`release_read` false; `release_experimental` true). They test the page's rendering only. The Rust branches (`NATIVE_RELEASES.contains`, the measured range) are not exercised by any file. - `tools/check-local.sh`, clippy and `tools/ci/check-workflows.py` (no local compute; PyYAML is not installed here); CI's fast jobs on this PR are the check. The wasm network-import audit passed in the viewer legs. - An ElementId above `u32::MAX`: the binding reads it, the command line lists such elements as `id: null`, so nothing compares them. - The office is not compared with `rvt-elements`; only that its read does not error. The gate is held at its edge on Einhoven's open memory; no file between 910 MiB and the 4 GiB ceiling is in the viewer's job, which is why the limit is the measured 1 GiB. - The CDP session of `no-network.spec.ts` may not see worker requests; the offline test, which records every request and fails any, is what covers them. - Screen-reader announcements were not heard: the live region's text and the focus move are asserted, not a screen reader's output. ## Breaking changes None. A binding is added (`tools/ci/wasm-api.py compat` has nothing to flag); no existing binding or output changes. The `worker-src` of the page's Content-Security-Policy gains `blob:`. ## Related issues Refs #35 (#255 and the family built-in slots stay open).
Summary
Add native Rust APIs and command-line tools for extracting model records, attributes, relationships and saved geometry. The new APIs run alongside the existing walker and exporter.
Changes
Compatibility and limitations
The native path is opt-in. It does not provide universal typed-model recovery, general Boolean regeneration, complete view visibility or complete rendering reproduction. Unsupported cases retain explicit diagnostics.
Legacy GLB output uses meters and Y-up coordinates, including placement rotation. Unsupported shapes no longer receive placeholder geometry. The legacy walker excludes unbound name and plan-loop candidates.
gltf::Nodeadds optionalextras; downstream struct literals must supply the field or use..Default::default().Validation
tools/check-local.shpassed: formatting, Clippy with warnings denied, rustdoc with warnings denied, and workspace tests.cargo test --workspace --doc --all-featurespassed.