<div dir="ltr">Hi All,<div>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 (<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DeletePoint">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DeletePoint</a>) I am able to delete vtkpoints from the polydata. The code snippet is here</div><div><br></div><div><div>   </div><div><font color="#0000ff"> <font face="monospace, monospace"> // polydata : defined earlier </font></font></div><div><font face="monospace, monospace" color="#0000ff">  // vtkSmartPointer<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New()</font></div><div><font face="monospace, monospace" color="#0000ff"><br></font></div><div><font face="monospace, monospace" color="#0000ff">   vtkSmartPointer<vtkPoints> newPoints =  vtkSmartPointer<vtkPoints>::New();</font></div><div><font face="monospace, monospace" color="#0000ff">   vtkSmartPointer<vtkPolyData> newPolydata =     vtkSmartPointer<vtkPolyData>::New();</font></div><div><font face="monospace, monospace" color="#0000ff">   newPolydata->SetPoints( newPoints );</font></div><div><font face="monospace, monospace" color="#0000ff"><br></font></div><div><font face="monospace, monospace" color="#0000ff">  for(vtkIdType i = 0; i < polydata->GetNumberOfPoints(); i++)</font></div><div><font face="monospace, monospace" color="#0000ff">     {</font></div><div><font face="monospace, monospace" color="#0000ff">      if(i != 10 && i!=20 )     // deleting point 10 and 20</font></div><div><font face="monospace, monospace" color="#0000ff">       {</font></div><div><font face="monospace, monospace" color="#0000ff">        double p[3];</font></div><div><font face="monospace, monospace" color="#0000ff">        polydata->GetPoint(i,p);</font></div><div><font face="monospace, monospace" color="#0000ff">        newPoints->InsertNextPoint(p);</font></div><div><font face="monospace, monospace" color="#0000ff">       }</font></div><div><font face="monospace, monospace" color="#0000ff">     }</font></div><div><font face="monospace, monospace" color="#0000ff"> </font></div><div><font face="monospace, monospace" color="#0000ff">  polydata->ShallowCopy(newPolydata);</font></div></div><div><br></div><div><br></div><div>My question is :</div><div><br></div><div>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. </div><div><br></div><div>Is there any alternate solution ?</div><div><br></div><div>Thanks,</div><div>Chiranjib</div></div>