[vtkusers] Python vtkPolyData problem

David Thompson dcthomp at sandia.gov
Wed Nov 13 16:48:12 EST 2002


I'm having a problem using vtkpython... I can't get
vtkPolyDataMapper::SetInput() to accept a vtkPolyData
object that's been created directly, but it will
accept the result of, say, a vtkConeSource::GetOutput().
Here's a script that fails for me. Should it, or is
something broken???

I'm building with ParaViewComplete CVS from about 3 weeks
ago and Python 2.2.1.

	Thanks,
	David
----

from vtkpython import *

pd = vtkPolyData()
pdm = vtkPolyDataMapper()
cs = vtkConeSource()
co = cs.GetOutput()

# These report the same result
print co.GetClassName()
print pd.GetClassName()

# This works:
pdm.SetInput( co )

# This doesn't:
pdm.SetInput( pd )






More information about the vtkusers mailing list