Skip to content

Commit

Permalink
Added a warning if an obj file has too many vertex normals
Browse files Browse the repository at this point in the history
  • Loading branch information
pherbers committed Sep 19, 2018
1 parent 6723543 commit 3d34bad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions io/src/obj_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,9 @@ pcl::OBJReader::read (const std::string &file_name, pcl::PCLPointCloud2 &cloud,
{
if (normal_idx >= cloud.width)
{
if (normal_idx == cloud.width)
PCL_WARN ("[pcl:OBJReader] Too many vertex normals (expected %d), skipping remaining normals.\n", cloud.width, normal_idx + 1);
++normal_idx;
continue;
}
try
Expand Down

0 comments on commit 3d34bad

Please sign in to comment.