{"categories":[{"label":"Mathematics","url":"https://skillfed.io/packages/category/scientific-engineering-mathematics"}],"enrichment":{"capability":"Fast 2D polygon triangulation using the Mapbox Earcut algorithm, with support for holes, twisted polygons, and self-intersections.","skillfed_tags":["computational-geometry","mesh-generation","geospatial"],"use_cases":["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."],"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\u2014though it does not guarantee mathematically perfect results in all edge cases, only acceptable practical outcomes.\n\nThe 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.","worth_installing":"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."},"id":"mapbox-earcut","links":{"html":"https://skillfed.io/packages/mapbox-earcut","md":"https://skillfed.io/packages/mapbox-earcut.md","pypi":"https://pypi.org/project/mapbox-earcut/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-11-16","license_spdx":null,"license_treatment":"permissive","name":"mapbox-earcut","python_support":"supports_current","summary":"Python bindings for the mapbox earcut C++ polygon triangulation library"},"popularity":{"monthly_downloads":3071615,"position":2767,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.0.0"}
