Dividing the line into various segments and sizes to them, including zero length

Hello, Guys

made a defenition by dividing the line into segments of different lengths, everything works, but if you need to display the size 0 length on this line, then the list shifts and the last size is not displayed correctly

please tell me, maybe there is a simple way to divide the line by length and measure it correctly

this is how the output of the sizes and the last occurs; for example, 5 is unmarked, and there is a duplication of 0, which comes earlier

divide curve zero length.gh (16.4 KB)