<div>Hi,<br><br>I searched the entire mail archive for answer to my problem, but found only problems no solutions to them.<br><br>My problem is, I have input points in the form of x, y and z (large numbers(double type)) and i want the output as the set of triangles, however i am getting only the 
<br>vertics.<br><br>Here is the code snippet that i am using to get the output as set of triangles.<br><br>vtkDelaunay2D* pDelny = vtkDelaunay2D::New( );<br>vtkPolyData* pPointSet = vtkPolyData::New( );<br>vtkPoints* pPoints = vtkPoints::New( );
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//collects the points i.e. x , y, and z<br>GetPoints( pPoints );<br><br>pPointSet-&gt;SetPoints( pPoints );<br><br>//now generate the vtk file<br>vtkPolyDataWriter* writer = vtkPolyDataWriter::New();
<br>writer-&gt;SetFileName( &quot;c:\\earth.vtk&quot;);<br>writer-&gt;SetInput( pPointSet );<br>writer-&gt;Write(); //throws an exception<br>writer-&gt;Update();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;&nbsp;&nbsp; /***the generated vtk file contains the only one fixed value***/
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;///However i am not usig this file<br></strong><br>pDelny-&gt;SetTolerance( 0.001 );<br>//pDelny-&gt;SetBoundingTriangulation(1);<br>pDelny-&gt;SetAlpha( 1 );<br>//pDelny-&gt;BoundingTriangulationOff();<br>
//pDelny-&gt;SetOffset( 1000 );</div>
<div><br>pDelny-&gt;SetInput(pPointSet); <br>pDelny-&gt;SetSource( pPointSet );<br>pDelny-&gt;Update();</div>
<div>&nbsp;</div>
<div>
<p>&nbsp;vtkPolyData* pVtkData = pDelny-&gt;GetOutput( );<br>&nbsp;int nsize = pVtkData-&gt;GetNumberOfCells();&nbsp;//returned the same number as the number of points<br>&nbsp;vtkCellArray* cellPol = pVtkData-&gt;GetPolys(); //zero returned
<br>&nbsp;int numpol = cellPol-&gt;GetNumberOfCells();<br>&nbsp;vtkCellArray* cellVert = pVtkData-&gt;GetVerts();<br>&nbsp;int numver = cellVert-&gt;GetNumberOfCells(); //returned the same number as the number of points</p>
<p>&nbsp;nCells = pVtkData-&gt;GetNumberOfPolys();<br>&nbsp;nCnt3 = pVtkData-&gt;GetNumberOfVerts(); //returned the same number as the number of points</p>
<p>But where are the triangles????</p></div>
<div>Now through pDelny-&gt;GetOutput I am expecting set of triangles in vtkPolyData object.</div>
<div>Am I right? <br><br>Thanks</div>