Skip to content

fix(#319): Intf_Interference O(1) tangent-zone + checkpoint breaker — v1.15.1 - #337

Merged
gsdali merged 4 commits into
mainfrom
fix/319-selfintersection-upstream
Jul 20, 2026
Merged

fix(#319): Intf_Interference O(1) tangent-zone + checkpoint breaker — v1.15.1#337
gsdali merged 4 commits into
mainfrom
fix/319-selfintersection-upstream

Conversation

@gsdali

@gsdali gsdali commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes isSelfIntersecting(hardTimeout:) being unable to interrupt a stuck self-interference search on a pathological artifact (619s+ CPU against a 30s deadline, never returning).
  • Root cause: Intf_Interference::Insert calling Intf_TangentZone::GetPoint(Index) (O(n) per call, no O(1) indexed access) inside a nested comparison loop, plus a total lack of a progress checkpoint below BOPAlgo_CheckerSI::CheckFaceSelfIntersection.
  • Carries Scripts/patches/0010-Intf_Interference-O1-tangent-zone-checkpoint-breaker-319.patch: Intf_TangentZone::Points() caches a random-access array per zone; Intf_Interference::SetBreaker (thread-local, RAII-scoped) lets Insert() poll a Message_ProgressScope every 256 calls and abort, wired into BOPAlgo_CheckerSI's self-intersect functor when single-threaded.
  • Filed upstream as Open-Cascade-SAS/OCCT#1385 (repro) / OCCT#1386 (fix — full CI green across clang-format, ASCII check, all 3 platform builds, and GTest on the first submission).
  • Reproducer committed at Scripts/repro/319-selfintersection/.
  • Full xcframework rebuild (macOS, iOS, iOS simulator); Package.swift bumped to the v1.15.1 binary release.
  • Docs: CLAUDE.md Known OCCT Bugs, docs/CHANGELOG.md, Scripts/patches/README.md, okf/references/carried-occt-patches.md.

Test plan

  • Verified on the linked artifact: 0.5s deadline returns in 0.547s, 30s deadline in 30.1s (vs. 619s+/never on stock), correct HasFaulty() results at every deadline tested (0.5s/1s/2s/3s/5s/30s), clean across a 10x repeated-run stress test
  • Zero regression on clean/overlapping/grid self-intersection sanity cases
  • New upstream GTests (Intf_TangentZone_Test.cxx, Intf_Interference_Test.cxx) pass on Linux/Windows/macOS in OCCT's own CI
  • swift build / swift test green against the rebuilt xcframework: 4415 tests, 1278 suites

🤖 Generated with Claude Code

gsdali and others added 4 commits July 20, 2026 21:15
…aker patch

Local carry of Open-Cascade-SAS/OCCT#1386 (CI green, ready for review),
fixing the isSelfIntersecting hardTimeout: hang on pathological
self-interference artifacts. Xcframework rebuild + release to follow.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…(patch 0010)

CLAUDE.md Known OCCT Bugs entry, CHANGELOG v1.15.1 entry, and the
okf carried-patches reference table. Package.swift binaryTarget comment
lists patch 0010; URL/checksum bump follows once the xcframework rebuild
finishes and is uploaded.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…) + checkpoint breaker)

Full 3-slice rebuild verified against occt-src's current patch set (10
patches, including 0010 for #319). swift build/test green: 4415 tests,
1278 suites.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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