Skip to content

feat(elements): draw steel beams as their type's I section (#94) (RE-103) - #475

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/beam-sections
Sep 28, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/beam-sections

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Steel beams are drawn as their I section (RE-103, #94). A structural framing type stores its section under public BuiltInParameters, as f64 feet · ff×8 · i64 parameter in its value block (RE-93):

  • Width −1005502 and Height −1005503;
  • web thickness −1005525 and flange thickness −1005524;
  • the centroid from the left −1005508 and from the bottom −1005509.

A centroid at the centre both ways marks an I. A channel stores the same four dimensions with its centroid off centre across (C8X11.5: 0.572 in of 2.26 in), and an angle has its own L-angle parameters, so neither is read as an I.

Placement:

  • Where a beam's body along its line (RE-49) is the section's width and depth, the I fills it.
  • A level beam set down from its line has a record box from the line (on its top) to the steel's bottom, so there the I sits on the box's bottom.

Results

Snowdon Towers structural (942 framing elements) main this PR
drawn as their type's I section 0 377
of those the VIM of its 2027 edition can score, Revit's mesh has the section's outer corners, flange tips and web faces at that place – 271 of 271
  • As written: IfcOpenShell 0.8.5 meshes all 377 with volume = I area × AxisLength (worst 3e-10 relative), flange width across and depth upright.
  • In the GLB: W18x55 beam 608386 is 0.6275 × 1.5083 ft (7.53 × 18.1 in) across its 17.33 ft length.
  • The solid: the I is written as an IfcExtrudedAreaSolid of an IfcIShapeProfileDef whose placement puts its X axis level across the line. A fixed-reference sweep with a level reference means the same in IFC 4.3, but IfcOpenShell 0.8.5 lays that I on its side.

Changes

  • src/partition_type_parameters.rs: ISection, type_i_sections and the section parameter ids.
  • src/partition_schema_mvp.rs: attach_beam_sections, BEAM_I_SECTION_FIELDS, beam_i_section_from_fields.
  • src/partition_beam_axes.rs: i_section_body, the set-down placement.
  • src/ifc/export_content.rs: beam_i_solid, plus the SectionShape, SectionWebThickness and SectionFlangeThickness properties.
  • Probe and scorer: examples/probe_re103_beam_sections.rs (with the VIM check) and tools/re/beam_sections_in_ifc.py.
  • Docs: reports/element-framing/RE-103-beam-i-sections.md, README, supported profile, support matrix, CHANGELOG.

Testing

Unit tests are banned in this repository; none were added.

  • Gates: fmt, clippy -D warnings, rustdoc -D warnings, cargo +1.85.0 check, fuzz workspace check (--locked), and tools/ci/verify-real-files.sh --profile ci with both corpora.
  • End to end against the Snowdon VIM (local only, sha256 in the report) and with IfcOpenShell on the written IFC, as above.
  • Only Snowdon Towers structural changes. Every other local file is byte-identical to main's apart from the timestamp, so no witness observation changes:
    • Core Interior, the four RE1 models, Snowdon Towers architectural;
    • Einhoven, Projeto1, teste_export_2025, Exemplo_data, modelo_bim;
    • the MIT house (2024, 2025).

Legal and contribution hygiene

  • Apache-2.0. Byte observations; BuiltInParameter values from McNeel's MIT-licensed rhino.inside-revit listing; no Autodesk code.

Breaking changes

None.


Note

Medium Risk
Changes structural beam IFC/GLB geometry for a large subset of framing elements; behavior is gated on type section data and body fit, with no auth or data-model breakage.

Overview
Steel wide-flange beams now export as true I-section solids instead of rectangular envelopes along the location line (RE-103, #94).

Framing types expose flange width, depth, web and flange thickness from Revit BuiltInParameters; centroid-at-center distinguishes wide flanges from channels and angles. Beams get that section attached in the partition schema; i_section_body places the I when the RE-49 body matches the section or when a level beam is set down from its line (I on the box bottom). IFC export uses IfcExtrudedAreaSolid + IfcIShapeProfileDef via beam_i_solid, with SectionShape / web and flange properties. Channels, joists, and concrete beams still use the rectangular path.

Docs, support matrix, a VIM mesh probe (probe_re103_beam_sections), and beam_sections_in_ifc.py are updated; Snowdon structural is the only corpus that changes (377 I beams, 271/271 VIM-scored match Revit’s I mesh).

Reviewed by Cursor Bugbot for commit 39a6960. Configure here.

…103)

A framing type stores its section's width, depth, web and flange thickness and its centroid; a centroid at the centre both ways marks an I. 377 of Snowdon Towers' structural beams now export as an IfcIShapeProfileDef along their line, set on the box's bottom where the beam is set down from its line. Revit's own mesh is that I in that place on all 271 its VIM export can score.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 28, 2026 10:37
@cursor

cursor Bot commented Sep 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_f11ead58-7a62-4548-8d43-f4bc3bacd9d7)

@DrunkOnJava
DrunkOnJava merged commit 3760cdb into main Sep 28, 2026
20 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/beam-sections branch September 28, 2026 10:40
DrunkOnJava added a commit that referenced this pull request Sep 28, 2026
…E-104) (#476)

## Summary

Steel columns are drawn as their I section (RE-104, #94). A structural
column whose type stores an I section (RE-103) runs its flange width
along the X axis of its instance transform (RE-87) and its depth along
the Y axis, centred on its record box. Such a column is now drawn as
that I, extruded through its box's height and turned to that axis, only
where the turned section fills the record box in plan within 0.01 ft.

The box alone can't decide the turn:
- W10x49 is 10.0 × 9.98 in.
- Four columns whose box has the flange width along model Y are turned
90°.

The type-value readers (RE-77, RE-93, RE-94, RE-103) now take a value
block's owner from every ElementId `Global/ElemTable` declares,
secondary ids included (RE-41), not only primary ids. Before, a type
whose block opens with a secondary id lent its values to the block
before it; W8x31 (type 709888) is one. No exported value changes on any
local file from that alone.

## Results

| Snowdon Towers structural (74 structural columns) | main | this PR |
|---|---:|---:|
| drawn as their type's I section | 0 | 40 |
| of those the VIM of its 2027 edition can score, Revit's mesh is that I
at that turn | – | 24 of 24 (5 turned off the model's axes) |

- **Per type:** W14x109 7 of 17 scored (10 moved in the VIM's edition),
W10x49 8 of 14 (6 moved), W8x31 7 of 7, W18x119 2 of 2.
- **Kept as boxes:** 20 SC_Reference Column, 13 CC24x24 concrete columns
and one HSS tube.
- **As written:** IfcOpenShell 0.8.5 meshes all 40 with a vertex at each
outer corner and inner flange tip in their own placement's axes, and
volume = I area × height (`tools/re/beam_sections_in_ifc.py`, which now
checks columns too). The 377 beams of #475 are unchanged.

## Changes

- src/partition_schema_mvp.rs: `attach_beam_sections` also covers
`StructuralColumn` and stores an upright column's plan X axis
(`COLUMN_I_AXIS_FIELDS`).
- src/ifc/export_content.rs: `column_i_section`,
`COLUMN_I_SECTION_BODY_SOURCE` (`family_type_i_section`) and the turned
IShape extrusion.
- src/partition_type_parameters.rs: `elem_table::declared_ids` in all
four readers.
- examples/probe_re104_column_sections.rs;
tools/re/beam_sections_in_ifc.py covers columns.
- reports/element-framing/RE-104-column-i-sections.md, README, supported
profile, support matrix, CHANGELOG.

## Testing

Unit tests are banned in this repository; none were added.

- [x] Gates: fmt, clippy -D warnings, rustdoc -D warnings, `cargo
+1.85.0 check`, fuzz workspace check (`--locked`), and
`tools/ci/verify-real-files.sh --profile ci` with both corpora.
- [x] End to end against the Snowdon VIM (local only, sha256 in the
report) and with IfcOpenShell on the written IFC.
- [x] Only Snowdon Towers structural changes. Every other local file is
byte-identical to #475's output apart from the timestamp, so no witness
observation changes:
  - Core Interior, the four RE1 models, Snowdon Towers architectural;
  - Einhoven, Projeto1, teste_export_2025, Exemplo_data, modelo_bim;
  - the MIT house (2024, 2025).

## Legal and contribution hygiene

- [x] Apache-2.0. Byte observations; no Autodesk code.

## Breaking changes

None.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes IFC geometry for structural columns and broadens ElemTable id
matching for type parameters; scoped to I-section columns with
validation, but geometry export paths are sensitive.
> 
> **Overview**
> **Steel structural columns** whose types carry an I section (building
on RE-103 beams) now export as turned **`IfcIShapeProfileDef`**
extrusions through the record-box height, with flanges along the
instance **X axis** in plan—only when that orientation fits the column’s
plan box within **0.01 ft** (40 columns on Snowdon structural;
tubes/concrete/reference columns stay boxes).
> 
> **Type-value ownership** for partition readers switches from primary
`ElemTable` ids to **`declared_ids`** (primary + secondary), so blocks
like **W8x31** attach to the correct type without changing other local
exports.
> 
> Adds **`column_i_section`** / **`COLUMN_I_AXIS_FIELDS`** wiring,
extends **`attach_beam_sections`** to **`StructuralColumn`**, a **VIM
probe** (`probe_re104_column_sections`), and **IfcOpenShell** checks for
columns in **`beam_sections_in_ifc.py`**, plus docs/changelog updates.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
79e15bd. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Sep 28, 2026
…r section (#94) (RE-105) (#477)

## Summary

Steel members carry their section as a material profile (RE-105, #94).
Every beam and column drawn as its type's I section (#475, #476) is now
written with an `IfcMaterialProfileSetUsage`, as IFC4 models a profiled
member's material, instead of an `IfcMaterialConstituentSet`:
- one `IfcMaterialProfileSet` per type, named after it;
- its `IfcMaterialProfile` pairs the type's one material (RE-82) with an
`IfcIShapeProfileDef` equal to the member's body.

`IfcMaterialProfile` used to be written with a 1 × 1 m rectangle
stand-in. It now writes the model's real profile where there is one, and
the stand-in only where there is none.

## Results

| Snowdon Towers structural | main | this PR |
|---|---:|---:|
| I-section beams and columns with a material profile set usage | 0 |
417 of 417 |
| their material profile equal to their body's I, material Steel | – |
417 |

- **Measured:** IfcOpenShell 0.8.5 via
`tools/re/beam_sections_in_ifc.py`, which now checks the material too.
`tools/ci/ifc_schema_arity.py` passes on the file.
- **GLB:** byte-identical. A member whose profile set has one material
takes that material's colour, as one with a one-material constituent set
did.
- **Schedule:** `rvt-schedule`'s material column names a one-material
profile set's material (Steel), not the set's name.
- **CardinalPoint comment:** the writer said 5 was "bottom-left". In
IFC4 it is the mid-depth centre, which is where every profile is
centred, so the value stays and the comment is corrected.

## Changes

- src/ifc/entities.rs: `MaterialProfile.profile`; `ProfileDef` derives
`PartialEq`.
- src/ifc/step_writer.rs: real profile in `IfcMaterialProfile`, and the
CardinalPoint comment.
- src/ifc/mod.rs: `material_profile_sets_from_sections`.
- src/ifc/gltf.rs: one-material profile sets colour the member.
- src/ifc/schedule_csv.rs: a profile set's material names the material.
- tests/ifc_synthetic_structural.rs: the new field on its struct
literal.
- tools/re/beam_sections_in_ifc.py;
reports/element-framing/RE-105-material-profile-sets.md; supported
profile, support matrix, CHANGELOG.

## Testing

Unit tests are banned in this repository; none were added.

- [x] Gates: fmt, clippy -D warnings, rustdoc -D warnings, `cargo
+1.85.0 check`, fuzz workspace check (`--locked`), and
`tools/ci/verify-real-files.sh --profile ci` with both corpora.
- [x] End to end with IfcOpenShell on the written IFC, as above.
- [x] Only Snowdon Towers structural changes. Every other local file is
byte-identical to #476's output apart from the timestamp, so no witness
observation changes.

## Legal and contribution hygiene

- [x] Apache-2.0. No Autodesk code.

## Breaking changes

`MaterialProfile` gains a field (`profile`, serde default `None`).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes IFC material association for hundreds of structural elements
and adds a serialized field on `MaterialProfile`; geometry and other
exports stay byte-identical on measured corpora.
> 
> **Overview**
> **Steel members drawn as I sections** (377 beams + 40 columns on
Snowdon structural) no longer get **`IfcMaterialConstituentSet`**; they
are associated via **`IfcMaterialProfileSetUsage`**, with one
**`IfcMaterialProfileSet` per type** pairing Steel with an
**`IfcIShapeProfileDef`** that matches the member body.
> 
> The model builder adds **`material_profile_sets_from_sections`**,
which moves eligible members off their constituent set, deduplicates
sets by type name + profile + material, and sets
**`MaterialProfile.profile`** to the real section. The STEP writer emits
that profile in **`IfcMaterialProfile`** instead of the old **1×1 m
rectangle** placeholder; **`ProfileDef`** gains **`PartialEq`** for
dedup.
> 
> Downstream: **glTF** applies material colour from single-material
profile sets (same visual result as before); **`rvt-schedule`** reports
the profile set’s material name (e.g. Steel) rather than the set name.
Docs, changelog, RE-105 report, and **`beam_sections_in_ifc.py`** are
updated to assert profile-set material linkage.
> 
> **Breaking:** `MaterialProfile` adds optional **`profile`** (`serde`
default `None`).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
05a8114. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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