Navigation: Scripting Reference Manual > Functions & Subroutines > GetAsphereOddCoef

 

GetAsphereOddCoef

 

Contact Us: fredsupport@photonengr.com

 

Description

This function retrieves an odd order aspheric coefficient from a surface.

 

Syntax

coef = GetAsphereOddCoef ( n, idx )

 

Parameters

coef (Double)

Retrieved value of the odd order aspheric coefficient.

 

n As Long

Node number of the aspheric surface being queried.

 

idx As Long

The array index of the odd coefficient to be retrieved.  The coefficient index will be (n-1)/2, where n is the order of the coefficient.

 

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

GetAsphere

SetAsphere 

GetAsphereEvenCount

GetAsphereOddCount

GetAsphereEvenCoef

SetAsphereEvenCoef

SetAsphereOddCoef

 

 

 

 

 

 

Copyright © Photon Engineering, LLC