Interpreting Matrix3D data

Interpreting Matrix3D data

Anonymous
Not applicable
1,918 Views
5 Replies
Message 1 of 6

Interpreting Matrix3D data

Anonymous
Not applicable

How do you interpret a Matrix3D's data. What cells are related to translatation, rotation, etc? I'm trying to debug why my translation script puts the object in a wrong position but I do not understand the Matrix 3D's data.

 

Some helpful information would be:

How is translation of a Matrix set?

How is rotation set?

What other variables of a Matrix used to move an object exist?

0 Likes
Accepted solutions (1)
1,919 Views
5 Replies
Replies (5)
Message 2 of 6

ekinsb
Alumni
Alumni
Accepted solution

The top three rows of the first three columns define the rotation.  The last column defines the translation.  The bottom row isn't used.  What's shown below is an identity matrix.  The x-axis is in the X direction (1,0,0) , the y-axis in the Y direction (0,1,0) and the z-axis in the Z direction (0,0,1) and there is no translation defined so it lies at the model origin.

 

Matrix.png

 

Here's a simle of example that defines a 45 degree rotation about the Z axis and a translation of (5,10,0). The axes should all be unit vectors and they should also be 90 degrees to each other.

Matrix2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You can also read more about transformation matrices here: https://en.wikipedia.org/wiki/Transformation_matrix

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 3 of 6

Anonymous
Not applicable
Thanks 🙂
0 Likes
Message 4 of 6

Anonymous
Not applicable

Google helped me to land on this page as I had no clue what matrix3d was or how to understand what was happening. 

 

The response from Brian gave me a nudge in the right direction but my ignorance was too great for me to appreciate what he was saying.

 

I continued with the googles and finally landed here:

 

https://www.youtube.com/watch?v=0rEz9-6trHw

 

It's a very basic explanation of rotation matrices outside of a Fusion 360 context. 

 

The lady speaks slowly and carefully. By the end of the 13 minutes I'd learned a huge amount.

0 Likes
Message 5 of 6

markSJVQS
Participant
Participant

I'm trying to do a shear transformation.

 

No matter what values I put in the 4x4 Matrix3D, the resulting transformation seems only to do rotations and translations.

 

How can I achieve a shear (skew) transformation of a BRrepBody with the API?

0 Likes
Message 6 of 6

BrianEkins
Mentor
Mentor

You can't. Fusion only supports translation, rotation, and uniform scaling of bodies. Other transforms will either be ignored or fail when you try to use them.

 

I think you should be able to apply any kind of transform you want to custom graphics though.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com