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 on these integer codes, see the summary table at the bottom of this page.
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 Surface Type Integer Code
Standard STANDARD 0
Even Asphere EVENASPH 1
Odd Asphere ODDASPHE 2
Paraxial PARAXIAL 3
Paraxial XY PARAX_XY 4
Biconic BICONICX 5
Toroidal Grating TOROGRAT 6
Cubic Spline CUSPLINE 7
Hologram 1 HOLOGRM1 8
Hologram 2 HOLOGRM2 9
Coordinate Break COORDBRK 10
Polynomial POLYNOMI 11
Fresnel FRESNELS 12
ABCD ABCDSURF 13
Alternate Even ALTERNAT 14
Alternate Odd ALTERNAO 15
Diffraction Grating DGRATING 16
Conjugate CONJUGAT 17
Tilted TILTSURF 18
Irregular IRREGULA 19
Gradient 1 GRINSUR1 20
Gradient 2 GRINSUR2 21
Gradient 3 GRINSUR3 22
Gradient 4 GRINSUR4 23
Gradient 5 GRINSUR5 24
Gradient 6 GRINSUR6 25
Gradient 7 GRINSUR7 26
Gradium GRINSUR8 27
Gradient 9 GRINSUR9 28
Gradient 10 GRINSU10 29
Gradient 12 GRINSU12 30
Retro Reflect RETROREF 31
Toroidal TOROIDAL 32
Zernike Fringe Sag FZERNSAG 33
Zernike Fringe Phase FZERNPHA 34
Zernike Standard Sag SZERNSAG 35
Zernike Standard Phase SZERNPHA 36
Zernike Annular Phase AZERNPHA 37
Biconic Zernike BICONICZ 38
Extended Polynomial XPOLYNOM 39
Binary Optic 1 BINARY_1 40
Binary Optic 2 BINARY_2 41
Binary Optic 3 BINARY_3 42
Binary Optic 4 BINARY_4 43
Extended Cubic Spline XCUSPLIN 44
Extended Asphere XASPHERE 45
Extended Odd Asphere XOSPHERE 46
Variable Line Space Grating VARLSGRT 47
Elliptical Grating 1 ELLIGRAT 48
Elliptical Grating 2 ELLIGRA2 49
Superconic SUPERCON 50
Extended Fresnel XFRESNEL 51
Cylinder Fresnel CFRESNEL 52
Grid Sag GRID_SAG 53
Grid Phase GRID_PHA 54
Generalized Fresnel GEN_FRES 55
Periodic PERIODIC 56
Toroidal Hologram TOROHOLO 57
Atmospheric Refraction ATMOSPHR 58
Zone Plate ZONEPLAT 59
Q-Type Asphere QED_TYPE 60
Jones Matrix JONESMAT 61
Gradient 12 GRINSU12 62
Zernike Annular Standard Sag AZERNSAG 63
Chebyshev Polynomail CHEBYSHV 64
Q-Type Freeform QFREEFORM 65
Off-Axis Conic Freeform OFFAXISCF 66
Black Box Lens BLACKBOX 67
Slide SLIDESRF 68
User defined USERSURF 69
Birefringent In BIRE__IN 70
Birefringent Out BIRE_OUT 71
Optically Fabricated Hologram OFABHOL1 72
Radial NURBS RADNURBS 73
Toroidal NURBS TORNURBS 74
Extended Toroidal Grating TOROGRAX 75
Radial Grating RGRATING 76
Odd Cosine ODDCOSIN 77
Non-Sequential Component NONSEQCO 78
Data DATASURF 79
TrueFreeForm FREEFORM 80

Related Functions:

SPRO

Related Keywords:

SETSYSTEMPROPERTY, UPDATE