Cross-products and sub-lists

Hello everyone :slight_smile:

I am trying to apply a node with cross-product lacing with a list with 3 levels (@L3). However, i am a bit confused… I am just basically trying to find the intersection of a set of surfaces with itself (@L2), but i have other lists too (@L2 too).

In other words :

What i have :

  • List : (@L3)
    • 0 List (@L2): 7 Surfaces
    • 1 List (@L2): 4 Surfaces

What i want :

  • List : (@L4)
    • 0 List (@L3) : 7x7 surfaces intersections
    • 1 List (@L3) : 4x4 surfaces intersections

Does anyone know how to do that without using a Python Script node ?

Best regards

By the way, if anybody wonders about how to do it in Python :

import clr
from Autodesk.DesignScript.Geometry import *

surfs = IN[0]

resultat = []
for i in range(len(surfs)):
	set_surfs = surfs[i];
	mini_res = []
	for j in range(len(set_surfs)):
		micro_res = [];
		for k in range(len(set_surfs)):
OUT = resultat

@mellouze Something like this?

1 Like

Exactly ! Thank you very much kind sir :slight_smile:

If i may ask you, how does this translate in terms of Geometry.Intersect and List.Flatten node ? (If one feels more more confortable with nodes that Code Block)

1 Like

Tried to achieve it with nodes, but couldn’t :frowning:
(Might partly have to do with the fact that Keep List Structure doesn’t seem to be working in 2.0)

1 Like