# vtkCellLocator - line intersection(end point of the line)

**URL:** https://discourse.vtk.org/t/vtkcelllocator-line-intersection-end-point-of-the-line/6295
**Category:** Support
**Created:** [August 5, 2021, 2:16am UTC](https://discourse.vtk.org/t/vtkcelllocator-line-intersection-end-point-of-the-line/6295 "2021-08-05T02:16:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Hyunwoo\_Kim](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hyunwoo_kim/32/3465_2.png) [@Hyunwoo\_Kim](https://discourse.vtk.org/u/Hyunwoo_Kim)
#### Post date: [August 5, 2021, 2:16am UTC](https://discourse.vtk.org/t/vtkcelllocator-line-intersection-end-point-of-the-line/6295/1 "2021-08-05T02:16:11Z")

</div>

Hi,

I’m trying to find an intersected point on a poly date with a line.  
one of end points of the line is the triangle’s vertex.  
I want to do not consider the triangle’s vertex as an intersected point.

As below,

 ![image](https://discourse.vtk.org/uploads/default/original/2X/7/7217cae2a656f1a2b0c1182daf5fab34dab2c518.png)

So, I subtracted and added direction vector on end points.

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

![image](https://discourse.vtk.org/uploads/default/original/2X/5/5c7dc1131b91bd5dc6b70a8e31fed206a9821c9e.png)

Moreover, I checked the distance between intersected point and the end point of the line.  
 ![image](https://discourse.vtk.org/uploads/default/original/2X/2/2959d088a1b1f2256fe706e142efbda7fcdfd984.png)

However, in some cases, it occurs end point intersection.  
Is there any good solution for that?

Thank you.

---

<div class="post-metadata">

### Author: ![Hyunwoo\_Kim](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hyunwoo_kim/32/3465_2.png) [@Hyunwoo\_Kim](https://discourse.vtk.org/u/Hyunwoo_Kim)
#### Post date: [August 5, 2021, 10:44am UTC](https://discourse.vtk.org/t/vtkcelllocator-line-intersection-end-point-of-the-line/6295/2 "2021-08-05T10:44:13Z")

</div>

Find the closest cell and Find a closest point of the poly data is the solution
