Topology graph: Sort a list by links

Hi all,

I’m facing a problem that I cannot solve… Mainly because a little bit out of my scope…

The idea is that I have a list representing the links between points (first list) that can be illustrated thanks to heteroptera component (topology graph display) and the result that I need is the list on left representing a list for the 3 different clusters.

  1. with points 0,1,2,6
  2. point 3 alone
  3. points 4 and 5

Any idea on how I could generate this list?


I bet that there is some python script that’s allowing that… but I don’t know it :confused:

This is a classic clustering puzzle based on connectivity (i.e. an adjacency Matrix or a conn Tree of type int like the one that you have). Is used in graphs, random (via pts proximity) trusses, trusses via BrepFace divisions, routing, Steiner graphs etc etc. Logic is “similar” (so to speak) with the Mesh.SplitDisjointPieces Method.

In plain English: given the Matrix find the islands.

Notify if you want a C# solution on that.

1 Like

Thank you I’ll take a look on this … even though I’m not sure to manage to write a definition by myself.

Topology graph Sort a list by (13.4 KB)


NOTE: This is a PART of the Matrix islands related solution (for instance the critical DFS Method is not captured/exposed etc etc). So you can’t solve it with the information provited.

But when the practice is open again (not sure when) I’ll post here a “simple” (de-restricted) C# that does clustering on a connectivity Tree (and skip the Matrix cells part that is not strictly relevant to your case).

BTW: This is an old screenshot (found in some home workstation) related with a similar C# (the Graph shown is an option):


Works but only with a small quantity of items… I need more time to analyse your method :wink:

Thanks a lot for the input :slight_smile:

Ok thanks a lot keep me up to date :wink:

This is very interesting, did you manage to find the time to create that C# script? :slightly_smiling_face:

Thanks a lot for sharing!

Well … I took the decision to keep the practice closed for the summer (using N95 masks is not my style) … thus I’m after other things right now.

But you never know: what if there’s no wind for a couple of days?

1 Like

you’re goddamn right :smiley: enjoy!