rearrage ids on CC rotations

rearrangeing ids when Counter Clock wise rotation hapen on planes X Y
and Z