#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_3.h>
#include <CGAL/Triangulation_data_structure_3.h>
#include <CGAL/Simplicial_mesh_cell_base_3.h>
#include <CGAL/Simplicial_mesh_vertex_base_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/tetrahedral_remeshing.h>
#include <CGAL/tags.h>
#include <CGAL/IO/File_medit.h>
#include <fstream>
using Subdomain_index = int;
using Surface_patch_index = unsigned char;
using Curve_index = char;
using Corner_index = short;
Curve_index, Corner_index>;
int main(int argc, char* argv[])
{
std::cout.precision(17);
std::cerr.precision(17);
std::string filename = (argc > 1) ? std::string(argv[1])
Triangulation tr;
std::ifstream is(filename, std::ios_base::in);
{
std::cerr << "Failed to read" << std::endl;
return EXIT_FAILURE;
}
std::ofstream os("after_remeshing.mesh");
os.close();
Triangulation tr2;
std::ifstream is2("after_remeshing.mesh");
{
std::cerr << "Failed to read (#2)" << std::endl;
return EXIT_FAILURE;
}
std::cout << "Done" << std::endl;
return EXIT_SUCCESS;
}
A data structure to represent and maintain a 3D complex embedded in a 3D triangulation.
Definition: Mesh_complex_3_in_triangulation_3.h:190
The class Simplicial_mesh_cell_base_3 is a model of the concept SimplicialMeshCellBase_3.
Definition: Simplicial_mesh_cell_base_3.h:76
The class Simplicial_mesh_vertex_base_3 is a model of the concept SimplicialMeshVertexBase_3.
Definition: Simplicial_mesh_vertex_base_3.h:95
void write_MEDIT(std::ostream &os, const T3 &t3, const NamedParameters &np=parameters::default_values())
outputs a mesh complex to the medit (.mesh) file format.
Definition: File_medit.h:998
bool read_MEDIT(std::istream &in, T3 &t3, const NamedParameters &np=parameters::default_values())
reads a mesh complex written in the medit (.mesh) file format.
Definition: File_medit.h:1128
std::string data_file_path(const std::string &filename)