Navigation: Scripting Reference Manual > Data Structures > T_SOURCEDIRLASERDIODE

 

T_SOURCEDIRLASERDIODE

 

Contact Us: fredsupport@photonengr.com

 

Description

Data structure whose members specify the Laser Diode Beam ray direction type.

 

Definition

T_SOURCEDIRLASERDIODE

angleType As String

focusX As Double

focusY As Double

numX As Long

numY As Long

semiAngX As Double

semiAngY As Double

 

Members

angleType

Specifies the meaning of semiAngX and semiAngY.  Valid entries are:

"Full width at half power"

"Half width at half power"

"Full width at 1/e amplitude point"

"Half width at 1/e amplitude point"

"Full width at 1/e^2 power point"

"Half width at 1/e^2 power point"

"Full width at 1% power point"

"Half width at 1% power point"

"Variance power full width (second moment)"

"Variance power half width (second moment)"

 

focusX

Axial offset of the X focus from the source position.

 

focusY

Axial offset of the Y focus from the source position.

 

numX

Number of sample points along the X direction of the beam.  Recommended power of 2 between 4 and 2048 (inclusive).

 

numY

Number of sample points along the Y direction of the beam.  Recommended power of 2 between 4 and 2048 (inclusive).

 

semiAngX

Half angle of the beam divergence in the X direction whose interpretation is specified by member angleType.  Values between 0 and 90 in degrees.

 

semiAngY

Half angle of the beam divergence in the Y direction whose interpretation is specified by member angleType.  Values between 0 and 90 in degrees.

 

 

Example

The following script demonstrates how to query, retrieve and modify the Laser Diode Beam ray direction specification of a source node.

 

Sub Main

 

          Dim ld As T_SOURCEDIRLASERDIODE

          Dim srcNode As Long

          Dim success As Boolean

 

          'Source node being queried

          srcNode = FindFullName( "Optical Sources.LaserDiodeSource" )

 

          'Does the source node have laser diode beam ray directions?

          If IsSourceDirLaserDiode( srcNode ) Then

 

                    'Retrieve the source's laser diode direction specifications

                    success = GetSourceDirLaserDiode( srcNode, ld )

                    Print "Current Laser Diode Parameters: "

                    Print Chr(9) & "Angle Type: " & Chr(9) & ld.angleType

                    Print Chr(9) & "X Focus: " & Chr(9) & ld.focusX

                    Print Chr(9) & "Y Focus: " & Chr(9) & ld.focusY

                    Print Chr(9) & "X Samples: " & Chr(9) & ld.numX

                    Print Chr(9) & "Y Samples: " & Chr(9) & ld.numY

                    Print Chr(9) & "X Semi Ang: " & Chr(9) & ld.semiAngX

                    Print Chr(9) & "Y Semi Ang: " & Chr(9) & ld.semiAngY

 

                    'Set the default ray directions back to the source

                    InitSourceDirLaserDiode ld

                    SetSourceDirLaserDiode srcNode, ld

                    Print "Source reset to default laser diode ray directions."

 

          End If

 

End Sub

 

 

See Also

IsSourceDirLaserDiode

SetSourceDirLaserDiode

GetSourceDirLaserDiode

InitSourceDirLaserDiode

 

 

 

 

 

Copyright © Photon Engineering, LLC