|
finding mesh angles
Here I'll try to explain a method for finding out the angle of a mesh at a specific point/edge in python. Finding the angle between two faces in Blender
Now this isn't really complicated.
Then we can simply do the following to find the angle: myAngle = Mathutils.AngleBetweenVecs(face1.no, face2.no)The result though is only an angle between 0 and 90 degrees, to find out if that is positive or negative continue reading below. Finding out whether the angle between two faces is convex or concaveA lot of the time you also want to know whether the angle is concave or convex (positive or negative).
To get that we get the vector from the midpoint of face1 to the midpoint of face2.
In python that could be: dotProduct = Mathutils.DotVecs(face1.no, (face2.cent - face1.cent)) The resulting dot product will be either positive or negative depending on whether the angle is concave or convex.
|
Japanese proverb
Onna sannin yoreba kashimashii If three women visit, noisy |