Skip to content

Commit

Permalink
Merge pull request #1319 from VictorLamoine/vtk_io_fixes
Browse files Browse the repository at this point in the history
Fix bad logic preventing saving meshes in binary format
  • Loading branch information
jspricke committed Sep 2, 2015
2 parents d666a07 + 85007b2 commit 33ae7bc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions io/src/vtk_lib_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ());
Expand All @@ -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");
Expand All @@ -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 ());
Expand Down

0 comments on commit 33ae7bc

Please sign in to comment.