Grasshopper

algorithmic modeling for Rhino

Hi Everybody,

I have a simple query. How can I make a list of the number of occurrences of certain values taken from another list without changing the order. Kindly refer to below image: Many thanks in advance.

Regards,

Homar F.

Views: 3513

Attachments:

Replies to This Discussion

Hi Homar.

Use the "Create Set" component from under the Sets tab.

I think this is what you are after.

Rasmus

Hi,

This is the closest I could get but still short of what I want. Still need help please.@Rasmus, I'm afraid the create set didn't give me my desired result. Thanks anyway for your reply.

BR

Homar F.

Hi Homar, this is one way of doing it:

the problem is that the numbers are appearing twice in the list:

1

1

1

2

2

2

3

3

3

1

if you got a rising sereies of numbers this works!

Hi Bea, you are right, I didn't notice the repeating numbers!

yes, the problem is the repeating number. but it is a must. Thanks for looking into this.

thanks mire but as bea mentioned the repeating number creates the problem.

i think this is not possible because of the lack of information in the first list.

you can find out the absolut amount of numbers by using the sort list module.

Hi Homar, here is my two cents (using a script by Tom Jankowski).

Attachments:

Thanks Pieter. This is what I need.

Attachments:

Here's a stupid graphical/geometric solution:

EDIT: The "/100" part is not needed, I've put it there just to get a simpler graphical feedback while building up...

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