<div dir="ltr">vtkCleanPolydata filter might come handy for you.<div><br></div><div>Here is the class description.<br><div><br></div><div><a href="http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html">http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html</a><br></div></div><div><br></div><div>Hope that helps!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 7, 2017 at 5:45 PM, mozendi <span dir="ltr"><<a href="mailto:mozendi@gmail.com" target="_blank">mozendi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Chiranjib,<br>
<br>
Thank you for your help. After creating the 3D delaunay, this is the way how<br>
I save my 3D delaunay tirangulation in .ply format:<br>
<br>
//surface filter<br>
        vtkSmartPointer<<wbr>vtkDataSetSurfaceFilter> surfaceFilter =<br>
vtkSmartPointer<<wbr>vtkDataSetSurfaceFilter>::New(<wbr>);<br>
        surfaceFilter-><wbr>SetInputConnection(<wbr>delaunay3DAlpha-><wbr>GetOutputPort());<br>
        surfaceFilter->Update();<br>
        std::cout << "surface filter OK" << std::endl;<br>
        std::cout << "-----------------------------<wbr>-" << std::endl;<br>
<span class="">        std::cout << "Start writing the triangulation" << std::endl;<br>
<br>
</span>        std::string filename = "kucuk2.ply";<br>
        vtkSmartPointer<vtkPLYWriter> plyWriter =<br>
vtkSmartPointer<vtkPLYWriter>:<wbr>:New();<br>
        plyWriter->SetInputConnection(<wbr>surfaceFilter->GetOutputPort()<wbr>);<br>
        plyWriter->SetFileName(<wbr>filename.c_str());<br>
        plyWriter->Write();<br>
<br>
It works fine but the resulting triangulation consists of many overlapping<br>
triangles as in the following figure:<br>
<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/n5743107/vtk_triangulation.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/file/n5743107/vtk_<wbr>triangulation.png</a>><br>
<br>
However, the resulting triangulation should be similar to the image below<br>
which is generated using Geomagic software:<br>
<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/n5743107/geom_triangles.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/file/n5743107/geom_<wbr>triangles.png</a>><br>
<br>
Do you have any idea about this issue?<br>
<br>
Thanks<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtk3ddelaunay-save-in-ply-stl-obj-or-wrl-tp5743046p5743107.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/vtk3ddelaunay-save-in-ply-<wbr>stl-obj-or-wrl-<wbr>tp5743046p5743107.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>