Grasshopper weaving, remove first and last branch

Hello,

I am trying to do a pattern with one line out of two having there pattern shifted. so I created a range of lines and then I dispatched them, then I divided the curve into points. and on each of those two pattern I cull one out of two points with one being shifted.

I then weaved them, and I wanted to remove the first and last line so I used tree statistic, cull index and tree branch. However it remove the first two and last two branchs. Any ideas what could be the issue?


Thanks
weave issue.gh (8.8 KB)

Remove index ‘0’ from the first cull list and index ‘-1’ from the second cull list before/instead of weaving?


if the number of divisions is EVEN, then the number of Points created is ODD
each time you have an ODD number of points, the start and end boolean of the Pattern sequence will be the same value
for instance, if we had 3 boolean values, they would be like True, False, True
when you Shift List (of Points) Wrap is True, which means Points gets shift by +1 position, and the last point becomes the first

Because the number of points is odd, first and last gets the same boolean, then last becomes first, so you have a sequence of two True True

invert the Wrap value of Shift List and the problem is solved:


if I may suggest an easier way to checkboard that, first you create a serie of True/False that has as many items as the number of rows of your data (in this case as many True/False as the number of lines)

then you divide the Lines into Points, and at the same time graft the True/False:

and as last step, you Merge the existing True/False pattern with the inverse of itself:

just a couple of components on the canvas to get the same final result :+1:

weave issue_inno.gh (12.5 KB)

2 Likes

Inno you solved a problem I didn’t see, I didn’t realise that there was those following dots in the list thanks! The initial problem was about removing the first and last line

René I tried but I didn’t get it to work, I only have one cull list, or are you speaking about the cull pattern?

1 Like

you are right :slight_smile:

you can either Cull first (0) and last (-1) item of the Tweened curves:

or delete first and last item of the Range that defines those curves:

I prefer this second option: if you cull the tweened curves, you generate also those first and last ones just for deleting those afterwards… while culling the first and last values from Range means those two curves are not even generated in first place

weave issue_inno_2.gh (14.9 KB)

2 Likes

?
You were using two cull components - the outputs were going into the weave component. I removed the weave as you can see in the image within my response and then took care of what you asked about, or so I thought, lol.

Anyway, I’m glad Inno solved the issue prior to its occurrence :wink:

Cheers