Grasshopper

algorithmic modeling for Rhino

I want to cull points in the pattern shown in the image. setting the cull Nth integer to 2 culls every 2 rows. Help!

Views: 4550

Replies to This Discussion

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

Here's the proof:

Attachments:

the definition you attached gives an IO error. and replication your proof doesn't seem to work. Is something wrong with shift?

If you look a component shift list, Danny graft entry S.

You must do the same thing for a more logical.

Regards

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 

Thanks !! It almost works, Why do you this this happens in the first 2 rows of points though. with Wrap set to true (image 1) and wrap set to false (image 2).

Thanks again!!

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.

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. 

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

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service