Add core ambient_occlusion binding (#282); fix tutorial exact_geodesic call (#284) - #306
Open
alecjacobson wants to merge 1 commit into
Open
Add core ambient_occlusion binding (#282); fix tutorial exact_geodesic call (#284)#306alecjacobson wants to merge 1 commit into
alecjacobson wants to merge 1 commit into
Conversation
…c call (#284) #282: The ambient_occlusion binding only existed in the embree submodule, so `igl.ambient_occlusion(...)` raised AttributeError on wheels built without embree. libigl has an embree-free overload in core (igl::ambient_occlusion( V, F, P, N, num_samples, S)), so bind it as igl.ambient_occlusion. Now available in every wheel; the embree-accelerated variant remains at igl.embree.ambient_occlusion. Adds a test. #284: The chapter 1 tutorial called `igl.exact_geodesic(v, f, vs, vt)`, but the current signature is (V, F, VS, FS, VT, FT). The 4th positional arg bound the target vertices to FS, leaving VT/FT empty, so the result was an empty array. Fixed the notebook cell to `igl.exact_geodesic(v, f, VS=vs, VT=vt)`. The binding itself was already correct. Full suite: 92 passed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves two issues from the triage.
#282 —
igl.ambient_occlusionmissingambient_occlusionwas only bound in the embree submodule(
igl.embree.ambient_occlusion), soigl.ambient_occlusion(...)raisedAttributeError— and pip wheels built without embree had it nowhere.libigl ships an embree-free overload in core
(
igl::ambient_occlusion(V, F, P, N, num_samples, S), which builds an AABB andshoots rays with libigl's own intersector). This PR binds it as the core
igl.ambient_occlusion, so it's available in every wheel. Theembree-accelerated variant stays at
igl.embree.ambient_occlusion.Matches the exact call the reporter tried:
igl.ambient_occlusion(V, F, P, N, num_samples).Adds
test_ambient_occlusion(convex mesh → outward normals occlude ~nothing;inward normals become substantially occluded; deterministic).
#284 —
exact_geodesicreturns an empty arrayThe binding was fine; the chapter-1 tutorial was calling the old signature:
The current signature is
(V, F, VS, FS, VT, FT), sovtbound toFSandVT/FTstayed empty → output length#VT + #FT == 0→ empty array. Fixed thenotebook cell to name the arguments:
Testing
Built and ran the full suite locally: 92 passed.
🤖 Generated with Claude Code