# Need to Understand 2D Cell Rotation Angle When Cell is Mirrored About the Y-axis

Hi All,

I have a program that needs to unrotate a 2D cell to 0 deg/no reflection which has been placed at any rotation angle and/or mirrored about the X- and/or Y-axis.

Specifically, the problem I'm having is when the cell has been mirrored about the Y-axis, mdlRMatrix_toAngle () returns a rotation angle of 180 deg from the cell's rotation matrix, which causes the cell to be unrotated by and incorrect angle.  mdlTMatrix_containsReflection () (get tMatrix from rMatrix) does return TRUE which does indicate the mirroring. When the cell is unrotated by the inverse of its rMatrix, it get a 180 deg rotation that messes up it orientation.

Is there some way to couple the 180 rotation angle and contains reflection mirroring information to properly unrotate the cell?

Thanks,

Warren

v8i SS10, VS2005, W10

Parents
• Hi Warren,

because this is general Developers and Programming group, I recommend to move your question to MicroStation Programming forum. To move existing post to another forum, use More > Move tool available under your original post.

I have a program that needs to unrotate a 2D cell to 0 deg/no reflection which has been placed at any rotation angle and/or mirrored about the X- and/or Y-axis.

It's necessary to discuss rotation and mirroring separately, because whereas rotation is defined by rotation matrix, the mirror operation (and other transformation) is defined by by transformation matrix. I recommend to see mdlTMatrix functions, e.g. mdlTMatrix_containsReflection.

Regards,

Jan

• Hi Warren,

because this is general Developers and Programming group, I recommend to move your question to MicroStation Programming forum. To move existing post to another forum, use More > Move tool available under your original post.

I have a program that needs to unrotate a 2D cell to 0 deg/no reflection which has been placed at any rotation angle and/or mirrored about the X- and/or Y-axis.

It's necessary to discuss rotation and mirroring separately, because whereas rotation is defined by rotation matrix, the mirror operation (and other transformation) is defined by by transformation matrix. I recommend to see mdlTMatrix functions, e.g. mdlTMatrix_containsReflection.

Regards,

Jan

Children
No Data