Message 1 of 9
Help understanding the rotation vector

Not applicable
04-30-2008
05:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm having a problem inserting a steel section in to an assembly. The part is called by the script and inserted using the following:
Call oMatrix.SetToRotation(3.14159265358979 / 2, _
noticeable(0, 1, 0), oTG.CreatePoint(0, 0, 0))
Call oMatrix.SetTranslation(oTG.CreateVector(0, 0, 0))
Set oOcc = oAsmCompDef.Occurrences.Add(CHANNELFILENAME, oMatrix)
My problem is this createvector(0,1,0) does not give me the desired orientation of the steel. It is not symetric in its geometry. I have tried 1,0,0 and 0,0,1 and 0,0,0. I can rotate any of these orientations about the axis by adjusting the pi/2 part in SetRoatationTo. I can't get the part to face the right way though. No matter what! Am i missing something here? It seems I almost need to use another transfomation but if I add one after the original, then it just inserts the part at the last transformation in my code and disregards the first. My question, i guess, is really, how can i perform multiple rotation transformation on a part as it is inserted in to the assembly. Else, how do i write the transformation matrix for one transformation to achieve the rotation I desire?
Kind regards
Matt
I'm having a problem inserting a steel section in to an assembly. The part is called by the script and inserted using the following:
Call oMatrix.SetToRotation(3.14159265358979 / 2, _
noticeable(0, 1, 0), oTG.CreatePoint(0, 0, 0))
Call oMatrix.SetTranslation(oTG.CreateVector(0, 0, 0))
Set oOcc = oAsmCompDef.Occurrences.Add(CHANNELFILENAME, oMatrix)
My problem is this createvector(0,1,0) does not give me the desired orientation of the steel. It is not symetric in its geometry. I have tried 1,0,0 and 0,0,1 and 0,0,0. I can rotate any of these orientations about the axis by adjusting the pi/2 part in SetRoatationTo. I can't get the part to face the right way though. No matter what! Am i missing something here? It seems I almost need to use another transfomation but if I add one after the original, then it just inserts the part at the last transformation in my code and disregards the first. My question, i guess, is really, how can i perform multiple rotation transformation on a part as it is inserted in to the assembly. Else, how do i write the transformation matrix for one transformation to achieve the rotation I desire?
Kind regards
Matt