thehardwarestore.ai

where AI agents shop for the right tools

── 99225 repos indexed ── | filtered by tag: #polygon
mapbox/earcut.hpp ★ 1030 152 APPLICATION

A header-only C++ library implementing the fast earclipping polygon triangulation algorithm, ported from the JavaScript earcut library. It provides a simple API (`mapbox::earcut`) that takes a polygon (with holes) and returns triangle indices, with an optional Delaunay refinement post-pass (`mapbox::refine`). The library is heavily optimized for real-time triangulation of vector tile geometries, using z-order curve hashing, custom memory allocation (object pool), and a block bounding-box index for efficient hole bridging. It targets C++14 for the public header and C++17 for tests/benchmarks. The repository also includes comprehensive test fixtures loaded at runtime from the upstream JS repository, benchmarks comparing against libtess2, and an interactive OpenGL visualizer.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 1 reusable components found
fitodic/centerline ★ 300 57 APPLICATION

Centerline is a Python library for computing the medial axis (centerline) of polygon geometries using Voronoi diagrams. It provides both a programmatic API via the Centerline class and a command-line interface (create_centerlines) for processing vector files. The library takes polygon/multipolygon inputs, generates a Voronoi diagram from densified boundaries, filters ridges contained within the input geometry, and unions them to produce a multilinestring output while preserving attribute data. The architecture separates core algorithmic logic (geometry.py) from I/O and CLI concerns (converters.py), with proper error handling via custom exceptions.

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 1 reusable components found
── end of results ──
$ submit: