Hi,
Challenge:
i have a list with a lot of items. I would like to get;
A: the unique values
B: the number of items each unique value has.
It has to be fairly simple but I cant find it.
so for instance
2
2
2
5
6
6
6
6
I would like to get:
A: Unique values: 2,5,6
B: number of unique values;
2: 3x
5: 1x
6: 4x
Thank you in advance
pvilarim
(Pedro Vilarim)
January 23, 2023, 5:01am
4
What if I have two lists, like if you have the dimensions of a piece? How can I make a count with this classification of 2 values?
11159
(Masaki)
January 23, 2023, 5:47am
5
Hello,
I think it is the same.
3 Likes
This is really helpful, thank you!
How would I get each of these quantities indexed back to their unique value?
Like in this set, how would I get the quantity of 3 to be assigned to each value of 2?
Iβm trying to make a cut list script where each value has its qty. listed next to it.
Hope that makes sense. Thanks again.
Like this? Number of mesh faces per color (Z value) :
I just updated this code in another thread (explained there) to avoid using EdgeSrf:
[image]
Trial 2_2023Sep21a.gh (67.5 KB) (UPDATED below)
P.S. I found a component to get face centroids directly instead of using the average of face boundary discontinuity points. The result appears to be identical though, so I donβt know why a few faces have different colors (Z values) from the Sep17a version using EdgeSrf.
[Trial 2_2023Sep22a]
Trial 2_20β¦
1 Like