zospy.analyses.old.systemviewers.viewer_3d

Contents

zospy.analyses.old.systemviewers.viewer_3d#

zospy.analyses.old.systemviewers.viewer_3d(oss: OpticStudioSystem, start_surface: int = 1, end_surface: int = -1, number_of_rays: int = 3, wavelength: int | str = 'all', field: int | str = 'all', ray_pattern: constants.Tools.General.RayPatternType | str = 'XYFan', color_rays_by: constants.Tools.Layouts.ColorRaysByOptions | str = 'Fields', delete_vignetted: bool = False, hide_lens_faces: bool = False, hide_lens_edges: bool = False, hide_x_bars: bool = False, draw_paraxial_pupils: bool = False, fletch_rays: bool = False, split_nsc_rays: bool = False, scatter_nsc_rays: bool = False, draw_real_entrance_pupils: constants.Tools.Layouts.RealPupilOptions | str = 'Pupils_Off', draw_real_exit_pupils: constants.Tools.Layouts.RealPupilOptions | str = 'Pupils_Off', surface_line_thickness: constants.Tools.Layouts.LineThicknessOptions | str = 'Standard', ray_line_thickness: constants.Tools.Layouts.LineThicknessOptions | str = 'Standard', configuration_all: bool = False, configuration_current: bool = False, configuration_offset_x: float = 0, configuration_offset_y: float = 0, configuration_offset_z: float = 0, camera_viewpoint_angle_x: float = 0, camera_viewpoint_angle_y: float = 0, camera_viewpoint_angle_z: float = 0, imgoutfile: PathLike | str | None = None, oncomplete: OnComplete | str = OnComplete.Release) AnalysisResult#

Wrapper around the OpticStudio 3D Viewer.

Parameters:
osszospy.zpcore.OpticStudioSystem

A ZOSPy OpticStudioSystem instance. Should be sequential.

start_surfaceint, optional

The starting surface index for the 3D viewer. Defaults to 1.

end_surfaceint, optional

The ending surface index for the 3D viewer. A value of -1 indicates the last surface. Defaults to -1.

number_of_raysint, optional

The number of rays to be used in the analysis. Defaults to 3.

wavelengthint | str, optional

The wavelength index to be used. Can be an integer or “all” for all wavelengths. Defaults to “all”.

fieldint | str, optional

The field index to be used. Can be an integer or “all” for all fields. Defaults to “all”.

ray_patternconstants.Tools.General.RayPatternType | str, optional

The ray pattern to be used in the analysis. Defaults to “XYFan”.

color_rays_byconstants.Tools.Layouts.ColorRaysByOptions | str, optional

The criterion for coloring rays in the analysis. Defaults to “Fields”.

delete_vignettedbool, optional

Flag indicating whether to delete vignetted rays. Defaults to False.

hide_lens_facesbool, optional

Flag indicating whether to hide lens faces. Defaults to False.

hide_lens_edgesbool, optional

Flag indicating whether to hide lens edges. Defaults to False.

hide_x_barsbool, optional

Flag indicating whether to hide the x-component of lens faces. Defaults to False.

draw_paraxial_pupilsbool, optional

Flag indicating whether to draw paraxial entrance and exit pupils. Defaults to False.

fletch_raysbool, optional

Flag indicating whether to draw small arrows indicating the direction of the rays. Defaults to False.

split_nsc_raysbool, optional

Flag indicating whether to split rays from non-sequential sources at ray-surface intercepts. Defaults to False.

scatter_nsc_raysbool, optional

Flag indicating whether to scatter rays from non-sequential sources at ray-surface intercepts. Defaults to False.

draw_real_entrance_pupilsconstants.Tools.Layouts.RealPupilOptions | str, optional

How to draw real entrance pupils. Defaults to “Pupils_Off”. Can be one of [‘Pupils_Off’, ‘Pupils_4’, ‘Pupils_8’, ‘Pupils_16’, ‘Pupils_32’].

draw_real_exit_pupilsconstants.Tools.Layouts.RealPupilOptions | str, optional

How to draw real exit pupils. Defaults to “Pupils_Off”. Can be one of [‘Pupils_Off’, ‘Pupils_4’, ‘Pupils_8’, ‘Pupils_16’, ‘Pupils_32’].

surface_line_thicknessconstants.Tools.Layouts.LineThicknessOptions | str, optional

The thickness of the lines for the surfaces. Defaults to “Standard”.

ray_line_thicknessconstants.Tools.Layouts.LineThicknessOptions | str, optional

The thickness of the lines for the rays. Defaults to “Standard”.

configuration_allbool, optional

Flag indicating whether to use all configurations, if multiple configurations are present. Defaults to False. If multiple configurations are displayed, the configuration_offset_* parameters can be used to add offsets between the different configurations.

configuration_currentbool, optional

Flag indicating whether to only display the current configuration, when multiple configurations are present. Defaults to False.

configuration_offset_xfloat, optional

The offset along the X-axis between configurations, if multiple configurations are present. Defaults to 0.

configuration_offset_yfloat, optional

The offset along the Y-axis between configurations, if multiple configurations are present. Defaults to 0.

configuration_offset_zfloat, optional

The offset along the Z-axis between configurations, if multiple configurations are present. Defaults to 0.

camera_viewpoint_angle_xfloat, optional

Rotation of the system around the X-axis, in degrees. Defaults to 0.

camera_viewpoint_angle_yfloat, optional

Rotation of the system around the Y-axis, in degrees. Defaults to 0.

camera_viewpoint_angle_zfloat, optional

Rotation of the system around the Z-axis, in degrees. Defaults to 0.

imgoutfilePathLike | str | None, optional

The path to save the output image file. If None, no image is saved. Defaults to None.

oncompleteOnComplete | str

Defines behaviour upon completion of the analysis. Should be one of [‘Close’, ‘Release’, ‘Sustain’]. If ‘Close’, the analysis will be closed after completion. If ‘Release’, the analysis will remain open in OpticStudio, but the link with python will be destroyed. If ‘Sustain’ the analysis will be kept open in OpticStudio and the link with python will be sustained. To enable interaction when oncomplete == ‘Sustain’, the OpticStudio Analysis instance will be available in the returned AnalysisResult through AnalysisResult.Analysis. Defaults to ‘Release’.

Returns:
AnalysisResult

A Viewer 3D analysis result. As the viewers do not return data, the AnalysisResult can mainly be used to further control the analysis when oncomplete is set to Sustain.