# Find Displacement Between Two Vtp Models

**URL:** https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987
**Category:** ParaView Support
**Created:** [June 4, 2019, 8:45pm UTC](https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987 "2019-06-04T20:45:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![meow](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/c57346/32.png) [@meow](https://discourse.paraview.org/u/meow)
#### Post date: [June 4, 2019, 8:45pm UTC](https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987/1 "2019-06-04T20:45:03Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 5, 2019, 1:41am UTC](https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987/2 "2019-06-05T01:41:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![meow](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/c57346/32.png) [@meow](https://discourse.paraview.org/u/meow)
#### Post date: [June 5, 2019, 1:47am UTC](https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987/3 "2019-06-05T01:47:24Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![meow](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/c57346/32.png) [@meow](https://discourse.paraview.org/u/meow)
#### Post date: [June 5, 2019, 2:11am UTC](https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987/4 "2019-06-05T02:11:30Z")

</div>

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

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [June 5, 2019, 2:13am UTC](https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987/5 "2019-06-05T02:13:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![meow](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/c57346/32.png) [@meow](https://discourse.paraview.org/u/meow)
#### Post date: [June 5, 2019, 2:19am UTC](https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987/6 "2019-06-05T02:19:52Z")

</div>

That worked! Thank you so much.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 5, 2019, 1:00pm UTC](https://discourse.paraview.org/t/find-displacement-between-two-vtp-models/1987/7 "2019-06-05T13:00:34Z")

</div>

> [@meow](#):
>
> Between the two models, is there a way to define which one is selected as inputs[0] vs. inputs[1]?

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_.
