Combining Unknown Number Of Elements


#1

How can i combine the elements in a nested sub-list considered that I don;t know what is the count of the elements of that sub-list at each time?
As in this image, I have the situation on the left and I would like to get the right image.
In this case there are 3 elements for each sublist but other times there could be 10… and so on.

Thanks


#2

List.Flatten + some list@level management :slightly_smiling_face:


#3

Or you could use List.Transpose @L3

I dont really see where all these empty lists are for ?!

image


#4

I am using this points to make NurbsSurface ByControlPoints.

L1 is for U direction
L2 for V direction
L3 for the list of all the NurbsSurfaces
L4 the main list.

I will try tomorrow and see which one work best.
thanks


#5

I have to use chop after to keep the Surfaces list structure (L4 in the left Watch)

is there a way to only flatten the lists of one point in the left Watch while mantanining the rest of the list structure?


#6

Might not be as straight forward then.

Is it possible for you to provide a sample file for testing?


#7

adding List.Chop solves the problem.

My last question was just a curiosity for the future.

Unfortunately I can not share the files.

thanks anyway


#8

@Askbid A couple more possibilities. Note that in addition to changing levels, Keep List Structure is also checked