ZOSAPI.Editors.NCE.INonSeqEditor Interface Reference
Last update: 17.07.2025This interface defines all properties and methods needed to interact with the Non-Sequential Component Editor. This interface can be accessed via the IOpticalSystem interface. More...

Public Member Functions | |
| string[] | AllAvailableObjectNames () |
| string[] | AvailableSourceNames () |
| string[] | AvailableDetectorNames () |
| string[] | AvailableObjectNames () |
| ObjectType | ObjectTypeFromObjectName (string objectName) |
| string | ObjectNameFromObjectType (ObjectType objectType) |
| bool | SetActiveSurface (int SurfaceNumber) |
| Sets theActiveSurface to the specified surface. | |
| bool | NextNSCGroup () |
| Selects the next available non-sequential surface. | |
| bool | PrevNSCGroup () |
| Selects the previous available non-sequential surface. | |
| INCERow | GetObjectAt (int ObjectNumber) |
| Gets the object at the specified position. | |
| INCERow | InsertNewObjectAt (int ObjectNumber) |
| Inserts a new object at the specified position. | |
| INCERow | AddObject () |
| Adds a new object as the last object in the system. | |
| bool | RemoveObjectAt (int ObjectNumber) |
| Removes the object at the specified location. | |
| int | RemoveObjectsAt (int ObjectNumber, int numObjects) |
| Removes one or more objects at the specified location. | |
| void | ReloadObject (int ObjectNumber) |
| Reloads the specified object (for more information, see the OpticStudio manual). | |
| void | ReloadAllObjects () |
| Reloads all objects in the editor (for more information, see the OpticStudio manual). | |
| bool | ShowNCE () |
| Shows this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin. | |
| void | HideNCE () |
| Closes this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin. | |
| bool | GetMatrix (int ObjectNumber, out double R11, out double R12, out double R13, out double R21, out double R22, out double R23, out double R31, out double R32, out double R33, out double Xo, out double Yo, out double Zo) |
| Get the rotation and position matrices for NSC objects relative to the NSC surface origin. | |
| bool | GetDetectorDimensions (int ObjectNumber, out uint Rows, out uint Cols) |
| Gets the dimensions of the specified detector. | |
| bool | GetCoherentData (int ObjectNumber, int pixel, DetectorDataType Data, out double Value) |
| Gets data from a NSC detector. | |
| double[,] | GetAllCoherentDataSafe (int ObjectNumber, DetectorDataType Data) |
| Gets data from a NSC detector for all pixels. | |
| bool | GetAllCoherentData (int ObjectNumber, DetectorDataType Data, uint numPixels, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)][In, Out]double[] detectorData) |
| Gets data from a NSC detector for all pixels. | |
| uint | GetDetectorSize (int ObjectNumber) |
| Gets the total number of pixels for the specified detector. | |
| bool | GetDetectorData (int ObjectNumber, int pixel, int Data, out double Value) |
| Gets data from a NSC detector. | |
| bool | GetAllDetectorData (int ObjectNumber, int Data, uint numPixels, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)][In, Out]double[] detectorData) |
| Similar to GetDetectorData, but retrieves data for all pixels at once. | |
| double[,] | GetAllDetectorDataSafe (int ObjectNumber, int Data) |
| Similar to GetDetectorData, but retrieves data for all pixels at once. | |
| bool | GetPolarDetectorData (int ObjectNumber, int pixel, PolarDetectorDataType Data, out double Value) |
| Gets data from a NSC detector. | |
| bool | GetAllPolarDetectorData (int ObjectNumber, PolarDetectorDataType Data, uint numPixels, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)][In, Out]double[] detectorData) |
| Similar to GetDetectorData, but retrieves data for all pixels at once. | |
| double[,] | GetAllPolarDetectorDataSafe (int ObjectNumber, PolarDetectorDataType Data) |
| Similar to GetDetectorData, but retrieves data for all pixels at once. | |
| bool | LoadDetector (int ObjectNumber, string fileName, bool appendData) |
| Loads the data saved in a file to an NSC Detector Rectangle, Detector Color, Detector Polar, or Detector Volume object. | |
| bool | SaveDetector (int ObjectNumber, string fileName) |
| Saves the data currently on an NSC Detector Rectangle, Detector Color, Detector Polar, or Detector Volume object to a file. | |
| int | CopyObjects (int fromObjectNumber, int NumberOfObjects, int toObjectNumber) |
| Copy and paste the specified number of objects from one location to another. Note that it is okay for the source and destination to overlap. | |
| int | CopyObjectsFrom (INonSeqEditor fromEditor, int fromObjectNumber, int NumberOfObjects, int toObjectNumber) |
| Copy and paste the specified number of objects from one location (in the specified system) to another location (in this system). Note that it is okay for the source and destination to overlap. | |
| bool | GetColorDetectorData (int ObjectNumber, int pixel, bool angleSpace, int Data, int numIgnoredPixels, double Wavelength, out double Value) |
| Gets data from a NSC Detector Color. | |
| bool | GetAllColorDetectorData (int ObjectNumber, bool angleSpace, int Data, uint numPixels, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)][In, Out]double[] detectorData) |
| Similar to GetColorDetectorData, but retrieves data for all pixels at once. | |
| double[,] | GetAllColorDetectorDataSafe (int ObjectNumber, bool angleSpace, int Data) |
| Similar to GetColorDetectorData, but retrieves data for all pixels at once. | |
| IMessage | ModifyReferenceObjects (int first, int last, int reference) |
ModifyReferenceObjects modifies objects numbered first through last according to reference by
| |
| bool | GetGlass (int ObjectNumber, out string glassName, out double nd, out double vd, out double dpgf) |
| Retrieve data about the glass on any object. | |
| int | GetIndex (int ObjectNumber, int NumberOfWavelengths, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)][In, Out]double[] indexAtWavelength) |
| Extract refraction data for any object. | |
| string | GetClosestGlass (int ObjectNumber) |
| Get the closest catalog glass to the model glass on the specified object. Note that this should only be called for an object that uses a model glass solve, otherwise the result is undefined. | |
| long | GetId (int objectNumber) |
| IMessage | ReplicateObject (int ObjectNumber, int NumX, int NumY, int NumZ, double DeltaX, double DeltaY, double DeltaZ, bool AddPickupSolves, bool RelativeReferences) |
| Replicate the selected object on x, y, and z arrays. | |
Public Member Functions inherited from ZOSAPI.Editors.IEditor | |
| IEditorRow | GetRowAt (int pos) |
| Gets the row at the specified index (0 to NumberOfRows-1). | |
| IEditorRow | InsertRowAt (int pos) |
| Inserts a new row at the specified index (0 to NumberOfRows). Note that some editors - such as the Lens Data Editor may not allow inserting new rows before the first row. | |
| IEditorRow | AddRow () |
| Adds a new row at the end of the editor. | |
| bool | DeleteRowAt (int pos) |
| Deletes a row at the specified index (0 to NumberOfRows-1). Note that all editors require at least one row, and some editors may require more than that. | |
| int | DeleteRowsAt (int pos, int numberOfRows) |
| Deletes one or more rows at the specified index (0 to NumberOfRows-1). | |
| int | DeleteAllRows () |
| Deletes all rows from the current editor. | |
| bool | ShowEditor () |
| Shows this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin. | |
| void | HideEditor () |
| Closes this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin. | |
Properties | |
| int | RowToObjectOffset [get] |
| Gets the offset from a row to a object (always 1). | |
| int | ActiveSurface [get] |
| Gets the active non-sequential surface number for the current INonSeqEditor instance. | |
| int | NumberOfObjects [get] |
| Gets the number of objects on the current non-sequential component group. | |
| ObjectColumn | FirstColumn [get] |
| Gets the first available column. | |
| ObjectColumn | LastColumn [get] |
| Gets the last available column. | |
Properties inherited from ZOSAPI.Editors.IEditor | |
| EditorType | Editor [get] |
| Gets the type of this editor instance. | |
| int | NumberOfRows [get] |
| Gets the number of rows in this editor. Note that this referes to surfaces, objects, or operands depending on editor type. | |
| int | MinColumn [get] |
| The minimum column index that can be used in calls to IEditorRow.GetCellAt for any IEditorRow retrieved from this editor. | |
| int | MaxColumn [get] |
| The maximum column index that can be used in calls to IEditorRow.GetCellAt for any IEditorRow retrieved from this editor. | |
Detailed Description
This interface defines all properties and methods needed to interact with the Non-Sequential Component Editor. This interface can be accessed via the IOpticalSystem interface.
- Examples
- CSharpStandalone_02_NSC_ray_trace.cs, CSharpStandalone_06_nsc_phase.cs, CSharpStandalone_09_NSC_CAD.cs, CSharpStandalone_10_NSC_ZRD_filter_string.cs, CSharpStandalone_17_NSC_BulkScatter.cs, CSharpStandalone_21_White_LED_Phosphor.cs, CSharpStandalone_24_nsc_detectors.cs, and CSharpStandalone_25_source_spectrum_diffraction_grating.cs.
Member Function Documentation
◆ AddObject()
| INCERow ZOSAPI.Editors.NCE.INonSeqEditor.AddObject | ( | ) |
Adds a new object as the last object in the system.
Usage (see Example 21 for a full sample)
C#
C++
Matlab
Python
- Returns
◆ AllAvailableObjectNames()
| string[] ZOSAPI.Editors.NCE.INonSeqEditor.AllAvailableObjectNames | ( | ) |
◆ AvailableDetectorNames()
| string[] ZOSAPI.Editors.NCE.INonSeqEditor.AvailableDetectorNames | ( | ) |
◆ AvailableObjectNames()
| string[] ZOSAPI.Editors.NCE.INonSeqEditor.AvailableObjectNames | ( | ) |
◆ AvailableSourceNames()
| string[] ZOSAPI.Editors.NCE.INonSeqEditor.AvailableSourceNames | ( | ) |
◆ CopyObjects()
| int ZOSAPI.Editors.NCE.INonSeqEditor.CopyObjects | ( | int | fromObjectNumber, |
| int | NumberOfObjects, | ||
| int | toObjectNumber | ||
| ) |
Copy and paste the specified number of objects from one location to another. Note that it is okay for the source and destination to overlap.
- Parameters
-
fromObjectNumber First object number to copy (1 to NumberOfObjects). NumberOfObjects The number of objects to copy. toObjectNumber Row to start inserting the objects (1 to NumberOfObjects+1).
- Returns
- The number of objects actually copied.
◆ CopyObjectsFrom()
| int ZOSAPI.Editors.NCE.INonSeqEditor.CopyObjectsFrom | ( | INonSeqEditor | fromEditor, |
| int | fromObjectNumber, | ||
| int | NumberOfObjects, | ||
| int | toObjectNumber | ||
| ) |
Copy and paste the specified number of objects from one location (in the specified system) to another location (in this system). Note that it is okay for the source and destination to overlap.
- Parameters
-
fromEditor System to copy the objects from. fromObjectNumber First object number to copy (1 to NumberOfObjects). NumberOfObjects The number of objects to copy. toObjectNumber To object number (1 to NumberOfObjects+1).
- Returns
- The number of objects actually copied.
◆ GetAllCoherentData()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetAllCoherentData | ( | int | ObjectNumber, |
| DetectorDataType | Data, | ||
| uint | numPixels, | ||
| [In, Out] double[] | detectorData | ||
| ) |
Gets data from a NSC detector for all pixels.
Usage (see Example 08 for a full sample)
C++
- Parameters
-
ObjectNumber The object number of the detector. Data The desired data type. numPixels The number of pixels in the data array; this should match the value returned by GetDetectorSize. detectorData The data array to fill with the desired data.
- Returns
truefor a valid detector;falseotherwise
◆ GetAllCoherentDataSafe()
| double[,] ZOSAPI.Editors.NCE.INonSeqEditor.GetAllCoherentDataSafe | ( | int | ObjectNumber, |
| DetectorDataType | Data | ||
| ) |
Gets data from a NSC detector for all pixels.
Usage (see Example 24 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector. Data The desired data type.
- Returns
- 2D array of the desired data for valid inputs;
nullotherwise.
◆ GetAllColorDetectorData()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetAllColorDetectorData | ( | int | ObjectNumber, |
| bool | angleSpace, | ||
| int | Data, | ||
| uint | numPixels, | ||
| [In, Out] double[] | detectorData | ||
| ) |
Similar to GetColorDetectorData, but retrieves data for all pixels at once.
- Parameters
-
ObjectNumber The object number of the detector. angleSpace GetColorDetectorData Data GetColorDetectorData numPixels The number of pixels in the data array; this should match the value returned by GetDetectorSize. detectorData The data array to fill with the desired data.
- Returns
truefor a valid detector;falseotherwise
◆ GetAllColorDetectorDataSafe()
| double[,] ZOSAPI.Editors.NCE.INonSeqEditor.GetAllColorDetectorDataSafe | ( | int | ObjectNumber, |
| bool | angleSpace, | ||
| int | Data | ||
| ) |
Similar to GetColorDetectorData, but retrieves data for all pixels at once.
- Parameters
-
ObjectNumber The object number of the detector. angleSpace GetColorDetectorData Data GetColorDetectorData
- Returns
- The requested data for a valid detector;
nullotherwise
◆ GetAllDetectorData()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetAllDetectorData | ( | int | ObjectNumber, |
| int | Data, | ||
| uint | numPixels, | ||
| [In, Out] double[] | detectorData | ||
| ) |
Similar to GetDetectorData, but retrieves data for all pixels at once.
Usage (see Example 02 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector. Data GetDetectorData numPixels The number of pixels in the data array; this should match the value returned by GetDetectorSize. detectorData The data array to fill with the desired data.
- Returns
truefor a valid detector;falseotherwise
◆ GetAllDetectorDataSafe()
| double[,] ZOSAPI.Editors.NCE.INonSeqEditor.GetAllDetectorDataSafe | ( | int | ObjectNumber, |
| int | Data | ||
| ) |
Similar to GetDetectorData, but retrieves data for all pixels at once.
- Parameters
-
ObjectNumber The object number of the detector. Data GetDetectorData
- Returns
- The requested data for a valid detector;
nullotherwise
◆ GetAllPolarDetectorData()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetAllPolarDetectorData | ( | int | ObjectNumber, |
| PolarDetectorDataType | Data, | ||
| uint | numPixels, | ||
| [In, Out] double[] | detectorData | ||
| ) |
Similar to GetDetectorData, but retrieves data for all pixels at once.
Usage (see Example 08 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector. Data GetDetectorData numPixels The number of pixels in the data array; this should match the value returned by GetDetectorSize. detectorData The data array to fill with the desired data.
- Returns
truefor a valid detector;falseotherwise
◆ GetAllPolarDetectorDataSafe()
| double[,] ZOSAPI.Editors.NCE.INonSeqEditor.GetAllPolarDetectorDataSafe | ( | int | ObjectNumber, |
| PolarDetectorDataType | Data | ||
| ) |
Similar to GetDetectorData, but retrieves data for all pixels at once.
Usage (see Example 08 for a full sample)
C#
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector. Data GetDetectorData
- Returns
- The requested data for a valid detector;
nullotherwise
◆ GetClosestGlass()
| string ZOSAPI.Editors.NCE.INonSeqEditor.GetClosestGlass | ( | int | ObjectNumber | ) |
Get the closest catalog glass to the model glass on the specified object. Note that this should only be called for an object that uses a model glass solve, otherwise the result is undefined.
- Parameters
-
ObjectNumber Desired object (1 to NumberOfObjects)
- Returns
- The glass name if found, otherwise an empty string
◆ GetCoherentData()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetCoherentData | ( | int | ObjectNumber, |
| int | pixel, | ||
| DetectorDataType | Data, | ||
| out double | Value | ||
| ) |
Gets data from a NSC detector.
Usage (see Example 08 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector. pixel The pixel number on the detector (1-based); use 0 to retrieve the sum over all pixels. Data The desired data type. Value The value.
- Returns
- True for a valid detector;
falseotherwise
◆ GetColorDetectorData()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetColorDetectorData | ( | int | ObjectNumber, |
| int | pixel, | ||
| bool | angleSpace, | ||
| int | Data, | ||
| int | numIgnoredPixels, | ||
| double | Wavelength, | ||
| out double | Value | ||
| ) |
Gets data from a NSC Detector Color.
- Parameters
-
ObjectNumber The object number of the detector.
= 0: clear all detectors
> 0: retrieve data from the detector
< 0: clear the detector.
- Parameters
-
pixel The pixel number on the detector (1-based).
>0: Retrieve data for the specified pixel.
0: Sum of all data for all pixels on the detector. For chromaticity coordinates this is the average over all pixels in the detector that have non-zero lumen values.
The area values described below are the area of the entire detector, measured in analysis units for position space data or solid angle in steradians for angle space data.
-1: Maximum data.
-2: Minimum data.
-3: Number of rays striking the detector.
- Parameters
-
angleSpace truefor angle space data, otherwise position space data.Data The desired data type.
1: power in 'sprefix' watts where 'sprefix' is the source units prefix.
2: power/area in 'aprefix' watts per 'area' where 'aprefix' is the analysis units prefix.
If angleSpace is false 'area' is the area in analysis units; otherwise, 'area' is solid angle in steradians.
3: power in 'sprefix' lumens where 'sprefix' is the source units prefix.
4: power/area in 'aprefix' lumens per 'area' where 'aprefix' is the analysis units prefix.
If angleSpace is false 'area' is the area in analysis units; otherwise, 'area' is solid angle in steradians.
5/6: CIE 1931 chromaticity coordinate x/y.
7/8: CIE 1976 chromaticity coordinate u'/v'.
9/10/11: CIE 1931 tristiulus X/Y/Z values in lumens per 'area'. If angleSpace is false 'area' is the area in analysis units; otherwise, 'area' is solid angle in steradians.
12/13: Color Rendering Index (CRI) and Correlated Color Temperature (CCT), the latter value in Kelvin. These values are only returned if the option to “Record Spectral Data” has been selected for the Detector Color object (only available in OpticStudio-Premium) and if the pixel is 0 and angleSpace is false. The returned values are based on the variation of flux with wavelength over the entire detector.
17/18/19/20/21: The Centroid X, Y and RMS radius, X, Y in specified Spectral Bin. See description of Wavelength for specifying the Spectral Bin. See Detector Settings in Type section of the Object Properties for defining Spectral Range of Bins.
- Parameters
-
numIgnoredPixels If Pix# is not a positive integer, then a number of edge pixels may be ignored in the calculation if desired.
The number of edge pixels that will be ignored is given by the # Ignored input. For non- zero values of # Ignored, the number of pixels accounted for in the calculation will be reduced along all boundaries of the detector. For example, if a detector has 100 pixels in X and 200 pixels in Y and the numIgnoredPixels value is 2, then the calculation will be based upon detector data from 96 pixels in X and 196 pixels in Y, with data from the last 2 edge pixels along the left, right, bottom and top boundaries all ignored. Calculations that are not affected by the numIgnoredPixels input are the number of rays striking the detector, as given by pixel = -3, and the CRI and CCT values, as given by Data = 12 and Data = 13, respectively (the numIgnoredPixels input also does not affect any values calculated for positive integer inputs to pixel ).
If the source units are joules, then the data 1 and 2 are in joules and data 3 and 4 are in talbots.See “Units”. See also NSDD and NSDP.
- Parameters
-
Wavelength Specifies which spectral bin's data is calculated for centroid X/Y and RMS radius/X/Y. If the value of Wavelength is inside one bin's spectral range, the bin's data will be selected for calculation. See "Record Spectral Data" for details of spectral binning. Value The return value.
- Returns
- True for a valid detector; False otherwise
◆ GetDetectorData()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetDetectorData | ( | int | ObjectNumber, |
| int | pixel, | ||
| int | Data, | ||
| out double | Value | ||
| ) |
Gets data from a NSC detector.
Usage (see Example 10 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector.
= 0: clear all detectors
> 0: retrieve data from the detector
< 0: clear the detector.
- Parameters
-
pixel The pixel number on the detector (1-based).
For Detector Rectangles, Detector Surfaces, and all faceted detectors
0: Sum of the total flux in position space, average flux/area in position space, or total flux in angle space for all pixels for that detector object, for Data = 0, 1, or 2, respectively.
-1: Maximum flux or flux/area.
-2: Minimum flux or flux/area.
-3: Number of rays striking the detector.
-4: Standard deviation (RMS from the mean) of all the non-zero pixel data.
-5: The mean value of all the non-zero pixel data.
-6, -7, -8: The x, y, or z coordinate of the position or angle Irradiance or Intensity centroid, respectively.
-9,-10, -11, -12, -13: The RMS radius, x, y, z, or xy cross term distance or angle of all the pixel data with respect to the centroid. These are the second moments r^2, x^2, y^2, z^2, and xy, respectively
For Detector Volumes
Pix# is interpreted as the voxel number
- Parameters
-
Data The desired data type.
For Detector Rectangles, Detector Surfaces, and all faceted detectors
0: flux
1: flux/area
2: flux/solid angle pixel
Note - only values 0 and 1 (for flux and flux/area) are supported for faceted detectors.
For faceted detectors
4: absorbed flux
5: absorbed flux/area
For Detector Volumes
0: incident flux
1: absorbed flux
2: absorbed flux/unit volume
- Parameters
-
Value The return value.
- Returns
- True for a valid detector; False otherwise
◆ GetDetectorDimensions()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetDetectorDimensions | ( | int | ObjectNumber, |
| out uint | Rows, | ||
| out uint | Cols | ||
| ) |
Gets the dimensions of the specified detector.
Usage (see Example 10 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector. Rows The # of rows in the detector. Cols The # of columns if the detector or rectangular; 1for other detector types;0for invalid inputs.
- Returns
truefor a valid detctor number;falseotherwise.
◆ GetDetectorSize()
| uint ZOSAPI.Editors.NCE.INonSeqEditor.GetDetectorSize | ( | int | ObjectNumber | ) |
Gets the total number of pixels for the specified detector.
- Parameters
-
ObjectNumber The object number of the detector.
- Returns
- The number of pixels in the detector (rows * columns).
◆ GetGlass()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetGlass | ( | int | ObjectNumber, |
| out string | glassName, | ||
| out double | nd, | ||
| out double | vd, | ||
| out double | dpgf | ||
| ) |
Retrieve data about the glass on any object.
- Parameters
-
ObjectNumber Object # (1-based) glassName The name of the glass nd The nd value vd The vd value dpgf The dpgf value
- Returns
falseif the object is not valid, is not made of glass, or is a gradient index; otherwise,true.
◆ GetId()
| long ZOSAPI.Editors.NCE.INonSeqEditor.GetId | ( | int | objectNumber | ) |
◆ GetIndex()
| int ZOSAPI.Editors.NCE.INonSeqEditor.GetIndex | ( | int | ObjectNumber, |
| int | NumberOfWavelengths, | ||
| [In, Out] double[] | indexAtWavelength | ||
| ) |
Extract refraction data for any object.
- Parameters
-
ObjectNumber Object # (1-based) NumberOfWavelengths The number of wavelenghts to retrieve. Note: this number must be the length of indexAtWavelength. indexAtWavelength When the function returns, this will hold the index at each system wavelength. Note: only data for the minimum of 'NumberOfWavelengths' and the number of system wavelengths will be populated.
- Returns
- The count of index data successfully read.
◆ GetMatrix()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetMatrix | ( | int | ObjectNumber, |
| out double | R11, | ||
| out double | R12, | ||
| out double | R13, | ||
| out double | R21, | ||
| out double | R22, | ||
| out double | R23, | ||
| out double | R31, | ||
| out double | R32, | ||
| out double | R33, | ||
| out double | Xo, | ||
| out double | Yo, | ||
| out double | Zo | ||
| ) |
Get the rotation and position matrices for NSC objects relative to the NSC surface origin.
Usage (see Example 08 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber Object # (1-based) R11 Row 1, Column 1 R12 Row 1, Column 2 R13 Row 1, Column 3 R21 Row 2, Column 1 R22 Row 2, Column 2 R23 Row 2, Column 3 R31 Row 3, Column 1 R32 Row 3, Column 2 R33 Row 3, Column 3 Xo X offset Yo Y offset Zo Z offset
- Returns
- True for a valid object; False otherwise
◆ GetObjectAt()
| INCERow ZOSAPI.Editors.NCE.INonSeqEditor.GetObjectAt | ( | int | ObjectNumber | ) |
Gets the object at the specified position.
Usage (see Example 17 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number (1 to NumberOfObjects).
- Returns
◆ GetPolarDetectorData()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.GetPolarDetectorData | ( | int | ObjectNumber, |
| int | pixel, | ||
| PolarDetectorDataType | Data, | ||
| out double | Value | ||
| ) |
Gets data from a NSC detector.
Usage (see Example 08 for a full sample)
C++
- Parameters
-
ObjectNumber The object number of the detector.
= 0: clear all detectors
> 0: retrieve data from the detector
< 0: clear the detector.
- Parameters
-
pixel The pixel number on the detector (1-based).
For Detector Rectangles, Detector Surfaces, and all faceted detectors
0: Sum of the total flux in position space, average flux/area in position space, or total flux in angle space for all pixels for that detector object, for Data = 0, 1, or 2, respectively.
-1: Maximum flux or flux/area.
-2: Minimum flux or flux/area.
-3: Number of rays striking the detector.
-4: Standard deviation (RMS from the mean) of all the non-zero pixel data.
-5: The mean value of all the non-zero pixel data.
-6, -7, -8: The x, y, or z coordinate of the position or angle Irradiance or Intensity centroid, respectively.
-9,-10, -11, -12, -13: The RMS radius, x, y, z, or xy cross term distance or angle of all the pixel data with respect to the centroid. These are the second moments r^2, x^2, y^2, z^2, and xy, respectively
For Detector Volumes
Pix# is interpreted as the voxel number
- Parameters
-
Data The desired data type.
For Detector Rectangles, Detector Surfaces, and all faceted detectors
0: flux
1: flux/area
2: flux/solid angle pixel
Note - only values 0 and 1 (for flux and flux/area) are supported for faceted detectors.
For Detector Volumes
0: incident flux
1: absorbed flux
2: absorbed flux/unit volume
- Parameters
-
Value The return value.
- Returns
- True for a valid detector; False otherwise
◆ HideNCE()
| void ZOSAPI.Editors.NCE.INonSeqEditor.HideNCE | ( | ) |
Closes this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin.
- Returns
◆ InsertNewObjectAt()
| INCERow ZOSAPI.Editors.NCE.INonSeqEditor.InsertNewObjectAt | ( | int | ObjectNumber | ) |
Inserts a new object at the specified position.
Usage (see Example 17 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number (1 to NumberOfObjects+1).
- Returns
◆ LoadDetector()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.LoadDetector | ( | int | ObjectNumber, |
| string | fileName, | ||
| bool | appendData | ||
| ) |
Loads the data saved in a file to an NSC Detector Rectangle, Detector Color, Detector Polar, or Detector Volume object.
Usage (see Example 08 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector. fileName Name of the file to load.
fileName may include the full path, if no path is provided the path of the current lens file is used.
The extension should be DDR, DDC, DDP, or DDV for Detector Rectangle, Color, Polar, and Volume objects, respectively.
- Parameters
-
appendData If set to truethen the data from the file are summed to the existing detector data, else the detector is cleared first.
When appendData is true, data from the file must have identical detector properties as the existing detector; otherwise the sum cannot be performed.
- Returns
trueif the operation succeeded;falseotherwise.
◆ ModifyReferenceObjects()
| IMessage ZOSAPI.Editors.NCE.INonSeqEditor.ModifyReferenceObjects | ( | int | first, |
| int | last, | ||
| int | reference | ||
| ) |
ModifyReferenceObjects modifies objects numbered first through last according to reference by
- updating each selected object's reference object and
- updating the position and rotation angle for each object to retain its current position and orientation.
- Parameters
-
first The number (1-based) of the first object to modify. last The number (1-based) of the last object to modify. reference Either - 0, for referencing the vertex of the Non-sequential Component Editor surface (i.e., "Global Coordinates"), or
- a 1-based surface number.
min(first , last ).
- Returns
Nullon success; non-null if an error occurred.
◆ NextNSCGroup()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.NextNSCGroup | ( | ) |
Selects the next available non-sequential surface.
- Returns
◆ ObjectNameFromObjectType()
| string ZOSAPI.Editors.NCE.INonSeqEditor.ObjectNameFromObjectType | ( | ObjectType | objectType | ) |
◆ ObjectTypeFromObjectName()
| ObjectType ZOSAPI.Editors.NCE.INonSeqEditor.ObjectTypeFromObjectName | ( | string | objectName | ) |
◆ PrevNSCGroup()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.PrevNSCGroup | ( | ) |
Selects the previous available non-sequential surface.
- Returns
◆ ReloadAllObjects()
| void ZOSAPI.Editors.NCE.INonSeqEditor.ReloadAllObjects | ( | ) |
Reloads all objects in the editor (for more information, see the OpticStudio manual).
◆ ReloadObject()
| void ZOSAPI.Editors.NCE.INonSeqEditor.ReloadObject | ( | int | ObjectNumber | ) |
Reloads the specified object (for more information, see the OpticStudio manual).
- Parameters
-
ObjectNumber The object number to reload (1 to NumberOfObjects).
◆ RemoveObjectAt()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.RemoveObjectAt | ( | int | ObjectNumber | ) |
Removes the object at the specified location.
Usage (see Example 08 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number to remove (1 to NumberOfObjects).
- Returns
trueif the object was successfully remove; otherwise,false.
◆ RemoveObjectsAt()
| int ZOSAPI.Editors.NCE.INonSeqEditor.RemoveObjectsAt | ( | int | ObjectNumber, |
| int | numObjects | ||
| ) |
Removes one or more objects at the specified location.
- Parameters
-
ObjectNumber The first object to remove (1 to NumberOfObjects). numObjects The number of objets to remove.
- Returns
- The number of objects actually removed.
◆ ReplicateObject()
| IMessage ZOSAPI.Editors.NCE.INonSeqEditor.ReplicateObject | ( | int | ObjectNumber, |
| int | NumX, | ||
| int | NumY, | ||
| int | NumZ, | ||
| double | DeltaX, | ||
| double | DeltaY, | ||
| double | DeltaZ, | ||
| bool | AddPickupSolves, | ||
| bool | RelativeReferences | ||
| ) |
Replicate the selected object on x, y, and z arrays.
- Parameters
-
ObjectNumber Object # (1-based) NumX The number of objects in the X direction NumY The number of objects in the Y direction NumZ The number of objects in the Z direction DeltaX The object spacing in the X direction DeltaY The object spacing in the Y direction DeltaZ The object spacing in the Z direction AddPickupSolves If true, all replicated objects will pickup parameter data from the original object. RelativeReferences If true, all replicated objects will use relative references to the original object, otherwise, absolute references are used.
- Returns
Nullon success; non-null if an error occurred.
◆ SaveDetector()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.SaveDetector | ( | int | ObjectNumber, |
| string | fileName | ||
| ) |
Saves the data currently on an NSC Detector Rectangle, Detector Color, Detector Polar, or Detector Volume object to a file.
Usage (see Example 08 for a full sample)
C#
C++
Matlab
Python
- Parameters
-
ObjectNumber The object number of the detector. fileName Name of the file to save.
fileName may include the full path, if no path is provided the path of the current lens file is used.
The extension should be DDR, DDC, DDP, or DDV for Detector Rectangle, Color, Polar, and Volume objects, respectively.
- Returns
trueif the operation succeeded;falseotherwise.
◆ SetActiveSurface()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.SetActiveSurface | ( | int | SurfaceNumber | ) |
Sets theActiveSurface to the specified surface.
- Parameters
-
SurfaceNumber The surface number.
- Returns
trueif the specified surface ZOSAPI.Editors.LDE.SurfaceType is ZOSAPI.Editors.LDE.SurfaceType.NonSequential; otherwise,false.
◆ ShowNCE()
| bool ZOSAPI.Editors.NCE.INonSeqEditor.ShowNCE | ( | ) |
Shows this editor in the UI. Note that this only has an effect if the IOpticalSystem.Mode is ZOSAPI_Mode.Plugin.
- Returns
Property Documentation
◆ ActiveSurface
|
get |
Gets the active non-sequential surface number for the current INonSeqEditor instance.
The active surface.
◆ FirstColumn
|
get |
Gets the first available column.
The first column.
◆ LastColumn
|
get |
Gets the last available column.
The last column.
◆ NumberOfObjects
|
get |
Gets the number of objects on the current non-sequential component group.
The number of objects.
◆ RowToObjectOffset
|
get |
Gets the offset from a row to a object (always 1).
The row to object offset.
Public Member Functions inherited from