SetDemandPiece


Name

            SetDemandPiece

When to use it

            After setting the NumberOfDemandPieces property and anytime before the starting the optimization.

Prototype

HRESULT SetDemandPiece(

            Index: long /*[in]*/,

            Length: long /*[in]*/,

            Width: long /*[in]*/,

            CanRotate: long /*[in]*/,

            ExternalID: long /*[in]*/,

            Priority: long/*[in]*/,

);

Explanations

            With this method you may set the dimensions of each piece to be cut.

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

            The dimensions of each piece can be get using the GetDemandPiece method.

Parameters

            Index - the index of the piece whose information are set. This number is in range [0...NumberOfDemandPieces - 1].

            Length - the length of the piece. This number must be integer, greater than 0. For working with real numbers read here.

            Width - the width of the piece. This number must be integer, greater than 0. For working with real numbers read here.

            CanRotate - specify if the piece can be rotated or not (1 if yes, 0 if not). See grain direction for more details.

            ExternalID - an user defined value which can help you to track down the piece during the OnFinish event. This value will be returned by the GetDemandPiece and GetUtilizedDemandPiece methods.

            Priority - priority for cutting a piece. Lower values means higher priority. 0 is the highest priority. Pieces with higher priority will be cut before pieces with lower priority. This feature is under development.

See Also:

            NumberOfDemandPieces, GetDemandPiece, Working with real numbers, Grain direction.



Links

       back to index

       www.optimalprograms.com