I need to get the Normal orientation of an edge and apply it to a new object:

obj = bpy.data.objects['Edge']
mat = obj.matrix_world
# Decompose object in location, rotation, scale
loc_obj, rot_obj, scl_obj = mat.decompose()

The method above give me the Global orientation: Global

Is it possible to get a matrix containing the Normal orientation in the rot_obj component? Normal


  • $\begingroup$ The desired normal orientation is not unique. In your last picture any orientation with same y(the green one) can be a valid solution. Can you provide more constraints? $\endgroup$ – TheBusyTypist Jul 20 '15 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.