36 const std::string &output_file_name)
45 if(!(pm = in.
read(filename)))
47 std::cout <<
"failed";
51 typedef boost::graph_traits< Mesh > GraphTraits;
57 if(e == GraphTraits::null_edge())
59 std::cout <<
"Failed to retrieve edge from " << source_index <<
" to "
60 << target_index <<
"." << std::endl;
61 std::cout <<
"Exiting";
65 std::cout <<
"Collapsing edge " << source_index <<
" to " << target_index
75 out.
write(pm, output_file_name);
79 std::cout <<
"writing failed" << std::endl;
87 main(
int narg,
char **argv)
89 if(narg < 3 || narg > 5)
91 std::cout <<
"Usage: " << argv[0]
92 <<
" filename int [filenameresult [filenameexpectedresult]]; int "
93 "is either 0, 1, 2 or 3."
98 std::string to_treat = argv[1];
100 int halfedge_case = std::stoi(std::string(argv[2]));
101 std::string output_file_name = std::string(argv[3]);
103 if(halfedge_case == 0)
107 else if(halfedge_case == 1)
111 else if(halfedge_case == 2)
115 else if(halfedge_case == 3)
119 else if(halfedge_case == 4)
123 else if(halfedge_case == 5)
127 else if(halfedge_case == 6)