GetUtilizedDemandPiece

 

 

Name

 

            GetUtilizedDemandPiece

 

When to use it

 

            During the OnFinish event.

 

Prototype

 

            HRESULT GetUtilizedDemandPiece(

                        BarIndex : Long/*[in]*/,

                        PieceIndex : Long/*[in]*/,

                        RepositoryIndex : Long/*[out]*/,

                        DemandIndex: Long/*[out]*/,

                        OxRotated: Long/*[out]*/,

                        OyRotated: Long/*[out]*/,

                        OzRotated: Long/*[out]*/,

                        RepositoryExternalID: Long /*[out]*/,

                        DemandExternalID: Long /*[out]*/

            );

 

Explanations

 

            Specify the order in which the pieces must be cut in a specific layout.

 

            The order is very important when the angles are different from 90 degrees.

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

 

Parameters

           

            BarIndex - the index of the bar from REPOSITORY whose information are extracted. This number is in range [0...TotalNumberOfUtilizedRepositoryPieces - 1].

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

            RepositoryIndex - the index of the bar for which the information are extracted. This number is in range [0...NumberOfRepositoryPieces - 1].

            DemandIndex - is the index of the current utilized piece in the array of the DEMAND pieces given as input. Using this field you may easily locate the current utilized piece in the input array.

            OxRotated - specify whether piece has been rotated with 180 degrees around the Ox axis in order to match the angle of the previous cut piece. This parameter will return 1 if the piece has to be rotated and 0 otherwise.

            OyRotated - specify whether piece has been rotated with 180 degrees around the Oy axis in order to match the angle of the previous cut piece. This parameter will return 1 if the piece has to be rotated and 0 otherwise.

            OzRotated - specify whether piece has been rotated with 180 degrees around the Oz axis in order to match the angle of the previous cut piece. This parameter will return 1 if the piece has to be rotated and 0 otherwise.

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

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

 

See also

       

        OxRotationAllowed, OyRotationAllowed and OzRotationAllowed for more information on rotations.

 

 

Links

        back to index

        www.optimalprograms.com