Skip to content

Commit

Permalink
Triangulation_2: Do not include kernel header (#8527)
Browse files Browse the repository at this point in the history
## Summary of Changes

Do not include `Exact_predicates_inexact_constructions_kernel.h` and
`Simple_cartesian.h`.
Change order of `#include` statements so that the  T2 files come first.
Forward declare `Epick` in `Constrained_triangulation_plus_2` where it
is used for defining a `Default` for the template parameter (which is
not documented).

## Release Management

* Affected package(s): Triangulation_2
* License and copyright ownership: unchanged.
  • Loading branch information
sloriot authored Nov 8, 2024
2 parents 797dde5 + 584c7dd commit 25afb37
Show file tree
Hide file tree
Showing 23 changed files with 41 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Algebraic_foundations
Arithmetic_kernel
BGL
Barycentric_coordinates_2
CGAL_Core
Cartesian_kernel
Circulator
Distance_2
Distance_3
Expand Down
1 change: 1 addition & 0 deletions Basic_viewer/include/CGAL/Buffer_for_vao.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <CGAL/license/GraphicsView.h>

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Projection_traits_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <CGAL/Triangulation_face_base_with_info_2.h>
Expand Down
3 changes: 0 additions & 3 deletions Partition_2/package_info/Partition_2/dependencies
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
Algebraic_foundations
Arithmetic_kernel
CGAL_Core
Cartesian_kernel
Circulator
Convex_hull_2
Distance_2
Expand Down
3 changes: 0 additions & 3 deletions Polygon_repair/package_info/Polygon_repair/dependencies
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
Algebraic_foundations
Arithmetic_kernel
Cartesian_kernel
CGAL_Core
Circulator
Distance_2
Distance_3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
Algebraic_foundations
Arithmetic_kernel
BGL
CGAL_Core
Cartesian_kernel
Circulator
Distance_2
Distance_3
Filtered_kernel
Hash_map
Homogeneous_kernel
Installation
Intersections_2
Intersections_3
Interval_support
Kernel_23
Kernel_d
Modular_arithmetic
Number_types
Polygon
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Algebraic_foundations
Arithmetic_kernel
BGL
Box_intersection_d
CGAL_Core
Cartesian_kernel
Circulator
Distance_2
Expand Down
3 changes: 1 addition & 2 deletions Triangulation_2/include/CGAL/Constrained_triangulation_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
#include <CGAL/intersections.h>
#include <CGAL/squared_distance_2.h>
#include <CGAL/tags.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Exact_rational.h>
#include <CGAL/Kernel_23/internal/Has_boolean_tags.h>
#include <CGAL/NT_converter.h>

#include <boost/mpl/has_xxx.hpp>
#include <boost/iterator/filter_iterator.hpp>
Expand Down
25 changes: 4 additions & 21 deletions Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
#include <CGAL/Triangulation_2/internal/CTP2_subconstraint_graph.h>
#include <boost/tuple/tuple.hpp>

#include <CGAL/Default.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_2/insert_constraints.h>

#include <boost/container/flat_set.hpp>

#include <type_traits>
Expand Down Expand Up @@ -55,27 +54,11 @@ class Pct2_vertex_handle_less_xy {
// Tr the base triangulation class
// Tr has to be Constrained or Constrained_Delaunay with Constrained_triangulation_plus_vertex_base

template < class Tr_ = Default >
template < class Tr_>
class Constrained_triangulation_plus_2
: public
Default::Get< Tr_, Constrained_Delaunay_triangulation_2<
Exact_predicates_inexact_constructions_kernel
, Triangulation_data_structure_2<
Triangulation_vertex_base_2<Exact_predicates_inexact_constructions_kernel>
, Constrained_triangulation_face_base_2<Exact_predicates_inexact_constructions_kernel>
>
, CGAL::Exact_predicates_tag
> >::type
: public Tr_
{
typedef typename
Default::Get< Tr_, Constrained_Delaunay_triangulation_2<
Exact_predicates_inexact_constructions_kernel
, Triangulation_data_structure_2<
Triangulation_vertex_base_2<Exact_predicates_inexact_constructions_kernel>
, Constrained_triangulation_face_base_2<Exact_predicates_inexact_constructions_kernel>
>
, CGAL::Exact_predicates_tag
> >::type Tr;
typedef Tr_ Tr;


template<class CDT>
Expand Down
3 changes: 2 additions & 1 deletion Triangulation_2/test/Triangulation_2/issue_3447.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_triangulation_plus_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> TDS;
Expand Down
2 changes: 2 additions & 0 deletions Triangulation_2/test/Triangulation_2/issue_5080.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Constrained_triangulation_plus_2.h>

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

template<typename VertexInfoType, typename FaceInfoType, typename Itag>
struct TriangulationTraitsTemplate_2 {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Constrained_triangulation_plus_2.h>
#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <cassert>

typedef CGAL::Exact_predicates_inexact_constructions_kernel EIK;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>

#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Projection_traits_3.h>

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>

#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Triangulation_2_projection_traits_3.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#define CGAL_CDT_2_DEBUG_INTERSECTIONS 1
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Constrained_triangulation_plus_2.h>
#include <CGAL/Base_with_time_stamp.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <iostream>

typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include <CGAL/_test_types.h>

#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/_test_cls_const_Del_triangulation_2.h>

// Explicit instantiation of the whole class :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
#define CGAL_NO_CDT_2_WARNING

#include <CGAL/_test_types.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>

#include <CGAL/Constrained_triangulation_2.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>

#include <CGAL/_test_cls_constrained_triangulation_2.h>

static_assert(!CGAL::internal::can_construct_almost_exact_intersection_v<EK>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <vector>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
//
// coordinator : INRIA Sophia-Antipolis
// ============================================================================
#include <iostream>

#include <CGAL/Simple_cartesian.h>

#include <CGAL/Triangulation_data_structure_2.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_hierarchy_2.h>

#include <CGAL/Simple_cartesian.h>

#include <iostream>

#include <CGAL/_test_cls_delaunay_hierarchy_2.h>

typedef double Coord_type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
#include <iostream>

#include <CGAL/_test_types.h>
#include <CGAL/Cartesian.h>

#include <CGAL/Triangulation_data_structure_2.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Cartesian.h>

#include <CGAL/_test_traits.h>
#include <CGAL/_test_cls_delaunay_triangulation_2.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/Projection_traits_yz_3.h>
#include <CGAL/Projection_traits_xz_3.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <iostream>

#include <CGAL/Constrained_Delaunay_triangulation_2.h>

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <iostream>

typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef CGAL::Projection_traits_xy_3<Kernel> Gt_xy;
typedef CGAL::Projection_traits_yz_3<Kernel> Gt_yz;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_2_projection_traits_3.h>

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <iostream>
#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#include <CGAL/_test_types.h>

#include <CGAL/Regular_triangulation_2.h>
#include <CGAL/_test_cls_regular_triangulation_2.h>

#include <CGAL/Exact_predicates_exact_constructions_kernel.h>

#include <CGAL/_test_cls_regular_triangulation_2.h>

typedef CGAL::Exact_predicates_exact_constructions_kernel RGt;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <boost/iterator/zip_iterator.hpp>
#include <vector>
#include <cassert>
Expand Down
3 changes: 0 additions & 3 deletions Visibility_2/package_info/Visibility_2/dependencies
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
Algebraic_foundations
Arithmetic_kernel
Arrangement_on_surface_2
CGAL_Core
Cartesian_kernel
Circulator
Distance_2
Distance_3
Expand Down

0 comments on commit 25afb37

Please sign in to comment.