Rectangular Grid - Reversing Point Order in Every Other Column

Hi,

I’m using the Rectangular component to generate a grid of points. It returns a tree of points, a branch for each column. I’d like to draw a Polyline between the points. I can Flatten the tree and connect them. It, of course, looks like the figure shown below, on the left. Instead I’d like it to look like the figure below on the right. To accomplish this is easily said - simply reverse the points in every other branch of the tree prior to flattening. Then it would work fine.

test1

My problem is I cannot find an elegant, simple way to do this. I feel like there must be something I’m missing that would make this easier.

Any help is appreciated!

Mark

Try this.

zigzag.gh (5.4 KB)

2 Likes

Niiiiice :slight_smile: Thanks! The availability of the ellipsis in the mask is pretty sweet.

Mark

You can even put a third number after the ellipsis, indicating an upper limit to the sequence:

{0,2,…,50}

1 Like