# "ClosestPoinTo" Node, What am I doing wrong?

**URL:** <https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542>\
**Category:** Geometry\
**Created:** [November 15, 2016, 11:23pm UTC](https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542 "2016-11-15T23:23:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ambrosio\_Gomez\_Moral](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Ambrosio\_Gomez\_Moral](https://forum.dynamobim.com/u/Ambrosio_Gomez_Moral)\
**Post date:** [November 15, 2016, 11:23pm UTC](https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542/1 "2016-11-15T23:23:52Z")

</div>

Hi everyone,

I am trying to make this node work with a really simple exercise and I cannot make this node work properly. I am pretty sure I must be doing somthing wrong, but I cannot figure it out.

In the first picture the node works perfectly, but if I move the objects the closest point that Dynamo points out is not the closest.

Did anyone have the same problem? Any ideas?

Thank you very much in advance.

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/9/59d54e32de5badcdfd93a8e31fc49b4e90a3d353.PNG) ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/5/c5e536d74b5acc5155d9f4bb94a5deddb06d516d.PNG) ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/0/d04927d0d4d6582087a08c78130f2a6bc22da82e.PNG)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [November 16, 2016, 2:59am UTC](https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542/2 "2016-11-16T02:59:52Z")

</div>

@Ambrosio_Gomez_Moral Check if the polycurve and the family instances are all in the same plane

---

<div class="post-metadata">

**Author:** ![Ambrosio\_Gomez\_Moral](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Ambrosio\_Gomez\_Moral](https://forum.dynamobim.com/u/Ambrosio_Gomez_Moral)\
**Post date:** [November 16, 2016, 7:20am UTC](https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542/3 "2016-11-16T07:20:12Z")

</div>

Hi there,

Thank you for your comment. Yes, all elements are in the same plane ☹

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [November 16, 2016, 1:36pm UTC](https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542/4 "2016-11-16T13:36:30Z")

</div>

@Ambrosio_Gomez_Moral Could you share a small file (with the issue)?

---

<div class="post-metadata">

**Author:** ![Ambrosio\_Gomez\_Moral](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Ambrosio\_Gomez\_Moral](https://forum.dynamobim.com/u/Ambrosio_Gomez_Moral)\
**Post date:** [November 16, 2016, 5:06pm UTC](https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542/5 "2016-11-16T17:06:40Z")

</div>

Hi Vikram,

I will definitely.

It is curious, if I lace “ElementGeometry” directly to “ClosestPointTo” it works, however the problem become when I convert the geometries (two lines) into a Polycurve as I want to convert the two lines in one (line or curve - one geometry)

I will upload the little model later on.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [November 17, 2016, 3:19am UTC](https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542/6 "2016-11-17T03:19:50Z")

</div>

@Ambrosio_Gomez_Moral Try creating a Nurbs Curve instead (using the vertices of the lines and degree )

---

<div class="post-metadata">

**Author:** ![Ambrosio\_Gomez\_Moral](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Ambrosio\_Gomez\_Moral](https://forum.dynamobim.com/u/Ambrosio_Gomez_Moral)\
**Post date:** [December 3, 2016, 11:22pm UTC](https://forum.dynamobim.com/t/closestpointo-node-what-am-i-doing-wrong/7542/7 "2016-12-03T23:22:32Z")

</div>

Thank you Vikram and sorry for the late answer.

By Nurbs Curbe it works perfectly.

Thank you very much.
