Navigation: Scripting Reference Manual > Functions & Subroutines > ModuleSphereSurfGet

 

ModuleSphereSurfGet

 

Contact Us: fredsupport@photonengr.com

 

Description

Retrieves information from a spherical lens module surface type.

 

 

Syntax

ModuleSphereSurfGet LMNode, ent, rad

 

 

Parameters

LMNode As Long

Node number of the spherical surface lens module being queried.

 

ent As T_ENTITY

Returned data structure populated with generic information about the surface (name, description, traceable, etc.).

 

rad As Double

Returned radius of curvature of the spherical surface.

 

 

Example

The following example demonstrates how to create, modify and retrieve information from a spherical lens module surface.

 

Sub Main

 

          Dim ent As T_ENTITY

          Dim CENode As Long, LMSpherical As Long

          Dim rad As Double

 

          'Add a custom element to store the LM surface

          ent.name = "Spherical LM"

          ent.Description = "Lens module representing a spherical surface"

          ent.parent = 2 'geometry

          ent.axesDrawable = False

          ent.limitsDrawable = False

          ent.traceable = True

          ent.neverTraceable = False

          CENode = AddCustomElement( ent )

 

          'Add a spherical lens module surface type

          ent.name = "Surf 1"

          ent.Description = ""

          ent.parent = CENode

          LMSpherical = ModuleSphereSurfAdd( ent, 5 )

          Print "Spherical LM added:"

          Print Chr(9) & "Node number: " & LMSpherical

 

          'Update the document

          Update

 

          'Modify spherical lens module radius and retrieve information

          ModuleSphereSurfSet LMSpherical, ent, 20

          ModuleSphereSurfGet LMSpherical, ent, rad

          Print Chr(9) & "New radius: " & rad

 

End Sub

 

 

See Also

ModulePerfLensAfocalAdd

ModulePerfLensAfocalGet

ModulePerfLensAfocalSet

ModulePerfLensFiniteAdd

ModulePerfLensFiniteGet

ModulePerfLensFiniteSet

ModulePerfLensInfiniteAdd

ModulePerfLensInfiniteGet

ModulePerfLensInfiniteSet

ModuleSphereSurfAdd

ModuleSphereSurfSet

 

 

 

 

 

Copyright © Photon Engineering, LLC