Repository navigation
research(geometry): a census of how much of its box Revit's body fills, for every body rvt-rs writes as its record box (W6) - #977
Conversation
… for every body rvt-rs writes as its record box (W6)
…rlapping solids or open meshes (W6)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2189d7744
ℹ️ 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".
…'s frame, not the export's world axes (W6)
…bodies belong to (W6)
…d works relative to each body (W6)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6faf5f4d95
ℹ️ 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".
… it, rounded corners and all, from its family's parameters (W6) (RE-221) (#980) ## 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 `IfcIndexedPolyCurve`s 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 `IfcIndexedPolyCurve`s (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. - [x] Verified end to end on real Revit files. Measure [40187355859](https://github.com/DrunkOnJava/rvt-rs/actions/runs/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 - [x] README / docs reflect the current state after this PR - [x] A user-visible change has its entry as a fragment under `changelog.d/` - [x] Resolved limitation updated (support matrix, status) - [x] Limitation documented (RE-221 §5) - [x] Commit messages describe what changed and why - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 (see `CONTRIBUTING.md`) - [x] 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 - [x] 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.
Summary
A Measure scorer that takes the census of every body rvt-rs writes as its record box: per IFC class, how much of its own bounding box Revit's body fills. A fill of 100% means the box is already the element's shape; less means the shape is not decoded. It is added to Measure's IFC scorers, so every run reports the W6 residual per class.
Motivation
1.0 criterion W6 asks that no body be a bounding box, and the diagnostics count boxed bodies without saying which of them are wrong. The census separates the boxes that are Revit's shape (RE1 Mechanical's 25 duct segments, RE1 Architecture's mullions, 107 of Core Interior's 176 boxed columns) from those that are not, and ranks what to decode next. Its first version measured fills along the export's world axes, which the office's shared-coordinate export turns about 40°, and so wrongly reported the office's 9,678 mullions as non-boxes (#976, closed); it now measures each body in its own placement's frame.
Changes
tools/re/box_bodies_vs_ifc.py: for each element whoseBodySourceispartition_element_record_bboxand whoseProfileResolvedis false (a slab drawn from its sketch keeps thatBodySource), meshes the element with the same Tag in Revit's export in its own placement's frame (so no export rotation or shared-coordinate transform affects it) and buckets volume ÷ bounding-box volume:box(within 0.5% of 100%),90%,50%,<50%,>100%(overlapping solids or an open mesh),no ref; median per class, and the three Revit types most of a class's non-box bodies belong to. Volumes and box volumes are summed per Tag, relative to each body's first vertex.tools/ci/measure-reference-models.sh:box_bodies_vs_ifcamong the IFC scorers.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.-f nordic=true, base none), with bodies drawn from a recovered profile left out: office as built 11,296 boxes, 10,266 Revit's shape in their own frame (all but 41 mullions, every panel); its open residual is 79 hollow-section columns, its doors and windows, railings and plumbing, lighting and fire fixtures. Core Interior 138, its doors and windows; RE1 Mechanical 68, 27 (31 duct fittings fill over 100%: overlapping solids); RE1 Architecture 57, 22. No export changes.Audit-honesty checklist
changelog.d/: not needed, research tooling onlyLegal and contribution hygiene
Breaking changes
None.
Related issues
Refs #409; corrects #976