[vtkusers] Re : Re : Click and drag a vertex of a vtkUnstructuredGrid
R M
mlokida at yahoo.fr
Fri Aug 12 10:59:49 EDT 2011
Hi,
The first example
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertexUnstructuredGridseems
to have no difference with the
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex example.
So for the moment I use a vtkCompositeDataGeometryFilter and then use
vtkCleanPolyData on the output of the vtkCompositeDataGeometryFilter. And it
seems to work.
But because I have only one vtkPolyData now, I am quite block because I would
like to hide some blocks. But, I have only one actor because only one
vtkPolyData.
I think I will try to loop through all blocks and convert each block in a
vtkPolyData et change the points in order to point to the global array points
(In order to move vertices that are shared by several blocks). And, I could use
an Actor for each polydata and make them visible or not. I don't know yet if it
will work. It is just a test.
Thank you.
________________________________
De : David Doria <daviddoria at gmail.com>
À : R M <mlokida at yahoo.fr>
Cc : vtkusers at vtk.org
Envoyé le : Ven 12 août 2011, 16h 30min 50s
Objet : Re: [vtkusers] Re : Click and drag a vertex of a vtkUnstructuredGrid
On Thu, Aug 11, 2011 at 8:54 AM, R M <mlokida at yahoo.fr> wrote:
> Apparently not. The interaction to select points works with a
> vtkInteractorStyleTrackballActor class and it seems to only works with
> vtkPolyData.
>
> May be I should convert my unstructured grid into a polydata ?
You could use a polydata for the interaction but still update the
unstructuredGrid points:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertexUnstructuredGrid
Or you could do the unstructuredGrid->PolyData conversion that you mentioned:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110812/129db97b/attachment.htm>
More information about the vtkusers
mailing list