Skip to content

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
DrunkOnJava merged 7 commits into
mainfrom
feat/hss-columns
Oct 25, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
feat/hss-columns

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

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 their ParamElemFamily records), and the profile is written as Revit's export writes it: an IfcArbitraryProfileDefWithVoids over two IfcIndexedPolyCurves 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 (every f64 · ff×8 · i64 length 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_caption in one extract_graphs pass, validated as a wall with rounded corners).
  • src/partition_schema_mvp.rs: attach_hollow_sections gives the section to StructuralColumn and Column elements 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 as hollow_section_profile, extruded through the box's height; BodySource family_type_hollow_section.
  • src/ifc/entities.rs, step_writer.rs, body_geometry.rs, scene_graph.rs: ProfileDef::IndexedPolyCurveWithVoids and IndexedCurve (#[non_exhaustive]), written as IfcArbitraryProfileDefWithVoids over IfcIndexedPolyCurves (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_ifc drawn as a hollow section in Revit's export vertices within 0.001 ft and volume within 0.0001 every Revit vertex on rvt-rs's surface
    BIM4LCA office as built 79 79 79 79
    BIM4LCA office at building permit 55 55 55 55

    Only 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

  • README / docs reflect the current state after this PR
  • A user-visible change has its entry as a fragment under changelog.d/
  • Resolved limitation updated (support matrix, status)
  • Limitation documented (RE-221 §5)
  • Commit messages describe what changed and why
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files

Legal and contribution hygiene

  • I agree this work is licensable under Apache-2.0 (see CONTRIBUTING.md)
  • This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see CLEANROOM.md): only public byte observations of the files RE-221 names, Revit's own IFC exports of them, and buildingSMART's IFC4 specification
  • Any new test fixtures use synthetic values: none added

Breaking changes

None. ProfileDef is #[non_exhaustive]; IndexedCurve, HollowSection and 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.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 25, 2026 11:22
@DrunkOnJava
DrunkOnJava merged commit 9d31e03 into main Oct 25, 2026
32 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/hss-columns branch October 25, 2026 11:30
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.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant