From 7d7b08084243e1736ea2cc287190100bf5b8fcb4 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 31 Jan 2024 09:39:45 +0000 Subject: [PATCH 1/2] PMP: Change inclusion order to check dependencies --- .../corefinement_parallel_union_meshes.cpp | 3 ++- ...usdorff_bounded_error_distance_example.cpp | 13 ++++++------ .../delaunay_remeshing_test.cpp | 9 +++++---- .../Polygon_mesh_processing/extrude_test.cpp | 4 +++- .../Polygon_mesh_processing/fairing_test.cpp | 7 ++++--- .../Polygon_mesh_processing/measures_test.cpp | 7 +++---- .../orient_polygon_mesh_test.cpp | 8 +++++--- .../orient_polygon_soup_test.cpp | 20 ++++++++++--------- .../pmp_compute_normals_test.cpp | 11 +++++----- .../pmp_do_intersect_test.cpp | 14 ++++++------- .../point_inside_polyhedron_boundary_test.cpp | 3 +-- .../point_inside_surface_mesh_test.cpp | 6 +++--- .../polygon_mesh_slicer_test.cpp | 9 ++++++--- .../remeshing_quality_test.cpp | 6 ++++-- .../remeshing_test.cpp | 9 +++++---- .../remeshing_test_P_SM_OM.cpp | 11 ++++++---- ...meshing_with_isolated_constraints_test.cpp | 9 +++++---- .../self_intersection_polyhedron_test.cpp | 16 +++++++-------- .../self_intersection_surface_mesh_test.cpp | 9 +++++---- .../self_intersection_triangle_soup_test.cpp | 9 +++++---- .../surface_intersection_sm_poly.cpp | 7 ++++--- .../test_autorefinement.cpp | 5 +++-- .../test_coref_epic_points_identity.cpp | 4 ++-- .../Polygon_mesh_processing/test_corefine.cpp | 6 ++++-- .../test_corefinement_and_constraints.cpp | 4 ++-- .../test_corefinement_bool_op.cpp | 4 ++-- .../test_decimation_of_planar_patches.cpp | 14 +++++++------ ...est_degenerate_pmp_clip_split_corefine.cpp | 3 +-- .../test_detect_features.cpp | 4 ++-- .../test_does_bound_a_volume.cpp | 4 ++-- .../test_hausdorff_bounded_error_distance.cpp | 20 ++++++++++--------- ...test_interpolated_corrected_curvatures.cpp | 3 ++- .../test_is_polygon_soup_a_polygon_mesh.cpp | 17 ++++++++-------- .../test_isolevel_refinement.cpp | 6 +++--- .../test_merging_border_vertices.cpp | 8 +++----- .../test_mesh_smoothing.cpp | 7 ++++--- .../test_orient_cc.cpp | 8 +++++--- .../Polygon_mesh_processing/test_pmp_clip.cpp | 9 ++++----- .../test_pmp_collision_detection.cpp | 5 +++-- .../test_pmp_locate.cpp | 11 +++++----- .../test_pmp_manifoldness.cpp | 5 +++-- .../test_pmp_non_conforming_snapping.cpp | 15 +++++++------- .../test_pmp_np_function.cpp | 11 ++++++---- .../test_pmp_polyhedral_envelope.cpp | 12 ++++++----- .../test_pmp_read_polygon_mesh.cpp | 4 ++-- .../test_pmp_remove_border_edge.cpp | 6 ++++-- .../test_pmp_repair_degeneracies.cpp | 8 ++++---- .../test_pmp_repair_self_intersections.cpp | 6 +++--- .../test_pmp_snapping.cpp | 12 +++++------ .../test_pmp_transform.cpp | 7 ++++--- .../test_pmp_triangle.cpp | 4 +++- .../test_remove_caps_needles.cpp | 9 +++++---- .../test_repair_polygon_soup.cpp | 4 ++-- .../test_shape_predicates.cpp | 9 +++++---- .../test_shape_smoothing.cpp | 6 +++--- .../test_simplify_polylines_pmp.cpp | 2 +- .../test_split_volume.cpp | 7 +++++-- .../test_stitching.cpp | 14 +++++++------ .../triangulate_faces_test.cpp | 8 +++++--- ...ate_hole_Polyhedron_3_no_delaunay_test.cpp | 13 ++++++------ .../triangulate_hole_Polyhedron_3_test.cpp | 7 +++++-- .../triangulate_hole_polyline_test.cpp | 8 ++++---- .../triangulate_hole_with_cdt_2_test.cpp | 19 ++++++++++-------- 63 files changed, 290 insertions(+), 238 deletions(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp index 72bd328a50d5..a8f3c2ea5ee2 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp @@ -10,6 +10,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; +typedef Kernel::Aff_transformation_3 Aff_transformation_3; typedef CGAL::Surface_mesh Mesh; namespace PMP = CGAL::Polygon_mesh_processing; @@ -23,7 +24,7 @@ int main(int argc, char** argv) in >> meshes[0]; for (int i=1; i trans(CGAL::Translation(), Kernel::Vector_3(i*0.2, 0, 0)); + Aff_transformation_3 trans(CGAL::Translation(), Kernel::Vector_3(i*0.2, 0, 0)); meshes[i]=meshes[0]; PMP::transform(trans, meshes[i]); } diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp index 44f1944be0b4..7fa0cbcd5407 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp @@ -1,5 +1,4 @@ #include -#include #include #include @@ -8,15 +7,15 @@ #include #include -using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; -using FT = typename Kernel::FT; -using Point_3 = typename Kernel::Point_3; -using Vector_3 = typename Kernel::Vector_3; - +using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; +using FT = typename Kernel::FT; +using Point_3 = typename Kernel::Point_3; +using Vector_3 = typename Kernel::Vector_3; +using Affine_transformation_3 = typename Kernel::Aff_transformation_3; using TAG = CGAL::Sequential_tag; using Surface_mesh = CGAL::Surface_mesh; using Polyhedron = CGAL::Polyhedron_3; -using Affine_transformation_3 = CGAL::Aff_transformation_3; + namespace PMP = CGAL::Polygon_mesh_processing; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/delaunay_remeshing_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/delaunay_remeshing_test.cpp index d1d70fdd1e2a..74a968ec0950 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/delaunay_remeshing_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/delaunay_remeshing_test.cpp @@ -1,11 +1,12 @@ -#include - -#include -#include #include #include #include +#include +#include + +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/extrude_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/extrude_test.cpp index b51bf4553f09..0bada4492f98 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/extrude_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/extrude_test.cpp @@ -1,7 +1,9 @@ +#include + #include #include #include -#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp index ac066d3ae1a9..df1531c64291 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp @@ -1,8 +1,9 @@ -#include -#include +#include + #include -#include +#include +#include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp index 3050a34753f7..e406db12ec72 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp @@ -1,11 +1,11 @@ #include -#include -#include +#include #include #include -#include +#include +#include #include @@ -376,4 +376,3 @@ int main(int argc, char* argv[]) std::cerr << "All done." << std::endl; return 0; } - diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_mesh_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_mesh_test.cpp index ce4855f964f2..4c90f3a17612 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_mesh_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_mesh_test.cpp @@ -1,8 +1,10 @@ -#include -#include +#include + #include #include -#include + +#include +#include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_soup_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_soup_test.cpp index f3c541ab65ca..b72e0397fb19 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_soup_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_soup_test.cpp @@ -1,18 +1,20 @@ -#include -#include - -#include -#include - -#include -#include -#include #include #include #include #include #include +#include +#include + +#include +#include + +#include +#include + +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp index 3517709a72ab..20a8e8993a14 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp @@ -1,15 +1,16 @@ // #define CGAL_PMP_COMPUTE_NORMAL_DEBUG_PP -#include -//#include +#include +#include +#include #include #include #include -#include -#include -#include + +#include +//#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_do_intersect_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_do_intersect_test.cpp index e06960044186..f9a083c580ec 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_do_intersect_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_do_intersect_test.cpp @@ -1,17 +1,17 @@ +#include -#include -#include -#include -#include +#include #include #include -#include - -#include #include +#include +#include +#include +#include + typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; typedef CGAL::Exact_predicates_exact_constructions_kernel Epec; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_polyhedron_boundary_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_polyhedron_boundary_test.cpp index 0421bb411fc8..7029c29a2f8e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_polyhedron_boundary_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_polyhedron_boundary_test.cpp @@ -1,7 +1,6 @@ - -#include #include #include +#include #include "point_inside_helpers.h" diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_surface_mesh_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_surface_mesh_test.cpp index b0be112cfbc1..ef7bf8f9e992 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_surface_mesh_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_surface_mesh_test.cpp @@ -1,11 +1,11 @@ +#include -#include -#include #include #include #include -#include +#include +#include #include "point_inside_helpers.h" diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/polygon_mesh_slicer_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/polygon_mesh_slicer_test.cpp index add77378cbc9..d74eb2fba20a 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/polygon_mesh_slicer_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/polygon_mesh_slicer_test.cpp @@ -1,20 +1,23 @@ // #define USE_SURFACE_MESH -#include -#include +#include + #ifdef USE_SURFACE_MESH #include #else #include #endif + #include -#include #include #include #include #include +#include +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_quality_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_quality_test.cpp index 7ab20cda4246..ada019dee942 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_quality_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_quality_test.cpp @@ -1,9 +1,11 @@ -#include -#include #include #include #include +#include + +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test.cpp index 40067cea5120..e8d69008fb04 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test.cpp @@ -7,17 +7,18 @@ //#define CGAL_PMP_REMESHING_VERY_VERBOSE //#define CGAL_PMP_REMESHING_EXPENSIVE_DEBUG -#include - -#include - #include #include #include #include #include +#include + +#include + #include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test_P_SM_OM.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test_P_SM_OM.cpp index eeebc63b3011..91deed70c468 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test_P_SM_OM.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test_P_SM_OM.cpp @@ -1,14 +1,17 @@ -#include +#include + #include #include -#include -#include #include #include #include #include #include -#include + +#include + +#include +#include namespace PMP = CGAL::Polygon_mesh_processing; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_with_isolated_constraints_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_with_isolated_constraints_test.cpp index 4e7ebe960925..115f245a9bbf 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_with_isolated_constraints_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_with_isolated_constraints_test.cpp @@ -1,10 +1,11 @@ -#include -#include +#include +#include +#include #include #include -#include -#include + +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_polyhedron_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_polyhedron_test.cpp index 1d1991ee86bc..1c26f47456a5 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_polyhedron_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_polyhedron_test.cpp @@ -1,15 +1,15 @@ -#include -#include -#include -#include +#include + +#include +#include #include #include -#include -#include - -#include +#include +#include +#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; typedef CGAL::Exact_predicates_exact_constructions_kernel Epec; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_surface_mesh_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_surface_mesh_test.cpp index 6e017c948c0b..1e64267703a4 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_surface_mesh_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_surface_mesh_test.cpp @@ -1,12 +1,13 @@ -#include -#include - -#include #include #include + +#include #include #include +#include +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_triangle_soup_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_triangle_soup_test.cpp index e067e13c129c..2cddabbdb964 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_triangle_soup_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_triangle_soup_test.cpp @@ -1,11 +1,12 @@ -#include -#include - -#include #include #include #include + #include +#include + +#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp index 04f7ddf5ee95..646f75e85db3 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp @@ -1,15 +1,16 @@ -#include +#include + #include #include #include #include #include #include - -#include #include #include +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cpp index 3af3402a5f22..e04e07ba556e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_autorefinement.cpp @@ -1,5 +1,3 @@ -#include -#include #include #include @@ -8,6 +6,9 @@ #include +#include +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_coref_epic_points_identity.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_coref_epic_points_identity.cpp index 03a50620020a..4c12d15f5de1 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_coref_epic_points_identity.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_coref_epic_points_identity.cpp @@ -1,6 +1,6 @@ -#include -#include #include +#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp index 31e4f9c71f2c..f5f59e4419be 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefine.cpp @@ -1,7 +1,9 @@ -#include +#include + #include #include -#include + +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp index 6508c4533375..b88c1c712727 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp @@ -1,6 +1,6 @@ -#include -#include #include +#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp index 8356106a9b1d..49a182d2bd31 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cpp @@ -2,9 +2,9 @@ // #define CGAL_COREFINEMENT_DEBUG #define CGAL_USE_DERIVED_SURFACE_MESH -#include -#include #include +#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_decimation_of_planar_patches.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_decimation_of_planar_patches.cpp index 8666d862dc41..7ee0c4861066 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_decimation_of_planar_patches.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_decimation_of_planar_patches.cpp @@ -1,9 +1,3 @@ -#include -#ifdef USE_POLYHEDRON -#include -#else -#include -#endif #include #include #include @@ -12,6 +6,14 @@ #include #include +#ifdef USE_POLYHEDRON +#include +#else +#include +#endif + +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_degenerate_pmp_clip_split_corefine.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_degenerate_pmp_clip_split_corefine.cpp index 0decb1164994..1027c841cfbd 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_degenerate_pmp_clip_split_corefine.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_degenerate_pmp_clip_split_corefine.cpp @@ -1,8 +1,7 @@ -#include #include #include #include - +#include // #define CGAL_DEBUG_PMP_CLIP // TODO: test coref diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_detect_features.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_detect_features.cpp index e2d84414b1fb..5e558a287d09 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_detect_features.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_detect_features.cpp @@ -1,7 +1,7 @@ -#include +#include #include +#include -#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_does_bound_a_volume.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_does_bound_a_volume.cpp index b19f892b98c2..e8c2dbc8678a 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_does_bound_a_volume.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_does_bound_a_volume.cpp @@ -1,6 +1,6 @@ -#include -#include #include +#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_hausdorff_bounded_error_distance.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_hausdorff_bounded_error_distance.cpp index dc5269ac7162..3e011b42feea 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_hausdorff_bounded_error_distance.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_hausdorff_bounded_error_distance.cpp @@ -4,22 +4,24 @@ // Use this def in order to get all DEBUG info related to the bounded-error Hausdorff code! #define CGAL_HAUSDORFF_DEBUG -#include -#include -#include -#include -#include - -#include -#include -#include #include #include #include #include #include +#include +#include +#include + #include +#include +#include + +#include +#include +#include + using SCK = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_interpolated_corrected_curvatures.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_interpolated_corrected_curvatures.cpp index c6a578c795a8..412443a42c74 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_interpolated_corrected_curvatures.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_interpolated_corrected_curvatures.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -6,6 +5,8 @@ #include #include +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp index ce72e576c507..a2843ecae8ca 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_is_polygon_soup_a_polygon_mesh.cpp @@ -1,17 +1,18 @@ -#include -#include - -#include -#include +#include +#include +#include #include #include #include -#include -#include -#include + #include +#include + +#include +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_isolevel_refinement.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_isolevel_refinement.cpp index 9e07c8314352..c61697135dd5 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_isolevel_refinement.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_isolevel_refinement.cpp @@ -1,9 +1,9 @@ -#include -#include - #include #include +#include +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_merging_border_vertices.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_merging_border_vertices.cpp index 2bb8c3cc3fbc..228f3b4c558b 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_merging_border_vertices.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_merging_border_vertices.cpp @@ -1,11 +1,9 @@ -#include -#include - #include -#include -#include +#include +#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Surface_mesh Surface_mesh; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_mesh_smoothing.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_mesh_smoothing.cpp index 986bdca5b533..de001979aad5 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_mesh_smoothing.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_mesh_smoothing.cpp @@ -1,9 +1,10 @@ -#include +#include +#include #include #include -#include -#include + +#include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_orient_cc.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_orient_cc.cpp index 827e169310b9..03076dc39d64 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_orient_cc.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_orient_cc.cpp @@ -1,10 +1,12 @@ -#include +#include +#include + #include +#include #include -#include -#include #include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_clip.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_clip.cpp index c564403312a0..eb38a6ad144f 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_clip.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_clip.cpp @@ -1,10 +1,11 @@ -#include #include +#include + #include #include -#include -#include +#include + #include #include @@ -879,5 +880,3 @@ int main() std::cout << "Done!" << std::endl; return EXIT_SUCCESS; } - - diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp index e8e28c9c2bd8..986f3b8768ec 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_collision_detection.cpp @@ -1,8 +1,9 @@ -#include +#include + #include #include -#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index d0554ebc9a6e..2ef00998069e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -1,6 +1,4 @@ -#include -#include -#include +#include // Graphs #include @@ -9,7 +7,9 @@ #include #include -#include +#include +#include +#include #include #include @@ -23,12 +23,11 @@ #include #include #include -#include #include #include -#include +#include #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_manifoldness.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_manifoldness.cpp index bd48a31364a0..4bf08dd6c34c 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_manifoldness.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_manifoldness.cpp @@ -1,10 +1,11 @@ -#include +#include #include #include #include -#include + +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_non_conforming_snapping.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_non_conforming_snapping.cpp index d091b7a3d25f..67390e17648d 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_non_conforming_snapping.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_non_conforming_snapping.cpp @@ -1,21 +1,21 @@ //#define CGAL_PMP_SNAP_DEBUG_PP //#define CGAL_PMP_SNAP_DEBUG_OUTPUT -#include -#include - -#include -#include -#include - #include #include #include #include +#include +#include +#include + #include #include +#include +#include + #include #include #include @@ -169,4 +169,3 @@ int main(int, char**) return EXIT_SUCCESS; } - diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_np_function.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_np_function.cpp index a9b59a6ffaa6..ed5d96771656 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_np_function.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_np_function.cpp @@ -1,12 +1,15 @@ -#include +#include +#include +#include + #include + +#include + #include #include #include -#include -#include -#include namespace CGAL { template -#include -#include -#include -#include #include #include +#include + +#include +#include + +#include +#include namespace PMP = CGAL::Polygon_mesh_processing; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_read_polygon_mesh.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_read_polygon_mesh.cpp index 1727cdfaee47..447fe007c99b 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_read_polygon_mesh.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_read_polygon_mesh.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_remove_border_edge.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_remove_border_edge.cpp index a94e1adadc64..e832627b1629 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_remove_border_edge.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_remove_border_edge.cpp @@ -1,7 +1,9 @@ -#include +#include + #include #include -#include + +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_degeneracies.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_degeneracies.cpp index de7e7a2d49ec..847e9dbf6155 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_degeneracies.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_degeneracies.cpp @@ -1,14 +1,14 @@ #define CGAL_PMP_DEBUG_SMALL_CC_REMOVAL -#include -#include +#include +#include #include #include #include -#include -#include +#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_self_intersections.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_self_intersections.cpp index 822ab16169a8..116e0d57db1c 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_self_intersections.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_self_intersections.cpp @@ -3,12 +3,12 @@ #define CGAL_PMP_REMOVE_SELF_INTERSECTION_DEBUG #define CGAL_PMP_REMOVE_SELF_INTERSECTION_OUTPUT -#include -#include - #include #include +#include +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_snapping.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_snapping.cpp index fa5fd3ba4793..3c2355717b9d 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_snapping.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_snapping.cpp @@ -1,18 +1,18 @@ // #define CGAL_PMP_SNAP_DEBUG_PP -#include -#include +#include +#include +#include #include #include #include -#include -#include -#include - #include +#include +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_transform.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_transform.cpp index 65d64eb1cbe8..695d4862623f 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_transform.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_transform.cpp @@ -1,11 +1,12 @@ -#include #include -#include -#include #include #include +#include + +#include +#include namespace PMP = CGAL::Polygon_mesh_processing; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_triangle.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_triangle.cpp index 6009318480d4..3bf1d7619344 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_triangle.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_triangle.cpp @@ -1,8 +1,10 @@ #include -#include + #include #include +#include + typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_3 Point_3; typedef K::Triangle_3 Triangle_3; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_remove_caps_needles.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_remove_caps_needles.cpp index fa80d93caf0b..505a731ed892 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_remove_caps_needles.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_remove_caps_needles.cpp @@ -1,12 +1,13 @@ -#include -#include - #include -#include #include + #include #include +#include +#include + +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_repair_polygon_soup.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_repair_polygon_soup.cpp index 4b9b0abbd3e0..e57d9b6903bd 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_repair_polygon_soup.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_repair_polygon_soup.cpp @@ -1,11 +1,11 @@ #define CGAL_PMP_REPAIR_POLYGON_SOUP_VERBOSE_PP -#include - #include #include +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_predicates.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_predicates.cpp index 7b1ef20f6a67..17228d4603ff 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_predicates.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_predicates.cpp @@ -1,14 +1,15 @@ -#include +#include +#include #include -#include -#include - #include +#include + #include #include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::FT FT; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_smoothing.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_smoothing.cpp index 7ed64301e90a..3d726ff3d244 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_smoothing.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_smoothing.cpp @@ -1,13 +1,13 @@ #define CGAL_PMP_SMOOTHING_DEBUG -#include +#include +#include #include #include #include -#include -#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_simplify_polylines_pmp.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_simplify_polylines_pmp.cpp index de196c65e643..770b055db8d6 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_simplify_polylines_pmp.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_simplify_polylines_pmp.cpp @@ -1,5 +1,5 @@ -#include #include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_split_volume.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_split_volume.cpp index 167625a4bb5f..a6ef851b78d0 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_split_volume.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_split_volume.cpp @@ -1,8 +1,11 @@ -#include -#include #include #include #include + +#include + +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp index 1b78eb8ca752..d5d2fa63b9d8 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp @@ -1,15 +1,17 @@ // #define CGAL_PMP_STITCHING_DEBUG_PP -#include -#include -#include -#include +#include +#include #include #include #include -#include -#include + +#include +#include + +#include +#include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_faces_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_faces_test.cpp index 66085b83c745..8b7b8f345563 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_faces_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_faces_test.cpp @@ -1,6 +1,3 @@ -#include -#include -#include #include @@ -10,6 +7,11 @@ #include #include +#include + +#include +#include + #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp index 133060f0288e..5b87e5dff42b 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp @@ -1,23 +1,22 @@ //#define POLY -#include -#include #include +#include + #ifdef POLY #include #else #include #endif -#include - -#include - -#include +#include #include #include +#include +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp index 146eed2fd875..d2c69c01591b 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp @@ -1,6 +1,8 @@ //#define POLY -#include +#include + + #ifdef POLY #include #else @@ -10,9 +12,10 @@ #include #include #include -#include #include +#include + #include #include #include diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp index 7e96e187d915..3cf12f057016 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_polyline_test.cpp @@ -1,6 +1,4 @@ - -#include -#include +#include #include #include @@ -10,7 +8,9 @@ #include #include -#include +#include +#include + typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; typedef CGAL::Exact_predicates_exact_constructions_kernel Epec; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index 8f1ede58b930..06bfc441eefe 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -1,17 +1,20 @@ -#include -#include -#include -#include -#include - #define CGAL_NO_CDT_2_WARNING +#include +#include + #include #include + #include #include -#include -#include + +#include +#include +#include +#include +#include + template< class PolygonMesh, From 5b187bd79db0a582da60496365c5c9cac8957d66 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 31 Jan 2024 11:10:00 +0000 Subject: [PATCH 2/2] Provide a fix for distance.h --- .../CGAL/Polygon_mesh_processing/distance.h | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index b3aaf70604f6..a071b3591d07 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -1449,6 +1449,8 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1, using Point_3 = typename Kernel::Point_3; using Triangle_3 = typename Kernel::Triangle_3; + auto midpoint = Kernel().construct_midpoint_3_object(); + #ifdef CGAL_HAUSDORFF_DEBUG std::cout << " -- Bounded Hausdorff --" << std::endl; std::cout << "error bound: " << error_bound << std::endl; @@ -1645,9 +1647,9 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1, } // Subdivide the triangle into four smaller triangles. - const Point_3 v01 = CGAL::midpoint(v0, v1); - const Point_3 v02 = CGAL::midpoint(v0, v2); - const Point_3 v12 = CGAL::midpoint(v1, v2); + const Point_3 v01 = midpoint(v0, v1); + const Point_3 v02 = midpoint(v0, v2); + const Point_3 v12 = midpoint(v1, v2); const std::array sub_triangles = { Triangle_3(v0, v01, v02), Triangle_3(v1 , v01, v12), Triangle_3(v2, v02, v12), Triangle_3(v01, v02, v12) }; @@ -2372,17 +2374,19 @@ typename Kernel::FT recursive_hausdorff_subdivision(const typename Kernel::Point using FT = typename Kernel::FT; using Point_3 = typename Kernel::Point_3; + auto midpoint = Kernel().construct_midpoint_3_object(); + auto squared_distance = Kernel().compute_squared_distance_3_object(); // If all edge lengths of the triangle are below the error bound, // return the maximum of the distances of the three points to TM2 (via TM2_tree). - const FT max_squared_edge_length = (CGAL::max)((CGAL::max)(CGAL::squared_distance(p0, p1), - CGAL::squared_distance(p0, p2)), - CGAL::squared_distance(p1, p2)); + const FT max_squared_edge_length = (CGAL::max)((CGAL::max)(squared_distance(p0, p1), + squared_distance(p0, p2)), + squared_distance(p1, p2)); if(max_squared_edge_length < sq_error_bound) { - return (CGAL::max)((CGAL::max)(CGAL::squared_distance(p0, tm2_tree.closest_point(p0)), - CGAL::squared_distance(p1, tm2_tree.closest_point(p1))), - CGAL::squared_distance(p2, tm2_tree.closest_point(p2))); + return (CGAL::max)((CGAL::max)(squared_distance(p0, tm2_tree.closest_point(p0)), + squared_distance(p1, tm2_tree.closest_point(p1))), + squared_distance(p2, tm2_tree.closest_point(p2))); } // Else subdivide the triangle and proceed recursively.