Tested with Blender 2.79 (official)
2017-09-11, Hash: 5bd8ac, Windows 64 build
Short description of error
Calling calc_edge_angle on a vert with 2 edges returns the supplement of the angle between the 2 edges instead of the interior or exterior angle as method description indicates.
calc_edge_angle(fallback=None) .. method:: calc_edge_angle(fallback=None) Return the angle between this vert's two connected edges. :arg fallback: return this when the vert doesn't have 2 edges (instead of raising a :exc:`ValueError`). :type fallback: any :return: Angle between edges in radians. :rtype: float
I suspect the problem looks to be with "bmesh_queries.c" on line 1753
return (float)M_PI - angle_v3v3v3(v1->co, v->co, v2->co);
Exact steps for others to reproduce the error
Create a mesh that has a vertex with 2 angles that are more or less than 90 degrees apart from one another. Enter edit mode and use Python API to call calc_edge_angle() on the vert.
Run script inside the attached blend file:
The calc_edge_angle() documentation states the method requires vert's with two connected edges." but this method will also work on vertices only attached to 1 edge (returns pi). Possible missed test case?
Also, on vertices with no edges or more than 2 edges the method throws this error message:
ValueError: BMVert.calc_edge_angle(): vert doesn't use 2 edges
I would suggest slightly different wording for error message to indicate exclusivity if 2 edges are required, eg:
"Method only works on vert with 2 edges"