matching rotation


I’ve hit a roadblock on my quest to finish my first script.

I need to rotate the face of a MESH to match the exact same rotation of an object’s origin’s rotation, in world units.

I can easily get the Euler [x,y,z] rotation of the object’s origin in world units, but the face of the other MESH object has it’s own coordinate system and I can’t seem to apply one vector to the other.

Any ideas? Need further explanation of what I’m trying to achieve?



May be the following recent thread can help:

Your problem is not exactly the same, but it seems similar, to my understanding.
The basic idea relies on identifying a proper reference frame for the face to be aligned…