Skip to content

feat(ifc): curtain wall mullions and panels take the material their type holds (B66) - #657

Merged
DrunkOnJava merged 4 commits into
mainfrom
feat/b66-curtain-materials
Oct 4, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
feat/b66-curtain-materials

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

RE-166: a mullion type's data object holds its material at +135 (every SysMullionFamSym object of the 2024 to 2026 samples and RE1), RE1's panel type at +139. Red on draft #655 (12 of 12 curtain parts without Revit's material); output in the test commit.


Note

Medium Risk
Changes IFC material output for curtain parts via version-specific binary offsets in partition data; behavior is gated to 2024–2026 and skips elements that already have a type material.

Overview
Curtain wall mullions and panels now get TypeMaterial on IFC export when they did not already have one, using the material stored on their mullion/panel type—matching Revit’s material associations (RE-166 / B66).

A new partition_curtain_materials pass scans partition streams for SysMullionFamSym and SysPanelFamSym type objects on Revit 2024–2026, reads the material ElementId at fixed byte offsets (+135 mullions, +139 panels), and only accepts IDs that appear in the file’s material set. attach_curtain_materials in the schema MVP pipeline maps each CurtainWallMullion / CurtainWallPanel instance via TypeId to that type material’s name and adds the same TypeMaterial field other products use.

A corpus integration test (curtain_part_materials) exports RE1 Architecture and asserts every IfcMember / IfcPlate tag has the same material name set as Revit’s reference IFC; CI runs it as a real target.

Reviewed by Cursor Bugbot for commit 69a3822. Configure here.

Revit's export of RE1 Architecture associates "Aluminum 2" with its 10
curtain wall mullions (IfcMember) and "Glass" with its 2 panels (IfcPlate).
tests/curtain_part_materials.rs requires rvt-rs to give each of them
exactly Revit's set of material names.

Red on main (draft #655, run 37215541120, "Corpus health (tier 2)"):

  RE1 Architecture: 12 curtain parts with a material in Revit's export, 12 not Revit's in rvt-rs's
  panicked at tests/curtain_part_materials.rs:168:5:
  12 of 12 curtain parts do not have Revit's material set; first: ["445962: Revit {"Glass"}, rvt-rs None", "445963: Revit {"Aluminum 2"}, rvt-rs None", "445964: Revit {"Aluminum 2"}, rvt-rs None", "445966: Revit {"Glass"}, rvt-rs None", "445967: Revit {"Aluminum 2"}, rvt-rs None"]
…ype holds (B66)

RE-166 (Measure runs 37213600033 and 37214135095): a mullion type's data
object (SysMullionFamSym) holds its material's ElementId as the u64 at +135,
on all 353, 66 and 1 such objects of Autodesk's 2024 to 2026 samples and the
10 of RE1 Architecture ("Aluminum 2"); 2027 moved it. RE1's panel type
(SysPanelFamSym 12611) holds a tag at +135 and its material, 26 "Glass", at
+139. partition_curtain_materials reads both for 2024 to 2026, keeping only
values that are one of the file's materials, and the schema pass gives each
mullion and panel without a type material its type's material by name, which
the exporter associates as it does every type material.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Wrong class-word search needle
    • Replaced the incorrect 0xffff0000|tag memmem needle with tag.to_le_bytes(), matching partition_mep_systems and the actual RE-153 class ordinal layout.

Create PR

Or push these changes by commenting:

@cursor push e2f9c596c4
Preview (e2f9c596c4)
diff --git a/src/partition_curtain_materials.rs b/src/partition_curtain_materials.rs
--- a/src/partition_curtain_materials.rs
+++ b/src/partition_curtain_materials.rs
@@ -52,8 +52,7 @@
         let buf = inflated.bytes();
         for &(tag, at) in &tags {
             // The class word ends a data object's 20-byte header.
-            let word = (0xffff_0000u32 | tag).to_le_bytes();
-            for hit in memchr::memmem::find_iter(buf, &word) {
+            for hit in memchr::memmem::find_iter(buf, &tag.to_le_bytes()) {
                 let Some(start) = hit.checked_sub(16) else {
                     continue;
                 };

You can send follow-ups to the cloud agent here.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 69a3822. Configure here.

Comment thread src/partition_curtain_materials.rs Resolved
@DrunkOnJava
DrunkOnJava merged commit 0f65e85 into main Oct 4, 2026
23 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/b66-curtain-materials branch October 4, 2026 16:50
DrunkOnJava added a commit that referenced this pull request Oct 4, 2026
…64 and B70 in progress, B60 found (#660)

Third session 3 progress update: five items landed, B64 (#659) and B70
in progress, new B70 and B71 rows (MEP sample performance), B68 blocked
on B70, and RE-167's finding for B60.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation-only backlog and session notes; no runtime, CI config,
or exporter behavior changes in this diff.
> 
> **Overview**
> Updates **BACKLOG.md** for maintainer session 3: the ranked table and
progress log reflect landed work and new perf backlog, without any code
changes.
> 
> **Status moves in the ranked table:** **B44**, **B63**, **B66**,
**B53**, and **B69** are marked **done** (with PR refs #651, #645/#656,
#657, #653). **B60** and **B64** move from **committed** to **in
progress** (RE-167 type GlobalId rule; #659 curtain-wall door
aggregation). **B68** is **blocked** on **B70** (MEP sample export
timeout). Two new rows: **B70** (`rvt-ifc` ~33.5 min on MEP samples;
`attach_mep_systems` / `attach_pipe_type_names` scans) and **B71**
(double file walk for export vs diagnostics).
> 
> **Progress log additions** document how each item closed or advanced:
B63’s plan-box overlap rule for medicine cabinet 375441; B53/B69 writer
fixes (refuse checksummed pages, full gzip members); B44’s three-reader
NominalDiameter path; B66 curtain material offsets; B64 curtain-grid
door parts; B70’s one-pass-per-stream improvement (30 s walk,
byte-identical RE1 MEP IFC); B60’s original-symbol GlobalId finding; and
a note that unresolved Bugbot threads block merges until resolved.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
a2c5a15. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Oct 23, 2026
…om their pull requests' measurements (#895)

## Summary

Four findings shipped and are cited in the code (RE-149 in
`partition_type_materials`, RE-165 in `partition_fitting_sizes`, RE-166
in `partition_curtain_materials`, RE-167 in `partition_schema_mvp`) but
never got their report under `reports/element-framing/`, so a reader
following a citation found nothing. This adds the four reports, written
from the pull requests that shipped each finding.

## Motivation

The 2026-10-23 style audit found these four as the only RE ids cited in
rustdoc with no report (145 of 149 resolve). The docs pass that follows
adds a CI check that every cited RE id has a report; this lets it pass
without exemptions.

## Changes

- `RE-149-unset-material-maps.md` (from #580),
`RE-165-fitting-nominal-diameter.md` (#651),
`RE-166-curtain-type-materials.md` (#657), `RE-167-type-global-ids.md`
(#663, #666). Each says it was written after the fact, cites the
Measure, red and green runs and the real-file targets those PRs
recorded, and gives the files by their `research/witness-registry.json`
ids and hashes.

## Testing

Docs only. Every number in the reports is copied from the PR it cites;
nothing was re-measured, and each report says so.

## Audit-honesty checklist

- [x] No new claim: each report restates its PR's recorded evidence
- [x] No emojis, private paths or internal jargon beyond the backlog ids
the PRs used

## Legal and contribution hygiene

- [x] Apache-2.0; clean-room sources only (byte observations,
`RevitAPI.dll` names, revit-ifc as CLEANROOM.md allows)

## Breaking changes

None.

## Screenshots or output samples

N/A.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant