[vtkusers] Error running example

Cory Quammen cory.quammen at kitware.com
Tue Sep 29 11:36:51 EDT 2015


Hi Ricardo,

I suspect you are using an older version of VTK. Which version are you
running? Try changing SetInputData to just SetInput.

Thanks,
Cory

On Tue, Sep 29, 2015 at 11:28 AM, Ricardo Santos <
ricardo.c.r.santos at gmail.com> wrote:

> Hello,
>
>      I am trying to run the python vtk example from
> http://www.vtk.org/Wiki/VTK/Examples/Python/PolyData/SubdivisionFilters
> and I am getting an error on this line:
>
> cleanPolyData.SetInputData(trianglePolyData)
>
>
> The preceding lines of code are:
>
> # Create a polydata object
> trianglePolyData = vtk.vtkPolyData()
>  # Add the geometry and topology to the polydata
> trianglePolyData.SetPoints(points)
> trianglePolyData.GetPointData().SetScalars(colors)
> trianglePolyData.SetPolys(triangles)
>  # Clean the polydata so that the edges are shared !
> cleanPolyData = vtk.vtkCleanPolyData()
> cleanPolyData.SetInputData(trianglePolyData)
>
>
> and the error I am getting is:
>
>
>   File "C:/Users/Ricardo Santos/Documents/Python Scripts/testeVTK3.py",
> line 80, in <module>
>     cleanPolyData.SetInputData(trianglePolyData)
>
> AttributeError: SetInputData
>
>
>      Does anyone know what I am getting wrong? Thanks!
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>


-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150929/6bcead4e/attachment.html>


More information about the vtkusers mailing list