SetStockHole

Name

 

            SetStockHole

 

When to use it

 

            After setting the NumberOfStockPieces property, the SetStock method and anytime before the OnFinish event ends.

 

Prototype

 

SetStockHole(

            IndexStock: long/*[in]*/,

            IndexHole: long/*[in]*/,

            Type: long/*[in]*/,

            NumberOfVertices: long/*[in]*/,

            CenterX: double/*[in]*/,

            CenterY: double/*[in]*/,

            Radius : double/*[in]*/,

            TrimMargin: double/*[in]*/,

            UserDefinedData: long/*[in]*/

);

 

Explanation

 

            With this method you may set the information of the holes of a sheet from Stock.

            The dimensions of each hole can be get using the GetStockHole method.

 

Parameters

 

            IndexStock - the index of the piece whose information are set. This number is in range [0...NumberOfStockPieces - 1].

            IndexHole - the index of the hole whose information are set.

            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 using the SetStockHoleVertex method.

            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).

            TrimMargin: margin of hole that must be avoided due to faults - not implemented yet.

            UserDefinedData- an user defined value which can help you to track down the hole during the OnFinish event. This value will be returned by the GetStockHole method.

 

Next to call

 

            SetStockHoleVertex, SetStockHoleArc.

 

See also

 

            GetStockHole, NumberOfStockPieces, SetStock, GetStock, SetStockHoleVertex.