Skip to content

fix(saved-graphics): a light source's filter is left out of the body instead of keeping its fixture's box (#1247) (RE-300) - #1255

Merged
DrunkOnJava merged 9 commits into
mainfrom
research/1247-graphics-imposters
Nov 3, 2026
Merged

DrunkOnJava merged 9 commits into
mainfrom
research/1247-graphics-imposters

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Saved meshes leave a light fixture's light source out of its body, instead of keeping the fixture's box. The light source is saved as a GFilter of its own. It holds a GImposter (a transform and a rendering Asset of scalar properties, no surface) with the Geometry, curves and sometimes GPolyMesh that draw the light. Revit's export draws none of it. The traversal now leaves that filter out, as it leaves out a filter of curves (RE-300).

Motivation

#1247: a light fixture of 18,944 triangles in v0.6.1 is a 12-triangle box in v0.12.0. Reproduced on our files: Snowdon Towers electrical went from 1,420 saved meshes to 907, with 511 light fixtures kept as boxes by RE-224's partial gate. GImposter is the class behind 1,813 of the 3,020 partial meshes in the census (Measure 41540910235). The maintainer chose (2026-11-02) to keep boxes for meshes that do not decode whole and to close decoder gaps instead; this closes this gap without drawing anything partial.

Changes

  • src/research/native_graphics_traversal.rs: a GFilter holding a GImposter and otherwise only leaves (Geometry, GPolyMesh, curves) is a branch with no surface. All 281 observed filters are such. A filter with any other child, and a GImposter anywhere else, are walked as before (a decode failure, so the element keeps its box).
  • probes/examples/probe_re300_graphics_imposters.rs, reports/element-framing/RE-300-light-source-filters.md, the reconnaissance addendum, changelog.d/fixed/1247-light-source-filters.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 41550667212 (6689533 against main at a8ad9dd, which reads left-handed cylinders since fix(saved-graphics): mesh a cylinder whose saved basis is left-handed, its normal turned as on a plane (#1247) (RE-301) #1252, --saved-meshes):
    • Office as built: 10,881 → 10,924 bodies drawn from saved meshes (322 → 279 boxes). Scored against Revit's export 1,452 → 1,495; exact to 0.001 ft 1,360 → 1,403. Every new body is exact: 35 wall-mounted and 8 ceiling-mounted "LEX Exit Sign". At permit the same, +43.
    • RE1 Electrical: +2, both exact.
    • Snowdon Towers electrical: 907 → 1,324 (556 → 139 boxes). Architectural: 1,971 → 2,303. rme samples: +410 each.
    • Core Interior and RE1 Architecture, Mechanical and Plumbing are unchanged.
    • Schema check: only its count of swept solids changes (office 2,404 → 2,361). Snowdon electrical's --saved-meshes export passes 30 MB, so IfcOpenShell's full validation skips it, as for any export over that size.
    • Size: the office as built goes from 447,784 to 473,681 triangles, Snowdon electrical from 41,376 to 815,408.
    • Before fix(saved-graphics): mesh a cylinder whose saved basis is left-handed, its normal turned as on a plane (#1247) (RE-301) #1252, Measure 41547683034 measured the any-child version of the rule: +39 office bodies, all exact.
  • A first reading that only skipped the GImposter (Measure 41544207306) drew the light's shape with the fixture, at 12 times Revit's volume on the office's exit signs. It is withdrawn; RE-300 §2 records it.
  • Measure 41550677314 (6689533 against main at a8ad9dd, default flags, unfiltered, with the office, R2025, held-out models and samples): all 103 exports byte-identical and the scorer diff empty. No door or window's saved graphics on these files holds a light source, so the change shows only with --saved-meshes. 41549448369, at 6afb244, was cancelled when the rule was narrowed. The commit after 6689533 (1f9bb08) changes the report, changelog and addendum only.
  • Review (Sonnet 5.5 xhigh, automated Claude Code review): no blocking findings. Its notes are applied:
    • the rule fails closed, applying only to filters of leaves;
    • the figures are re-measured on main with RE-301;
    • the changelog says --saved-meshes;
    • the samples' new bodies are stated as consistent with light fixtures, not measured;
    • the report's counts and class list are corrected.
  • N/A: performance (the same pass, fewer branches).

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/
  • 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, measured counts against Revit's own export, reconnaissance addendum

Legal and contribution hygiene

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

Contributor declaration (CLEANROOM.md): based on the saved graphics' own records read from public files (the MIT RE1 models, the CC BY-SA BIM4LCA office, Autodesk's published sample projects) and Revit's IFC exports of them; no Autodesk SDK source, disassembly or NDA material.

Breaking changes

None.

…t keeps most partial saved meshes as boxes (#1247) (RE-300)
…longer keeps its element's box, and a polymesh's per-vertex normals are read (#1247) (RE-300)
…shape that draws it, is left out of the body instead of keeping its element's box (#1247) (RE-300)
@DrunkOnJava DrunkOnJava added area:geometry Work in the geometry area. area:ifc Work in the ifc area. type:bug Correctness defect or regression. labels Nov 2, 2026
@DrunkOnJava
DrunkOnJava merged commit ba18704 into main Nov 3, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the research/1247-graphics-imposters branch November 3, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:geometry Work in the geometry 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