I have a set of sufaces that are rotated, with coplanar curves on top of them:
I would like to group them so that I can sort them by coplanarity like this:
That’s a classic hard flat clustering task using just one criterion: coplanar Planes (derived from planar BerpFaces: using the TryGetPlane(out plane, tol) RC Method). Obviously if you cluster the Faces (by index) you have the Outer/Inner Loops clustering on hand as well. That said if you want Faces in contact as well … that’s just another criterion.