SetStock
Name
SetStock
When to use it
After setting the NumberOfStockPieces property and anytime before the OnFinish event ends.
Prototype
SetStock(
Index: long/*[in]*/,
Type: long/*[in]*/,
NumberOfVertices: long/*[in]*/,
CenterX: double/*[in]*/,
CenterY: double/*[in]*/,
Radius : double/*[in]*/,
NumberOfHoles: long/*[in]*/,
TrimMargin: double/*[in]*/,
Priority: long/*[in]*/,
UserDefinedData: long /*[in]*/
);
Explanation
With this method you may set the information about of each sheet from Stock.
The number of stock pieces to be cut is given by the NumberOfStockPieces property.
The dimensions of each piece can be get using the GetStock method.
Parameters
Index - the index of the piece whose information are set. This number is in range [0...NumberOfStockPieces - 1].
Type: 0 for polygons and 1 for circles.
NumberOfVertices - number of vertices of the polygon. The vertices must be given in the counter-clock way.
CenterX, CenterY: center of the circle (has meaning only if Type is 1).
Radius : radius of the circle (has meaning only if Type is 1).
NumberOfHoles: number of holes.
TrimMargin: margin of sheet that must be avoided due to faults - not implemented yet.
Priority - The priority for cutting a piece. 0 is the highest priority. Pieces with a higher priority are nested before pieces with a lower priority.
UserDefinedData- an user defined value which can help you to track down the piece during the OnFinish event. This value will be returned by the GetStock and GetUtilizedStock methods.
Next to call
SetStockVertex, SetStockArc, SetStockHole, SetStockHoleVertex, SetStockHoleArc.
See also