[vtkusers] How to delete set of points..?

David Doria daviddoria+vtk at gmail.com
Wed Aug 18 07:42:57 EDT 2010


On Tue, Aug 17, 2010 at 11:55 PM, Rakesh Patil <rakeshthp at in.com> wrote:
>
> Hello Sir,
>
> If I use that logic, then i feel it will take lot of time.
>
> Two loops will come into picture.. First loop contains IDs of points which
> are to be deleted
> and second loop is the one which is in the code..
>
> So for each time, it will iterate n times for a single point ( where n is
> the total number of points)
> thus If i want to delete m points then the code has to run m*n times ..
>
> If n is in thousands (say more than 10000 or 30000) then i feel this is not
> an efficient one.
>
> Can it be done using vtkCutter or vtkClipPolyData or something..??
>
> Thanks
>
> Regards
> Rakesh Patil

If you have the list of IDs you want to delete (from the rubber band),
you can load them into a vtkSelection and then use:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ExtractSelection

Thanks,

David



More information about the vtkusers mailing list