Skip to content

feat(ifc): write the base quantities of a joined column that nothing cuts or crosses (#1046) (RE-291) - #1204

Merged
DrunkOnJava merged 19 commits into
mainfrom
feat/1046-column-areas-volumes
Oct 31, 2026
Merged

DrunkOnJava merged 19 commits into
mainfrom
feat/1046-column-areas-volumes

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

rvt-rs now writes a column's CrossSectionArea, OuterSurfaceArea, GrossVolume and NetVolume as its record box's, on a column drawn as that box whose type is a plain rectangle, joined by no clean pair or by clean pairs where nothing cuts it or crosses an end of it: 199 of the BIM4LCA office's columns as built and 265 at building permit, Revit's on every one, none different and none Revit's export leaves out (RE-291). A joined column's Length stays out, per the maintainer's 2026-10-26 decision; this PR does not write it, and the 18 meshed columns get no value for any quantity (below).

The 18 meshed columns

Revit's export draws 18 of the office's 345 columns at building permit as a cut mesh. rvt-rs's own export of the office at permit, from this head (92cca54, run 41203821396 with keep_ifc; later commits are docs only), against Revit's, by quantity:

quantity Revit writes on the 18 the 18 that get a value from rvt-rs
Length none 0 of 18
CrossSectionArea its mesh's, not the box's 0 of 18
OuterSurfaceArea none 0 of 18
GrossVolume none 0 of 18
NetVolume its mesh's, not the box's 0 of 18

The same check on the as-built export gives 0 of 0 (that office has no meshed column). The unfiltered Measure agrees: none written that Revit's export omits (0 to 0 on both offices, the R2025 models and RE1), and none different (1 to 1, the mullion). Length itself is unchanged: 93 of 279 as built and 71 of 327 at permit, the columns no clean pair joins (RE-247). The rule does tell the 18 apart (RE-291 §2: each has a cut-pair slab whose span crosses its top, and none of the 327 extruded columns does), and a joined column's Length would then be Revit's on all 436 columns the rule takes; that reverses the premise of the 2026-10-26 decision, so it is the maintainer's call, tracked in #1203.

Motivation

#1046, step 3 of the order. RE-247 left a joined column's quantities out because nothing told the 18 meshed columns apart from the 256 joined extrusions. probes/examples/probe_re291_column_pairs.rs prints the elements each column's cut and clean pairs name, as rvt-rs exports them, and joined to Revit's bodies it finds the separator. A clean pair alone does not cut (3 extruded columns have a slab across their top by one); a wall that cuts a column (3 extruded columns) changes its section. The columns need a rectangular section too: a round column is drawn as a box, and its type holds a Diameter where every rectangular type holds a b, or an h and a b, equal to the box's sides (probes/examples/probe_re291_column_type_parameters.rs, run 41140980550).

Review changes

  • The cut-slab check (every element a column's cut pairs name is a slab lying clear of it) now runs for unjoined columns too: a Cut Geometry command can leave a CutPairGStep with no CleanPairGStep, and RE-291's mechanism draws such a column as a mesh. The 13 (as built) and 15 (at permit) unjoined columns the rule writes have only clear slabs among their cut partners, so no count changes: 199 and 265 hold in the run above.
  • A column whose pair steps were not all read is left out; the pass no longer falls back to empty partners for an unjoined column.
  • rectangular_section requires the type's named length parameters to be exactly b, or b and h, not an open list of names it must not hold (an I, T or channel type holding b, h, tw, tf gets none). A length parameter whose element is not read is not seen; the office's rectangular types hold exactly these.
  • Wording: the cut-mesh finding is stated "on the office" and as measured on Revit 2024 only (the R2025 models hold no column); the changelog, report, README, supported profile and criteria say Revit 2024; partners()'s doc says the union of spans, none only when a piece has no span.

Changes

  • src/research/native_column_joins.rs, src/research/partition_schema_mvp/{fields,framing}.rs, src/research/partition_schema_mvp.rs: ColumnJoins::cut_partners and clean_partners, attached as COLUMN_CUT_PARTNERS_FIELD and COLUMN_CLEAN_PARTNERS_FIELD; a column type's sides from its parameters b and h as COLUMN_RECTANGLE_FIELDS.
  • src/research/partition_type_parameters.rs: type_named_lengths (RE-221's reading of a type's lengths by parameter caption, shared), hollow_section and rectangular_section; type_hollow_sections keeps its behaviour.
  • src/ifc/export_content/column_quantities.rs (new), src/ifc/export_content.rs: a pass after wall_areas writes the four quantities on each column whose body is the record box, whose type is a rectangle the box fills, and which no clean pair joins or whose pairs name only the slabs, walls, coverings and columns the rule allows.
  • probes/examples/probe_re291_column_pairs.rs, probes/examples/probe_re291_column_type_parameters.rs, reports/element-framing/RE-291-column-cut-slabs.md.
  • README, W7 on the criteria page (with W7: the round column and the meshed columns' values, and the section check on box-drawn columns #1203), the supported profile, the reconnaissance addendum and changelog.d/added/column-quantities-joined.md. No witness change: Core Interior's export does not move.

Testing

Unit tests are banned in this repository; none added. Measure 41203821396: this branch (92cca54, main at 5465168 merged in) against main (5465168), every model and every scorer, with the held-out models (-f base=main -f nordic=true -f r2025=true -f keep_ifc=true -f holdout=true). Only the two offices' exports change (ifc.sha256, qtos_vs_ifc, diagnostics.json; the other 1,473 outputs are byte-identical to main's, and Core Interior's witness observations are unchanged). Run 41183092458 (7884e97, before the review changes) has the same column rows.

model quantities equal before equal after different Revit omits (rvt-rs writes)
office as built 39,388 28,329 29,125 1 to 1 (the mullion) 0 to 0
office at building permit 39,679 28,254 29,314 1 to 1 0 to 0
R2025 models (24) 1,515 787 787 0 to 0 0 to 0
RE1 Mechanical, Plumbing 31, 63 31, 63 31, 63 0 0

By quantity (equal, of the columns Revit writes it on), as built then at permit: CrossSectionArea 79 to 278 of 279 and 55 to 320 of 345 (Revit writes the 18 meshed columns' mesh area, which rvt-rs does not); OuterSurfaceArea and GrossVolume 79 to 278 of 279 and 55 to 320 of 327; NetVolume 0 to 199 of 279 and 0 to 265 of 345; Length 93 of 279 and 71 of 327, unchanged. Core Interior's and RE1 Architecture's exports are unchanged (2,268 and 92 counted apart, as on main).

Held-out models (same run, scrubbed counts): the AA house (846 quantities, 127 equal, 0 different), modelo_bim (220, 7, 0) and teste_export_2025 (44, 10, 0) have the same counts as main's, so the rule writes no column quantity on them. The AA house's 2 quantities and teste_export_2025's 3 that Revit's export does not write are a floor's and a covering's Width on main already (RE-250, RE-295 and RE-297; #1222 names them, and the Width PR removes the rules), not this change's.

Left out and measured (RE-291 §4, #1203): the round column (3053209, one on each file), the 18 meshed columns, the 3 extruded columns a wall cuts and the 3 with a slab across the top by a clean pair, hollow-section columns' NetVolume (RE-247 §8), and a column whose type does not hold b.

  • Verified end to end on real Revit files (BIM4LCA office, CC BY-SA 4.0; puzzbobb's R2025 models, Apache-2.0): Measure above and the two probes reproduce it
  • No witness change needed (Core Interior's export is byte-identical to main's)
  • No local build: rustfmt only; CI is the gate

Audit-honesty checklist

Legal and contribution hygiene

  • Apache-2.0; clean-room: revit-ifc's PropertyUtil.CreateBeamColumnBaseQuantities is read for what Revit's exporter writes and cited (RE-247 §8), not copied

Breaking changes

None.

Related issues

Refs #1046, #1016, #1203.

Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
# Conflicts:
#	README.md
#	docs/release-1.0-criteria.md
#	docs/supported-profile.md
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Automated review (Claude Code review agent, run by the maintainer). Verdict: ready to merge after these changes.

  • Should-fix, fixed: a column that no clean pair joins skipped the check for a cut slab across its end, and fell back to empty partners where they couldn't be read. Such a column (a Cut Geometry with no clean pair) is drawn as a mesh by RE-291's own mechanism. The check now runs on every column, and the partners must be read.
  • Should-fix, fixed: the type test was an open list of names to reject. An unrecognised I, T or channel type holding b, h, tw and tf would have been given b times h. A type's length parameters must now be exactly {b} or {b, h}, the two sets the office's types hold.
  • Nits, fixed: the wording now says "on the office" and Revit 2024, and the partners() comment says what the code does.
  • Measure 41203821396 on the head (unfiltered, held-out models included):
    • 199 columns are kept as built and 265 at permit.
    • 0 of the 18 meshed permit columns get any of the five quantities, and Length is unchanged (a joined column's Length stays out, W7: the round column and the meshed columns' values, and the section check on box-drawn columns #1203).
    • The office goes from 28,329 to 29,125 equal as built and from 28,254 to 29,314 at permit.
    • The one different value (a mullion's) is unchanged, and so is "rvt-rs quantities Revit does not write", 0. The held-out counts equal main's.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 31, 2026 13:30
# Conflicts:
#	README.md
#	docs/release-1.0-criteria.md
#	docs/supported-profile.md
#	src/ifc/export_content.rs
@DrunkOnJava
DrunkOnJava merged commit 5d863fb into main Oct 31, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1046-column-areas-volumes branch October 31, 2026 13:39
DrunkOnJava added a commit that referenced this pull request Oct 31, 2026
…rs writes that Revit's export does not (#1046) (#1222)

## Summary

The held-out models' Measure results (`holdout-*/counts.txt`) report how
many quantities rvt-rs writes that Revit's export does not (the strict
W7 count), but not which quantity. This keeps one count line per
quantity name, `extra Qto_X.Y: N`, and nothing else from that section.

## Motivation

[#1046](#1046), W7: the
count was 2 on the AA house and 3 on teste_export_2025 with no way to
tell which rule wrote them. The scorer lists the objects under each
quantity (ElementIds); the scrub keeps only the standard quantity name
and the number, so the held-out models' scrub policy (counts only, never
an ElementId or a name) is unchanged.

## Changes

- `tools/ci/scrub-holdout-results.sh`: one awk step after the quantity
census's `different` lines, reading the scorer's "rvt-rs quantities
Revit does not write:" section and printing `extra Qto_<Set>.<Property>:
<count>` for lines of exactly that shape; the header comment names what
is kept.

## Testing

N/A for unit tests (banned). Measure run
[41182558730](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41182558730)
on this change (`-f models="holdout-*" -f scorers=qtos_vs_ifc`) kept,
for the three held-out models, only these lines beyond the existing
ones:

```
holdout-AA-SingleDwellingHouse-RVT-CIADD: extra Qto_SlabBaseQuantities.Width: 2
holdout-teste_export_2025: extra Qto_CoveringBaseQuantities.Width: 3
holdout-modelo_bim: (none; 0 quantities Revit does not write)
```

- [x] Verified end to end on the real held-out files in Measure; the
output above is the scrubbed artifact
- [x] No ElementId, name or per-object line is kept (the awk pattern
only matches ` Qto_<letters>.<letters>: <digits>`)
- [x] Not an exporter change: no witness refresh
- [x] No user-visible change, so no changelog fragment

## What the counts show

Not caused by this PR, and not by the base-quantity PRs #1204, #1205 or
#1206 (their runs add none on any held-out model). On `main` at 1a54a8f
(the code of run 41182558730, with this branch's scrub), rvt-rs writes a
slab `Width` where Revit's export omits it on 2 slabs of the AA house,
and a covering `Width` where Revit omits it on 3 coverings of
teste_export_2025. By the quantity names these are the slab `Width` rule
(RE-295: a type with more than one layer) and the covering `Width` rules
(RE-250, extended by RE-297 to ceilings of several pieces and to walls
Revit exports as coverings); the earlier held-out runs on older `main`
heads showed 2 and 0, so the 3 on teste_export_2025 arrived with a
recent landing. Strict W7 says none is written, so the rule behind each
needs narrowing; that is the spaces, coverings and slabs lane, and this
PR only makes the quantity visible.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
DrunkOnJava added a commit that referenced this pull request Oct 31, 2026
… the open list drops the two W7 issues that closed (#1230)

The W7 figures in `docs/release-1.0-criteria.md` and the README,
refreshed from Measure runs on `main` at `f9f71e68`, after the W7
changes that landed today (#1204, #1206, #1215, #1223, #1225, #1226).

- **Quantities**
([41213779326](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41213779326),
unfiltered): office as built, 29,262 of 39,388 equal (was 29,223), 1
different, 10,125 missing (was 10,164), none written that Revit's export
leaves out. The +39 are #1215's flat-roof slab quantities.
- **Properties**
([41215480967](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41215480967),
with `--revit-set-placement`, as W7 is measured): as built 289 of 45,525
missing (was 455) and 1 different; at permit 292 of 45,704 (was 452).
Without the option, 1,361 and 1,364 (was 1,421 and 1,418). The earlier
figures stay, as the previous run.
- **Values rvt-rs writes that Revit's export does not**: 10 as built and
14 at permit, the same in every run back to `5d863fba`. The page now
says what they are.
- All but one are on elements Revit's export leaves out: openings, and
at permit a column (RE-239, #792).
- The one, a sanitary terminal's
`Pset_SanitaryTerminalTypeCommon.Reference`, follows from fixture
3095244's class. Revit's export writes it as `IfcFlowTerminal`, rvt-rs
as `IfcSanitaryTerminal` (#792, found from `class_sets_vs_ifc` in the
same run).
- **README, from the same two runs:**
- The IsExternal row is now 2,198 of 2,334 as built and 2,206 of 2,319
at permit, none different. Of the 136 and 113 values missing, all but
one are on type objects; the other is on the building.
- The set-placement row gains 1,072 values, not 966. That adds the 122
stair-flight values from RE-287.
- **The open list** dropped #1186 and #1187, which closed when RE-287
and RE-288 landed.
- `docs/archive/TODO.md`'s two links to `docs/status.md` and
`docs/support-matrix.json` were relative to the wrong folder.

No changelog fragment (no user-visible change).
DrunkOnJava added a commit that referenced this pull request Nov 6, 2026
…s CrossSectionArea and NetVolume (#1203) (RE-353) (#1477)

Refs #1203. Figures from the unfiltered run 42130190386 at 35cfd89,
which holds every limit below.

## Summary

- A box-drawn column that one slab cuts across its top (a `CutPairGStep`
names the slab, a clean pair joins the column to the same slab, the
slab's span starts inside the column and reaches its top) gets the
quantities Revit's export writes on the 18 meshed columns of the BIM4LCA
office at building permit: `NetVolume`, the volume of the box less the
part of the slab inside it, and `CrossSectionArea`, half the surface of
that cut box, where every edge of the slab inside the section runs
parallel to a side of it (`NetVolume` alone otherwise). 17 of the 18 are
written equal (run 42130190386, as at 223968a before the limits); the
18th, whose cut pairs name a wall that only touches it, is left out.
- A round column no pair joins gets its `OuterSurfaceArea`, the
circumference times its height, where its type's named lengths are
`Diameter`, equal to both sides of its box, and at most the family's
`Offset Base` and `Offset Top`, each exactly 0 (any other named length
leaves it out). That is one column on each of the two office files, the
same column, taken as round from the caption `Diameter` alone. Its
`CrossSectionArea`, `GrossVolume` and `NetVolume` stay out: they are not
the circle's (RE-353 section 4). The type's named lengths are those
three, not `Diameter` alone as RE-291 took them to be (probe run
42121438036); RE-291 is corrected here.
- #1203's status line says the check that a box-drawn column's type
holds a `b` (and `h`) equal to its box's sides is not implemented. It
is: `rectangular_section` and `fills_section` have required it since
#1204 (RE-291 section 3), and 13 and 15 unjoined columns are written
through it.

## Limits of the rules (the second read's findings)

- The slab must be one exported extrusion whose profile was set (a floor
whose sketch was not read is its record box), flat as the wall pass
knows it (`SlabTop::Flat`: record read, no shape edit moves its top: a
sloped floor's underside is not its base), and the same slab a clean
pair joins to the column. Any other slab across the column's top, joined
by a clean pair, must have no plan area in the section.
- Half the surface is measured only on meshes whose every face is
parallel to a side of the section, which cannot tell it from another
one-sided area on an oblique face; `CrossSectionArea` is written only
where every edge of the slab inside the section is parallel to a side
(1e-6 in the sine of the angle), `NetVolume`, exact geometry, either
way. RE-353 section 3 states the limit.
- Both rules read Revit 2024 only (`NEW_RULE_REVIT_VERSIONS`): the
office is the only file either is measured on, and `samples=true`'s
verdict does not compare column quantities, so a later release is not
opened by a run that cannot see it. The existing RE-291 rule keeps the
releases it read. A column RE-178 trimmed (its body is cut though its
source says record box) is left out. On Revit 2024 a floor's shaft is
cut from its outline, so a floor with a shaft has its true outline; the
later releases that export it whole are not read.
- The plan geometry reuses `body_geometry` (`plan_outline`, `Placement`,
`clip_ring_to_band`, `signed_area`, now `pub(crate)`) instead of a copy.

## Motivation

#1203 items 2 and 3. revit-ifc
(`PropertyUtil.CreateBeamColumnBaseQuantities`, IFC_v24.3.40,
CLEANROOM.md source 5) was read and cited, and no code was copied or
translated: its column quantities take `Length`, `OuterSurfaceArea` and
`GrossVolume` from the extrusion its exporter finds and, where there is
none, `CrossSectionArea` from the element's computed area parameter and
`NetVolume` from its computed volume. Measured on Revit's own export of
the office at permit, all 18 meshed columns have exactly those two
quantities, the volume is the mesh's and the area is half the mesh's
surface (RE-353 section 2).

## Changes

- `src/ifc/export_content/column_quantities.rs`: the column's cut pairs
are assessed as before, and one slab across the top is now a third
outcome beside clear and refused; the slab's plan region (outline and
voids) is clipped to the column's section; the limits above. A round
column's `OuterSurfaceArea`.
- `src/research/partition_type_parameters.rs`,
`partition_schema_mvp.rs`, `partition_schema_mvp/{fields,framing}.rs`,
`src/ifc/export_content.rs`, `src/ifc/body_geometry.rs` (one
visibility): the round section a column type holds and the file's
release, queued for the pass, and the floors' known tops.
- `probes/examples/probe_re353_column_cut_footprints.rs`,
`probe_re353_round_column.rs`;
`reports/element-framing/RE-353-cut-columns-and-the-round-column.md`
(and RE-291's correction), the changelog fragment, the addendum to
`docs/format-reconnaissance.md`, the criteria page's entries and
`docs/contribution-map.md`'s #1203 line.

## Testing

Unfiltered Measure run 42130190386 (head 35cfd89 against `main` at
8060ecc; `-f base=main -f nordic=true -f r2025=true -f holdout=true -f
samples=true`, every scorer, `qtos_vs_ifc` and `psets_vs_ifc` with
`--revit-set-placement`; the office as built and at permit, the 18
held-out models, the 24 R2025 models, the four RE1 models, Core
Interior, Einhoven and the sample projects):

- office at permit: equal 30,002 to 30,037 (`CrossSectionArea` 320 to
337 and `NetVolume` 265 to 282 of 345, `OuterSurfaceArea` 320 to 321 of
327); as built 29,760 to 29,761 (`OuterSurfaceArea` 278 to 279 of 279).
**17 columns stay**, the same count as at 223968a before the limits;
- different stays 1 and quantities Revit does not write stay 0 on both;
the property census is identical on both files;
- every other scorer output of every model (the 18 held-out models', the
24 R2025 models', the four RE1 models') is `main`'s, and the IFC sha256
of Core Interior, Einhoven, RE1 Architecture, the 18 held-out models and
108 of the 111 exports is `main`'s. The three that moved are the two
office files and `sample-2024-snowdon_towers_sample_architectural`
(Revit 2024), whose IFC is 136 bytes longer with the same entity total
(40,945) and diagnostics. Run 42135731462 (filtered, head f60e0d3,
`keep_ifc=true`) kept its IFCs: the 136 bytes are the `OuterSurfaceArea`
of its 2 round columns, which are all the round columns it has (RE-353
section 5.1). Revit's IFC4 export of the sample holds no base quantities
at all (0 `IfcElementQuantity`; RE-242), so the 2 values are counted
apart, not scored equal, different or extra; Revit's own extrusion of
each column (outer perimeter times depth) gives rvt-rs's value to 2.4e-7
and 1.5e-7 m², which checks the rule's inputs and not a value Revit
wrote;
- the `same-project gates` check passes on 35cfd89 (it does not compare
column quantities).

Files that exercise the rules: the cut-column rule, the office at permit
alone (17 columns, scored equal); the round-column rule, the office as
built (1 column) and at permit (the same column), both scored equal, and
Snowdon Towers Architectural (2 columns, not scored against a value). No
other model of the run has a column either rule takes.

Not measured: that the 17 are the columns the rule is meant to keep, by
tag (the scorer counts); and the rules' generality, since the held-out
models hold no column either rule takes. The branch now also holds the
merge of `main` at daf3610 (CI files only) and the figures.
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