DemandPieceUtilized

 

 

Name

 

            DemandPieceUtilized

 

When to use it

 

            During the OnFinish event.

 

Prototype

 

            HRESULT  DemandPieceUtilized(

                        Index: Long/*[in]*/,

                        BarIndex: Long/*[out]*/,

                        DemandExternalID: Long /*[out]*/,

                        RepositoryIndex: Long /*[out]*/,

                        RepositoryExternalID: Long /*[out]*/

            );

 

Explanations

 

            Specify whether a given DEMAND piece is utilized in one of the exiting layouts.

 

Parameters

 

            Index is the index of a piece from the Demand. Index is between 0 and the NumberOfDemandPieces - 1.

            The parameter BarIndex will be set to the layout index where that piece is used. BarIndex is between 0 and TotalNumberOfUtilizedRepositoryPieces - 1. If the piece is not utilized at all the BarIndex is set to -1.

            DemandExternalID is the external ID of the demand piece whose input index is Index. External ID is an integer number which was assigned to each piece in order to be easier identified.

            RepositoryIndex is the index of current bar (BarIndex) as it was set by the SetRepositoryPiece method. RepositoryIndex is between 0 and NumberOfRepositoryPieces - 1.

            RepositoryExternalID is the external ID of the repository piece whose input index is BarIndex. External ID is an integer number which was assigned to each piece in order to be easier identified.

 

Remarks

 

            Not all pieces are utilized. This is because the total length of the pieces to be cut is greater than the length of the piece to be cut from.

            In some cases only the result provided by this method in not enough. The order in which the pieces are cut is also very important when the angles are different from 90 degrees. Use the GetUtilizedDemandPiece method for obtaining the order of pieces to be cut.

            If all angles have 90 degrees the order is not important and the method DemandPieceUtilized is enough for obtain the result.

 

 

Links

        back to index

        www.optimalprograms.com