Skip to content

Triangulation_3: add Python bindings for Delaunay triangulation with vertex info#307

Open
krizz711 wants to merge 2 commits intoCGAL:mainfrom
krizz711:python-bindings/triangulation-vertex-info-288
Open

Triangulation_3: add Python bindings for Delaunay triangulation with vertex info#307
krizz711 wants to merge 2 commits intoCGAL:mainfrom
krizz711:python-bindings/triangulation-vertex-info-288

Conversation

@krizz711
Copy link
Copy Markdown

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:

  • Triangulation_vertex_base_with_info_3
  • Delaunay_triangulation_cell_base_3

Solution

  • Added includes and typedefs in typedefs.h for a new
    CGAL_DT3_with_info type using double as vertex info
  • Exposed Delaunay_triangulation_3_with_info class in
    CGAL_Triangulation_3.i outside the USER_PACKAGE ifdef block
  • Added Python example test_triangulation_3_with_info.py
    with a working test (6 vertices inserted and verified)

Testing

Tested locally — build succeeds and test passes:

Number of vertices: 6
Test passed!

Krizz711 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
@krizz711 krizz711 changed the title Python bindings/triangulation vertex info 288 Triangulation_3: add Python bindings for Delaunay triangulation with vertex info Mar 27, 2026
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.

Triangulations with vertex info?

1 participant