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

This commit is contained in:
laurence
2012-01-05 17:45:46 +00:00
parent 8ce75feb7a
commit e0824b9692

View File

@ -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;