[vtkusers] too many points extracted from an unstructured grid
jean mensa
jmensa at rsmas.miami.edu
Sat Jun 16 09:12:23 EDT 2012
Hi all,
I am new to vtk and I am struggling reading points from an
unstructured grid. I use a python code that looks like this,
ugrid = vtk.vtkUnstructuredGrid()
gridreader=vtk.vtkXMLPUnstructuredGridReader()
gridreader.SetFileName(filename)
gridreader.Update()
ugrid=self.gridreader.GetOutput()
this gives me more points and cells then I would expect,
ugrid.GetNumberOfCells()
ugrid.GetNumberOfPoints()
BUT, when I try to get the locations of these points,
vtkPoints = ugrid.GetPoints()
vtkData = vtkPoints.GetData()
I find that many of these points are present multiple times.
Why is that?
How do I extract my points once and only once?
Thank you very much and forgive my ignorance...
j
More information about the vtkusers
mailing list