cytriangle
Object-oriented Cython wrapper of Shewchuk's Triangle Library
What it is and what it does
CyTriangle is a Cython-based wrapper around Jonathan Shewchuk's Triangle library, a well-established tool for generating Delaunay triangulations, constrained Delaunay triangulations, Voronoi diagrams, and high-quality triangular meshes. The wrapper provides an object-oriented Python interface to make Triangle's functionality more accessible and easier to inspect and modify within Python workflows.
The package targets scientific and engineering applications, particularly finite element analysis where mesh quality is critical. It depends on numpy and is distributed as compiled wheels for Python 3.11–3.14 across macOS, Linux, and Windows. The project is in beta status with aging maintenance, but remains unarchived and has received no reported security vulnerabilities.
Use it for:
- Generate high-quality triangular meshes for finite element analysis simulations.
- Compute Delaunay triangulations and Voronoi diagrams for computational geometry tasks.
- Create constrained triangulations where certain edges or regions must be preserved in the mesh.
- Build mesh preprocessing pipelines in Python that require quality control and angle constraints.
- Inspect and modify triangle mesh objects programmatically after generation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
CyTriangle wraps Jonathan Shewchuk's Triangle library via Cython to generate Delaunay triangulations, constrained Delaunay triangulations, Voronoi diagrams, and high-quality triangular meshes suitable for finite element analysis.
Yes, if you need Delaunay triangulation or mesh generation for finite element analysis or computational geometry. The package is stable (beta status, no known vulnerabilities), supports current Python versions, and wraps a mature underlying library. Install friction is moderate due to compiled wheels. The copyleft LGPL 3.0 license requires attention if you plan to distribute derivative work. Maintenance is aging but the repository remains active.
Install
cytriangle on PyPI
pip
pip install cytriangleuv
uv add cytrianglepoetry
poetry add cytriangleInstalling cytriangle
Before you install
Medium install friction due to compiled wheels for Python 3.11–3.14 on macOS, Linux, and Windows. Maintenance is aging—last commit was 2026-01-22—but the repository remains active and unarchived.
License in practice
Licensed under LGPL 3.0 (copyleft). Any derivative work or modification must be distributed under compatible terms; static linking or proprietary use may require legal review.
Quickstart
pip install cytriangle
import cytriangle
# Create a Triangle instance and generate a mesh
tri = cytriangle.Triangle()
tri.triangulate()
Requires Python 3.11 or later; compiled wheels are provided for common platforms but source builds may require a C compiler.
Verify before relying
- Whether the object-oriented interface supports direct inspection and modification of triangle mesh properties beyond what the underlying Triangle library exposes.
- Performance characteristics and memory overhead of the Cython wrapper compared to direct Triangle library calls.
- Availability and completeness of documentation for the wrapper's API.
Package facts
| License | LGPL 3.0 (copyleft) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | aging — 204 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,192/month — #14,863 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cytriangle-3.0.2-cp311-cp311-macosx_15_0_arm64.whl; cytriangle-3.0.2-cp311-cp311-macosx_15_0_x86_64.whl; cytriangle-3.0.2-cp311-cp311-manylinux_2_39_x86_64.whl; cytriangle-3.0.2-cp311-cp311-win_amd64.whl; cytriangle-3.0.2-cp312-cp312-macosx_15_0_arm64.whl; cytriangle-3.0.2-cp312-cp312-macosx_15_0_x86_64.whl; cytriangle-3.0.2-cp312-cp312-manylinux_2_39_x86_64.whl; cytriangle-3.0.2-cp312-cp312-win_amd64.whl; cytriangle-3.0.2-cp313-cp313-macosx_15_0_arm64.whl; cytriangle-3.0.2-cp313-cp313-macosx_15_0_x86_64.whl; cytriangle-3.0.2-cp313-cp313-manylinux_2_39_x86_64.whl; cytriangle-3.0.2-cp313-cp313-win_amd64.whl; cytriangle-3.0.2-cp314-cp314-macosx_15_0_arm64.whl; cytriangle-3.0.2-cp314-cp314-macosx_15_0_x86_64.whl; cytriangle-3.0.2-cp314-cp314-manylinux_2_39_x86_64.whl; cytriangle-3.0.2-cp314-cp314-win_amd64.whl
Keywords: finite-element-analysis, triangular-meshing, mesh, FEA, triangle
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
cmeel-qhullProvides precompiled qhull binaries (convex…
unclear · top 15,000 on PyPI
tetgentetgen wraps the TetGen C++ library to generate…
permissive · top 15,000 on PyPI
triangleTriangle wraps Jonathan Richard Shewchuk's C…
copyleft · top 15,000 on PyPI
trianglesolverSolves for unknown sides and angles of a…
permissive · top 15,000 on PyPI
PyNiteFEAPyNiteFEA performs 3D elastic structural finite…
permissive · top 15,000 on PyPI
pymeshfixPyMeshFix repairs triangular meshes by removing…
agpl · top 15,000 on PyPI
scikit-femTransforms bilinear and linear forms into…
permissive · top 15,000 on PyPI
gmshGmsh is a three-dimensional finite element mesh…
copyleft · top 15,000 on PyPI
mapbox-earcutFast 2D polygon triangulation using the Mapbox…
permissive · top 5,000 on PyPI
xatlasGenerates UV texture coordinates for 3D…
permissive · top 15,000 on PyPI