Computation of tangent vectors on polyData

Hello,

I am trying to compute the tangent vectors at each vertex of an STL file. Using proper macros as declared in vtkPolyDataTangents “https://vtk.org/doc/nightly/html/vtkPolyDataTangents_8h_source.html”. The output data is “none”. I am using VTK ver 9.0 and python. Is there a way to retrieve the tangent vectors at each vertex?

Regards

vtkPolyDataTangents requires a triangulated polydata with normals and texture coordinates.
Can you check that your STL model meets those requirements?

You can use vtkTriangleFilter to triangulate, vtkPolyDataNormals to add normals, and vtkTextureMapToPlane or similar to add tcoords.