Integrate Python and C++ with pybind11
summary
Shows how to expose parts of the Seagull computational-geometry library (constrained/conforming triangulation, meshing, Lloyd optimization) to Python using pybind11 header-only C++11, CMake and a setup.py glue layer, wrapping value types, overloaded methods, iterator ranges and ownership semantics. Demonstrates making points hashable and iterable, building a Python API that calls into C++ and returns data structures, and producing 89,000 vertices and 178,000 triangles in about a second. Includes practical patterns like make_iterator and typed_input_iterator for Python/C++ iteration.
AI-written summary · about
chapters (17)
- 0:00Start
- 4:17Boost Python
- 5:27Extend Python with C + +
- 6:34Embedding
- 9:41Main Program
- 9:53Unrolled Loop
- 10:20Constraints
- 10:46Emeasure
- 19:46Insert the Points into the Triangulation
- 21:59Properties
- 24:55Numpy
- 25:29Insert Method
- 26:07Insert the Constraints
- 27:19Seed Points
- 31:01Refine the Mesh
- 41:47Do I Recommend Pi Bind 11
- 47:41Gdb Plugins
related talks
05mPybind11 - Python on Steroids
29mGenerating Python bindings to C++ libraries
01h 02mWriting Python Bindings for C++ Libraries: Easy-to-use Performance
36mIntroduction to C++ python extensions and embedding Python in C++ Apps
15mUsing Reflection to Generate C++ Python Bindings
25m"Boosting Python Numeric Computations with Dynamic C++ Integration"
49mOttergon: Modern Ways of Writing Bindings
25mHow to bring your C++ project to Python land
