Replace items from list to list

Hello,
I want to extract the surface from polysurface and replace the original list… cant figure out how to do it…
image
thanks for help :frowning:

I just done it by python :slight_smile:

surfaces = IN[0]

final = []

for ss in surfaces:
	surface = []
	for s in ss:
		if isinstance(s, PolySurface):
			c = PolySurface.Surfaces(s)
			for p in c:
				surface.append(p)
		elif isinstance(s, Surface):
			surface.append(s)
	final.append(surface)

OUT = final

image

1 Like