const char *infilename = "./Remesh_Before.stl";
const char *outfilename = "./Remesh_2.0.stl";
TriMesh mesh2;
if (!OpenMesh::IO::read_mesh(mesh2, infilename))
{
std::cout << "chenbk read error\n";
return;
}
else
{
std::cout << "chenbk read ok\n";
}
//mesh.update_normals();
//! re-mesh
IsotropicRemesher<TriMesh> remesher2;
remesher2.remesh(mesh2, 2.0); //! runtime exception!
mesh2.update_normals();
if (!OpenMesh::IO::write_mesh(mesh2, outfilename))
{
std::cout << "chenbk write error\n";
return;
}
else
{
std::cout << "chenbk write ok\n";
}