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

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)

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)

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âŚ

1 Like

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