Files
cgal/Mesh_3/applications/cgal_to_medit.cpp
T
Laurent Rineau f5c912e666 - major switch from .C to .cpp. Andreas's script left a lot of things that
had to be fixed manually.
- new debug macro in <CGAL/Surface_mesher/Standard_criteria.h>
  - CGAL_MESH_3_DEBUG_CRITERIA
  Used in test/Mesh_3/combined_spheres*.cpp
2006-07-10 10:12:38 +00:00

47 lines
1.1 KiB
C++

#include "weighted_types.h"
// ios
#include <iostream>
#include <fstream>
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
#include <CGAL/IO/File_medit.h>
#include "utils.h"
int main(int , char** argv)
{
Tr tr;
C2T3 c2t3(tr);
std::ifstream ifs(argv[1]);
std::ofstream ofs(argv[2]);
if( !ifs || !ofs )
{
std::cerr << "Usage:\n"
<< " " << argv[0] << " INPUT OUPUT\n" <<
"\n"
" INPUT must be " << format_cgal_description <<
"\n"
" OUTPUT will be a medit file.\n"
"\n";
return EXIT_FAILURE;
}
std::cout << " Reading " << argv[1] << std::endl;
if( CGAL::Mesh_3::input_mesh(ifs, c2t3,
true,
&std::cerr) )
// if( CGAL::input_pslg_from_medit(ifs,
// c2t3,
// true, // debug
// &std::cout) ) // debug to cout
{
std::cout << " Writing " << argv[2] << std::endl;
CGAL::output_to_medit(ofs, c2t3);
return EXIT_SUCCESS;
}
else
return EXIT_FAILURE;
}