# Points on curve equally spaced from new start/end points

I am trying to place points on a curve at 400 mm from the beginning and end points, and then at intervals no more than 800 mm. I imagine I could input some formula like length/800 to place the correct number of points.

I have attached an example of the problem I’m trying to solve. I’ve tried without any luck. I’m sure it’s something very simple but I’m still kind of new to GH. Any help is greatly appreciated.

This could be one way.

DivideLineByLength_re.gh (10.5 KB)

1 Like

DivideLineByLength_re_JT.gh (10.6 KB)

Thank you HS_Kim! That was very quick.

I have a problem when I open the definition it seems to be incomplete. See attached image. Also my original curve in rhino is not straight so I’m not getting the result you got. I’ve internalized the curve so you can see.

What version of Rhino are you using?. Mine is R6.

1 Like

Seems maybe you are on Rhino5. Rhino 6 has new multiplication and subtraction components. Just replace them based on the screenshot.

If you are into plug-ins, you can do this pretty easy with Pufferfish using Open Curve and Point Divide Curve Target Length.

Pf_DivideTarget.gh (11.8 KB)

3 Likes

Note that you can also use the Extend Curve component with negative extension distances to cut off an exact amount from each end.

4 Likes

I am using R5

Hi Michael,

This worked with a straight line but it gives me different values for non linear curves. I’ve attached the definition with the curve. Please check it out.
Pf_DivideTarget_JT.gh (12.8 KB)

it is correct, don’t measure non linear curves with a linear dimension
Or override the text of the dimensions with the curve lengths.

Pf_DivideTarget_MP.gh (13.7 KB)

2 Likes

Check attached R5 def.

DivideLineByLength_reV2_R5.gh (10.9 KB)

2 Likes

This works perfectly. Thank you! I’m still trying to understand how you did this and what the components do for my own learning. I appreciate the help!

@HS_Kim
This one does the trick as well. you guys are awesome.

I want to mark both definitions as the solution. Is there a way?

@HS_Kim would there be a way to do this to multiple curves at a time? I have about 300+ curves I need to do this to

Get this as well, then…

DivideLineByLength_reV3_R5.gh (13.3 KB)

3 Likes

I am trying to bake all the points at each segment along this line except the start and end points. Is there a way to remove this start end points from the bake? I
I’ve tried the End points component but I’m not having any luck on how to subtract them from the evaluate length component.

The picture attached shows which points I don’t want on the baked geometry.

the definition is attached.

Thank you!
DivideLineByLength_01.gh (19.0 KB)

Im trying to use cull and end points components

Cull Index component. Cull the first index(0) and the last index.

Nice I did something similar I used cull index and for the indices I used start and endpoints of the curve. however somehow it also removed 2 points along the curve
See attached image
DivideLineByLength_01_r1.gh (13.5 KB)

Start and End points are not index. By plugging in points the points are interpreted as index inegers (index is an integer, not a point) so it removes points literally at whatever the number representations of those points you input are.

DivideLineByLength_01_r1_MP.gh (19.1 KB)