# Repeat two different values sequentialy as long as it is possible

hello, I am trying to repeat two values sequentally as long as the rest length is larger than one of those two values, i have used a permitive methode to define these relation, but i feel it is not really practiccal, cause i will have to repeat it alot of times to be sure that the rest is not larger than the entered parameters, these will take alot of work when the values are two much smaller than the total length, is there a better methode to define these relation, thank you for your help.
180624.gh (24.3 KB)

Wouldn’t repeating two values in the same order over and over be the same as repeating the sum of those two values over and over until you run out of facade? It would just be:

N = \left \lfloor \frac{W_{max}}{W_{sum}} \right \rfloor

with perhaps room enough left over to fit in the first of the two sequential values. That’ll be another conditional check. You can access the flooring function \left \lfloor x\right \rfloor via the Round component.

The left over amount would be W_{max} - N \cdot W_{sum}

1 Like

thank you for your help, i used actualy the stratege of the sum at the begining, but later i ve got rest values which are larger than one of the two parameter, i thought it will be better to define things correctly, values after the other from the begining, i will try it again using the round component which i didn’t used befor, thank you very much for your help.