<div dir="ltr"><div><div><div>Hello all,<br><br></div>I attached a .vtp file of a line that has vector point data. When I apply a transform filter (code is provided below), the points are transformed properly, but the vectors are not:<br><br></div><div>Original Transformed<br><img alt="Inline image 2" src="cid:ii_156244d076e56769" height="561" width="472"> <img alt="Inline image 3" src="cid:ii_156244d5cdcc3615" height="561" width="484"><br><br>It turns out the vectors weren't transformed at all for some reason:<br><br></div><div>Before After<br></div><div><img alt="Inline image 4" src="cid:ii_156244db070cf447" height="354" width="496"><br><br>However, the vectors do transform properly when I'm transforming a 3D unstructured grid with tetrahedral and hexahedral cells. I thought the bug might be related to the topology, but when I put the polyline through a vtkDelauany3D filter, the transform still didn't work correctly. What's going on here?<br><br>I should mention I tested this in both VTK (v7.0) and Paraview (v5.0).<br><br></div>Thanks,<br>Evan Kao<br><br><br><br><br></div>Code:<br><br><span style="font-family:monospace,monospace"><span style="font-weight:600;color:rgb(0,128,0)">import</span> <span style="font-weight:600;color:rgb(0,0,255)">vtk</span>
</span><pre style="margin:0px;text-indent:0px;font-weight:600;color:rgb(0,0,255)"><span style="font-family:monospace,monospace"><br></span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace">tf <span style="color:rgb(102,102,102)">=</span> (<span style="color:rgb(102,102,102)">-0.0040248411422550</span>, <span style="color:rgb(102,102,102)">0.9994518507299456</span>, <span style="color:rgb(102,102,102)">0.0328602910252758</span>, <span style="color:rgb(102,102,102)">-0.0002179778201077</span>, </span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace"><span style="color:rgb(102,102,102)">-0.9998799178301331</span>, <span style="color:rgb(102,102,102)">-0.0045139785455129</span>, <span style="color:rgb(102,102,102)">0.0148247737823206</span>, <span style="color:rgb(102,102,102)">0.2103193900724151</span>, </span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace"><span style="color:rgb(102,102,102)">0.0149649782420806</span>, <span style="color:rgb(102,102,102)">-0.0327966777307833</span>, <span style="color:rgb(102,102,102)">0.9993500024295978</span>, <span style="color:rgb(102,102,102)">-0.0002392083616021</span>, </span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace"><span style="color:rgb(102,102,102)">0.0000000000000000</span>, <span style="color:rgb(102,102,102)">0.0000000000000000</span>, <span style="color:rgb(102,102,102)">0.0000000000000000</span>, <span style="color:rgb(102,102,102)">1.0000000000000000</span>)</span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace"><br></span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace">transform <span style="color:rgb(102,102,102)">=</span> vtk<span style="color:rgb(102,102,102)">.</span>vtkTransform()</span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace">transform<span style="color:rgb(102,102,102)">.</span>SetMatrix(tf)</span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace"><br></span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace">transformFilter <span style="color:rgb(102,102,102)">=</span> vtk<span style="color:rgb(102,102,102)">.</span>vtkTransformFilter()</span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace">transformFilter<span style="color:rgb(102,102,102)">.</span>SetInputData(input)</span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace">transformFilter<span style="color:rgb(102,102,102)">.</span>SetTransform(transform)</span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace">transformFilter<span style="color:rgb(102,102,102)">.</span>Update()</span></pre><span style="font-family:monospace,monospace">
</span><pre style="margin:0px;text-indent:0px"><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace">output = transformFilter<span style="color:rgb(102,102,102)">.</span>GetOutput()</span><span style="font-family:monospace,monospace"></span><br></pre></div>