ManualArrangeGuillotineIsValidPositionForAPiece

 

 

Name

 

            ManualArrangeGuillotineIsValidPositionForAPiece

 

When to use it

 

            When the optimization process is NOT running.

            NOT during the OnFinish or OnAfterManualArrange event.

            After all other information has been set.

 

Prototype

 

    HRESULT ManualArrangeGuillotineIsValidPositionForAPiece(

            TopX: long /*[in]*/,

            TopY: long /*[in]*/,

            BottomX: long /*[in]*/,

            BottomY: long /*[in]*/,

            CutType: long /*[in]*/,

            Allow: long /*[out]*/

    );

 

Explanations

 

            Checks if a given position is valid for inserting a piece.

 

Parameters

 

            TopX, TopY, BottomX, BottomY - the coordinates of the extremities of the piece. These coordinates will be adjusted by the component in order to have a valid guillotine layout. This means that the piece will be moved (if necessarily) to the left and top until some existing cuttings (or the margin of the sheet) will be reached.

            CutType - 0 = best cut (the shortest one); 1 = Left Right first and then Top-Bottom; 2 = Top-Bottom first and then Left-Right

            Allow - returns 1 if the position is a good one. Otherwise returns 0.

 

See Also

 

        How to arrange pieces manually, ManualArrangeGuillotineAddPiece.