Skip to content

feat(ifc): write Pset_BeamCommon.Span where the beam is drawn along its location line (W7) - #1163

Merged
DrunkOnJava merged 7 commits into
mainfrom
w7/beam-span
Oct 30, 2026
Merged

DrunkOnJava merged 7 commits into
mainfrom
w7/beam-span

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

rvt-rs writes Pset_BeamCommon.Span on a beam as the length of the extrusion it draws it as, the value its Qto_BeamBaseQuantities.Length already holds. 8 of 8 beams of the BIM4LCA office are Revit's value as built and at building permit; nothing else moves.

Motivation

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

revit-ifc's SpanCalculator (CLEANROOM.md source 5; read and cited, no code copied) takes the span from a parameter named Span or Pset_BeamCommon.Span where there is one, and otherwise from extrusionCreationData.ScaledLength, the length of the extrusion the beam is exported as. That is the length Qto_BeamBaseQuantities.Length holds, which rvt-rs writes for the beams it draws along their location line (RE-49, #1016). Revit's export has the two equal on all 8 beams. A parameter named for the property replaces rvt-rs's own value in the existing named-parameter step (RE-194).

Changes

  • src/ifc/export_content.rs: add_beam_span copies the Length of the beam's Qto_BeamBaseQuantities, where it is written, into Pset_BeamCommon.Span (IfcPositiveLengthMeasure). A beam with no such length gets no span.
  • docs/release-1.0-criteria.md: W7 lists beams' Span.
  • changelog.d/added/beam-span.md.

Testing

Measure run 41109857615, unfiltered (-f base=main -f nordic=true -f r2025=true, every scorer, head 61e2c96 against main b91c6f5). Only the office's two files change; every other model's outputs, ifc.sha256 included, are identical to main's.

psets_vs_ifc before after
office as built, Pset_BeamCommon.Span 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
office as built, all properties equal 44,067, different 56, missing 13,820 equal 44,075, different 56, missing 13,812
office at permit, all properties equal 44,249, different 56, missing 13,793 equal 44,257, different 56, missing 13,785

diagnostics.decoded.parameter_value_count goes up by the 8 values on each file (44,344 to 44,352 as built, 44,530 to 44,538 at permit), as the Pset_ values of the file do.

  • 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 41109857615
  • Revit's IFC4 export is the oracle; nothing is written that it omits, none differs

Limits

A beam Revit exports with no extrusion length (one not drawn along its location line) gets no span, and a Span parameter on the beam's type, rather than the beam, is not read: no beam in the measured files has one.

Breaking changes

None.

Related issues

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

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 19:04
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Owner review: add_beam_span copies the beam's Qto_BeamBaseQuantities.Length (written only for beams drawn along their location line, RE-49) into Pset_BeamCommon.Span, which matches revit-ifc's SpanCalculator fallback to the extrusion length. --no-base-quantities strips the Qto set later (leave_out_base_quantities), so the span survives it, as Revit's does with base quantities off. A Span/Pset_BeamCommon.Span parameter replaces it in the later named-parameter step (add_element_set → set_property). Unfiltered Measure 41109857615: 8 of 8 office beams equal on both files, nothing else moves, parameter_value_count up by the 8. Armed.

@DrunkOnJava
DrunkOnJava merged commit 2fe980e into main Oct 30, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the w7/beam-span branch October 30, 2026 19:53
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.
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…per line, so pull requests changing different values stop conflicting (#1177)

## Summary

Every W6 or W7 change edits one table cell, a single line of 1,800 and
5,400 characters, so any two open pull requests that add a value
conflict, and each landing put the others in conflict again (#1152,
#1163, #1170 today). This moves the two "value now" cells into sections
below the table, `### W6 measured now` and `### W7 measured now`, with
one sentence or list item per line. Markdown joins the lines of a
paragraph with spaces, so the page reads the same: joined back, each
section is byte-identical to the cell it replaces (checked by script
against `main`). The table's cell now links to its section; the
requirement, bar and status stay in the table.

## Changes

- `docs/release-1.0-criteria.md`: the two cells moved, an HTML comment
in each section saying why the lines break where they do, and one
sentence in "Keeping this page".

## Testing

Docs only. Checked by script that the text of each section, its lines
joined by spaces, equals the cell on `main` (b17d628) exactly, that no
line begins with Markdown list, heading, quote or table syntax, and that
every other line of the page is unchanged. `tools/maintainer/audit.py`
reads the page only for the issue numbers it cites, which are all still
there.

## Audit-honesty checklist

- [x] No status, bar or measured value changes
- [x] Changelog fragment: not needed (layout of a docs page)
- [x] No emojis, no private paths or personal addresses in committed
files

## Related issues

None; open W6 and W7 pull requests (#1166, #1171 to #1175) move their
additions into the new sections when they next merge `main`.
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…l location line (W7) (RE-49) (#1173)

## Summary

rvt-rs writes `Pset_BeamCommon.Slope` 0 on a beam it draws along a level
location line. 8 of 8 beams of the BIM4LCA office are Revit's value as
built and at building permit; nothing else moves.

## Motivation

W7: Revit's IFC4 export writes `Pset_BeamCommon.Slope` 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 `SlopeCalculator` (CLEANROOM.md source 5; read and cited, no
code copied) tries, in order: the beam's end elevation parameters (only
where the exporter has no extrusion length), a ramp's slope, a parameter
named `Slope`, the extrusion's own slope, and, for an element with a
location line, the angle between that line and the horizontal; the angle
of the largest top face of the element's geometry comes last. A level
line gives 0. The beams the exporter draws as an extrusion take the
extrusion length rule (RE-49, the length `Qto_BeamBaseQuantities.Length`
holds), so rvt-rs writes the slope on the beams it writes that length
for, whose location line stays in the plan (its direction's vertical
share is below `HORIZONTAL_EPS`).

A sloped beam gets none: its value comes from the extrusion's own slope,
which no measured beam has, so it is not measured.

## Changes

- `src/ifc/export_content.rs`: `add_beam_slope`, with the small helpers
`beam_extrusion_length` and `add_beam_common`, which `add_beam_span`
(#1163, landed) now also uses.
- `docs/release-1.0-criteria.md`: W7 lists level beams' `Slope`.
- `changelog.d/added/beam-slope.md`.

## Testing

Measure run 41112354334, unfiltered (`-f base=main -f nordic=true -f
r2025=true`, every scorer), head 71131eb (#1163's commit and this one,
the code of this PR) against main b91c6f5. Only the office's two files
change; every other model's outputs, `ifc.sha256` included, are
identical to main's. The branch has since only merged main, where #1163
landed.

| `psets_vs_ifc` | before | after |
|---|---|---|
| office as built, `Pset_BeamCommon.Slope` | 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 |

The same run's `Pset_BeamCommon.Span` rows (equal 8 of 8 on both files)
are #1163's, now on main. Together: as built equal 44,067 to 44,083,
missing 13,820 to 13,804; at permit equal 44,249 to 44,265, missing
13,793 to 13,777; none different, none written that Revit's export
omits. `diagnostics.decoded.parameter_value_count` goes up by 16 on each
file (Span's 8 and Slope's 8: 44,344 to 44,360 as built, 44,530 to
44,546 at permit), as the `Pset_` values of the file do.

- [x] 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
41112354334
- [x] Revit's IFC4 export is the oracle; nothing is written that it
omits, none differs

## Limits

Only level beams are measured (the office's 8). A sloped beam, or a beam
whose extrusion has a slope of its own, gets no `Slope`.

## Breaking changes

None.

## Related issues

Refs W7 (`docs/release-1.0-criteria.md`), #1163.
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
… Rotation is 0 (W7) (RE-276) (#1174)

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

- [x] 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
- [x] 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.
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