From 85007b2d0c5dba4aef912934adcd4396aa72d53c Mon Sep 17 00:00:00 2001 From: Victor Lamoine Date: Wed, 2 Sep 2015 19:20:25 +0200 Subject: [PATCH] Fix bad logic preventing saving meshes in binary format --- io/src/vtk_lib_io.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/io/src/vtk_lib_io.cpp b/io/src/vtk_lib_io.cpp index e00bd79d97a..1e033702911 100644 --- a/io/src/vtk_lib_io.cpp +++ b/io/src/vtk_lib_io.cpp @@ -182,8 +182,8 @@ pcl::io::savePolygonFileVTK (const std::string &file_name, poly_writer->SetInputData (poly_data); #endif - if (!binary_format) - poly_writer->SetFileTypeToASCII (); + if (binary_format) + poly_writer->SetFileTypeToBinary (); poly_writer->SetFileName (file_name.c_str ()); return (poly_writer->Write ()); @@ -206,8 +206,8 @@ pcl::io::savePolygonFilePLY (const std::string &file_name, poly_writer->SetInputData (poly_data); #endif - if (!binary_format) - poly_writer->SetFileTypeToASCII (); + if (binary_format) + poly_writer->SetFileTypeToBinary (); poly_writer->SetFileName (file_name.c_str ()); poly_writer->SetArrayName ("Colors"); @@ -230,8 +230,8 @@ pcl::io::savePolygonFileSTL (const std::string &file_name, poly_writer->SetInputData (poly_data); #endif - if (!binary_format) - poly_writer->SetFileTypeToASCII (); + if (binary_format) + poly_writer->SetFileTypeToBinary (); poly_writer->SetFileName (file_name.c_str ()); return (poly_writer->Write ());