sgCObject* sgKinematic::Spiral(const sgC2DObject& outContour, const sgC2DObject** holes, int holes_count, const SG_POINT& axePnt1, const SG_POINT& axePnt2, double screw_step, double screw_height, short meridians_count, bool isClose)

Description:

Creates a spiral solid or a surface of the specified clip with the specified number of holes and spiral parameters.

Arguments:

outContour - outer contour. Must be flat (checked by the IsPlane function), closed (checked by the IsClosed function) and not self-intersecting (checked by the IsSelfIntersecting function).

holes - array of holes. The holes must be flat (checked by the IsPlane function), closed (checked by the IsClosed function) and not self-intersecting (checked by the IsSelfIntersecting function). The holes must lie on the same plane as the outer contour (checked by the IsObjectsOnOnePlane function) and strictly inside it (checked by the IsFirstObjectInsideSeconfObject function). The holes must not be intersecting (checked by the IsObjectsIntersecting function) neither can they be inside each other (checked by the IsFirstObjectInsideSeconfObject function). If the argument is NULL the object is created withour holes.

holes_count - the number of holes in the holes array.

axePnt1 - first point on the spiral axis. Must lie on the outer contour plane.

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

screw_step - spiral step length.

screw_height - spiral length

meridians_count - the number of meridians in a circle of one spiral step

isClose - whether to close to a solid. The argument is ignored if the outer contour isn't closed.

Returned value:

Returns the pointer to a newly created object. If the function fails NULL is returned.

Note:

The programmer should check whether the rotation axis and the outer contour are intersecting. The object will be created even if the axis and the 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 surface EXAMPLE of solid