# Points at segment length along a curve

**URL:** <https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135>\
**Category:** Geometry\
**Tags:** geometry, dynamo\
**Created:** [November 26, 2024, 3:58pm UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135 "2024-11-26T15:58:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ettorevaroni](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@ettorevaroni](https://forum.dynamobim.com/u/ettorevaroni)\
**Post date:** [November 26, 2024, 3:58pm UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135/1 "2024-11-26T15:58:28Z")

</div>

Hi All,  
just started playing around with Dynamo and this is my first post on this Forum.

As per title, I was exploring some options to place some points along a curve (parabola) at a specific distance. I found a couple of approaches using the nodes: Curve.PointsAtSegmentLength and Curve.PointsAtEqualSegmentLength.  
The first gives to me a symmetric values of Z coordinates (and I expected that) while the second node returns slightly different number for Z.  
No idea how to to interpret this.

 ![Image_A](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/c/6c310c89c1a81b46f6817b0dfb9b4291b266b28e.jpeg)

Thanks in advance for your help

---

<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 26, 2024, 4:09pm UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135/2 "2024-11-26T16:09:28Z")

</div>

Looks like you’ve got a floating point error that you’ll need to deal with. Pull the full value using a Point.Z node for the more complete comparison, and know that the ‘off’ amount is less than it appears.

---

<div class="post-metadata">

**Author:** ![ettorevaroni](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@ettorevaroni](https://forum.dynamobim.com/u/ettorevaroni)\
**Post date:** [November 27, 2024, 4:15pm UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135/3 "2024-11-27T16:15:00Z")

</div>

@jacob.small thanks for you reply.  
I used the Point.Z node as you suggested and the difference is a little more evident.  
I’m absolutely not an expert of computing and as I said I don’t know how to consider this difference on the list of numbers.  
When you says that the amount is less than it appears, are you suggest to ignore this discrepancy?  
In a hypothetical scenario of insert element along a curve I would say that the first approach is more intuitive and geometrically correct/

 ![Image_B](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/d/2decc7d8fe626d42e78815438cc34bd5222baee5.jpeg)

Thanks

---

<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 27, 2024, 4:53pm UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135/4 "2024-11-27T16:53:22Z")

</div>

Can you post the method used to generate your initial curve? I’ll put something together to show what’s happening but need to be able to recreate the issue to start with. 🙂

---

<div class="post-metadata">

**Author:** ![ettorevaroni](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@ettorevaroni](https://forum.dynamobim.com/u/ettorevaroni)\
**Post date:** [November 27, 2024, 5:32pm UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135/5 "2024-11-27T17:32:27Z")

</div>

Sure. It’s literally a simple exercise approached with two different methods.

 ![Image_C](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/b/2b31b332abf632a1dc23e1734a313e531f0325a2.jpeg)

[Test\_AA.dyn](https://forum.dynamobim.com/uploads/short-url/7mkrMiYCgLd2EVBy8eHyPLGM9o.dyn) (31.1 KB)

Thanks @jacob.small

---

<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 28, 2024, 3:13pm UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135/6 "2024-11-28T15:13:56Z")

</div>

Tested this out, and it appears to be an issue with how the `Curve.PointsAtEqualSegmentLength` node works with nurbs curves. Guessing it’s a rationalization bug of some sort, but I’ve asked the development team to look into it. For now you can work with parameterizing the length of the curve as in your upper sample, or work with regular curves (lines, arcs, polycurves) which all report correctly in my testing.

---

<div class="post-metadata">

**Author:** ![ettorevaroni](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@ettorevaroni](https://forum.dynamobim.com/u/ettorevaroni)\
**Post date:** [November 29, 2024, 10:49am UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135/7 "2024-11-29T10:49:57Z")

</div>

Thanks @jacob.small for the inputs.

I tested out the same what you suggested (I used an arc curve by three points) and everything works correctly, same numerical results with both methods.

 ![Image_D](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/b/fbd5c8ec3e7f06cefbb35e0799074245acfb5d18.jpeg)

The funniest thing for me was that node `Curve.PointsAtEqualSegmentLength` returned the wrong values only on the second half of the list of values, like it has some problems of curve’s integration after the vertex. It could be funny trying with a sin or cos curve.

Thanks again for your help 🙂

---

<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 29, 2024, 3:29pm UTC](https://forum.dynamobim.com/t/points-at-segment-length-along-a-curve/106135/8 "2024-11-29T15:29:02Z")

</div>

> [@ettorevaroni](#):
>
> The funniest thing for me was that node `Curve.PointsAtEqualSegmentLength` returned the wrong values only on the second half of the list of values, like it has some problems of curve’s integration after the vertex.

The degree of accuracy actually scales to the number of points, but floating point is working to fake accuracy in the points in the early part of the dataset. Try using something like 9999 points or h9igher and you’ll likely see what I mean. Eventually it doesn’t calculate points at all in some cases.
