How to get angle of edge ? (python)
Manually:

In edit mode, with your edges selected, fire up the properties panel N, and click on Edges, &amp; Angle.

It worked for me.



Python:

bpy.data.meshes["Plane"].show_edges
bpy.data.meshes["Plane"].show_extra_edge_angle




Since you modified your question:

Here is an append to this answer that may get you closer:

To Actually access the information that you need, you could get all the verts and calculate angle based on XYZ deltas:

bpy.data.meshes['Plane'].vertices.items()[0][1].co

I'm not going to solve it for you, but I will at least tell you how I would approach it.

I would first loop through the verts using something like:

for vert in bpy.data.meshes['Plane'].vertices:
    print(str(vert.co.x) + "," + str(vert.co.y) + "," + str(vert.co.z))

Note this is just printing the coordinates of each vert (not very useful, other than showing you how to access their info).

Then I would calculate the angle between each vert, find the selected edges that match these verts, and spit out the angle.

Please note that you can access .edges similarly to .vertices, inside of the .edges object you will have a vertices object that is a list of two vertex indices:

eg. py.data.meshes['Plane'].edges[0].vertices[0]

It seems doable, just have to figure out the calculations, and how you are going to narrow down your selection.

Hope it helps.



I think that you would have an easier time if you thought about doing the calculations after you account for coordinate system rotations in the following example case I'm simplifying this to only "Z"

Here is a visual circular example to show you what I mean:







From your comment it seems that you are not taking this into account.

It is advisable to calculate the midpoints of the section, and do your calculations from there, because as you see in the circular example on side of the mesh is longer than the other, and getting the midsection helps you to work on the average edge rotation.

Once you have this, you can translate your coordinate locations to rotate about "Z" via the indicated angle.

As another hint, it may be advantageous to think about this angle according to the following (Where I believe that your desired angle is the sum of a2 &amp; a3):