sgCObject* sgKinematic::Rotation(const sgC2DObject& rotObj, const SG_POINT& axePnt1, const SG_POINT& axePnt2, double angl_degree, bool isClose, short meridians_count=24)

Description:

Creates a revolved solid or a surface by rotating the specified contour about an axis.

Arguments:

rotObj - rotated contour. Must be flat and not self-intersecting.

axePnt1 - first point on the rotation axis. Must lie on the rotated contour plane.

axePnt2 - second point on the rotation axis. Must lie on the rotated contour plane. If the rotated contour is linear the rotation axis line must not coincide with the contour line

angle_degree - the axis rotation angle (in degrees). Must not be equal to zero. The clockwise angle direction from axePnt1 to axePnt2 is positive. If the angle is less than -360 degrees, it is nevertheless -360, if more than 360 - is equal to 360.

isClose - whether to close to a solid. The argument is ignored if the rotated contour is not closed.

meridians_count - the number of meridians

Returned value:

Returns the pointer to a newly created object. If the function fails (the arguments don't meet the requirment) NULL is returned.

Note:

The programmer should check whether the rotation axis and the rotated contour are intersecting. The object will be created even if the rotation axis and the rotated contour are intersecting but it will be self-intersecting, and in this case errors may occur when performing Boolean operations with this object. The function for correcting self-intersections of solids is planned in the next library version.

See also:

EXAMPLE of revolved surface EXAMPLE of revolved solid