[vtkusers] Differences in vtkPolyData for use with vtkCurvatures

Olliebrown seth.berrier at gmail.com
Wed Feb 9 15:49:58 EST 2011


I've been examining things on my own and I think this is a mistake (or a
woefull oversight) in vtkOBJReader.

Here's some info for the vtkPolyData that is produced by a vtkPLYReader:


> Input Mesh '[censored]/chess/Pieces/KingOnly.ply':
> 	0 point data tuples.
> 	PointData->Normals is NULL.
> 	0 vertex cells.
> 	6242 point cells.
> 	12480 polygon cells.
> 

Here's the vtkPolyData for the same mesh as an OBJ this time produced by
vtkOBJReader:


> Input Mesh '[censored]/chess/Pieces/KingOnly.obj':
> 	37440 point data tuples.
> 	37440 point data normals.
> 	0 vertex cells.
> 	37440 point cells.
> 	12480 polygon cells.
> 

While I don't know what the difference is between a vtkPolyData's
'PointData' member and it's 'Points' member, what worries me the most here
is the actual point count difference.  The PLY has 6,242 vertices but the
OBJ has 37,440 vertices.  I checked the obj file and it lists only 6,242
vertices.  This means that vtkOBJReader is duplicating vertices.

I've seen this sort of thing happen before with mesh I/O and it creates big
problems.  Once vertices get duplicated face adjacency information is lost
and without face adjacency information many computational geometry functions
(like computing vertex curvature or smoothing of normals) are meaningless. 
You essentially have 12,480 independent polygons, not a mesh.

I'm going to see if I can fix this ... perhaps vtk has a mesh welding filter
*fingers crossed*.  But, IMHO (which I know doesn't really have any value
around here since this is my first post ) this is really a mistake in the
vtkOBJReader class.

Seth
-- 
View this message in context: http://vtk.1045678.n5.nabble.com/Differences-in-vtkPolyData-for-use-with-vtkCurvatures-tp3378043p3378284.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list