skillfed

cytriangle

Object-oriented Cython wrapper of Shewchuk's Triangle Library

cytriangle v3.0.2 74.2K downloads/30d#14,863 on PyPI11
Copyleft license LGPL 3.0 AGING released

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 cytriangle

uv

uv add cytriangle

poetry

poetry add cytriangle

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)License :: Other/Proprietary LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering

Tags

delaunay triangulation pythontriangular mesh generationvoronoi diagram libraryfinite element meshconstrained triangulationtriangle mesh qualitycython triangle wrapper
mesh-generationcomputational-geometryfinite-element

More Scientific/Engineering packages