mirror of https://github.com/CGAL/cgal
fixed IO errors
This commit is contained in:
parent
1bf723dab8
commit
1bd5c2c4fa
|
|
@ -61,10 +61,10 @@ int main(const int argc, const char** argv) {
|
|||
std::vector<Point_3> input_vertices;
|
||||
std::vector< std::vector<std::size_t> > input_faces;
|
||||
|
||||
if (CGAL::read_OFF(input_file_off, input_vertices, input_faces)) {
|
||||
if (CGAL::IO::read_OFF(input_file_off, input_vertices, input_faces)) {
|
||||
std::cout << "* reading the OFF file: " << input_filename << "!" << std::endl;
|
||||
input_file_off.close();
|
||||
} else if (CGAL::read_PLY(input_file_ply, input_vertices, input_faces)) {
|
||||
} else if (CGAL::IO::read_PLY(input_file_ply, input_vertices, input_faces)) {
|
||||
std::cout << "* reading the PLY file: " << input_filename << "!" << std::endl;
|
||||
input_file_ply.close();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ int main(const int argc, const char** argv) {
|
|||
output_filename = "partition-faces.ply";
|
||||
std::ofstream output_file_faces(output_filename);
|
||||
output_file_faces.precision(20);
|
||||
if (!CGAL::write_PLY(output_file_faces, all_vertices, all_faces)) {
|
||||
if (!CGAL::IO::write_PLY(output_file_faces, all_vertices, all_faces)) {
|
||||
std::cerr << "ERROR: can't write to the file " << output_filename << "!" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ int main(const int argc, const char** argv) {
|
|||
output_filename = "reconstructed-model.ply";
|
||||
std::ofstream output_file_model(output_filename);
|
||||
output_file_model.precision(20);
|
||||
if (!CGAL::write_PLY(output_file_model, output_vertices, output_faces)) {
|
||||
if (!CGAL::IO::write_PLY(output_file_model, output_vertices, output_faces)) {
|
||||
std::cerr << "ERROR: can't write to the file " << output_filename << "!" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ void dump_2d_surface_mesh(
|
|||
const std::string filename = (tag != std::string() ? tag + "-" : "") + "polygons.ply";
|
||||
std::ofstream out(filename);
|
||||
out.precision(20);
|
||||
CGAL::write_PLY(out, mesh);
|
||||
CGAL::IO::write_PLY(out, mesh);
|
||||
out.close();
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ void dump_polygons(const DS& data, const std::string tag = std::string()) {
|
|||
const std::string filename = (tag != std::string() ? tag + "-" : "") + "polygons.ply";
|
||||
std::ofstream out(filename);
|
||||
out.precision(20);
|
||||
CGAL::write_PLY(out, mesh);
|
||||
CGAL::IO::write_PLY(out, mesh);
|
||||
out.close();
|
||||
|
||||
#if false
|
||||
|
|
@ -779,7 +779,7 @@ void dump_cdt(
|
|||
file_name += "support-cdt-" + std::to_string(sp_idx) + ".ply";
|
||||
std::ofstream out(file_name);
|
||||
out.precision(20);
|
||||
CGAL::write_PLY(out, mesh);
|
||||
CGAL::IO::write_PLY(out, mesh);
|
||||
out.close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ bool run_test(
|
|||
std::ifstream input_file(input_filename);
|
||||
std::vector<Point_3> input_vertices;
|
||||
std::vector< std::vector<std::size_t> > input_faces;
|
||||
const bool is_input_success = CGAL::read_OFF(input_file, input_vertices, input_faces);
|
||||
const bool is_input_success = CGAL::IO::read_OFF(input_file, input_vertices, input_faces);
|
||||
assert(is_input_success);
|
||||
if (!is_input_success) return false;
|
||||
std::vector<double> times;
|
||||
|
|
|
|||
Loading…
Reference in New Issue