I'm trying to build a python states interactive handle and I want to orient a handle to the normal of different primitives. However I don't understand how to correctly orient the handle. In the viewport it appears correct but the values extracted from the handle are not correct. For example in this image the RY of the gives weird values:
Image Not Found
Basically here when I rotate RY in the viewport the actual value from the handle is RZ, or RX -depending on the normal value. It's like there is a different, internal orientation of the handle.