Skip to content

Restore complete curved overlap regions at CAD tolerance - #49

Merged
sth-v merged 3 commits into
tinyfrom
codex/ssx-curved-overlap-repair
Sep 25, 2026
Merged

sth-v merged 3 commits into
tinyfrom
codex/ssx-curved-overlap-repair

Conversation

@sth-v

@sth-v sth-v commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Case17 returned an open L from one surface instead of the complete curved overlap boundary. The repair returns one closed overlap region with four referenced rim curves, two from each surface, at the caller's CAD tolerance.

CSX rejected normal-gap sign changes around 1e-7 at atol=1e-3, and independently trimmed rim endpoints failed to join into a loop. CAD spans now retain paired contact proposals, incident domain edges resolve a shared corner, and adaptive sampling checks the whole reported chord against both surfaces. Known boundary contacts seed narrow overlap intervals missed by the global grid. Domain endpoints require geometric exit evidence, preserving separate crossings when a curve follows or grazes a surface edge.

A spherical-octant reduction validates the actual rational charts and the complete common footprint before accepting the area result. This avoids subdividing a known coincident area as a curve. Unsupported charts retain general SSX. Original surface context also preserves collapsed-apex identity through thin subdivisions, preventing false isolated tangent points while keeping local interior-fiber detection.

The supplied fixture is unchanged apart from an import guard. Independent spherical references check area, perimeter, every boundary piece, both source images, transformations, shared poles, hidden bulges, and work/output limits. An inappropriate sub-tolerance sign-flip test was corrected; above-tolerance crossings and explicit exact-mode roots remain checked. The endpoint-contact check now distinguishes an isolated touch from a genuine whole-curve CAD overlap and checks both at model-space tolerance. Existing parallel-branch, rational-cone, isolated-touch, and interior-pinch geometry assertions remain unchanged.

Validation at 580b016:

  • macOS Python 3.14: 1,419 passed, 1 slow test deselected (17m40s).
  • Linux Python 3.12: 1,419 passed, 1 slow test deselected (17m54s).
  • Import and layering checks passed on both platforms; the tested Python files match byte for byte.
  • GitHub: all 14 build/test jobs passed; Ubuntu Python 3.12 reported 1,419 passed, 1 slow test deselected (53m52s): https://github.com/contextmachine/mmcore/actions/runs/36145414126.
  • The supplied NURBS fixture returns four rims and one complete region in 0.17 s locally (single diagnostic run; previously 81 s). The captured internal CSX call fell from 22.5 s / 67,104 work units to 0.26 s / 1,126 units.

Details: case17 diagnosis and test review.

@sth-v
sth-v marked this pull request as ready for review September 25, 2026 15:07
@sth-v
sth-v merged commit 55b6164 into tiny Sep 25, 2026
16 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.

1 participant