Group by function does not work properly


Im trying to group a list of points by their Z coordinates but after they are grouped there are points which have the same z coordinates are grouped into two groups. Im not sure if it’s some kind of bug or if Im doing something wrong.

You could try to use a Flatten node or manipulate the List@Level, see on this page:

The list is already flattened. I have also pruned it to avoid any inaccuracies.

There may be slight variances in the Z values that Dynamo is rounding? Just a guess.
Try getting the Z value and rounding it before using List.GroupByKey.


My guess is that they are slightly off.

List.GroupByKey instead, getting the points Z values and round them to the 3rd decimal digit with the Math.Round node.


Nick you are like 30 seconds ahead of me today. :smile:

1 Like

If ya aint first, yer last!

1 Like


yeah. it worked! Thanks!