Geometry Intersect All in python

Hello,

trying to use Geometry Intersect All in python.
Can’t preserve list levels like in Geometry Intersect.All node.
Can someone show best way to do this?
Thanks in advance!
test.dyn (48.2 KB)

@Vladimir For two lists (like in your example) with equal length @L3, you can do something with zip() like this:

Note: You will have to tweak the logic to account for lacing if the count @L3 is not going to remain same in both lists AND/OR if the surfaces in IN[1] is going to increase @L2

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference('DSCoreNodes')
from DSCore import *

Curves = IN[0]
Surfaces = IN[1]

Ptse= []

for curves,surface in zip(Curves,Surfaces):
	temp = []
	for c in curves:
		Ptsg= Geometry.IntersectAll(c,surface)
		temp.append(Ptsg)
	Ptse.append(temp)
OUT = Ptse
2 Likes