Skip to content

research(elements): a probe counts where a disagreeing export parameter's owner appears and what each rule for its current copy answers (#1713) - #2004

Merged
DrunkOnJava merged 3 commits into
mainfrom
research/1713-export-parameter-copies
Nov 14, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
research/1713-export-parameter-copies

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

The probe probe_1713_export_parameter_copies reads all four IFC export parameters of a declared element and, for each owner whose partitions disagree about one, routes it through native_document::current_partitions by the partitions its data object appears in, and prints that answer beside two simpler rules: the same call over only the partitions that hold the key, and the latest partition that holds it. It also counts the owners whose routed partition holds the element's data with no entry for the key (a parameter cleared there, since an empty value is no entry). It is the evidence behind #2002's choice of rule. Part of #1713.

On the six BIM4LCA files of Revit 2024 (Measure 43579785358, c4fa075c), 84 owners hold 93 owner-and-key pairs that disagree: 2 on the concrete housing as built (one wall type), 1 at permit, 19 on the office at permit and 71 on the timber office at permit (63 owners, 8 of which also disagree about "Export to IFC As"). All 93 are routed, the routed partition holds a value in every one, none is in doubt, none holds the element's data without an entry for the key, and the three rules answer the same on all 93 (the routed partition is not the latest holder on 2 pairs of the timber office, with the same value). The two as-built office files have no pair that disagrees.

Motivation

A review of #2002 asked whether the partitions to choose among should be those that hold the key or those that hold the element's data, as scan_type_layers does (RE-446). The two differ only where the current partition has the element's data and no entry for the key; this probe counts those and finds none on the files that disagree.

Changes

  • probes/examples/probe_1713_export_parameter_copies.rs: the four export parameters instead of the two predefined types, per-partition copies (a partition with two values is a copy in doubt), the partitions where each owner's data object appears, and the routing counts above. Unpublished probe crate, nothing else.

Testing

Registered before the run: on the files whose pairs disagree the routed partition holds the key in every pair and the three rules agree; a pair whose routed partition has the element's data and no entry would show as "no entry for the key". Measure 43579785358 on c4fa075c, models the six BIM4LCA files above, no scorer, no base:

  1. Holds. 93 pairs disagree on 84 owners; 93 of 93 routed, 93 of 93 hold a value in the routed partition, 0 in doubt, 0 with no entry for the key.
  2. Holds. The rule over the owner's partitions, the rule over the key's partitions and the latest partition give the same answer on 93 of 93.
  3. The commit after it (591b7485) changes two spellings clippy's -D warnings refused (explicit_auto_deref, unnecessary_get_then_check) and nothing else; the output does not change.
  • tools/check-local.sh: no local builds; rustfmt --check passes; CI runs the rest.

Audit-honesty checklist

  • The Summary states the counts the run showed.
  • No private paths or emojis.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk source; no fixtures.

Breaking changes

None.

Related issues

Part of #1713; supports #2002.

… declared element by stream and value, to see whether the walls and spaces the permit files leave unset hold disagreeing copies (#1713)
… parameter's owner appears and what each rule for its current copy answers (#1713)

For the four IFC export parameters of a declared element it counts the owners
with entries in one partition, in several that agree and in several that
disagree, and for the disagreeing pairs it routes each owner by the partitions
its data object appears in, and prints the pairs where the rule over only the
partitions that hold the key, or the latest partition, answers differently,
and the pairs whose routed partition holds the element's data with no entry for
the key.
…it_auto_deref, unnecessary_get_then_check), same output (#1713)
DrunkOnJava added a commit that referenced this pull request Nov 14, 2026
…artitions of a Revit 2024 or later file takes its current copy's value, as Revit's export writes it (#1713) (#2002)

## Summary

On Revit 2024 and later an element whose IFC export parameters ("IFC
Predefined Type", "Export to IFC As" and their type counterparts) differ
between the partitions of a file takes its current copy's value, found
among the partitions that hold its data with
`native_document::current_partitions` (RE-145, RE-216; RE-446 does the
same for a type's layers). The scan dropped such a key, and the BIM4LCA
permit files edit it in a later partition. An element with no current
copy, or whose current partition has no entry or two values for the key,
leaves it out. Part of #1713. Measure 43583771747 (`413f395c` against
`main`, unfiltered) moves eight BIM4LCA files, each change to what
Revit's export writes:

- `IfcWall` with no predefined type, 8, 19 and 13 on the housing, office
and timber office at permit, now reads Revit's (`PARTITIONING`,
`SOLIDWALL`, `SHEAR`; 345, 589 and 586 same); their wall types follow.
42 `IfcSpace` family instances of the timber office read `USERDEFINED`
(86 same, from 44).
- 8 roofs of the timber office whose latest "Export to IFC As" is
`IfcSlab` become `IfcSlab` `ROOF` (58 same, from 50; `IfcRoof` 9 to 1),
and 1 wall of the concrete housing as built an `IfcCovering` (88 same,
from 87).
- A roof that such a value writes as another entity than `IfcRoof` keeps
its saved mesh, as a roof written as `IfcRoof` does: the exporter marks
it `RedirectedRoof` and the saved-mesh pass reads the mark; without it
the 8 above would lose their meshes to their sketch outlines. The mark
is also on roofs that `main` already wrote as another entity, so 52
bodies in the eight files change from a sketch outline to the mesh Revit
drew: 48 `IfcSlab` roofs (6, 5, 4, 4 on the housing files, 10 and 10 on
the office, 8 on the timber office as built, 1 on its permit) and the
`IfcSolarDevice` roof of each housing file (4). 50 of the 52 match
Revit's in all six measures, 2 in five.

## Motivation

#1713 listed the 40 walls and 42 spaces as "not yet read". Probe
`probe_1713_export_parameter_copies`
([#2004](#2004), Measure
[43579785358](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43579785358)):
93 owner-and-key pairs of 84 elements disagree on six files, all routed,
the routed partition holds a value in each, none is the cleared case,
and the routed rule, the key's partitions and the latest partition
answer alike on all 93.

## Changes

- `src/research/partition_ifc_export_overrides.rs`:
`scan_export_parameters` resolves the pairs that disagree with one
`current_partitions` call over their owners' partitions.
- `src/ifc/export_content.rs`, `src/ifc/saved_meshes.rs`: the
`RedirectedRoof` mark and `is_replaceable_box` reading it.
- Docs: `export-diagnostics.md`, `compatibility.md`,
`support-matrix.json`, and a changelog fragment.

## Testing

Registered before the first run: walls and spaces read Revit's and
nothing else differs. The runs found more (the roofs, and the bodies
they move), each stated above. Measure
[43583771747](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43583771747):
`same-project gates` pass, `full / CI passed`, 118 of 126 exports and 94
of 102 `diagnostics.json` identical, the four terrain files measured and
identical.

1. **Holds.** "Differs" and "NOTDEFINED where Revit writes none" stay 0
in every class of every model. Timber office at permit: type objects
with Revit's entity 10443 to 10451 of 10452, GlobalIds 10063 to 10079;
property values equal 38150 to 38200, Revit's missing 1338 to 1288,
values Revit does not write 50 to 34; quantities equal 31548 to 31581.
Concrete housing as built: values equal 6570 to 6572, values Revit does
not write 32 to 26.
2. **Holds.** Saved-mesh bodies scored per file, before to after: 853 to
860, 851 to 857, 999 to 1004 (twice), 11447 to 11457, 11564 to 11574,
9483 to 9491, and 9481 to 9482 on the timber office at permit.
3. **Falls, from the new bodies' form.** Plan-outline `IfcSlab` vertices
within 0.01 ft go 40 to 39, 37 to 36, 36 to 35 and 36 to 35 on the four
housing files (outlines and areas within tolerance unchanged). The GLB
draws these roofs from their mesh and not in layers, as it does a roof
written as `IfcRoof`: layers within 0.001 ft 100 of 127 to 95 of 122
(office as built), 97 of 103 to 92 of 98 (permit), 101 of 102 to 98 of
99 (timber as built), 97 of 98 to 96 of 97 (timber permit); no layer
compared turns out wrong.

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

## Audit-honesty checklist

- [x] The Summary states each change the run showed, with its count.
- [x] A changelog fragment.
- [x] No private paths or emojis.

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk source; no fixtures.

## Breaking changes

None.

## Related issues

Part of #1713.
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