Match list structure between two list

Hello dynamo community

I have a problem with the structure of two list. I need do match the both list, but in the structure of the firts one (see imagine). Actually, I don’t have idea how do that, I’m trying to do with nodes of list but I can’t. If, you know how to do this, I would greatly appreciate your help.

Greetings

1 Like

You want the list of solids to match the list of surfaces? You’ll need to provide more information and maybe reevaluate what it is you’re trying to do. You add more surfaces to the initial list (which changes the structure), flatten (which changes the structure), and then transpose (which changes the structure). You need to keep track of all the things you’re doing to the initial list and how that changes the structure in order to understand how to maintain that structure.

In this case Flatten is the big one, since it completely removes the structure you had. If you want to maintain the original structure then you’ll either have to avoid flattening or you’ll have to reconstruct it if your logic would allow that, which I think it would in this case.

The better option is always to maintain list structure throughout the logic, which I think is also possible here.

2 Likes

Hi, a ListCount based on @L2 and ListChop on your solids with this same list

Sincerely
christian.stan

3 Likes

It worked perfect. Thank you very much.

1 Like