Organise List of Points depending on X/Y position

Hello Dynamites,

I am struggling with a probably “easy to solve” issue.

I have been trying to organise a my list of points for different shapes in a way that I can place my pillars on every second point. To do so, I’ve intersected the grid lines to get the intersecting points. Subsequently, have tried to split the list in a way to get every second point of each row using [List.TakeEveryNthItem]. The points should be placed in every second line on every second point but the list is following the points line by line vertically. How do I need to organise my list to drop every second point line by line in X direction?

Ideally, dynamo would ignore the points along the outline but that is another topic.

Shape with all intersecting Points

After “organising” the list

The Script

Organise-Points-in-List.dyn (26.2 KB)

Any ideas how to fix this?

Thanks in advance!!

1 Like

Don’t flatten the list.

Use a List.TakeEveryNthItem node to get every other sublist.

Then use another List.TakeEveryNthItem with list level set to @L2 to get every other item in each sublist.

2 Likes

Hi Jacob,

When I do that, I’ll receive an empty list.

1 Like

@franziska.griesser ,

in that case is @L3

2 Likes

Ahh amazing. I wasn’t aware that this was an option but now I understand why.

Thank you so much, both of you!

1 Like