Dihedrals and one dimension connectivity trees (but what if your mesh can being splitted in disjoined pieces? > 2 dimension connectivity trees) :
Given a FF tree: for each branch (path index [path.Indices] is the face index in the Faces List) get the adjacent Faces indices.
So we have a current Face and the adjacent ones. Thus we have access to the face normals as well (Face normals ARE NOT the mesh normals : aggregate unitized vectors from a given vertex to adjacent vertices).
With code for a Mesh M and a Face Index faceIndex this is done as follows:
Vector3d faceNormal = M.FaceNormals.ElementAt(faceIndex);
For a Face pair (currentFace, adjacentFace) find the common edge (List intersections from a FE Tree or take the long way home via a EF tree) and the pair of face normals (currentFN, adjacentFN). Get the edge direction (eDir) and define a plane for the Vector angle calculation.
Compute the cross prooduct (cp) of the currentFN and adjacentFN. Compute the Dot Product (cp, eDir). If is < 0 flip the plane.
Compute the vector angle currentFN, adjacentFN, plane. This is your dihedral (in radians). All these are very easy with code … provided … er … hmm.
Anyway remember that conn Trees relate TopologyVertices (not Vertices) to TopologyEdges to Faces. You can relate TV indexing to V indexing, mind.
BTW: Not sure what Sandbox does since I never use add-ons of any kind (other than Kangaroo). But a Face List is a Face List anyway. I could understand the obvious diference between TopologyVertices and Vertices indexing … but here we are talking Faces.
BTW: For the edge angles there’s a very handy Method (var MTV = M.TopologyVertices;
MTV.SortEdges(); ) that sorts the vertices meaning that you don’t have to bother much when looping on triads of vertices (previous, current, next) and computing the Vector angle (previous - current, next - current, plane (current, previous,next)).