<div>Hi Sylvain,</div>
<div> </div>
<div>After setting the vtkcellarray(for polys) in vtkpolydata (which is input to the delaunay2d), Now I am able to get the triangles.</div>
<div> </div>
<div>Thankx<br><br> </div>
<div><span class="gmail_quote">2005/11/4, Sylvain Jaume <<a href="mailto:sylvain.jaume@kitware.com">sylvain.jaume@kitware.com</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Dhaniram Kshirsagar,<br><br>You don't need to use delaunay->SetSource().<br>Use it only if you want constrained Delaunay.
<br><br>Cheers,<br>Sylvain<br><br>Dhaniram Kshirsagar wrote:<br><br>> Hi,<br>><br>> I searched the entire mail archive for answer to my problem, but found<br>> only problems no solutions to them.<br>><br>> My problem is, I have input points in the form of x, y and z (large
<br>> numbers(double type)) and i want the output as the set of triangles,<br>> 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<br>
> triangles.<br>><br>> vtkDelaunay2D* pDelny = vtkDelaunay2D::New( );<br>> vtkPolyData* pPointSet = vtkPolyData::New( );<br>> vtkPoints* pPoints = vtkPoints::New( );<br>><br>> //collects the points
i.e. x , y, and z<br>> GetPoints( pPoints );<br>><br>> pPointSet->SetPoints( pPoints );<br>><br>> //now generate the vtk file<br>> vtkPolyDataWriter* writer = vtkPolyDataWriter::New();<br>> writer->SetFileName( "c:\\earth.vtk");
<br>> writer->SetInput( pPointSet );<br>> writer->Write(); //throws an exception<br>> writer->Update();<br>> * /***the generated vtk file contains the only one fixed<br>> value***/<br>
> ///However i am not usig this file<br>> *<br>> pDelny->SetTolerance( 0.001 );<br>> //pDelny->SetBoundingTriangulation(1);<br>> pDelny->SetAlpha( 1 );<br>> //pDelny->BoundingTriangulationOff();
<br>> //pDelny->SetOffset( 1000 );<br>><br>> pDelny->SetInput(pPointSet);<br>> pDelny->SetSource( pPointSet );<br>> pDelny->Update();<br>><br>><br>> vtkPolyData* pVtkData = pDelny->GetOutput( );
<br>> int nsize = pVtkData->GetNumberOfCells(); //returned the same number<br>> as the number of points<br>> vtkCellArray* cellPol = pVtkData->GetPolys(); //zero returned<br>> int numpol = cellPol->GetNumberOfCells();
<br>> vtkCellArray* cellVert = pVtkData->GetVerts();<br>> int numver = cellVert->GetNumberOfCells(); //returned the same number<br>> as the number of points<br>><br>> nCells = pVtkData->GetNumberOfPolys();
<br>> nCnt3 = pVtkData->GetNumberOfVerts(); //returned the same number as<br>> the number of points<br>><br>> But where are the triangles????<br>><br>> Now through pDelny->GetOutput I am expecting set of triangles in
<br>> vtkPolyData object.<br>> Am I right?<br>><br>> Thanks<br>><br>>------------------------------------------------------------------------<br>><br>>_______________________________________________
<br>>This is the private VTK discussion list.<br>>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>>Follow this link to subscribe/unsubscribe:
<br>><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br></blockquote></div><br>