Skip to content

feat(re): the mesh body scorer reads a round section's volume against Revit's inscribed end faces and the faces its export writes twice (#1658) (RE-397) - #1662

Merged
DrunkOnJava merged 5 commits into
mainfrom
feat/round-section-volumes
Nov 10, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
feat/round-section-volumes

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

mesh_bodies_vs_ifc.py reads a body whose volume is outside 1% of Revit's shell by shell (tools/re/volume_readings.py), so a difference that is Revit's way of writing a body is told from one that is wrong: a round section drawn as a polygon inscribed in rvt-rs's circle, and a body written with every face twice. Scorer only: no export moves, the class table is unchanged, and a shell readings: line and reading rows follow it.

Motivation

#1658. RE-397 section 5.2 found that Revit's export draws a round section as an inscribed polygon with few corners, which the volume bar reads as a difference (a hexagon is 1.1989 in volume), and a row pre-registered on #1636 was missed for that reason alone. Reading the first Measure of this reading, the roofs, slabs and ramp flights that read exactly 0.5000 turned out to be another way Revit's export differs: it writes them with every face twice, in the same winding, so the mesh's volume is twice the body's.

Changes

  • tools/re/volume_readings.py (new): shells of a body, a cap (coplanar triangles joined through shared edges with one closed boundary loop), rvt-rs's circle and Revit's inscribed polygon, Revit's repeated triangles counted once, the reading of a pair of shells (equal, doubled, explained, other) and of a body. Numpy only.
  • tools/re/mesh_bodies_vs_ifc.py: read_shells prints the shell readings: line and the reading rows (the first 25 other, the first 5 of each other kind) after the outliers; a file with no outlier prints nothing new.
  • tools/ci/scrub-holdout-results.sh: lets the one shell readings: count line through for the models without a licence to redistribute, nothing else of the block (a reading row names a Tag and a type).
  • changelog.d/research/1658-shell-readings.md, and RE-397's report section 5.3 with the railings re-read beside the row as registered.

The reading, fixed before the runs (rows on #1658)

A shell pair is equal within 0.5% in volume. Otherwise it is explained when every end face of rvt-rs's that is a circle (at least 12 vertices within 0.001 ft of one radius) has a cap in Revit's inscribed in it (parallel, none beyond the radius plus 0.001 ft, at least 3 corners on the circle that surround its centre, the polygon through them the cap's area within 0.5%, every other vertex on an edge), the circles' area ratios agree within 0.5%, and the shell's volume ratio is within 2% of that ratio. It is doubled when its volume is rvt-rs's within 0.5% once Revit's repeated triangles count once, and every vertex of each is within 0.01 ft of the other's surface (a whole body is read so when its shells do not pair). Everything else, and every shell with no partner, is other; rvt-rs's own triangles are never dropped.

Testing

Unit tests are banned here and none is added. Measured on Revit's own exports (BIM4LCA office and housing, CC BY-SA 4.0, byte-range reads), with the rows registered before each run:

Row (registered on #1658) Result
First run, Measure 42912632182 (scorers a5f4a5b4): the housing timber's every outlying railing is explained, none other holds (16 explained; the 2 other are the roof KA-1 and the door UO-1)
The office's two KAI-3 railings are explained missed as registered: not read, since the reading was asked only of bodies with every vertex within 0.01 ft of the other's surface and theirs lie 0.0615 ft from Revit's
Every explained body is a round part with inscribed end faces holds (volume ratio 1.1985 to 1.1989 against an area ratio of 1.1989; 0.9643 against 0.9643)
KA-1 and UO-1 are other in the timber file as in the concrete one holds (VK-2 is not an outlier in the timber file: my registration was wrong that it is)
Second run, Measure 42914771157 (scorers 6d498b8b, the pre-filter lifted, the faces Revit's export holds twice read): the office's two KAI-3 railings are explained holds on all four office files (51 post shells, volume ratio 1.592 to 1.593 against an area ratio of 1.602)
Every body read at 0.5000 or 0.5010 is doubled holds: the housing's VK-2 and KA-1, VK-1.pelti; the office's ramp flights 1440596, 1385462, 1385641, 1385926 and 1387294 and the roof KA-2 (the 12 models; 8 to 40 triangles of Revit's repeat another per body)
The controls stay other: the housing's ramp flight 1347699 (0.4907, a vertex 3.2 ft away), the doors UO-1, O-7, UO-3 holds

Not registered, found: the two small KAI-5 railings of the office (0.980) are explained the other way round (14 or 15 shells at 0.9643, the end faces' area ratio: rvt-rs's circles have the fewer segments), so RE-397's "not located" is located; and the walls VS-2, VS-3, VS-11 of the office at permit and the IfcGeographicElement trees of the terrain files read other and are not touched here.

The scrub was run on a copy of the office permit's scorer file with RUNNER_TEMP set: it keeps the class rows and the one shell readings: line (23 lines) and drops every reading row.

Not measured

  • The held-out and fresh pairs: a scorer change after a held-out difference spends that pair, so no run with holdout=true was made; the scrub was checked on a public file as above.
  • The thresholds (0.5%, 2%, 0.001 ft, 12 vertices) were set on the housing concrete as built and judged on the other 11 files; a part whose section is not a circle (an ellipse, a rounded rectangle) has no circle and reads other, and a body read doubled is held to the vertex bar of 0.01 ft but not to its shape beyond it.
  • RE1 Architecture's railing (1.0175) and Autodesk's samples were not in the runs.

Reproduce

gh workflow run measure.yml --ref feat/round-section-volumes -f ref=5dd1277dcb96375ef54ceb6bed152a36fcb3eb4b -f base=none \
  -f nordic=true -f models="nordic-*" -f scorers=mesh_bodies_vs_ifc

(--ref names the branch for the scorers; use its commit 6d498b8b to read the second run, the code is main at 5dd1277d.) The shell readings: line and the reading rows are in each model's mesh_bodies_vs_ifc.txt.

Audit-honesty checklist

  • The README and the docs claim nothing this PR does not ship; no capability changes
  • The fragment is under changelog.d/research/
  • No emojis, no private paths, no personal addresses
  • A reverse-engineering finding (Revit's repeated faces) has its probe in the scorer itself and its measured counts above; it is not a format-decoding finding and adds no docs/format-reconnaissance.md entry

Legal and contribution hygiene

  • Apache-2.0; no Autodesk source, decompiled internals or NDA content (the scorer reads Revit's published IFC exports)
  • No fixtures added

Breaking changes

None. A scorer file gains lines after the class table.

Closes #1658

… Revit's inscribed end faces, shell by shell, so a body that differs only by the polygon is told from one that is wrong (#1658) (RE-397)
…also reads the faces Revit's export holds twice, so the roofs and ramps that read exactly half are told from a body that is wrong (#1658) (RE-397)
… with the scorer of #1658, beside the row as registered (#1658) (RE-397)
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.

Scorers: mesh_bodies_vs_ifc reads the tessellation of a round section as a difference of volume; Revit's export draws it as an inscribed polygon

1 participant