Description This command specifies a grating surface not to add additional OPL to rays due to grating interaction. If the surface does not have a grating applied, the subroutine will halt with an error.
Syntax SetDiffractNoPhasePerLine gSurfNode
Parameters gSurfNode As Long Node number of the grating surface.
Example The following example queries a grating surface to see if the phase option "none" is toggled and sets this option if it is not already specified.
Sub Main
'Surface node with the grating Dim gSurf As Long gSurf = FindFullName( "Geometry.Plane.Surface" )
'Check if the grating surface uses the No Phase option. 'If not, set the grating to use this option If Not GetDiffractNoPhasePerLine( gSurf ) Then 'Specify the grating not to add additional OPL SetDiffractNoPhasePerLine( gSurf ) End If
End Sub
See Also Diffraction Grating Script Commands
|