Skip to content

fix(saved-graphics): an edge two cylinder faces share is refined to half the faces' chord, not a quarter, for fewer triangles (#2111) - #2116

Merged
DrunkOnJava merged 4 commits into
mainfrom
fix/2111-pair-edge-chord
Nov 20, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
fix/2111-pair-edge-chord

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

#2111's change for the triangle cost of #2107, which Griffin chose over keeping #2107's finer edge (2026-11-20). #2107 refines an edge two cylinder faces share until the chord between neighbouring points is within EDGE_SAGITTA (0.00025 ft), a quarter of the 0.001 ft chord the cylinder faces are meshed to. This refines that edge to half the faces' chord (0.0005 ft); the edges a cylinder shares with a plane keep EDGE_SAGITTA. At the faces' whole chord (42cf34ad, the first commit), two downpipes on each BIM4LCA housing file reopened past 0.001 ft, so the bound was halved (ae2d0d91). The rows and their reading are on #2111: the rows, row 8, the second bound.

Motivation

#2111: #2107 grew the triangle totals of the bodies with such edges by up to 1.35 on the plumbing and HVAC samples (RE-495). Read since, on the three faces measured, #2107's narrower strips lie nearer the true cylinder.

Changes

  • src/research/native_saved_mesh.rs:
    • EdgeLimits carries the chord bound (sagitta); bisect_crossing_edge reads it in place of EDGE_SAGITTA.
    • refined_cylinder_pair_edge passes half the cylinder profile's chord; every other caller passes EDGE_SAGITTA.
    • refined_cylinder_pair_edge's doc comment no longer says a refinement error refuses nothing; the cylinder's point budget does refuse.
  • reports/element-framing/RE-496-pair-edge-half-chord.md, changelog.d/changed/2111-pair-edge-half-chord.md, docs/format-reconnaissance.md, and RE-495's §5: the docs commits, which also correct the code comment's count of downpipes and give fix(saved-graphics): an edge two cylinder faces share takes the points where the two cylinders meet, held by both faces, so the faces meet (#2104) #2107's changelog entry its cost at this bound. The same-project gates passed on ae2d0d91, which holds every code change; the last commit changes only that comment in src/.

Testing

Unit tests are banned in this repository. Every row holds at half the chord (the reading): the probe (44801424565) keeps every boundary vertex between two cylinders within 0.001 ft on the 77 files it reads; over the 1,492 graphs holding a cylinder pair, the cylinder triangles go from 1,682,972 to 1,500,882 (1,385,188 before #2107), counting each graph once. The cost: the farthest standoff rises on 147 graphs, by at most 0.000318 ft, within 0.001 ft. The full Measure (44807747546) finds 102 diagnostics.json identical, no psets_vs_ifc or qtos_vs_ifc line moving, only the bodies with a cylinder pair changing, and the same-project gates passing on ae2d0d91.

Audit-honesty checklist

  • The report (RE-496), the changelog entry and the reconnaissance addendum follow the runs; RE-495's "not read" list carries the which-face reading.

Legal and contribution hygiene

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

Breaking changes

None: research module internals only.

Checked with every vertex before landing (#2114): none of the 40 bodies that move on RE1 Architecture and Plumbing and two BIM4LCA housing files is worse than with #2107 against Revit's exports (RE-496 §2).

Review: rvtReview, the maintainer session, wrote this change and, as rvtDevelop is not running, re-reads its diff and approves it itself on a green head (Griffin, 2026-11-12).

…he faces' own chord, not four times finer, for fewer triangles (#2111)
…faces' chord, as at the whole chord two downspouts' faces part (#2111)
@DrunkOnJava DrunkOnJava changed the title fix(saved-graphics): an edge two cylinder faces share is refined to the faces' own chord, not four times finer, for fewer triangles (#2111) fix(saved-graphics): an edge two cylinder faces share is refined to half the faces' chord, not a quarter, for fewer triangles (#2111) Nov 20, 2026
…alf the faces' chord; its changelog entry, reconnaissance addendum and RE-495's which-face reading; the code comment names two downpipes on each housing file (#2111)
…ound, and the percentages name the files they are read on (#2111)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 20, 2026 21:52
@DrunkOnJava
DrunkOnJava merged commit 5a8a451 into main Nov 20, 2026
67 of 68 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/2111-pair-edge-chord branch November 20, 2026 22:41
DrunkOnJava added a commit that referenced this pull request Nov 21, 2026
… body, not a stride of at most 400 (#2114) (#2118)

## Summary

`tools/re/mesh_bodies_vs_ifc.py` now tests every distinct vertex of a
scored body against the other body's surface, both ways, instead of a
stride of at most 400 (#2114).

The stride passed a body whose untested vertex failed a column. Because
added vertices shifted which 400 were tested, it also moved the 0.01 ft
and 0.001 ft columns when a mesh only gained vertices.

The distance is the same exact routine as before (`surface_distance`),
given more points. On byte-identical exports of the 41 models, with only
the scorer changed:
- no count or volume column moves;
- no distance column rises, as a superset of the tested vertices
requires;
- six class rows on six files fall.

## Motivation

Part of #2114, which stays open for the body stride and
`fitting_faces_vs_ifc`.

#2114: on RE1 Architecture the toilet left the 0.01 ft column and the
shower head entered it with #2107, though neither body's farthest vertex
moved. Rows that said "no count of `mesh_bodies_vs_ifc` falls" decided
landings while depending on which 400 vertices were tested.

## Changes

- **`tools/re/mesh_bodies_vs_ifc.py`:**
- `sample` becomes `vertices`: every distinct vertex, sorted as before.
  - `VERTEX_CAP` is gone.
  - The docstrings say every vertex is tested.
- **`tools/re/family_extrusion_bodies_vs_ifc.py`:** its docstring's
"every tested vertex" becomes "every vertex". It runs
`mesh_bodies_vs_ifc.main`.
- **`tools/re/arc_tessellation_study.py`:** calls `vertices` in place of
`sample`.
- **`tools/re/saved_mesh_status_vs_ifc.py`:** imports and calls
`vertices` in place of `sample`, so it tests every vertex too. Neither
Measure nor CI runs it; without this it would fail on import.

Not in this change:
- The per-class stride of 300 bodies by Tag (`CLASS_CAP`, repeated in
`saved_mesh_status_vs_ifc.py`) still shifts which bodies are scored when
a change adds bodies. Changing it moves every class row on the large
models, so it comes in its own PR, through one shared function.
- `fitting_faces_vs_ifc.py`'s stride of 600 vertices per face is its own
code and is not fixed here.
- The `*_across_saves` scripts the same-project gates run have no such
stride.

## Testing

Unit tests are banned in this repository: do not add them.

- [x] **Run.** Measure
[44837755615](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44837755615),
scorers from this branch, code `5a8a451a` (`main`), `nordic`, `r2025`
and `samples`, `scorers=mesh_bodies_vs_ifc`.
- [x] **Baseline.** The head side of
[44807747546](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44807747546)
(`ae2d0d91`, whose `src` differs from `5a8a451a` only in three comment
lines), scored with `main`'s scorer.
- [x] **Exports identical.** All 41 models the scorer reads have the
same `ifc.sha256` on both sides.
- [x] **Rows.** Of the class rows, n and both volume columns are
identical on every file. No 0.01 ft, 0.001 ft or "ref on ours" count
rises. Six rows fall:

  | File | Class (n) | 0.01 ft | 0.001 ft | ref on ours |
  | --- | --- | --- | --- | --- |
| Housing terrain, concrete and timber | `IfcGeographicElement` (21) |
12 → 12 | 1 → 1 | 3 → 2 |
| Office terrain, concrete and timber | `IfcRampFlight` (5) | 5 → 5 | 5
→ 4 | 5 → 5 |
| Office timber, as built | `IfcStairFlight` (2) | 2 → 0 | 0 → 0 | 2 → 2
|
| Office timber, permit | `IfcStairFlight` (5) | 5 → 3 | 3 → 3 | 5 → 5 |

- [x] **Against #2114's every-vertex figures.** On RE1 Architecture, the
toilet (359466) reads 0.01299 ft from rvt-rs to Revit, against 0.01212
ft with the stride. The shower head (369643) reads 0.01007 ft on both.
#2114 read their farthest of all as 0.012989 and 0.010066 ft on #2107's
commits, before #2116.
- [x] **Time, scorer run alone.** The step's wall time from each model's
`timings.log` in 44837755615:
  - the office as built, 43 s to 279 s;
  - the office permit and the timber office, 39 to 71 s to 182 to 192 s;
  - the housing terrain files, 6 s to 105 s;
  - the other housing files, 10 to 17 s to 48 to 50 s;
  - the office terrain files, 3 s to 16 and 17 s;
  - nothing else over 12 s.

- [x] **Time, under full load.** In an unfiltered Measure,
[44839463264](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44839463264),
every scorer runs beside it.
- The exports are byte-identical to the baseline's, and the same six
rows move.
- The slowest mesh step is the office as built, 104 s, against 43 s at
400 vertices in the baseline's full run.
- The other three office files (permit, and the timber office as built
and at permit) and the two terrain housing files take 63 to 81 s; every
other file takes 26 s or less.
  - The step's limit is 2,400 s.
- The step adds about a minute to a shard (up to four at the filtered
run's figures). Between the two runs shard totals moved both ways, and
the slowest shard in both was Autodesk's 2024 to 2027 samples (19 and 26
minutes). That shard has no Revit export, so this scorer does not run
there, and the full run's wall time did not grow in this run.
  - All 41 outputs end in `exit 0`, and none reports a worker dying.

The filtered run was slower than this one on every file, by 1.7 to 2.8
times (279 s against 104 s on the office as built, 105 against 63 on the
terrain housing). Both run one job per CPU (`MEASURE_JOBS`); the cause
is not read.
- [x] **The fine tessellation**, timed once each with the scorer alone
on the BIM4LCA office as built:
[44844099459](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44844099459)
and
[44844102778](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44844102778).
- The step takes 352 s, against 269 s with the stride. The two ran on
different processors, so the difference is not a measured cost, and
neither was timed under full load.
- Of the `fine` class rows, only `IfcWasteTerminal` moves: 0.001 ft and
"ref on ours" 59 → 56. None rises.
  - Both end in `exit 0`.
- **Not run:** `slab_bodies_vs_ifc`, `shading_bodies_vs_ifc` and
`changed_bodies_vs_ifc`, which inherit the change through `main` or
`score_all` and are not in Measure's default set; and
`saved_mesh_status_vs_ifc`.
- [x] Python only: `python3 -m py_compile` on the three files. No Rust
changes.

## Audit-honesty checklist

- [x] Docs reflect the change: the scorer's docstrings. The figures
quoted in older reports and in `docs/support-matrix.json` record what
the scorer measured then, and are left as they were.
- [x] No changelog fragment: a measurement tool, nothing a user of the
crate sees.
- [x] No emojis, private paths or internal jargon.

## Legal and contribution hygiene

- [x] Apache-2.0.
- [x] No Autodesk proprietary content.
- [x] No fixtures.

## Breaking changes

None. `sample` is renamed `vertices`; its other callers,
`arc_tessellation_study.py` and `saved_mesh_status_vs_ifc.py`, are
updated. A search of `tools/` finds no other.

Review: rvtReview, the maintainer session, wrote this change. As
rvtDevelop is not running, it re-reads the diff and approves the change
itself on a green head (Griffin, 2026-11-12).
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