Dear All, I am currently looking for the best way to extract a subpart of a vtkPolyData from known vertices ids on this vtkPolyData.
The input of the function should be a vtkPolyData and a list of vtkIdType and the output should be a vtkPolyData corresponding to the extraction on the input vtkPolyData of the vertices corresponding to the list of vtkIdType.
After searching in the documentation, the way I do it for now is to use a vtkExtractPolyDataGeometry with a custom vtkImplicitFunction to keep only vertices that are contained into the list of vtkIdType. Then I use this pipeline : vtkExtractPolyDataGeometry => vtkConnectivityFilter => vtkDataSetSurfaceFilter => vtkClipPolyData which seems to be quite complex, long, and requires to create a vtkKdTreePointLocator onto the input vtkPolyData to implement the custom vtkImplicitFunction.
Is there a simpler way to achieve this task?
Greatly appreciate any help.
Thank you