Blender , an angle between faces

I have such an example: On an object the obtuse angle between 2 faces is 150 deg (but I know it, blender shows 30), in another place the acute angle between 2 different faces is 30 deg. In both cases, Blender shows me 30 deg. How could I find the difference with Python help

degrees(face1.normal.angle(face2.normal)) gives me 30 deg in both cases

Though I don’t know exactly why this happens. But it seems that 30 is the opposite of 150.
2020-11-18 16_49_09-Online protractor & angle maker _ interactive angle visualiser _ visnos - Brave

EDIT: A rough guess is that the vertex indices are entirely mixed up so it doesnt matter if one is first and the other second. Though bmesh contain some utilities to query geometry in the correct order, but still not sure if there’s something like that you’re looking for.

You will have to flip the angle in this case, just change the order of operations face2.angle(face1).

Also considering this you would have to ensure always that you insist in one order of operation to keep things on track. The problem is however how do you decide which operation which face goes first?

As for example if you talk about renderering triangles, it all depends on the triangle that is projected to screen.
See “barycentric” but this is for 2D triangles?
https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling

Is there an actual thing for 3D triangles? Say for example you lock to the global X axis no matter what and then only decide which x goes first etc. Any ideas? :neutral_face:

So I have an 3D object, let’s assume it has 8 walls, each is a triangle, it is not symmetrical, such a small mockup.

I need to know the angles between all faces, which is fairly simple, just by checking Edge Angle. but then I see the problem I described above.

I do not want to change or improve anything in it.

I want to export angles values with Python so that I know if the angle is obtuse or acute.

green- red and green- white

would like to do it automatically, without manually checking and correcting, for all faces

what about this? https://docs.blender.org/api/current/bmesh.types.html#bmesh.types.BMEdge.calc_face_angle_signed

looks like IT IS WORKING :grinning: