Find Displacement Between Two Vtp Models

I have two .vtp models that I have imported into paraview. The models have the same number of points.

I need to find the displacement between the points in Model 1 and Model 2 and export it as a .CSV file.

I can export each model as a .CSV file and then subtract them using Excel, but I would like to do this in Paraview to save time - is this possible?

Thanks in advance.

Sure, it’s possible. Select both VTP models in the Pipeline Browser and add a Python Calculator filter. Set the expression to inputs[0].Points - inputs[1].Points. Click the Python Calculator filter, then select the File -> Save Data… menu item and export the result to a CSV file.

1 Like

Thank you so much for the help and the fast reply. I am new to Paraview, but this method will greatly speed up my workflow!

Thanks again!

Between the two models, is there a way to define which one is selected as inputs[0] vs. inputs[1]?

I believe that the top filter or VTP model you select is [0], and the bottom one you select is [1].

1 Like

That worked! Thank you so much.

As of ParaView 5.5 (maybe 5.6?), the order in which you select the pipeline object is the order in which they are arranged in the array. It’s not ordered by the arrangement in the Pipeline Browser.