Skip to content

fix(elements): a door or window whose type's native map holds entries is not written as its opening alone (#1247) (RE-299) - #1249

Merged
DrunkOnJava merged 8 commits into
mainfrom
research/1247-unset-map-doors
Nov 3, 2026
Merged

DrunkOnJava merged 8 commits into
mainfrom
research/1247-unset-map-doors

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

A door or window is no longer written as its opening alone (IfcOpeningElement) when its type draws geometry in no material of its own. RE-84 decides "this type only cuts its host" from a byte scan of the type's value block, and that scan misses a geometry-material map whose values are all unset or name a material whose name it did not read. The type's native m_geomTag2MaterialId now decides where it holds entries (RE-299).

Motivation

#1247: on a Revit 2024 project, rvt-ifc --large-model writes 73 AR_DOR_ doors as IfcOpeningElement, the other 361 as IfcDoor. The RE-84 path is unchanged since v0.6.1 (the reporter's v0.6.1 could not read that file), so this is a standing misread rather than a regression.

Changes

  • src/research/native_type_materials.rs: geometry_maps, which geometry_materials now wraps, also returns the types whose native map holds any entry. Same single native pass.
  • src/research/partition_schema_mvp/materials.rs: refine_type_materials drops an empty scanned list for such a type, so it reads as "materials not read" rather than "draws no geometry". Its doors and windows then also get the sizing and naming other doors and windows get, which the flag gated (RE-215 cut-loop sizes, opening-index sizes, RE-154's type name). No type material is written for it: what Revit gives such a door is not measured. One case keeps the flag: a map whose every value is −1, of a family whose own document shows none of that geometry (RE-204: every such form hidden or void, or none). No measured file has one.
  • probes/examples/probe_re299_unset_map_doors.rs, tools/re/void_only_vs_ifc.py (counts the probe's further columns).
  • reports/element-framing/RE-299-native-map-void-only-doors.md, an update line in RE-84, the reconnaissance addendum, changelog.d/fixed/1247-native-map-void-only-doors.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.
  • Verified end to end on real Revit files. Measure 41538550670 (the probe on every reference model, the BIM4LCA office, the R2025 models and Autodesk's 36 samples): every door and window Revit exports as its opening alone (RE1 Architecture's CasedOpening; Snowdon Towers' 9 Door-Opening and 38 Schematic Opening Cut) has an empty native map and no saved graphics. The byte scan's all-unset signal also fires on CasedOpening and Door-Opening, so the native map is the discriminator. No other door or window in those files has a type the scan reads as mapless.
  • Measure 41548319465 (this change at 705c4aa, merged with main after fix(saved-graphics): mesh a cylinder whose saved basis is left-handed, its normal turned as on a plane (#1247) (RE-301) #1252, against main at ca389bb, unfiltered, with the office, R2025, held-out models and samples): all 103 exports byte-identical (ifc.sha256), including the 58 sample projects and 13 held-out models, and the scorer diff is empty. Earlier gates were cancelled when the head changed: 41541177152 (first version) and 41545726999 (f832c25, before the merge).
  • Review (Sonnet 5.5 xhigh, automated Claude Code review): no blocking findings. Its notes are applied: the sizing and naming effect stated, the all −1 hidden-or-void case guarded, the refine_type_materials docs, the report's reproduce line.
  • The positive case is v0.12.0 vs v0.6.1: some meshes export as bounding boxes; some doors as IfcOpeningElement #1247's private project: the reporter was asked (with the maintainer's approval) to run candidate/1247 at 429781b, which carries this change, and report counts.
  • N/A: performance (the same native pass).

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • A user-visible change has its entry as a fragment under changelog.d/
  • Resolved limitations: RE-84 carries the update
  • 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: probe, report, reconnaissance addendum

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content
  • No fixtures

Contributor declaration (CLEANROOM.md): this finding rests on byte and record observations of public files and on Revit's own IFC exports of them; no Autodesk SDK source, disassembly or NDA material was used.

Breaking changes

None. geometry_maps is new under rvt::research (unstable).

@DrunkOnJava DrunkOnJava added area:elements Work in the elements area. area:ifc Work in the ifc area. type:bug Correctness defect or regression. labels Nov 2, 2026
…one of that geometry keeps drawing nothing (#1247) (RE-299)
…ap-doors-merge

# Conflicts:
#	docs/rvt-moat-break-reconnaissance.md
@DrunkOnJava
DrunkOnJava merged commit 82397ac into main Nov 3, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/1247-unset-map-doors branch November 3, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:elements Work in the elements area. area:ifc Work in the ifc area. type:bug Correctness defect or regression.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant