Skip to content

Commit c05cc19

Browse files
committed
Merge pull request #422 from ujohnny/416
savePolygonFile "Unsupported file type" fix
2 parents 77d0240 + d8b5686 commit c05cc19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

io/src/vtk_lib_io.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,18 @@ pcl::io::savePolygonFile (const std::string &file_name, const pcl::PolygonMesh&
8080
// TODO: what about sensor position and orientation?!?!?!?
8181
// TODO: how to adequately catch exceptions thrown by the vtk writers?!
8282
std::string extension = file_name.substr (file_name.find_last_of (".") + 1);
83-
if (extension == ".pcd") // no Polygon, but only a point cloud
83+
if (extension == "pcd") // no Polygon, but only a point cloud
8484
{
8585
int error_code = pcl::io::savePCDFile (file_name, mesh.cloud);
8686
if (error_code != 0)
8787
return (0);
8888
return (static_cast<int> (mesh.cloud.width * mesh.cloud.height));
8989
}
90-
else if (extension == ".vtk")
90+
else if (extension == "vtk")
9191
return (pcl::io::savePolygonFileVTK (file_name, mesh));
92-
else if (extension == ".ply")
92+
else if (extension == "ply")
9393
return (pcl::io::savePolygonFilePLY (file_name, mesh));
94-
else if (extension == ".stl" )
94+
else if (extension == "stl" )
9595
return (pcl::io::savePolygonFileSTL (file_name, mesh));
9696
else
9797
{

0 commit comments

Comments
 (0)