Grasshopper

algorithmic modeling for Rhino

Hi all,

I think I'm having a brain fart, and can't seem to figure out what to do next:

I am using the Create Set component to determine where values fall within a collection of domains. from this I am getting a long string of values

(0,0,0,0,0,1,1,1,1,1,2,2,2,2,2, etc)

which I would like to count and group into paths of the same values:

(0) (N=5)

(1) (N=5)

(2) (N=5)

I think I know of a work-around that should be fine for my case today, but I know I'm missing one last step that would do this. Any advice would be greatly appreciated.

Alex

Views: 1596

Replies to This Discussion

Hmm maybe like this?

Hey Ralf,

That looks like it could be a good start. the only remaining problem is that in my actual scenario, I wouldn't necessarily know how many of each value is occurring, and so wouldn't be able to provide a fixed number for the partition size. I guess what I am looking for is a way to count how many of each value occurs in the list...

This should make it for you.Best,

M.

edit: Simplify the cull pattern output to get the trees as stated in your description.

Ahh, yes, that's what I was looking for. Thanks guys for the help.

A

This is exactly what I was looking for too. This is genius. Thanks.

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