# How to divide a polyline into exact point locations

**URL:** <https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538>\
**Category:** Revit\
**Tags:** revit, excel, python, geometry, dynamo\
**Created:** [May 12, 2023, 2:36pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538 "2023-05-12T14:36:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlamarqueWP565](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jlamarqueWP565](https://forum.dynamobim.com/u/jlamarqueWP565)\
**Post date:** [May 12, 2023, 2:36pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/1 "2023-05-12T14:36:30Z")

</div>

Hi! I’m having trouble trying to divide a polycurve into segments (equal or not).

For example, I want yo divide a polycurve into segments of 5 meters. I used three different nodes but all of them retourns values that are not exact. Here are some screenshots.  
I used this nodes: (sorry, I can upload only one screenshot)

Node: Curve.PointAtChordLenght  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/b/0bb6cbbfef33ef6fce4291fa2b0c07bc7066141d.png)

Node: Curve.PointAtSegmentLenght  
Node: Curve.PointAtEqualSegmentLenght  
This two nodes retourns similar values than the first one.

I want to know why it doesn’t retourn exact values, perhaps is reading wrong the input information or maybe I need to use another node.

Hope someone can help me! Thanks!

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [May 12, 2023, 2:52pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/2 "2023-05-12T14:52:59Z")

</div>

We can’t say without seeing the rest of your graph - at least the parts defining the polycurve.

---

<div class="post-metadata">

**Author:** ![jlamarqueWP565](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jlamarqueWP565](https://forum.dynamobim.com/u/jlamarqueWP565)\
**Post date:** [May 12, 2023, 3:00pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/3 "2023-05-12T15:00:50Z")

</div>

Hi Nick, thanks for the reply.

The polycurve is through multiple points that are not at the same z axis. Here are some of the point that define one of the polycurves.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/9/39755461d6f99303eb3910501ae73275488b5756.png)

Is this screenshot helpful? thantks.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [May 12, 2023, 3:02pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/4 "2023-05-12T15:02:52Z")

</div>

That’s a start. Can we see what the polycurves look like? Are they regular shapes or organic?

Also, please show what happens when you use the other nodes. Chord length is not the same as curve length so that one won’t get you what you need.

---

<div class="post-metadata">

**Author:** ![jlamarqueWP565](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jlamarqueWP565](https://forum.dynamobim.com/u/jlamarqueWP565)\
**Post date:** [May 12, 2023, 3:10pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/5 "2023-05-12T15:10:52Z")

</div>

Okey, using the other nodes happens this: (I can’t ulpoad more than one screenshot so there will be 3 messeges.)

Node: Curve.PointAtSegmentLenght  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/1/8103b61852a76fd36860853dbb3b394e2ded5777.png)

---

<div class="post-metadata">

**Author:** ![jlamarqueWP565](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jlamarqueWP565](https://forum.dynamobim.com/u/jlamarqueWP565)\
**Post date:** [May 12, 2023, 3:12pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/6 "2023-05-12T15:12:20Z")

</div>

The las node I tried

Node: Curve.PointAtEqualSegmentLenght  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/2/52ab4fe6fd49579b08c58e313ae9f9f8c4234e97.png)

---

<div class="post-metadata">

**Author:** ![jlamarqueWP565](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jlamarqueWP565](https://forum.dynamobim.com/u/jlamarqueWP565)\
**Post date:** [May 12, 2023, 3:14pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/7 "2023-05-12T15:14:03Z")

</div>

And this is how de polycurve looks like:

I’m showing the curve, the start and the end.

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

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [May 12, 2023, 3:16pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/8 "2023-05-12T15:16:38Z")

</div>

You said it changes in the z-axis but you’re not showing those values. Are you sure that’s not what’s accounting for the difference?

---

<div class="post-metadata">

**Author:** ![jlamarqueWP565](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jlamarqueWP565](https://forum.dynamobim.com/u/jlamarqueWP565)\
**Post date:** [May 12, 2023, 3:21pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/9 "2023-05-12T15:21:52Z")

</div>

What I was saying about the Z-axis is that the inferior face of the solid increaces, and that polycurve follows that geometry, is not an horizontal curve.

What I’m trying to do is to divide that polycurve, for example in 5 meter segments and I am not beeing able to do it.

I checked that difference you said and it’s not, it is wrong for milimeters, but I can’t figure out why is that happening.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [May 12, 2023, 3:29pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/10 "2023-05-12T15:29:00Z")

</div>

Are you trying to split into equal chord lengths or arc lengths? It’s still a little unclear what it is you’re expecting and what you actually have.  
For confirmation, can you split the polycurve at those points and get the curve lengths?  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/5/451df408f077b7cb6515b4db8ca92d054fe3dc11.png)

---

<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:** [May 12, 2023, 3:52pm UTC](https://forum.dynamobim.com/t/how-to-divide-a-polyline-into-exact-point-locations/89538/11 "2023-05-12T15:52:14Z")

</div>

This seems to work for me:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/b/3bbb04cb8f25be0ca274f1fb4d7cd2fc79c298ba.png)
