I am trying to work out how to analyze a mesh to determine what percentage of the mesh contains faces at more than XX angle to the adjacent mesh face?

Example Mesh A = 1000 poly’s, 200polys are at more than 80 degree angle to adjacent polys

Assuming it counted both faces the actual percentage of polys at more than 80 degrees in this case is 10%

Completely lost on how to do this in rhinocommon (c#)

Dupmeshedge in rhino for example must calculate this to be able to determine an “edge” as being defined as more than XX angle?

Any pointers welcome please!