Skip to content

fix(ifc): a curtain panel of Revit 2015 to 2023 takes its Curtain Panels category's material where Revit's export does (#1593) (RE-377) - #1602

Merged
DrunkOnJava merged 8 commits into
mainfrom
research/1593-panel-material
Nov 9, 2026
Merged

DrunkOnJava merged 8 commits into
mainfrom
research/1593-panel-material

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

A curtain panel of Revit 2015 to 2023 takes the material of the Curtain Panels category's Object Styles where the category holds one, and its type's m_renderStyleId otherwise. Revit's export gives the 67 plates of a Revit 2018 project that category material, and the panel type's render-style material is another material on all 67. RE-367 had left these panels without a material.

Closes #1593.

Motivation

#1593 asked where Revit's export takes those plates' material from. The probe (probe_re377_panel_material_sources, with tools/re/panel_material_sources_vs_ifc.py) lists every field of a panel's record, its type's and the records its list names that holds a material's ElementId, and counts which classes of record name Revit's material anywhere in the file. On Vitoria's ALD26 Before (spent; counts and class names here):

  • the 67 plates' own records hold no material id; their type's record holds one, its m_renderStyleId, which is not Revit's on any of the 67 (0 of 67); its geometry-material map is empty; no source the probe lists equals Revit's;
  • Revit's plate material is named by two records in the whole file, both GStyleElem with m_categoryId −2000170, the Curtain Panels category, one a projection style and one a cut style, through their GStyle's m_materialElemId. They hold the same material.

Across every model with plates (RE-377 section 3): the category's styles hold a material on the two Vitoria files only, and there Revit's plate material is the category's on 67 of 67 plates on each; on rac_advanced (1,349 plates, the three.js IFC2X3 export), the BIM4LCA office (260 and 269), RE1 Architecture (2) and a Revit 2022 office (1) the category holds none and Revit gives the type's.

Changes

  • src/research/partition_curtain_materials.rs: category_material reads the material the Object Styles give a built-in category from its GStyleElem records (every style the same one of the file's named materials, otherwise none).
  • src/research/partition_schema_mvp/materials.rs: a panel of Revit 2015 to 2023 takes the Curtain Panels category's material where it has one and its type's otherwise; a mullion and every panel of 2024 and later are as before.
  • probes/examples/probe_re377_panel_material_sources.rs, tools/re/panel_material_sources_vs_ifc.py: the probe and its scorer (counts, class and field names and a digest only).
  • tools/ci/scrub-holdout-results.sh: keeps the scorer's count lines, and element_materials_vs_ifc.py's totals, for held-out models, racadv-* and BIMcollab, so the rule is scored on rac_advanced's 1,349 plates and not on one file's 67 (research(curtain): a panel of Revit 2015 to 2023 has no material; read the one Revit gives (follow-up of #1520, RE-367) #1593 item 2). Fixed words, schema names and numbers; a name or an ElementId matches no pattern.
  • reports/element-framing/RE-377-curtain-panel-category-material.md, an addendum to docs/format-reconnaissance.md, docs/status.md, and two changelog fragments.

Testing

Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.

  • full / CI passed on the final head
  • Verified end to end on real Revit files: unfiltered Measure 42610822894 (the rule at 5fd97f7a against main at b969296e, -f samples=true -f nordic=true -f r2025=true -f racadv=true -f bimcollab=true -f holdout=true, every scorer, 118 models a side; the later commits change the scrub's digest pattern and RE-377's text only), scored with tools/re/element_materials_vs_ifc.py against Revit's own exports:
    • ALD26 Before: Revit's material on 67 of 67 plates (0 before); ALD26 Project (held out, counts) 67 of 67; hemanth1986's 2022 office (held out) 1 of 1; rac_advanced 2015 to 2020 against the three.js IFC2X3 export (counts) 1,349 of 1,349 on each save. 1,484 plates in all, none different; the elements with Revit's set rise by exactly the plates on each.
    • 31 of the 118 exports move, all Revit 2015 to 2023 saves with curtain panels: the three Vitoria and 2022 files, racadv-2015 to racadv-2020, and 22 of Autodesk's sample saves (rac_advanced and rac_basic of 2015 to 2023, rme_advanced and rme_basic of 2015 and 2019), by the panels' materials alone. No file of 2024 or later moves.
    • diagnostics.json is identical on all 118 models. No scorer output but element_materials_vs_ifc and the held-out counts moves, apart from one: glb_material_colours_vs_ifc counts 67 more ('revit', 'no colour') on ALD26 Before, the plates, which the GLB now draws in a model material where it drew a category colour, and for which the scorer finds no colour on Revit's side of an IFC2X3 export.
    • same-project gates pass on the head: 15 samples held to their earlier saves, and the Areas on 4 saves and on the 2021 save.
  • If this touches the IFC exporter: the witness verdicts replay or the changed observations are refreshed in this PR. The Core Interior witness is a Revit 2024 file and does not move.

Audit-honesty checklist

  • README / docs reflect the current state after this PR: docs/status.md, the reconnaissance addendum.
  • A user-visible change has its entry as a fragment under changelog.d/; the one that said a panel takes no material is amended.
  • If a limitation was resolved, the docs are updated: RE-367's panel paragraphs now point to RE-377.
  • If a new limitation was introduced, it is documented in the PR body and in-code: which of the category's and the type's Revit's exporter prefers on 2024 and later is not measured, since no model of those releases has a category that holds a material (RE-377 section 6, research(curtain): a panel of Revit 2015 to 2023 has no material; read the one Revit gives (follow-up of #1520, RE-367) #1593).
  • Commit messages describe what changed and why
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files
  • Reverse-engineering finding: the probe and a dated addendum to docs/format-reconnaissance.md are included.

Legal and contribution hygiene

  • Apache-2.0. No Autodesk proprietary source, internals or NDA material; every fact comes from byte observations of the files named and Revit's own IFC exports of them.
  • No new test fixtures; held-out models appear as counts only.

Breaking changes

None to an interface. The panels of a Revit 2015 to 2023 save have a material where they had none.

Related issues

Closes #1593.

…terial Revit's export gives a curtain panel (#1593) (RE-377)

RE-367 reads a panel's material as its type's m_renderStyleId and finds it is
not Revit's on any of the 67 plates of a Revit 2018 project. The probe lists,
for every curtain panel of a Revit 2015 to 2023 save, each field of its own
record, its type's record and the records its reference list names that holds
a material's ElementId; the scorer counts, source by source, the plates whose
Revit material it gives, in counts and a digest only.
…and lists where a body holds a material's id (#1593)

The probe asked for the default native releases, 2023 to 2027, so a 2018 file
would have been refused; it names NATIVE_RELEASES now. It also keeps each
record's body and lists the offsets at which a little-endian u32 is a
material's ElementId, with the bytes around it, so that a material held in a
field the graph does not decode is still found. The scorer groups those hits by
a digest of the six bytes before them.
…d name each material anywhere in the file (#1593)

The first run found no record of a panel, its type or the records its list
names that holds the material Revit's export gives the 67 plates of a Revit 2018
project, the type's m_renderStyleId being another. A second pass over every
record counts, per material, the classes of record whose body holds its
ElementId, and the scorer prints that for Revit's plate materials, counts and
class names only.
…lds and the graphics styles that hold a material (#1593)

The second run found Revit's plate material named in the file by two GStyleElem
records and by no other class of record. The probe now prints those styles'
decoded root and where they hold the material, and the root of each panel
type, so that a category's Object Styles material can be told from a type's.
…yles, and the scorer counts the Curtain Panels category's material (#1593)

The third run found Revit's plate material on the 67 plates of a Revit 2018
project in the two graphics styles of the Curtain Panels category (the cut and
the projection style), the panel type's render style being another material and
its geometry map empty. The probe's whole-file pass now runs on every release and
prints every object of a graphics style that holds a material; the scorer counts,
for all of Revit's plates, how many have a material a Curtain Panels category
style holds. The scrub keeps these count lines, and the element material totals,
for the models whose results leave the runner as counts.
…els category's material where Revit's export does (#1593) (RE-377)

Revit's export gives the 67 plates of a Revit 2018 project the material of the
Curtain Panels category's two graphics styles (their GStyle's m_materialElemId),
where the panel type's m_renderStyleId is another material on all 67; on every
other model with plates the category holds none and Revit gives the type's. The
panels of Revit 2015 to 2023, which RE-367 left without a material, take the
category's where it holds one and the type's otherwise. 2024 and later are
unchanged: no model of those releases has a category that holds a material.
… eight hex digits or a dash (#1593)

The digest slot took any hex digits and dashes, which also accepts a decimal
ElementId. The scorer prints only an eight-digit hex digest or a dash, so
nothing leaked, but the filter is the last line of defence and now says so.
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 9, 2026 12:01
@DrunkOnJava
DrunkOnJava merged commit c4d708b into main Nov 9, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/1593-panel-material branch November 9, 2026 12:13
DrunkOnJava added a commit that referenced this pull request Nov 9, 2026
…does, and the criteria page names #1594, so the audit passes (#1605)

## Summary

`tools/maintainer/audit.py` failed two checks on `main`: the live
`main-protection` ruleset differs from
`.github/rulesets/main-protection.json`, and the 1.0.0 milestone holds
an issue no requirement cites. This repairs both. It changes no export,
no code and no workflow.

## Motivation

- The live ruleset has had `strict_required_status_checks_policy` off
since the maintainer's decision of 2026-11-08 (`docs/maintaining.md`, "A
branch need not be up to date with `main`"), but the file in the
repository still said `true`. Re-applying the ruleset from the file, as
`docs/maintaining.md` describes, would have turned the up-to-date rule
back on.
- #1594 (a plate type's `Tag`) is a value Revit's export writes that
rvt-rs writes differently, so it belongs to W7. #1593, the other uncited
one, closed with #1602.

## Changes

- `.github/rulesets/main-protection.json`:
`strict_required_status_checks_policy` is `false`, as the live ruleset
has it, and the `pull_request` rule carries the two parameters the live
one has and the file lacked, `required_reviewers: []` and
`require_extra_approval_for_unattributed_changes: true` (found by the
second read). The file is now the whole ruleset: re-applying it with the
`PUT` in `docs/maintaining.md` would have reset both to the API's
defaults.
- `docs/release-1.0-criteria.md`: W7's open list names the plate types'
`Tag` and #1594.

## Testing

Unit tests are banned here and none were added.

- [x] End to end: `python3 tools/maintainer/audit.py` from this branch
reads 13 of 13 checks ok. On `main` it read 9 of 13: the ruleset file,
the issue labels (#1563, #1565 and #1576, fixed in the issue tracker),
the Actions cache (10.0 of 10 GB, cleaned with
`tools/maintainer/clean_caches.py --delete`, 744 caches to 404, 6.4 GB)
and the milestone citation.
- N/A: `tools/check-local.sh`, no code changed. N/A: no IFC exporter
change, no performance change.

## Audit-honesty checklist

- [x] The docs state what the live ruleset does.
- N/A: no user-visible change, so no changelog fragment.

## Legal and contribution hygiene

- [x] Licensable under Apache-2.0; no Autodesk material; no fixtures.

## Breaking changes

None.
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.

research(curtain): a panel of Revit 2015 to 2023 has no material; read the one Revit gives (follow-up of #1520, RE-367)

1 participant