How do I convert a hexagonal cell into an orthogonal cell?

In modeling surfaces/interfaces, there may arise a situation where it’s more convenient to work with a substrate of an orthogonal supercell than a hexagonal supercell inherited from the original cell. A good example is the hexagonal graphite structure of P_63/m_2/m_2/c:

To generate its orthogonal representation, one can use lattice transformation available in Materials Studio (Menu Build | Symmetry | Redefine Lattice | New lattice). The transformation matrix can be,

1 1 0

1 -1 0

0 0 -1

See bellow: