We see two identical Plane objects: A(blue) and B(red) They are oriented arbitrarily in the 3D space. Notice that the origin of A is located in the center and the origin of B is located in the lower left corner.
The problem: What is the python code in Blender that will match the shapes of A to B perfectly.
I tried to match the matrices:
A.matrix_world = B.matrix_world
This matches location, rotation and scale of the objects but I still need to offset A by half width and half height in order to fit them perfectly.
Is it possible to do that with some of the available Matrix functions in Blender?