[vtkusers] vtk3ddelaunay save in .ply, .stl, .obj or .wrl

Chiranjib Sur sur.chiranjib at gmail.com
Mon May 8 13:43:43 EDT 2017


vtkCleanPolydata filter might come handy for you.

Here is the class description.

http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html

Hope that helps!

On Sun, May 7, 2017 at 5:45 PM, mozendi <mozendi at gmail.com> wrote:

> Dear Chiranjib,
>
> Thank you for your help. After creating the 3D delaunay, this is the way
> how
> I save my 3D delaunay tirangulation in .ply format:
>
> //surface filter
>         vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceFilter =
> vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
>         surfaceFilter->SetInputConnection(delaunay3DAlpha->
> GetOutputPort());
>         surfaceFilter->Update();
>         std::cout << "surface filter OK" << std::endl;
>         std::cout << "------------------------------" << std::endl;
>         std::cout << "Start writing the triangulation" << std::endl;
>
>         std::string filename = "kucuk2.ply";
>         vtkSmartPointer<vtkPLYWriter> plyWriter =
> vtkSmartPointer<vtkPLYWriter>::New();
>         plyWriter->SetInputConnection(surfaceFilter->GetOutputPort());
>         plyWriter->SetFileName(filename.c_str());
>         plyWriter->Write();
>
> It works fine but the resulting triangulation consists of many overlapping
> triangles as in the following figure:
>
> <http://vtk.1045678.n5.nabble.com/file/n5743107/vtk_triangulation.png>
>
> However, the resulting triangulation should be similar to the image below
> which is generated using Geomagic software:
>
> <http://vtk.1045678.n5.nabble.com/file/n5743107/geom_triangles.png>
>
> Do you have any idea about this issue?
>
> Thanks
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.
> com/vtk3ddelaunay-save-in-ply-stl-obj-or-wrl-tp5743046p5743107.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170508/e9c7d4c9/attachment.html>


More information about the vtkusers mailing list