Data Tree Question (cells with number of offsets according to image sampler)

Hi,

I have a square grid. Each cell contains a number of offset curves depending on the value of an image. This is working properly:

Unfortunately, as soon as I add to the branches, things fall apart. I’ve seen similar issues already, but what’s throwing me off here (I think) is that I don’t have the same number of items in each cell. I haven’t really dealt with that before.

Any suggestions?

1 x 6 gradient

2 x 6 Gradient

Tree Question.gh (19.3 KB)

It’s a common data tree problem and if you graft the curve input ofOffset Curve, it should work as expected…

Tree Question_re.gh (11.3 KB)

1 Like

Oof! Thanks so much! I swear I tried this, but I am obviously mistaken.

I’m surprised how much your cleaning up my layout clarifies the situation. Mental note to do that in the future.

I’m not sure I understand what the ‘shift paths’ component is doing there at the end? I see that it is making data with 58 branches into data with 12 branches.

Is it “rotating” the data, so a list of 58 x 12 becomes 12 x 58?

Shift Paths with negative offset(-1) just remove the outer branches and let you retrieve the previous datatree.

1 Like