OK folks, I worked out my own solution to this problem.
Using the “BREP topology”, and a but of comparing normals, it is easy to get a tree with, for each face of the BREP, the list of neighboring faces which are tangentially connected.
But then, to get concatenated lists, or “chains” of faces, and despite all the tools in the “Sets” tab,
there didn’t seem to be an easy way to do that.
So, inspired by graph theory, I mapped the faces and the “tangency” condition as a set of nodes connected by links.
Then I got rid of the duplicate lines, made polylines, and reverse-engineered my way back to the face lists.
I guess that this could be useful in other circumstances.
GEOMETRIC SOLUTION TO LIST CONCATENATION.gh (102.1 KB)