<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi all,<br>
    I'm triangulating a 2D Delaunay mesh from a cloud of points
    encapsulated in <font face="Consolas"><small>std::vector&lt;int&gt;
        *N</small></font> like so:<br>
    <font face="Consolas"><small><br>
        &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkPoints&gt; points =
        vtkSmartPointer&lt;vtkPoints&gt;::New();<br>
        <br>
        &nbsp;&nbsp;&nbsp; for(int i = 0; i &lt; N-&gt;size(); i += 2)<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; points-&gt;InsertNextPoint(N-&gt;at(i), N-&gt;at(i+1),
        some_value[i]);<br>
        <br>
        &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkPolyData&gt; polydata =
        vtkSmartPointer&lt;vtkPolyData&gt;::New();<br>
        &nbsp;&nbsp;&nbsp; polydata-&gt;SetPoints(points);<br>
        <br>
        &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkDelaunay2D&gt; delaunay =
        vtkSmartPointer&lt;vtkDelaunay2D&gt;::New();<br>
        &nbsp;&nbsp;&nbsp; delaunay-&gt;SetInput(polydata);<br>
        &nbsp;&nbsp;&nbsp; delaunay-&gt;Update();<br>
        &nbsp;&nbsp;&nbsp; <br>
        &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkXMLUnstructuredGridWriter&gt; writer =<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
        vtkSmartPointer&lt;vtkXMLUnstructuredGridWriter&gt;::New();<br>
        &nbsp;&nbsp;&nbsp; writer-&gt;SetInputConnection(delaunay-&gt;GetOutputPort());<br>
        &nbsp;&nbsp;&nbsp; writer-&gt;SetFileName("Mesh.vtu");<br>
        &nbsp;&nbsp;&nbsp; writer-&gt;Write();</small></font><br>
    <br>
    Apparently the triangulation is fine since I'm able to render it
    later on. But the writing part triggers the following error:<br>
    <small>ERROR: In ..\..\Filtering\vtkDemandDrivenPipeline.cxx, line
      827<br>
      vtkStreamingDemandDrivenPipeline (0000000002E8D030): Input for
      connection index 0 on input port index 0 for algorithm
      vtkXMLUnstructuredGridWriter(00000000035DC9C0) is of type
      vtkPolyData, but a vtkUnstructuredGrid is required.</small><br>
    <br>
    I find it weird since I pretty much did exactly the same than in <a
href="http://www.itk.org/Wiki/VTK/Examples/Boneyard/Cxx/PolyData/ConvexHull_vtkDelaunay3D">this
      example</a> with a delaunay3d.<br>
    <br>
    Any thoughts ?<br>
    <br>
    Cheers,<br>
    S.<br>
  </body>
</html>