[vtkusers] how to get index of a point of a polygon?
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Mon Nov 11 22:30:04 EST 2002
>>>>> "EC" == Elvis Chen <anisotropic7 at yahoo.ca> writes:
EC> My question is, once I read the .vtk file through
EC> vtkPolyDataReader, how to I get the index of a point that a
EC> given triangle is made of? e.g. for triangle 2, how do I get
EC> indices of (6,7,8) back?
r = vtkPolyDataReader()
# setup your reader.
r.Update()
o = r.GetOutput()
c = o.GetCell(2)
for i in range(c.GetNumberOfPoints()):
print c.GetPointId(i)
prabhu
More information about the vtkusers
mailing list