Conversation
Surface and model self-intersection checks give the AABB a const test and use the returned pairs. The has-intersection checks no longer stop at the first hit: the full search now runs in parallel. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Cpp-Linter Report
|
BotellaA
left a comment
There was a problem hiding this comment.
Maybe remove all false usage like mesh_has_self_intersections()? It may simplify the API?
Summary
Ports the self-intersection checks to the new
AABBTree::compute_self_element_bbox_intersectionscontract from Geode-solutions/OpenGeode#1335: aconst, thread-safe test is passed in, and the kept pairs come back. Depends on OpenGeode#1335, which uses the same branch name so CI picks that build up.Changes
SurfaceMeshIntersections:PolygonPolygonIntersectionbecomes aconsttest. Its result vector, mutex andstop_at_first_intersectionflag are removed.ModelMeshesIntersections:constself_intersect()method, passed through a smallSelfIntersectionTestfunctor. It has to be a functor because-Werror=subobject-linkagerejects a lambda that captures an anonymous-namespace type. Their existingoperator()stays forcompute_other_element_bbox_intersections, which keeps the old contract.ComponentOverlapbecomes a predicate that always returnstrue.Behaviour
mesh_has_self_intersections()and the self part ofmodel_has_intersecting_surfaces()no longer stop at the first hit; the full search runs in parallel. On a valid mesh the work is the same as before.Results
nexttest-section, 20 threadstest-section, 2 cores23/23 tests pass. Across 20 threads (two runs), 1 thread and 2 cores, every self-intersection call returned identical results.
🤖 Generated with Claude Code