Skip to content

feat(ifc): write I-section members' material as a profile set of their section (#94) (RE-105) - #477

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/material-profile-sets
Sep 28, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/material-profile-sets

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

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.

  • 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 with IfcOpenShell on the written IFC, as above.
  • Only Snowdon Towers structural changes. Every other local file is byte-identical to feat(elements): draw steel columns as their type's I section (#94) (RE-104) #476's output apart from the timestamp, so no witness observation changes.

Legal and contribution hygiene

  • Apache-2.0. No Autodesk code.

Breaking changes

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


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).

Reviewed by Cursor Bugbot for commit 05a8114. Configure here.

…r section (#94) (RE-105)

The 417 beams and columns drawn as their I section take an IfcMaterialProfileSetUsage, one set per type pairing its material with that I, instead of a constituent set. IfcMaterialProfile writes the real profile where the model has one, not a 1 x 1 m stand-in; the schedule names these members' material.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 28, 2026 10:55
@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_994ef5e1-c645-414e-821d-c1b24d076e16)

@DrunkOnJava
DrunkOnJava merged commit 4ed69b2 into main Sep 28, 2026
20 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/material-profile-sets branch September 28, 2026 10:58
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