Skip to content

feat(ifc): a column whose mesh is a vertical prism gets the Length, CrossSectionArea, OuterSurfaceArea and GrossVolume Revit's extrusion gives it (#1203) (RE-424) - #1708

Merged
DrunkOnJava merged 6 commits into
mainfrom
feat/1016-column-quantities
Nov 11, 2026
Merged

DrunkOnJava merged 6 commits into
mainfrom
feat/1016-column-quantities

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

A column Revit's export draws as an extrusion holds four base quantities in Qto_ColumnBaseQuantities (Length, CrossSectionArea, OuterSurfaceArea, GrossVolume) that are the sums of the prism's faces: the extrusion's depth, the area of one end, the lateral area, the volume. rvt-rs wrote them for only some columns (the box rule, RE-291). A column drawn from the mesh Revit saved for it now gets them where that mesh is one closed solid of flat faces with no hole through it, a prism along the vertical with two flat, square ends of one area whose volume is the end area times its extent: RE-423's rule for a beam, with the axis the vertical. They are written where the column's set holds none of CrossSectionArea, OuterSurfaceArea and GrossVolume (all four) or all three (the Length); no value a column holds is replaced, and no body or NetVolume changes.

On the BIM4LCA timber office as built they read equal to Revit's on 340 of 344 CrossSectionArea (from 60), 339 of 339 OuterSurfaceArea (from 59), 338 of 339 GrossVolume (from 58) and 339 of 339 Length (from 203), at permit on 336 of 340, 335 of 335, 334 of 335 and 333 of 335; the concrete office at permit gains the four on 6 columns, each of the housing's six files on 1 to 3 columns, and a held-out Revit 2023 model on 4 of its 4 extruded columns. 2,022 values on 580 columns of 10 files, none different, none Revit omits. The 18 cut columns (Revit writes CrossSectionArea alone on them) get nothing, which the vertical axis alone separates.

Refs #1203 and #1016, neither closed: #1203 keeps the check of box-drawn columns' types and #1016 is W7's umbrella. The residual is filed as #1705 (the housing's box-drawn columns, whose box equals Revit's on 46 of 50 and 4 of 4).

Motivation

#1203 (the meshed columns' values), #1016 (W7's quantities), #1636 (second-project measurement); follows RE-423 (beams), RE-291 and RE-353 (the box rule and the cut columns), RE-387 and RE-416 (a column mesh's volume). The report also corrects one number in RE-423's (the controls read 1.01, 0.99, 1.00 and 1.00, not 1.00), which rvtReview found on #1702. The rows were registered on #1636 before the scorer's run was read: #1636 (comment) (points 1 to 5) and #1636 (comment) (points 6 to 9, the change), and the results are read against them at #1636 (comment).

Changes

  • src/ifc/mesh_volume.rs: longest_flat_prism (the body of beam_quantities, which still gives the beam what it gave) and column_quantities, which takes its result when the axis is the vertical (cosine at least 0.9999). Five pure-helper tests of how it fails: a box lying down or wider than it is tall, a slanted beam, a mesh that is not one closed solid, a section of many planes and no triangles, and a column standing on its end as the case it accepts.
  • src/ifc/saved_meshes.rs: the pass reads column_quantities where it reads each column's mesh, and add_column_quantities writes the four into the column's Qto_ColumnBaseQuantities where its set holds none of the three or all three. It adds no element to the pass's selection.
  • tools/re/column_quantities_vs_ifc.py (Revit's quantities against the prism of rvt-rs's own body, per Revit set and body source) and tools/re/column_added_quantities.py (what one export adds to another's, against the rule).
  • Report RE-424, a changelog fragment, the release criteria's W7 entry and a docs/format-reconnaissance.md addendum.

Testing

Measured end to end on the Measure runner (no local builds here; CI builds and runs the pure helpers' tests); the helpers compile and pass in a rustc stub harness here:

  • unfiltered run 42980794133 (head cc0e59a2, kept under refs/archive/2026-11-11/cited/cc0e59a2d896, against main at 16411282, every flag and timing, 126 models each side): 109 exports byte-identical and 17 move, the housing's six files, the office's three, the held-out modelo_bim and 7 Autodesk samples; no line of qtos_vs_ifc or psets_vs_ifc of any model gains a different or a value Revit does not write; the body_sources of the 101 models that report them are identical; same-project gates pass;
  • run 42980805331, both sides' exports of the samples: tools/re/ifc_element_diff.py finds only IfcColumn changing, only by quantities added, on 44 columns of 7 samples; tools/re/column_added_quantities.py reads every added value of those 44 as the rule's value of the column's own mesh (44 of 44, Length on 31), and finds no column the rule accepts and the pass reads left without them in the 49 unmoved samples that hold columns (the 14 in Snowdon Towers Architectural are meshes of two or three closed pieces, which the pass refuses);
  • scorer run 42986667074 (tools/re/column_quantities_vs_ifc.py, both sides): the rule is right on every column the pass reads, refuses the 18 cut columns by their axis, and what it would still add on the timber office reads 0;
  • timing: 64 files of run 42980794133 read 0.98 to 1.04 in time (the 30 samples of 2015 to 2022, which the pass cannot read, read 0.98 to 1.02 in the same run) and 1.00 to 1.04 in peak memory (Core Interior's 437 and 453 MiB, in either order in RE-423's run too); the BIM4LCA files, 42980801971, read 0.99 to 1.03 and 1.00; against main with fix(research): the saved-mesh pass cuts its batches by the body bytes of the symbols they read, sized before any is decoded (#1694) #1701 and the head merged with it, runs 42987678966 and 42987682914: the ten BIM4LCA files read 0.99 to 1.02 in time and 0.99 to 1.00 in peak memory, the 64 files 0.94 to 1.10 and 0.97 to 1.01 (the 30 samples of 2015 to 2022 read 0.94 to 1.06); pooled, the 7 samples that move read +2.2% against +0.6% for those 30, which is two files (Snowdon Towers Architectural's 28 s and rst_basic 2026's 1.1 s), and whether any of it is the change's is not established.

Two rows registered on #1636 are missed as worded, and the report says so: row 7's "held-out models' counts do not move" (modelo_bim's column lines gain 16 equal, no different) and row 8's "0.99 to 1.01" (the runs' own noise is wider, and the files the pass cannot read show it).

  • tools/check-local.sh: not run locally (no local builds here); CI builds and tests it
  • Verified end to end on real Revit files: the runs above
  • If this touches the IFC exporter: the runs above, and the report states what it does not touch (cut columns, round and hollow columns, box-drawn columns, bodies)

Audit-honesty checklist

  • Docs state only what ships (the criteria entry, the addendum, the fragment and the report describe this change)
  • Changelog fragment under changelog.d/added/
  • Limitations in the report: one project with a Revit export (the BIM4LCA office and housing, Revit 2024); the 44 sample columns are read, not scored; the cut, round, hollow and box-drawn columns get none
  • No emojis, no private paths

Legal and contribution hygiene

  • Apache-2.0; revit-ifc's CreateBeamColumnBaseQuantities cited by file and function as RE-353 read it (CLEANROOM.md source 5), none of its code copied
  • No Autodesk proprietary source, decompiled internals or NDA'd SDK content

Breaking changes

None: no public type or signature changes; a column's export gains quantities it did not write.

…rossSectionArea, OuterSurfaceArea and GrossVolume Revit's extrusion gives it (#1016) (RE-424)
…takes the vertical to the saved-mesh pass's cosine, and a second scorer reads what one export adds to a column's quantities (#1016) (RE-424)
…sm its saved mesh is along the vertical (#1203) (RE-424)
…-check, and corrects RE-423's controls (#1203) (RE-424)
@DrunkOnJava
DrunkOnJava merged commit acee45d into main Nov 11, 2026
36 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/1016-column-quantities branch November 11, 2026 09:43
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.

W7: the round column and the meshed columns' values, and the section check on box-drawn columns

1 participant