Skip to content

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

Closed

Description

@DrunkOnJava

What

tools/re/mesh_bodies_vs_ifc.py compares each body drawn from a saved mesh with Revit's export by volume (and by vertices in both directions). On a round section the two disagree by construction: Revit's export draws a round section as a polygon inscribed in the circle with few corners, and the saved mesh draws the circle with more (RE-397 section 5.2).

  • The BIM4LCA housing's 30 mm round rails: Revit's end face is 24 vertices, 6 of them the corners of a regular hexagon inscribed in the circle of rvt-rs's 32-gon (areas 0.00629 and 0.00754 ft2); every shell that differs reads 1.198 to 1.200 of Revit's volume, and every other shell of the railing is Revit's to 4 digits. 12 of 43 and 16 of 56 railings of the housing's large files read outside 1%.
  • The office's KAI-3 posts: Revit's cap is a quadrilateral inscribed in the saved cylinder's circle (4 corners at 0.164 ft, the saved radius, and 20 vertices on the chords); the posts read 1.59 of Revit's volume and the two railings 1.195 and 1.198.

The vertices bar (each export's vertices within 0.01 ft of the other's surface) holds on all of them; the volume bar does not, and a row pre-registered on #1636 (RE-397) was missed for that reason alone.

Done when

The scorer says, per shell, whether Revit's end face is a polygon inscribed in rvt-rs's circle (its corners on the circle within 0.001 ft, and its area the inscribed polygon's) and reads such a shell's volume against that area ratio, counting it apart from the shells that differ for another reason, so that a body that is wrong still reads wrong. Its own row on #1636 is pre-registered before the next measurement, and the RE-397 rows of the housing are re-read with it.

Related

#1636, #1635, #1652 (RE-397), RE-402.

Activity

  1. added
    area:ci
    priority:P3
    type:ci
    on Nov 10, 2026
  2. DrunkOnJava commented on Nov 10, 2026

    @DrunkOnJava
    OwnerAuthor

    Row registered before the first Measure of the scorer change (branch feat/round-section-volumes: tools/re/round_sections.py, tools/re/mesh_bodies_vs_ifc.py, the held-out scrub's allowlist).

    The reading, fixed before the run. A body whose volume is outside 1% of Revit's while every vertex of each lies within 0.01 ft of the other's surface is read shell by shell (a shell is a set of triangles joined through shared vertices). Shells are paired by the middle of their boxes (within 0.05 ft plus 1% of the shell's diagonal), the nearest in volume first. A pair is equal when the volume ratio is within 0.5% of 1. Otherwise: a cap is a set of coplanar triangles joined through shared edges whose boundary is one closed loop; rvt-rs's cap is a circle when it has at least 12 vertices within 0.001 ft of one radius; Revit's cap is inscribed in it when it is parallel and within the circle's radius, none of its vertices is beyond the radius plus 0.001 ft, at least 3 lie on the circle within 0.001 ft and surround its centre, the polygon through them has the cap's area within 0.5%, and every other vertex lies on one of the polygon's edges within 0.001 ft. A pair is explained when every circle of rvt-rs's shell has such a cap in Revit's, the area ratios agree within 0.5%, and the shell's volume ratio is within 2% of the area ratio. Everything else, and every shell with no partner, is other: a body that is wrong still reads wrong.

    What it was developed on (so these are not predictions). The BIM4LCA housing concrete as built, rvt-rs's export at 0e64354c against Revit's own: the 12 railings that read outside 1% there (KJO-1 x4, KJO-2 x4, KAI-7 x2, KAI-8 x2) read explained, every differing shell at a volume ratio of 1.1985 to 1.1989 against an end-face area ratio of 1.1989, and the controls it must not explain stay other: the roofs VK-2 (0.5000) and KA-1 (0.5010), the door UO-1 (a shell Revit's export does not have), and the ramp flight is not read at all (a vertex 3.2 ft from the other's surface).

    The row, on files it was not developed on.

    1. The housing timber as built (Measure): every railing the scorer's volume bar puts outside 1% (16 of its 56) reads explained, and none reads other.
    2. The office as built and at building permit (Measure): the two KAI-3 railings (2614259 and 2618205) read explained, their post shells at a volume ratio within 2% of the end-face area ratio.
    3. On every model of the run, a body is explained only when it is a round part with the end faces above; the first five of each file are listed by the scorer and I check them against Revit's export. A body read explained that has no inscribed end face in the export is a failure of the reading.
    4. The housing's roofs VK-2 and KA-1 and the door UO-1 read other in the timber file as in the concrete one (they are there too).

    The row fails if any of the four does not hold, and it is reported as registered. The RE-397 housing rows on #1636 (31 of 43 and 40 of 56 within 2%) are then re-read with this reading and the number printed beside the old one.

  3. DrunkOnJava commented on Nov 10, 2026

    @DrunkOnJava
    OwnerAuthor

    First measurement, as registered above (Measure 42912632182: the scorers of feat/round-section-volumes at a5f4a5b4, the code of main at fcdc9de8, the 12 BIM4LCA models).

    1. Housing timber as built: holds. 18 volume outliers are read; 16 read explained, and the 2 that read other are the roof KA-1 and the door UO-1, not railings. The permit file is the same.
    2. KAI-3 posts on the office as built and at permit: missed as registered. The two railings are not read at all: the reading was asked only of bodies with every vertex within 0.01 ft of the other's surface, and the KAI-3 railings' vertices lie 0.0615 ft from Revit's (a quadrilateral's sagitta on a 0.164 ft circle is 0.29 R). The pre-filter was mine and it is not needed: a shell is explained only by the end-face test, which holds a vertex to 0.001 ft.
    3. Every explained body is a railing whose shells' volume ratio equals the end-face area ratio to four digits (1.1985 to 1.1989 against 1.1989; 0.9643 against 0.9643). Holds.
    4. The roof KA-1 and the door UO-1 read other in the timber file as in the concrete one. Holds. The roof VK-2 is not an outlier in the timber file at all: my registration was wrong that it is there.

    Found, not registered. (a) The two small KAI-5 railings of the office (0.980, "2% under, not located" in RE-397) read explained: 14 and 15 shells at a volume ratio of 0.9643, the end-face area ratio, so there rvt-rs draws its circles with fewer segments than Revit's polygons have and the difference runs the other way. (b) Every roof, slab and ramp flight that reads exactly 0.5000 (the housing's VK-2, KA-1 at 0.5010, VK-1.pelti; the office's ramp flights AP-ulkoluiska and AP-ajoramppi, in 11 of the 12 files) read other, and on the two I opened Revit's export holds every face twice in the same winding: VK-2 is 24 triangles of which 12 are distinct (the volume of the distinct ones, 24.8569, is rvt-rs's 24.8568), KA-1 is 80 of which 40 (31.6136 against 31.6778).

    Amendments, made before the second measurement (feat/round-section-volumes, the module renamed volume_readings.py, the line shell readings:): the pre-filter is lifted for the round reading; a shell of Revit's counts each repeated triangle once, and a shell or a whole body whose volume is then rvt-rs's within 0.5% is doubled (explained), provided every vertex of each is within 0.01 ft of the other's surface, since a volume says nothing of shape; rvt-rs's own triangles are never dropped.

    Rows for the second measurement, registered now.

    • S2'. The office as built and at permit: the two KAI-3 railings (2614259 and 2618205) read explained, their post shells at a volume ratio within 2% of the end-face area ratio.
    • S5. In the 12 BIM4LCA models, every body the volume bar reads at 0.5000 or 0.5010 reads doubled: the housing's VK-2 (concrete as built and permit), KA-1 (concrete and timber, as built and permit) and VK-1.pelti (terrain timber); the office's ramp flights 1440596 (as built, permit, timber as built, timber permit), 1385462, 1385641, 1385926 and 1387294 (terrain concrete and timber) and the roof 3067686 (timber as built and permit). None stays other. (VK-2 and KA-1 on the concrete as built were seen while this was written; the rest were not.)
    • S6, controls. The housing's ramp flight 1347699 (0.4907, a vertex 3.2 ft from Revit's surface, 26 more shells in Revit's) and the door UO-1 (a shell rvt-rs draws that Revit's export does not) stay other; so do the doors O-7 and UO-3 of the office (the same extra shell).

    The row fails if any of these does not hold, and it is reported as registered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cipriority:P3type:ci

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions