Repository navigation
fix(ifc): a mass whose Export to IFC As names an entity is written as it, as Revit's export writes the office's VOLUME masses (#864) - #867
Conversation
… it, as Revit's export writes the office's VOLUME masses (#864) OST_Mass joins the product record categories. Revit's exporter writes a mass only where its own Export to IFC As names an entity: the BIM4LCA office's two VOLUME masses carry IfcSpace and are IfcSpace in Revit's export (#864). A mass with no such value is not written.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b983b3860c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if decoded.class == "Mass" && ifc_export_override(&decoded).is_none() { | ||
| continue; |
There was a problem hiding this comment.
Exclude skipped masses from unapplied-value diagnostics
When a mass carries an unrecognized Export to IFC As value, this branch emits no entity, but unapplied_export_value still treats it as retaining the Mass mapping. The resulting user-facing warning says the mass “keeps its category's entity” even though it was omitted entirely. This affects any mass whose nonempty override is not in EXPORT_OVERRIDE_TARGETS; either suppress it from that diagnostic or report it as skipped rather than exported as a proxy.
Useful? React with 👍 / 👎.
| (OST_ELECTRICAL_FIXTURES, "ElectricalFixture"), | ||
| (OST_ELECTRICAL_EQUIPMENT, "ElectricalEquipment"), | ||
| (OST_MECHANICAL_EQUIPMENT, "MechanicalEquipment"), | ||
| (OST_MASS, "Mass"), |
There was a problem hiding this comment.
Avoid treating every unattributed mass as missing output
When a supported-version file contains a second-prologue mass frame with no attributable ElementId and no IFC override, adding Mass to RECOVERED_CATEGORIES makes scan_unattributed_frames count it as an unexported model element. build_export_diagnostics then warns that the model is incomplete, lowers confidence, and can reject strict exports, even though this change intentionally omits default masses and Revit does not export them. The diagnostic scan needs to distinguish export-enabled masses before including them in the missing-element count.
Useful? React with 👍 / 👎.
Summary
Closes #864. rvt-rs read no mass instances, because
OST_Masswas not one of the element-record categories. The BIM4LCA office's twoVOLUMEmasses carry "Export to IFC As"IfcSpace, and Revit's export writes them asIfcSpace.OST_MassjoinsPRODUCT_RECORD_CATEGORIESandRECOVERED_CATEGORIES.IfcSpacetarget, the two masses becomeIfcSpacewith their own predefined types (NOTDEFINED,PARKING) andIfcSpaceTypes.Measured
Measure A/B against main with the office files and the sample projects, run 39372962012. On each office file:
tagged_spaces_vs_ifc: on 44 of 44 family spaces, Name, LongName, ObjectType, PredefinedType, type object,Pset_SpaceCommon.ReferenceandIsExternalequal Revit's (42 before). The two masses have no storey, so they are aggregated under the building rather than placed in nothing, as IFC4 WR41 requires (see fix(ifc): a family instance whose Export to IFC As is IfcSpace is an IfcSpace typed by an IfcSpaceType of its type (#763) #863).class_sets_vs_ifc:IfcSpacepairs 308 of 308.global_ids_vs_ifc: all 308 spaces equal one of Revit's.Only the two office exports change. The samples' diagnostics count the decoded masses: the 2019 basic sample has one, and it is not written.