Clip interpolated points with stl


I’m a new Paraview user and am completely stuck on how to perform the following: I have generated interpolated points for a volume of which I would like to create an isosurface for a specific value. The interpolated points are, however, generated for the full volume, while the original data points do not contain points within the stl’s visible in the attached image. If I do not remove these “extra” internal points from the interpolated point cloud, the generated contour or isosurface extends into the stls - which is incorrect. I thought “Find data” would help, but there was no option to use geometrical data to clip the interpolated point cloud. I then looked at programmable filters and it looks like “vtkImplicitPolyDataDistance” might be the method I’m looking for, but I couldn’t wrap my head around how to use it with the programmable filter. I already had a look at and Just to clarify: I’d like to only use the points OUTSIDE the stl geometry to generate an isosurface or contour for a selected value. Any help is greatly appreciated


I hope the following link is helpful to compute the signed distance field from STL to points in the Programmable filter.

Hey Kyoshimi, thank you for the help - I managed to get it working, although it isn’t perfect. I have to use a scalar clip to generate a contour after using the programmable filter. The below did it, if I first ctrl selected the data set and then the stl:

mesh = self.GetInputDataObject(0, 0)

import paraview.vtk as vtk

pdd = vtk.vtkImplicitPolyDataDistance()

dataset = self.GetInputDataObject(0, 1)

numPts = dataset.GetNumberOfPoints()
distArray = vtk.vtkDoubleArray()

for i in range(numPts):
pt = dataset.GetPoint(i)
distArray.SetValue(i, pdd.EvaluateFunction(pt))