Commit e0824b96 authored by laurence's avatar laurence
Browse files

BUG: objToVTK: Do not print vertex normal header in vtk if none are in the obj

parent 8ce75feb
......@@ -273,12 +273,16 @@ int main(int argc, char *argv[])
}
}
outFile << nl << "NORMALS pointNormals float\n";
forAll(pointNormals, i)
if (!pointNormals.empty())
{
const vector& n = pointNormals[i];
outFile << nl << "NORMALS pointNormals float\n";
outFile << n.x() << ' ' << n.y() << ' ' << n.z() << nl;
forAll(pointNormals, i)
{
const vector& n = pointNormals[i];
outFile << n.x() << ' ' << n.y() << ' ' << n.z() << nl;
}
}
Info<< "End\n" << endl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment