Repository navigation
feat(ifc): name elements Family:Type:ElementId from partition name entries (RE-38) - #321
Merged
Merged
Conversation
…tries (RE-38) Revit 2024 and 2025 partitions carry a name entry for every loaded family and family type: u64 ElementId, u32 length, UTF-16 name, i64 BuiltInCategory. An element record's type is the one reference-list id of its own category that carries an entry, and the type's partition record (RE-35) names its family the same way. The IFC Name of such an element becomes Family:Type:ElementId and its ObjectType Family:Type, as in Revit's own export, and the element-record property set gains FamilyName and TypeName. All 4,241 names and object types written across Core Interior, Snowdon Towers, the RE1 models and teste_export_2025 are exactly Revit's. On Snowdon every name entry the VIM export also carries has the VIM's name and category (348 of 348). System families (walls, floors, roofs) keep Class-ElementId names: their types are not in these entries. rvt::partition_names and RevitFile::element_names expose the table; examples/probe_re38_names.rs reports it for any file and tests/element_names.rs checks every name against Revit's export on Core Interior and the RE1 models.
Bugbot couldn't run - usage limit reachedBugbot 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_32816fb8-87e6-47e2-a699-5587cf87b3cd) |
…mily and type properties The two new element-record properties (FamilyName, TypeName) on Core Interior's 394 family instances add 788 IfcPropertySingleValue rows, which moves the rvt-rs observation hash both OctetProof replays compare. Both verdicts stay PASS with all three witnesses; only the rvt-rs observation, its witness version and the verdict hash change.
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
Family instances now carry Revit's own names. Revit 2024/2025 partitions hold a name entry for every loaded family and family type:
u64 ElementId · u32 length · UTF-16 name · i64 BuiltInCategory. An element's type is the one reference of its own category that carries an entry, and the type's partition record (RE-35) names its family. The IFCNamebecomesFamily:Type:ElementIdand theObjectTypebecomesFamily:Type, exactly as in Revit's export.Motivation
Until now every element was named
Class-ElementId(Door-416336). A user opening an rvt-rs IFC or the viewer could not tell aSingle-Flush:36" x 84"door from a double slider. The table was found while looking for the "Empty" curtain-panel type behind #309.Changes
src/partition_names.rs(new):find_name_entriesanchors on the closing category, then checks a matching length and a declared id; it rejects control characters and unpaired surrogates, and drops an id whose entries disagree;compute_element_names,resolve_type,resolve_family.RevitFile::element_namesmemoises the table and each type's family candidates.src/partition_schema_mvp.rs: a post-pass gives walls, columns, doors, windows, slabs and productsm_type_id/m_type_name/m_family_namewhen both joins are unique.src/ifc/export_content.rs: theFamily:Type:ElementIdname, andFamilyName/TypeNamein the element-record property set.src/ifc/step_writer.rs:ObjectType=Family:Typefrom those two properties. No struct change, so the fuzz targets are untouched.tests/element_names.rs(new): every name in that form, and itsObjectType, equals Revit's for the sameTagon Core Interior (2024_Core_Interior_slim.ifc) and the RE1 models. Counts are pinned.examples/probe_re38_names.rs,reports/element-framing/RE-38-family-and-type-names.md, a support-matrix row, README, status, CHANGELOG.Measurements
NameandObjectTypeThe name table matches the VIM export of Snowdon on every shared id: 348 of 348 on the architectural sample and 57 of 57 on the structural one, name and category. On the structural sample, 1,075 of 1,099 element names equal the VIM's; the other 24 are one type that the VIM's later edition renamed.
Testing
tools/check-local.shcargo +1.85.0 check --profile ci --all-targets,cargo +nightly check --manifest-path fuzz/Cargo.tomlName/ObjectTypeof its 394 family instances and the two new propertiesAudit-honesty checklist
Class-ElementId: their type names live in parameter blocks, not in these entries.examples/Legal and contribution hygiene
255ribeirooracles are local only.Breaking changes
IFC element
Names change for family instances (Door-416336becomesSingle-Flush:36" x 84":416336), andObjectTypeis now set on them. Consumers matching the oldClass-ElementIdname should use theTag, which is unchanged.Related issues
Refs #309.
Note
Medium Risk
IFC
NameandObjectTypechange for many family instances (breaking for name-based consumers), though behavior is gated on unique type/family resolution and validated against Revit exports.Overview
Family instances now get Revit-style naming in IFC exports (RE-38). A new
partition_namesdecoder scans Revit 2024/2025 partition bytes for per–ElementId UTF-16 name entries, resolves each placed instance’s type from its reference list and family from the type’s partition record, and exposes the table via memoizedRevitFile::element_names.Decoded walls, doors, windows, columns, slabs, and products gain
m_family_name/m_type_name(and type id) when both joins are unique. IFC export then writesName=Family:Type:ElementId,ObjectType=Family:Type, and addsFamilyName/TypeNameon the element-record property set—matching Revit’s exporter on corpus-checked projects. System families still useClass-ElementId.Adds
tests/element_names.rs,examples/probe_re38_names.rs, and doc/support-matrix/CHANGELOG updates. Breaking for IFC consumers that keyed off the oldClass-ElementIdnames;Tagis unchanged.Reviewed by Cursor Bugbot for commit 311f1f9. Configure here.