# Projecting Points on a Sphere Problem

**URL:** <https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319>\
**Category:** Geometry\
**Created:** [June 3, 2016, 6:33pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319 "2016-06-03T18:33:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [June 3, 2016, 6:33pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/1 "2016-06-03T18:33:08Z")

</div>

I am trying to project points onto a sphere from a triangulated surface but continue to have problems at the steps seen in the image. The error reads in part: “Point.Project operation failed. Unable to create Line. Points are likely coincident”. Any hints would be appreciated.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/9/9ded3ba4d0bc95919965996b78c6d4202d7495bb.png)

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [June 3, 2016, 8:20pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/2 "2016-06-03T20:20:25Z")

</div>

Its almost impossible to tell what you’re doing with that one piece of information, but I reckon your problem is caused by the vector, projection point and surface all being coincident, hence the projection fails due to the tolerance (or more specifically, there are zero-dimension projections). This exception occurred more in older versions of Dynamo before v1.0.0, so either upgrade or find a means of offsetting your projection points to guarantee a successful projection without coincidence.

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [June 3, 2016, 9:56pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/3 "2016-06-03T21:56:06Z")

</div>

Im using Dynamo 1.0 but I will try to isolate the vectors length and see if that’s it. I’m pretty sure I’m not project points already on the sphere but will try to run that angle down over the weekend.

---

<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:** [June 7, 2016, 9:03am UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/4 "2016-06-07T09:03:22Z")

</div>

Seems like the troublesome points are beyond the extents of the sphere.  
Is the radius of the sphere less than 5?

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [June 7, 2016, 2:04pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/5 "2016-06-07T14:04:46Z")

</div>

Doh. The sphere most definately is exactly radius 5. Can’t wait to track this angle down later today and see if that helps. Thanks VS!

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [June 7, 2016, 7:06pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/6 "2016-06-07T19:06:32Z")

</div>

That was it. After I carefully recheck the the use of the sphere in the code I was able to group the elements as needed.

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [June 30, 2016, 7:19pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/7 "2016-06-30T19:19:15Z")

</div>

Unforunately I’m running into the same error again with the nearly the same input configuation - I thought I was making it better. I’ve tried at length to change the radius of the sphere to remove any coincident points but I’m not able to get any points from the polygons onto the sphere.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/553b547a4b22a85e84c1bfdcd69dc6f25a4ed792.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [June 30, 2016, 7:26pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/8 "2016-06-30T19:26:25Z")

</div>

Is it the same error “Point.ProjectOperation failed”?

---

<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:** [June 30, 2016, 7:33pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/9 "2016-06-30T19:33:14Z")

</div>

@PerfectArchCo Seems like you are feeding in _Polygons_ to an input port that requires _Surfaces_

EDIT: That isn’t a problem. Could you share your file?

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [June 30, 2016, 7:43pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/10 "2016-06-30T19:43:54Z")

</div>

Oops. Meant to have the error text highlighted: “Point.Project operation failed.  
Unable to create Line. Points are likely coincident”

@Vikram_Subbaiah The Surface.byPatch is taking the polygons and outputting surfaces when checked to get around that. As to if that is the correct way or if it is going it correctly I’m not sure. I don’t quite have time to upload the file today but the intial polygons are small. Maybe the distance is too great. This it the step I am setting the daimeter of my larger sphere.

---

<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:** [June 30, 2016, 7:48pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/11 "2016-06-30T19:48:17Z")

</div>

Try changing the last line to…

```
curv2.Project(sph,vec1);
```

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [June 30, 2016, 10:37pm UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/12 "2016-06-30T22:37:32Z")

</div>

Alas. I tried the suggestion to no effect. I’ll have to set this aside and hopefully some problem solving approaches will strike over the weekend. I’ll probably try to simplify the code to see if that uncovers anything useful before posting again.

---

<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:** [July 1, 2016, 6:17am UTC](https://forum.dynamobim.com/t/projecting-points-on-a-sphere-problem/4319/13 "2016-07-01T06:17:26Z")

</div>

There seems to be a problem with _Point.Project_  
Use _Surface.ProjectInputOnto_ instead.

Replace the last line with this…

`sph.ProjectInputOnto(curv2,vec1);`

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/527af7041f57b01b2a0c1f625af71b261ba6e9ec.PNG)
