Orientation of Сurves of a Swept Body

The function

MbResultType EvolutionNormalize( const MbSurface &          surface,
                                 const RPArray<MbContour> & contours,
                                 const MbCurve3D &          guide,
                                 const EvolutionValues &    parameters,
                                       MbAxis3D &           axis,
                                       double &             angle,
                                       VERSION              version,
                                       MbMatrix3D *         matrix = nullptr );

determines the orientation of a generating contour and a guide curve for constructing a kinematic (evolution) body. It also computes a transformation matrix that moves the section to the nearest end of the guide curve.

The input parameters of the function are:

  • surface – the surface for a kinematic operation;

  • contours – the generatrix contours;

  • guide – the guide curve;

  • parameters – the operation parameters;

  • version – the operation version.

The output parameters of the function are:

  • axis – the rotation axis of the generatrix contour (the positive direction is defined by the right-hand rule with respect to axis);

  • angle – the rotation angle of the generatrix contour;

  • matrix – a pointer to the transformation matrix of the section to the nearest end of the guide curve (if the pointer is equal to nullptr, the matrix is not computed).

If the function succeeds, it returns rt_Success; otherwise, it returns a result code from the MbResultType enumeration (see mb_operation_result.h).

The function is an auxiliary one for the EvolutionSolid() and EvolutionResult() functions.