Point set interpolation using python vtk package

Following the question raised in https://discourse.paraview.org/t/how-to-interpolate-a-2d-point-cloud-from-vtp-with-obstacles-like-cylinders/11942, I would like to ask if there is a way to interpolate the results on a plane while preserving the obstacle area. Directly use interpolate function in scipy will lead to problem.


Since I only have point data, directly using the boolean operation may have influence on the interpolated result. Should I go back then recreate the mesh (previously I have mesh for the point data), and assign those points to the corresponding mesh?

Any possible solution or discussion is welcomed. Thankss!

There is no trivial solution for this in ParaView, but could you share your data ?
You do not have the original mesh ? Only the Point Cloud ?

Sure, I’ve attached the data and visualization script here. Actually I do have the origin mesh but the point cloud is only data extracted from a sub-region of the origin mesh, since the original data is simulated is under a larger domain. I can also package and upload my code for processing the original .vtk file later if needed.

interp_pv.rar (2.7 MB)

Yes please, your data only contains numpy data which cannot be opened with ParaView out of the box.

Thanks! I’ve attached my data processing script here. https://drive.google.com/file/d/1npAnxXD_3CWx-x3CllO3RHG8KRHTBebF/view?usp=drive_link

You need to provide access

Sry for trouble, I’ve updated the link. :slight_smile:

Using your .vtk data it is then trivial:

Thank you so much for your respond.

Yes, since this is the original .vtk file used for preparing the data for comparison. Now the non-trivial thing is if I update or change the value of previous point data (now I only have updated .npy data and the previous mesh structure in .vtk file), how to do the interpolation?

You should be able to use ResampleWithDataSet

Thanks for your help. ‘Pointset → Delaunay3D → ResampleWithDataSet’ works for me.