Putting chains on hexagons

Hi

I am trying to fit chains into the lines of hexagons connected together by rings.
Since they are of different lengths they have different number of repetitions. My solution is to divide the lengths into 5 different domains, since chains have a bit of wiggle room and don’t necessarily need to be stretched out completely to fit, but should be max within the thickness of the chains.

Was wondering if there is a better way to do this, either by not having to divide into different domains manually, or maybe a more functional way to fit different repetitions of chains into the rings.

Thanks

chain3

Chain hexagons.gh (49.2 KB)

The built-in curve division options let you divide either:

by segment distance/length (resulting in a different length for the last segment unless the curve divides by that length perfectly),

or

by number of segments (giving no direct control over the length of those segments).

If instead you want to divide a curve into some unspecified whole number of equal length segments, automatically choosing this number of segments in order to get them as close as possible in length to a given value,
you can do it like this:
(making use of the automatic casting of a number to an integer by the ‘N’ input)

1 Like

Thank you! I will check this method out!

Thank you so much for the solution, it works great

Just wonder one additional question
I would like to make a list length for each number, like a chain with 6 circles you would need a total of 3 chains.

I did it through dispatch, but maybe there is a better way?

Thanks

Chain hexagons list.gh (35.3 KB)