I have a *.vtp
file that does not have normals (but needs them for what I am doing next). I wanted to use vtkPolyDataNormals
to add them … but it changes the number of nodes??
rd = vtk.vtkXMLPolyDataReader()
rd.SetFileName("input.vtp")
rd.Update()
pd = rd.GetOutput()
print(pd.GetNumberOfPoints())
104923
nf = vtk.vtkPolyDataNormals()
nf.SetInputData(pd)
nf.Update()
print(nf.GetOutput().GetPointData().GetNormals().GetNumberOfTuples())
104670