generative modeling for Rhino
Tags:
Permalink Reply by Danny Boyes on April 30, 2012 at 5:15am I did a Cull Nth Nth for a square grid which might be adapted to suit your needs.
http://www.grasshopper3d.com/forum/topics/2nd-item-from-every-2nd-r...
EDIT: My mistake it's not similar but I'll leave it up in case anyone else wants to view it.
Your example is a simple case of shift every other list by one and cull Nth = 2
Permalink Reply by Danny Boyes on April 30, 2012 at 5:33am If you look a component shift list, Danny graft entry S.
You must do the same thing for a more logical.
Regards
Permalink Reply by Danny Boyes on April 30, 2012 at 8:00am Yes. Graft input S. The IO error is due to you using an older version of GH. If you don't have the Context menu Graft Function (the up arrow) then you can use a Graft Component instead from the Sets Tab> Tree Panel
Permalink Reply by Danny Boyes on April 30, 2012 at 8:56am Why do you want to wrap the list?
..............
Wrapping the List does this. {0,1,2,3,4} --> {1,2,3,4,0}
Because you are culling every second item you are getting this {1,3,0}
But 0 is one of the points you want to get rid of.
Permalink Reply by Posty on May 2, 2012 at 12:22am Thanks!! I can't crack how to select every other point now. Like a checker board if it were a square grid. I want to able to select all center points on black squares and all center points on white squares.
Permalink Reply by Danny Boyes on May 2, 2012 at 2:08am Ok I get it. The reason its not working the way you want is because of an un even length list.
eg list length = 5
therefore pattern = 0,1,0,1,0
shift list = 1, Wrap = True
becomes 0,0,1,0,1
.......
If you were to make the list always even in length even when the list you want to shift isn't then the wrapped value will never be the same as the original first value.
eg list length = 6
therefore pattern = 0,1,0,1,0,1
shift list = 1, Wrap = True
becomes 1,0,1,0,1,0
........
See attached file for better example
© 2013 Created by Scott Davidson.
Powered by