Repository navigation
ci: the box bodies scorer lists the boxes by class and reason, from each element's SavedMeshRefusal (#1645) - #1672
Merged
Merged
Conversation
…ach element's SavedMeshRefusal (#1645)
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
… says so too, so every box has a reason (#1645) (#1669) ## 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 #1645 before it ran, is Measure run 42936559329 (the box scorer of main, #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 (#1667, fixed by #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 - [x] Verified end to end on real Revit files: the runs above (BIM4LCA, Revit 2024, CC BY-SA 4.0; Autodesk's samples, counts only) - [x] 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) - [x] If this is a performance change: N/A ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR: `docs/export-diagnostics.md` and its schema name the new text - [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. `exported.saved_mesh_refusals` has more keys (`not_a_candidate: ...`); the schema allows them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/re/box_bodies_vs_ifc.pylists the record-box bodies of an export by class and by reason, from each element'sSavedMeshRefusal(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'sbox_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_tagsreturns the class and the reason of each box;mainprintsbox 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
mainatfa2864d4with this scorer (42929794159: the BIM4LCA office as built and housing concrete as built). The office as built prints153 of 168 have one, and its 15 without are 14IfcStairand 1IfcCurtainWall, the wholes the pass leaves to their parts (#1669 gives them a reason); the housing prints66 of 73, the 7 without being itsIfcStair. The largest groups it shows: 43WC-istuin:WC-1fornonrectangular parametric trim, 30Stay_Wall_Mounted_:VAR-1formultiple cylinder trim loops unsupported, 24 railings forshared curved edge is not an isoparametric interval, 10 showers forscaled 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
scrub-holdout-results.shkeeps only the lines it allowlists, so they do not leave the runner there.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.