Skip to content

fix: IsInnerShell and PointsInFace run on the caller's B-rep (region nesting) - #714

Merged
bherbruck merged 8 commits into
tangency-labs:mainfrom
brett19:fix/region-nesting-inner-shell-trims
Oct 24, 2026
Merged

bherbruck merged 8 commits into
tangency-labs:mainfrom
brett19:fix/region-nesting-inner-shell-trims

Conversation

@brett19

@brett19 brett19 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

This continues #694, which was closed once #697 merged. #697 ported the face-bound trimmed surface cache, which removed #694's blocker: the 14 IsInnerShell deferrals in topology.topology_traverser. What #694 still adds on top of main is below. The branch is the same one, merged with #697 and the latest main.

Root cause (from #694)

  • topology_traverser::is_inner_shell ran its rays and GetPointsInFace on a b.clone() scratch copy, and points_in_face ran CalculateUVDomainFromUVTrimCurves and its iso-line CurveOnClassify on further copies.
  • Upstream's const face queries leave the UV trim curves they create on the B-rep, so C++ exported stored trims that Rust lacked. For brep_p6 two_disjoint_cubes, geom.len was cpp 1385 against rust 1232. 18 of 33 trims landed on copies, all of them from is_inner_shell.

Changes

  • IsInnerShell, GetPointsInFace and Shell::is_inner_shell take &mut Brep and run on the caller's B-rep instead of a scratch copy.
  • The iso-line classification copies the UV trims, tolerance growth and gap caches back from its CurveOnClassifyCache snapshot.
  • Traverser runner change, findings entries and unit notes.

Results (local, at a1207b9)

  • topology.brep_p6 goes green, 595/595. The 7 region-nesting cases now match C++ bit for bit, Mark2 included, and their known_mismatches.toml entries are removed: two_cubes_at_a_vertex, two_disjoint_cubes, cube_in_cube, cube_with_wire, cube_with_inner_wire, cube_with_inner_vertex, cube_with_outer_vertex.
  • Still parked: primitive_creation_p2/skin_concentric_loops (record[7] cpp 1, rust 2) and sweep.api_surfaces/skin_primitive_annular (faces[1] cpp 1, rust 2). Rust builds the annular cap as two faces instead of one face with a hole. Their entries stay, with an updated reason and a findings entry. The cause is not narrowed to a call yet.
  • No other count changes: topology.topology_traverser stays 909/909 and topology.shell 911/911. topology.face_p2, query.face_p2, topology.brep_p7, topology.brep_p5, topology.brep_p10 and primitive_creation_p2 match main.
PASS    topology.brep_p6 cases=595 passed=595 failed=0 deferred=0
PASS    topology.topology_traverser cases=909 passed=909 failed=0 deferred=0
PASS    topology.shell cases=911 passed=911 failed=0 deferred=0

Local checks: clippy clean with the cpp feature, and 2085 lib tests pass. CI runs the full sweep.

🤖 Generated with Claude Code

brett19 and others added 7 commits October 23, 2026 17:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IsInnerShell ran its rays and PointsInFace on a copy of the B-rep, and
PointsInFace's UV-domain and curve classification on further copies, so
the UV trim curves upstream's const face queries leave on the B-rep were
dropped. Run them on the caller's B-rep and copy the classification
snapshot's trims and tolerance growth back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in its rays

Running IsInnerShell in place fixes the brep_p6 geometry but turns 14
topology.topology_traverser passes into deferrals at the face-owned
trimmed surface cache: the scratch copy used to drop surface owners.
Record the blocker and the proposed follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…shell-trims

# Conflicts:
#	crates/difftest/known_mismatches.toml
…cy-labs#697's kept trimmed caches

Merged tangency-labs#697 (face surfaces keep their trimmed caches; IntersectTSBound's cached
branch and its mark). The 7 brep_p6 region-nesting known mismatches now pass and are
removed; the unit is green (595/595). The two skin annulus cases still differ (the cap
comes out as two faces) and stay listed with a findings entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ner-shell-trims

# Conflicts:
#	crates/difftest/known_mismatches.toml
@brett19
brett19 marked this pull request as ready for review October 24, 2026 03:56
@bherbruck
bherbruck added this pull request to the merge queue Oct 24, 2026
Merged via the queue into tangency-labs:main with commit 0d99454 Oct 24, 2026
7 checks passed
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.

2 participants