# How do I cull & shift a list to create rectangular 4 point surfaces side by side

How do I cull the list of end points for divided surface lines to generate side by side (4 point) rectangular surfaces that perfectly adhere to this unusual surface condition?

I have attached the script with my failed attempts of culling and shifting but I do not know the proper format or True False combinations in the cull to make it into rectangles. Any help is appreciated! CullHelp.gh (16.1 KB)

Is this what you want? If so, there is a much easier way.

CullHelp_re_v01.gh (16.0 KB)

Uhh it is close but not quite to solution I am needing. I would like to use the lists because I need each panel to be independent to run a second part of this script - I also am going to utilize a vector on the top of the surface so the panels conform perfectly to its sharp shape.

Also for some reason that script loses the first surface and gains one on the end so it does not adhere to my initial set surface boundary.

1. Not sure what you mean with the panels being independent, each rectangle is a different surface, thats why the result you get from the extrude component is a “list” of surfaces. You would have gotten the same with your method.

2. Look closer, the mistake at adhering to the initial surface is on your side, its due to the project component missing the first curve.

Here a revised version:
CullHelp_re_v02.gh (14.8 KB)

CullHelp_do.gh (12.0 KB)

I think you want this.

Just a little change on your cull and shift

CullHelp.gh (12.3 KB)

Yes thank you so much. Could you explain the wrap value being false and why the index is -1? I am confused as to why? I really appreciate you helping me solve that.

Hi, if the wrap is true, it means the list would be a loop. When you shift the list, the last one will be moved to the front. If it is false it will delete the last one.

The -1 in Cull Index means cull the last data in the list. Similarly, if the Index is -2, it will cull the second from bottom. (The Wrap should be true here.)

2 Likes