ManualArrangeGuillotineMovePiece
Name
ManualArrangeGuillotineMovePiece
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 ManualArrangeGuillotineMovePiece(
Index: long /*[in]*/,
TopX: long /*[in]*/,
TopY: long /*[in]*/,
BottomX: long /*[in]*/,
BottomY: long /*[in]*/,
Rotated: long/*[in]*/,
CutType: long /*[in]*/,
AllowMove: long /*[out]*/
);
Explanations
Manually moves a piece on the existing layout.
Parameters
IndexOfPiece - the index of the piece about to be moved. This value is between 0 and NumberOfUtilizedPieces - 1. Initially NumberOfUtilizedPieces is equal to ManualArrangeNumberOfPieces.
TopX, TopY, BottomX, BottomY - the coordinates of the extremities of the piece. These coodinates will be adjusted by the component in order to have a valid guillotine layout. This means that the piece will be moved (if necesarly) to the left and top until some existing cuttings (or the margin of the sheet) will be reached.
Rotated - if this piece comes from a previous optimization you should set the rotation status here. Otherwise the Rotated parameter can be set to 0.
CutType - 0 = best cut; 1 = Left Right first and then Top-Bottom; 2 = Top-Bottom first and then Left-Right.
AllowCut- specify whether the piece can be moved (value 1) or not (value 0) in the new position.
Remark
The parameter CutType is not taken into account in the case of 2-stages quillotine cuts.
See Also
How to arrange pieces manually, ManualArrangeRemovePiece, ManualArrangeGuillotineAddPiece, OnAfterManualArrange.