[vtkusers] Traversing a vtkCellArray in Tcl?
Jeremy Winston
winston at cat.rpi.edu
Wed Sep 18 11:03:10 EDT 2002
VTKnowledgeable,
I'm trying to fiddle with a vtkPolyData instance ("pdi")
that consists of a set of 2D vtkPolyLines, using Tcl.
I want to be able to determine the line that is closest
to a given point. I also want to be able to delete
arbitrary lines.
I am having trouble using Tcl to do this.
[pdi GetLines] returns the vtkCellArray OK, but when I
try to traverse it:
[pdi GetLines] InitTraversal
set line [[pdi GetLines] GetNextCell npts pts]
I get an error that the function doesn't exist or is being
called with the wrong args. After reading through
vtk-src\Wrapping\vtkWrapTcl.c, it seems that GetNextCell
can't be wrapped since it takes references as arguments.
Is there any other way using Tcl for me to get at the
cell and point data to modify it?
Thanks,
-Jeremy
More information about the vtkusers
mailing list