Interface Function
- Last UpdatedNov 27, 2023
- 2 minute read
A number of functions with predefined names and parameter list must exist in the script. These functions should never be changed regarding the input parameters and the result values.
|
getHoleName(HoleNo): |
||
|
The function returns the name of the hole from the list of holes. |
||
|
Input Parameters: |
||
|
HoleNo |
integer |
Index to hole list. |
|
Returned value: |
||
|
HoleList[HoleNo] |
string |
Hole name. |
|
getHoleSegment(SegNo): |
||
|
The function returns a hole segment from the hole contour. |
||
|
Input Parameters: |
||
|
Segno |
integer |
Hole segment number. |
|
Returned value: |
||
|
HoleData[SegNo] |
reals |
Segment part R,U,V. |
|
setHoleContour(HoleName, NPar, Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8): |
||
|
The function creates a customer defined hole by creating hole segments to the HoleData list. The function should define a hole contour in the UV co-ordinate system whose origin will be the reference point of the hole. Up to 8 number of hole parameters are allowed. The breakpoints of the hole contour should be defined as a number of segments (R, U, V), where R is equal to 0.0 for a line segment, positive for a counterclock radius and negative for a clockwise radius. The hole code should be implemented with an exception handling mechanism so that a failure to run the code will always be signalled by the return code. |
||
|
Input Parameters: |
||
|
Holename |
string |
The name of the customer hole. |
|
Npar |
real |
Number of parameters. |
|
Par1 |
real |
Hole parameter 1. |
|
Par2 |
real |
Hole parameter 2. |
|
Par3 |
real |
Hole parameter 3. |
|
Par4 |
real |
Hole parameter 4. |
|
Par5 |
real |
Hole parameter 5. |
|
Par6 |
real |
Hole parameter 6. |
|
Par7 |
real |
Hole parameter 7. |
|
Par8 |
real |
Hole parameter 8. |
|
Returned value: |
||
|
HoleRes |
integer |
Result code. The predefined values should be used. 0 OK 1 Unrecognized hole type 2 Wrong number of parameters 3 Unreasonable parameter values 4 Hole geometry could not be generated |