Sorry for my late reaction, but I was away several days and plenty of work meanwhile.
Though, part of my problem is still there.
Initially I know only the length LC1 of the first sector, but not the lengths of the subsequent sectors (LC2, LC3, ...). Length LC2 of the second sector is farther computed in my project, after some other calculations. Length LC2 (and indeed its distribution in unit tubes) depends thus on both LC1 and LC1 distribution into unitary Lu tubes or parts of unitary tubes.
Summing up, I was looking for a program able to carry out the division into unitary tubes (or fragments of) of the sector i ALONE, which would be (inherently) based on the distribution into tubes (or fragments) of the i-1 sector. Excepting obviously the first sector, since it starts from 0.
This was my main difficulty on programming in Mathcad, according the depicted algorithm posted initially.
My last true programs go back to many years ago and to Fortran where lines involved in loops have labels and can be adressed correspondingly. But there are not lines labels in Mathcad programming modules...
Many thanks for any help,
Liv .