Repository navigation
fix(saved-graphics): count cylinder trim crossings inside each strip - #2106
Conversation
Use open midpoint membership to exclude edges that lie outside thin strips. The synthetic cylinder contract reproduces the odd crossing and verifies the cutout area.
…and_mesh, in place of a synthetic-graph contract (DrunkOnJava#2106)
…e, which a joined strip edge can fall just outside (DrunkOnJava#2106)
|
Thanks @DrunkOnJava. I built and tested The next refusal I can still reproduce is |
|
Rows for this PR, registered before its Measure is read. The run is 44691150568: head
If they hold, this goes for review and lands. If a body moves that has no two-loop cylinder face, or a reason rises, that body is read before anything else. A fuller review follows. |
|
Thank you, @shifatrHtH. This is a real fault in what #2102 landed, and the fix is the right one: a ring edge counts for a strip only where it crosses the strip's midpoint. What else it changes, and one more line. The old check also dropped any ring edge less than 1e-9 wide in U; the midpoint rule counts such an edge in the strips it spans. The test, moved (
All three pass in CI's lib tests on Your midpoint change is as you wrote it. The fragment and the PR body's Changes say what changed, with a note of mine in the body. The rows for its Measure are registered in the comment above; I will post what the run shows against them. Your next refusal, |
|
@DrunkOnJava I ran the exact
The trace labels the existing failure with the neighbour's class and counts the linked trim loops on that same face. These are face refusal occurrences across the tested bodies. They include two occurrences on each of the nine bodies with the new refusal. I checked that removing the diagnostic suffix yields the exact uninstrumented diagnostic counts, and the control mesh buffers match byte for byte. I can test a follow-up against this same local set. |
|
The registered rows hold on the full Measure (44691150568,
So this goes for review. The clamp in |
|
Thanks for checking the 84 changed mesh records and the scorer rows, @DrunkOnJava. One clarification for row 2: the first scratch run predated the clamp. The later count includes the clamp at exact |
|
@DrunkOnJava I followed the remaining plane-to-cylinder refusal on the merged
The ordering check points toward a small disagreement between the two saved parameterizations. Do you have a source-backed rule for which face's samples take precedence on this edge, or a way to reconstruct an edge both loops agree on before tessellating? I can test a bounded candidate against this local fixture and the controls. |
…lane's shared edge that the saved-mesh reader refuses as disagreeing, and the scorer reads which of them Revit's points follow (#2106)
…d edge, its ends included, leaves the plane's ring ends on those samples out of the floors, and prints each edge with --per-gap (#2106)
|
@shifatrHtH, I missed this (your comment); sorry for the slow answer. Which face's samples take precedence: no source-backed rule. Nothing rvt-rs reads says which face's samples win on such an edge. revit-ifc documents what Revit's exporter writes, not how Revit's tessellator meets two parameterizations of one edge, so it cannot give one either (CLEANROOM.md). Rebuilding an edge both loops agree on: for an edge that crosses both of the cylinder's parameters, as yours do, that already exists once the saved samples agree.
So what lacks a rule is only which saved samples the rebuild starts from. Measured on two public files.
The exports' diagnostics name only an element's first refusal reason, so they undercount. In a full Measure run of The BIM4LCA housing (Measure 44946322653, against Revit's IFC4 Reference View export). Its 40 shared edges are one family's 8 edges, the basin
Snowdon Towers Architectural: no rule. 20 elements reach a plane refused this way, with 82 shared edges, all with a cylinder, whose two faces' samples are more than 0.0000001 ft apart. The largest separation is 0.00012 ft (0.036 mm).
So neither file shows one face's samples taking precedence as a rule. The only middle samples where one face's sample has a Revit point and the other's none are the basin's 2 cone edges, where it is the cone's. On your save, the same build gives the same reading for your edges: The install and Windows notes are those on #2085 (the rows there). Your 18 came from |
|
@DrunkOnJava, I ran the exact The earlier 18 counted refused planar-face occurrences on main. The new 72 counts disputed shared edges in the research build. After excluding ring ends on disputed samples, 144 closed-end control rows remain, covering all nine targets reached by the edge probe. The Revit-side read still needs an IFC export of this exact save. The RVT run establishes where the two stored placements are distinguishable at the minimum tolerance. The plane, cylinder, both and neither counts remain pending the same-save reference and its measured floor. Your two public cases are useful controls for the fact that a single face does not always win. |
|
@shifatrHtH, thank you for the run (your comment). That is the full reading the build gives without Revit's side: 72 plane-to-cylinder edges whose two faces' samples are more than twice the scorer's minimum tolerance of 0.00001 ft apart at all 216 samples, and no unread edge. Which face's samples Revit's points sit on waits for an IFC export of that save, as you say. With one, the same scorer command gives it per edge on its |
Summary
Count a cylinder trim edge only when it crosses the midpoint of the open U strip. The endpoint tolerance still checks that the edge spans the strip.
Motivation
The two-loop cylinder path added by #2102 can count an edge outside a very narrow strip. It retains U knots at a tighter tolerance than the endpoint coverage check. On the synthetic two-ring case the wider check counts five crossings where the midpoint has four, and refuses the trim.
Changes
band_mesh.Add a synthetic cylinder contract through the public research decoder.The case is tested besideband_meshas a pure helper's failure modes (327a710f, by the maintainer; see the review comment), and05b94b05keeps each crossing on its ring edge.Testing
d450e954with the new contract fails withcylinder trim rings cross a strip an odd number of times.cargo test --offline -p rvt --profile ci --test integration cylinder_trim_contract::passes. The recovered synthetic UV area is3.000000000600.cargo fmt --all -- --check,tools/ci/verify-real-files.sh --check-only, andpython3 tools/release/changelog.py checkpassed.tools/check-local.shpassed with its default checks. The optional external corpus and new Measure run remain pending.Maintainer's note: the first commit's contract is now three tests in
src/research/native_saved_mesh.rs's test module, which CI'scargo test --profile ci --libruns (all three pass on05b94b05); the Testing lines above describe the first commit.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.
Output samples
Related issues
Refs #1191 and #2102. Follow-up to the synthetic reproduction.