Skip to content

feat(ifc): a shading device carries its type's name as Pset_ShadingDeviceCommon.Reference (#1016) - #1763

Merged
DrunkOnJava merged 5 commits into
mainfrom
feat/1016-shading-device-reference
Nov 11, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
feat/1016-shading-device-reference

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Pset_ShadingDeviceCommon joins CONFIRMED_REFERENCE_SETS in src/ifc/export_content.rs, so a shading device now carries its type's name as Pset_ShadingDeviceCommon.Reference, the set Revit's own IFC4 export writes it in. This is the smallest change that lets the next measurement score the value: the counts prove Revit writes 44 of them, and the equality of rvt-rs's value to Revit's is what that measurement decides.

IsExternal is deliberately not written; see "What was not checked".

Evidence

What the timber office's census says (evidence/nordic-office-timber-as-built/psets_vs_ifc.txt):

  • Pset_ShadingDeviceCommon.Reference: 44, equal 0, different 0, missing 44, and the value census reads ('IfcIdentifier', 'JSV-1') x44; on IfcShadingDevice x44. So Revit writes the property on every IfcShadingDevice it holds and on no other entity, and every value is the same string, JSV-1.
  • Pset_ShadingDeviceCommon.IsExternal: 45, ... missing 45, ('IfcBoolean', True) x45; on IfcShadingDevice x44, IfcShadingDeviceType x1.
  • Pset_ShadingDeviceCommon.Roughness: 1, ... missing 1 (one value, on the type).

The elements are the same elements. class_sets_vs_ifc.txt reads IfcShadingDevice 44 44 0 0: Revit's export holds 44 and rvt-rs writes 44, none extra, none missing. names_vs_ifc.txt reads 44 system family | IfcShadingDevice | Name equal | ObjectType equal.

How Reference is derived for a confirmed set. reference_set_kinds (export_content.rs:2499) takes every IFC4 standard set that applies_to the entity and predefined type, keeps the ones in CONFIRMED_REFERENCE_SETS, and reference_property_sets writes the element's type name into each as Reference. The type name is family_and_type's second field (export_content.rs:1040-1044), the same value every other confirmed set already carries. Pset_ShadingDeviceCommon applies to IFCSHADINGDEVICE with no predefined-type scope (standard_property_sets/table.rs:3681-3700), and declares Reference as Identifier, so the existing machinery writes it with no other change.

Why the value is likely Revit's, and why that is still a measurement. type_objects_vs_ifc.txt reads TypeName carried: 10518 of 10518; equal to Revit's type: 10518, and ObjectType (which step_writer.rs:3240-3248 writes as Family:Type) is equal to Revit's on all 44 shading devices. So the type name rvt-rs reads for these 44 is Revit's type name, and JSV-1 is a type name of this project (its wall sweeps are JSV-4, JSV-5, JSV-6 in mesh_bodies_vs_ifc.txt). What is not measured is that Revit's Reference is that type name on these elements: the timber office's IFC files are not in the evidence, so the 44 values' equality to rvt-rs's rule is unmeasured. The set is added on the strength of the counts, and the next measurement decides whether it stays.

What the rule leaves out. Nothing on the element side: Revit writes the property on all 44 IfcShadingDevice and on no other entity, and rvt-rs writes the same 44. rvt-rs still writes nothing where it reads no type name for the element, which is a missing value, not a wrong one. The set is written on no type object, as Revit writes no Reference on the IfcShadingDeviceType.

History. CONFIRMED_REFERENCE_SETS was introduced by #1120 (RE-239 §7) with the rule "a set joins the list when a reference export confirms it". Pset_ShadingDeviceCommon was removed on 2026-10-29 because no IFC4 export then held a shading device (RE-239 §7, and the note on the property_sets row of tests/fixtures/project-counts/2024-core-interior.json). The timber office's export now holds 44 of them, so the condition that removed it no longer holds.

Changes

  • src/ifc/export_content.rs: Pset_ShadingDeviceCommon added to CONFIRMED_REFERENCE_SETS, in alphabetical order.
  • src/ifc/export_content.rs: the list's doc comment records that the set joins on the timber office's export, which writes it on all 44 of its IfcShadingDevice and on no other element, and that the value's equality is what the next measurement scores.
  • changelog.d/added/shading-device-reference.md: the fragment for the new property.
  • tests/fixtures/project-counts/2024-core-interior.json and 2024-core-interior-slim.json: the property_sets row's decoder_expected moves 6578 -> 6598, with a note sentence. This is a test edit, and it is required: Core Interior holds 20 shading devices, the 2026-10-29 removal moved this same pin by exactly 20 (6528 -> 6508), and 20 is past the row's decoder_tolerance of 8. The 6598 is arithmetic from that recorded move, not a measurement; CI measures it. IFCPROPERTYSINGLEVALUE and IFCRELDEFINESBYPROPERTIES are not pinned in these fixtures, only named in the note, and the note says they move by 20 with it.

No docs sentence states this value: rg Pset_ShadingDeviceCommon docs/ README.md finds nothing, so no docs page is updated. reports/element-framing/RE-239-export-file-values.md §7 still lists the set as "in no reference export"; that is a dated finding of 2026-10-29 and is left as it stands, superseded by this pull request.

Measured

One Measure run scored this change together with the four others it was drafted beside (run 43058225020, head d17975d3, base aa5dc4c6): every model, with the BIM4LCA office and housing, the 23 Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs. All 39 shards and both same-project gates passed, and the check run same-project gates on d17975d3 reads pass. 20 of 126 exports change; each changed row carries the name of the value its change writes, so the rows below are this change's alone. A second run kept both sides' exports of the 25 sample saves of 2024 to 2027, which no Revit export scores, and they were compared entity by entity with the step ids taken out (run 43073245751). A third measured the four office files with --revit-set-placement, as W7 is measured (run 43073951032). After the second read's two fixes, the stack's final head with main merged (e41d96b5 against 39826420) was measured again in full (run 43077331708, rows registered on #1636 before it was read): every row below repeats, 24 of 126 exports move and no other, and both same-project gates pass on that head.

Model Pset_ShadingDeviceCommon.Reference equal, before after different
Timber office as built 0 of 44 44 of 44 0
Timber office at permit 0 of 44 44 of 44 0
  • "rvt-rs values Revit does not write" is unchanged on both (6, 50), with and without --revit-set-placement.
  • Core Interior's 20 shading devices gain the set too: IFCPROPERTYSET 6,578 to 6,598, IFCPROPERTYSINGLEVALUE 28,569 to 28,589, IFCRELDEFINESBYPROPERTIES 7,107 to 7,127. Revit's export of that model writes no standard property set at all, so the census counts these apart (4,680 to 4,700 values not scored) and no Revit value checks them.
  • The two project-count fixtures pin 6,598, and both artifacts' rvt-rs.json observations are refreshed from that run in a commit of their own; tools/ci/witness-verdict.py replays both to PASS with the committed verdicts unchanged.
  • No other model holds a shading device: no sample save, Revit 2025 model or held-out pair changes for this.

Still open

  • Pset_ShadingDeviceCommon.IsExternal (45 values on the timber office, 44 devices and their type) is not written: nothing read gives the value.
  • The rule is confirmed against Revit on one project in two states.

Stack: this is change 3 of 5 measured together; each branch holds the ones before it, so its own diff is its last commit until those land. First draft: #1727.

Testing

  • Built, linted and tested by CI on this head; nothing was built on a workstation.
  • Verified end to end on real Revit files against Revit's own exports: the Measure runs named above, which anyone can repeat with gh workflow run measure.yml --ref main -f ref=<this head> -f base=aa5dc4c6d93e861015c10e0a0d8f9f16c8b57e71 -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true.
  • No test was added: no unit test, and no pinned count moves except where the body says so.

Audit-honesty checklist

  • Docs state what this change writes and what it leaves out
  • A changelog fragment under changelog.d/
  • No emojis, private paths or personal data in committed files
  • Limits are in the body above and in the code's doc comments

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary source, decompiled internals or NDA material. Where revit-ifc (CLEANROOM.md source 5) is cited, it is read and cited by file and class, and no code is copied.
  • No fixture with real-world personal data

Breaking changes

None.

…ng devices' Pset_ShadingDeviceCommon (#1016)

Both artifacts' observations are the ones Measure run 43058225020 wrote for
this change (IFCPROPERTYSET 6578 to 6598, IFCPROPERTYSINGLEVALUE 28569 to
28589, IFCRELDEFINESBYPROPERTIES 7107 to 7127); tools/ci/witness-verdict.py
replays both to PASS with the committed verdicts unchanged.
@DrunkOnJava
DrunkOnJava merged commit 3db4afe into main Nov 11, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1016-shading-device-reference branch November 11, 2026 19:41
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