Hubbry Logo
CGALCGALMain
Open search
CGAL
Community hub
CGAL
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
CGAL
CGAL
from Wikipedia
CGAL
DeveloperCGAL Open Source Project
Initial release1996
Stable release
6.1 / 1 October 2025; 49 days ago (2025-10-01) [1]
Repository
Written inC++
Operating systemLinux, macOS and Microsoft Windows
TypeLibraries
LicenseLicense
Websitewww.cgal.org

The Computational Geometry Algorithms Library (CGAL) is an open source software library of computational geometry algorithms. While primarily written in C++, Scilab bindings and bindings generated with SWIG (supporting Python and Java for now) are also available.[2][3]

The software is available under dual licensing scheme. When used for other open source software, it is available under open source licenses (LGPL or GPL depending on the component). In other cases commercial license may be purchased, under different options for academic/research and industrial customers.[4]

History

[edit]

The CGAL project was founded in 1996, as a consortium of eight research institutions in Europe and Israel: Utrecht University, ETH Zurich, Free University of Berlin, INRIA Sophia Antipolis, Martin-Luther-University Halle-Wittenberg, Max Planck Institute for Informatics Saarbrücken, Johannes Kepler University Linz, and Tel-Aviv University. The original funding for the project came from the ESPRIT project of the European Union.[5] Originally, its licensing terms allowed its software to be used freely for academic purposes, with commercial licenses available for other uses. CGAL Releases 3.x were distributed under the QPL license. Starting with CGAL 4.0, released in 2012, CGAL is distributed under the GPL version 3. As of 2013 it is managed by a thirteen-member editorial board, with an additional 30 developers and reviewers.[6]

The project started in 1996 as the pooling of the previous efforts of several project participants:PlaGeo and SpaGeo from Utrecht University, LEDA of the Max-Planck-Institute for Informatics and C++GAL of INRIA Sophia Antipolis. The LEDA library encompasses a broader range of algorithms. A comparison of the two libraries is provided by Kettner and Näher.[7] Three CGAL User workshops held in 2002, 2004, and 2008 highlighted research results related to CGAL,[8] and many additional papers related to CGAL have appeared in other conferences, workshops, and journals.[9]

In 2023 the project won the SoCG Test of Time Award[10]

Scope

[edit]

The library covers the following topics:

Platforms

[edit]

The library is supported on a number of platforms:[11]

The CGAL library depends on the Boost libraries, and several CGAL packages on the Eigen C++ library.

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
CGAL (Computational Geometry Algorithms Library) is an open-source C++ software library that provides easy access to efficient and reliable algorithms and data structures for in two and three dimensions. The library encompasses a wide range of geometric primitives and operations, including kernels for exact and approximate arithmetic on points, segments, and other basic objects; basic structures such as polygons, polyhedra, and arrangements of curves; and advanced algorithms like Delaunay triangulations, Voronoi diagrams, convex hulls, , and operations on solids. It also includes a support library with utilities for spatial sorting, random point generation, and interfaces to external tools like the Boost Graph Library and Qt for visualization. Originating in the early , CGAL emerged from independent libraries developed by European groups seeking robust tools for geometric . In 1996, an international consortium of seven sites, including institutions from , , , the , and , formed under funding to consolidate these efforts into a unified project. The first version was released in , with the library transitioning to a fully open-source model under a dual (GPL/LGPL for free use and commercial options) in alongside the launch of version 3.0. Today, CGAL is maintained by GeometryFactory—a company founded by project coordinator Andreas Fabri—and an active community of contributors from academia and industry, with regular releases ensuring compatibility with modern C++ standards, including the latest release, version 6.1, in October 2025. Widely adopted in fields such as , geographic information systems, , and , CGAL emphasizes certified numerical robustness through exact predicates and certified constructions, making it suitable for both and production environments. In 2023, the project received the Test of Time Award from the Symposium on for its enduring impact on the field.

Introduction

Overview

CGAL is an open-source C++ software library that provides efficient and reliable algorithms and data structures for computational geometry. It aims to offer easy access to geometric computing tools while ensuring robustness through support for exact arithmetic, including integration with the GMP library for arbitrary-precision rational numbers. As of November 2025, the latest stable release is CGAL 6.1, released in October 2025; the library has been header-only since version 5.0 and requires a C++17-compliant compiler or later. For broader accessibility, CGAL provides interfaces through bindings for Python, , and .

Purpose and Scope

The Algorithms Library (CGAL) serves as a foundational C++ software library aimed at facilitating the development of robust and reliable geometric applications by providing a wide array of efficient algorithms, data structures, and primitives for in 2D, 3D, and higher dimensions. Its core purpose is to enable researchers and developers in industry and academia to implement solutions for complex geometric problems, such as arrangements of geometric objects and optimization tasks, while ensuring and correctness in computations. This focus addresses real-world challenges in fields including , , , and geographic information systems, where precise handling of geometric entities is essential. The scope of CGAL encompasses , robust, and paradigms, supporting a variety of kernel models—including Cartesian, homogeneous, and those with exact predicates—to model geometric primitives like points, lines, and surfaces accurately across dimensions. It provides certified algorithms with provable properties, such as worst-case optimality, for tasks like computation, ensuring outputs meet theoretical guarantees even in degenerate cases. Boundaries are defined by its emphasis on geometric computation, integrating seamlessly with the (STL) for interoperability without extending to unrelated domains. Central to CGAL's design are key concepts like through traits classes, which allow adaptable algorithms by specifying required geometric operations and enabling customization for different kernel types or precision needs. However, CGAL deliberately excludes general-purpose numerical libraries or algorithms outside geometry, such as beyond geometric embeddings, and prioritizes computational reliability—via exact arithmetic where necessary—over raw performance in scenarios prone to floating-point errors or ambiguities.

History

Origins and Founding

The CGAL project was established in 1996 as a collaborative effort among eight research institutions in and , aiming to develop a unified software library. The founding consortium included (), (), Freie Universität (), INRIA Sophia-Antipolis (), Martin-Luther-Universität Halle-Wittenberg (), Max-Planck-Institut Saarbrücken (), RISC Linz (), and (). This partnership was coordinated by as the prime contractor, with the goal of pooling expertise to create robust geometric algorithms suitable for both academic research and industrial applications. The motivations for CGAL's creation stemmed from the growing need for standardized, reliable libraries in , as individual research groups had developed fragmented tools that lacked interoperability and certification. It built directly on predecessor projects, including PlaGeo and SpaGeo from , the geometric components of LEDA from the Max-Planck-Institut Saarbrücken, and C++GAL from INRIA Sophia-Antipolis, integrating these to form a cohesive C++-based framework. This approach addressed the challenges highlighted in contemporary reports on the field, such as the demand for efficient, verifiable algorithms in areas like geographic information systems (GIS) and (CAD). Initial development was supported by the European Union's ESPRIT Project 21957, which ran from October 1996 to July 1998 and provided funding for 21 months to focus on basic 2D geometric algorithms, data structures, and supporting features like and visualization. The project emphasized collaboration with industrial partners, including entities like Research and Tecnomatix, to ensure practical applicability. The first beta release, version 0.9, was made available in June 1997, marking the initial public distribution of the library and promoting among developers to certify and refine algorithms through rigorous testing and . This early version laid the groundwork for CGAL's subsequent evolution into a fully open-source .

Development Milestones

Following the initial funding from the ESPRIT IV CGAL , development continued through subsequent European initiatives that expanded the library's core capabilities and scope. The GALIA (1998–2000) focused on advancing paradigms for geometric algorithms, building on the foundational work to enhance and reusability in CGAL's design. This was followed by the ECG (2001–2004), which emphasized in exact , supporting refinements to predicates and kernel implementations for robust numerical handling. The ACS (2005–2008) introduced new packages for handling complex , including advancements in and optimization algorithms. Concurrently, the Aim@Shape (2004–2008) integrated CGAL tools for 3D analysis and repositories, enabling semantic modeling and retrieval of geometric objects. Later, the ERC-funded GUDHI (2014–2019) extended CGAL's applicability to higher-dimensional geometry, incorporating structures like simplicial complexes. Licensing evolved to balance academic accessibility and commercial viability. Prior to 2003, CGAL was freely available for academic use without a formal . In 2003, GeometryFactory was founded to manage commercial licensing, allowing proprietary integrations while sustaining development. began in November 2003 with the release of CGAL under the GPL and LGPL, enabling broader community contributions. This dual-licensing model was formalized thereafter, with GeometryFactory handling commercial agreements alongside the free licenses. Major releases marked significant architectural and standardization milestones. Versions 3.x, released prior to , operated under the QPL for most packages and LGPL for core components, emphasizing stability in 2D and 3D primitives. CGAL 4.0 () transitioned to GPL v3 and LGPL v3, introducing unified licensing and enhancements like improved 3D . Version 5.0 (late 2019) adopted a structure for easier integration and required compliance, alongside new support for periodic meshes. CGAL 6.0 (2024) mandated , adding advanced optimization packages and better parallelism. The subsequent 6.1 release (October 2025) incorporated compiler updates for enhanced portability across modern toolchains. In 2023, the CGAL project received the SoCG Test of Time Award for its enduring contributions to geometric computing, recognizing its impact on algorithms and software reliability over nearly three decades. involves an editorial board of 13 members as of 2013, overseeing package reviews and quality assurance, supported by over 30 developers and reviewers. Open contribution rules were published in to standardize submissions, ensuring rigorous testing and documentation for new algorithms.

Design and Architecture

Core Components

CGAL employs a model based on C++ templates and s to achieve flexibility and reusability in its algorithms and data structures. This paradigm allows components to be parameterized by user-provided types that satisfy specific requirements, such as the Kernel model, which defines traits for fundamental geometric entities like points, vectors, and predicates. By leveraging traits classes, CGAL enables the adaptation of its core functionality to various number types and representations without altering the underlying code, promoting interoperability with the (STL). At the heart of CGAL's architecture is the kernel system, which provides an abstraction for geometric computations and serves as the foundational layer for higher-level packages. Kernels are interchangeable models of the , including Simple_cartesian for efficient but non-robust computations using floating-point types like double, and Exact_predicates_inexact_constructions_kernel for robust predicate evaluations with inexact constructions. These kernels support exact arithmetic through integration with external libraries such as GMP for multiprecision integers and rationals, and MPFR for , allowing users to select appropriate trade-offs between speed and precision. The kernel handles representations of geometric objects, including points, segments, triangles, and affine transformations like translations and rotations, while providing predicates for orientation, detection, and computations. To ensure robustness in geometric algorithms, CGAL incorporates certified mechanisms that mitigate floating-point errors, particularly in handling degeneracies where points are collinear or coplanar. Exact predicates, computed using algebraic number types from GMP/MPFR, guarantee correct decision-making in such cases, while constructions often rely on approximate arithmetic for performance. Filtered predicates, such as those using for interval arithmetic, implement lazy exactness by first applying fast floating-point approximations and resorting to exact computations only when the result is uncertain, thus balancing efficiency and reliability. This approach enables certified algorithms that produce topologically correct outputs without sacrificing computational speed in non-degenerate scenarios. Since version 4.0, CGAL has integrated with Boost for utility components like graph algorithms and property maps, enhancing its capabilities, and with Eigen for linear algebra operations, providing efficient matrix and vector handling as a replacement for deprecated alternatives. These dependencies extend the kernel's functionality, allowing seamless use of advanced numerical methods within geometric contexts while maintaining the library's modular design.

Data Structures and Algorithms

CGAL provides a variety of robust data structures for representing geometric entities, including arrangements for planar maps, which are implemented in the 2D Arrangements package as a framework for constructing and querying subdivisions of the plane induced by curves. These arrangements support operations like point location and zone computation, leveraging halfedge data structures to maintain topological relations efficiently. Search structures such as trees, available in the 2D and 3D Fast Intersection and Computation package, enable efficient and distance queries on static sets of geometric objects in 2D and 3D, with hierarchies optimized for ray shooting and proximity computations. Similarly, KD-trees in the dD Spatial Searching package facilitate and nearest neighbor queries in arbitrary dimensions, using a balanced binary partition constructed via splitting for logarithmic query times on average. For meshes, the 3D Polyhedral Surface package offers a halfedge data structure to represent orientable 2-manifolds, including with boundaries or holes, where vertices, edges, and facets are linked through incidence relations to support Euler operations and topological queries. In terms of algorithms, CGAL includes optimization techniques such as computing the on a point set, achieved by interfacing triangulation data structures with the Boost Graph Library and applying to the graph, which ensures a tree connecting all points with minimal total edge length. and solids are handled through arrangement-based methods; for 2D polygons bounded by x-monotone curves, the 2D Regularized Boolean Set-Operations package constructs a using a sweep-line to compute intersections, unions, differences, and complements, extracting results as polygons with holes in optimal time for sparse inputs. In 3D, Boolean operations on Nef polyhedra employ cell-complex representations bounded by halfspaces, supporting topological queries alongside set operations via sweep-line variants. CGAL's frameworks extend to spatial sorting, implemented in the Spatial Sorting package to order points in 2D, 3D, or higher dimensions using lexicographic sorting or traversals, which preserve locality to accelerate incremental constructions like triangulations by reducing expected insertion times. For dynamic scenarios involving moving objects, kinetic data structures in the Kinetic Data Structures package maintain combinatorial structures such as Delaunay triangulations under continuous motion, employing exact event handling through an algebraic kernel to process certificates and updates with provable failure rates bounded by simulation parameters. Performance characteristics highlight CGAL's efficiency, with 2D convex hull computations achieving O(n log n) worst-case time using algorithms like Akl-Toussaint or Graham-Andrew scans on point sets. Select packages support parallelization via (TBB), such as in 3D triangulations where multi-core insertion and operations scale with thread count for large inputs. A representative example is the 2D , constructed incrementally in the 2D Triangulations package by inserting points and restoring the empty property through an O(1) amortized flip algorithm per insertion, bolstered by exact predicates from the geometric kernel to ensure robustness without floating-point errors.

Features and Packages

2D and 3D Geometry

The CGAL library provides a suite of packages dedicated to fundamental 2D geometric computations, enabling efficient handling of triangulations, arrangements, polygons, and Voronoi diagrams. The 2D Triangulations package supports the construction and manipulation of Delaunay and regular triangulations from point sets, including features for point location queries and extraction of the dual Voronoi diagram. These triangulations are built using incremental insertion algorithms that ensure conformity to the Delaunay property, with regular variants incorporating weights for applications like offset surfaces. The 2D Arrangements package constructs planar subdivisions induced by intersecting curves, accommodating general curve segments such as line segments, circular arcs, and conic sections, while supporting operations like point location and overlay of multiple arrangements. For polygons, the 2D Polygons package offers a robust representation with operations including Boolean set operations (union, intersection, difference) on general polygons with holes, leveraging arrangement-based computations for exact results. Additionally, polygon offsetting is handled via the 2D Straight Skeleton and Polygon Offsetting package, which computes inward or outward offsets using straight skeleton constructions to manage self-intersections and produce valid offset polygons. The 2D Voronoi Diagrams are addressed through specialized graphs: power diagrams emerge as duals to regular triangulations, partitioning the plane based on additive weights, while Apollonius diagrams (additively weighted Voronoi for disks) are computed via the 2D Apollonius Graphs package, supporting nearest-neighbor queries among circles of varying radii. In 3D, CGAL's packages extend these primitives to volumetric computations, focusing on triangulations, , operations, and optimization. The 3D Triangulations package enables and regular triangulations of 3D point sets, including periodic variants for simulations on tori, with multi-core parallelization for insertion and refinement to accelerate large-scale computations. is facilitated by the 3D Mesh Generation and 3D Surface Mesh Generation packages, which produce isotropic simplicial meshes from polyhedral domains or implicit surfaces, employing to ensure quality metrics like element shape and size grading from input or level sets. The 3D Boolean Operations on Nef package supports exact constructions of cell complexes through union, intersection, and difference on polyhedral solids, maintaining topological integrity via a Nef polyhedron representation that handles non-manifold features. For optimization, the 3D Linear Programming solver, part of the broader optimization framework, computes feasible points or optima in polyhedral feasible regions defined by linear inequalities, using randomized incremental construction for efficiency. Shared across dimensions, CGAL includes alpha shapes for extracting density-based boundaries from triangulations: the 2D and 3D Alpha Shapes packages compute alpha-complexes as subcomplexes of Delaunay triangulations, filtering edges and faces based on a radius parameter to delineate concave hulls or porous structures. computations are unified in 2D and 3D via quickhull-inspired algorithms, producing boundary facets or extreme points from point sets with O(n log n) expected , supporting both static and dynamic updates. These packages interoperate seamlessly by relying on the core 2D and 3D Linear Kernel for predicates and constructions, and the framework for overlay operations, allowing users to combine triangulations with results or embed Voronoi edges into polygonal meshes without data conversion overhead. In recent versions, CGAL 6.1 enhances 3D support with optimized parameters for , including custom initial point sets and surface-only modes, yielding faster convergence and reduced runtime for volumetric meshing tasks.

Advanced Topics

CGAL provides advanced capabilities for geometry processing, enabling the reconstruction and refinement of surfaces from point data. The Poisson surface reconstruction package implements an algorithm that reconstructs watertight surfaces from oriented point sets by solving a Poisson equation to estimate an , whose forms the surface; this method is particularly effective for dense, uniformly sampled data and was introduced in CGAL 3.5. In CGAL 6.1, it was enhanced with a new Poisson_mesh_domain_3 class incorporating optimizations for improved performance. Complementing this, the advancing front package employs a greedy approach to grow a triangular from a facet, advancing across the point set while optimizing local ; it handles unoriented points and is suitable for sparse or noisy data, added in CGAL 4.7. For surface refinement, the 3D surface subdivision methods package supports schemes such as Catmull-Clark, Loop, Doo-Sabin, and √3 subdivision, which hierarchically refine control meshes to produce smooth approximations while preserving features; these were integrated in CGAL 4.11. Additionally, the triangulated surface parameterization package facilitates mapping disk-homeomorphic surfaces to a plane using techniques like As-Rigid-As-Possible and Tutte barycentric methods, aiding in and simplification; it has been available since CGAL 3.2. A new 3D Isosurfacing package, introduced in CGAL 6.1, provides algorithms such as , Topologically Correct , and Dual Contouring to extract isosurfaces from scalar fields defined on volumetric grids. In point set processing, CGAL offers tools for analyzing and refining unorganized clouds of points. The point set processing package, introduced in CGAL 3.5, includes functions for detection via statistical analysis of distances to nearest neighbors, removing a specified of points exceeding a threshold (e.g., 5% based on average spacing). is supported through average spacing computation to the k-nearest neighbors, providing a scale measure for parameter tuning in subsequent operations. For registration, the package integrates the (ICP) algorithm via the PointMatcher library, enabling local alignment of point sets after initial global registration with Super4PCS; this process iteratively minimizes point-to-point distances, with customizable filters for robustness to noise and s. In CGAL 6.1, a new function CGAL::poisson_eliminate() was added for downsampling point sets while preserving the Poisson disk sampling property. Higher-dimensional extensions in CGAL support computations beyond 2D and 3D, focusing on simplicial complexes and hulls. The dD triangulations package models simplicial complexes as pure simplicial decompositions of point sets in arbitrary dimensions d, using a triangulation data structure that maintains connectivity and geometric embeddings; it enables s, whose dual facets define the convex hull boundaries, and was enhanced in CGAL 4.6 to replace the deprecated dD convex hulls package. A new dD package, added in CGAL 6.1, computes the Fréchet distance between polygonal curves in arbitrary dimensions, useful for trajectory analysis and shape matching. For arrangements, the 2D arrangements package constructs planar maps from curves and supports extensions to higher dimensions through traits classes, though full ND implementations remain limited. Convex hulls in dD are computed incrementally via the , leveraging beneath-beyond style updates during point insertion to maintain the hull as the boundary of finite cells. Other specialized packages address periodic and topological structures. The 3D periodic triangulations package, added in CGAL 3.5, computes Delaunay triangulations on a 3D flat by replicating points across periodic domains, useful for ; a 2D variant followed in CGAL 4.3. In CGAL 6.1, the 2D Triangulations on Hyperbolic Surfaces package was introduced, enabling Delaunay triangulations on hyperbolic surfaces such as the Bolza surface (genus 2), extending periodic concepts to non-Euclidean geometries. Topological maps are handled by the surface mesh topology package (CGAL 5.1), which computes shortest non-trivial loops and performs tests on orientable surfaces represented as simplicial complexes. Optimization over arrangements, such as shortest paths, is supported in the 2D arrangements package via sweep-line frameworks that query distances amid obstacles. Emerging features in recent releases integrate dynamic and analytical tools. The kinetic surface reconstruction package, introduced in CGAL 6.0, employs a kinetic space partition to decompose bounding boxes into convex polyhedra guided by moving planes, facilitating dynamic simulations of evolving point sets. For shape analysis, the shape detection package (enhanced post-CGAL 5.0) uses RANSAC-based methods to identify primitives like planes and spheres in point clouds, providing a foundation for pipelines through extensible region-growing and classification APIs. Despite these advances, higher-dimensional features exhibit limitations, particularly beyond 3D, where grows exponentially—e.g., triangulating 100 points in 12D requires over 2,000 seconds and 7 GB of memory—rendering them experimental for high-d applications without specialized hardware. ND arrangements lack comprehensive support, relying on 2D extensions that may not scale efficiently.

Platforms and Dependencies

Supported Operating Systems and Compilers

CGAL supports a range of , including various distributions of , macOS, and Windows (primarily through integration). These platforms are chosen to ensure broad compatibility for applications while maintaining performance and reliability. The library is continuously tested via on Actions across these operating systems using the specified compilers, ensuring stability for releases like 6.0 and 6.1.
Operating SystemSupported Compilers
g++ 12.2.0 or later (); 20.1.6 or later ()
macOS g++ 12.2.0 or later (); Apple 12.0.5, 14.0.0, or 15.0.0 ()
Windows g++ 12.2.0 or later (); MS Visual C++ 15.9, 16.10, or 17.14 (from 2017, 2019, or 2022) ()
Since version 6.0 released in 2024, CGAL requires a C++17-compliant compiler, marking a shift to leverage modern language features for improved efficiency and code maintainability. In version 6.1, support for older compilers such as GCC versions below 12 was dropped to focus on more recent toolchains with better optimization and standard adherence. Essential third-party dependencies include the (STL) provided by the compiler, and Boost version 1.74 or later (headers-only). For exact arithmetic, GMP version 5.0.1 or later is optional but recommended, paired with MPFR version 3.0.0 or later for interval computations. Other optional dependencies, such as Eigen version 3.3.7 or later for linear algebra and CGAL_ImageIO for image handling in graphics-related packages, enhance functionality without being required for core usage. version 3.22 or later is necessary for building and configuring projects with CGAL.

Installation and Build Process

CGAL can be obtained by downloading source archives, such as the tarball for version 6.1, from the official website at cgal.org or from the project's releases page. These archives include the headers, examples, and demos necessary for setup. Alternatively, users can clone the repository from for the latest development version, though stable releases are recommended for production use. Since version 5.0, CGAL operates primarily as a library, allowing direct inclusion of headers in user code without compiling or linking against pre-built libraries for the core functionality. This simplifies integration, as applications can simply add the include path to the CGAL headers during compilation. However, dependencies like GMP and MPFR must still be installed separately, as they are not . To enable mode explicitly during configuration, the option -DCGAL_HEADER_ONLY=ON can be used. The recommended method for building and installing CGAL from source is using CMake. After extracting the source archive, create a build directory, navigate into it, and run cmake .. to configure the project, followed by make (or nmake on Windows) to build and make install to install to the default prefix (typically /usr/local on Unix-like systems). Custom installation directories can be specified via -DCMAKE_INSTALL_PREFIX=/path/to/install. CMake supports optional components, such as Qt for visualization packages, by enabling flags like -DCGAL_Qt6=ON after installing Qt. For header-only usage, the configuration step sets up the necessary includes without building libraries. Platform-specific setups vary for ease of installation. On distributions like , CGAL and its dependencies can be installed via package managers using sudo apt install libcgal-dev, which handles GMP, MPFR, and Boost automatically. For macOS, Homebrew provides a straightforward option with brew install cgal, ensuring compatibility with the system's compilers. On Windows, the package manager is advised: after installing , run vcpkg install cgal to fetch CGAL along with dependencies like GMP and Boost, supporting versions 2017, 2019, and 2022. Manual builds on Windows involve extracting the source, installing precompiled GMP/MPFR from CGAL releases, and configuring with for . The distribution includes demos and examples to verify the installation, located in dedicated directories within the source archive. These can be built using the provided CMakeLists.txt files by running cmake . followed by make in the respective directory, such as examples/Triangulation_2. Enabling all examples during the main build requires -DWITH_examples=ON in CMake configuration. Demos often require additional optional dependencies like Qt or VTK, which must be installed beforehand. Common troubleshooting issues arise from missing dependencies, particularly GMP and MPFR. If reports "Could NOT find GMP," users should install these libraries via package managers or set paths manually using variables like -DGMP_INCLUDE_DIR=/path/to/gmp/include and -DGMP_LIBRARIES=/path/to/libgmp.so during configuration. For Boost-related errors, specify -DBoost_DIR=/path/to/boost/lib/cmake/Boost-1.XX.X. To prevent CGAL from overriding user-defined compiler flags (e.g., in mixed setups), set -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS=ON. On Windows, ensure DLLs like gmp.dll are in the system PATH to avoid runtime errors.

Applications and Use Cases

Industries and Fields

CGAL finds extensive application in and (CAD), where it supports for and operations for (CSG) tasks. These capabilities enable precise geometric manipulations essential for rendering complex scenes and designing mechanical parts. In and , CGAL addresses challenges like path planning through arrangement computations and using axis-aligned bounding box () trees. For GIS, it facilitates modeling via triangulated irregular networks (TINs) derived from Delaunay triangulations, while in robotics, arrangement-based algorithms aid for safe navigation in cluttered environments. Medical imaging and leverage CGAL for from scanned point clouds and alpha shapes to delineate protein structures. In medical contexts, Poisson and advancing front reconstruction algorithms generate accurate meshes from CT or MRI data, supporting applications like surgical planning. For , alpha shapes compute molecular surfaces and pockets, aiding in the analysis of protein-ligand interactions. Beyond these, CGAL contributes to game development through procedural terrain generation via its geometry processing tools, manufacturing with straight skeleton computations for toolpath optimization in additive processes, and astrophysics for point cloud analysis in cosmic web filament detection using periodic Delaunay triangulations and alpha shapes. The library's robustness, achieved through exact predicate evaluations and filtered constructions, ensures reliable results in degenerate cases, preventing numerical errors that could compromise critical applications such as preoperative modeling. Recent enhancements, including advanced shape detection for point sets, have supported growing integration with AI-driven geometric analysis, such as primitive fitting in machine learning pipelines for 3D data. The October 2025 release of CGAL 6.1 introduced features like 3D Constrained Delaunay triangulation, further benefiting applications in robotics and GIS.

Notable Software Using CGAL

CGAL has been integrated into several prominent open-source tools, enhancing their geometric modeling and processing capabilities. For instance, the GUDHI library, focused on , relies on CGAL for its alpha complex data structures, bottleneck distance computations, and spatial searching algorithms, enabling efficient higher-dimensional geometric computations. In Blender, via add-ons like BlenderBIM, CGAL serves as an alternative geometric kernel, supporting robust boolean operations and for precise modeling tasks. Similarly, incorporates CGAL through mesh processing add-ons, such as those for advanced and in 3D graphics workflows. As of 2021, products, including components of their CAD and modeling suites like Maya, utilized CGAL version 4.8.0 for reliable geometric primitives and algorithms in design and visualization pipelines. , a leading and visualization application, integrates CGAL via plugins such as , which wraps advanced mesh processing tools like remeshing and operations into its VTK-based pipelines for scientific visualization. In , the (ROS) employs CGAL in path planning frameworks, particularly for constrained Delaunay triangulations and coverage algorithms that facilitate efficient navigation in complex environments. Research projects have prominently featured CGAL, particularly in EU-funded initiatives. The Aim@Shape Network of Excellence utilized CGAL for geometric processing in applications, including and shape modeling of artifacts to preserve and analyze historical objects. In molecular modeling, CGAL supports topology-driven trajectory synthesis, as demonstrated in studies of cell motions, where its arrangement and kernel packages enable precise geometric representations of biomolecular structures. Notable case studies illustrate CGAL's practical impact. In medical imaging software like 3D Slicer, CGAL is incorporated through extensions for CT scan meshing, providing tetrahedral mesh generation and surface reconstruction to aid in surgical planning and volume analysis. For game development, Unity plugins such as CGALDotNet harness CGAL for procedural terrain generation, utilizing its mesh optimization and Boolean operations to create dynamic, low-poly landscapes efficiently. CGAL's widespread adoption is evidenced by its citation in thousands of academic publications and its role in SoCG award-winning works, including the 2023 Test of Time Award for the CGAL project, underscoring its enduring influence on computational geometry research.

Community and Licensing

Development Community

The CGAL project is managed by the CGAL Editorial Board, composed of senior developers from various institutions, with GeometryFactory serving as its commercial arm and active contributor that coordinates development efforts. The Editorial Board oversees contributions and ensures code quality. The Editorial Board, composed of senior developers from various institutions, reviews all proposed changes through a structured peer-review process for integrating new packages or features. Contributions are facilitated via the project's GitHub repository, where users submit issues for bug reports and pull requests for code changes. The development community includes around 20 active developers and reviewers, including alumni, with core maintainers drawn from academic institutions such as INRIA and . These contributors, often affiliated with research labs in , handle maintenance of key packages and collaborate on enhancements. Ongoing development follows rigorous processes, including peer-reviewed integration of new packages to maintain reliability and compatibility. The project has participated in since 2010, including in 2025, mentoring student projects on topics like geometric algorithms and data structures. Additionally, biannual developer meetings foster collaboration among contributors. Documentation is provided through an extensive online manual at doc.cgal.org, featuring tutorials, a comprehensive reference for all packages, and executable demos to illustrate usage. Community support is available via mailing lists for discussions between users and developers, as well as forums like for troubleshooting. Updates are tracked using the GitHub issue tracker, enabling transparent reporting and resolution of bugs. The project maintains a release cycle of approximately 6 to 12 months for major versions, accompanied by patch releases and backports to stable branches for critical fixes.

Licensing Options

CGAL is distributed under a dual licensing model that accommodates both open-source and commercial use cases. The open-source options consist of the GNU General Public License version 3 or later (GPL v3+) and the GNU Lesser General Public License version 3 or later (LGPL v3+), applicable from release 4.0 onward. These licenses cover the source code and header files, with the LGPL permitting dynamic linking into applications without requiring the disclosure of the linking code, while the GPL imposes requirements on derivative works, mandating that any distributed modifications or binaries include the source code under the same license. Earlier versions, such as releases 3.x, were licensed under the Q Public License (QPL) alongside LGPL v2.1, reflecting the project's transition to more permissive open-source terms. For users seeking to integrate CGAL into without the obligations of the GPL or LGPL, commercial s are available through GeometryFactory, the company that maintains and supports the library. These licenses allow unrestricted use, modification, and distribution without disclosure requirements, and they often include professional support, customization services, and priority access to updates. The commercial model emerged alongside the project's open-sourcing in , when GeometryFactory was incorporated as a spin-off to provide industrial-strength options while sustaining development. Under the open-source licenses, CGAL is free for academic, research, and non-commercial applications, with no royalties required for such uses. However, compliance is essential: for GPL-licensed components, distributing binaries in a product necessitates providing the corresponding source code to recipients. LGPL components offer more flexibility, requiring only the release of modified LGPL code itself. Bindings for languages like Python, such as those provided via SWIG or pybind11, inherit the underlying GPL or LGPL terms from the core library. The licensing is specified on a per-package basis, allowing developers to select appropriate components for their needs, and the official documentation includes macros like CGAL_LICENSE_WARNING to verify compliance during builds.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.