Repository navigation
fix(ifc): a ceiling of separate loops is one IfcCovering whose body holds every piece, as Revit's export writes it (#823) - #861
Merged
Conversation
…olds every piece, as Revit's export writes it (#823) Pieces of an element of separate loops were each written as an element of their own (#331), as Revit's export writes floors. For ceilings Revit writes one IfcCovering with a body item per piece (BIM4LCA office, Measure run 39240535083). The exporter now names a ceiling's pieces in IfcModel::body_pieces, and the STEP writer writes their extrusions as further items of the ceiling's Body representation and skips them as elements, so no relation refers to them. They stay in the model's entities, so the glTF export and the viewer still draw them.
DrunkOnJava
added a commit
that referenced
this pull request
Oct 20, 2026
…lan union of its upward faces, so a sloped top counts whole (#824) (#866) Part of #824. `tools/re/plan_profiles_vs_ifc.py` kept only the upward faces at a body's highest level. Revit writes a layered floor as one solid per layer, so that filter stopped each layer from being counted. On a tilted floor, though, the faces at the highest level are one triangle of the top's two. So the BIM4LCA office's 8 sloped floors read as exactly twice Revit's area, and looked like triangles (#824, the comment of 2026-10-20). The scorer now takes the plan union of every upward face. That still counts a stacked layer's outline once, and it keeps a sloped top whole. Points and the outline come from all upward faces. ## Measured Measure run [39370597357](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39370597357) scored the same exports as main's latest run. Main's own exports did not change between the two (#861 and #863 touched no slab). | model | area off (before → after) | outline off | vertices off | |---|---|---|---| | office, as built | 31 → 23 | 31 → 23 | 35 → 29 | | office, permit | 32 → 24 | 33 → 25 | 37 → 31 | | Core Interior | unchanged (80 of 80) | unchanged | unchanged | | RE1 Architecture | unchanged | unchanged | unchanged | The 8 slabs that move are the sloped floors. Their outline was always Revit's: the gap is their slope, which rvt-rs does not read and this scorer does not compare. Tooling only; no export changes.
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
Closes #823. rvt-rs wrote each piece of an element whose sketch has separate loops as an element of its own, named
<name>:2,<name>:3and so on (#331). That is how Revit's export writes floors (Snowdon Towers). For ceilings, Revit's export writes oneIfcCoveringwhose body holds every piece. On the BIM4LCA office that is 19 as-built and 20 permit ceilings of 2 to 8 pieces, with the union of rvt-rs's pieces equal to Revit's top surface (Measure run 39240535083).export_content::PIECES_IN_BODY_CLASSES(Ceiling): where such an element's body is an extrusion, the exporter names its pieces in a newIfcModel::body_pieces(element index → piece indices).IfcExtrudedAreaSoliditems of the element'sBodyrepresentation, in the element's frame, and skips them as elements. Every relation the writer emits looks entity indices up throughentity_index_to_el_idand leaves out unwritten ones, so no containment, property set, material or type relation refers to a skipped piece.IfcModel::entities, so the glTF export, the scene graph and the viewer draw them as before.Verification
class_sets_vs_ifc), so the 19 ceilings now pair by Tag.names_vs_ifcloses its "47 IfcCovering, Name differs" row.storeys_vs_ifccounts 12,708 elements instead of 12,755, with every one still on Revit's storey but the same 440.layer_sets_vs_ifcwrites 712 sets instead of 759, with the same agreement.IfcCoveringwith a PredefinedType goes from 158 to 111.