diff --git a/Mesh_3/doc/Mesh_3/CGAL/IO/File_medit.h b/Mesh_3/doc/Mesh_3/CGAL/IO/File_medit.h index 696e7b3e9cd..e50566add7b 100644 --- a/Mesh_3/doc/Mesh_3/CGAL/IO/File_medit.h +++ b/Mesh_3/doc/Mesh_3/CGAL/IO/File_medit.h @@ -3,7 +3,7 @@ namespace CGAL { /// \ingroup PkgMesh_3IOFunctions /// /// \brief Outputs a mesh complex to the medit (`.mesh`) file format. -/// See \cgalCite{frey:inria-00069921} for a detailed presentation of this file format. +/// See \cgalCite{frey:inria-00069921} for a comprehensive description of this file format. /// /// \param os the output stream /// \param c3t3 the mesh complex diff --git a/Mesh_3/include/CGAL/IO/File_medit.h b/Mesh_3/include/CGAL/IO/File_medit.h index a0c25b33124..8b12c81e1c4 100644 --- a/Mesh_3/include/CGAL/IO/File_medit.h +++ b/Mesh_3/include/CGAL/IO/File_medit.h @@ -879,10 +879,7 @@ void output_to_medit(std::ostream& os, const C3T3& c3t3, bool rebind = false, - bool show_patches = false, - typename boost::enable_if_c< - boost::is_same::value>::type* = NULL) + bool show_patches = false) { if ( rebind ) { diff --git a/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h index 2df445be16f..7dd4bcf73c7 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h @@ -25,12 +25,15 @@ #include #include -#include + #include #include +#include + #include -#include + #include +#include namespace CGAL { @@ -50,14 +53,9 @@ struct Dump_c3t3 { { std::clog<<"======dump c3t3===== to: " << prefix << std::endl; std::ofstream medit_file((prefix+".mesh").c_str()); - - // This medit function is meant to be used with Mesh_3 only - if(boost::is_same::value) - { - medit_file.precision(17); - CGAL::output_to_medit(medit_file, c3t3, false, true); - medit_file.close(); - } + medit_file.precision(17); + CGAL::output_to_medit(medit_file, c3t3, false /*rebind*/, true /*show_patches*/); + medit_file.close(); std::string bin_filename = prefix; bin_filename += ".binary.cgal"; diff --git a/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/CGAL/Periodic_3_mesh_3/IO/File_medit.h b/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/CGAL/Periodic_3_mesh_3/IO/File_medit.h index 9d64d012cee..dcd2c767721 100644 --- a/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/CGAL/Periodic_3_mesh_3/IO/File_medit.h +++ b/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/CGAL/Periodic_3_mesh_3/IO/File_medit.h @@ -3,7 +3,7 @@ namespace CGAL { /// \ingroup PkgPeriodic_3_mesh_3IOFunctions /// /// \brief Outputs a periodic mesh to the medit (`.mesh`) file format. -/// See \cgalCite{frey:inria-00069921} for a detailed presentation of this file format. +/// See \cgalCite{frey:inria-00069921} for a comprehensive description of this file format. /// /// \param os the output stream /// \param c3t3 the mesh complex @@ -16,11 +16,11 @@ namespace CGAL { /// using the label of each adjacent cell. /// template -void output_to_medit(std::ostream& os, - const C3T3& c3t3, - int occurrence_count = 8, - bool distinguish_copies = true, - bool rebind = false, - bool show_patches = false); +void output_periodic_mesh_to_medit(std::ostream& os, + const C3T3& c3t3, + int occurrence_count = 8, + bool distinguish_copies = true, + bool rebind = false, + bool show_patches = false); } // namespace CGAL diff --git a/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/PackageDescription.txt b/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/PackageDescription.txt index 33203b07c42..774d697a571 100644 --- a/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/PackageDescription.txt +++ b/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/PackageDescription.txt @@ -103,7 +103,7 @@ Many classes and functions used by this package are defined within the package and \ref PkgMesh_3Parameters. ## Input/Output Functions ## -- \link PkgPeriodic_3_mesh_3IOFunctions `CGAL::output_to_medit()` \endlink +- \link PkgPeriodic_3_mesh_3IOFunctions `CGAL::output_periodic_mesh_to_medit()` \endlink */ diff --git a/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/Periodic_3_mesh_3.txt b/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/Periodic_3_mesh_3.txt index 6cd8d260997..6a5699fd65f 100644 --- a/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/Periodic_3_mesh_3.txt +++ b/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/Periodic_3_mesh_3.txt @@ -459,7 +459,7 @@ This section presents various use cases of the periodic mesh generator. \subsection Periodic_3_mesh_3SubMultipleCopies Outputting Multiple Copies of a Periodic Mesh Generated meshes can be output to the `.mesh` file format, which can be read -with `medit`. The function \link PkgPeriodic_3_mesh_3IOFunctions `CGAL::output_to_medit()` \endlink +with `medit`. The function \link PkgPeriodic_3_mesh_3IOFunctions `CGAL::output_periodic_mesh_to_medit()` \endlink takes a stream, a mesh complex, and - optionally - the number of periodic copies that should be drawn, making it easier to observe the periodicity of the result. \cgalFigureRef{Periodic_3_mesh_3Periodic_copies} illustrates the different output diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_multi_domain.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_multi_domain.cpp index 1b4b26552dd..a1308ea3c39 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_multi_domain.cpp +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_multi_domain.cpp @@ -89,9 +89,9 @@ int main(int argc, char** argv) // Output std::ofstream medit_file("output_multi_domain.mesh"); - CGAL::output_to_medit(medit_file, c3t3, number_of_copies_in_output, - false /*do not associate different colors to each copy*/, - false /*do not rebind*/, true /*show patches*/); + CGAL::output_periodic_mesh_to_medit(medit_file, c3t3, number_of_copies_in_output, + false /*do not associate different colors to each copy*/, + false /*do not rebind*/, true /*show patches*/); std::cout << "EXIT SUCCESS" << std::endl; return 0; diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape.cpp index 0211eed42e9..7d0f7fe45a3 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape.cpp +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape.cpp @@ -68,7 +68,7 @@ int main(int argc, char** argv) C3t3 c3t3 = CGAL::make_periodic_3_mesh_3(domain, criteria); std::ofstream medit_file("output_implicit_shape.mesh"); - CGAL::output_to_medit(medit_file, c3t3, number_of_copies_in_output); + CGAL::output_periodic_mesh_to_medit(medit_file, c3t3, number_of_copies_in_output); std::cout << "EXIT SUCCESS" << std::endl; return 0; diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_features.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_features.cpp index fd048a34d5e..f83cd643645 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_features.cpp +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_features.cpp @@ -110,13 +110,13 @@ int main(int argc, char** argv) C3t3 c3t3 = CGAL::make_periodic_3_mesh_3(domain, criteria, no_features(), no_exude(), no_perturb()); std::ofstream medit_file("output_implicit_shape_without_protection.mesh"); - CGAL::output_to_medit(medit_file, c3t3, number_of_copies_in_output); + CGAL::output_periodic_mesh_to_medit(medit_file, c3t3, number_of_copies_in_output); // Mesh generation WITH feature preservation (and no optimizers) C3t3 c3t3_bis = CGAL::make_periodic_3_mesh_3(domain, criteria, features(), no_exude(), no_perturb()); std::ofstream medit_file_bis("output_implicit_shape_with_protection.mesh"); - CGAL::output_to_medit(medit_file_bis, c3t3_bis, number_of_copies_in_output); + CGAL::output_periodic_mesh_to_medit(medit_file_bis, c3t3_bis, number_of_copies_in_output); std::cout << "EXIT SUCCESS" << std::endl; return 0; diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_optimizers.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_optimizers.cpp index 80d73d13f70..1bf84816848 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_optimizers.cpp +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_optimizers.cpp @@ -76,7 +76,7 @@ int main(int argc, char** argv) exude(sliver_bound=10, time_limit=0)); std::ofstream medit_file("output_implicit_shape_optimized.mesh"); - CGAL::output_to_medit(medit_file, c3t3); + CGAL::output_periodic_mesh_to_medit(medit_file, c3t3); // Below, the mesh generation and the optimizations are done in several calls C3t3 c3t3_bis = CGAL::make_periodic_3_mesh_3(domain, criteria, @@ -84,7 +84,7 @@ int main(int argc, char** argv) no_perturb(), no_exude()); std::ofstream medit_file_bis("output_implicit_shape_non-optimized.mesh"); - CGAL::output_to_medit(medit_file_bis, c3t3_bis); + CGAL::output_periodic_mesh_to_medit(medit_file_bis, c3t3_bis); // Now, call each optimizer with its global function CGAL::odt_optimize_periodic_3_mesh_3(c3t3_bis, domain, convergence=0.03, freeze_bound=0.02, time_limit=30); @@ -93,7 +93,7 @@ int main(int argc, char** argv) CGAL::exude_periodic_3_mesh_3(c3t3_bis, sliver_bound=10, time_limit=0); std::ofstream medit_file_ter("output_implicit_shape_two_steps.mesh"); - CGAL::output_to_medit(medit_file_ter, c3t3_bis, number_of_copies_in_output); + CGAL::output_periodic_mesh_to_medit(medit_file_ter, c3t3_bis, number_of_copies_in_output); std::cout << "EXIT SUCCESS" << std::endl; return 0; 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 5ab0c9b8d18..4d6c01aff53 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 @@ -78,7 +78,7 @@ int main(int argc, char** argv) // Output std::ofstream medit_file("output_implicit_with_subdomains.mesh"); - CGAL::output_to_medit(medit_file, c3t3, number_of_copies_in_output); + CGAL::output_periodic_mesh_to_medit(medit_file, c3t3, number_of_copies_in_output); std::cout << "EXIT SUCCESS" << std::endl; return 0; diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h index 41074221d75..3aa92626c88 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h @@ -353,15 +353,12 @@ void output_to_medit(std::ostream& os, * each adjacent cell. */ template -void output_to_medit(std::ostream& os, - const C3T3& c3t3, - const int occurrence_count = 8, - const bool distinguish_copies = true, - bool rebind = false, - bool show_patches = false, - typename boost::enable_if_c< - boost::is_same::value>::type* = NULL) +void output_periodic_mesh_to_medit(std::ostream& os, + const C3T3& c3t3, + const int occurrence_count = 8, + const bool distinguish_copies = true, + bool rebind = false, + bool show_patches = false) { if(rebind) { diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_implicit_shapes_bunch.cpp b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_implicit_shapes_bunch.cpp index 5cfc2462f53..e281ebee9fb 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_implicit_shapes_bunch.cpp +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_implicit_shapes_bunch.cpp @@ -244,7 +244,7 @@ int main() // Output std::ofstream medit_file(file_name.c_str()); - CGAL::output_to_medit(medit_file, c3t3); + CGAL::output_periodic_mesh_to_medit(medit_file, c3t3); } std::cout << "EXIT SUCCESS" << std::endl; diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_implicit_shapes_with_features.cpp b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_implicit_shapes_with_features.cpp index 25f753bb206..5edf07d7005 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_implicit_shapes_with_features.cpp +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_implicit_shapes_with_features.cpp @@ -2,8 +2,8 @@ #include -#include #include +#include #include #include @@ -97,7 +97,7 @@ void test_protected_sphere() // Output std::ofstream medit_file_bis("protected_sphere.mesh"); - CGAL::output_to_medit(medit_file_bis, c3t3_bis); + CGAL::output_periodic_mesh_to_medit(medit_file_bis, c3t3_bis); } //////////////////////////////////////////////////////////////////////////////// @@ -162,7 +162,7 @@ void test_protected_squary_cylinder() // Output std::ofstream medit_file_bis("squary_cylinder.mesh"); - CGAL::output_to_medit(medit_file_bis, c3t3_bis); + CGAL::output_periodic_mesh_to_medit(medit_file_bis, c3t3_bis); } //////////////////////////////////////////////////////////////////////////////// @@ -275,7 +275,7 @@ void test_protected_squary_cylinder_2() // Output std::ofstream medit_file_bis("squary_cylinder_2.mesh"); - CGAL::output_to_medit(medit_file_bis, c3t3_bis); + CGAL::output_periodic_mesh_to_medit(medit_file_bis, c3t3_bis); } //////////////////////////////////////////////////////////////////////////////// diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_triply_periodic_minimal_surfaces.cpp b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_triply_periodic_minimal_surfaces.cpp index 64fbb6a2703..0034cbd793e 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_triply_periodic_minimal_surfaces.cpp +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/test_triply_periodic_minimal_surfaces.cpp @@ -305,7 +305,7 @@ int main(int, char**) oss_2 << iter->first << "__" << it->first << "__" << *i << ".mesh"; std::string output_filename = oss_2.str(); std::ofstream medit_file( output_filename.data() ); - CGAL::output_to_medit(medit_file, c3t3, *i); + CGAL::output_periodic_mesh_to_medit(medit_file, c3t3, *i); medit_file.close(); std::cout << ", " << *i << "-copy Saved" << std::flush;