C# divide/find domains assign color

I know this answer is a little off topic, but I thought I would share. We spent some time looking at a few approaches for this and the examples below seemed to be a good fit for us. Maybe it helps?

Another approach is to explode the mesh faces into individual meshes. This allows you to assign the same color to all the vertices of each resulting “face”, (resulting in “coloring by face”). Here is an example in python.



You can also do it with mostly native components. (need something to explode the mesh, this example uses UTO Mesh Edit tools, but you can write your own). The python implementation is literally a copy of what is going on in the file below. The python implementation also uses ghpythonlib.components ConsecutiveDomains and FindDomain, (they really do the heavy lifting pretty well, so…we used that). not sure if there is a comparable thing in C#?

SlopeAnalysis_py.gh (16.4 KB)

1 Like