[vtkusers] changed vtkpolydata from vtkactor

David Doria daviddoria at gmail.com
Tue Apr 9 12:43:56 EDT 2013


On Tue, Apr 9, 2013 at 5:57 AM, Marc Huber <marchuber.hft at gmx.de> wrote:

> Hi,
>
> can someone tell me how i extract changed polydata from an actor after
> doing a rotation?
>
> I'm doing this until now:
>     ...
>     stlActor->RotateX(rot);
>     ui.qvtkWidget->repaint();
>     vtkSmartPointer<vtkPolyData> editedSTL = vtkSmartPointer<vtkPolyData>::
> **New();
> editedSTL->ShallowCopy(**stlActor->GetMapper()->**GetInput());
>
> My Problem is, that editedSTL gets the point coordinates of my original
> Polydata not the coordinates after rotation.
> Can i somehow store the new point coordinates after rotating?
>
> Thanks for any advice
>
> Marc
>

By design the coordinates are not changed when the actor is moved (see
https://docs.google.com/present/edit?id=0AcyIfGqnlfSoZGdqaGhnMnJfMjY1aGJqZGZ4ZnQ&hl=en
)

I think you want to is pass actor->GetMatrix() to a
vtkTransformPolyDataFilter:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filters/TransformPolyData

Good luck,

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


More information about the vtkusers mailing list