Transform/Rotate polyData for OBBTree Intersection (vtk.js)

This is probably a simple issue but I can’t seem to figure it out currently. I have some geometry that I want to do some intersection displaying on. I can properly get it to load the data for a vtkXMLPoloyDataReader and pass in the values as a well as calculate and visualize the intersections.

I can rotate the actors properly but I’m not sure how to rotate the polyData as the input into the triangleFilter for the intersection calculations. I know there is a “vtkTransformPolyDataFilter” in VTK base but is there a corresponding way I can do the same/similar thing in vtk.js?

1 Like

You can create your own filter that does the following operation to transform points location… Just make sure you clone the points so you do not modify your input.

you do not have to transform the polydata to do the OBB intersection, the intersection function parameter signature lets you pass in transform matrices

Thank you both, I see it now here: vtk-js/index.js at 5f4a729aff007341459ed5a8bd943e53d07e0765 · Kitware/vtk-js · GitHub