Skip to content

probe(probes): count turned columns and set the section the export draws, as drawn and turned, against the saved mesh (#2096) - #2097

Draft
DrunkOnJava wants to merge 3 commits into
mainfrom
research/2096-turned-columns
Draft

DrunkOnJava wants to merge 3 commits into
mainfrom
research/2096-turned-columns

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

A probe for #2096: it counts the columns turned off the model's axes and, for each column the export draws from its type's section, sets that section, as drawn today and turned by the column's own transform, against the column's saved mesh in the same file. Probe only; no export changes.

Motivation

#2096 was read from the code: a column whose body is not its saved mesh is drawn as its section square to the model's axes, because no reader gives a column its instance's plan axis. No open model was known to have a turned column, so nothing has measured it. A column's saved mesh is drawn turned as Revit draws it, so on any file where a column has both, the mesh is the answer the section should give, with no Revit export needed.

Changes

  • probes/examples/probe_2096_turned_columns.rs: per column, the instance transform's plan angle (aligned, quarter, oblique), the export's rotation, the section kind (rectangle, box where the drawn rectangle equals the record box, circle, outline, other), and, where the saved graphics mesh whole, the farthest corner of the section from the mesh hull's nearest vertex, as drawn (drawn) and turned about its centre by the column's angle less the export's rotation (turned, the outline the fix would draw); tallies per turn and section kind.

Testing

Rows, registered before the run is read. One Measure run of this head with the probe, every model (nordic, r2025, samples), no scorer.

  1. The probe runs. It exits 0 on every model and prints a file line and a column line for every IfcColumn the section path draws.
  2. The comparison is sound on columns that are not turned. Of aligned columns with a mesh and a box or rectangle section, at least 90 in 100 have drawn within 0.01 ft. If fewer do, the mesh hull is not a fair answer key (tapered or composite columns, a section placed off the mesh) and rows 3 and 4 are read only after that is understood.
  3. The defect is real where columns are turned. Of oblique columns more than 2 degrees from the nearest multiple of 90 degrees (by angle), with a rectangle section and a mesh, every one has drawn over 0.01 ft: a 1 ft column needs about 0.8 degrees before a corner moves 0.01 ft, so columns closer than 2 degrees are reported apart, not held to this row. The same for quarter columns labelled rectangle.
  4. Turning the section is the fix. Of the columns in row 3, at least 90 in 100 have turned within 0.01 ft. If so, the next commit gives columns their instance's plan axis and draws the section turned, measured with a full Measure run against main. If not, the reasons are counted first. Where no column falls in row 3, rows 3 and 4 are unexercised, not passed.
  5. As they come. How many columns are turned on each model, and from which source each is drawn. box means the drawn rectangle equals the record box's plan rectangle: on oblique columns that is the record-box fallback, which Columns turned off the model's axes are drawn unturned: at their section's size, or too big where only the record box is known (read from the code, unmeasured) #2096 says is too big rather than turned wrong, but on aligned and square quarter columns a section that equals the box is labelled box too, so there it is not told from a section.

Amended before the run was read (rows 2, 3 and 5, on review of the probe's labels and angles): row 2 counts box sections with rectangle ones, since an aligned column's section equals its record box and the probe labels it box; row 3 holds only columns more than 2 degrees from the nearest multiple of 90 degrees, and its quarter clause takes the columns labelled rectangle; rows 3 and 4 pass on no empty set; row 5 says what box covers. The run reads commit 90fc9b23; 88df326f after it changes only the probe's doc comment.

Audit-honesty checklist

  • Probe only: no README, docs or changelog change. The fix, if row 4 holds, comes with its own entry.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk proprietary source (CLEANROOM.md). The probe prints ElementIds, angles and distances in feet only.

Breaking changes

None.

…ection the export draws for each, as drawn and turned by the column transform, against its saved mesh (#2096)
@DrunkOnJava

DrunkOnJava commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner Author

Corrected in a later comment: row 2's misses are columns whose mesh outline is not a rectangle (1,734 circle-like); on the 426 with a rectangular outline the answer key holds.

Rows 1 to 5, read on Measure 44511799400 (90fc9b23, 101 models: the BIM4LCA files, the Revit 2025 models, the reference models and Autodesk's samples of 2015 to 2027; no held-out model was in the run), against the rows as amended before the run was read.

  1. The probe runs: holds. All 101 models exit 0, with a file line and a column line for each column the section path draws. The saves of Revit 2015 to 2023 give no instance transform to the reader the probe uses, so their 3,002 columns have no angle and count in no row; 2015 to 2022 have no mesh either. Turns are read on Revit 2024 to 2027 only: 3,715 of the 3,805 columns there have a transform.
  2. The comparison is sound on columns that are not turned: fails. Of aligned columns with a mesh and a box or rectangle section, 598 of 2,399 have drawn within 0.01 ft, 25 in 100 against the 90 the row asked. 1,776 of the 1,801 misses sit in three sample projects: 170 of 176 on each rac_advanced save (2024 to 2027), 131 of 131 on each rme_basic and rme_advanced save, and 12 of 29 on each rst_basic save. The other 25: 5 on each timber housing file, 3 on each concrete housing file, 5 on Snowdon Towers Architectural and 1 on each BIM4LCA office file. On the offices the row holds: 184 of 185, 186 of 187, 70 of 71 and 79 of 80. So the mesh is a fair answer key on the offices' columns and not on those samples'. The probe prints no column dimensions or mesh outline, so why those samples' columns differ from their box (a column whose saved shape is not a rectangle, for one) is not read yet.
  3. Turned columns drawn as a rectangle: unexercised. Of the columns with a transform, 6 are more than 2 degrees from a multiple of 90, all on Snowdon Towers Structural (one at 97.5, one at 7.5 and four at -24.5 degrees). The export already turns all six: their rotation equals their angle, and the probe labels them other (not a rectangle, circle or outline). Read from the code, not measured: in the export's record-body code the one column route that sets a rotation is the I-section one, which draws an I-shape profile turned by the column's own angle; 108 columns in the run have other with a rotation set. No turned column on any of these files is drawn from a rectangular section or from its record box, and no quarter column is labelled rectangle. The 167 oblique columns of the BIM4LCA office as built are within 0.00001 degrees of 180, below the row's 2-degree floor.
  4. Turning the section is the fix: unexercised, as row 3 has no column.
  5. As they come.
    • Turned columns: Snowdon Towers Structural's 6 above, and 25 there at a quarter turn, also other.
    • Quarter-turned columns drawn as their record box: 149, 120 with a mesh. As drawn, 112 of the 120 are within 0.01 ft of the mesh (40 on each timber office file and 4 on each rme save; the 8 that miss are 2 on each rac_basic save): a column at a quarter turn has a record box that is its own footprint, so the box is already right. Turned a further 90 degrees, 80 of those 112 move off the mesh. So a fix must turn a type's section, never the record-box fallback.

What this means for #2096. Its code reading holds for columns drawn from a rectangular or hollow section or from the record box, but not for I-section columns, which already turn. On the 2024 to 2027 saves of every file Measure reads, no column falls in the case #2096 describes, so a fix cannot be checked on them. The one model known to have columns turned off its grid is the reporter's on #1839, a frame 4 degrees off; whether its columns take this route is what the outlines line of its S6 run will say. #2096 is corrected to say so. The fix waits for a file that has the case; row 2's sample misses are read first, so the answer key is understood before it is used.

…tline size, their centre offset and the outline corner count (#2096)
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

A correction to row 2 of my last comment. I wrote that the mesh is a fair answer key on the BIM4LCA offices' columns and not on three sample projects', and that why was not read. It is read now: the answer key holds on every column whose mesh outline is a rectangle, and 1,785 of the 1,801 misses are columns whose outline is not.

The probe now prints each column's section and mesh-outline sizes along the model's axes, how far their centres lie apart and how many corners the mesh's outline has (a235fa4f, run 44525639821, the same 101 models). Of the 2,399 aligned columns with a mesh and a box section (none of them is labelled rectangle), by the corners of the mesh's plan outline:

outline corners drawn within 0.01 ft over
4 426 0
5 to 8 172 16
9 to 88 0 1,785
  • 9 to 88 corners, circle-like: 1,734. The outline is centred on the drawn square, its extents equal the square's to within 0.01 ft, and the farthest corner misses by 0.204 to 0.209 of the width, as a circle in its square does (0.207): rac_advanced 2024 to 2027 (680), the rme saves (1,048), 4 on the BIM4LCA files and 2 on Snowdon Towers Architectural. Round columns are the kind W7: the round column and the meshed columns' values, and the section check on box-drawn columns #1203 and RE-411 measured on their saved meshes.
  • 9 to 88 corners, other: 51. 48 on rst_basic 2024 to 2027 (28 corners, the square's extents, centred, a miss of 0.072 of the width: a square with rounded corners rather than a circle), and 3 on Snowdon Towers Architectural (10 corners, a record box 2.22 ft deep against an outline 1.91 ft, centres 0.16 ft apart).
  • 8 corners: the 16 misses, on the BIM4LCA housing (5 on each timber file, 3 on each concrete one), not read yet.

So, restated for rectangular outlines, row 2 holds: 426 of 426. Two limits on that:

Rows 3 and 4 stand as posted: no column on these files is turned more than 2 degrees off a multiple of 90 and drawn from a rectangle, so they are unexercised.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

The 16 eight-cornered misses, read. These are the ones my row-2 correction listed as not read yet (run 44525639821, a235fa4f). The 16 lines are 7 distinct ElementIds, since as built and permit are saves of one project: six appear twice and one four times. On all 16:

  • the section is box;
  • the mesh outline's extents equal the section's to the four decimals printed, and its centre is 0.0000 ft from the section's;
  • drawn is exactly 0.049213 ft (15.0 mm).

drawn is one figure per column: the farthest that any corner of the drawn rectangle lies from the nearest vertex of the mesh's hull. So no drawn corner lies more than 15.0 mm from a hull vertex, and at least one lies exactly that far. The miss is at the corners.

That fits a chamfered column, a rectangle with its corners cut off. It is not shown corner by corner, and the 8 does not prove four cut corners: the one six-cornered column on the housing terrain files (1422262, in both saves) has drawn 0.000000 and the section's extents, so all four box corners are hull vertices and the count also takes in points along the sides.

file columns section
housing timber, as built 4, 1 200 × 200 mm, 380 × 380 mm
housing timber, permit 4, 1 200 × 200 mm, 280 × 500 mm
housing concrete, as built 3 380 × 380 mm
housing concrete, permit 1, 2 280 × 280 mm, 280 × 500 mm

For row 2 these stay misses. The box matches the outline's extents and centre, but the corner test cannot judge a column whose outline is not its box: it reports the cut corners, not whether the box sits where Revit's column does. That matters for #2096, since a turned column of this kind needs a check on its extents and centre rather than its corners.

This branch has not been deployed

No deployments
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