I have one value per vertex and based on these I’d like to split the mesh into n **valid** groups.There can be multiple non-connected meshes within a group.

As you can see highlighted with a black pen in the image below sometimes I get some invalid areas which I need to mitigate.

Ideally if the vertex value is high then I’d like to expand and make it valid, conversely if it’s low let the neighbors take over.

Can someone point me in the right direction?

My initial assumption is a group would be valid if:

- All faces are connected by at least two edges
- the total area of an “island” is greater than a threshold (two faces would be too small for an entity)

C# or Python solutions would be much appreciated!

PS: this algorithm will scale to 3D tetrahedron meshes to export watertight poly meshes.

test_two.gh (17.7 KB)