The CGAL Open Source Project is pleased to announce the release of CGAL 6.3 Beta 1, the Computational Geometry Algorithms Library.
CGAL 6.3 Beta 1 is a public testing release. We encourage users to try it and report bugs that should be addressed before the final release of CGAL 6.3.
Besides fixes and general enhancements to existing packages, the following has changed since CGAL 6.2:
General Changes
- The new list of supported compilers is:
- Visual C++ 15.9, 16.10, 17.14, 18.0 (from Visual Studio 2017, 2019, 2022, and 2026) or later
- Gnu g++ 14.2.0 or later (on Linux)
- LLVM Clang version 22.1.8 or later (on Linux)
- Apple Clang compiler versions 14.0.0 or later (on macOS)
- The minimal supported version of Boost is version 1.79.0 or later.
3D Mesh Volume Smoothing (new package)
-
Poorly shaped elements can affect the robustness and accuracy of numerical computations. This new package iteratively moves the vertices of 3D volumetric meshes so as to improve element quality while conforming to geometric targets such as surfaces, curves, and constrained points. Element quality is measured using a conformal distortion energy, designed to favor well-shaped tetrahedra and improve their dihedral angles. The geometric targets are defined through an oracle which returns for each “boundary” element the tangent space that elements should align with, ensuring genericity of the method. Given a valid input, the final result is guaranteed to remain free of inverted elements. Starting from an invalid mesh, the algorithm will attempt to untangle it and recover a valid mesh. The API is compatible with the
CGAL::Mesh_complex_3_in_triangulation_3data structure, and can be applied on the output of the 3D Mesh Generation Package.See also the associated news entry.
Polygon Mesh Processing - Boolean Operations on Meshes (major changes)
-
Added parallel versions for all corefinement-based operations (including Boolean operations):
CGAL::Polygon_mesh_processing::corefine()CGAL::Polygon_mesh_processing::corefine_and_compute_union()CGAL::Polygon_mesh_processing::corefine_and_compute_difference()CGAL::Polygon_mesh_processing::corefine_and_compute_intersection()CGAL::Polygon_mesh_processing::corefine_and_compute_boolean_operations()
A named parameter
concurrency_tagis used to control whether the task should be performed using a single or multiple threads. -
All functions above have had their runtime significantly improved.
-
Corefinement-based operations (including Boolean operations) have been optimized to better handle configurations where some identical faces are shared between the input meshes, leading to a significant speed-up in those cases.
-
Added new functions operating directly on triangle soups, enabling the handling of non-manifold input and output volumes. These functions are compatible with multithreading:
-
Added a new named parameter
edge_is_constrained_mapto theCGAL::Polygon_mesh_processing::clip()functions, which can be used to preserve constrained edges when clipping a mesh. -
Breaking change: Added a new named parameter
edge_is_marked_mapto the corefinement-based functions, which specifically collects new intersection edges. Previously,edge_is_constrained_mapwas storing both input constrained edges (updated when split) as well as new intersection edges. The previous behavior can be reproduced by passing the same property map to both named parameters.
2D Snap Rounding (major changes)
- Added the function
CGAL::vertical_slab_snap_rounding_2(), a new snap rounding algorithm that offers better performance and supports a wider range of rounding schemes, including floating-point coordinate representations. Users should use the new traits classesCGAL::Double_grid_snap_rounding_traits_2,CGAL::Float_grid_snap_rounding_traits_2, orCGAL::Integer_grid_snap_rounding_traits_2to operate on double-precision floating-point, single-precision floating-point, and integer coordinates, respectively. - Added the function
CGAL::hot_pixel_snap_rounding_2(), a new API exposing the original snap rounding algorithm based on hot pixels. - The existing function
CGAL::snap_rounding_2()has been deprecated, and replaced by a new overload,CGAL::snap_rounding_2(), that automatically dispatches to eitherCGAL::vertical_slab_snap_rounding_2()orCGAL::hot_pixel_snap_rounding_2(), depending on the provided traits class. - The traits class
CGAL::Snap_rounding_traits_2has been deprecated and renamedCGAL::Hot_pixel_snap_rounding_traits_2. Similarly, the conceptSnapRoundingTraits_2has been renamedHotPixelSnapRoundingTraits_2.
Kinetic Space Partition (major changes)
- Breaking change: The concept
KineticLCCFaceAttributerequires a new memberinput_plane_index. - Breaking change:
CGAL::Kinetic_space_partition_3::input_planes()now contains each plane only once; use the new functioninput_plane_indices()to map each input polygon to its plane. - Reimplemented the kinetic propagation as a vertex-based propagation, which improves robustness, handles singular configurations and creates lower complexity partitions in concave areas. The parameter
know limits the number of intersections per polygon vertex. - Added support for coplanar input polygons: polygons that are coplanar up to a small tolerance share a common support plane and expand separately. Degenerate input polygons are dropped.
- Added the function
insert_exact()to provide exact support planes. - Added the function
init_and_partition(), which needs much less memory thaninitialize()followed bypartition(). initialize(),partition()andinit_and_partition()have a template parameterConcurrencyTag, which defaults toCGAL::Parallel_if_available_tag, to compute the partitions of the octree nodes in parallel.
Kinetic Surface Reconstruction (major changes)
- Breaking change:
detect_planar_shapes()no longer regularizes. Use the new functionregularize_planar_shapes()for that. - Breaking change:
detected_planar_shapes()anddetected_planar_shape_indices()have been replaced byplanar_shapes(), which provides the support plane and the inlier indices of each shape. - Breaking change:
initialize_partition()has been removed.partition()now takes the partition named parameters. - Added the functions
insert_planar_shapes()andinsert_planar_shapes_and_linear_cell_complex()to skip shape detection or partitioning. - Added the function
get_linear_cell_complex()to access the kinetic partition as a linear cell complex. CGAL::Kinetic_surface_reconstruction_3::partition()has a template parameterConcurrencyTag, which defaults toCGAL::Parallel_if_available_tag. It also applies to the mapping of the inlier points onto the partition faces during the reconstruction.
2D and 3D Linear Geometry Kernel
- The concept
Kernelnow requires an additional overload for the functorOrientation_3that takes 5 points as arguments, with the last two points getting tested against the first three points. - Added the function
pad(double offset)to the classesCGAL::Bbox_2andCGAL::Bbox_3.
dD Geometry Kernel
- Added the function
pad(double offset)to the classCGAL::Bbox_d.
2D and 3D Fast Intersection and Distance Computation (AABB Tree)
CGAL::AABB_tree::build()now accepts an optionalConcurrencyTagtemplate parameter (CGAL::Sequential_tagby default). WhenCGAL::Parallel_tagis specified, the tree construction is performed in parallel.- Added the functions
CGAL::AABB_trees::do_intersect()andCGAL::AABB_trees::all_pairs_of_intersecting_primitives(). These functions respectively determine whether two AABB trees intersect and compute all pairs of intersecting primitives between two AABB trees. - Added a new primitive type,
CGAL::AABB_indexed_triangle_primitive_3, which uses as identifier an index into a range of triplets of indices.
Linear Cell Complex
- Added the function
CGAL::generate_hexahedral_mesh_using_two_refinement(), which can be used to generate a pure hexahedral mesh from a surface triangle mesh using the two-refinement algorithm described in the paper “A template-based approach for parallel hexahedral two-refinement” by Steven J. Owen, Ryan M. Shih, and Corey D. Ernst. - Added
CGAL::tetrahedron_soup_to_lcc()to import a tetrahedron soup into a linear cell complex. - Added the function
CGAL::import_face_graph_to_lcc()(headerCGAL/import_face_graph_to_lcc.h), which imports any model ofFaceListGraphinto a linear cell complex. - The following function and header have been deprecated for better naming clarity and consistency:
CGAL::polyhedron_3_to_lcc()→CGAL::import_face_graph_to_lcc()CGAL/Polyhedron_3_to_lcc.h→CGAL/import_face_graph_to_lcc.h
2D Arrangements
- Breaking change: Enhanced the metadata traits-class decorators
CGAL::Arr_counting_traits_2andCGAL::Arr_tracing_traits_2. Each is (still) parameterized with another traits class being decorated, but it does not inherit from it. In addition, one can get and set a smart pointer to the class being decorated.
3D Triangulations
- Breaking change: Removed the class template
Regular_triangulation_euclidean_traits_3, which was deprecated since CGAL-4.10. - Breaking change: Removed the concept
WeightedPoint, which was deprecated since CGAL-4.9. - Breaking change: Removed the member function
vertices_in_conflict()of the classesCGAL::Delaunay_triangulation_3andCGAL::Regular_triangulation_3, which was deprecated since CGAL-3.8. The functionvertices_on_conflict_zone_boundary()should be used instead.
3D Simplicial Mesh Data Structure
- Added the function
CGAL::is_tetrahedron_soup_a_triangulation(), which can be used to check if a soup of tetrahedra defines a valid 3D triangulation that can be handled byCGAL::tetrahedron_soup_to_triangulation_3(). - Added an overload of the function
CGAL::IO::read_MEDIT(), which enables reading CGAL 3D mesh complexes.
3D Mesh Generation
- Breaking change: The
operator()of the conceptsMeshCellCriteria_3andMeshFacetCriteria_3now takes the mesh complexc3t3as first argument, instead of its triangulation. - Breaking change: The template parameter of
CGAL::Mesh_cell_criteria_3,CGAL::Mesh_edge_criteria_3, andCGAL::Mesh_facet_criteria_3is now the mesh complex typeC3T3, rather than its triangulation type. Code that explicitly instantiates these criteria classes must be updated accordingly.CGAL::Mesh_criteria_3also usesC3T3as its template parameter, but continues to accept the triangulation type for backward compatibility.
Polygon Mesh Processing
- The intersection functions
CGAL::Polygon_mesh_processing::do_intersect(),CGAL::Polygon_mesh_processing::intersections(), andCGAL::Polygon_mesh_processing::intersecting_meshes()now have a named parameterconcurrency_tag, specifying whether the task should be performed using a single or multiple threads. - The running times of the functions above have been improved.
Polygon Mesh Processing - Meshing and Remeshing of Polygon Meshes
- Added a new named parameter
edge_is_protected_maptoCGAL::Polygon_mesh_processing::isotropic_remeshing(), to distinguish between “constrained” edges that can be resampled while the constrained edges polyline graph remains topologically unchanged, and “protected” edges that may not be modified at all by remeshing. - The function
CGAL::Polygon_mesh_processing::remesh_planar_patches()now returns a Boolean to indicate if all patches could be triangulated (same behavior as the functionCGAL::Polygon_mesh_processing::remesh_almost_planar_patches()). Failure to triangulate can happen when coplanarity/collinearity criteria are too relaxed. - The functions
CGAL::Polygon_mesh_processing::remesh_planar_patches()andCGAL::Polygon_mesh_processing::remesh_almost_planar_patches()now produce a (self-intersecting) mesh in case the output is non-manifold, rather than returning an empty result. Non-manifold occurrences are internally handled using the functionCGAL::Polygon_mesh_processing::orient_polygon_soup(), which duplicates elements so as to achieve a combinatorially manifold structure. The new named parameternumber_of_cornerscan be used to check if duplication happened by comparing its value to the number of vertices of the output mesh.
Polygon Mesh Processing - Mesh Repair
- Breaking change: Removed the function
CGAL::Polygon_mesh_processing::smooth_mesh(), which was deprecated since CGAL-5.5. - Breaking change: Removed the overload of the functions
CGAL::Polygon_mesh_processing::triangulate_hole(),CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(), andCGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()using output iterators for vertices and faces as parameters, which were deprecated since CGAL-6.0.
Surface Mesh Simplification
- Two examples have been added to illustrate how to perform parallel mesh simplification using METIS for mesh partitioning:
- The constructors of the classes
CGAL::Surface_mesh_simplification::GarlandHeckbert_probabilistic_plane_policiesandCGAL::Surface_mesh_simplification::GarlandHeckbert_probabilistic_triangle_policiesnow accept an optional vertex point map.
2D Polygon Partitioning
- Added a template parameter to the class
CGAL::Partition_traits_2to specify the container type used to store the vertices of output polygons (std::listby default).
Basic Viewer
- Added the possibility to color the faces by a value mapped to a color palette: the distance to the clipping plane, the cell size, or a scalar value provided by the drawer. A drawer can attach a value to each face through the new members
is_face_valuedandface_value(withface_value_namefor the legend) of the conceptGraphicsSceneOptions, which are provided by the classCGAL::Graphics_scene_options. As an example, the surface mesh drawer exposes the aspect ratio of each face.
Stream Support
- Added the functions
CGAL::IO::read_MEDIT()andCGAL::IO::write_MEDIT(), which enable reading and writing soups of indexed elements (edges, triangles, quadrilaterals, tetrahedra, and hexahedra) from and to the MEDIT file format. - The functions
CGAL::IO::read_GOCAD()(and their BGL counterparts) can now read files containing several GOCAD objects. The new named parameterread_only_one_objectcan be used to read a single object and leave the stream ready for reading the next one. - Reading numbers in most I/O functions is now significantly faster, using
std::from_chars(), orfast_float::from_chars()if the fast_float library is available. This can be disabled by defining the macroCGAL_DISABLE_FROM_CHARS. - Breaking change: The type of the file name parameter of I/O functions, as well as the return type of
CGAL::data_file_path(), has been changed fromstd::stringtostd::filesystem::path, which enables the use of non-Latin characters (e.g., Chinese) in directory and file names. - Breaking change: The deprecated
CGAL::IO::Colorand the predefined colors (CGAL::IO::black(),CGAL::IO::red(), etc.) are no longer imported intonamespace CGAL. - Breaking change: The deprecated stream mode functions (
CGAL::IO::oformat(),CGAL::IO::iformat(),CGAL::IO::get_mode(),CGAL::IO::set_ascii_mode(),CGAL::IO::set_binary_mode(),CGAL::IO::set_pretty_mode(),CGAL::IO::is_ascii(), etc.) are no longer imported intonamespace CGAL.
STL Extension
- Breaking change: Removed the class templates
Twotuple,Threetuple,Fourtuple, andSixtuple, which were deprecated since CGAL-3.4.