Skip to content

probe(probes): classify the 18 curtain mullions the office's export gives no Length, before a rule is written (#1046) - #1760

Draft
DrunkOnJava wants to merge 4 commits into
mainfrom
pilot/32-member-length
Draft

DrunkOnJava wants to merge 4 commits into
mainfrom
pilot/32-member-length

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

The task asks for Qto_MemberBaseQuantities.Length on the 18 curtain mullions of the BIM4LCA office as built that rvt-rs leaves out. I could not establish a rule that is never wrong from the evidence available, because the two IFC files do not say why the code that writes the value drops those 18, and the answer decides whether a rule is possible at all. This pull request therefore adds one probe and changes no export.

The 18 are real and not decided anywhere: they are the same 18 the timber office shows (RE-226, RE-418 report 18 there too), no report or issue leaves them out by decision, and the maintainer's closed negative findings (RE-19, RE-20, RE-399) do not touch this value.

Evidence

Where the 18 are. qtos_vs_ifc.txt of the office as built: Qto_MemberBaseQuantities.Length: 10003, equal 9984, different 1, missing 18, and Pset_MemberCommon.Span: 10003, equal 9984, different 1, missing 18. Both are written by one function, export_content::add_mullion_span, which pushes Span and the Length of the mullion's Qto_MemberBaseQuantities together and returns before both where the record box gives no positive extent along the mullion's own axis. So the 18 missing Length are the 18 missing Span.

In rvt-rs.ifc both files hold 10,673 IFCMEMBER; Revit writes a Qto_MemberBaseQuantities on 10,003 of them and rvt-rs on 10,003. Of rvt-rs's 10,003 sets, 20 hold a single quantity: 18 hold a NetVolume alone (12 at 0.000250 m³, 6 at 0.001750 m³) and 2 hold a Length alone (0.075634 m, tags 3029301 and the twin of 3028720's neighbour, both Rectangular Mullion:50 x 50 mm alumiini maalattu). 9,985 sets hold a Length = 10,003 − 18, so the 18 NetVolume-only sets are exactly the 18 missing Length; the NetVolume-only shape comes from saved_meshes::add_mesh_volumes, whose absent-set branch writes a set of just NetVolume for a member whose mesh closes but for which add_mullion_span wrote nothing.

What Revit writes on them, from psets_vs_ifc.txt line 147: Pset_MemberCommon.Span missing values are 6 × 0.7 m and 12 × 0.100847579 m (three float32 spellings of the same value), and those 12 correspond to the 12 sets with a mesh volume of 0.000250 m³ and the 6 to the sets with 0.001750 m³ (0.00175 / 0.7 = 0.0025 m², a 50 mm square; 0.00025 / 0.100848 = 0.00248 m²).

I traced tag 3024562 (one of the 0.7 m six) in both files: Revit writes Qto_MemberBaseQuantities with Length 700 mm, CrossSectionArea 0.0725 m², NetSurfaceArea 0.145 m², NetVolume 0.00175 m³, Span 700 mm, and draws the body as an IfcMappedItem; rvt-rs writes the same mullion as a prism 0.7 m long along its own axis, with NetVolume alone. Tag 3028722 (one of the 12) is, in rvt-rs's export, a body 0.05 m high whose plan section is a ~0.05 × 0.10 m trapezoid, and Revit's Length for it is 0.100848 m. So on both shapes Revit's Length is the extent of its own body along the mullion's axis, as RE-418 established for all 10,031 mullions at permit.

Why the code drops them, and why I cannot yet tell. add_mullion_span gives no span where any of these is true: a box field (m_bboxWidth, m_bboxDepth, m_bboxHeight) is missing; the mullion is on the model's axes and the box's extent along the model axis its transform Z lies on (m_curtain_mullion_along) is not positive; the transform gave no axis; or the mullion is turned and oriented_box leaves its axes undetermined. The three cases are indistinguishable from the two IFC files, and the difference matters:

  • the axis the saved-mesh pass measures a mullion along comes from RevitFile::mullion_axes, which attach_mullion_plain_hosts fills from mullion_box, which needs the record box — so a mullion with no record box has no axis either, and the extent of its body cannot be taken along anything;
  • a mullion whose box is only flat along its axis does have an axis, and saved_meshes::follow_mesh_over_box's extent along it (RE-418) could be written;
  • a mullion with a turned body that oriented_box refuses is not covered by either.

The body's own extents are also not safe to use blindly: the 12 are exactly the shape RE-226 names, mullions shorter than their own section, where the longest extent of the body is its section and not its length.

add_mullion_span writes Length on 9,985 of the 10,003 sets and no other code writes, drops or moves it (rg "\"Span\"" finds only add_mullion_span and follow_mesh_span, which rewrites the Span of a mullion whose Length moved), so the 18 are lost inside that one function, not later.

What is checked and what is left out. Reading the code I also confirmed nothing decides these 18 away: docs/counted-apart.md has no row for them, docs/release-1.0-criteria.md records the one different mullion only, and issue #1046 lists the mullion gaps as NetSurfaceArea, mullion NetVolume on curved walls and walls, not this.

Changes

  • probes/examples/probe_1046_mullion_length_gaps.rs (new): for every curtain mullion the export gives no Length but does give a base quantity set, prints the tag, whether Span was written, the record box's three sides, the axis it runs along, whether its three axes are recorded, the extent of the body the export wrote in the element's frame, and one reason — no_record_box, axes_recorded, box_flat_on_its_axis, no_axis or box_has_its_extent — with a tally by reason over every curtain mullion on stderr, and the members the export holds no base quantity set for counted apart (Revit writes none on 670 of the office's 10,673 IFCMEMBERs either).

Run it on the office as built and join the printed tags with Revit's export:

cargo run --profile ci -p rvt-probes --example probe_1046_mullion_length_gaps -- BIM4LCA-office-as-built.rvt

No changelog fragment: nothing a user of the export sees changes, and no doc states a value that moves.

What was not checked

  • I did not compile or run the probe, and I could not run Measure: the probe's field names, the presence of CURTAIN_AXES_FIELDS/CURTAIN_MULLION_ALONG_FIELD and the rvt::ifc::entities::{PropertySet, SolidShape} paths are read from the source and from probes/examples/probe_re226_mullion_hosts.rs, not from a build. CI's clippy job compiles the probes and will confirm.
  • Which of the reasons the 18 fall under is unknown until the probe runs; the rule, what it leaves out and whether the 12 short mullions can be written at all are the next step, and the values the rule would give must be measured against Revit's Length on every mullion it covers and on the timber office, the housing and the office at permit, where the same 18 appear.
  • I did not verify that the 18 in psets_vs_ifc's grouped value list are the same 18 elements as the 18 NetVolume-only sets; I inferred it from the count, the sections and the volumes, and the probe's per-tag output with Revit's export will confirm it.
  • Nothing was read of Autodesk's SDK; the exporter was not consulted for this and no IFC4 clause decides a Revit-quantity rule here.

Pilot draft: written by an automated worker and pushed as proposed, with rustfmt applied. Not yet read by a maintainer session; please do not review, approve or arm it.

@DrunkOnJava

DrunkOnJava commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner Author

The probe's reading, on today's main (Measure 43543438362, the BIM4LCA concrete and timber offices as built):

  • The premise moved. The 18 mullions hold no base quantity set at all now, not a set with only NetVolume, so the probe classifies them too (set=false, a49be53).
  • All 18 are axes_recorded, on both offices, the same ElementIds: turned or tilted mullions whose own axes the record holds, which the export means to measure along the oriented box. It writes neither Length nor Span for them.
  • Two groups:
    • 6 (3024562 to 3024564, 3027069 to 3027071): a box of 0.232 × 0.232 × 2.297 ft, a 50 mm square turned 45° about the vertical, standing 0.700 m. Revit's Length for 3024562 is 700 mm (this PR's first description), the box's height.
    • 12 (3024608 to 3024610, 3028417 to 3028419, 3028722 to 3028724, 3028884 to 3028886): a box of about 0.35 × 0.35 × 0.164 ft, where Revit's Length is 0.100848 m.
  • Why nothing is written, as far as the counts say: the 45° turn gives a box with two equal plan sides, which oriented_box cannot assign to the mullion's axes. The 12 short ones are RE-226's shape, shorter than their own section.

Next: for the 6, a rule that takes the length along the mullion's recorded own axis where that axis is vertical. For the 12, the recorded axes themselves have to be printed against Revit's 0.100848 m before any rule is written. This PR stays a probe.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

A correction to my reading above. This branch predates #1782 (d1a5c0e, on main since 2026-11-11), so the probe ran without it. On main the 6 tall mullions, turned 45° about the vertical, already get their Length and Span from RE-226's rule. Run 43545512638 prints their recorded own Z as (0, 0, −1), on the model's Z, and the box height 2.296588 ft is Revit's 700 mm.

That leaves the 12 short ones. Their recorded axes (own X vertical, own Z horizontal at about 47°) put the absolute axes' determinant at 0.082, under ORIENTED_BOX_MIN_DET (0.1). Their box solved anyway gives 0.3306 ft against Revit's 0.3309 ft, so #1972 lowers the cutoff to 0.05, with its Measure running. This probe PR can merge as the instrument that found it, once main is merged in.

DrunkOnJava added a commit that referenced this pull request Nov 14, 2026
…long its own axes down to an axes determinant of 0.05 (#1193) (#1972)

## Summary

`ORIENTED_BOX_MIN_DET` goes from 0.1 to 0.05. On the BIM4LCA office that
gives 6 short curtain mullions of each concrete file and 8 of each
timber file, which had no `Length` on #1193's mullion-Span row, their
`Span` and `Qto_MemberBaseQuantities.Length` from the box along their
own axes. Revit's `Length` for them is 0.100848 m (0.3309 ft). The other
6 on each concrete file and 4 on each timber file stay on #1193.

## Motivation

#1760's probe printed the recorded own axes of the concrete office's 18
mullions without a set (Measure 43545512638). Six are turned 45° about
the vertical and get their `Length` from RE-226's rule since #1782. The
other 12 have their own X vertical and their own Z horizontal, turned
some 45° off the model's axes, so neither model-axis rule applies, and
`oriented_box` refused all 12 at the 0.1 cutoff. Their |det| (of the
absolute axes) are 0.015, 0.028, 0.039, 0.053, 0.082 and 0.096, two
mullions each. The cutoff at 0.05 solves the 6 at 0.053 to 0.096.
3024608 (0.082) gives 0.3306 ft by hand from its record (0.354516 ×
0.344793 × 0.164042 ft), 0.0003 ft from Revit's. The 6 at 0.015 to 0.039
solve to the same half-extents (0.082, 0.082, 0.165 ft) but are left:
nothing here checks a solve that close to singular. No second condition
separates them, since all 12 give positive half-extents. The timber
files have no probe output; their 8 and 4 are Measure's counts.

## Changes

- `src/ifc/export_content.rs`: `ORIENTED_BOX_MIN_DET` 0.05, with the
determinants in its doc.
- A changelog fragment.

## Testing

Measure
[43546686921](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43546686921),
unfiltered against `main` with nordic, r2025, samples and holdout.
Registered before it runs:

1. On the four office files, `Qto_MemberBaseQuantities.Length` and
`Pset_MemberCommon.Span` equal rise by up to 12 each, and "different"
does not rise.
2. A mullion or panel whose determinant falls between 0.05 and 0.1 is
now drawn as its oriented box rather than its record box.
`mesh_bodies_vs_ifc` and `oriented_boxes_vs_ifc` must not get worse on
any model, and any `NetVolume` or `NetSurfaceArea` that newly appears
must read equal.
3. Held-out counts: no "different" rises.

If anything reads different, the cutoff goes back to 0.1 and the 12 stay
on #1193.

## Result

Measure 43546686921 on head 12a3a5d against main 0ce6c5d: 116 of 120
exports equal, and the 4 that move are the four office files. Only
`qtos_vs_ifc` and `psets_vs_ifc` change. Diagnostics differ by
`parameter_value_count` alone (+6, +8).

| File | `Length` missing | `NetSurfaceArea` missing | different |
|---|---|---|---|
| concrete office, as built and permit | 12 → 6 | 120 → 111 | 1 → 1 |
| timber office, as built and permit | 12 → 4 | 127 → 121 | 1 → 1 |

Row 1 holds (up to 12, different does not rise); rows 2 and 3 hold (no
other scorer file changes; held-out unchanged). The later commits change
only the doc comment and the fragment.

- [ ] `tools/check-local.sh`: no local builds; `rustfmt --check` passes;
CI runs the rest.

## Audit-honesty checklist

- [x] The number in the doc is the one measured by hand; the run
decides.
- [x] A changelog fragment.

Part of #1193.

This branch has not been deployed

No deployments
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