Explode and Isolate Mesh by Colour

Mesh COlour.3dm (3.1 MB)

Hi everyone,

I have a mesh that is being generated from a GH script that results in a mesh that is coloured by the amount of sunlight a division receives. Is there a way to explode this mesh, select each segement by colour, then I would like to merge the meshes of the same colour and put in their own layer.

I’ve attached an example file.

Thanks!

Your coloring was done with a per-vertex logic… this required each face having its own dedicated vertexes.
(no vertex is shared by 2 faces, so almost every vertex have many duplicates…)

This solution join all your meshes, create a set of unique colors, and then create a partial mesh for each color. Bake the final component.


divide mesh by colors.gh (9.0 KB)


PS you have 2 yellows almost identical:
255,225,0
and
251,222,3
2026-02-05 05_21_16-Mesh COlour.3dm (3 MB) - Rhino 8 Commercial - Top