Hi,<br><br>I&#39;m trying to write this example ( <a href="http://www.vtk.org/Wiki/VTK/Tutorials/TriangleGeometryVertices">http://www.vtk.org/Wiki/VTK/Tutorials/TriangleGeometryVertices</a> ) in python language.<br><br>When you open the VTK rendering window occurs Segmentation fault.<br>

<br>I tried to open the file (.vtp) in the Paraview, when click on Apply, the Paraview closes.<br><br>Regards,<br>Paulo<br><br><br><b>The code:<br></b><br>from vtk import *<br><br>X = [1.0, 0.0, 0.0]<br>Y = [0.0, 0.0, 1.0]<br>

Z = [0.0, 0.0, 0.0]<br> <br>points = vtkPoints()<br>vertices = vtkCellArray()<br><br>ids = vtkIdList()<br>ids.SetNumberOfIds(3)<br><br>for i in xrange(3):<br>    ids.SetId(i, i)<br>    points.InsertNextPoint(X[i],Y[i],Z[i])<br>

    vertices.InsertNextCell(ids)<br>    <br>writer = vtkXMLPolyDataWriter()<br>
writer.SetFileName ( &quot;.//TriangleVerts.vtp&quot;)<br>
writer.SetInput(polydata)<br>
writer.Write()<br><br>polydata = vtkPolyData()<br>polydata.SetPoints(points)<br>polydata.SetVerts(vertices)<br>polydata.Update()<br><br>mapper = vtkPolyDataMapper()<br>mapper.SetInput(polydata)<br><br>actor = vtkActor()<br>

actor.SetMapper(mapper)<br> <br>ren = vtkRenderer()<br>ren.AddActor(actor)<br><br>renWin = vtkRenderWindow()<br>renWin.AddRenderer( ren )<br><br>iren = vtkRenderWindowInteractor()<br>iren.SetRenderWindow(renWin)<br><br>renWin.Render()<br>

<br><br><b>VTP File Content:</b><br><br><br>&lt;?xml version=&quot;1.0&quot;?&gt;<br>&lt;VTKFile type=&quot;PolyData&quot; version=&quot;0.1&quot; byte_order=&quot;LittleEndian&quot; compressor=&quot;vtkZLibDataCompressor&quot;&gt;<br>

  &lt;PolyData&gt;<br>    &lt;Piece NumberOfPoints=&quot;3&quot;                    NumberOfVerts=&quot;3&quot;                    NumberOfLines=&quot;0&quot;                    NumberOfStrips=&quot;0&quot;                    NumberOfPolys=&quot;0&quot;                   &gt;<br>

      &lt;PointData&gt;<br>      &lt;/PointData&gt;<br>      &lt;CellData&gt;<br>      &lt;/CellData&gt;<br>      &lt;Points&gt;<br>        &lt;DataArray type=&quot;Float32&quot; Name=&quot;Points&quot; NumberOfComponents=&quot;3&quot; format=&quot;appended&quot; RangeMin=&quot;0&quot;                    RangeMax=&quot;1&quot;                    offset=&quot;0&quot;                   /&gt;<br>

      &lt;/Points&gt;<br>      &lt;Verts&gt;<br>        &lt;DataArray type=&quot;Int64&quot; Name=&quot;connectivity&quot; format=&quot;appended&quot; RangeMin=&quot;&quot;                     RangeMax=&quot;&quot;                     offset=&quot;48&quot;                  /&gt;<br>

        &lt;DataArray type=&quot;Int64&quot; Name=&quot;offsets&quot; format=&quot;appended&quot; RangeMin=&quot;&quot;                     RangeMax=&quot;&quot;                     offset=&quot;108&quot;                 /&gt;<br>

      &lt;/Verts&gt;<br>      &lt;Lines&gt;<br>        &lt;DataArray type=&quot;Int64&quot; Name=&quot;connectivity&quot; format=&quot;appended&quot; RangeMin=&quot;&quot;                     RangeMax=&quot;&quot;                     offset=&quot;156&quot;                 /&gt;<br>

        &lt;DataArray type=&quot;Int64&quot; Name=&quot;offsets&quot; format=&quot;appended&quot; RangeMin=&quot;&quot;                     RangeMax=&quot;&quot;                     offset=&quot;172&quot;                 /&gt;<br>

      &lt;/Lines&gt;<br>      &lt;Strips&gt;<br>        &lt;DataArray type=&quot;Int64&quot; Name=&quot;connectivity&quot; format=&quot;appended&quot; RangeMin=&quot;&quot;                     RangeMax=&quot;&quot;                     offset=&quot;188&quot;                 /&gt;<br>

        &lt;DataArray type=&quot;Int64&quot; Name=&quot;offsets&quot; format=&quot;appended&quot; RangeMin=&quot;&quot;                     RangeMax=&quot;&quot;                     offset=&quot;204&quot;                 /&gt;<br>

      &lt;/Strips&gt;<br>      &lt;Polys&gt;<br>        &lt;DataArray type=&quot;Int64&quot; Name=&quot;connectivity&quot; format=&quot;appended&quot; RangeMin=&quot;&quot;                     RangeMax=&quot;&quot;                     offset=&quot;220&quot;                 /&gt;<br>

        &lt;DataArray type=&quot;Int64&quot; Name=&quot;offsets&quot; format=&quot;appended&quot; RangeMin=&quot;&quot;                     RangeMax=&quot;&quot;                     offset=&quot;236&quot;                 /&gt;<br>

      &lt;/Polys&gt;<br>    &lt;/Piece&gt;<br>  &lt;/PolyData&gt;<br>  &lt;AppendedData encoding=&quot;base64&quot;&gt;<br>   _AQAAAACAAAAkAAAAEAAAAA==eJxjYGiwZ8AJIHIAHX4Bfw==AQAAAACAAAAwAAAAGQAAAA==eJxjYICAFXqXL8XXM8ABIwMqgPEBffcDXA==AQAAAACAAAAYAAAAEAAAAA==eJxjYoAAFijNBqUBALgADQ==AAAAAACAAAAAAAAAAAAAAACAAAAAAAAAAAAAAACAAAAAAAAAAAAAAACAAAAAAAAAAAAAAACAAAAAAAAAAAAAAACAAAAAAAAA<br>

  &lt;/AppendedData&gt;<br>&lt;/VTKFile&gt;<br><br><br>