Skip to content

feat(ifc): write Pset_BeamCommon.Roll 0 on a beam whose Cross-Section Rotation is 0 (W7) (RE-276) - #1174

Merged
DrunkOnJava merged 10 commits into
mainfrom
w7/beam-roll
Oct 30, 2026
Merged

DrunkOnJava merged 10 commits into
mainfrom
w7/beam-roll

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

rvt-rs reads a beam's Cross-Section Rotation from its native record and writes Pset_BeamCommon.Roll 0 on a beam whose rotation is exactly 0. 8 of 8 beams of the BIM4LCA office are Revit's value as built and at building permit; nothing else moves. Stacked on #1173 (beams' Slope): its commit comes first in this branch.

Motivation

W7: Revit's IFC4 export writes Pset_BeamCommon.Roll on each of the office's 8 beams (Putkipalkki - suorakaide:PA-1), 0.0 on all, and rvt-rs wrote none (Measure run 41104131261).

revit-ifc's RollCalculator (CLEANROOM.md source 5; read and cited, no code copied) takes the roll from the beam's Cross-Section Rotation built-in parameter (STRUCTURAL_BEND_DIR_ANGLE), in radians, and answers true even for 0. A built-in parameter keeps its negative id and no name in the file (#255), so the probe probe_w7_office_gaps looked in the beam's native record: its FamInstCurveDriver object holds m_rotation, a radian value, 0.0 on each of the 8 beams in both files, beside the driver's other instance settings (RE-276). No other member of the record is a rotation: FamilyInstance holds m_RefDir and m_zAxis, and InstanceInfo its transform's origin.

Changes

  • src/research/partition_schema_mvp/framing.rs, fields.rs, partition_schema_mvp.rs: attach_beam_rotations gives each structural-framing element m_beam_cross_section_rotation (BEAM_ROTATION_FIELD), the m_rotation its native record's copies agree on, in one extract_graphs pass over the beams.
  • src/ifc/export_content.rs: add_beam_roll writes Roll 0 where the beam also has the extrusion length (add_beam_length) and its rotation is 0.
  • reports/element-framing/RE-276-beam-cross-section-rotation.md, changelog.d/added/beam-roll.md, docs/release-1.0-criteria.md (W7 lists unrotated beams' Roll).

Testing

Measure run 41118816912, unfiltered (-f base=main -f nordic=true -f r2025=true, every scorer), head 0ba5813 (this branch with main merged: this PR's code, #1173's commit and #1163's old commit) against main 80442f8. The branch has since only merged main again, where #1163 landed.

psets_vs_ifc before after
office as built, Pset_BeamCommon.Roll 8 values, equal 0, missing 8 8 values, equal 8, missing 0
office at permit 8 values, equal 0, missing 8 8 values, equal 8, missing 0

Only the office's two files change; every other model's outputs, ifc.sha256 included, are identical to main's. The main the run compared against did not yet hold #1163's Span (landed since), so the same run also shows Span and #1173's Slope going from 0 to 8 of 8 equal on each file: as built equal 44,079 to 44,103, missing 13,638 to 13,614; at permit equal 44,261 to 44,285, missing 13,598 to 13,574, the 24 values being 8 each of Span, Slope and Roll. None different, none written that Revit's export omits ("values Revit does not write" unchanged: 10 as built, 14 at permit). diagnostics.decoded.parameter_value_count goes up by those 24 (44,356 to 44,380 as built, 44,542 to 44,566 at permit), as the Pset_ values of the file do. Roll's share is 8 on each file.

  • Verified end to end on real Revit files: the BIM4LCA office (CC BY-SA 4.0) as built and at building permit, and the R2025 models, RE1 and Core Interior, against Revit's own exports, by Measure run 41118816912
  • Revit's IFC4 export is the oracle; nothing is written that it omits, none differs

Limits

All 8 measured beams are unrotated, so what m_rotation carries for a rotated beam is not measured. A rotated beam gets no Roll (fails closed); a model with rotated beams and Revit's export would decide it. The extra extract_graphs pass reads only the beams' records.

Breaking changes

None.

Related issues

Refs W7 (docs/release-1.0-criteria.md), #1173.

# Conflicts:
#	docs/release-1.0-criteria.md
# Conflicts:
#	docs/release-1.0-criteria.md
#	src/ifc/export_content.rs
# Conflicts:
#	docs/release-1.0-criteria.md
#	src/ifc/export_content.rs
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Owner review: attach_beam_rotations reads each structural-framing element's FamInstCurveDriver.m_rotation in one extract_graphs pass selected by the beams' ids, keeps it only where the record's copies agree and the value is finite, and add_beam_roll writes Roll 0 only where that rotation is exactly 0 and the beam carries RE-49's extrusion length: the case revit-ifc's RollCalculator gives from STRUCTURAL_BEND_DIR_ANGLE. A rotated beam gets none (unmeasured). Unfiltered Measure 41118816912: 8 of 8 equal on both office files, nothing else moves; the extra selected-id pass shows no cost (office rvt-gltf 49.5 s head against 51.0 s base, different CPUs). Stacked on #1173, which lands first. Armed; it needs the post-#1177 merge of main.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 20:26
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…mns' Slope, the building's Reference, door openings' values (W7) (RE-277) (#1176)

## Summary

Adds the probe behind the W7 office findings (RE-275, RE-276) and
RE-277, which records three office properties that the `.rvt` does not
decide, so none is written: columns' `Slope`, the building's
`Reference`, and the door openings' `Reference` and `FireExit`. No
export changes.

## Motivation

W7 listed these gaps on the BIM4LCA office (Measure run 41104131261).
The positive ones got their own PRs (pipes' `InvertElevation` #1169,
beams' `Span` #1163, `Slope` #1173 and `Roll` #1174, storeys'
`Reference` #1171 and `EntranceLevel` #1172). The rest were looked for
in the same pass and have no source in the file, which binds future
work, so the evidence is written down:

- **Columns' `Slope`** (73 of 279 columns as built, 101 of 345 at
permit, 0.0 on all): revit-ifc's `SlopeCalculator` reaches a vertical
column only through its last step, the largest top-facing face of the
last object of the element's geometry, so the property exists where
Revit's API returns a solid there. The probe lists each column's native
record. Six columns have a record identical in both files and Revit
gives them the property at permit only; twelve identical columns on one
level split 5 to 7 by whether a join is user-set; no cell of the
attachment-by-join table has the property on every column.
- **The building's `Reference`** (`Project Information`): not stored in
the file as UTF-16 or UTF-8 text but for two RTF help-text lines, so
writing it would guess the exporting session's name for the element.
- **Door openings' `Reference` and `FireExit`** (140 and 31 as built):
on the openings Revit writes where a door cuts a further wall, which
rvt-rs does not write; the door's own filled opening has no set in
Revit's export, as in rvt-rs's (the scorer now says so, #1161).

## Changes

- `probes/examples/probe_w7_office_gaps.rs`: for a model's parameter
definitions, every Level (its native record, saved parameters and the
record of its type), and every structural column, structural framing
element and pipe (decoded fields, saved parameters and native objects'
scalar fields), one JSON line each.
-
`reports/element-framing/RE-277-office-properties-the-file-does-not-decide.md`,
`changelog.d/research/office-properties-not-in-the-file.md`.

## Testing

Unit tests are not added. The probe ran on GitHub's runners on both
office files and the 24 R2025 models: Measure runs 41111710319 (office
as built, an earlier version of the probe), 41113408569 (office and
R2025, this probe). The report's counts are from those outputs joined
with Revit's exports by `Tag`; the commands that reproduce them are in
the report.

- [x] Verified end to end on real Revit files: the BIM4LCA office (CC
BY-SA 4.0) and puzzbobb's R2025 models (Apache-2.0), against Revit's own
exports, by the Measure runs above
- [x] Reverse-engineering finding: a reproducible probe is included, and
the report states its status (negative)

## Breaking changes

None.

## Related issues

Refs W7 (`docs/release-1.0-criteria.md`), #1161, #1169, #1163, #1171,
#1172, #1173, #1174.
# Conflicts:
#	docs/release-1.0-criteria.md
# Conflicts:
#	docs/release-1.0-criteria.md
#	src/ifc/export_content.rs
# Conflicts:
#	docs/release-1.0-criteria.md
#	src/ifc/export_content.rs
@DrunkOnJava
DrunkOnJava merged commit 4bc6ed6 into main Oct 30, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the w7/beam-roll branch October 30, 2026 20:59
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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