SETSURFACEPROPERTY, SURP

Sets properties of surfaces.

Syntax:

SETSURFACEPROPERTY surface, code, value1, value2
SURP surface, code, value1, value2
 

Discussion:

Surface is an expression that evaluates to an integer specifying the surface number. The code may either be an expression that evaluates to an integer or a mnemonic which specifies what property of the surface is being modified. The third and fourth arguments are the new values for the specified property, and they may be either text in quotes, a string variable, or a numeric expression, depending upon the code. For most codes, the property value being modified is defined by the value1 argument. A few operands require both a value1 and a value2, as described in the table below.

If the property being modified is under control of the Multi-Configuration Editor, then the multi-configuration data for the current configuration only will also be modified to reflect the changed property.

To set a surface as the stop surface, see "STOPSURF".

SURP is a shorthand for SETSURFACEPROPERTY and is functionally identical.

Code Property
Basic Surface Data. See "Lens Data.
0 or TYPE

Surface type. The value should be the name of the object, such as "STANDARD" for the standard surface. The names for each surface type are listed in the Prescription Report in the Surface Data Summary for each surface type currently in the Lens Data Editor.

See also "Surface names" summary table at the bottom of this page.

To change the surface type to a user defined surface, first set the DLL name using code 9 (SDLL), then set the new surface type to USERSURF.

See also Code 17.

1 or COMM Comment.
2 or CURV Curvature (not radius) in inverse lens units. Use zero for an infinite radius.
3 or THIC Thickness in lens units.
4 or GLAS Glass name. See also Code 18.
5 or CONI Conic constant.
6 or SDIA Clear semi-diameter or Semi-diameter. If the value is zero or positive, the clear semi-diameter or semi-diameter solve is set to "Fixed". If the value is negative, the clear semi-diameter or semi-diameter solve is set to "Automatic" and the clear semi-diameter or semi-diameter will be computed with the next UPDATE keyword.
7 or TCE Thermal coefficient of expansion.
8 or COAT Coating name. Use a blank string for value1 to remove the coating.
9 or SDLL User defined surface DLL name.
10 or PARM Parameter value. Value1 is the new value. Value2 is the parameter number.
11 or EDVA Extra Data value. Value1 is the new value. Value2 is the extra data number.
12 Surface color, Use 0 for default.
13 Surface opacity.
14 Row color.
15 Surface cannot be hyperhemispheric. Use 1 to avoid surface being hyperhemispheric.
16 Ignore surface. Use 1 to ignore surface, 0 to not ignore surface.
17 or CODE The integer code for the surface type. The integer code is an alternative to the surface name used by code 0. For full details see the documentation for code 0 above.
18 or GLAN Glass number. See also Code 4.
Surface aperture data. See "Surface properties aperture tab".
20 or ATYP Surface aperture type code.
21 or APP1 Surface aperture parameter 1.
22 or APP2 Surface aperture parameter 2.
23 or APDX Surface aperture decenter x.
24 or APDY Surface aperture decenter y.
25 or UDA User Defined Aperture (UDA) file name.
26 or APPU Surface aperture pick up from surface number. Use 0 for no pickup.
27 or CHZN Chip Zone of surface.
28 or MCSD Mechanical Semi-Diameter. If the value is zero or positive, the mechanical semi-diameter solve is set to "Fixed". If the value is negative, the mechanical semi-diameter solve is set to "Automatic" and it will be computed with the next UPDATE keyword.
Physical Optics Propagation Settings. See "Surface specific settings".
30 Physical Optics setting "Use Rays To Propagate To Next Surface". Use 1 for true, 0 for false.
31 Physical Optics setting "Do Not Rescale Beam Size Using Ray Data". Use 1 for true, 0 for false.
32 Physical Optics setting "Use Angular Spectrum Propagator". Use 1 for true, 0 for false.
33 Physical Optics setting "Draw ZBF On Shaded Model". Use 1 for true, 0 for false.
34 Physical Optics setting "Recompute Pilot Beam Parameters". Use 1 for true, 0 for false.
35 Physical Optics setting "Resample After Refraction". Use 1 for true, 0 for false.
36 Physical Optics setting "Auto Resample". Use 1 for true, 0 for false.
37 Physical Optics setting "New X Sampling". Use 1 for 32, 2 for 64, etc.
38 Physical Optics setting "New Y Sampling". Use 1 for 32, 2 for 64, etc.
39 Physical Optics setting "New X-Width". New total x direction width of array.
40 Physical Optics setting "New Y-Width". New total y direction width of array.
41 Physical Optics setting "Output Pilot Radius". Use 0 for best fit, 1 for shorter, 2 for longer, 3 for x, 4 for y, 5 for plane, 6 for user.
42, 43 Physical Optics setting "X-Radius" and "Y-Radius", respectively.
44 Physical Optics setting "Use X-axis Reference". Use 1 for true, 0 for false.
Coating Settings. See "Surface coating tab". See also code 8 above.
50 Use Layer Multipliers and Index Offsets. Use 1 for true, 0 for false.
51 Layer Multiplier value. Value1 is the new value. Value2 is the layer number.
52 Layer Multiplier status. Value 1 is the status, use 0 for fixed, 1 for variable, or n+1 for pickup from layer n. Value2 is the layer number.
53 Layer Index Offset value. Value1 is the new value. Value2 is the layer number.
54 Layer Index Offset status. Value 1 is the status, use 0 for fixed, 1 for variable, or n+1 for pickup from layer n. Value2 is the layer number.
55 Layer Extinction Offset value. Value1 is the new value. Value2 is the layer number.
56 Layer Extinction Offset status. Value 1 is the status, use 0 for fixed, 1 for variable, or n+1 for pickup from layer n. Value2 is the layer number.
Surface Tilt and Decenter Data. See "Surface tilt/decenter tab".
60 or BOR Before tilt and decenter order. Use 0 for dec/tilt, 1 for tilt/dec.
61 or BDX Before decenter x.
62 or BDY Before decenter y.
63 or BTX Before tilt about x.
64 or BTY Before tilt about y.
65 or BTZ Before tilt about z.
66 or APU After pick up status: 0 for explicit, 1/2 for pickup/reverse current surface, 3/4 for pickup/reverse current surface minus 1, 5/6 for pickup/reverse current surface minus 2, etc...
70 or AOR After tilt and decenter order. Use 0 for dec/tilt, 1 for tilt/dec.
71 or ADX After decenter x.
72 or ADY After decenter y.
73 or ATX After tilt about x.
74 or ATY After tilt about y.
75 or ATZ After tilt about z.
76

Coordinate Return status. Valid only on Coordinate Break surfaces. Use 0 for None, 1 for

Orientation Only, 2 for Orientation XY, and 3 for Orientation XYZ.

77 Coordinate Return To Surface. Valid only on Coordinate Break surfaces.
Surface scatter data. See "Surface properties scattering tab".
80 Sets the scatter code: 0 for none, 1 for Lambertian, 2 for Gaussian, 3 for ABg, 4 for DLL, 5 for BSDF, and 6 for ABg File.
81 Sets the scatter fraction, should be between 0.0 and 1.0.
82 Sets the Gaussian scatter sigma.
83 Sets the ABg file name.
84 Sets the name of the user defined scattering DLL. To set the parameters see Code 181.
85 Sets the name of the data file used by the user defined scattering DLL.
86 Sets the BSDF file name. The value should be the name of the BSDF file with no path (i.e. BrownVinyl.bsdf).
87

Sets the ABg File data file name. The value should be the name of the ABGF file with no path

(e.g. SampleABGF.abgf).

Surface draw data. See "Surface properties draw tab".
90 Sets the "Hide Rays To This Surface" checkbox status: 0 for off, 1 for on.
91 Sets the "Skip Rays To This Surface" checkbox status: 0 for off, 1 for on.
92 Sets the "Do Not Draw This Surface" checkbox status: 0 for off, 1 for on.
93 Sets the "Do Not Draw Edges From This Surface" checkbox status: 0 for off, 1 for on.
96 Sets the "Draw Edges As" status: 0 for squared, 1 for tapered, 2 for flat.
97 Sets "Mirror Substrate" status: 0 for none, 1 for flat, 2 for curved.
98 Sets the mirror substrate thickness value.
User defined surface scatter DLL parameters. See "Surface properties scattering tab".
181-186 Sets the user defined scatter DLL parameters 1-6.

Changes to surface properties usually require that a subsequent UPDATE (see "UPDATE") be performed to update pupil positions, solves, and other data required for correct ray tracing. The UPDATE is not performed automatically because it is faster to execute all SETSURFACEPROPERTY keywords and then execute just one UPDATE. The function SPRO uses a very similar syntax and identical code values to "get" rather than "set" these same values.

Example:

! Set the glass type on surface 7 to BK7
SETSURFACEPROPERTY 7, GLAS, "BK7"
! Set the thickness of surface 2 to the thickness of surface 1
SETSURFACEPROPERTY 2, THIC, THIC(1)
! Set the value of parameter 4 on surface 11 to 7.3
SURP 11, PARM, 7.3, 4
 
Surface Type Name
Standard STANDARD
Even Asphere EVENASPH
Odd Asphere ODDASPHE
Paraxial PARAXIAL
Paraxial XY PARAX_XY
Biconic BICONICX
Toroidal Grating TOROGRAT
Cubic Spline CUSPLINE
Hologram 1 HOLOGRM1
Hologram 2 HOLOGRM2
Coordinate Break COORDBRK
Polynomial POLYNOMI
Fresnel FRESNELS
ABCD ABCDSURF
Alternate Even ALTERNAT
Alternate Odd ALTERNAO
Diffraction Grating DGRATING
Conjugate CONJUGAT
Tilted TILTSURF
Irregular IRREGULA
Gradient 1 GRINSUR1
Gradient 2 GRINSUR2
Gradient 3 GRINSUR3
Gradient 4 GRINSUR4
Gradient 5 GRINSUR5
Gradient 6 GRINSUR6
Gradient 7 GRINSUR7
Gradium GRINSUR8
Gradient 9 GRINSUR9
Gradient 10 GRINSU10
Gradient 12 GRINSU12
Retro Reflect RETROREF
Toroidal TOROIDAL
Zernike Fringe Sag FZERNSAG
Zernike Fringe Phase FZERNPHA
Zernike Standard Sag SZERNSAG
Zernike Standard Phase SZERNPHA
Zernike Annular Phase AZERNPHA
Biconic Zernike BICONICZ
Extended Polynomial XPOLYNOM
Binary Optic 1 BINARY_1
Binary Optic 2 BINARY_2
Binary Optic 3 BINARY_3
Binary Optic 4 BINARY_4
Extended Cubic Spline XCUSPLIN
Extended Asphere XASPHERE
Extended Odd Asphere XOSPHERE
Variable Line Space Grating VARLSGRT
Elliptical Grating 1 ELLIGRAT
Elliptical Grating 2 ELLIGRA2
Superconic SUPERCON
Extended Fresnel XFRESNEL
Cylinder Fresnel CFRESNEL
Grid Sag GRID_SAG
Grid Phase GRID_PHA
Generalized Fresnel GEN_FRES
Periodic PERIODIC
Toroidal Hologram TOROHOLO
Atmospheric Refraction ATMOSPHR
Zone Plate ZONEPLAT
Q-Type Asphere QED_TYPE
Jones Matrix JONESMAT
Zernike Annular Standard Sag AZERNSAG
Chebyshev Polynomail CHEBYSHV
Black Box Lens BLACKBOX
Slide SLIDESRF
User defined USERSURF
Birefringent In BIRE__IN
Birefringent Out BIRE_OUT
Optically Fabricated Hologram OFABHOL1
Radial NURBS RADNURBS
Toroidal NURBS TORNURBS
Extended Toroidal Grating TOROGRAX
Radial Grating RGRATING
Odd Cosine ODDCOSIN
Non-Sequential Component NONSEQCO
Data DATASURF
Off-Axis Conic Freeform OFFAXISCF
Q-Type Freeform QFREEFORM

Related Functions:

SPRO

Related Keywords:

SETSYSTEMPROPERTY, UPDATE

Next: