# extrusion and rotation matrixes

This topic is 2528 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hello.
I'm creating an ifc importer(the specific are at : http://buildingsmart.../html/index.htm).
I have this problem:
I must extrude a beam, and i have the start point , the extrude direction and two rotation matrix ,
one for the beam position and one for the extrude position.
these are the matrixes:

position matrix:
0,0,1
0,1,0
1,0,0

extrude position
1,0,0
0,-1,0
0,0,1

I concatenated the two rotation matrixes and...
 C3DMatrixIfc* pmx = m_pPositionAndAxis->GetRotationMatix(); C3DMatrixIfc* pmxExtrude = m_pExtrudePositionsAndAxis->GetRotationMatix(); *pmx = (*pmx) * (*pmxExtrude); *m_vDirExtrusion = (*pmx) * *m_vDirExtrusion; C3DVectorIfc start = StartPoint ; EndPoint = start *m_vDirExtrusion * m_dDepth ; 

this gives correct results , but i not understand ,why if i multiply for the rotation matrix only
the direction extrusion i get correct results(the beam is extruded correctly)
why if i multiply the EndPoint and StartPoint and mantaining the extrusion direction
after the extrusion i get wrong results?

is possible that when i multiply the extrusion direction
*pmx = (*pmx) * (*pmxExtrude);
*m_vDirExtrusion = (*pmx) * *m_vDirExtrusion;
*m_vDirExtrusion = (*pmx) * *m_vDirExtrusion;
is like multiply all for the matrix(*pmx) , because if i substitute the formula is

EndPoint = start *m_vDirExtrusion * m_dDepth ;

EndPoint = start *m_vDirExtrusion * (*pmx) * m_dDepth ;

I not understand!

Thanks.

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633768
• Total Posts
3013745
×