From a73d3d5a4c6c8fb073f079a1ebca2019c67b7810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 8 Mar 2017 11:45:26 +0100 Subject: [PATCH] Fixed examples/tests project names and minor QoL changes --- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 14 +- .../mesh_implicit_shape_with_subdomains.cpp | 12 +- .../include/CGAL/Mesh_3/Lloyd_move.h | 181 +++++++++--------- .../CGAL/Mesh_3_periodic_triangulation_3.h | 12 +- .../CGAL/Mesh_domain_holder_with_corners_3.h | 16 +- .../include/CGAL/Periodic_3_mesh_criteria_3.h | 5 +- .../CGAL/Periodic_3_mesh_facet_criteria_3.h | 5 +- ...angulation_cell_base_with_circumcenter_3.h | 3 +- .../include/CGAL/make_periodic_mesh_3.h | 49 +++-- .../include/CGAL/refine_periodic_mesh_3.h | 4 +- .../test/Periodic_3_mesh_3/CMakeLists.txt | 31 +++ 11 files changed, 168 insertions(+), 164 deletions(-) create mode 100644 Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index e19b8d4d1b7..236f39b938a 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -project( Periodic_3_mesh_3 ) - +project( Periodic_3_mesh_3_Examples ) cmake_minimum_required(VERSION 2.6.2) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) cmake_policy(VERSION 2.8.4) @@ -16,19 +16,15 @@ endif() set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) if ( COMMAND cmake_policy ) - cmake_policy( SET CMP0003 NEW ) - endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) if ( NOT CGAL_FOUND ) - message(STATUS "This project requires the CGAL library, and will not be compiled.") return() - endif() # include helper file @@ -51,22 +47,16 @@ endif() # include for local package include_directories( BEFORE ../../include ) - # Creating entries for all C++ files with "main" routine # ########################################################## include( CGAL_CreateSingleSourceCGALProgram ) create_single_source_cgal_program( "helix_example.cpp" ) - create_single_source_cgal_program( "mesh_implicit_multi_domain.cpp" ) - create_single_source_cgal_program( "mesh_implicit_shape.cpp" ) - create_single_source_cgal_program( "mesh_implicit_shapes_bunch.cpp" ) - create_single_source_cgal_program( "mesh_implicit_shape_with_subdomains.cpp" ) - create_single_source_cgal_program( "mesh_triply_periodic_minimal_surfaces.cpp" ) diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_subdomains.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_subdomains.cpp index 1627e69e297..2f8608b82c2 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_subdomains.cpp +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_subdomains.cpp @@ -1,20 +1,18 @@ -#include - #include -#include -#include +#include +#include +#include #include #include #include - #include #include -#include -#include +#include #include +#include // Domain typedef CGAL::Exact_predicates_inexact_constructions_kernel K; diff --git a/Periodic_3_mesh_3/include/CGAL/Mesh_3/Lloyd_move.h b/Periodic_3_mesh_3/include/CGAL/Mesh_3/Lloyd_move.h index f2bc5aa9be6..2bea8103a53 100644 --- a/Periodic_3_mesh_3/include/CGAL/Mesh_3/Lloyd_move.h +++ b/Periodic_3_mesh_3/include/CGAL/Mesh_3/Lloyd_move.h @@ -25,6 +25,7 @@ #ifndef CGAL_MESH_3_LLOYD_MOVE_H #define CGAL_MESH_3_LLOYD_MOVE_H + #include #include @@ -44,31 +45,31 @@ class Lloyd_move { typedef typename C3T3::Triangulation Tr; typedef typename Tr::Geom_traits Gt; - + typedef typename Tr::Cell_handle Cell_handle; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Edge Edge; typedef typename Tr::Facet Facet; - typedef typename Tr::Point Point_3; + typedef typename Tr::Point Point_3; typedef typename Point_3::Point Bare_point_3; - + typedef typename std::vector Cell_vector; typedef typename std::vector Vertex_vector; typedef typename std::vector Facet_vector; - + typedef typename Gt::FT FT; typedef typename Gt::Vector_3 Vector_3; typedef typename Gt::Tetrahedron_3 Tetrahedron_3; typedef typename Gt::Plane_3 Plane_3; typedef typename Gt::Point_2 Point_2; - + typedef typename Gt::Aff_transformation_3 Aff_transformation_3; - + public: typedef SizingField Sizing_field; - + /** - * @brief Return move to apply on \c v according to Lloyd optimization + * @brief Return move to apply on \c v according to Lloyd optimization * function */ Vector_3 operator()(const Vertex_handle& v, @@ -96,14 +97,14 @@ public: return CGAL::NULL_VECTOR; break; } - + return CGAL::NULL_VECTOR; } - + #ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE static std::string name() { return std::string("Lloyd"); } #endif - + private: /** * Project_on_plane defines operator() to project Point_3 object on plane. @@ -111,43 +112,43 @@ private: struct Project_on_plane { Project_on_plane(const Plane_3& plane) : plane_(plane) {} - + Point_3 operator()(const Point_3& p) const { return Gt().construct_projected_point_3_object()(plane_,p); } - + private: const Plane_3& plane_; }; - + /** * To_2d defines operator() to transform Point_3 into Point_2 */ struct To_2d { To_2d(const Aff_transformation_3& to_2d) : to_2d_(to_2d) {} - + Point_2 operator()(const Point_3& p) const { return Point_2(to_2d_.transform(p).x(), to_2d_.transform(p).y()); } - + private: const Aff_transformation_3& to_2d_; }; - + /** * To_3d defines operator() to transform Point_2 into Point_3 */ struct To_3d { To_3d(const Aff_transformation_3& to_3d) : to_3d_(to_3d) {} - + Point_3 operator()(const Point_2& p) const { return to_3d_.transform(Point_3(Bare_point_3(p.x(),p.y(),0))); } - + private: const Aff_transformation_3& to_3d_; }; - - + + /** * Return move for inside vertex \c v */ @@ -159,40 +160,40 @@ private: // Move data Vector_3 move = CGAL::NULL_VECTOR; FT sum_masses(0); - + // ----------------------------------- // Tessellate Voronoi cell // ----------------------------------- // get cells incident to v const Tr& tr = c3t3.triangulation(); - + // Stores vertex that have already been used std::set treated_vertex; - + for (typename Cell_vector::const_iterator cit = incident_cells.begin(); cit != incident_cells.end(); ++cit) { const int& k = (*cit)->index(v); - + // For each vertex of the cell for ( int i=1 ; i<4 ; ++i ) { const Vertex_handle& v1 = (*cit)->vertex((k+i)&3); if ( treated_vertex.find(v1) != treated_vertex.end() ) continue; - + // Vertex has not been treated: turn around edge(v,v1) treated_vertex.insert(v1); turn_around_edge(v, Edge(*cit,k,(k+i)&3), tr, move, sum_masses, sizing_field); } } - + CGAL_assertion(sum_masses != 0.0); return move / sum_masses; } - + /** * Return move for on boundary vertex \c v */ @@ -201,10 +202,10 @@ private: const Sizing_field& sizing_field) const { CGAL_precondition(c3t3.in_dimension(v) == 2); - + // get all surface delaunay ball point std::vector points = extract_lloyd_boundary_points(v,c3t3); - + switch(points.size()) { case 0: // could happen if there is an isolated surface point into mesh @@ -213,14 +214,14 @@ private: return CGAL::NULL_VECTOR; break; } - case 2: // centroid + case 2: // centroid { const Point_3& a = points.front(); const Point_3& b = points.back(); return centroid_segment_move(v,a,b,sizing_field); break; } - case 3: // triangle centroid + case 3: // triangle centroid { const Point_3& a = points.at(0); const Point_3& b = points.at(1); @@ -232,10 +233,10 @@ private: return centroid_general_move(v,points.begin(),points.end(),sizing_field); break; } - + return CGAL::NULL_VECTOR; } - + /** * Returns a vector containing surface delaunay ball center of surface * facets incident to vertex \c v @@ -246,10 +247,10 @@ private: Facet_vector incident_facets; incident_facets.reserve(64); c3t3.triangulation().finite_incident_facets(v,std::back_inserter(incident_facets)); - + std::vector points; points.reserve(64); - + // Get c3t3's facets incident to v, and add their surface delaunay ball // center to output for ( typename Facet_vector::iterator fit = incident_facets.begin() ; @@ -258,13 +259,13 @@ private: { if ( ! c3t3.is_in_complex(*fit) ) continue; - + points.push_back(fit->first->get_facet_surface_center(fit->second)); } - + return points; } - + /** * Return move from \c v to centroid of segment [a,b] */ @@ -275,16 +276,16 @@ private: { typename Gt::Construct_vector_3 vector = Gt().construct_vector_3_object(); - + const Point_3& p = v->point(); - + FT da = density_1d(a,v,sizing_field); FT db = density_1d(b,v,sizing_field); - CGAL_assertion( !is_zero(da+db) ); + CGAL_assertion( !is_zero(da+db) ); return ( (vector(p,a)*da + vector(p,b)*db) / (da+db) ); } - + /** * Return move from \c v to centroid of triangle [a,b,c] */ @@ -296,9 +297,9 @@ private: { typename Gt::Construct_vector_3 vector = Gt().construct_vector_3_object(); - + const Point_3& p = v->point(); - + FT da = density_2d(a,v,sizing_field); FT db = density_2d(b,v,sizing_field); FT dc = density_2d(c,v,sizing_field); @@ -306,10 +307,10 @@ private: CGAL_assertion( !is_zero(da+db+dc) ); return ( (da*vector(p,a) + db*vector(p,b) + dc*vector(p,c)) / (da+db+dc) ); } - + /** * compute approximate centroid of intersection between 3D voronoi cell and - * boundary. The input is the set of intersection points between Voronoi + * boundary. The input is the set of intersection points between Voronoi * edges and the boundary. */ template @@ -319,24 +320,24 @@ private: const Sizing_field& sizing_field) const { CGAL_assertion(std::distance(first,last) > 3); - + // Fit plane using point-based PCA: compute least square fitting plane Plane_3 plane; CGAL::linear_least_squares_fitting_3(first,last,plane,Dimension_tag<0>()); - + // Project all points to the plane std::transform(first, last, first, Project_on_plane(plane)); CGAL_assertion(std::distance(first,last) > 3); - + // Get 2D-3D transformations Aff_transformation_3 to_3d = compute_to_3d_transform(plane, *first); Aff_transformation_3 to_2d = to_3d.inverse(); - + // Transform to 2D std::vector points_2d; points_2d.reserve(std::distance(first,last)); std::transform(first, last, std::back_inserter(points_2d), To_2d(to_2d)); - + // Compute 2D convex hull CGAL_assertion(points_2d.size() > 3); std::vector ch_2d; @@ -344,19 +345,19 @@ private: // as it triggers filter failures unnecessarily CGAL::ch_graham_andrew(points_2d.begin(),points_2d.end(), std::back_inserter(ch_2d)); - - // Lift back convex hull to 3D + + // Lift back convex hull to 3D std::vector polygon_3d; polygon_3d.reserve(ch_2d.size()); std::transform(ch_2d.begin(), ch_2d.end(), std::back_inserter(polygon_3d), To_3d(to_3d)); - + // Compute centroid using quadrature sizing return centroid_3d_polygon_move(v, polygon_3d.begin(), polygon_3d.end(), sizing_field); } - + /** * Return move from \c v to centroid of polygon[first,last] * Polygon has to be convex @@ -368,34 +369,34 @@ private: const Sizing_field& sizing_field) const { CGAL_precondition(std::distance(first,last) >= 3); - + typename Gt::Construct_vector_3 vector = Gt().construct_vector_3_object(); - + typename Gt::Construct_centroid_3 centroid = Gt().construct_centroid_3_object(); - - typename Gt::Compute_area_3 area = + + typename Gt::Compute_area_3 area = Gt().compute_area_3_object(); - + // Vertex current position const Point_3& vertex_position = v->point(); - + // Use as reference point to triangulate const Point_3& a = *first++; const Point_3* b = &(*first++); - + // Treat first point (optimize density_2d call) const Point_3& c = *first++; - + Point_3 triangle_centroid = centroid(a,*b,c); FT density = density_2d(triangle_centroid, v, sizing_field); - + FT sum_masses = density * area(a,*b,c); Vector_3 move = sum_masses * vector(vertex_position, triangle_centroid); - + b = &c; - + // Next points while ( first != last ) { @@ -404,10 +405,10 @@ private: Point_3 triangle_centroid = centroid(a,*b,c); FT density = density_2d(triangle_centroid, v, sizing_field); FT mass = density * area(a,*b,c); - + move = move + mass * vector(vertex_position, triangle_centroid); sum_masses += mass; - + // Go one step forward b = &c; } @@ -415,7 +416,7 @@ private: return move / sum_masses; } - + /** * Returns the transformation from reference_point to plane */ @@ -424,24 +425,24 @@ private: { typename Gt::Construct_base_vector_3 base = Gt().construct_base_vector_3_object(); - + typename Gt::Construct_orthogonal_vector_3 orthogonal_vector = Gt().construct_orthogonal_vector_3_object(); - + Vector_3 u = base(plane, 1); u = u / CGAL::sqrt(u*u); - + Vector_3 v = base(plane, 2); v = v / CGAL::sqrt(v*v); - + Vector_3 w = orthogonal_vector(plane); w = w / CGAL::sqrt(w*w); - + return Aff_transformation_3(u.x(),v.x(),w.x(),reference_point.x(), u.y(),v.y(),w.y(),reference_point.y(), u.z(),v.z(),w.z(),reference_point.z()); } - + /** * returns density_1d */ @@ -456,7 +457,7 @@ private: // s^(d+2) return ( 1/(s*s*s) ); } - + /** * returns density_2d */ @@ -471,7 +472,7 @@ private: // s^(d+2) return ( 1/(s*s*s*s) ); } - + /** * returns density_3d */ @@ -502,16 +503,16 @@ private: const Sizing_field& sizing_field) const { typedef typename Tr::Cell_circulator Cell_circulator; - - typename Gt::Compute_volume_3 volume = + + typename Gt::Compute_volume_3 volume = Gt().compute_volume_3_object(); - + typename Gt::Construct_centroid_3 centroid = Gt().construct_centroid_3_object(); - + typename Gt::Construct_vector_3 vector = Gt().construct_vector_3_object(); - + // typename Gt::Construct_tetrahedron_3 tetrahedron = Gt().construct_tetrahedron_3_object(); @@ -522,7 +523,7 @@ private: Cell_circulator current_cell = tr.incident_cells(edge); Cell_circulator done = current_cell; - + // a & b are fixed points const Point_3& a = v->point(); // @@ -532,7 +533,7 @@ private: current_cell++; // CGAL_assertion(current_cell != done); - + // c & d are moving points // Point_3 c = tr.dual(current_cell); @@ -541,10 +542,10 @@ private: current_cell++; // CGAL_assertion(current_cell != done); - + while ( current_cell != done ) { - // + // const Point_3 d = tr.dual(current_cell); Point_3 a_d = tr.point(current_cell, current_cell->index(v)); Vector_3 da = Vector_3(a_d, d); @@ -559,10 +560,10 @@ private: FT density = density_3d(tet_centroid, current_cell, sizing_field); FT abs_volume = CGAL::abs(volume(a,b,c,d)); FT mass = abs_volume * density; - + move = move + mass * vector(a,tet_centroid); sum_masses += mass; - + c = d; // a_c = a_d; @@ -572,7 +573,7 @@ private: } }; -} // end namespace Mesh_3 +} // end namespace Mesh_3 } //namespace CGAL diff --git a/Periodic_3_mesh_3/include/CGAL/Mesh_3_periodic_triangulation_3.h b/Periodic_3_mesh_3/include/CGAL/Mesh_3_periodic_triangulation_3.h index e173140f0e1..1528f15e92e 100644 --- a/Periodic_3_mesh_3/include/CGAL/Mesh_3_periodic_triangulation_3.h +++ b/Periodic_3_mesh_3/include/CGAL/Mesh_3_periodic_triangulation_3.h @@ -83,7 +83,6 @@ public: // typedef typename Gt::Weighted_point_3 Weighted_point; typedef typename Base::Locate_type Locate_type; - typedef typename Base::Segment Segment; typedef typename Base::Periodic_segment Periodic_segment; @@ -95,6 +94,8 @@ public: typedef typename Base::Conflict_tester Conflict_tester; typedef typename Base::Covering_sheets Covering_sheets; + using Base::dual; + using Base::locate; using Base::tds; using Base::get_offset; using Base::incident_cells; @@ -103,6 +104,7 @@ public: using Base::segment; using Base::set_offsets; using Base::point; + using Base::tetrahedron; using Base::periodic_tetrahedron; // using Base::nearest_vertex; @@ -139,8 +141,6 @@ public: return 3; } - using Base::dual; - Point dual(Cell_handle c) const { // it returns the canonical point @@ -332,8 +332,6 @@ public: this->insert_dummy_points(); } - using Base::tetrahedron; - Tetrahedron tetrahedron(const Cell_handle c) const { Periodic_tetrahedron pt = periodic_tetrahedron(c); @@ -375,8 +373,6 @@ public: assert(false); } - using Base::locate; - Cell_handle locate(const Point& p, Locate_type& l, int& i, int& j, Cell_handle start = Cell_handle(), bool* could_lock_zone = NULL) @@ -663,7 +659,7 @@ Stream &write_complex_to_medit(Stream &out, C3t3 &c3t3, << i * 4 + 2 + j * number_of_vertices_on_cells + first_vertex + shift << " " << i * 4 + 3 + j * number_of_vertices_on_cells + first_vertex + shift << " " << it->subdomain_index() << std::endl; - //<< 128 * j + 64 + 1 << std::endl; + // << 128 * j + 64 + 1 << std::endl; it++; } diff --git a/Periodic_3_mesh_3/include/CGAL/Mesh_domain_holder_with_corners_3.h b/Periodic_3_mesh_3/include/CGAL/Mesh_domain_holder_with_corners_3.h index 0b6cd53ece8..9b6a1a37c9a 100644 --- a/Periodic_3_mesh_3/include/CGAL/Mesh_domain_holder_with_corners_3.h +++ b/Periodic_3_mesh_3/include/CGAL/Mesh_domain_holder_with_corners_3.h @@ -209,14 +209,12 @@ public: { return boost::get(index); } template - void - add_corners(InputIterator first, InputIterator last); + void add_corners(InputIterator first, InputIterator last); - void - add_corner(const Point_3& point); + void add_corner(const Point_3& point); - bool - are_incident_surface_patch_corner(typename Base::Surface_patch_index, Corner_index) + bool are_incident_surface_patch_corner(typename Base::Surface_patch_index, + Corner_index) { // nobody calls this function assert(false); @@ -258,9 +256,9 @@ OutputIterator Mesh_domain_holder_with_corners_3:: get_corners(OutputIterator out) const { - for ( typename Corners::const_iterator - cit = corners_.begin(), end = corners_.end() ; cit != end ; ++cit ) - { + for ( typename Corners::const_iterator cit = corners_.begin(), + end = corners_.end(); + cit != end ; ++cit ) { *out++ = std::make_pair(cit->second,cit->first); } diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_criteria_3.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_criteria_3.h index 663bd3af439..2ef5e18be51 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_criteria_3.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_criteria_3.h @@ -177,9 +177,8 @@ public: (sizing_field_,*) )) -}; // end class Periodic_3_mesh_criteria_3 - -} // end namespace CGAL +}; // end class Periodic_3_mesh_criteria_3 +} // end namespace CGAL #endif // CGAL_PERIODIC_3_MESH_CRITERIA_3_H diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_facet_criteria_3.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_facet_criteria_3.h index 21a7712523c..5e11a75fe04 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_facet_criteria_3.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_facet_criteria_3.h @@ -197,9 +197,8 @@ private: Criteria criteria_; Tr helper_; -}; // end class Periodic_mesh_facet_criteria_3 - -} // end namespace CGAL +}; // end class Periodic_mesh_facet_criteria_3 +} // end namespace CGAL #endif // CGAL_PERIODIC_MESH_FACET_CRITERIA_3_H diff --git a/Periodic_3_mesh_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h b/Periodic_3_mesh_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h index ce67047fb81..bafb5650c2a 100644 --- a/Periodic_3_mesh_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h +++ b/Periodic_3_mesh_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h @@ -17,8 +17,7 @@ // Author(s) : Monique Teillaud // Sylvain Pion -// cell of a triangulation of any dimension <=3, -// storing its circumcenter lazily. +// cell of a triangulation of any dimension <=3, storing its circumcenter lazily. #ifndef CGAL_TRIANGULATION_CELL_BASE_WITH_CIRCUMCENTER_3_H #define CGAL_TRIANGULATION_CELL_BASE_WITH_CIRCUMCENTER_3_H diff --git a/Periodic_3_mesh_3/include/CGAL/make_periodic_mesh_3.h b/Periodic_3_mesh_3/include/CGAL/make_periodic_mesh_3.h index 789d9767dbf..06b21adcb7d 100644 --- a/Periodic_3_mesh_3/include/CGAL/make_periodic_mesh_3.h +++ b/Periodic_3_mesh_3/include/CGAL/make_periodic_mesh_3.h @@ -52,7 +52,6 @@ C3T3 make_periodic_mesh_3(const MD& md, const MC& mc, const T& ...t) make_periodic_mesh_3_bp(c3t3,mdh,mc,t...); return c3t3; } - #else template @@ -67,8 +66,7 @@ C3T3 make_periodic_mesh_3(const MD& md, const MC& mc) return c3t3; } -template +template C3T3 make_periodic_mesh_3(const MD& md, const MC& mc, const Arg1& a1) { typedef CGAL::Mesh_domain_holder_with_corners_3 MDH; @@ -80,8 +78,7 @@ C3T3 make_periodic_mesh_3(const MD& md, const MC& mc, const Arg1& a1) return c3t3; } -template +template C3T3 make_periodic_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2) { typedef CGAL::Mesh_domain_holder_with_corners_3 MDH; @@ -122,9 +119,11 @@ C3T3 make_periodic_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2 } template -C3T3 make_periodic_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2, - const Arg3& a3, const Arg4& a4, const Arg5& a5) + typename Arg1, typename Arg2, typename Arg3, + typename Arg4, typename Arg5> +C3T3 make_periodic_mesh_3(const MD& md, const MC& mc, + const Arg1& a1, const Arg2& a2, const Arg3& a3, + const Arg4& a4, const Arg5& a5) { typedef CGAL::Mesh_domain_holder_with_corners_3 MDH; @@ -134,25 +133,23 @@ C3T3 make_periodic_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2 make_periodic_mesh_3_bp(c3t3,mdh,mc,a1,a2,a3,a4,a5); return c3t3; } - #endif - BOOST_PARAMETER_FUNCTION( - (void), - make_periodic_mesh_3_bp, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced - (deduced - (optional - (features_param, (parameters::internal::Features_options), parameters::features(domain)) - (exude_param, (parameters::internal::Exude_options), parameters::no_exude()) - (perturb_param, (parameters::internal::Perturb_options), parameters::no_perturb()) // another default parameter distinct from Mesh_3 - (odt_param, (parameters::internal::Odt_options), parameters::no_odt()) // another default parameter distinct from Mesh_3 - (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd()) - ) - ) + (void), + make_periodic_mesh_3_bp, + parameters::tag, + (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced + (deduced + (optional + (features_param, (parameters::internal::Features_options), parameters::features(domain)) + (exude_param, (parameters::internal::Exude_options), parameters::no_exude()) + (perturb_param, (parameters::internal::Perturb_options), parameters::no_perturb()) // another default parameter distinct from Mesh_3 + (odt_param, (parameters::internal::Odt_options), parameters::no_odt()) // another default parameter distinct from Mesh_3 + (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd()) ) + ) + ) { make_periodic_mesh_3_impl(c3t3, domain, criteria, exude_param, perturb_param, odt_param, lloyd_param, @@ -160,7 +157,7 @@ BOOST_PARAMETER_FUNCTION( } template -void init_triangualation(C3T3& c3t3, MeshDomain& domain) +void init_triangulation(C3T3& c3t3, MeshDomain& domain) { typedef typename C3T3::Triangulation Tr; @@ -309,7 +306,7 @@ void make_periodic_mesh_3_impl(C3T3& c3t3, const bool with_features) { // Initialize the triangulation of c3t3 - init_triangualation(c3t3, const_cast(domain)); + init_triangulation(c3t3, const_cast(domain)); // Initialize c3t3 internal::Mesh_3::C3t3_initializer< @@ -336,8 +333,6 @@ void make_periodic_mesh_3_impl(C3T3& c3t3, parameters::no_reset_c3t3()); } - } // end namespace CGAL - #endif // CGAL_MAKE_PERIODIC_MESH_3_H diff --git a/Periodic_3_mesh_3/include/CGAL/refine_periodic_mesh_3.h b/Periodic_3_mesh_3/include/CGAL/refine_periodic_mesh_3.h index 84dd6959a4b..ffd5985d8f0 100644 --- a/Periodic_3_mesh_3/include/CGAL/refine_periodic_mesh_3.h +++ b/Periodic_3_mesh_3/include/CGAL/refine_periodic_mesh_3.h @@ -57,7 +57,6 @@ BOOST_PARAMETER_FUNCTION( reset_param() ); } - /** * @brief This function refines the mesh c3t3 wrt domain & criteria * @@ -162,7 +161,6 @@ void refine_periodic_mesh_3_impl(C3T3& c3t3, } -} // end namespace CGAL - +} // end namespace CGAL #endif // CGAL_REFINE_PERIODIC_MESH_3_H diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt new file mode 100644 index 00000000000..2bc52ffff2c --- /dev/null +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -0,0 +1,31 @@ +# Created by the script cgal_create_cmake_script +# This is the CMake script for compiling a CGAL application. + +project( Periodic_3_mesh_3_Tests ) + +cmake_minimum_required(VERSION 2.8.10) + +set(CMAKE_CXX_STANDARD 14) + +find_package(CGAL QUIET COMPONENTS Core ) + +if ( CGAL_FOUND ) + + include( ${CGAL_USE_FILE} ) + + include( CGAL_CreateSingleSourceCGALProgram ) + + include_directories (BEFORE "../../include") + +# create_single_source_cgal_program( "combined_spheres.cpp" ) +# create_single_source_cgal_program( "implicit_surface_mesher_test.cpp" ) +# create_single_source_cgal_program( "mesh_moebius_strip.cpp" ) +# create_single_source_cgal_program( "test_c2t3_iterators.cpp" ) +# create_single_source_cgal_program( "test_robust_circumcenter.cpp" ) + +else() + + message(STATUS "This program requires the CGAL library, and will not be compiled.") + +endif() +