Skip to content

feat(ifc): a box body the saved-mesh pass did not take as a candidate says so too, so every box has a reason (#1645) - #1669

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/saved-mesh-not-candidates
Nov 11, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/saved-mesh-not-candidates

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

An element drawn as a record box, a beam's box or a turned box that the saved-mesh pass did not take as a candidate now has a SavedMeshRefusal of its own: not_a_candidate: and one of whole_drawn_by_its_parts, no_location, no_element_id or class_not_in_scope. exported.saved_mesh_refusals then counts every such box, not only the candidates whose saved graphics were read. The candidate set is the same, and no body is drawn differently.

Motivation

Refs #1645. After #1647, 153 of the BIM4LCA office's 168 box bodies carried a refusal; the other 15 (14 IfcStair and 1 IfcCurtainWall, wholes that their parts draw) said nothing, and the scorer of #1672 lists them as boxes with no reason.

Changes

  • src/ifc/saved_meshes.rs: the candidate loop reads each element's type GUID and location, works out why an element is not a candidate (whole_drawn_by_its_parts, no_location, no_element_id, class_not_in_scope), and records that as its refusal; the refusals are applied on the early return too. The candidates are the same elements as before.
  • src/ifc/export_content.rs: SAVED_MESH_NOT_CANDIDATE_PREFIX.
  • src/ifc/mod.rs, docs/export-diagnostics.md, docs/schemas/export-diagnostics.schema.json: the new refusal text is documented.
  • changelog.d/changed/1645-saved-mesh-not-candidate.md.

Testing

No unit tests added. Measured end to end on Measure's models: the unfiltered run 42929175797 (every scorer, 100 models with results on each side, this head against main at 6e58c27). The rows were registered on #1645 before it (comment of 2026-11-11T00:09:50Z) and are judged as registered:

  1. Holds. On the BIM4LCA office as built exported.saved_mesh_refusals sums to 168, its bounding_box_bodies (153 on main), and the 15 are not_a_candidate: whole_drawn_by_its_parts, which accounts for the whole difference.
  2. Holds on the diagnostics, and a sum is not the whole proof. Every model of Revit 2023 to 2027 sums to at least its box count; the BIM4LCA, Revit 2025 and RE1 models sum to it exactly except the two terrain housing files (12 reasons against 11 boxes: the count of box bodies leaves out the turned boxes and a roof's level block, which the pass also reads). On the Autodesk samples a sum cannot decide (Snowdon architectural 518 against 394 boxes), so the per-element read, registered on Box bodies: the diagnostics and Measure say why each element stayed a box, by class and reason #1645 before it ran, is Measure run 42936559329 (the box scorer of main, ci: the box bodies scorer lists the boxes by class and reason, from each element's SavedMeshRefusal (#1645) #1672, on the head): each model's line must read "N of N have one" with no (none) row. Result: it holds on every model with a Revit export I named (each reads "N of N have one", no (none) row: housing concrete as built 73 of 73, its terrain file 11 of 11, the four office files, Revit 2025 stairs 13 and 17, RE1 architecture and electrical), and it missed as registered on the three Autodesk samples, which have no Revit export here for the scorer to pair with, so for them only the sums above are read and nothing shows each box has its reason. The scorer's 73 against the diagnostics' 74 on the concrete as built is the boxes whose Tag Revit's export also holds.
  3. Holds. The 29 exports that moved are exactly the 29 models whose counters gained whole_drawn_by_its_parts (the 10 BIM4LCA files, the 5 Revit 2025 stair models and 14 of Autodesk's samples); no body, quantity or property scorer line changed in any model. The only scorer files that differ are two validation texts of nordic-office-timber-permit (ports_vs_ifc.txt 10 lines, schema.txt 20), which are identical once instance numbers are normalised: the added properties shift the numbers inside its 24 existing IfcRoot.UR1 findings (IFC export: the office at permit (timber) writes one mullion type as 6 type objects with one GlobalId (24 IfcRoot.UR1 findings) #1667, fixed by fix(ifc): every type object has a GlobalId of its own, so one type read for several symbols no longer repeats the writer's fallback (#1667) #1668).

What the data do not exercise: only whole_drawn_by_its_parts occurs (15 on each office file, 7 on each large housing file, 1 on each terrain file, 1 on each Revit 2025 stair model, 1 to 26 on the Autodesk samples). no_location, no_element_id and class_not_in_scope occur in none of the 100 models, so those three branches are covered by reading the loop, not by a measurement.

  • tools/check-local.sh passes: not run locally (no local builds here); CI runs it
  • Verified end to end on real Revit files: the runs above (BIM4LCA, Revit 2024, CC BY-SA 4.0; Autodesk's samples, counts only)
  • If this touches the IFC exporter: the witness verdicts replay or the changed observations are refreshed: CI's replay decides; the Core Interior export does not move (it has no box with a new reason)
  • If this is a performance change: N/A

Audit-honesty checklist

  • README / docs reflect the current state after this PR: docs/export-diagnostics.md and its schema name the new text
  • A user-visible change has its changelog fragment under changelog.d/changed/
  • No emojis, private paths or personal addresses in committed files

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0
  • No Autodesk proprietary source, decompiled internals or NDA'd SDK content
  • No new test fixtures

Breaking changes

None. exported.saved_mesh_refusals has more keys (not_a_candidate: ...); the schema allows them.

DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
…ach element's SavedMeshRefusal (#1645) (#1672)

## Summary

`tools/re/box_bodies_vs_ifc.py` lists the record-box bodies of an export
by class and by reason, from each element's `SavedMeshRefusal` (the
property #1647 writes), after its fill table. #1645 asks for "why each
element stayed a box, by class and reason" in the diagnostics and in
Measure: the diagnostics count the reasons
(`exported.saved_mesh_refusals`), and this puts them by class in every
Measure model's `box_bodies_vs_ifc.txt`.

## Motivation

#1645. Until now the by-class-and-reason census needed a research probe
per model (`probe_1645_box_reasons_by_class`). With the property on the
elements, the scorer that already lists the boxes by class reads it from
the export it scores, so every run of Measure carries the census and a
change that draws more bodies shows which reasons it removes.

## Changes

- `tools/re/box_bodies_vs_ifc.py`: `refusal(element)` reads the
property; `boxed_tags` returns the class and the reason of each box;
`main` prints `box bodies by class and reason (SavedMeshRefusal, #1645):
N of M have one`, then each class with its reasons, most numerous first,
`(none)` for a box with no reason.

## Testing

Scorer only: no source, export or other scorer output changes. Run on
`main` at `fa2864d4` with this scorer
([42929794159](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42929794159):
the BIM4LCA office as built and housing concrete as built). The office
as built prints `153 of 168 have one`, and its 15 without are 14
`IfcStair` and 1 `IfcCurtainWall`, the wholes the pass leaves to their
parts (#1669 gives them a reason); the housing prints `66 of 73`, the 7
without being its `IfcStair`. The largest groups it shows: 43
`WC-istuin:WC-1` for `nonrectangular parametric trim`, 30
`Stay_Wall_Mounted_:VAR-1` for `multiple cylinder trim loops
unsupported`, 24 railings for `shared curved edge is not an
isoparametric interval`, 10 showers for `scaled instance mode is not
qualified` (#1670). The new functions were also run on a synthetic IFC
of four elements with and without the property before the push.

## Not measured

- The lines are not in the held-out models' output:
`scrub-holdout-results.sh` keeps only the lines it allowlists, so they
do not leave the runner there.

## Audit-honesty checklist

- [x] Docs state only what ships (the scorer's own docstring says what
it prints)
- [x] No emojis, no private paths

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk source

## Breaking changes

None.
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 11, 2026 01:37
@DrunkOnJava
DrunkOnJava merged commit 6bb0244 into main Nov 11, 2026
65 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/saved-mesh-not-candidates branch November 11, 2026 01:53
DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
…o every box has a reason on every release (#1645) (#1682)

## Summary

A box body that no saved-mesh pass was offered now says why. An element
drawn as a record box, a beam's box or a turned box in a Revit 2008 to
2022 file (whose saved graphics are not read), in an export whose caller
turned the pass off, in a file whose release could not be read, or after
a pass that stopped on an error gets `not_offered: ` and the reason
(`release_outside_2023_to_2027`, `saved_meshes_off`, `release_not_read`,
`pass_failed`) as its `SavedMeshRefusal`, so that
`exported.saved_mesh_refusals` counts every box on every release. The
pass itself selects what it selected before, and the files of Revit 2023
to 2027 do not change.

## Motivation

Closes #1645, whose last unmet clause this is: "the boxes that were
never offered a mesh (a release outside 2023 to 2027)". #1647 gave a
reason to each candidate the pass read and #1669 to each box it did not
take as a candidate; `docs/export-diagnostics.md` said a box of an older
release "has none". The reason is trivial there (the release), and it is
what lets one table say why every box is one.

## Changes

- `src/ifc/saved_meshes.rs`: `is_replaceable_box`, the candidate test
the pass applied inline, now a function; `note_not_offered`, which marks
each such box.
- `src/ifc/export_pipeline.rs`: where no pass was offered (and the
export is not a placeholder) or the pass failed, the boxes are marked
and the diagnostics recounted.
- `src/ifc/export_content.rs`: `SAVED_MESH_NOT_OFFERED_PREFIX` and the
property's documentation.
- `docs/export-diagnostics.md`,
`docs/schemas/export-diagnostics.schema.json`,
`changelog.d/changed/1645-saved-mesh-not-offered.md`.

## Testing

No unit tests added. Measured end to end on Measure's models: the
unfiltered run of this head (every flag, run 42944398428) against `main`
at 134db97, judged against the rows registered on #1645 before it ran.
The full result is on #1645 (comment 6785511772).

- Revit 2015 to 2022: 45 of 45 exports moved. The 31 that report
diagnostics carry 68,579 box bodies and gain 68,579 `not_offered:
release_outside_2023_to_2027` reasons, equal on every model. The other
14 are licence-less files whose results leave the runner as counts only,
so their box counts are not measured.
- Revit 2023 to 2027: 0 of 81 exports moved, and none of the 70 with
diagnostics gains a `not_offered` reason.
- One scorer line moves that the registered rows missed: the by-reason
table of `tools/re/box_bodies_vs_ifc.py` on the Vitoria project
(`(none)` becomes `not_offered: release_outside_2023_to_2027`, same
counts).

- [x] `tools/check-local.sh` passes: not run locally (no local builds
here); CI's full run is green on this head (`rustfmt --check` on the
three Rust files passes)
- [x] Verified end to end on real Revit files: Measure run 42944398428,
above
- [x] If this touches the IFC exporter: the witness verdicts replay or
the changed observations are refreshed: Core Interior is Revit 2024 and
did not move (0 of 81 exports of 2023 to 2027 moved)
- [x] If this is a performance change: N/A

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR: the
diagnostics reference and its schema name the new reasons
- [x] A user-visible change has its changelog fragment under
`changelog.d/changed/`
- [x] No emojis, private paths or personal addresses in committed files

## Legal and contribution hygiene

- [x] I agree this work is licensable under Apache-2.0
- [x] No Autodesk proprietary source, decompiled internals or NDA'd SDK
content
- [x] No new test fixtures

## Breaking changes

None. Exports of Revit 2008 to 2022 files gain one property in
`RvtElementRecordGeometry` on each box body, and
`exported.saved_mesh_refusals` gains a key.
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