<div dir="ltr">Thanks David,<div><br></div><div>I've got a class setup for reading/writing STL files along with basic manipulation.  My rotation code is below and called successive times.  I guess the question is does VTK "remember" past transformations on a vtkPolyData object()?  If so, what's the best way of accessing them?<br><div><br></div><div><div>def Rotate(self, alpha, beta, gamma):</div><div>        t = vtk.vtkTransform()</div><div>        t.RotateX(alpha)</div><div>        t.RotateY(beta)</div><div>        t.RotateZ(gamma)</div><div>        tf = vtk.vtkTransformPolyDataFilter()</div><div>        tf.SetInputData(self.MeshData)</div><div>        tf.SetTransform(t)</div><div>        tf.Update()</div><div>        self.MeshData.ShallowCopy(tf.GetOutput())</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 18, 2017 at 8:33 AM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Howdy Eric,</div><div><br></div><div>How are you doing the transform?<br></div>* vtkTransformFIlter?<br></div>* vtkActor::Transform?<br></div>* manually changing the points in the vtkPolyData object?<br><br></div>For either of the first two you can get the current matrix (and its inverse) from the transform object.<br><br></div>hope that helps<br><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-3879586620590395064gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>David E DeMarle<br>Kitware, Inc.<br>Principal Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:(518)%20881-4909" value="+15188814909" target="_blank">518-881-4909</a></div></div></div></div></div></div>
<br><div class="gmail_quote"><span class="">On Fri, Aug 18, 2017 at 8:11 AM, Eric Petersen <span dir="ltr"><<a href="mailto:peer9802@gmail.com" target="_blank">peer9802@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div dir="ltr">Hello,<div><br></div><div>I currently have a Python script where I am successively translating, and rotating, a vtkPolyData object.  The script currently does not track individual transforms but I would like to know the current 4x4 transform matrix.  Is there any way to directly obtain this information from the vtkPolyData object or am I stuck rewriting the script to track individual transformations?</div></div>
<br></span>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>