[vtkusers] python example for defining a PolyData object
Jeff
wjtriffo at lbl.gov
Fri Jul 6 12:17:25 EDT 2007
hi,
I have just begun using VTK and have (what I believe to be) a simple
question regarding PolyData.
I'm currently using a python visualization package (UCSF Chimera) that
has surface objects defined by vertices and their connectivity
(triangular mesh). I'd like to represent that data as a PolyData object,
and save that object as a .vtk file to use in another program.
This seems like a pretty simple thing to do / get my feet wet; is there
an example out there for defining PolyData attributes like vertices/etc
using python? I googled around a bit but did not find one; I am new at
python, too, which would make a python example more valuable. This seems
like it should be very few lines of code, just looping through the
vertices and connectivity of my Chimera object, and transferring them to
a vtkPolyData.
thanks,
-Jeff
More information about the vtkusers
mailing list