Divide Curve by specific distances (length)

Hello Guys,

how can I divide a Line/Curve by specific lengths? Divide Curve and Divide length is giving me always the same distances! Please have a look at the picture. I`m very happy about a feedback. Thanks. Best Alex

Hi.
You can try this.
If you want more input lenght you can add it in merge component, but make scure that the total lengh is inside the curve lenght.


Divide curve.gh (9.1 KB)

@samuelef1992 Did you check the output of this?

1 Like

Sorry i didn’t notice this error, but after some testing it seems to be a bug.
If this function works on a line the output is correct but if the input is a curve the output is wrong and get better increasing the cotrol points by rebuilt it.
I can’t understand why it happens.


Divide curve2.gh (10.5 KB)

1 Like

Hello, thanks for your feedback. I did a test with my numbers and it is working fine. In the example there are wrong numbers coming out. I have no idea why!
See the pictures in the example. There are my specific numbers + a restlength.
So for me it was very helpful. Thanks a lot!!!

Happy that it was helpful.

This problem is not trivial on a curve. The length of a curve depends on various properties, such as the knot spacing, curvature, weight etc. Think of it as a road you drive with the car. The parameter t defines a time value. Assuming you parameterized your curve from 0 to 1 hour, you can get any location of the car by providing a parameter in that domain. However on a curvy road you won’t reach half of the road in 30 minutes right? The speed you can drive depends on the how straight it is and other constrains such as speed signs etc . This analogy is quite the same in this case.

A solution:
You can create a “lookup table” of a (sub-)length and parameter. Therefore you need to divide the curve into x subcurves.You measure each sublength for a give parameter. You linear interpolate these points and then you intersect for a desired length.
Or you do it recursively. Both may require coding.

Edit: Or as @Joseph_Oster pointed out you can use the build-in Eval Length component…

There is no need for ReMap, just use Evaluate Length like this:


DivideCrvLen_2020Oct6a.gh (7.6 KB)

2 Likes

You have to include the first or last parameter (or 0 or curve length) to make it work for closed curves. That’s why it’s convenient to remap it, but not needed.

So in my curve from 0 to 1 the " t " value is not equally distributed along its length??

Is it looser in straight segments, and tighter in twisted segments??

1 Like

It’s just the wrong approach. ‘t’ does not equate to length except on straight lines.

1 Like


2 Likes

Thanks for the explanations, I have to go back to study :wink:

Hey,
I tried to divide curve by speciific and it works for me too. I then try to add an object (Brep) along the curve between the distances, but I’ve become confused about how to place them to the “Evaluate Curve” points.


Moreover, the points are moving ahead the line when I offset the curve - is there any method to keep it on position?

Thank you