Skip to content

feat(elements): name families that nest others of their category (#324) (RE-42) - #330

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/nested-family-owner
Sep 23, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/nested-family-owner

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

RE-38 names an element Family:Type:ElementId when its type's partition record holds exactly one other named id of the type's category. When the type's family nests other families of that category, the record names those too, and RE-38 left the element unnamed (#324). The family is the one candidate whose own partition record names every other candidate, and partition_names::resolve_family now picks it. Every name this adds is Revit's own.

Motivation

Closes #324. RE1 Electrical's 12 lighting fixtures had no names. Revit names them 265100-LIGHT-CAN:6":<id> and so on.

Changes

  • src/partition_names.rs: resolve_family keeps RE-38's single-candidate rule. With several candidates, it returns the one whose own record names all the others, and only when exactly one does. Doc states the sibling-type limit. There is a unit test for the rule, and the RE-38 test now uses two families that do not name each other.
  • tests/element_names.rs: checks RE1 Electrical (12). RE1 Mechanical's pin moves from 36 to 42: 6 "300x150" fittings are now named, all equal to Revit's.
  • examples/probe_re42_nested_families.rs (new).
  • reports/element-framing/RE-42-nested-families.md, the support-matrix row, README, status, CHANGELOG, a reconnaissance addendum, and a cross-reference in RE-38.

Measurements

file names written equal to Revit's (or the VIM's) new
RE1 Electrical 12 12 12
RE1 Mechanical 42 42 6
RE1 Architecture, Plumbing, Core Interior unchanged unchanged 0
Snowdon Architectural (local) 3,902 3,831 (71 Revit omits) 117
Snowdon Structural (VIM, local) 1,184 1,132 of 1,156 in the VIM 50, all equal
  • The 24 structural differences are one type the VIM's later edition renamed (RE-38 §4).
  • Where a type with several candidates has an ElemTable owner among them, the owner is the family the rule picks in every case (24 types over five files). The owner is unset on most types, so it is not used.
  • Over the elements Revit's export also holds, 4,397 names now equal Revit's, with none that differ.

Testing

  • tools/check-local.sh
  • Every integration test with the family corpus and the magnetar + RE1 project corpus, including element_names on RE1 Electrical
  • cargo +1.85.0 check --profile ci --all-targets, cargo +nightly check --manifest-path fuzz/Cargo.toml
  • Snowdon Architectural and Structural names scored against Revit's IFC4 export and the VIM

Audit-honesty checklist

Legal and contribution hygiene

  • Apache-2.0
  • Clean-room: byte observations scored against Revit's own IFC exports and the VIM export. No SDK source or decompiled material. Snowdon and the VIM are measured locally and not committed.
  • No PII

Breaking changes

resolve_family now returns a family for some types that had several candidates and returned None before. IFC names change for those elements, from Class-ElementId to Revit's Family:Type:ElementId.

Related issues

Closes #324. Follows #329 (RE-41).


Note

Medium Risk
Changes IFC Name/ObjectType for elements that previously had no resolved family (breaking for consumers of those strings), though selection is fail-closed and corpus-gated against Revit exports.

Overview
RE-38 already produced Revit-matching Family:Type:ElementId IFC names when a type’s partition record listed a single same-category family id. Types whose family nests other families of that category list multiple candidates, so partition_names::resolve_family used to return None and those instances kept Class-ElementId names (#324).

The resolver now keeps the single-candidate path unchanged. With several candidates, it returns the unique id whose own partition record names every other candidate (the nested families). Ambiguous cases still return None.

Impact: newly named instances on corpus models—e.g. RE1 Electrical’s 12 lighting fixtures, six mechanical duct fittings, and many Snowdon elements—now match Revit’s IFC names; the documented cross-model count rises from 4,241 to 4,397 matching names. Integration coverage adds RE1 Electrical and bumps the mechanical name check to 42.

Also adds probe_re42_nested_families, the RE-42 report, and doc/support-matrix updates.

Reviewed by Cursor Bugbot for commit 1192545. Configure here.

@cursor

cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_4299837a-b6d8-41f2-b325-b9ef7549f758)

@DrunkOnJava
DrunkOnJava merged commit e01d7ae into main Sep 23, 2026
23 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/nested-family-owner branch September 23, 2026 06:58
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.

RE-38 names: tell a type's own family from families nested in it

1 participant