[vtkusers] Using vtkCleanPolyData

Emilio Ponce yosoycore at gmail.com
Wed Aug 23 07:42:04 EDT 2006


Hi people,

I have a vtkPolyData model called 'modelo_sfcie' and i'm trying to use
the class vtkCleanPolyData in order to delete some points and cells
marked previously as 'deleted'. I've done this marks with the methods
DeletePoint() and DeleteCell() of 'modelo_sfcie'.

Mi code for doing the deletion is:

vtkPolyDataReader * modelo=vtkPolyDataReader::New();
modelo->SetFileName("../vtkdata/fran_cut2.vtk");
modelo->Update();
vtkPolyData * modelo_sfcie=modelo->GetOutput();
...
/* Mark as deleted of some cells and points*/
...
// Cleaning of vtkPolyData modelo_sfcie
vtkCleanPolyData *Cleaner = vtkCleanPolyData::New();
Cleaner->SetInput(modelo_sfcie);
Cleaner->Update();

// new vtkPolyData  model based in the output of Clean
vtkPolyData *modelo_final=vtkPolyData::New();
modelo_final = Cleaner->GetOutput();
modelo_final->Update();
modelo_final->BuildCells();
modelo_final->BuildLinks();


But the number of triangles and cells of the two models is the same,
so I'm doing something wrong.

Please can anyone help me? I'm trying to find a solution for a week!!

thanks



More information about the vtkusers mailing list