CGAR (Computational Geometry Algorithms for Rust) is an early-stage project aimed at becoming a functional equivalent to CGAL in Rust.
The goal is to provide robust and efficient algorithms for computational geometry, meshes, and geometric predicates—fully in safe Rust.
There is not yet a stable or usable release. APIs may change at any time.
That said, the project already includes a solid foundation for building geometry-heavy applications and welcomes early adopters and contributors.
-
Scalar types
- 64-bit floats (
f64) - Exact rationals (
rug::Rational) - Lazy-exact scalars (approximate until exact evaluation is required)
- 64-bit floats (
-
Algorithms
- Constrained Delaunay Triangulation (CDT)
- Mesh corefinement
- Boolean operations: difference, union, intersection
- Isotropic Remesh (no support for feature preservation yet)
- Common predicates (e.g. point-in-mesh, point-on-border, plane side tests, etc)
- AABB trees and spatial search structures
- Topologically consistent mesh opperations (e.g.: edge/face splitting, edge collapse)
Planned areas of development include:
- Robust 2D/3D polygon mesh operations
- Isotropic remeshing
- Mesh simplification
- Poisson reconstruction
- Alpha wrapping
- More exact geometric predicates
- Performance improvements (parallelization, SIMD, etc.)
Add CGAR to your Cargo.toml:
[dependencies]
cgar = "0.2"