[vtkusers] Please Help!!! (vtkOBJReader)

Phil Cook p.cook at cs.ucl.ac.uk
Fri Oct 18 07:29:57 EDT 2002


> Message: 11
> Date: Thu, 17 Oct 2002 16:49:40 +0100
> From: Goodwin Lawlor <goodwin.lawlor at ucd.ie>
> Subject: Re: [vtkusers] Please Help!!!
> To: Theodore Papatheodorou <tp500 at doc.ic.ac.uk>,
> 	'VTK Users' <vtkusers at public.kitware.com>
> 
> Hi Theodore,
> 
> I've come up against this problem with vtkOBJReader in the past and have
> posted to the list about it
> (http://public.kitware.com/pipermail/vtkusers/2001-June/006909.html)
> 
> Basically, vtkOBJReader reads in a polygon from disk and inserts its
> vertices  into the points list regardless if they've been inserted already.
> 

Did anyone give a reason why it does this? Surely it would be sufficient
to read the points into vtkPoints, polys into vtkCellArray, normals and
tCoords into vtkFloatArray, and then just say

	output = vtkPolyData()
	output.SetPoints(points)
	output.SetPolys(polys)
	output.GetPointData().SetNormals(normals)
	output.GetPointData().SetTCoords(tCoords)


Instead, vtkOBJReader reads the points, normals and tCoords, then it
reads the polygons, and in this process it changes all the point IDs and
duplicates most of the points. I can't figure out why this is even
necessary.


Phil




More information about the vtkusers mailing list