Computation of tangent vectors on polyData


I am trying to compute the tangent vectors at each vertex of an STL file. Using proper macros as declared in vtkPolyDataTangents “”. 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?


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.