<div dir="ltr">Hello,<div><br></div><div>     I am trying to run the python vtk example from <a href="http://www.vtk.org/Wiki/VTK/Examples/Python/PolyData/SubdivisionFilters">http://www.vtk.org/Wiki/VTK/Examples/Python/PolyData/SubdivisionFilters</a> and I am getting an error on this line:</div><div><br></div><div><pre class="" style="font-family:monospace,monospace;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-stretch:normal;font-size:1em;margin-top:0px;margin-bottom:0px;vertical-align:top;background:none rgb(249,249,249)">cleanPolyData.<span class="">SetInputData</span><span class="">(</span>trianglePolyData<span class="">)</span></pre><br>The preceding lines of code are:</div><div><br></div><div><pre class="" style="font-family:monospace,monospace;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-stretch:normal;font-size:1em;margin-top:0px;margin-bottom:0px;vertical-align:top;background:none rgb(249,249,249)"><span class="" style="color:rgb(128,128,128);font-style:italic"># Create a polydata object</span>
trianglePolyData <span class="" style="color:rgb(102,204,102)">=</span> vtk.<span class="">vtkPolyData</span><span class="">(</span><span class="">)</span>
 
<span class="" style="color:rgb(128,128,128);font-style:italic"># Add the geometry and topology to the polydata</span>
trianglePolyData.<span class="">SetPoints</span><span class="">(</span>points<span class="">)</span>
trianglePolyData.<span class="">GetPointData</span><span class="">(</span><span class="">)</span>.<span class="">SetScalars</span><span class="">(</span>colors<span class="">)</span>
trianglePolyData.<span class="">SetPolys</span><span class="">(</span>triangles<span class="">)</span>
 
<span class="" style="color:rgb(128,128,128);font-style:italic"># Clean the polydata so that the edges are shared !</span>
cleanPolyData <span class="" style="color:rgb(102,204,102)">=</span> vtk.<span class="">vtkCleanPolyData</span><span class="">(</span><span class="">)</span>
cleanPolyData.<span class="">SetInputData</span><span class="">(</span>trianglePolyData)</pre><pre class="" style="font-family:monospace,monospace;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-stretch:normal;font-size:1em;margin-top:0px;margin-bottom:0px;vertical-align:top;background:none rgb(249,249,249)"><br></pre>and the error I am getting is:<br><br><br>  File "C:/Users/Ricardo Santos/Documents/Python Scripts/testeVTK3.py", line 80, in <module><br>    cleanPolyData.SetInputData(trianglePolyData)<br><br>AttributeError: SetInputData<br><br><br>     Does anyone know what I am getting wrong? Thanks!<br></div></div>