I’m using VTK 9.01 and Python 3.8.3 and I’m trying to probe point scalar values from a Polydata to a set of target Points.
The target Points lie close to, but not necessarily ON the cells in the polydata and this is causing the output of the vtkProbeFIlter to be patchy - many input points are missed (do not map to a cell) as.I can see by looking at the output vtkValidPointMask.
I have tried,
- disabling ComputeTolernace and using a very liberal tolerance
- using a CellLocator instead of a PointLocator
- tried various FindCellStrategies
but I’m still not getting good results.
So my next strategy is to project the target points onto the Polydata, and probe the projected points. Projecting a set of points onto a PolyDtata seems like something that should have a filter in VTK, but I can’t find one.
So I’ll either have to iterate over every target point using vtkCellLocator.FindClosestPoint() or calculate a normal for every taget point and then use vtkCellLocator.IntersectWithLine()
So I have two questions,
- Is there an exitsing filter that can project points to PolyData? (and if so, what’s it called?)
- If there is no exitsing filter, are there any other approaches other than the two I outlined above that might work?
Thanks in advance,