Triangulation_3: add Python bindings for Delaunay triangulation with vertex info#307
Open
Triangulation_3: add Python bindings for Delaunay triangulation with vertex info#307
Conversation
added 2 commits
March 26, 2026 11:06
…vertex info Expose Triangulation_vertex_base_with_info_3 and Delaunay_triangulation_cell_base_3 via a new Delaunay_triangulation_3_with_info binding. Fixes CGAL#288
…vertex info Expose Delaunay_triangulation_3_with_info to allow users to attach custom double data to triangulation vertices from Python. Add new typedefs in typedefs.h and declare the new class in CGAL_Triangulation_3.i outside the USER_PACKAGE ifdef block. Add Python example and test. Fixes CGAL#288
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.
Description:
Fixes #288
Problem
Users cannot attach custom data (e.g. float/double values) to
triangulation vertices from Python because these classes were
missing from the SWIG interface:
Solution
typedefs.hfor a newCGAL_DT3_with_infotype usingdoubleas vertex infoDelaunay_triangulation_3_with_infoclass inCGAL_Triangulation_3.ioutside the USER_PACKAGE ifdef blocktest_triangulation_3_with_info.pywith a working test (6 vertices inserted and verified)
Testing
Tested locally — build succeeds and test passes:
Number of vertices: 6
Test passed!