CGAL 5.4 offers the following improvements and new functionality over CGAL 5.3:
Changelog
General changes
-
Added the cmake target
CGAL::CGAL_Basic_viewer
to ease the compilation of programs using the basic viewer-based functionCGAL::draw()
. This target will define the macro and link withCGAL_Qt5
target when linked with it. -
The kernel providing exact constructions and exact predicates (
CGAL::Exact_predicates_exact_constructions_kernel
) is now thread-safe. See changes in2D and 3D Linear Geometry Kernel
for more details. -
The class
Geomview_stream
and all the dependent features have been removed from CGAL. Those features were actually no longer supported since CGAL-5.3 but it was not properly announced.
Shape Regularization (new package)
- This package enables to regularize a set of segments and open or closed contours in 2D and a set of planes in 3D such that all input objects are rotated and aligned with respect to the user-specified conditions. In addition, it provides a global regularization framework that can be adjusted for the user needs and any type of geometric objects.
Weights (new package)
- This package provides a simple and unified interface to different types of weights. In particular, it groups all weights into three category: analytic weights including all basic weights which can be computed analytically for a query point with respect to its local neighbors in 2D and 3D; barycentric weights, including all weights which can be computed for a query point with respect to the vertices of a planar polygon; and weighting regions, including all weights which are used to balance other weights.
2D Generalized Barycentric Coordinates (major changes)
- Breaking change: The headers
Segment_coordinates_2.h
andTriangle_coordinates_2.h
are renamed tosegment_coordinates_2.h
andtriangle_coordinates_2.h
. - The classes
Segment_coordinates_2
andTriangle_coordinates_2
are deprecated. The free functionscompute_segment_coordinates_2()
andcompute_triangle_coordinates_2()
are deprecated as well. Instead, the free functionssegment_coordinates_2()
andtriangle_coordinates_2()
should be used. - The enums
Query_point_location
andType_of_algorithm
are deprecated. Instead, the enumComputation_policy_2
should be used. - The classes
Wachspress_2
,Discrete_harmonic_2
,Mean_value_2
, andGeneralized_barycentric_coordinates_2
are deprecated. As consequence, the conceptBarycentricCoordinates_2
is deprecated as well. Instead, the classesWachspress_coordinates_2
,Discrete_harmonic_coordinates_2
, andMean_value_coordinates_2
should be used. - Added the class
Harmonic_coordinates_2
to compute approximate harmonic coordinates in 2D. These coordinates satisfy all properties of barycentric coordinates inside any simple polygon. - Added a new concept
DiscretizedDomain_2
and a model of this concept calledDelaunay_domain_2
, which is based on the Mesh 2 package. A model of this concept is required to useHarmonic_coordinates_2
. - Added free functions to compute Wachspress, discrete harmonic, and mean value coordinates.
- All free functions and classes are now using ranges and property maps.
2D and 3D Linear Geometry Kernel
-
Most operations on
CGAL::Exact_predicates_exact_constructions_kernel
objects are now thread-safe ifCGAL::Exact_rational
ismpq_class
(fromGMPXX
),boost::multiprecision::mpq_rational
orCGAL::Quotient<CGAL::MP_Float>
. The objects are not atomic though, so the usual restrictions on avoiding race conditions apply. For users who do not use threads, this can be disabled withCGAL_HAS_NO_THREADS
. -
Added documentation for the class
Projection_traits_3
, which enables the use of 2D algorithms on the projections of 3D data onto an arbitrary plane. -
Added
construct_centroid_2_object()
andcompute_determinant_2_object()
inProjection_traits_xy_3
,Projection_traits_xz_3
, andProjection_traits_yz_3
classes. -
Added the functor
NonZeroCoordinateIndex_3
to the conceptKernel
withint operator()(Vector_3)
which returns the index of any coordinate of the vector different from zero, or-1
.
dD Kernel
- Most operations on
Epeck_d
objects are now thread-safe, see 2D and 3D Linear Geometry Kernel for details.
2D Arrangements
-
Breaking Change: The traits function objects
Compare_x_at_limit_2
andCompare_x_near_limit_2
are renamed toCompare_x_on_boundary_2
andCompare_x_near_boundary_2
, respectively. -
A new hierarchy of traits concepts has been introduced. It captures all the valid combinations of boundary conditions for the 4 boundary sides of the parameter space. The 4 boundaries are Bottom, Top, Left, and Right. Each boundary side can be either contracted, identified, close, open, or oblivious. Not all possible combinations are valid. If one side is identified then the other must be as well. Two adjacent sides cannot be contracted.
-
A new geometric traits,
Arr_geodesic_arc_on_sphere_traits_2
has been introduced. It handles arcs of great circles embedded on the unit sphere.
2D Regularized Boolean Set-Operations
- Added an extra parameter (
UsePolylines
) to all free functions (complement()
,do_intersect()
,intersection()
,join()
,difference()
,symmetric_difference()
, andoriented_side
) to control whether to useArr_polyline_traits_2
as default traits. It is the new default as it provides better performances in general.
3D Mesh Generation
- Added support of weighted images for an improved quality of meshes generated from labeled images, along with a function
CGAL::Mesh_3::generate_label_weights()
to generate the weights.
Polygon Mesh Processing
-
Added the function
CGAL::Polygon_mesh_processing::match_faces()
, which, given two polygon meshes, identifies their common faces as well as faces present in only either of them. -
Added the functions:
CGAL::Polygon_mesh_processing::bounded_error_Hausdorff_distance()
that computes an estimate of the one-sided Hausdorff distance between two triangle meshes which is bounded by a user-specified error bound;CGAL::Polygon_mesh_processing::bounded_error_symmetric_Hausdorff_distance()
that computes an estimate of the symmetric Hausdorff distance bounded by a user-specified error bound; andCGAL::Polygon_mesh_processing::is_Hausdorff_distance_larger()
that returnstrue
if the bounded-error Hausdorff distance between two meshes is larger than the user-specified max distance. -
Added the functions
CGAL::Polygon_mesh_processing::squared_edge_length()
andCGAL::Polygon_mesh_processing::squared_face_area()
, which, compared toCGAL::Polygon_mesh_processing::edge_length()
andCGAL::Polygon_mesh_processing::face_area()
, enable avoiding square-root operations. -
Added more functions in the visitor of the corefinement based methods to track all vertex creations.
-
Added an option to
CGAL::Polygon_mesh_processing::self_intersections()
to report only a limited number of intersections (maximum_number()
).
The Heat Method
- Breaking change: Added the functor
Compute_squared_length_3
providingoperator(const Vector_3& v)
, which computes the squared length ofv
, to theHeatMethodTraits_3
concept.
Point Set Processing
- Added support for
libpointmatcher::GenericDescriptorOutlierFilter
that enables providing a map from a point to a weight associated with this point.
Shape Detection
- Added new shapes to the Region Growing algorithm on a point set: circles in 2D, spheres in 3D, and cylinders in 3D.
CGAL and Solvers
- Added support for the OSQP solver. This solver enables to efficiently compute the convex Quadratic Programming (QP) problems arising in the context of several packages.