How to arrange pieces manually
Optimization 2D X offers built-in support for manually arange the layouts after optimization process. This will help you to modify the results for further improving them. By using the methods and properties of the Optimization 2D X component you will be able to implement the manual arrange feature in your application by writing very few lines of code.
Because after OnFinish event all information about the current layout (pieces positions, waste rectangles, cuttings) is lost you have to resend them to the component.
First step is to set the optimization type for the current layout by setting the ManualArrangeOptimizationType property. This will basically tell the component what kind of cuttings will be performed (Guillotine, Nested or Multi-Stages).
Second step is to set all the information that you have about the current state of the layout (obtained during the OnFinish event). Also the parameters for optimization must be set (Length, Width (of the sheet to be arranged), BladeWidth, MaximalCutLength, MinimalWidthBreakage ). Length and Width are sent to the component by calling SetRepositoryPiece and by sending only 1 (one) sheet to the component.
Specifically, the following methods and properties must be used to set all the information that you have about the current layout (which will be further modified manually):
ManualArrangeNumberOfWasteRectangles
ManualArrangeSetWasteRectangle
After setting all information you may use the following methods for modifying the layout.
ManualArrangeGuillotineIsValidPositionForAPiece
ManualArrangeGuillotineAddPiece
ManualArrangeGuillotineMovePiece
ManualArrangeIsValidSwitchCutOrientation
ManualArrangeSwitchCutOrientation
After calling one of the previously described methods the OnAfterManualArrange event is raised. During this event the user may extract the result of manual arrange.
Methods and properties used for extracting the information about the outcome of manual arrange.
The following methods and properties can be used for extracting the information about the outcome of the manual arrange operations. Most of (but not all of them) properties / methods used during the OnFinish event can also be used here. After a manual arrange operation the OnAfterManualArrange event is raised. There all information about the newly obtained layout can be accessed.
PROPERTIES
METHODS
Remark
DemandPieceUtilized method cannot be used for extracting the information about manual arrange.
Currently the manual arrange is implemented for guillotine only. Manual arrange for multi-stages and non-guillotine (nested) cuttings will be implemented soon.
Manual arrange does not work with sheets with holes.