CGAL

CGAL/cgal

C++ No license Science

The public CGAL repository, see the README below

6k stars
1.6k forks
active
GitHub +11 / week

6k

Stars

1.6k

Forks

676

Open issues

30

Contributors

v6.2 11 Jun 2026

AI Analysis

CGAL is a comprehensive C++ library providing efficient, reliable algorithms for computational geometry, serving researchers, engineers, and developers who need robust geometric computations like triangulation, convex hulls, mesh processing, and Voronoi diagrams. It is purpose-built for computational geometry specialists and is not a general-purpose math library; users outside geometric algorithm domains will find limited relevance.

Science Library Discovery value: 3/10
Documentation 8/10
Activity 9/10
Community 9/10
Code quality 6/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

computational-geometry mesh-processing algorithm-library geometric-computing c++-template-library
Actively maintained Well documented Niche/specialized use case Popular Production ready
Deep Analysis · Based on README and public signals
2w ago

CGAL: The C++ computational geometry library powering geometry processing across academia and industry for 30 years

CGAL (Computational Geometry Algorithms Library) provides rigorously implemented, mathematically robust algorithms for computational geometry in C++. Its scope spans 2D/3D triangulations, mesh generation, Boolean operations, convex hulls, surface reconstruction, polygon operations, and much more. It targets researchers, engineers, and software developers who need correct-by-construction geometry algorithms — not approximate shortcuts. Since version 5.0, it is header-only, easing integration. Used in CAD, GIS, robotics, scientific computing, and medical imaging.

Origin

Initiated in the mid-1990s as a European research collaboration, CGAL has grown over ~30 years into one of the most comprehensive and mathematically rigorous geometry libraries in existence. Its GitHub mirror has been active since 2014.

Growth

CGAL's growth has been steady rather than explosive, driven by enduring demand in scientific computing, CAD/CAM, and GIS. The move to a header-only library in version 5.0 reduced adoption friction. Star growth is modest (~12/week) but the project is not competing for developer mindshare in the same way consumer libraries do — its audience is technical and stable.

In production

CGAL is widely cited in academic literature (thousands of papers), is packaged in major Linux distributions (Debian, Ubuntu, Fedora, Homebrew), and is a dependency of prominent tools including Blender (historically), OpenSCAD, QGIS, and various CAD/medical imaging pipelines. Adoption at production scale is well-established and documented externally.

Code analysis
Architecture

Appears to be organized as a collection of modular packages (e.g., Convex_hull_2, Triangulation_3), each in its own subfolder. Since version 5.0 the library is header-only, likely relying heavily on C++ templates and generic programming idioms. CMake is used as the build system. Dependencies include Boost, GMP, and MPFR based on historical CGAL knowledge and README structure.

Tests

README references a daily testsuite infrastructure (cgal.geometryfactory.com/CGAL/testsuite/) and a dedicated Testsuite package, suggesting extensive automated testing. Exact coverage metrics are not documented in the README.

Maintenance

Last push was 2026-06-25, three days before the evaluation date, indicating highly active development. Releases occur twice a year. A commercial entity (GeometryFactory) provides professional support and drives ongoing development, which is a strong maintenance sustainability signal.

Honest verdict

ADOPT IF: you need mathematically robust, well-tested computational geometry algorithms in C++ and correctness guarantees matter — particularly for mesh generation, triangulation, Boolean operations, or convex hull computations in production or research. AVOID IF: you need a lightweight library, require Python-first bindings, are building real-time performance-critical code where exact arithmetic overhead is unacceptable, or you only need a narrow subset of geometry operations where a simpler library suffices. MONITOR IF: you are evaluating CGAL's newer areas (e.g., alpha shapes, kinetic data structures, machine learning integration) where the API maturity may vary across packages.

Independent dimensions

Mainstream potential

3/10

Technical importance

10/10

Adoption evidence

8/10

Risks
  • Steep learning curve and complex template-heavy API can significantly increase integration time, especially for developers unfamiliar with exact arithmetic or CGAL's kernel concept.
  • Header-only with heavy templates can lead to long compilation times in large projects, which may be impractical in some CI/build environments.
  • License complexity: CGAL uses a dual license (LGPL/GPL depending on package), which may create legal friction in commercial closed-source products without a commercial license from GeometryFactory.
  • Some packages are more mature than others; documentation and API consistency varies across the large number of components, making it difficult to assess the production-readiness of newer packages without external research.
  • Dependency on exact arithmetic libraries (GMP, MPFR) adds build complexity and may be a barrier on platforms where these are not readily available (e.g., embedded systems, WASM).
Prediction

CGAL will continue its stable, incremental growth as the reference computational geometry library for C++, sustained by GeometryFactory's commercial backing and academic demand. It is unlikely to reach mainstream general developer adoption but will remain deeply embedded in specialized pipelines.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

C++
86.2%
Mathematical Programming System
8.4%
TypeScript
3%
CMake
1.1%
Shell
0.2%
Python
0.2%
TeX
0.2%
C
0.1%

Information

Language
C++
License
NOASSERTION
Last updated
1d ago
Created
143mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

cnr-isti-vclab

cnr-isti-vclab/vcglib

VCGlib is a specialized C++ library for triangle mesh processing, manipulation,...

1.3k C++ Science
BrunoLevy

BrunoLevy/geogram

Geogram is a C++ library implementing specialized geometric algorithms for mesh...

2.5k C++ Science
libigl

libigl/libigl

libigl is a C++ geometry processing library that provides algorithms and data...

5k C++ Science
davideberly

davideberly/GeometricTools

Geometric Tools Engine (GTE) is a comprehensive C++14 library for mathematics,...

1.4k C++ Science
libgeos

libgeos/geos

GEOS is a C++ library for performing geometric operations on 2D vector...

1.5k C++ Science
vs. alternatives
libigl

libigl is also header-only C++ and focuses on geometry processing with a more accessible API, especially for mesh operations. It is more approachable for newcomers and integrates easily with Python via bindings. CGAL is broader in algorithmic scope and generally more mathematically rigorous, but steeper to learn.

BrunoLevy/geogram

Geogram focuses on robust mesh generation and remeshing, with strong performance. Its scope is narrower than CGAL. For mesh generation specifically it may be faster; CGAL offers a far wider range of geometric primitives and algorithms.

cnr-isti-vclab/vcglib

VCGlib specializes in triangle mesh processing (it powers MeshLab) and is efficient for that domain. CGAL covers a far broader algorithmic space but is not a drop-in replacement for mesh processing workflows where VCGlib is optimized.

davideberly/GeometricTools

Geometric Tools (formerly Wild Magic) covers similar ground with strong focus on game/simulation math. CGAL has stronger formal guarantees and academic backing; Geometric Tools may be more practical for real-time applications due to design choices favoring speed over exactness.

mlivesu/cinolib

cinolib is a lightweight research-oriented mesh processing library. It is significantly smaller in scope and community than CGAL, targeting rapid prototyping in academia. CGAL is the more mature and comprehensive choice for production geometry pipelines.