A matrix to rotate an object
 When you insert a part in an assembly you can specify the initial position and rotation. You do this by providing a matrix to the AddiPartMember call. Here is an example of how to create a matrix which will rotate the part around the Z axis by 180 degrees:      CComPtr pTransGeom = GetTransGeomPtr () ;       CComPtr pPosMatrix;    pTransGeom->CreateMatrix(&pPosMatrix); // Defaults to origin      CComPtr pZAxis = nullptr ;    pTransGeom->CreateVector (0,0,1,&pZAxis);      CComPtr pOrigin = nullptr ;    pTransGeom->CreatePoint (0,0,0,&pOrigin);      pPosMatrix->SetToRotation (TwoPi,pZAxis,pOrigin) ;   ...and when you call AddiPartMember you use the matrix like this:      pOccurrencesList->AddiPartMember (bstrFileName,pPosMatrix,_variant_t(bstrMemberName),&pOccurrence) ;   Note that SetToRotation requires radians, not degrees.   These two diagrams show the result of using a X-Axis rotation matrix when calling AddiPartMember:  Here is a code fragment which creates the matrix which does that:          CComPtr pRotXMatrix;        pTransGeom->CreateMatrix(&pRotXMatrix);        CComPtr pXAxis = nullptr ;        pTransGeom->CreateVector (0,1,0,&pXAxis);        pRotXMatrix->SetToRotation (gkPi,pXAxis,pOrigin) ;   If you are using two planes in a constraint you can also sometimes use FlipNormal to rotate the inserted object 180°