From 3640902c6fb26161889f5f07d41d77c5eed2d79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 23 Aug 2017 17:15:44 +0200 Subject: [PATCH] Misc minor changes --- Alpha_shapes_2/include/CGAL/Alpha_shape_2.h | 2 +- .../Alpha_shapes_3/ex_alpha_shapes_3.cpp | 13 +++++++------ .../ex_alpha_shapes_exact_alpha.cpp | 19 +++++++++---------- .../ex_alpha_shapes_with_fast_location_3.cpp | 6 +++--- .../ex_fixed_weighted_alpha_shapes_3.cpp | 8 ++++---- Alpha_shapes_3/include/CGAL/Alpha_shape_3.h | 1 + .../Alpha_shapes_3/test_alpha_shape_3.cpp | 6 ------ .../test_weighted_alpha_shape_3.cpp | 5 ----- .../CGAL/Periodic_3_regular_triangulation_3.h | 2 +- 9 files changed, 26 insertions(+), 36 deletions(-) diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h index af575b1d0bd..eda58807bf9 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h @@ -81,7 +81,7 @@ public: typedef Type_of_alpha NT; typedef Type_of_alpha FT; - //check simplices are correctly instantiated + // check that simplices are correctly instantiated CGAL_static_assertion( (boost::is_same::value) ); CGAL_static_assertion( (boost::is_same::value) ); diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp index 0712f4f039e..05a143c4a1b 100644 --- a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp +++ b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_3.cpp @@ -15,7 +15,7 @@ typedef CGAL::Delaunay_triangulation_3 Triangulation_3; typedef CGAL::Alpha_shape_3 Alpha_shape_3; typedef Gt::Point_3 Point; -typedef Alpha_shape_3::Alpha_iterator Alpha_iterator; +typedef Alpha_shape_3::Alpha_iterator Alpha_iterator; int main() { @@ -27,21 +27,22 @@ int main() is >> n; std::cout << "Reading " << n << " points " << std::endl; Point p; - for( ; n>0 ; n--) { + for( ; n>0 ; n--) + { is >> p; lp.push_back(p); } // compute alpha shape Alpha_shape_3 as(lp.begin(),lp.end()); - std::cout << "Alpha shape computed in REGULARIZED mode by default" - << std::endl; + std::cout << "Alpha shape computed in REGULARIZED mode by default" << std::endl; // find optimal alpha value Alpha_iterator opt = as.find_optimal_alpha(1); - std::cout << "Optimal alpha value to get one connected component is " - << *opt << std::endl; + std::cout << "Optimal alpha value to get one connected component is " << *opt << std::endl; + as.set_alpha(*opt); assert(as.number_of_solid_components() == 1); + return 0; } diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp index 74607794c94..664f435c61f 100644 --- a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp +++ b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_exact_alpha.cpp @@ -6,17 +6,17 @@ #include #include -typedef CGAL::Exact_predicates_inexact_constructions_kernel Gt; -typedef CGAL::Tag_true Alpha_cmp_tag; +typedef CGAL::Exact_predicates_inexact_constructions_kernel Gt; +typedef CGAL::Tag_true Alpha_cmp_tag; //We use CGAL::Default to skip the complete declaration of base classes -typedef CGAL::Alpha_shape_vertex_base_3 Vb; -typedef CGAL::Alpha_shape_cell_base_3 Fb; -typedef CGAL::Triangulation_data_structure_3 Tds; -typedef CGAL::Delaunay_triangulation_3 Triangulation_3; +typedef CGAL::Alpha_shape_vertex_base_3 Vb; +typedef CGAL::Alpha_shape_cell_base_3 Fb; +typedef CGAL::Triangulation_data_structure_3 Tds; +typedef CGAL::Delaunay_triangulation_3 Triangulation_3; //Alpha shape with ExactAlphaComparisonTag set to true (note that the tag is also //set to true for Vb and Fb) -typedef CGAL::Alpha_shape_3 Alpha_shape_3; -typedef Gt::Point_3 Point; +typedef CGAL::Alpha_shape_3 Alpha_shape_3; +typedef Gt::Point_3 Point; int main() { @@ -27,8 +27,7 @@ int main() lp.push_back(Point(49.3696,31.4775,5.33777)); lp.push_back(Point(49.4264,32.6279,4.6205)); lp.push_back(Point(49.3127,30.3271,6.05503)); - - + // compute alpha shape Alpha_shape_3 as(lp.begin(),lp.end(),0,Alpha_shape_3::GENERAL); diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp index ee661186580..e9166e6a92c 100644 --- a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp +++ b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp @@ -14,9 +14,9 @@ typedef CGAL::Triangulation_data_structure_3 Tds; typedef CGAL::Delaunay_triangulation_3 Delaunay; typedef CGAL::Alpha_shape_3 Alpha_shape_3; -typedef K::Point_3 Point; -typedef Alpha_shape_3::Alpha_iterator Alpha_iterator; -typedef Alpha_shape_3::NT NT; +typedef K::Point_3 Point; +typedef Alpha_shape_3::Alpha_iterator Alpha_iterator; +typedef Alpha_shape_3::NT NT; int main() { diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp index 386fb85130d..5df0d8f868e 100644 --- a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp +++ b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_fixed_weighted_alpha_shapes_3.cpp @@ -43,13 +43,13 @@ int main() std::list facets; std::list edges; as.get_alpha_shape_cells(std::back_inserter(cells), - Fixed_alpha_shape_3::INTERIOR); + Fixed_alpha_shape_3::INTERIOR); as.get_alpha_shape_facets(std::back_inserter(facets), - Fixed_alpha_shape_3::REGULAR); + Fixed_alpha_shape_3::REGULAR); as.get_alpha_shape_facets(std::back_inserter(facets), - Fixed_alpha_shape_3::SINGULAR); + Fixed_alpha_shape_3::SINGULAR); as.get_alpha_shape_edges(std::back_inserter(edges), - Fixed_alpha_shape_3::SINGULAR); + Fixed_alpha_shape_3::SINGULAR); std::cout << " The 0-shape has : " << std::endl; std::cout << cells.size() << " interior tetrahedra" << std::endl; std::cout << facets.size() << " boundary facets" << std::endl; diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h index 8a7b13a9e1b..fdb1399af30 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h @@ -114,6 +114,7 @@ public: typedef typename internal::Alpha_nt_selector_3::Compute_squared_radius_3 Compute_squared_radius_3; typedef NT FT; typedef typename Gt::FT Coord_type; + //checks whether tags are correctly set in Vertex and Cell classes CGAL_static_assertion( (boost::is_same::value) ); CGAL_static_assertion( (boost::is_same::value) ); diff --git a/Alpha_shapes_3/test/Alpha_shapes_3/test_alpha_shape_3.cpp b/Alpha_shapes_3/test/Alpha_shapes_3/test_alpha_shape_3.cpp index a5e0963c0e7..0caa31df028 100644 --- a/Alpha_shapes_3/test/Alpha_shapes_3/test_alpha_shape_3.cpp +++ b/Alpha_shapes_3/test/Alpha_shapes_3/test_alpha_shape_3.cpp @@ -12,14 +12,8 @@ // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // -// $URL$ -// $Id$ -// $Date$ -// -// // Author(s) : Mariette Yvinec - #include #include diff --git a/Alpha_shapes_3/test/Alpha_shapes_3/test_weighted_alpha_shape_3.cpp b/Alpha_shapes_3/test/Alpha_shapes_3/test_weighted_alpha_shape_3.cpp index 4994c57004c..fe243ce4864 100644 --- a/Alpha_shapes_3/test/Alpha_shapes_3/test_weighted_alpha_shape_3.cpp +++ b/Alpha_shapes_3/test/Alpha_shapes_3/test_weighted_alpha_shape_3.cpp @@ -12,11 +12,6 @@ // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // -// $URL$ -// $Id$ -// $Date$ -// -// // Author(s) : Mariette Yvinec #include diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h index 7565c350907..ea0277a4d5b 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h @@ -907,7 +907,7 @@ public: protected: // Protected, because inheritors(e.g. periodic triangulation for meshing) - // of the class Periodic_3_Delaunay_triangulation_3 use this class + // of the class Periodic_3_regular_triangulation_3 use this class class Conflict_tester; private: