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.
This is the primary Rust geospatial geometry library (`georust/geo`), providing foundational data types (`Point`, `LineString`, `Polygon`, etc.) via `geo-types` and a comprehensive suite of computational geometry algorithms via the `geo` crate. The library implements OGC Simple Feature Access predicates (`Contains`, `Intersects`, `Covers`, `Within`), DE-9IM topological relationships (`Relate`), boolean operations (union, intersection, difference), convex/concave hulls, triangulation (ear-cutting, constrained Delaunay), simplification (Ramer-Douglas-Peucker, Visvalingam-Whyatt), distance calculations across multiple metric spaces (Euclidean, Haversine, Geodesic, Rhumb), spatial indexing (R-tree, ball tree, interval tree), clustering (DBSCAN, k-means), outlier detection (LOF), polygon repair, and validation. It is a library, not an application—no binary entry points, only examples and benchmarks. The codebase is characterized by a trait-oriented design, heavy use of macros to reduce boilerplate, generic numeric types (`GeoFloat`, `GeoNum`), and a metric-space abstraction that allows algorithms to be reused across coordinate systems. It has extensive test coverage including a JTS (Java Topology Suite) conformance test runner, fuzz testing, and criterion benchmarks. The architecture is modular with clear separation between types, traits, algorithms, and testing infrastructure. While generally well-maintained, some legacy modules (`old_sweep`) and deprecated traits exist, and the boolean operations depend on an external `i_overlay` crate.
Chili3D is a web-based 3D CAD application for online model design and editing. It features a modular TypeScript architecture with core packages for foundations, application logic, UI, Three.js rendering, and WebAssembly bindings to OpenCASCADE for CAD operations. The system uses a command pattern with decorators for UI actions, a transaction system for undo/redo, and a plugin architecture for extensibility. Key capabilities include primitive shape creation, Boolean operations, extrusion/revolve/sweep/loft, snapping, measurement tools, document management with IndexedDB persistence, and import/export of STEP, IGES, STL, and BREP formats. The UI implements an Office-style ribbon interface with property panels and hierarchical scene tree. The application is actively maintained with recent commits and demonstrates strong engineering practices in its reactive primitives, plugin system, and serialization framework.
nalgebra is a high-performance linear algebra library for Rust, providing generic static and dynamic matrices/vectors, geometric transformations (rotations, isometries, quaternions, dual quaternions), and a comprehensive set of matrix decompositions (LU, QR, Cholesky, SVD, eigenvalue, Schur, Hessenberg, and more) implemented in pure Rust or backed by LAPACK via the nalgebra-lapack subcrate. The core library emphasizes type-safe dimensions at compile time, generic storage abstractions that support stack-allocated, heap-allocated, and view-based memory, and SIMD acceleration through the simba crate. Additional subcrates extend functionality: nalgebra-sparse handles CSR/CSC/COO sparse matrix formats with operations and IO (Matrix Market), nalgebra-glm provides a GLM-compatible graphics API, and nalgebra-macros offers procedural macros for ergonomic matrix construction. The library is production-grade, with extensive unit and property-based tests (proptest), benchmarks, and CI covering no-std and WASM targets. Its architecture is modular: the base module defines the core matrix type, storage traits, and dimension system; geometry module provides high-level wrappers; linalg module implements decompositions; and each subcrate is independently versioned and tested. The design exhibits strong engineering practices—clean trait boundaries, careful use of unsafe code (documented invariants), and macro-driven operator overloading to reduce boilerplate. While some modules (sparse, GLM) are less mature than the core, the library remains actively maintained and widely adopted in robotics, graphics, and scientific computing. Notable reusable components include the SparsityPattern structure for CSR/CSC index management, the Matrix Market parser (PEG-based), and the procedural macros for compile-time validated matrix literals. These components encapsulate non-trivial domain logic and could be adapted for other Rust linear algebra libraries with minimal modification.
Shapely is a mature Python library for manipulation and analysis of planar geometric objects, serving as the computational geometry backbone for the geospatial Python ecosystem (GeoPandas, Fiona, etc.). It wraps the GEOS C++ library (the engine of PostGIS) and exposes both an object-oriented geometry interface (Point, LineString, Polygon, collections) and vectorized NumPy universal functions for high‑performance array operations on geometry arrays. Architecturally, the library consists of a C extension (`shapely.lib`) that provides a `Geometry` type and registers dozens of ufuncs, each wrapping a GEOS function. The Python modules in `shapely/` (constructive, predicates, measurement, set_operations, io, strtree, etc.) provide the public API, using decorators like `@multithreading_enabled` and `@requires_geos` to manage thread safety and version gating. The `STRtree` class (packed R‑tree) offers spatial indexing with `query`, `nearest`, and `query_nearest`. Key entry points include the top-level functions in `shapely/__init__.py` (e.g., `contains`, `intersection`, `buffer`, `from_wkt`), the geometry classes in `shapely/geometry/`, and the I/O and transformation utilities. The codebase is well-tested (300+ test files) and continuously integrated across GEOS 3.10–3.14 and multiple Python versions.
pythonocc-core is a Python binding for the OpenCASCADE Technology (OCCT) 3D CAD kernel, providing full access to OCCT's geometry, topology, visualization, and data exchange capabilities. It is a library, not a standalone application, designed for engineers and developers building CAD/CAE/PLM tools in Python. The architecture is a C++ extension module generated via SWIG, with a thin Python layer that adds convenience utilities, multiple display backends (Qt, wxPython, Tkinter, WebGL/Jupyter), and high-level helpers for shape creation, topology traversal, and file I/O (STEP, IGES, STL, glTF, OBJ, PLY). The core API mirrors OCCT's class hierarchy, while the `OCC.Extend` and `OCC.Display` packages provide Pythonic wrappers and interactive 3D viewers. The repository is actively maintained, with recent releases (7.9.3) and CI pipelines for conda packages across platforms. It includes extensive type stubs for IDE support, a comprehensive test suite, and support for offscreen rendering and Jupyter notebooks. Key entry points include `OCC.Display.SimpleGui.init_display()` for interactive viewers, `OCC.Extend.DataExchange.read_step_file()` for CAD file import, and `OCC.Core.Tesselator.ShapeTesselator` for mesh generation. The codebase demonstrates strong engineering practices with reusable patterns like the topology explorer, shape factory utilities, and a generic proxy pattern for OCCT objects. However, the SWIG-generated wrapper layer is large and fragile, requiring careful version alignment with OCCT, and some OCCT classes remain unwrapped.
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.
geometry3Sharp is a comprehensive C# library for 2D/3D geometric computing and triangle mesh processing. It provides a rich set of data structures (dynamic mesh, spatial indices, graphs) and algorithms (mesh editing, remeshing, simplification, boolean operations, distance queries, implicit surfaces, hole filling, smoothing, deformation). The library also includes I/O for common mesh formats (OBJ, STL, OFF), numerical solvers (sparse CG, SVD, eigen), and utilities like parallel loops and memory-efficient containers. It is designed for integration into real-time applications and Unity via conditional compilation. While the codebase shows signs of long development with some incomplete features and deprecated APIs, it remains a powerful and well-crafted tool for geometry processing tasks.
This repository reproduces the AlphaGeometry system (DD+AR and neural language model) from the Nature 2024 paper on automated theorem proving for olympiad-level geometry. It combines a symbolic deduction engine (DD) with algebraic reasoning (AR) and a transformer-based language model that suggests auxiliary constructions. The codebase includes problem files in a custom DSL, a large set of deduction rules, and a 150M-parameter transformer model. While not a production application, it provides a well-structured research codebase with clean module separation, comprehensive unit tests, and several reusable components such as a generic beam search implementation, algebraic reasoning tables, and proof traceback utilities. The repository is somewhat stale (last updated in 2023) and has many open issues; dependency pinning is strict but external dependencies like Meliad and a model checkpoint introduce reproducibility risks.