Multiple point creation - sublists

I would like to create two lists of lists of points based on 2 lists of x coordinates and 2 lists of y coordinates.

Let’s call the lists [[Ax], [Bx]] and [[Ay], [By]]. I want to get points [Ax, Ay] and [Bx, By]. The list lengths are [5,4] and [4,3] so I should end up with 32 points. 20 in list A, and 12 in list B. Ideally, these would be broken down into sublists based on Ax and Bx, so 5 lists of 4 points in list A, and 4 lists of 3 points in list B.

I’ve tried playing with the levels at the X and Y inputs of Point.ByCoordinates, but always end up with the wrong number of points.

Do I need python to make this work?

Hi Maase,

Have you tried setting the point-creation node to cross-lacing: xxx in the bottom right (in combination with the list levels)?

Hi Daan,

I have tried that, and it always gives me a multiple of 7 points, (the length of lists Ay + By) -

7 (Ay + By x first item in Ax),
14 (Ay + By x first item in Ax and first item in Bx),
28 (Ay + By x all of list Ax), or
63 (Ay + By x Ax + Bx).

But I still haven’t convinced it to give me Ax x Ay and Bx x By

I have also tried shortest and longest lacing, but maybe it’s a magic combination of lacing + levels?..

Hmm, maybe you could try chopping the first list by lenghts of 1 and using L1 & L2 with list level lacing to longest.

Btw normally I would open Dynamo to take a look myself but I dont have Dynamo available to me this week :frowning:

It seems like a job for list.map, but I don’t know think it’s possible to use list.map on point creation.

This seems suitable for replication guide.

5 Likes

That’s perfect! Thank you. Can you explain how the bracketed numbers work? Is it like levels?

1 Like

It is called replication guide. You can take a look at the documentation here:

Section 9. Replication and replication guide
DesignScriptGuideV2.1.pdf (343.2 KB)

Section 10. Replication and replication guide
DesignScriptDocumentation.pdf (705.5 KB)

3 Likes

Awesome. It’s like a for loop, which is what I thought I needed. Thank you so much, man.

1 Like