Skip to content

fix(saved-graphics): a parametric face takes its plane neighbour points along a crossing edge, so the two faces share one boundary (#2094) - #2098

Closed
DrunkOnJava wants to merge 4 commits into
mainfrom
fix/parametric-crossing-edge-points
Closed

DrunkOnJava wants to merge 4 commits into
mainfrom
fix/parametric-crossing-edge-points

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Status (2026-11-19): superseded by #2099; this change will not land. The runs registered below show that with this change the two faces still part along these edges, so the summary's last sentence does not hold; the results are in the comments. #2099 takes #2094's saved-points rule to surfaces of revolution and cones instead, with its own rows registered before its runs. This pull request is closed once #2099's runs are read.

Summary

Where a parametric face (a ruled surface, a surface of revolution, a cone) shares an edge with a plane, and that edge runs across both of the face's parameters, the plane's side of it is drawn through the points where the plane cuts the curved surface (refined_plane_edge, #1706), but the curved face's own side was drawn straight in its parameters between the edge's saved points. The two boundaries part by the edge's bow, leaving a crack in the body. This gives the curved face the same points, so the two faces share one boundary, as a cylinder already does.

Motivation

Found on #2094's timber-office stair flights. The probe probe_2094_edge_bow (branch research/2094-edge-bow) meshes the two flights as the export does and measures how far each face's open boundary lies from every other face (Measure 44520882600): on each flight, 196 of its 1,604 face-boundary vertices are more than 0.001 ft from every other face, up to 0.0029 ft. The eight farthest printed lie along the same line as the only two Revit vertices that miss rvt-rs's surface by more than 0.001 ft (x = 305.03), between 0.006 ft and about 0.6 ft from them (far_vertices_vs_ifc, Measure 44518424477). How many bodies on main hold such an edge, and how far their faces part, is row 4 below.

Changes

  • src/research/native_parametric_mesh.rs: loop_segments refines an edge the face shares with a plane, where the edge's samples change both of the face's parameters, with refine_crossing_edge_within against that plane, from the same saved samples the plane's side refines; shared_plane reads the neighbour's plane.
  • src/research/native_saved_mesh.rs: refine_crossing_edge_within, EdgeLimits, isoparametric_axis, unit_normal and the two limits are pub(crate) so the parametric mesher uses the plane side's own refinement.
  • probes/examples/probe_2098_face_cracks.rs: for every body with a plane-to-parametric edge that crosses both of the curved face's parameters, meshed as the export meshes it, how far each face's open boundary lies from the other faces, and its triangles.

Testing

Rows, registered before any run is read. This is the second amendment of the first registration, both before any run was read (Run B was dispatched, not read): rows 4 and 5 added, row 7's bar raised to what the refinement allows, rows 4 and 5 held to bodies meshed on both sides, row 8 qualified.

Run A, a full Measure of this head against its merge-base with main (nordic, r2025, samples, holdout):

  1. No scorer moves away from Revit. In mesh_bodies_vs_ifc, saved_meshes_vs_ifc, roof_bodies_vs_ifc and stair_bodies_vs_ifc, no class's "ref on ours", "0.001 ft" or "0.01 ft" count falls, and no body's volume moves out of a bin it was in. No psets_vs_ifc or qtos_vs_ifc line moves.
  2. Nothing newly refused. No refusal reason in any diagnostics.json rises; an edge that asks for more points than the refinement allows would show here.
  3. The same-project gates pass, and the held-out summary counts do not move.

Run A2, probe_2098_face_cracks on every model (nordic, r2025, samples; Autodesk's samples of Revit 2023 to 2027, since saves of 2015 to 2022 have no saved graphics to read), once on the merge-base with the probe alone (measure/2098-crack-base, d4910f7d) and once on this head, a smoke run of each first:

  1. The crack closes and opens nowhere else. Over the bodies meshed on both sides, the count of boundary vertices more than 0.001 ft from every other face falls, and no body gains one. (A plane face that does not go through refined_plane_edge, where refining only the curved side would open a gap, would show here.) No body meshed at the merge-base is refused at the head, and the number of models with a total line is the same on both sides. The merge-base run also says how many bodies on main hold such an edge at all.
  2. Triangles stay bounded. Refined points become grid knots of the curved face (Snowdon Towers Architectural: 6 roofs stay level blocks, 33% to 133% above Revit's volume, each with one decoder diagnostic (4 ruled-surface, 1 shared curved edge, 1 multi-loop cylinder) #1683). Over the bodies meshed on both sides, no body's triangles more than double, and their total rises by less than 10 per cent.
  3. As they come: which exports move, by model, from Run A; each should be on a model where Run A2 lists a body.

Run B, #2094's head with this change merged (research/2094-crossing, ce141397), on the BIM4LCA timber office files, with probe_2094_edge_bow, mesh_bodies_vs_ifc and stair_bodies_vs_ifc:

  1. The flights' faces meet: the probe's mesh check finds no boundary vertex more than 0.001 ft from another face on either flight. The refinement holds an edge's chords within 0.00025 ft of the edge, so the two sides can still part by about that much: the count over 0.0001 ft and the largest gap are reported as they come.
  2. feat(saved-graphics): a Hermite spline profile is read and drawn, and a plane meets such a ruled face along the edge's saved points (#2082) (#1191) (RE-311) (RE-492) #2094's row 3, read, not expected: on the four new flights, whether every vertex of Revit's body is within 0.001 ft of rvt-rs's surface. The two Revit vertices that miss lie in the flat face's plane, on the straight line between the edge's saved points, and this change does not move the flat face's boundary along that edge (its other edges take the curved face's new knots), so the row says what the change does there rather than predicting it.

Rows for a redesign lever, registered before its runs are read. On #2094's two timber-office flights, a different rule closed the crack completely (Run D, bd6f2305; results to follow on #2094). The rule: along an edge a plane shares with a spline ruled face, crossing both of its parameters, the plane keeps the edge's saved points and the ruled face's vertices between two of them go on the straight line between them. No boundary vertex of either flight is left more than 0.0001 ft from another face, against 179 and 180 over 0.001 ft with the plane alone moved.

Run E, probe_2098_face_cracks on the base and on the lever, on the models Run A2 read (nordic, r2025, samples), each after a smoke run, since nothing has compiled the probe on this base yet.

  1. The crack closes. Over the bodies meshed on both sides: the count of boundary vertices more than 0.001 ft from every other face falls, no body gains one, and the bodies left with none are counted. The 16 Snowdon Towers bodies, one shape drawn 16 times, are in the total and also reported apart.
  2. Nothing newly refused, as the probe sees it. No body meshed on the base is refused on the lever, and the same models print a total line. (The probe counts a body with any diagnostic as refused, so a face refused inside such a body shows only in row 13.)
  3. Triangles do not rise. The plane keeps fewer points and the curved face's vertices only move, so the total over the bodies meshed on both sides is expected not to rise.

Run F, a full Measure of the lever against 115d224a (nordic, r2025, samples, holdout, exports kept), dispatched only once Run E is read.

  1. No scorer count crosses a bar away from Revit. In mesh_bodies_vs_ifc, saved_meshes_vs_ifc, roof_bodies_vs_ifc and stair_bodies_vs_ifc, no class's "ref on ours", "0.001 ft" or "0.01 ft" count falls, and no body leaves a volume bin it was in; rises are reported too. No psets_vs_ifc or qtos_vs_ifc line moves.
  • What this can show is limited. Autodesk's samples have no Revit export, and mesh_bodies_vs_ifc samples the large classes. Its bars are 0.001 and 0.01 ft, while the cut-curve refinement starts at a 0.00025 ft bow, so a smaller move shows either way as nothing.
  • So a pass means no count crossed a bar on the bodies scored, not that Revit draws on the saved points' lines. A rise is the only positive evidence for that.
  • Reported with it: how many of Run E's bodies sit on a model Revit exported and appear in a scorer line, by class.
  1. Nothing newly refused. No refusal reason in any diagnostics.json rises against 115d224a.
  2. As they come:
    • which exports move, by model, and whether each is on a model where Run E lists a body;
    • on the samples, the moved bodies read with tools/re/ifc_body_diff.py, since no scorer reads them;
    • whether the same-project gates pass and the held-out counts move.

What each outcome means, written before the runs.

Audit-honesty checklist

  • A changelog fragment comes with the measured result, before this is marked ready.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk proprietary source (CLEANROOM.md).

Breaking changes

None: research module internals only.

…ghbour takes along an edge that crosses both its parameters, so the two faces share one boundary (#2094)
…sing edge, and how far their faces part and how many triangles they hold (#2098)
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Rows 1 to 8, read. The change narrows the crack but does not close it, and its summary above, that the two faces now share one boundary, does not hold. Not ready.

Run A, the full Measure of this head against eb6ddc09 (44523335702; nordic, r2025, samples, holdout). 21 of 120 exports differ.

  1. No scorer moves away from Revit: holds on the counts, not on every figure. No class's "ref on ours", "0.001 ft" or "0.01 ft" count moves, no volume leaves its bin, and no psets_vs_ifc or qtos_vs_ifc line moves. But the toilets mesh_bodies_vs_ifc lists on all eight BIM4LCA files (6 to 12 a file) have rvt-rs's vertices a little further from Revit's surface: 0.0205 to 0.0214 ft before, 0.0213 to 0.0216 ft after.
  2. Nothing newly refused: fails as worded. On each rac_basic save of 2023 to 2027 (all five read), the two partial refusals a file gain surface coordinates outside envelope in their reason list. Whether a face that was drawn is now refused is not measured: Run A does not count faces, and the crack probe counts a body with any diagnostic as refused on both sides.
  3. The same-project gates pass (same-project gates on fafbabbb), and no held-out summary count moves.
  4. As they come: the 21 that differ are the BIM4LCA housing and office files (eight), rac_advanced and rac_basic of 2023 to 2027 (ten), Snowdon Towers Architectural and Structural, and the held-out single-dwelling house. Each but the held-out house, which Run A2 does not read, is a model where Run A2 lists a body.

Run A2, probe_2098_face_cracks on 101 models, at the merge-base with the probe alone (44523361369, d4910f7d) and at this head (44523349458). 71 models report on both sides, every save of Revit 2023 to 2027; on the 30 earlier saves the probe stops with this native reader is not measured on Revit 2015 (to 2022). The probe counted 1,094 bodies on main whose saved graphics hold a plane-to-parametric edge that crosses both of the curved face's parameters; 650 are meshed on both sides and 444 are refused on both, with the saved-graphics reader's own reasons (141 surface-bearing component requires qualified owner, 84 scaled instance mode is not qualified, 121 unsupported surface HermiteSurf, the rest fewer). The counts below are per element and per file: the four BIM4LCA office files each report the same 344, and the housing files 48 each.

  1. The crack closes and opens nowhere else: holds as worded, fails its purpose. The row counted vertices over the bar, which let a gap ten times wider through:
    • Boundary vertices more than 0.001 ft from every other face, over the 650 bodies: 3,962 at the merge-base, 3,447 here. No body gains one, none is newly refused, and the same 71 models report.
    • But no body's crack closes: of the 217 bodies with any such vertex, none is left with none.
    • On 16 bodies of Snowdon Towers Architectural the largest gap grows, from 0.006 ft to 0.063 ft on 13 and to 0.046 ft on 3, while their count over 0.001 ft falls (113 to 115 before, 89 to 91 after). Over the 650 bodies the largest gap falls on 407 and grows on those 16.
  2. Triangles stay bounded: fails. Over the 650 bodies, 5,696,127 triangles at the merge-base and 6,275,450 here, 10.2 per cent more against the 10 per cent the row allowed. No body doubles.

Run B, #2094 with this change (44522391805, ce141397), the two timber office files:

  1. The flights' faces meet: fails. On each flight the boundary vertices more than 0.001 ft from another face fall from 196 to 28, and the largest gap from 0.0029 to 0.0024 ft.
  2. feat(saved-graphics): a Hermite spline profile is read and drawn, and a plane meets such a ruled face along the edge's saved points (#2082) (#1191) (RE-311) (RE-492) #2094's row 3: still fails, and one count moves away. Revit's vertices are at most 0.00121 ft from rvt-rs's surface (0.00125 before); the flights' volume is 111.95 ft³ (111.84 and 111.88 before, Revit's 112.12). But the flights whose every vertex is within 0.01 ft of the other body fall from 2 of 2 to 1 of 2 as built, and from 5 of 5 to 4 of 5 at permit (mesh_bodies_vs_ifc).

Why it does not close, read from the code and not yet measured edge by edge. refine_crossing_edge_within adds a point between two only where the curve the plane cuts from the surface leaves the straight line between them by more than 0.00025 ft (bisect_crossing_edge). It never asks how far the curved face's own path between the two points, straight in that face's parameters, leaves the plane. Where the cut curve is nearly straight, nothing is added, and that path still bows off the plane by up to the edge's bow. So giving the curved face the plane's points shares the points, not the boundary between them. One edge fits this (on the flight, an edge with 4 saved points shows 6 vertices on the flat side and a 0.0024 ft gap after the change), but it is not measured edge by edge. The next thing to try is a rule that bounds both: the plane's chords against the cut curve, and the curved face's path against the plane. And the refinement this change adds runs before the face's own checks, so any error in it refuses the face, where a cylinder's side keeps its stored samples on such an error; a redesign keeps that. The Snowdon bodies whose gap widens are not read yet.

The probes these rows came from also have a limit to fix before they are relied on edge by edge: on one flight, on 13 of its 21 bowed edges, a face's tag matches no meshed primitive, so the per-edge figures, and the crossing= count, can name edges the meshed body does not hold.

This stays a draft.

@DrunkOnJava

DrunkOnJava commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner Author

Rows 9 to 14 of the saved-chords lever, read. The lever is b556d977 (#2094's rule widened to every parametric face), against its base acf8482e.

  • Run E: probe_2098_face_cracks on the base (44539118197) and the lever (44539130832), on the 101 models Run A2 read.
  • Run F: the full Measure of the lever against 115d224a (44542427143).

Both ran 115d224a's search for the points on a span. #2094's head now tags them as they are made (35d04301), with every export and diagnostics.json identical to 115d224a's on all 120 models (44549221722). But that run holds the rule to spline ruled faces. With it widened to every parametric face, the two could still differ, so these figures are for the search, and the tagging version of the lever is not run.

  1. The crack closes: holds as worded, and closes no body. Over the 662 bodies meshed on both sides (71 models print a total line on both):
    • the boundary vertices more than 0.001 ft from every other face fall from 3,962 to 2,163, and no body gains one;
    • the largest gap falls from 0.006017 to 0.002354 ft;
    • but none of the 217 bodies with such a vertex is left with none.
    • All of them are on nine files. On Snowdon Towers Architectural they go from 2,394 to 987, all on 21 bodies of one shape, 242 faces each (16 of them are the bodies whose gap widened under this pull request's present change). On each BIM4LCA office file they go from 344 to 258, and on each housing file from 48 to 36.
  2. Nothing newly refused, as the probe sees it: holds. No body meshed on the base is refused on the lever. Two Snowdon Towers bodies the base refused (surface coordinates outside envelope), 2110101 and 2110417, are meshed on the lever, with no boundary vertex over 0.001 ft.
  3. Triangles do not rise: holds. 5,894,559 on the base, 5,857,140 on the lever, 0.6 per cent fewer.

Where the rest lies. The probe now tallies each vertex over 0.001 ft by its own face's surface class and that of the face nearest it (b4f6241c). Run on the lever over 27 models (44542871619), it finds such vertices on three of them, the three asked about: Snowdon Towers Architectural, the BIM4LCA office as built, and the housing in timber as built. There are 1,281 of the 2,163. The other 882 are on the other three office files and the other three housing files, which it did not read. None of the 1,281 is between a plane and a curved face:

own face nearest face vertices largest (ft)
cylinder cylinder 588 0.002354
surface of revolution surface of revolution 378 0.001236
cylinder surface of revolution 189 0.001232
surface of revolution cylinder 126 0.001069

The control is the same probe on the base (a2f73cc9, 44550991472), on the same 27 models. It shows the tally finds a plane where the faces part at one. It finds 2,786 vertices, again on the same three:

  • 1,505 between a plane and a surface of revolution: 1,134 on the curved side, up to 0.006017 ft, and 371 on the plane's, up to 0.005418 ft;
  • the same 1,281 between two curved faces, class by class, as on the lever.

So on these three models the lever closes every gap at a plane, all of them at a surface of revolution, and leaves the curved-to-curved ones as they were. No gap between a plane and a ruled face or a cone appears on the base there.

Limits on that table:

Run F, against 115d224a:

  1. No scorer count crosses a bar away from Revit: holds, and no count moves.
    • In mesh_bodies_vs_ifc, saved_meshes_vs_ifc, roof_bodies_vs_ifc and stair_bodies_vs_ifc, no count moves, and no psets_vs_ifc or qtos_vs_ifc line does.
    • The only scorer lines that change are mesh_bodies_vs_ifc's lists of the BIM4LCA files' toilets (WC-istuin:WC-1): 112 lines over the eight files. They move both ways, below every bar, since each was already more than 0.01 ft away:
      • On each housing file the same five toilets are listed on both sides. The farthest of rvt-rs's vertices from Revit's surface moves on them by -0.0006 to +0.00095 ft, and Revit's vertices against rvt-rs's surface do not move.
      • On the office files the list shows other toilets after than before (its farthest 0.02142 ft before, 0.02145 ft after), so the per-toilet move is not read there.
    • So nothing here says whether Revit draws a plane's vertices on the cut curve or on the saved points' lines.
    • The bodies Run E lists that sit on a model Revit exported are the BIM4LCA files': 43 meshed on each office file as built and at permit, 47 on each timber office file, and 6 on each housing file. The row promised them by class, which this does not give.
  2. Nothing newly refused: holds. diagnostics.json differs on one of 102 models, Snowdon Towers Architectural. There 2 bodies are newly drawn from saved graphics, IfcFurniture in the body diff, and the 2 refusals for surface coordinates outside envelope go. As many as the probe's two newly meshed bodies of row 10; their ids are not matched, since the exports are deleted. No reason rises.
  3. As they come.
    • Which exports move: 17, namely the eight BIM4LCA office and housing files, the held-out single-dwelling house, rac_advanced of 2023 to 2027, and Snowdon Towers Architectural, Plumbing and Structural. Each, but the held-out house (which Run E does not read), is a model where Run E lists bodies. The house's kept counts do not move.
    • The samples' bodies (ifc_body_diff.py on the kept exports). On each, the bodies whose mesh changes are as many as Run E meshes on both sides:
      • on rac_advanced of 2024 to 2027, 60 a save;
      • on Snowdon Towers Architectural 139, and the 2 newly drawn;
      • on Plumbing 13, and on Structural 2.
      • rac_advanced 2023 was not read.
    • What those moves gain. On rac_advanced, Run E has no boundary vertex over 0.0001 ft on either side, so the lever moves 60 bodies a save for no measured gain. On Plumbing the vertices over 0.0001 ft fall from 130 to 0, and on Structural from 136 to 124, with none over 0.001 ft on either side.
    • The gates pass on b556d977. The rac_advanced saves of 2025 to 2027 move, but no gate figure does: bodies_across_saves is the same on both sides. Whether a body it compares is among the 60 is not read.

What it means, as registered. Rows 9 and 12 hold. So the rule, widened, becomes this pull request's candidate change in place of its present one, registered here with its own rows before its run. What it is widened to is narrower than "every parametric face":

DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
…s by the curved side's surface class, on the candidate (#2098)
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
… a plane meets such a ruled face along the edge's saved points (#2082) (#1191) (RE-311) (RE-492) (#2094)

## Summary

A `GHermiteSpline` profile curve of a ruled surface or a surface of
revolution is read, evaluated and meshed, so a body refused for that
curve alone is drawn from its saved graphics (RE-311's layout). Where a
plane shares an edge with such a ruled face, crossing both of its
parameters, both faces draw the edge straight between the file's saved
points for it, so they meet (RE-492).

Against `main` (Measure
[44536807887](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44536807887),
at `115d224a`):
- **25 bodies on 10 files are newly drawn:** the BIM4LCA timber office's
two stair flights (both saves), a ramp and its ramp flight on each
terrain file, a beam on each `rac_advanced` save of 2023 to 2027, and 12
bodies on Snowdon Towers Architectural.
- **In `diagnostics.json`:** `body_sources.saved_graphics_mesh` +25,
`partition_element_record_bbox` -17,
`partition_family_instance_turned_box` -8 (Snowdon Towers).
- **Scored against Revit:** the flights' Revit vertices within 0.000109
ft of our surface (31 of 31 flights, 29 on `main`), their volume 112.116
and 112.117 ft³ against 112.115 and 112.116. The ramp flight is within
0.00088 ft. No other body-scorer count moves. The 17 bodies on the
samples have no Revit export.
- **`saved_mesh_refusals`:** bodies with a Hermite profile and another
unread part stay boxes, the entry now naming that part:
- the office's washbasins, 19 a file (17 on the timber files):
`malformed ruled-surface edge is connected to face N`;
  - the housing's wall-hung toilets, 6 a file: `GNurbSpline`;
  - RE1 Electrical's two panels;
- `rac_basic`'s one body a save: `a trim loop does not close in the
surface's parameters`;
  - 2 on Snowdon Towers: `shared curved edge leaves adjacent plane`.
- **Held out:** the single-dwelling house's export changes and its kept
counts do not (19 saved-graphics bodies scored, 28 record boxes). Its
export is not kept, so what moved is not read.

## Motivation

#2082: a practitioner's 270 MB Revit 2024 building-services model keeps
424 elements as boxes for this one reason, the largest it reports. #1191
(W6). On the open models Measure reads, the reason is on the BIM4LCA
office (19 elements a file), the housing (6), the office terrain (2) and
RE1 Electrical (2), each with Revit's own export beside it.

RE-311 read the curve's layout and evaluated it at `64b2cff0` (archived
as `refs/archive/2026-11-03/re311-spline-profiles`). It did not land
then because no body with a Revit export of its own gained a mesh: other
refusals kept those elements boxes. RE-329 says the office's 19 also
hold `HermiteSurf` faces, which #1941 reads. This pull request measures
the spline alone; `research/1191-spline-profiles` holds it on top of
#1941 for the combined count.

## Changes

- `src/research/native_parametric_surface.rs`: `Curve::Hermite`, read
from `m_NodeArray` (`m_iParametr`, `m_iPoint`, `m_iTangent`),
`m_Periodic` and `m_endParams`; a cubic Hermite segment between
consecutive nodes, found by halving the nodes and its analytic
derivative; a periodic spline refused; `spline_steps`, the equal steps
its largest second difference asks for to hold a chord (at most 128);
`speed`.
- `src/research/native_parametric_mesh.rs`: the grid of a surface of
revolution and of a ruled surface with such a profile takes those steps.
- `src/research/native_saved_scene.rs`: `m_NodeArray`, `m_Periodic`,
`m_iParametr`, `m_iPoint`, `m_iTangent` join the saved-graphics fields.
- `probes/examples/probe_1683_ruled_grids.rs`: names the new curve.
- `src/research/native_parametric_mesh.rs`,
`src/research/native_saved_mesh.rs`: `FaceGrid::chord_edges` and
`chords`, the edges a spline ruled face shares with a plane whose
samples cross both its parameters, and the spans between their saved
points. The plane keeps those edges' saved points
(`refined_plane_edge`). `trimmed_cells_on` tags each point with the span
it is made on, and `on_chords` puts the ruled face's tagged points on
the line between the span's ends, kept only where every triangle keeps
its area.
- `reports/element-framing/RE-492-hermite-spline-profiles-drawn.md`,
`changelog.d/added/2094-hermite-spline-profiles.md`, and RE-492 in
`docs/format-reconnaissance.md` and `docs/one-project-rules.md`.

## Testing

Unit tests are banned in this repository. Rows registered here before
any run is read:

1. **Only bodies the curve refused move.** In an unfiltered Measure
against `main`, the exports that differ are of models whose
`saved_mesh_refusals` name a `GHermiteSpline` profile, and in each the
elements whose body changes are elements that reason refused.
2. **The reason goes.** On each model, the refusals naming `unsupported
parametric profile curve GHermiteSpline` fall to 0; what those elements
are refused for next is reported as it comes.
3. **What is newly drawn is Revit's shape.** Of the newly drawn bodies
that Revit's export also holds, at least 90 in 100 have every tested
vertex of Revit's body within 0.001 ft of ours (`mesh_bodies_vs_ifc`).
The ones that do not are listed.
4. **Nothing else moves.** No scorer's "different" or "values Revit does
not write" count rises on any model, and the same-project gates pass.

- [x] Unfiltered Measure:
[44486295483](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44486295483).
Rows 1, 2 and 4 hold and row 3 fails (results in the comments).
- [x] Unfiltered Measure of `115d224a`:
[44536807887](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44536807887).
Rows 2 to 4 hold on this commit, and row 3 now has all 8 newly drawn
bodies Revit's export also holds (4 flights, 2 ramps, 2 ramp flights)
with every Revit vertex within 0.001 ft of ours. Row 1 holds by
composition: its elements were read at `0130573d` (44486295483), and the
8 bodies that move from there are among them. The held-out house's
refusals are scrubbed, so its part of row 1 is read from its export hash
only. Rows 9 to 15 hold (results in the comments).
- [x] `35d04301` (the points tagged as they are made, no work budget)
against `115d224a`: byte-identity run
[44549221722](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44549221722),
every export and `diagnostics.json` identical (120 of 120, 102 of 102).
The rewritten cutter runs on every trimmed face, so the run exercises it
on all 120 models; only the placement of tagged points is limited to
faces with spans. `d659fa7f` differs from `35d04301` in `src/` only by
the unit tests' wrapper made test-only, a doc comment moved and one
shortened path. Its full Measure against `c22a87e4`, the merge-base
(`main` is two commits ahead),
[44550549881](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44550549881),
gives every export identical to `115d224a`'s in Run C (120 of 120), and
the same-project gates and the advisory semantic check pass on it. The
two commits after it change only RE-492.
- [x] `3a333551`, from the re-read before approval. A spline profile
found the segment it evaluates by scanning its nodes, at every point of
a face's grid, so a file with very many nodes could ask for its points
times its nodes. It now halves the nodes, picking the same segment for
every parameter (`23fdb87b`). And `spline_steps`'s doc names its cap in
plain text, since a public item's doc may not link a private one. Its
Measure against `d659fa7f`,
[44560219384](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44560219384),
gives every export and `diagnostics.json` identical (120 of 120, 102 of
102), and the same-project gates pass on `3a333551`.

**Rows for one lever on row 3, registered before its run is read.** On
the timber office's four new flights, the only Revit vertices more than
0.001 ft from our surface are two a flight, at most 0.00125 ft, and both
lie in a flat side face's plane, within 0.00002 ft of the straight line
between the saved points of an edge that face shares with a spline ruled
face and that crosses both of the ruled face's parameters
(`far_vertices_vs_ifc`, run
[44518424477](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44518424477);
`probe_2094_edge_bow`, run
[44518914514](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44518914514)).
Two vertices a flight make it a lead, not a rule. The flat face draws
such an edge along the curve the plane cuts from the ruled face
(`refined_plane_edge`, #1706). The lever, a diagnostic and not the
change to land: along such an edge, and only where the ruled face's
profile is a spline, the flat face keeps the edge's saved points
(`b9e663b3` on `research/2094-saved-points`). It moves only where that
cut curve leaves the saved points' line by more than 0.00025 ft. Run on
the timber office and terrain files with `mesh_bodies_vs_ifc`,
`stair_bodies_vs_ifc`, `far_vertices_vs_ifc` (now reading ramps and ramp
flights too) and `probe_2094_edge_bow`. The baselines at `0130573d`: the
two body scorers and the exports in run
[44486295483](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44486295483)
(all four files); `far_vertices_vs_ifc` in run
[44516271925](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44516271925)
(the two timber files, flights only); the probe's mesh check in run
[44520882600](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44520882600)
(as built only).

5. **Row 3 on the flights.** On the four new flights, every vertex of
Revit's body is within 0.001 ft of our surface (`stair_bodies_vs_ifc`'s
surface figure and `mesh_bodies_vs_ifc`'s "ref on ours"), and no flight
loses its "0.01 ft" count or leaves its volume bin.
6. **The ramps hold.** On both terrain files the ramps and their flight
keep their "ref on ours", "0.001 ft" and "0.01 ft" counts. This row
counts only where the file's export differs from `0130573d`'s; where it
does not, the lever did not reach the ramps and the row is unexercised,
not passed.
7. **Nothing else moves.** Against that run's scorer outputs for the
same four files, only bodies this pull request newly draws change.
8. **Expected and reported:** the flights' volume against Revit's, and
the probe's count of their boundary vertices more than 0.001 ft from
another face, which is expected to rise: the flat face moves to the
saved points and the ruled face does not. The as-built file has a
baseline (196 a flight); the permit file is reported without one.

**What each outcome means, written before the run.** If row 5 passes,
the change to design draws both faces of such an edge on the saved
points' line, scoped to spline ruled faces, so only bodies this pull
request newly draws can move. If row 5 fails, the two-vertex lead is
wrong, and `far_vertices_vs_ifc` says where Revit's vertices miss next.
Either way the crack between our own faces on `main` stays its own pull
request, #2098.

**Rows for the change to land, registered before its runs are read.**
Row 5 passed
([results](#2094 (comment))).
With the lever, five of the eight largest remaining gaps on each flight
are vertices beside the flat side face where Revit's two vertices missed
(x = 305.029 against its 305.0318, and 157.7575 against 157.7549), off
its plane by up to 0.0027 ft. That reads as the ruled face's side. The
other three, at x = 315.2378 and 147.5489, are beside no plane read yet.
Run D's `surface=` field confirms or refutes the reading. The change,
`115d224a` on this branch, is one commit on `0130573d` with no merge of
`main`. It covers an edge a plane shares with a ruled face whose profile
is a spline, where the edge's samples cross both of the ruled face's
parameters:
- The ruled face decides which edges these are
(`FaceGrid::chord_edges`), and the plane reads that set, so the two
sides cannot disagree.
- The plane keeps the edge's saved points, as the lever did.
- The ruled face's vertices along each span between two saved points are
put on the straight line between the span's ends. That is kept only
where every triangle keeps its area. Anything else in that step leaves
the face as the lever drew it, so the step refuses no face. A fallback
leaves no diagnostic, so only the probe's mesh check below would show
one, and only on the two flights.

**Run C**, a full Measure of `115d224a` against `main` (nordic, r2025,
samples, holdout, exports kept). Rows 12 to 15 compare its head side
with the head side of run
[44486295483](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44486295483)
(`0130573d`, exports kept). **Run D**, `probe_2094_edge_bow` on
`bd6f2305` (`research/2094-saved-points`: the same `src/` plus the
probe) on the two timber office files, with `mesh_bodies_vs_ifc`,
`stair_bodies_vs_ifc` and `far_vertices_vs_ifc`. That last scorer now
also counts rvt-rs's vertices more than 0.001 ft from Revit's surface;
its baseline on the lever (`b9e663b3`) is run
[44534104018](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44534104018).

9. **Row 3 still holds on the flights.** On both timber files:
`stair_bodies_vs_ifc` 31 of 31, and `mesh_bodies_vs_ifc` "ref on ours" 2
of 2 as built and 5 of 5 at permit, with the "0.01 ft" count and volume
bins unchanged from [the lever's
run](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44529253935)
(Runs C and D). `far_vertices_vs_ifc` lists none of Revit's vertices
beyond 0.001 ft (Run D).
10. **The faces meet more closely.** On each flight, the probe's count
of boundary vertices more than 0.001 ft from another face falls from 179
and 180, and its largest gap from 0.00268 ft. What remains is reported
by the face it is on (its surface class and straight spans). A face with
spans (`chords` above 0) that still holds vertices over 0.001 ft is read
face by face, since that is what a silent fallback looks like. This is
the only row that shows the placement ran at all, so Run D is read
before Run C is dispatched.
11. **The ruled side moves toward Revit's, not away.** Up to now only
Revit's vertices against our surface have been checked. On the lever,
run 44534104018 finds 5,530 (3558983) and 5,293 (3561904) of each
flight's 10,660 vertices more than 0.001 ft from Revit's surface, the
same on both files. All are on smooth stretches of our body, and all but
54 and 53 face Revit's sloped triangles, where Revit's 307 and 310
vertices draw the curved faces more coarsely than ours. That total
stands too high to show a 0.0027 ft move, so the row is held to the
class the moved vertices should leave: those whose nearest Revit
triangle faces sideways, 54 (3558983) and 53 (3561904). That count
falls, and the total falls with it. If the side count falls and the
total does not, the vertices only changed class, and the row reads "not
shown". The limit: a count cannot see a vertex already past the bar
moving further from Revit's surface.
12. **Nothing newly refused.** No refusal reason in any
`diagnostics.json` rises.
13. **Only bodies this pull request newly draws move.** Each export that
changes (`ifc.sha256`) is listed by model, the moved models and elements
counted, and the moved elements read with `tools/re/ifc_body_diff.py`
(which compares each body's triangulated face sets by fingerprint).
Every moved element must be one whose body also changed from `main`'s
export to `0130573d`'s in run 44486295483: a body `main` draws as a box
and the spline reader draws. The held-out models' exports are not kept
(hashes only), so there the row is read from `ifc.sha256` alone: a
held-out export that changes is reported as moved and unread.
14. **No scorer moves away from Revit.** In `mesh_bodies_vs_ifc`,
`saved_meshes_vs_ifc`, `roof_bodies_vs_ifc` and `stair_bodies_vs_ifc`,
no class's "ref on ours", "0.001 ft" or "0.01 ft" count falls, and no
body leaves a volume bin it was in. No `psets_vs_ifc` or `qtos_vs_ifc`
line moves.
15. **The same-project gates pass** on `115d224a`, and no held-out
summary count moves.

- [x] Self-approved: this is the maintainer's own pull request, with no
second reader running. Before approving, the whole change was re-read
against `c22a87e4`: the Hermite reader and its segment search, the grid
steps, `chord_edges`, `trimmed_cells_on` and `on_chords`, the plane's
side, the saved-graphics fields, the probe, RE-492, the changelog
fragment and the docs. The evidence is the Measure runs above.
- [ ] `tools/check-local.sh`: not run (no local builds here); CI runs
it. `rustfmt --check` and `tools/ci/saved-graphics-fields.py` pass
locally.

## Audit-honesty checklist

- [x] Docs, the changelog fragment and RE-492 follow the Measure, and
describe the tagging mesher, whose exports are identical to those of the
search every cited run measured. A fallback, where the ruled face's
points stay on the surface because a triangle would lose its area,
leaves no diagnostic: the saved meshes run on worker threads, whose
budget notes are dropped. RE-492 and the fragment state that limit.

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk proprietary source, decompiled internals
or NDA content (CLEANROOM.md). The layout is read from the files' own
bytes (RE-311).
- [x] No new fixtures.

## Breaking changes

`native_parametric_surface::Curve` (in `rvt::research`, behind
`unstable-research`) gains a variant. `native_parametric_mesh::FaceGrid`
(also in `rvt::research`) gains two public fields, `chord_edges` and
`chords`, so a struct literal of it no longer builds. Output changes on
the 25 bodies listed in the summary, and in the `saved_mesh_refusals`
text of the bodies that stay boxes.

https://claude.ai/code/session_01NCFPVqpXUmLDmXf35nPPeP
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
…both ways, so a body that moves under its bars still shows (#2098)
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
DrunkOnJava added a commit that referenced this pull request Nov 19, 2026
…aw an edge they share across both its parameters straight between its saved points, so the two faces meet (#2098) (RE-493) (#2099)

## Summary

Where a plane shares an edge with a surface of revolution or a cone, and
the edge crosses both of the curved face's parameters, both faces now
draw the edge straight between the points the file saves for it. The
plane had been drawn through the curve it cuts from the surface, and the
curved face straight in its own parameters, and the two parted by the
edge's bow. #2094 gave ruled faces with a spline profile this rule; this
takes it to surfaces of revolution and cones. It replaces #2098's
change, which narrowed the crack but closed it on no body. This one
closes every gap at a plane, though no body's gaps close entirely
either: what is left of each lies between two curved faces.

Measured on this change (RE-493): boundary vertices more than 0.001 ft
from every other face fall from 3,962 to 2,163, the largest from
0.006017 to 0.002354 ft, and none of those left lies at a plane: what is
left is between two curved faces, which this does not touch. No count
scored against Revit's exports moves; every body that moves and has a
Revit export is one toilet family, on the BIM4LCA office and housing.

## Motivation

#2098: on 662 bodies whose saved graphics hold such an edge, 3,962
boundary vertices lay more than 0.001 ft from every other face, up to
0.006 ft. A lever with this rule on every parametric face took that to
2,163 and moved no scorer count. The tally read 1,281 of the 2,163, on
three of the nine files, and every one of those lies between two curved
faces
([results](#2098 (comment))).

## Changes

- `src/research/native_parametric_mesh.rs`: `keeps_saved_chords` takes
surfaces of revolution and cones as well as ruled faces with a spline
profile.
- `src/research/native_saved_mesh.rs`: the plane side's comment.
- `reports/element-framing/RE-493-saved-points-revolution.md`, its
`docs/format-reconnaissance.md` addendum and
`changelog.d/fixed/2098-saved-points-revolution.md`.
- `reports/element-framing/RE-492-hermite-spline-profiles-drawn.md`: one
sentence that named a registered row of #2094's names what it means.

## Testing

Unit tests are banned in this repository. **Rows registered before any
run is read.** The lever's rows 9 and 12 held
([results](#2098 (comment))).
- **The rule.** The candidate is `ac956181` on `fix/2098-saved-chords`:
`main` with #2094 landed (`69ac3a26`, the points tagged as they are
made), with #2094's rule taken from ruled faces with a spline profile to
surfaces of revolution and cones as well. Along an edge a plane shares
with such a face, crossing both of its parameters, both faces draw the
edge straight between its saved points. A cylinder's side keeps #1706's
refinement, and a ruled face between plain curves stays as it is.
- **Why these classes.** Run H's base side
([44556926199](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44556926199))
counts each body's crossing edges by the curved face's class. With Run
E's base and lever figures for the same bodies, over every model:

| crossing edges on | bodies | meshed on both | newly meshed by the
lever | over 0.001 ft, base to lever | over 0.0001 ft, base to lever |
meshed on a BIM4LCA file |
  |---|---:|---:|---:|---|---|---:|
| surfaces of revolution only | 800 | 636 | 2 | 3,962 to 2,163 | 87,171
to 52,097 | 196 |
  | cones only | 13 | 13 | 0 | 0 to 0 | 130 to 0 | 0 |
  | ruled faces only | 49 | 13 | 0 | 0 to 0 | 22 to 22 | 12 |
  | ruled faces and surfaces of revolution | 104 | 0 | 0 | | | |
  | surfaces of revolution and cones | 128 | 0 | 0 | | | |

- **Surfaces of revolution** carry every gap the lever closed over 0.001
ft, and both bodies it newly meshed (2110101 and 2110417 hold surfaces
of revolution only).
- **Cones** carry Plumbing's fall from 130 to 0 vertices over 0.0001 ft.
That is one model with no Revit export, and no gap over 0.001 ft on
either side.
- **Ruled faces show no change.** The base already gives #2094's spline
faces the rule, and the 13 meshed bodies with ruled crossing edges have
the same figures on both sides. On the BIM4LCA files these are #2094's
spline faces, with no gap on either side: the four flight and stair
bodies on each timber office file, and on each terrain file the ramp
flight 1386050 and the ramp 1386524 (largest gap 0.000001 ft on both
sides). On Snowdon Towers Architectural it is one body, 2181762: 22
vertices over 0.0001 ft, none over 0.001 ft, the largest 0.000932 ft, on
both sides.
- On Snowdon Towers Architectural the lever moved as many bodies as it
meshes there, 139: 138 with surfaces of revolution, and 2181762. If
2181762 is among them, its ruled face is a plain one, since the base
already gives spline faces the rule. Row 6's count tests that: 138 says
so, and 139 would mean some other body moved, so that no plain ruled
body was measured at all. Either way the one plain ruled body read meets
no better, so the rule leaves plain ruled faces out.
- **The cost, accepted.** The rule also moves the 60 bodies a
`rac_advanced` save, for no measured gain: they have no boundary vertex
over 0.0001 ft on either side. They hold surfaces of revolution only, so
no class separates them. With the lever, on the 2024 save (Run F's kept
exports, read with `tools/re/body_displacement.py`, `ad80037d` on
`measure/2094-far-vertices`), they are 60 furniture bodies that move
alike, moved by at most 0.0000774 ft: the farthest a vertex of the
base's body lies from the lever's surface. The other way it is 0.0000012
ft.
- **The branches.** The candidate with the probe is `ee09811f`
(`measure/2098-cand-probe`). The base with the same probe is `6b6df1ad`
(`measure/2098-main-base`, `main` at `69ac3a26`). The two differ in
`src/` by the rule alone, and both sides run fresh. The base side is
expected to repeat Run E's base side: 1,094 bodies, 662 meshed on both,
3,962 vertices over 0.001 ft, the largest 0.006017 ft, 5,894,559
triangles. Run H's earlier base side on `#2094`'s branch gave exactly
those, and `main`'s other two commits since change landing names and a
progress stage, not meshes. If it does not, the difference is read
before the candidate's side.

**Run H**, `probe_2098_face_cracks` on both, on the models Run A2 read
(nordic, r2025, samples).

1. **The lever's figures, again.** The candidate is the lever's rule
less plain ruled faces, on the tagging mesher. Over the bodies meshed on
both sides it is expected to give Run E's lever figures:
- 2,163 boundary vertices more than 0.001 ft from every other face (987
on Snowdon Towers Architectural, 258 on each office file, 36 on each
housing file), the largest 0.002354 ft;
    - no body gaining one;
- in the tally, no vertex between a plane and a curved face on any model
(for the six files the lever's tally did not read, a first reading, not
a replication);
    - Plumbing at 0 over 0.0001 ft and Structural at 124.

Any figure that differs means the tagging mesher and the search differ
on these faces, or a plain ruled face mattered after all. The faces
where it differs are read before anything else.
2. **Nothing newly refused, as the probe sees it.** No body meshed on
the base is refused on the candidate; the two bodies the lever newly
meshed on Snowdon Towers, which hold surfaces of revolution only, are
expected to be meshed again; and the same models print a `total` line.
3. **Triangles:** expected 5,857,140 over the bodies meshed on both
sides, the lever's figure. Not above the base's 5,894,559.

**Run I**, a full Measure of `ac956181` against `69ac3a26` (nordic,
r2025, samples, holdout, exports kept; the kept exports are fetched as
shard zips). **Run I2**, `far_vertices_vs_ifc` (`ad80037d` on
`measure/2094-far-vertices`, which prints every body's farthest vertex
both ways, so a terminal under the bars still shows) on both probe
branches on the eight BIM4LCA files. Both are dispatched once Run H is
read.

4. **No scorer count crosses a bar away from Revit, and no toilet's
surface moves away.**
- In `mesh_bodies_vs_ifc`, `saved_meshes_vs_ifc`, `roof_bodies_vs_ifc`
and `stair_bodies_vs_ifc`, no class's "ref on ours", "0.001 ft" or "0.01
ft" count falls, and no body leaves a volume bin it was in; rises are
reported too. No `psets_vs_ifc` or `qtos_vs_ifc` line moves.
- **The set.** Those counts did not move with the lever, so the row is
also held to the sanitary terminals whose body changes in Run I's body
diff on the eight BIM4LCA files. Their number is reported.
- **Revit's vertices against rvt-rs's surface** (the direction of "ref
on ours"; on 1762910, 96 of 793 beyond 0.001 ft, the farthest 0.00501
ft, in
[44556888939](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44556888939)
on #2094's branch). On every terminal of the set, the count beyond 0.001
ft does not rise, and the farthest does not rise by more than 0.0001 ft.
With the lever these did not move on the five toilets a housing file
that could be paired.
- **rvt-rs's vertices against Revit's surface.** The row fails if any
terminal of the set moves more than 0.001 ft further away, the scorers'
vertex bar. The lever moved the housing toilets' farthest by -0.0006 to
+0.00095 ft, so they would pass by 0.00005 ft; the office terminals,
which could not be paired under the lever, are where it can fail. Each
terminal's counts beyond 0.01 and 0.001 ft are listed before and after.
- **What this tests.** The meshed BIM4LCA bodies hold surfaces of
revolution only, so row 4 tests that class alone. Cones rest on
Plumbing, unscored.
5. **Nothing newly refused.** No refusal reason in any
`diagnostics.json` rises.
6. **As they come:**
- which exports move, by model, and whether each is on a model where Run
H lists a body;
- the bodies that move by class on the eight BIM4LCA files
(`ifc_body_diff.py`), with the same per-body read for any class but
sanitary terminals that Revit exports, or a statement that it is not
read;
- on the samples, the 2023 save of `rac_advanced` included, how many
bodies move against how many Run H meshes there. On Snowdon Towers
Architectural that is expected to be 138 and the 2 newly drawn, against
the lever's 139: 2181762 should not move;
- how far the rule moves the bodies it moves: the farthest a vertex of a
moved body lies from the same body's surface on the other side, both
ways, from the kept exports with `body_displacement.py`, `rac_advanced`
first and counted by distinct shape. Expected on `rac_advanced`, the
lever's 0.0000774 ft. The bar is the scorers' 0.001 ft: a body moved
further than that is read before the change lands. This is what the
accepted cost rests on;
    - whether the same-project gates pass, and which gate figures move;
    - whether a held-out export moves.

**Results:** [read against the
rows](#2099 (comment)).
Rows 1 to 5 hold, and row 6's moves over the 0.001 ft bar are read
there.

**What each outcome means, written before the runs.**
- If rows 1 and 4 hold, this pull request is marked ready, with its
changelog fragment and its report.
- If row 1 differs from the lever, the faces where it differs are read
first.
- If row 4 fails, the terminals that fail it are read face by face.
Every meshed office and housing body holds surfaces of revolution only,
so narrowing by class there would drop the class where every closed gap
was. A failure is reported as one, and the candidate does not land until
a rule that passes is found.

## Audit-honesty checklist

- [x] The changelog fragment and the report (RE-493) follow the Measure.
- [x] Self-approved: this is the maintainer's own pull request, with no
second reader running. Before approving, the whole change was re-read
against `69ac3a26`: `keeps_saved_chords` and its comment, the plane
side's comment, RE-493, its addendum and fragment, and the RE-492
sentence. The same-project and semantic verdicts on `ac956181` stand for
the head, which adds docs only (`a8a9fc43`).

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk proprietary source, decompiled internals
or NDA content (CLEANROOM.md).
- [x] No new fixtures.

## Breaking changes

None: research module internals only.
@DrunkOnJava
DrunkOnJava deleted the fix/parametric-crossing-edge-points branch November 20, 2026 02:58
DrunkOnJava added a commit that referenced this pull request Nov 20, 2026
…le, two regions or a seamless tube, is meshed (#1191) (#2102)

**On the full Measure, rows 1, 3, 4 and 5 hold. Row 2 fails only on the
BIM4LCA offices' 30 `Stay_Wall_Mounted_:VAR-1` grab bars a file, which
Revit's own export draws as a square along their legs
([read](#2102 (comment))).
They ship drawn round, as the file saves them, with that miss on record
(decided 2026-11-20). Report: RE-494.**

## Summary

A cylinder face bounded by two trim loops on part of a turn is now
meshed strip by strip (`band_mesh`). Before, the saved-graphics mesher
took one trim loop on a cylinder and refused any face with two as
`multiple cylinder trim loops unsupported`. Two loops making a full
turn, and three or more loops, are still refused. The code is as at
`d46bfeff`; the commits after it add the report, the changelog fragment
and the docs.

A full Measure of `1ab9c54e` against main `4e05cfb0`
([44649733126](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44649733126):
nordic, r2025, samples, holdout, every scorer, exports kept) moves 27 of
120 exports. On 22 of them, bodies that were record boxes are now drawn
from their saved meshes: 1,289 on the exports kept, and 10 on the
held-out house. On the other five, the rac basic samples, only refusal
texts move (row 4). The bodies newly drawn:
- `IfcFurniture`: 30 on each BIM4LCA office file, all
`Stay_Wall_Mounted_:VAR-1`. **Row 2 fails on all 30**: 1.11 of Revit's
volume, rvt-rs's points up to 0.0116 ft off Revit's surface.
- `IfcDoor`: 4 on each BIM4LCA housing file (`O-5:O-5.9x21sauna`) and 10
on the held-out house. **All pass row 2**: within 0.01 ft both ways and
within 1 per cent of Revit's volume.
- `IfcPipeFitting` (48 and 87) and one `IfcBuildingElementProxy` on
Autodesk's rme basic and advanced samples in every year they exist, 2023
to 2027.
- Snowdon Towers 2024: 404 `IfcAirTerminal` and 36 `IfcDuctFitting`
(HVAC), 108 `IfcSanitaryTerminal` (plumbing), 5
`IfcBuildingElementProxy` (`Trash Chute`), an `IfcColumn` and an
`IfcElectricAppliance` (architectural), and an `IfcLightFixture`
(electrical). Revit has no export of these in Measure; how they were
read is below.

The grab bars fail because Revit's export draws the round bar with a few
large flats. Along the legs it uses a square whose corners lie on
rvt-rs's round (radius 0.0110 m). On the U-bend it uses straight pieces
whose ends lie on that round. Both of Revit's shapes for them, 15 bodies
each, read the same. Revit writes those flats itself
(`IfcPolygonalFaceSet`), so they are not IfcOpenShell's tessellation.

`d46bfeff` removes the full-turn reader, `tube_trim`, which no face on
any file read took. A byte-identity Measure of it against `1ab9c54e`
([44660808578](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44660808578):
nordic, r2025, samples, holdout) leaves 120 of 120 exports and 102 of
102 `diagnostics.json` identical.

## Motivation

#1191 (W6). A census of `box_bodies_vs_ifc` over the models with Revit's
own export (Measure
[44589336915](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44589336915),
head side, `5e36af9f`, before #2099) counts, for each refusal reason,
the bodies whose refusal names it alone. That is a lower bound of what
each reason blocks: a face's first failing stage hides the ones behind
it. `multiple cylinder trim loops unsupported` is the largest such
reason Revit's exports can check: named alone by 136 bodies, 30 on each
BIM4LCA office file and 4 on each housing file.

Probe runs said which shape those faces are:
-
[44638585587](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44638585587):
none on the office or the housing is a tube. Every such face's envelope
covers part of a turn.
-
[44639888934](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44639888934):
on the housing's 4, each pair of loops is a hole inside the other loop;
on the office's 30, holes and two separate regions.
-
[44659164312](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44659164312)
(`probe_2102_cylinder_loops` at `6327fb09`, every 2024 to 2027 sample):
every two-loop cylinder face covers part of a turn (1 to 51 faces a
file), so none takes the full-turn path. 13 faces on each rme advanced
and basic file and 3 on Snowdon architectural have three loops, and 2 on
each rac advanced file have ten; all are still refused.

## Changes

- `src/research/native_saved_mesh.rs`: `cylinder_face` reads a second
trim loop. If the two make a full turn it refuses them as `two cylinder
trim loops on a full turn unsupported`; otherwise it reads both rings
closed and meshes them with `band_mesh`. `band_mesh` takes the strips
across U, whose edges fall on every ring point, so each ring edge
crosses a strip whole or not at all. It covers each strip between its
crossings taken in pairs by height, which is a hole and separate regions
alike. The face's points are both rings', so the plane beside it
rebuilds the same steps (`refined_plane_edge`). Three or more loops are
still refused.

## Testing

Unit tests are banned in this repository. **Rows registered before any
run is read.** The registration below is as written before the full
Measure ran; each row's result follows it. A third probe run on the same
two files
([44641101362](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44641101362),
`42a94918`) was read for one question: are the bodies that named the
reason alone drawn now? They are, and row 2 fails on the office
([read](#2102 (comment))),
so no full Measure is run until those bodies are read face by face. The
rows below are judged on a full Measure of the head that settles
(nordic, r2025, samples, holdout, every scorer, exports kept).

1. **Nothing scored moves away from Revit.** In `mesh_bodies_vs_ifc`,
`saved_meshes_vs_ifc`, `roof_bodies_vs_ifc` and `stair_bodies_vs_ifc`,
no class's "ref on ours", "0.001 ft" or "0.01 ft" count falls, and no
body leaves a volume bin it was in. No `psets_vs_ifc` or `qtos_vs_ifc`
line moves.
    - **Result (full Measure):**
- **Holds.** No class count falls on any model. The only family lines
that leave `mesh_bodies_vs_ifc` are pushed off the end of its list of
the largest families by the new ones (`PK-1:PK-1.3800` on the offices,
`UO-3` and `UO-4` on the housing). No `psets_vs_ifc` or `qtos_vs_ifc`
line moves. `door_bodies_vs_ifc` moves 4 housing doors from "mirror rule
wrong" to "rvt-rs's box is Revit's".
- `schema.txt` moves on 21 models. On each, the count of swept solids
placed apart from their product falls by exactly the number of bodies
newly drawn there. On Snowdon plumbing the export grows from 112 MiB to
130 MiB, past the 120 MiB Measure validates (#1532), so Measure skipped
it. Read locally with IfcOpenShell 0.9.0.post1 as Measure reads it
(`tools/ci/ifc_validate_summary.py --both`): 0 validation findings and 0
EXPRESS-rule findings, as on main.
2. **Every body newly drawn that Revit exports is checked**, on
`mesh_bodies_vs_ifc`'s class counts, since its list of bodies holds only
some and `far_vertices_vs_ifc` does not read `IfcFurniture`. For each
class that gains bodies, each count of bodies within a bar rises by as
many as the class gains:
    - Revit's vertices from rvt-rs's surface within 0.01 ft;
    - rvt-rs's vertices from Revit's within 0.01 ft;
    - the volume within 1 per cent of Revit's.
A count that rises by less means a newly drawn body fails it, and those
bodies are read face by face before anything lands.
    - **Result (full Measure):**
- **Fails on `IfcFurniture`** on the four office files: 30 gained, each
count rises by 0. Read face by face
([comment](#2102 (comment))):
the faces meet within 0.001 ft, and Revit's export draws the round bar
with a square along its legs and straight pieces on its U-bend.
- **Holds on `IfcDoor`**: on each housing file 4 gained, and the 0.01 ft
and 1 per cent counts each rise by 4; on the held-out house 10 of 10.
Their 0.001 ft and "ref on ours" counts do not rise (the comment reads
one door).
3. **The shared reader changes nothing else.** `ring_impl` also reads
planar faces and the cylinder's one-loop rings, and a plane beside a
two-loop cylinder now refines its edge on that cylinder's steps. On
every export that moves, no body drawn from a saved mesh on both sides
changes its mesh (`ifc_body_diff.py`'s count, expected 0).
    - **Result (full Measure):**
- **Holds**: 0 on all 94 export pairs read. The held-out house's export
is not kept, so it was not read here. At `d46bfeff`, `ring_impl` is as
on main: the full-turn reader and the open ring it needed are removed.
4. **Nothing newly refused.** No refusal reason in any
`diagnostics.json` rises, except where bodies leave `multiple cylinder
trim loops unsupported` for one of the new two-loop reasons or a later
one. Each such move is listed by reason.
    - **Result (full Measure):**
- **Holds.** 1,289 bodies named that reason alone and are drawn. 97 more
named it with others and now name only the others: 60 `a trim loop does
not close in the surface's parameters; disconnected UV boundary;
unsupported surface HermiteSurf`, 21 `face regions need subdivision`, 10
`unqualified collapsed ruled profiles; unqualified collapsed ruled
trim`, 6 `disconnected UV boundary`. No body names a two-loop reason.
5. **The same-project gates pass**, and no held-out export moves away
from Revit.
    - **Result (full Measure):**
- **Holds** on `1ab9c54e`: "pass: 15 samples held to their earlier
saves, and the Areas on 4 saves and on the 2021 save". `d46bfeff`'s
exports are byte-identical to it. The held-out house moves only by its
10 doors (row 2).
6. **As they come:**
- the bodies that named the reason alone (30 on each office file, 4 on
each housing file), drawn or with their new reason;
    - bodies newly drawn by file, from `diagnostics.json`;
    - which exports move, by model.
- **Result (full Measure):** the 30 on each office file and the 4 on
each housing file that named the reason alone are drawn. The bodies
newly drawn and the exports that move are listed by file and class in
the Summary above.

**What each outcome means, written before the run.**
- If rows 1 to 5 hold and row 2 checks at least one body, the change
goes for review with its report and a changelog fragment.
- If those bodies come back with a new two-loop reason, that reason is
their shape. It is read before any change to the reader.
- If row 2 fails, the failing bodies are read face by face before
anything else.

**The outcome.** Rows 1, 3, 4 and 5 hold, and row 2 checks the doors,
which pass. Row 2 fails on the 30 grab bars a file, read face by face as
registered: Revit's export draws the round bar as a square along its
legs. Landing with row 2 failed on them is outside the outcomes
registered above; it is Griffin's decision (2026-11-20), to ship them
drawn round, as the file saves them, with the miss on record.

**The bodies no Revit export in Measure scores** (1,153 on the samples)
were read four ways: against the record box each replaced (Revit's own
box for the element, along its three axes), against Revit's IFC4 export
of Snowdon architectural, against the VIM export of Snowdon, and with
the crack probe.
- The rme pipe fittings fill their boxes to within 0.1 mm on all nine
rme files. The same-project gate holds the 2025, 2026 and 2027 saves of
rac advanced, rac basic, rme advanced, rme basic and rst basic to their
2024 saves, so it holds these fittings on six of them.
- No Snowdon body reaches past its box, except the 108 sanitary
terminals, by up to 1.4 mm (median 1.0 mm). The five trash chutes fill
theirs exactly.
- Two classes stop short of their boxes, and the VIM does too. All 36
duct fittings are `Round Tee:Standard`: 21 stop more than 1 cm short, up
to 42 mm (36 mm the median of all 36). The four read by axis stop 42 mm
short on the low side of two of the box's axes (extents 0.32, 0.30 and
0.32 m). 13 of the 404 air terminals (`Supply Grille`, `Return Grille`)
stop 10 to 21 mm short on both sides of two axes. On two tees and two
grilles read, the VIM's mesh has rvt-rs's height (0.2812 m and 0.1218 m)
and its extents within 9 mm, so the space is in the box alone.
- Snowdon architectural's 7 (a column, five trash chutes and an
appliance) were also read against Revit's own IFC4 export of that file,
from bldrs-ai/test-models, which is not in Measure. On all 7, Revit's
vertices are within 0.001 ft of rvt-rs's surface and the volume is
within 0.8 per cent of Revit's. On the column and the five chutes,
rvt-rs's vertices stand up to 0.0129 ft off Revit's, so those six would
fail the 0.01 ft bar. Revit writes all 7 as explicit facets
(`IfcPolygonalFaceSet`); which of their parts are round is not read.
- Snowdon HVAC's 440 and plumbing's 108 were read against the VIM export
of the model's 2027 edition (vimaec/vim-hackathon: the meshes Revit gave
the VIM exporter, for every element of all six documents; kept local),
with `tools/re/footing_meshes_vs_vim.py --document HVAC|Plumbing`:
- Height and lowest point: all 36 duct fittings and 108 sanitary
terminals within 0.001 m of the VIM's, and 391 of the 404 air terminals
(the other 13 by 0.00107 m).
- Volume: the air terminals are 1.1 per cent over the VIM's. The duct
fittings are within 8.7 per cent, inside the 30 per cent main's 961
already show.
- The sanitary terminals' volume figure is not a volume. Three were read
shell by shell. Each holds a trap body open in both exports (158 and 110
edges one triangle holds). rvt-rs's reads 0.000930 m³ on all three, and
the VIM's reads −0.000145, +0.000220 and +0.001962 m³, so the spread is
the VIM's open shell taking its placement into its signed volume. Their
closed pipes are 6.2 to 6.7 per cent over the VIM's, whose pipes have
about ten sides where rvt-rs's are round.
- Whether their faces meet: the #2098 crack probe at `06e22382` on every
2024 to 2027 sample
([44663576285](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44663576285)).
- Snowdon plumbing: all 121 bodies it reads meet within 0.00093 ft. The
rme pipe fittings meet within 0.00092 ft on every save from 2024 to
2027, and the trash chutes and the appliance within 0.00012 ft.
- Snowdon HVAC: 404 of 440 meet within 0.001 ft. The other 36 are the 36
newly drawn `Round Tee:Standard`. Each has 32 boundary vertices beyond
0.001 ft, up to 0.00158 ft, all where one cylinder face meets another:
1,152 new gap vertices on bodies this change draws. The probe's commit
holds `1ab9c54e` with two probe commits on top. With two-loop faces
marked (`87b23899`,
[44679890567](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44679890567)),
each tee's 32 split evenly: 16 on its two-loop face stand off the
one-loop cylinder beside it, and 16 on that cylinder stand off the
two-loop face. So each face puts points on their shared edge that the
other does not hold, the same kind as the 588 between two cylinders that
RE-493 left on main. Putting both on the edge's saved points is not done
here.
- Snowdon architectural's column has 4 beyond 0.001 ft, up to 0.0011 ft,
where a ruled face meets a plane.
- Snowdon has one save, so no gate holds its 556 bodies. A box larger
than the body says nothing by itself: the sauna doors' boxes are 0.82 m
larger than bodies that pass row 2.

## Audit-honesty checklist

- [x] The report
(`reports/element-framing/RE-494-cylinder-two-trim-loops.md`), the
changelog fragment and the `docs/format-reconnaissance.md` addendum
follow the decision on the 30 grab bars.

## Review

Self-approved by the maintainer session that wrote it, after reading the
whole diff again at `968e15f8` (`src/research/native_saved_mesh.rs`, the
report, the changelog fragment and the three docs pages); the second
reader is not running. The tees' gaps between two curved faces, and the
column's at a plane, are tracked in #2104; Snowdon Plumbing's export
passing the 120 MiB Measure validates, in #2103.

## Legal and contribution hygiene

- [x] Apache-2.0; no Autodesk proprietary source, decompiled internals
or NDA content (CLEANROOM.md).
- [x] No new fixtures.

## Breaking changes

None: research module internals only.
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