Skip to content

Bind exact ray, closest-point, and signed-distance queries - #322

Open
alecjacobson wants to merge 1 commit into
mainfrom
feat/exact-predicate-queries
Open

alecjacobson wants to merge 1 commit into
mainfrom
feat/exact-predicate-queries

Conversation

@alecjacobson

@alecjacobson alecjacobson commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Expose the exact ray and closest-point query APIs now merged in libigl main, including approximate_signed_distance_exact_sign. It returns NumPy arrays (S, I, bary): the sign/zeros of S, selected triangle, and barycentric zero pattern are exact; distance magnitudes and positive weights are approximate.

  • Bind cached and uncached batched signed distances, unsigned closest points, exact triangle/mesh classification and distance comparisons, and exact ray hit classification/order.
  • Add box_simplices, eytzinger_aabb, and callback-based ray traversal so Python callers can build and reuse trees. Expose a reusable feature-exposure cache with copy-returning label accessors. Batch signing releases the GIL and keeps C++ parallelism.
  • Pin libigl to main commit 4f0f2dc489c9842d2f7940022d73e24b66baaf25. Document numerical contracts, mesh preconditions, cache invalidation, and usage in the README and generated docstrings. This PR is independent of the float32-overload and documentation-site PRs.

Validation: full Linux Release source build, including all optional modules; 127 tests passed, 16 Pyodide-only tests skipped. The 15 new tests cover cached/uncached parity, exact shared-feature ties, rounded-away ray determinants, underflow-preserved signs/feature support, array layouts, empty inputs, and propagated callback/worker exceptions. Predicate type stubs parse successfully; the documentation generator and strict MkDocs build from PR #308 pass with all nine locally built modules. Platform CI passes on Linux x64/ARM, macOS Intel/ARM, Windows x64/ARM, and Pyodide (143 tests passed).

Prepared by Codex.

This branch has not been deployed

No deployments
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