From d8b568638751c1b374b1d6f73a2312474657df06 Mon Sep 17 00:00:00 2001 From: Eugeny Novozhilov Date: Sat, 21 Dec 2013 01:08:22 +0400 Subject: [PATCH] fix for #416 savePolygonFile --- io/src/vtk_lib_io.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/io/src/vtk_lib_io.cpp b/io/src/vtk_lib_io.cpp index 043467cbd3a..dc4b1c8cef8 100644 --- a/io/src/vtk_lib_io.cpp +++ b/io/src/vtk_lib_io.cpp @@ -80,18 +80,18 @@ pcl::io::savePolygonFile (const std::string &file_name, const pcl::PolygonMesh& // TODO: what about sensor position and orientation?!?!?!? // TODO: how to adequately catch exceptions thrown by the vtk writers?! std::string extension = file_name.substr (file_name.find_last_of (".") + 1); - if (extension == ".pcd") // no Polygon, but only a point cloud + if (extension == "pcd") // no Polygon, but only a point cloud { int error_code = pcl::io::savePCDFile (file_name, mesh.cloud); if (error_code != 0) return (0); return (static_cast (mesh.cloud.width * mesh.cloud.height)); } - else if (extension == ".vtk") + else if (extension == "vtk") return (pcl::io::savePolygonFileVTK (file_name, mesh)); - else if (extension == ".ply") + else if (extension == "ply") return (pcl::io::savePolygonFilePLY (file_name, mesh)); - else if (extension == ".stl" ) + else if (extension == "stl" ) return (pcl::io::savePolygonFileSTL (file_name, mesh)); else {