# How to determine if the point is on the line?

**URL:** <https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [November 1, 2018, 7:14pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942 "2018-11-01T19:14:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssean7240](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@ssean7240](https://forum.dynamobim.com/u/ssean7240)\
**Post date:** [November 1, 2018, 7:14pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/1 "2018-11-01T19:14:33Z")

</div>

I’ve just started using dynamo and i was trying to determine if the point is on the line.  
I would like to ask if there are any similar nodes in Dynamo that have this function?

---

<div class="post-metadata">

**Author:** ![lucamanzoni](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lucamanzoni/32/56718_2.png) [@lucamanzoni](https://forum.dynamobim.com/u/lucamanzoni)\
**Post date:** [November 1, 2018, 8:35pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/2 "2018-11-01T20:35:08Z")

</div>

Hi,  
you can use Geometry.DoesIntersect node

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [November 2, 2018, 3:08am UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/3 "2018-11-02T03:08:58Z")

</div>

Or Geometry.DistanceTo, and an == node.

Geometry.DoesIntersect is likely easier.

---

<div class="post-metadata">

**Author:** ![LoRue](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@LoRue](https://forum.dynamobim.com/u/LoRue)\
**Post date:** [July 9, 2020, 7:45pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/4 "2020-07-09T19:45:18Z")

</div>

Hi Fellas,  
I am not getting the desired result with the Geometry.DoesIntersect node.  
As you can see, the point is clearly on the Y axis, yet the node says false. Do I need to convert something? I am at a loss.

Any help is appreciated.

 ![Geometry_Point_Intersect_Test_2020-07-09_12-37-58](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/6/06e1702d0a8ef00de7183cbb40314bfee13bce06.png)

 ![Geometry_Point_Intersect_Test_2020-07-09_12-37-58](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/0/f0ef1ecff103d8c272a181f2cb02996290dfedc0.png)

---

<div class="post-metadata">

**Author:** ![Robert\_Younger](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_younger/32/205603_2.png) [@Robert\_Younger](https://forum.dynamobim.com/u/Robert_Younger)\
**Post date:** [July 9, 2020, 8:03pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/5 "2020-07-09T20:03:24Z")

</div>

Looks like you are using a GetLocation node for the Wall. This outputs a point, which is usually the centroid or the origin point in the element.

Instead, you may want to use Element.Geometry or Element.Solids, which will provide 3D forms.

Edit: Nevermind, I see the line output. Perhaps there’s a tolerance issue, where the line is not exactly on Y=12.566? You could try turning the point into a tiny sphere to test that.

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [July 9, 2020, 8:14pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/6 "2020-07-09T20:14:14Z")

</div>

Hello @LoRue - What is your desired workflow here? Pairing points with lines they intersect with? 🙂 There are a few different approaches, and indeed this could be due to a rounding error where your point is not truly sitting on that line.

If you try getting the `Point.X` / `Point.Y` / `Point.Z` values from each of your **Points.StringToPoint** and **Element.GetLocation** nodes … do they sit in the same plane?

---

<div class="post-metadata">

**Author:** ![LoRue](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@LoRue](https://forum.dynamobim.com/u/LoRue)\
**Post date:** [July 9, 2020, 8:45pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/7 "2020-07-09T20:45:27Z")

</div>

Hi @solamour, @Robert_Younger  
You are correct!  
My goal is to line up a list of Door insertion points derived from a CAD file with location curves from walls that were also created from CAD geometry. It is part of a larger project to translate CAD floor plans into a LOD200 model.

I see that I will need to round the curve to 3 digits like the points.  
Thanks a bunch. I was going a little batty! Is there a way to deal with this rounding error globally?

 ![Geometry_Point_Intersect_Test_Aha](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/7/57602317d957d2db1c4afb089a77173fba41f626.png)

---

<div class="post-metadata">

**Author:** ![Robert\_Younger](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_younger/32/205603_2.png) [@Robert\_Younger](https://forum.dynamobim.com/u/Robert_Younger)\
**Post date:** [July 9, 2020, 9:07pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/8 "2020-07-09T21:07:07Z")

</div>

I’m actually working on a task with similar properties (lifting CAD duct/pipe linework and referencing nearby textdata), maybe some of the common points will help.

Rather than compare points and lines, consider turning them into spheres and cylinders with a set diameter that covers the expected tolerance errors (maybe someone decided to forego object snapping when placing their doors). That can at least provide a structured list that relates doors to walls.

Where your workflow differs is that you’ll probably need to correct the insertion point to be a point along the curve. There should be some threads that discuss shortest-length methods to push the point onto the curve.

---

<div class="post-metadata">

**Author:** ![LoRue](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@LoRue](https://forum.dynamobim.com/u/LoRue)\
**Post date:** [July 9, 2020, 9:12pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/9 "2020-07-09T21:12:30Z")

</div>

Ok I’ll try the sphere method. It seems easier than exploding the curves, rounding each number and reconstituting it. I wish there was a way to set the units to be all the same tolerance.

---

<div class="post-metadata">

**Author:** ![LoRue](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@LoRue](https://forum.dynamobim.com/u/LoRue)\
**Post date:** [July 9, 2020, 9:28pm UTC](https://forum.dynamobim.com/t/how-to-determine-if-the-point-is-on-the-line/27942/10 "2020-07-09T21:28:41Z")

</div>

In the interest of closure, here is my reconstituted line rounding graph. Not sure why the Curves.EndPoints node is orange, but it doesn’t seem to affect anything. “Dictionary.ValueAtKey failed”.

 ![Geometry_Point_Intersect_Test_Solution](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/0/e00a48bfa726892608c4248e407a7e0e1082a11d.png)
