Naming sides of adjacent cells

Hi all,

I have encountered (maybe) a python scripting solution to my problem, but as I am not familiar with scripting, I need to ask further for your suggestions using gh.
In simpler terms, I have adjacent cells (can be anything like voronoi, hexagons, triangles, etc) and I would like to assign a name to the shared side based on the relation with their neighbours. (ie. Cells 1, 2, 3, 4 share 5 couples of sides, thus naming the sides accordingly 1-2, 1-4, 2-3, 2-4, 3-4). Free sides can be named sequentially based on the cell name.
The picture attached should help.

Scripting is good, tought i avoid python… but this is doable with normal grasshopper:


brep_edge_topology.gh (16.3 KB)
Brep Topology does a nice job

3 Likes

NGon data-structure gives the output of adjacent mesh faces per edge

1 Like

Thank you both. I went with Riccardo’s solution as it allows a bit more flexibility. I was’t aware of the brep topology component.

I am now working towards the same concept of the common vertexes. Any suggestion?

Thanks again

Managed to solve it, here the definition for future references.

I have to admit it was a half coincidence, as the “I” output of the Point in Curves (InCurves), index of the first region that contains the point, still is not 100% clear to me. Nonetheless it’s done.
the script was also applied to more complex geometries and worked like a charm!

Thanks Riccardo and Petras for the help.

AdjacencyNaming.gh (24.1 KB)