[vtkusers] Deleting "chunk of points" from Polydata
sur.chiranjib at gmail.com
Wed Jun 10 07:44:03 EDT 2015
I want to delete some points from a polydata. Going through the user group
and various other discussion forum, I realised that there is no direct
utility to delete points from polydata. Using the VTk example page (
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DeletePoint) I am able to
delete vtkpoints from the polydata. The code snippet is here
// polydata : defined earlier
// vtkSmartPointer<vtkPolyData> polydata =
vtkSmartPointer<vtkPoints> newPoints =
vtkSmartPointer<vtkPolyData> newPolydata =
newPolydata->SetPoints( newPoints );
for(vtkIdType i = 0; i < polydata->GetNumberOfPoints(); i++)
if(i != 10 && i!=20 ) // deleting point 10 and 20
My question is :
If I want to delete a chunk of data, how do I go ? Checking each points in
the "if" condition is not the wise way of doing things I believe.
Is there any alternate solution ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers