# Surface to surface distance

**URL:** https://discourse.paraview.org/t/surface-to-surface-distance/8422
**Category:** ParaView Support
**Created:** [November 16, 2021, 5:18pm UTC](https://discourse.paraview.org/t/surface-to-surface-distance/8422 "2021-11-16T17:18:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Chambers](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@Chambers](https://discourse.paraview.org/u/Chambers)
#### Post date: [November 16, 2021, 5:18pm UTC](https://discourse.paraview.org/t/surface-to-surface-distance/8422/1 "2021-11-16T17:18:02Z")

</div>

Hello,

I am searching for guidance on using ParaView as done in a research paper. I attached the figures from the paper. I want to use point cloud analysis to calculate linear deviation from a scanned cut surface to a plane. Does anyone have ideas of how to do this?

Thank you!

 ![Screen Shot 2021-11-16 at 12.16.05 PM](https://discourse.paraview.org/uploads/default/original/2X/2/220d9ab5459b2a344c29d6ba77d1bde98e39d017.jpeg)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 17, 2021, 9:27am UTC](https://discourse.paraview.org/t/surface-to-surface-distance/8422/2 "2021-11-17T09:27:51Z")

</div>

DistanceToPolyData should do the trick. To go further, please share your data

---

<div class="post-metadata">

### Author: ![Chambers](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@Chambers](https://discourse.paraview.org/u/Chambers)
#### Post date: [November 17, 2021, 9:33pm UTC](https://discourse.paraview.org/t/surface-to-surface-distance/8422/3 "2021-11-17T21:33:01Z")

</div>

Hi Mathieu,

Attached is the STL for a piece of zygomatic arch, which has an irregular cut surface, and a part that is made from the planned plane. Is this what you are looking for to help us use the distance to poly data tool?

Aidan

[Cut 1-right.stl](https://discourse.paraview.org/uploads/short-url/zWJuQngxQBerLFMJcQGBTPziCal.stl) (184 Bytes)

[Post Op.stl](https://discourse.paraview.org/uploads/short-url/zotkjg57qs0thLfDrQcNgXuLfvQ.stl) (3.41 MB)

---

<div class="post-metadata">

### Author: ![jcfr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jcfr/32/5_2.png) [@jcfr](https://discourse.paraview.org/u/jcfr)
#### Post date: [November 18, 2021, 2:07am UTC](https://discourse.paraview.org/t/surface-to-surface-distance/8422/4 "2021-11-18T02:07:10Z")

</div>

For future reference, the question was also asked on the Slicer forum and using the `ModelToModelDistance` 3D Slicer extension allowed to address the problem.

> **[Surface to surface distance](https://discourse.slicer.org/t/surface-to-surface-distance/20672/3?u=jcfr)**
>
> You can use ModelToModelDistance extension to compute the distances of bone surface points from the cutting plane: After this you can copy-paste this code snippet into the Python console to get the distance distribution as a histogram: modelNode...

 ![image](https://discourse.paraview.org/uploads/default/original/2X/a/a31017164091533c84ced195b9013539b452767e.png)

---

<div class="post-metadata">

### Author: ![Chambers](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@Chambers](https://discourse.paraview.org/u/Chambers)
#### Post date: [November 18, 2021, 5:29pm UTC](https://discourse.paraview.org/t/surface-to-surface-distance/8422/5 "2021-11-18T17:29:16Z")

</div>

Thank you so much for your help! This seems like it will be perfect for our needs.
