[vtkusers] Pick & delete cell

David Doria daviddoria at gmail.com
Thu Feb 21 15:45:34 EST 2013


On Thu, Feb 21, 2013 at 2:33 PM, Massinissa Bandou <
Massinissa.Bandou at usherbrooke.ca> wrote:

> Hi David, thank you so much for your explanation.
>
> I'm wondering if I remove some particular cells then I have to re-index the
> whole data.
> Do I need to pass the UnstructuredGrid to vtkDataSetSurfaceFilter to get
> the
> polydata? because I think it's the only way to delete the selected cells.
>
> Thnx
>
> Massi
>

You can use the vtkIdFilter (
http://www.vtk.org/doc/nightly/html/classvtkIdFilter.html) to
maintain/reference the ids of the original cells.

I don't understand what you mean about needing to create a vtkPolyData from
the vtkUnstructuredGrid? Do you mean you're starting with a vtkPolyData and
you want to end up with a vtkPolyData? It looks like vtkExtractSelection is
a subclass of vtkDataObjectAlgorithm, which I think means that you can
ShallowCopy its output directly into a vtkPolyData instead of a
vtkUnstructuredGrid like is done in the example? Give it a try and let us
know if it works. In fact, I'd be inclined to change the example to use
only vtkPolyData if it works as expected (I'm not sure if
vtkExtractSelection has been changed since we initially wrote the example?).

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130221/d6bb4b52/attachment.htm>


More information about the vtkusers mailing list