Description Returns the number of odd order aspheric coefficients for a specific aspheric surface. If there are no odd order coefficients, or if the identifier does not represent an asphere, the function returns a value of -1.
Syntax num = GetAsphereOddCount ( n )
Parameters num (Long) Returned number of odd order aspheric coefficients. If the surface has no odd-order coefficients or is not an asphere, the value of this variable will be -1.
n As Long Node number of the surface being queried.
Example The following script retrieves the value of the 5th order coefficient from a General Asphere type surface and prints it to the output window.
Sub Main
Dim sNode As Long sNode = FindFullName( "Geometry.Aspherics.General Asphere" )
If GetAsphereOddCount( sNode ) < 0 Then
Print "Surface has no odd-order coefficients."
Else
Dim idx As Long idx = 2
Dim cVal As Double cVal = GetAsphereOddCoef( sNode, idx ) Print "Coefficient " & 2*idx+1 & " has value " & cVal
End If
End Sub
See Also
|