Repository navigation
feat(elements): build 2024 walls from their centreline at their type's thickness (RE-54) - #360
Merged
Merged
Conversation
…s thickness (RE-54) The bounded line a wall's data stores (RE-49) is its centreline whatever its location-line setting: Revit's IFC4 body lies exactly half the type's layer sum (RE-53) either side of it on 964 of Snowdon Towers' 1,054 walls, all with 1 in the word after the setting. The word is now read with the flip (partition_compound_structure::wall_orientation). A 2024 wall with word 1 gets its centreline and type thickness, and the exporter builds its body from them where the record box does not already give it: an axis-parallel wall keeps RE-26's trimmed run and keeps its box when the box is thinner than the type (a cut wall); an angled wall is the rectangle its box closes on, or runs joint to joint unless its box is far wider (a leaning or profiled wall). Scored end to end on Snowdon with rvt-gltf against Revit's IFC4 bodies: angled walls' faces within 0.001 ft on 75 of 102 (0 before), their ends on 13 (1 before); axis-parallel faces on 927 of 976 (918); per wall 71 better, 1,003 unchanged, 4 worse; walls drawn in layers 967 (883). Core Interior is unchanged. tools/re/wall_bodies_vs_ifc.py is the scorer.
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_29a4069d-913b-4ac8-a747-d45f639e567c) |
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
Revit 2024 walls are built from their centreline at their type's thickness (RE-54).
The location line a wall's data stores (RE-49's bounded line) is its centreline, whatever its location-line setting. Revit's IFC4 body lies exactly half the type's layer sum (RE-53) either side of it on 964 of Snowdon Towers' 1,054 walls.
The exporter now builds a wall from that line where the record box does not already give it. Angled walls were drawn as their whole axis-aligned box, and now run along their line at their real thickness.
Measured end to end on Snowdon Towers (local only):
rvt-gltf's GLB against the bodies in Revit's own IFC4 export, before (#359) and after.Motivation
Angled walls were the worst geometry in the model: boxes up to 9 ft too thick. With RE-53's type thickness and the stored centreline, every wall has what it needs to be drawn as itself, and more walls can show their layers (#358).
Changes
wall_orientation/scan_wall_orientationsread the location-line setting, the word after it and the flip. They replacewall_flip/scan_wall_flips.attach_wall_layersalso gives each 2024 wall with word 1 its centreline and its type's thickness (m_wall_axis_*,m_wall_type_thickness).wall_axis_from_fieldsreads them back.wall_centreline_body:BodySourcepartition_wall_centreline,ThicknessSourcewall_type_compound_structure.Testing
End to end, against real files. No unit tests were added.
33271010…e5e44a1, Revit IFC4ecfcb04e…cbb985a:rvt-gltf, thentools/re/wall_bodies_vs_ifc.pyandtools/re/wall_layers_vs_ifc.py. The report's §3 has the commands and output.IFC Exports/2024_Core_Interior_slim.ifc: 360 of 360 faces and 351 of 360 ends within 0.001 ft, as before. The IFC output is byte-identical apart from timestamps.What this does not do
Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
partition_compound_structure::wall_flip/scan_wall_flips(added in #359, not released) are replaced bywall_orientation/scan_wall_orientations.Related issues
Refs #358, #238.
Note
Medium Risk
Changes core IFC/glTF wall body generation and replaces partition wall-orientation APIs; behaviour is gated to 2024 walls with word 1, but export geometry and thickness metadata shift for many angled and over-wide-box walls.
Overview
Revit 2024 wall geometry is now built from the stored location line as a centreline at the wall type’s compound-structure thickness, instead of always using the partition record’s axis-aligned bounding box.
For walls whose orientation word is 1,
attach_wall_layerswrites centreline endpoints and type thickness into element fields;export_content::wall_centreline_bodyturns that into a plan rectangle (axis-parallel walls keep join-trimmed run length; angled walls use box-closure or joint-to-joint rules, with fallbacks for cut/profiled boxes). The centreline body replaces the bbox only when it differs, taggingBodySourcepartition_wall_centrelineandThicknessSourcewall_type_compound_structure. RE-53 layered drawing benefits because more walls have a body thick enough for per-layer bands.wall_flip/scan_wall_flipsare replaced bywall_orientation/scan_wall_orientations(WallOrientation: location-line setting, word, flip). Docs, support matrix, andtools/re/wall_bodies_vs_ifc.pyrecord Snowdon vs Revit IFC4 body comparisons.Reviewed by Cursor Bugbot for commit 4d18785. Configure here.