# Is it possibel to compute normal distance from STL surface to point cloud away from STL

**URL:** https://discourse.vtk.org/t/is-it-possibel-to-compute-normal-distance-from-stl-surface-to-point-cloud-away-from-stl/7071
**Category:** Support
**Created:** [November 4, 2021, 11:03am UTC](https://discourse.vtk.org/t/is-it-possibel-to-compute-normal-distance-from-stl-surface-to-point-cloud-away-from-stl/7071 "2021-11-04T11:03:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Maruthi\_NH](https://discourse.vtk.org/user_avatar/discourse.vtk.org/maruthi_nh/32/3143_2.png) [@Maruthi\_NH](https://discourse.vtk.org/u/Maruthi_NH)
#### Post date: [November 4, 2021, 11:03am UTC](https://discourse.vtk.org/t/is-it-possibel-to-compute-normal-distance-from-stl-surface-to-point-cloud-away-from-stl/7071/1 "2021-11-04T11:03:37Z")

</div>

As shown in the figure, I want to compute the normal distance from the STL surface to a given set of points.

 ![stl_to_pts_norm_dist](https://discourse.vtk.org/uploads/default/original/2X/3/3491e483342091f35e0817f3aa4eac59f2ecea1b.png)

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [November 4, 2021, 11:09am UTC](https://discourse.vtk.org/t/is-it-possibel-to-compute-normal-distance-from-stl-surface-to-point-cloud-away-from-stl/7071/2 "2021-11-04T11:09:43Z")

</div>

yes it’s possible. Use a vtkCellLocator (or vtkStaticCellLocator which is faster) and use one of the FindClosestPoint methods.

---

<div class="post-metadata">

### Author: ![Maruthi\_NH](https://discourse.vtk.org/user_avatar/discourse.vtk.org/maruthi_nh/32/3143_2.png) [@Maruthi\_NH](https://discourse.vtk.org/u/Maruthi_NH)
#### Post date: [November 4, 2021, 11:12am UTC](https://discourse.vtk.org/t/is-it-possibel-to-compute-normal-distance-from-stl-surface-to-point-cloud-away-from-stl/7071/3 "2021-11-04T11:12:51Z")

</div>

Thanks for the quick reply! I will check it out.
