$npx skillfedfor your agent

mapbox-earcut

Python bindings for the mapbox earcut C++ polygon triangulation library

Worth itPyPI MathematicsReleased Nov 20253.1M downloads / mopermissive licensePlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — mapbox_earcut-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl · mapbox_earcut-2.0.0-cp310-cp310-macosx_11_0_arm64.whl · mapbox_earcut-2.0.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
v2.0.0 · released 2025-11-16 · Python >=3.9 · 1 runtime deps: numpy

Yes. The package is actively maintained, permissively licensed, has no known vulnerabilities, and solves a specific computational geometry problem efficiently. Install it if you need fast, robust polygon triangulation with holes support; skip it if you only work with simple convex polygons or have no triangulation requirement.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires numpy; input vertices must be a 2D array and rings array must specify end-indices for each polygon ring.
  • Medium install friction due to compiled wheels, but well-supported across Python 3.9–3.14 and multiple platforms (macOS, Linux, Windows, ARM).
  • Active maintenance with recent commits.

License · maintenance · safety

permissive license (permissive) — ISC License (permissive) allows commercial and private use with minimal restrictions.

last release 2025-11-16 (271 days) · last repo commit 2026-08-10 · 40 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,071,615 downloads/mo, #2,767 on PyPI

Verify before relying

import mapbox_earcut as earcut
import numpy as np

verts = np.array([[0, 0], [1, 0], [1, 1]]).reshape(-1, 2)
rings = np.array([3])
result = earcut.triangulate_float32(verts, rings)
  • Whether the library's robustness claims (handling degeneracies and self-intersections) are validated by test coverage or real-world usage reports.
  • Performance benchmarks compared to other triangulation libraries for typical polygon sizes.
Same gist for agents: .md · .json

What it is and what it does

mapbox_earcut is a Python wrapper around the C++ Mapbox Earcut library, a fast polygon triangulation engine. It takes a 2D polygon (with optional holes) and returns triangle indices that decompose the polygon into a mesh. The algorithm uses z-order curve hashing to optimize performance and is designed to handle practical geographic and geometric data that may contain holes, twisted edges, or self-intersections—though it does not guarantee mathematically perfect results in all edge cases, only acceptable practical outcomes.

The package exposes four type-specific triangulation functions (float32, float64, int32, int64) to match your vertex data type, and depends only on numpy. It supports Python 3.9 through 3.14 with prebuilt wheels for most common platforms, making installation straightforward despite the compiled C++ backend.

Use it for

  • Triangulate geographic boundaries (country borders, city limits) for rendering or spatial analysis.
  • Convert complex 2D shapes with holes into triangle meshes for graphics rendering or physics simulation.
  • Decompose architectural floor plans or CAD drawings into triangles for computational geometry operations.
  • Prepare polygon data for WebGL or other graphics pipelines that require triangle primitives.
  • Batch-process large sets of polygons in geospatial or mapping applications.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, permissively licensed, has no known vulnerabilities, and solves a specific computational geometry problem efficiently. Install it if you need fast, robust polygon triangulation with holes support; skip it if you only work with simple convex polygons or have no triangulation requirement.

Install

mapbox-earcut on PyPI

Before you install

Medium install friction due to compiled wheels, but well-supported across Python 3.9–3.14 and multiple platforms (macOS, Linux, Windows, ARM). Active maintenance with recent commits.

Requires numpy; input vertices must be a 2D array and rings array must specify end-indices for each polygon ring.

License in practice

ISC License (permissive) allows commercial and private use with minimal restrictions.

Quickstart

import mapbox_earcut as earcut
import numpy as np

verts = np.array([[0, 0], [1, 0], [1, 1]]).reshape(-1, 2)
rings = np.array([3])
result = earcut.triangulate_float32(verts, rings)

Verify before relying

  • Whether the library's robustness claims (handling degeneracies and self-intersections) are validated by test coverage or real-world usage reports.
  • Performance benchmarks compared to other triangulation libraries for typical polygon sizes.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionMedium. Platform-specific wheel
Runtime dependencies
1 package
numpy
MaintenanceActively maintained 271 days since the last release
Last repo commit
First released
Downloads3,071,615 / month, #2,767 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: ISC License (ISCL)Programming Language :: C++Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Free Threading :: 1 - Unstable

Evidence: mapbox_earcut-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl; mapbox_earcut-2.0.0-cp310-cp310-macosx_11_0_arm64.whl; mapbox_earcut-2.0.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; mapbox_earcut-2.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; mapbox_earcut-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl; mapbox_earcut-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl; mapbox_earcut-2.0.0-cp310-cp310-win32.whl; mapbox_earcut-2.0.0-cp310-cp310-win_amd64.whl; mapbox_earcut-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl; mapbox_earcut-2.0.0-cp311-cp311-macosx_11_0_arm64.whl; mapbox_earcut-2.0.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; mapbox_earcut-2.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; mapbox_earcut-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl; mapbox_earcut-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl; mapbox_earcut-2.0.0-cp311-cp311-win32.whl; mapbox_earcut-2.0.0-cp311-cp311-win_amd64.whl; mapbox_earcut-2.0.0-cp311-cp311-win_arm64.whl; mapbox_earcut-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl; mapbox_earcut-2.0.0-cp312-cp312-macosx_11_0_arm64.whl; mapbox_earcut-2.0.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Tags

Capabilities
polygon triangulation2d mesh generationearcut algorithmpolygon decompositioncomputational geometrymesh triangulationpolygon holes
Topics
computational-geometrymesh-generationgeospatial

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “polygon triangulation”

  • mapbox-earcutFast 2D polygon triangulation using the Mapbox Earcut algorithm, with…
  • bermudaProvides Rust-accelerated triangulation functions for 2D paths and…
  • triangleTriangle wraps Jonathan Richard Shewchuk's C library to generate…

Give your agent the search over MCP, or paste the wish link into any chat.

More Mathematics packages

networkx Worth it
PyPI · Python Modules · released Dec 2025

NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.

BSD-3-Clausepure Python
290.9Mdownloads / mo
kiwisolver Worth it
PyPI · Mathematics · released Mar 2026

kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.

Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.

BSD-3-Clausecompiled wheel · 3.10+
205.5Mdownloads / mo
sympy Worth it
PyPI · Scientific/Engineering · released Apr 2025

SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.

BSD-3-Clausepure Python · 3.9+
196.4Mdownloads / mo
contourpy Worth it
PyPI · Information Analysis · released Jul 2025

ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.

BSD-3-Clausecompiled wheel · 3.11+
191.2Mdownloads / mo
torch With conditions
PyPI · Software Development · released Jul 2026

PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.

Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MITcompiled wheel · 3.10+
102.5Mdownloads / mo
onnxruntime Worth it
PyPI · Software Development · released Jul 2026

onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.

Install it if you have ONNX models to run in production or development.

MITcompiled wheel · 3.11+
89.3Mdownloads / mo

See also bermuda · triangle · pyclipper · cytriangle · shapely-polyskel · quadrilateral-fitter · gdstk · vhacdx · pygeoif