 Cross product problems

Hi!

I’m trying to create a cross product (point by coordinates) but I can’t get the desired result.
I have 2 lists, each containing 2 sub-lists.

I want to combine those sub-lists with each other to create several grids.
I do get Dynamo to combine my lists with cross product to get all coordinates but I can’t get the them in the right order.

The desired result would be 4 nested lists:
List 1:
x=1 y=7
x=2 y=7
x=1 y=8
x=2 y=8

List 2:
x=1 y=9
x=2 y=9
x=1 y=10
x=2 y=10

List 3:
x=3 y=7
x=4 y=7
x=3 y=8
x=4 y=8

List 4:
x=3 y=9
x=4 y=9
x=3 y=10
x=4 y=10

Anyone know’s how to handle this?
This is as far as I get, 2 nested lists.

I think a transpose after the Point.ByCoordinates node should do, using list levels that is.

Nope. I misunderstood the initial issue, I’m sorry. That shouldn’t solve anything.

I think this should work.

Nope. This gives only 8 results whilst it should always be 16(4 grids of 4 points).
It’s because of your level settings that you only get 8, but still it does not work, see the desired result.
That’s different of what you’re getting.

I thought that was actually exactly what you wanted, but let me try again.

Now, you could argue that my original answer was already correct, Apparantly two transposes did the job.

1 Like

So, did it work?

If a comment solved your issue please mark it as solved, and maybe leave a like here and there.

You seem to have got the desired order, but not the structure.
Something like this should work too …

1 Like

Awesome! Automated the list count so the number of values can vary.
Thanks a lot!

1 Like

FYI, my solution already circumvented that.

1 Like

Even better! sorry missed it.

2 Likes