Hi all !
I'm a beginner to IFC files and transformation matrices and wondered I could extract rotation / scale and position from a transformation matrix using python.
I'm using ifcopenshell and shape.transformation.matrix.data gives me this :
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 8.382999999999972, -17.5915, 0.0)
So, now from this tuple I know that the matrix is supposedly mapped like this :
matrix([[ -1. , 0. , 0. , 8.383 ],
[ 0. , -1. , 0. , -17.5915],
[ 0. , 0. , 1. , 0. ],
[ 0. , 0. , 0. , 1. ]])
But I don't know how to obtain this matrix and how to extract the data I want from it. I'm supposed to get :
rotation (x,y,z) : 0, 0, 180
scale : 1, 1, 1
location ; 8.3, -17.5, 0
So any idea on how to do it using ifcopenshell and python ?
Thanks!