[vtkusers] determine duplicate cells (lines) and clean them like vtkCleanPolydata
sur.chiranjib at gmail.com
Tue Aug 18 07:23:05 EDT 2015
I am constructing polydata for unstructured grid from randomly scattered
Once I know the point IDs I am creating the connectivity between two points
using a line (vtkline) and creating the cells around
Something like this example :
The connectivity works this way
//create a line between each pair of points
vtkSmartPointer<vtkLine> line0 = vtkSmartPointer<vtkLine>::New();
line0->GetPointIds()->SetId ( 0,0 );
line0->GetPointIds()->SetId ( 1,1 );
The way I am doing it is to find nearest neighbours for each point and
setting a line between those two points. In this, I am overdoing the
creation of lines because when I search nearest neighbour for point I (say
Id = 8) and find J (say Id = 10), I create a line between 8 and 10.
The next time, I found the point I (Id = 10) for which one of the nearest
neighbour is Id=8. At this stage I don't want to create a connectivity
between 10 and 8 again, since I have already created it for 8-10.
Any idea how to I do that.
vtkCleanPolydata filter takes care of the duplicate points but not for
duplicate lines (cells). Is there any classes/ filter available which I can
Thanks much in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers