Repository navigation
feat(ifc): a column whose type is a square hollow section is drawn as it, rounded corners and all, from its family's parameters (W6) (RE-221) - #980
Merged
Conversation
…ters against Revit's column bodies (W6)
…es and Revit's profile extents (W6)
…ements and prints Revit's profile coordinates (W6)
… it, rounded corners and all, from its family's parameters (W6)
DrunkOnJava
enabled auto-merge (squash)
October 25, 2026 11:22
Merged
DrunkOnJava
pushed a commit
to puzzbobb/rvt-rs
that referenced
this pull request
Oct 26, 2026
… file's own schema, cross-checked against the measured constant (DrunkOnJava#421) Every scan that needs the bbox marker (element names, stair names, type records, Level records) now takes it from file_bbox_marker, which returns the marker the file's schema gives (RE-80) and checks it against the release's measured constant: a file whose schema gives another marker is not scanned, one whose schema does not parse keeps the constant. supports_revit_version no longer depends on a constant being recorded. On all 84 2024 to 2027 files measured (5, 68, 4 and 7) the schema's marker equals the constant, and its ElementParents tag less 12 is the schema's ElementHeader tag. On 2016 to 2018 that gap is 9, so record_prologue_constant holds only from 2019; its doc says so. tests/schema_bbox_marker.rs pins both on the phi-ag families and the project corpus; examples/probe_421_schema_marker.rs prints the per-file measurement. The hollow-section reader (DrunkOnJava#980) asks supports_revit_version too.
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
A column whose type is a square hollow steel section is now drawn as that section, rounded corners and all, where it was a solid box. The outside, wall thickness and corner radius are the family's own parameters (
b,Ht,t,kr, named by theirParamElemFamilyrecords), and the profile is written as Revit's export writes it: anIfcArbitraryProfileDefWithVoidsover twoIfcIndexedPolyCurves of four lines and four quarter arcs each. On the BIM4LCA office all 79 such columns as built and 55 at building permit are Revit's body. Found by the W6 shape census (#977); RE-221.Motivation
The W6 census of bodies rvt-rs writes as its record box put 79 office columns well under half of their box in Revit's export, all of one family,
Rectangular and Square Hollow Sections-Column(types PI-4, PI-2, PI-5). Revit draws them as hollow tubes; rvt-rs drew solid squares.Changes
src/partition_type_parameters.rs:partition_length_entries(everyf64 · ff×8 · i64length entry by its value block's owner),HollowSection,HOLLOW_SECTION_PARAMETER_NAMES,type_hollow_sections(values every partition agrees on, names from the parameter elements'ParamDefValue.m_captionin oneextract_graphspass, validated as a wall with rounded corners).src/partition_schema_mvp.rs:attach_hollow_sectionsgives the section toStructuralColumnandColumnelements without an I section (HOLLOW_SECTION_FIELDS,hollow_section_from_fields,HOLLOW_SECTION_CLASSES).src/ifc/export_content.rs: a square section whose record box is its outside within 0.001 ft is drawn ashollow_section_profile, extruded through the box's height;BodySourcefamily_type_hollow_section.src/ifc/entities.rs,step_writer.rs,body_geometry.rs,scene_graph.rs:ProfileDef::IndexedPolyCurveWithVoidsandIndexedCurve(#[non_exhaustive]), written asIfcArbitraryProfileDefWithVoidsoverIfcIndexedPolyCurves (the polycurve writer is now one helper both profile kinds use).examples/probe_hss_sections.rs,tools/re/body_forms_list.py,tools/re/column_bodies_vs_ifc.py(registered in Measure).reports/element-framing/RE-221-hollow-section-columns.md,docs/status.md,docs/support-matrix.json(element-record-beam-axes),README.md(columns row),docs/supported-profile.md(steel columns row),changelog.d/added/hollow-section-columns.md.Testing
Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.
tools/check-local.sh: CI.Verified end to end on real Revit files. Measure 40187355859, this change against
main(3a3b50a),-f nordic=true -f r2025=true:column_bodies_vs_ifcOnly the two office files' IFC changes; Core Interior, Einhoven, the four RE1 models and the 23 R2025 models are byte-identical. The W6 census of record-box bodies falls from 11,296 to 11,217 (as built) and 11,388 to 11,333 (permit).
Not covered: rectangular or turned hollow sections, and families that name their parameters otherwise; they keep their box (RE-221 §5).
Audit-honesty checklist
changelog.d/Legal and contribution hygiene
CONTRIBUTING.md)CLEANROOM.md): only public byte observations of the files RE-221 names, Revit's own IFC exports of them, and buildingSMART's IFC4 specificationBreaking changes
None.
ProfileDefis#[non_exhaustive];IndexedCurve,HollowSectionand the new functions are additions.Screenshots or output samples
Revit's PI-4 profile (
tools/re/body_forms_list.py, run 40186485900) and rvt-rs's now share every point: outside ±0.164042 ft with arc centres at ±0.131234, inside ±0.147638, as RE-221 §2 lists.