Repository navigation
feat(ifc): an export without geometry keeps its elements' types and names (B74) - #694
Merged
Merged
Conversation
…geometry (B74) typed-no-geometry reads the record property set, which carries an element's family and type names, only with its geometry (src/ifc/export_content.rs:431), so an export in that mode gives no element an ObjectType and writes no type object. The test exports each model in both modes and compares, by GlobalId, every element the default export types. Red on draft #692, Corpus health run 37243903781: test an_export_without_geometry_types_elements_as_one_with_geometry ... FAILED ---- an_export_without_geometry_types_elements_as_one_with_geometry stdout ---- RE1-Architecture.rvt: 84 typed elements in both exports, 84 typed otherwise without geometry RE1-Mechanical.rvt: 74 typed elements in both exports, 74 typed otherwise without geometry RE1-Plumbing.rvt: 124 typed elements in both exports, 124 typed otherwise without geometry RE1-Electrical.rvt: 49 typed elements in both exports, 49 typed otherwise without geometry 2024_Core_Interior.rvt: 970 typed elements in both exports, 970 typed otherwise without geometry thread 'an_export_without_geometry_types_elements_as_one_with_geometry' panicked at tests/typed_no_geometry_types.rs:199:5: RE1-Architecture.rvt: 84 of 84 typed elements are typed otherwise without geometry; first: ["'0IfpzfCl55MO$REVQpYbBa': with geometry Typing { object_type: \"'Basic Wall:-'\", of_type: Some((\"IFCWALLTYPE\", \"'1blUrKsM1Cpuym6eEmfp1_'\", \"'Basic Wall:-'\")) }, without Typing { object_type: \"$\", of_type: None }", ...] RE1-Mechanical.rvt: 74 of 74 typed elements are typed otherwise without geometry; ... RE1-Plumbing.rvt: 124 of 124 typed elements are typed otherwise without geometry; ... RE1-Electrical.rvt: 49 of 49 typed elements are typed otherwise without geometry; ... 2024_Core_Interior.rvt: 970 of 970 typed elements are typed otherwise without geometry; ... test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 14.29s
…ames (B74) typed-no-geometry read an element record's property set only with its geometry, and that set carries what the element is: its family and type names (the ObjectType and the type object), a room's number and name, the Level its record names, its Revit class and its type's text parameters. In that mode no element was typed. The record is now read in every mode; an export without geometry keeps only those identity properties and drops the body, placement, host and the geometry's provenance as before. A door's or window's type GlobalId hashes its flip against its host wall (B72), which was computed from the written placements after the geometry strip, so it could not survive this mode. The flip is now computed in content assembly from the plan frames the records give, in every mode, with the same rule.
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.
B74, found by Bugbot on #666.
typed-no-geometryread an element record's property set only with its geometry (src/ifc/export_content.rs:431on main), and that set is where an element's identity lives: its family and type names (theObjectTypeand the type object), a room's number and name, the Level its record names, its Revit class and its type's text parameters. In that mode no element was typed. The record is now read in every mode. An export without geometry keeps only those identity properties (IDENTITY_PROPERTIESplus the type's text parameters) and drops the body, placement, host and the geometry's provenance (BodySource, box sizes, profile counts and so on), as before.A door's or window's type GlobalId hashes its flip against its host wall (B72). The flip was computed from the written placements after the geometry strip, so it could not survive this mode. It is now computed in content assembly, in every mode, from the plan frames the records give, with the same rule. That includes a curtain wall host whose body is held until its parts are known.
Red on draft #692 (Corpus health run 37243903781). Every element the default export types was typed otherwise without geometry: RE1 Architecture 84 of 84, Mechanical 74 of 74, Plumbing 124 of 124, Electrical 49 of 49, Core Interior 970 of 970. The output is in the test commit. A Measure run against
mainchecks that the default export is byte-identical.Note
Medium Risk
Changes export content policy and GlobalId/type hashing for all quality modes; default geometry export is intended to stay byte-identical, but door flip and identity-property paths are sensitive.
Overview
Fixes
typed-no-geometryso elements keep the sameObjectType, type entity, and type GlobalId as the default export (B74).Partition element records are now read in every export quality mode, not only when geometry is included. In modes without geometry, bodies, placements, and host links are still dropped, but the element-record property set is trimmed to identity fields (
FamilyName,TypeName, room/level metadata,RevitClass, type text parameters, etc.) instead of being skipped entirely.Door/window flip (B72), which hashes into the type GlobalId, is computed during content assembly from plan frames and facing data, stored as
element_flips(booleans) rather than exportedelement_facings. Flip logic moves frommod.rsintoexport_content.rs, including hosts whose body is held until aggregate parts resolve.Adds corpus integration test
typed_no_geometry_types(Scaffold vsTypedNoGeometrytyping parity) and wires it into CI.Reviewed by Cursor Bugbot for commit 0f98e99. Configure here.