<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<int>
*N</small></font> like so:<br>
<font face="Consolas"><small><br>
vtkSmartPointer<vtkPoints> points =
vtkSmartPointer<vtkPoints>::New();<br>
<br>
for(int i = 0; i < N->size(); i += 2)<br>
points->InsertNextPoint(N->at(i), N->at(i+1),
some_value[i]);<br>
<br>
vtkSmartPointer<vtkPolyData> polydata =
vtkSmartPointer<vtkPolyData>::New();<br>
polydata->SetPoints(points);<br>
<br>
vtkSmartPointer<vtkDelaunay2D> delaunay =
vtkSmartPointer<vtkDelaunay2D>::New();<br>
delaunay->SetInput(polydata);<br>
delaunay->Update();<br>
<br>
vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer =<br>
vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();<br>
writer->SetInputConnection(delaunay->GetOutputPort());<br>
writer->SetFileName("Mesh.vtu");<br>
writer->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>