# profile and extrusion

hello.
I have this problem:
I have a 2d profile, an extrusion direction a depth and a 3d transformation.
The 2d profile is extruded along the extrusion direction ,for a depth .
The 3d transformation rotates the 2d profile in the profile plane.
I would like to extract the angle of rotation of the 2d profile in the profile plane after the apply of the rotation matrix.
I trying this method:
1)save a point of the profile
2)apply the trasformation matrix on the point
3)get the transformed point
4)use a dot product for get with the acos function the angle after the transformation.
like:

``````
C3DVectorIfc pPoint = *(pProfile)[0];
pmxRes->m_X = C3DVectorIfc(1.0, 0.0, 0.0);
pmxRes->m_Y = C3DVectorIfc(0.0, cos(d), -sin(d));
pmxRes->m_Z = C3DVectorIfc(0.0, sin(d), cos(d));

C3DMatrixIfc pm = *pmxRes;
C3DVectorIfc pPointNew = (pm * pPoint);

pPointNew.Normalize();
pPoint.Normalize();
double dot=pPoint * pPointNew;
double dAngle = ACos(dot);

``````

the problem is that this don’t works.
for example:
1)pPoint = -162;-63.5;0.0
2)pPointNew= -162;0.0;-63.5
after the normalization
3)pPoint = -0.92;-0.38;0
4)pPoint = -0.92;0.0;-0.38
5)dot product: 0.85
6)double dAngle = acos(dot);