Joint orientation rule

Hi,

Please refer to this post: Local Joint Coordinate & Rotation Matrix problem