#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/boost/graph/helpers.h>
#include <CGAL/Polyhedral_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/refine_mesh_3.h>
typedef CGAL::Surface_mesh<K::Point_3> Polyhedron;
#ifdef CGAL_CONCURRENT_MESH_3
#else
#endif
int main(int argc, char*argv[])
{
Polyhedron polyhedron;
std::ifstream input(fname);
input >> polyhedron;
if(input.fail()){
std::cerr << "Error: Cannot read file " << fname << std::endl;
return EXIT_FAILURE;
}
input.close();
std::cerr << "Input geometry is not triangulated." << std::endl;
return EXIT_FAILURE;
}
Mesh_domain domain(polyhedron);
Mesh_criteria criteria(params::facet_angle(25).facet_size(0.15).facet_distance(0.008).
cell_radius_edge_ratio(3));
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria, params::no_perturb().no_exude());
std::ofstream medit_file("out_1.mesh");
medit_file.close();
Mesh_criteria new_criteria(params::cell_radius_edge_ratio(3).cell_size(0.03));
medit_file.open("out_2.mesh");
medit_file.close();
return EXIT_SUCCESS;
}
The class gathers the refinement criteria for mesh tetrahedra and surface facets where surface facets...
Definition: Mesh_criteria_3.h:186
The class Polyhedral_mesh_domain_3 implements a domain defined by a simplicial polyhedral surface.
Definition: Polyhedral_mesh_domain_3.h:148
bool is_triangle_mesh(const FaceGraph &g)
void refine_mesh_3(C3T3 &c3t3, const MeshDomain &domain, const MeshCriteria &criteria, const NamedParameters &np=parameters::default_values())
The function refine_mesh_3() is a 3D mesh generator.
Definition: refine_mesh_3.h:264
void write_MEDIT(std::ostream &os, const T3 &t3, const NamedParameters &np=parameters::default_values())
std::string data_file_path(const std::string &filename)