Are you after Mesh connectivity matters? (3 classes (V, E, F) meaning 9 possible combos: VV, VE, VF … blah, blah). If so we are talking DataTrees of type int.
For instance (these work on Mesh Lists thus conn trees are 2 dim collections):
MTE.GetConnectedFaces(faceIndex) yiels an array of type int.
So (there’s issues with char < and >):
DataTree < int > EF = new DataTree < int > ();
for(int i = 0; i< MF.Count;i++){
int [ ] ef = MTE.GetConnectedFaces(i);
EF.AddRange(ef, new GH_Path(i));
}
Given the opportunity:
Always check your Mesh for islands: Mesh [ ] pieces = m.SplitDisjointPieces();
Always run the mesh.Vertices.CombineIdentical(true, true) Method.
So … this is the proper way to cut the mustard (minus validity checks etc etc) on EF, FE conn matters. Notice the obvious: 2 dim conn trees … either due to the split (islands) or the input List.
PS: The MTV (not required) is provited in order to encourage you to do the remaining 7 connectivity trees.