I aim to divide a curve using numbers and a random repetition. The division of the curve varies based on the seed in the Jitter. Sometimes the last segment is long enough to extract one of the input distances. By manipulating the Jitter seed, I achieve the maximum division of the curve. How can i automate this process?

Not easily, that I can think of at the moment, no. I suppose you could delete the last two segments (the short one and the last valid one), then find the largest slider value that fits in the remaining gap.

I suppose it’s possible somehow to specify how many of each slider value is needed to get a sum that is close to your curve length but at the moment, I don’t know how. I guess you’d have to specify a range of possible repeat values… Sounds way too complicated, what’s the point?

The curve I used was a straight line of arbitrary length. Your Crv param should be internalized.

P.S. You could use brute force - run the code for all seed values from 0 to 300 (integers) and see which one is longest, not counting the short one at the end.

P.P.S. The ridiculous brute force method. Looks like 82 integer values between 0 to 300 result in the same maximum length value. SILLY!