#include #include #include #include #include #include #include #include #include #include typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point; typedef Kernel::Point_2 Point_2; typedef CGAL::Surface_mesh Surface_mesh; typedef CGAL::Heat_method_3::Intrinsic_Delaunay_triangulation_3 Idt; int validate(char* fname) { std::string s(fname); std::string base = s.substr(0,s.length()-4); Surface_mesh sm; std::ifstream in(fname); in >> sm; if(!in || num_vertices(sm) == 0) { std::cerr << "Problem loading the input data" << std::endl; return 1; } Idt idt(sm); boost::property_map::type vpm = get(CGAL::vertex_point_t(),idt); std::cout.precision(17); BOOST_FOREACH(boost::graph_traits::face_descriptor fd, faces(idt)){ BOOST_FOREACH(boost::graph_traits::vertex_descriptor vd, vertices_around_face(halfedge(fd,idt),idt)){ std::cout << get(vpm, vd) << std::endl; } } std::cout << "done" << std::endl; return 0; } int main(int argc, char*argv[]) { int res = 0; for(int i=1; i < argc; i++){ std::cout << "validate("<< argv[i] << ")"<< std::endl; validate(argv[i]); res++; } return res; }