GetPart

Name

 

            GetPart

 

When to use it

 

            After setting the sizes using the SetPart method and before the OnFinish event ends.

 

Prototype

 

GetPart(

            IndexPiece : long /*[in]*/,

            Type: long/*[out]*/,

            NumberOfVertices: long/*[out]*/,

            CenterX: double/*[out]*/,

            CenterY: double/*[out]*/,

            Radius : double/*[out]*/,

            NumberOfHoles: long/*[out]*/,

            RotationStep: double/*[out]*/,

            RotationCenterX: double/*[out]*/,

            RotationCenterY: double/*[out]*/,

            AllowMirroring: long/*[out]*/,

            Priority: long /*[out]*/,

            UserDefinedData: long /*[out]*/

);

 

Explanations

 

            With this method you may get the information about each piece to be cut. Each piece is represented as a polygon or as a circle.

            The number of pieces to be cut is given by the NumberOfParts property.

            The information for each piece can be set using the SetPart method.

 

Parameters

 

            IndexPiece - the index of the piece whose information are extracted. This number is in range [0...NumberOfParts - 1].

            Type: 0 for polygons and 1 for circles.

            NumberOfVertices - number of vertices of the polygon. The vertices must be given in the counter-clock way.

            CenterX, CenterY: center of the circle.

            Radius : radius of the circle.

            NumberOfHoles: number of holes of that part.

            RotationStep - The step with which the piece may be rotated for a better fit. Smaller steps are better but it can take a longer time. Angle is given in degrees.

            RotationCenterX, RotationCenterY - the rotation point around which the rotation is made. This parameter is ignored if RotationType is greater than 0.

            AllowMirroring - specify if the piece can be rotated on a different face (1 if yes, 0 if not). Mirroring is performed by using Oy as reference (that is x = 10 becomes x = -10).

            Priority - The priority for cutting a piece. 0 is the highest priority. Pieces with a higher priority are nested before pieces with a lower priority.

            UserDefinedData- an user defined value which was set by SetPart method.

 

See Also

 

            SetPart, NumberOfParts, RotationCenter, GetPartHole, SetPartHole.