Rotation in plane created by API : is it normal?

If a markups plane is created using the API, and its normal and origin are set to those of another plane interactively placed in a rotated 3D view, the plane created by API has an extra rotation.

interactivePlane = getNode("P")

# New plane on interactive plane : there is an additional rotation
apiPlane = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLMarkupsPlaneNode")
apiPlane.AddControlPointWorld(interactivePlane.GetOriginWorld())
apiPlane.SetNormalWorld(interactivePlane.GetNormalWorld())

# New plane on api plane : there is no additional rotation
apiPlane2 = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLMarkupsPlaneNode")
apiPlane2.AddControlPointWorld(apiPlane.GetOriginWorld())
apiPlane2.SetNormalWorld(apiPlane.GetNormalWorld())

rotated_api_planes

Is this to be expected? If so, how should it be handled in user code to cancel this rotation?

Thank you.

Yes, this is the expected behavior, because normal direction does not specify the orientation of a rectangle in 3D. You need to specify direction of all the axes if you care about the rotation around the normal vector.