Increase/decrease line divisions as length of line increases/decreases

Hi

I’m trying to figure out how to divide a line into equal parts, but to increase the amount the line is divided by, if the length of the line is increased by a certain increment.

So for example, if I had a line that was 1000mm and I wanted it to be divided into parts that were roughly 250mm, I would divide it by 4, but then to make it so that if I increased the length of that line it would add another division every time the line increased by 250mm.
And of course it would need to reduce the amount of divisions as the line got shorter.

Sorry, I’m pretty new to Grasshopper… This is probably a really simple problem :confused:

Cheers

Hi,

You can compute the amount of divisions from the length of the curve and round it up.

DivideCurve.gh (11.8 KB)

There is also Divide Length component that divides exactly with a given length, but the last segment will be shorter.

Wow, that was quick! Thanks so much magicteddy! Really helped me out :slight_smile: