Has some easy method to convert a Matrix to a Transform?

for example:
meshobject.transform(…transformobject …);but now i just have a matrix object…
i know i can write a custom method to do that,but better to use the existing method…Thankyou…

If you need transform T.
You can assign matrix values;

public Transform Matrix To Transform(MatrixType mymatrix) {

Transform T = new Transform() ;
T. M01 = mymatrix[0,1];
T.M02 = mymatrix[0,2];

return T;

In this way you can write a helper function that transforms matrix to rhino transform

It also depends how your matrix is constructed. If it is based on rhino coordinate system or contrary to other ones


thankyou,i use your method,and also we can try T[0,0]…equals to T.M00;

1 Like