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

mozendi mozendi at gmail.com
Sun May 7 08:15:49 EDT 2017


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.


More information about the vtkusers mailing list