Repository navigation
red run: element_materials (B09, do not merge) - #579
Closed
DrunkOnJava wants to merge 1 commit into
Closed
DrunkOnJava wants to merge 1 commit into
DrunkOnJava wants to merge 1 commit into
Conversation
A real-file target: exporting 2024_Core_Interior.rvt, every one of its
256 columns has the material set Revit's own export relates to it
('Default Wall' on the 149 walls join, <Unnamed> on the 107 no wall
joins). Expected red on main: rvt-rs gives the columns no material.
Owner
Author
|
Red run captured; the test lands in the B09 PR. |
DrunkOnJava
added a commit
that referenced
this pull request
Oct 3, 2026
…ake <Unnamed>, and joined columns their walls' material (#355) (#580) Part of #355 (B09). puzzbobb's material rule starts from the map RE-82 reads, which is `FamilySymbol.m_geomTag2MaterialId`. Where every value in that map is unset, rvt-rs read no map and gave the instances no material. **What Revit's export gives these elements:** - Core Interior's 256 columns: `<Unnamed>` on 107, "Default Wall" on 149. The column-cuts module already found exactly those 149 joined to walls, and those walls' material is "Default Wall" (356 of 360 walls). - The RE1 MEP models: `<Unnamed>` on 150 of the 152 fittings, terminals, proxies and control elements it relates a material to. **What changes:** - `partition_type_materials::unset_material_types`: a family type whose first map holds only unset values, with distinct keys no larger than 0xffff (the geometry tags, RE-149 probe `examples/probe_re149_type_value_blocks.rs`). A map with a material in it answers no, so partial maps (RE-124) are untouched. Their columns and products take `UNNAMED_MATERIAL`. - `element_record_column_cuts::column_joined_walls`: each column's overlapping named walls, carried as `m_column_joined_wall`. A column that would take `<Unnamed>` takes its joined walls' layer material instead, when every joined wall names the same set. - Doors, windows, walls and slabs are unchanged, so RE-84's opening-only doors and windows are untouched. The 2023 path is unchanged. - The element-material scorer now also counts, by Revit entity, the elements rvt-rs gives no materials. **Commits:** 1. `test(ifc)` adds the real-file target `tests/element_materials.rs`: all 256 Core Interior columns have Revit's material set. Its red run on `main` (draft #579) is in the commit message: 0 of 256, all 256 with none. 2. The scorer change. 3. The probe. 4. The feature. 5. The changelog. ## Measured Measure run 37120595647 compared head against `main`. The element-material scorer (elements with Revit's exact material set): | model | before | after | still without materials | |---|---|---|---| | Core Interior | 580 | 836 | 12 slabs (Revit: `<Unnamed>`) | | RE1 Electrical | 0 | 47 of 47 | 2 proxies | | RE1 Mechanical | 0 | 43 of 43 | none | | RE1 Plumbing | 0 | 60 of 60 | none | - No element gained a wrong set. - The GLB now draws the 149 joined columns in Revit's material name and colour. - RE1 Architecture and Einhoven are byte-identical to `main`. **Pinned values, approved by the maintainer.** Core Interior's material count goes from 86 to 87, the `<Unnamed>` material. The project-count manifests change to 87. The committed rvt-rs witness observations are regenerated from that Measure run; their hash is the one the IfcOpenShell job's replay computes. These are in their own commit. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes partition binary heuristics and IFC material assignment for columns and family products; wrong unset-map detection could mislabel materials, though behavior is gated and checked against Revit’s Core Interior export. > > **Overview** > **Family-instance materials now match Revit when a type has no real geometry-material map (RE-149 / #355).** Types whose value block opens with a geometry-tag map where every entry is unset (and no named map was read) are detected via `partition_type_materials::unset_material_types`; their **columns** and **products** get `m_type_material` = `<Unnamed>`. Doors, windows, walls, and slabs are not touched. > > **Joined columns** that would stay `<Unnamed>` can inherit wall materials: `column_joined_walls` finds overlapping walls from each column’s references, exposes them as `m_column_joined_wall` on decode, and `attach_joined_wall_materials` replaces `<Unnamed>` only when every joined wall’s layer names agree. > > Adds the RE-149 probe example `probe_re149_type_value_blocks`, a real-file IFC test `tests/element_materials` (256 Core Interior columns vs Revit’s export), CI registration, changelog, and a small bump to the Python material-vs-IFC scorer (tracks elements rvt-rs still gives no materials). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 09a8de7. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scratch PR for a red run of tests/element_materials.rs on main. Closed and its branch deleted once CI reports.
Note
Low Risk
Test and CI target registration only; no production exporter or reader logic changes in this diff.
Overview
Adds a real-file integration test (
tests/element_materials.rs) that encodes issue #355: for all 256IFCCOLUMNinstances in2024_Core_Interior.rvt, rvt-rs IFC export must associate the same material name set as Revit’s reference export (2024_Core_Interior_slim.ifc), resolved viaIfcRelAssociatesMaterialand nested IFC4 material definitions.The test exports with
RvtDocExporter, parses STEP text (entity index, material graph walk, tag mapping), and asserts full parity; it skips whenRVT_PROJECT_CORPUS_DIRor the reference IFC is missing.Registers
element_materialsunder therealclass intools/ci/test-targets.txtso CI runs it with the corpus (aligned with the scratch “red run” intent on main).Reviewed by Cursor Bugbot for commit 34c726f. Configure here.