Hey everyone! I know, another flare getting shot into the sky asking for help with list management - my apologies inadvance, but I am really struggling with the logic of this one. Screenshot function in Dynamo 2.16 seems to be busted (unless I’m missing something) so I’ll do my best to explain in text what I have and what I’m trying to do.
I have 5 primary lists of points. Each of these lists has 5 sublists. Each sublist represents a unique arc of points. So, each primary list has a collection of 5 sublists representing points along different arcs.
I have 5 primary lists because for each arc, those points have been mirrored/translated in order to form a collection of points around each arc. Now I want to be able to group the same index from each sublist in each primary list to get to a collection of 5 points that I can create a polyline from. I’m hoping the sample image below helps illustrate the ask. TIA.
@christian.stan Thank you for the suggestion! The export image button in the top-right was getting me nowhere. Attached is the proof of concept I have working if I focus on grabbing just a single index each time.
Thank you for the suggestion. I’m really trying here so sorry if I’m just missing something really simple, but my data structure is not following what you’re showing. Between my List.Chop and List.Transpose (even matching levels) does not seem to be working the same way.
Thank you for the test script. I think where our approaches differ is at your Geometry.Translate node. In my case, the original points that are being translated are not yet in the groups that need to be connected by a polycurve. So in your example, if you were to take your points and translate them UP instead of around in a square to begin with, that is the original list I’m dealing with. In your list structure I think that would look something like {0[0], 1[0], 2[0], 3[0], etc.}.
Below is a proof of concept that I was able to get working on a single arc of points. My issue is obviously trying to figure out how to either loop this node structure through every index of points or be able to solve the original list structure to simply provide the groups of 5 points in the appropriate list structure for all arcs.
Ok the lightbulb finally went off! I revisted @Daan 's suggestion using List.Combine, but originally it was not providing the right data structure. However, instead of using List.Join as the combinator, I swapped that out for List.Create, in order to get the levels I needed to work with. Using that List.Combine I could go from 5 lists of 95 points each to 5 lists of 5 sublists each with 95 points. Seeing this structure I immediately knew I could now perform a List.Transpose at Level 3 to get 5 lists of 95 sublists of 5 points each!
Only hurdle left is figuring out why I can’t plug that into my polycurve node