Skip to main content

ZOS-API interface 2024 R1

ZOSAPI.Editors.LDE.ILDEApertureData Interface Reference

Last update: 17.07.2025

Surface properties aperture tab. This interface can be accessed via the ILDERow interface. More...

Public Member Functions

void SetPickupNone ()
 Sets PickupFrom to None.
 
ISurfaceApertureType CreateApertureTypeSettings (SurfaceApertureTypes type)
 Creates the a settings interface for the specified aperture type. Note that changing these settings will have no effect until you call ChangeApertureTypeSettings.
 
bool ChangeApertureTypeSettings (ISurfaceApertureType settings)
 Updates the surface aperture with the specified settings. Use CurrentTypeSettings or CreateApertureTypeSettings to retrieve the appropriate settings interface.
 

Properties

int PickupFrom [get, set]
 Gets or sets the surface to pickup settings from.
 
bool IsPickedUp [get]
 Gets a value indicating whether the aperture data is being picked up from another surface. If true, ChangeApertureTypeSettings will always return false.
 
SurfaceApertureTypes CurrentType [get]
 Gets the current aperture type.
 
ISurfaceApertureType CurrentTypeSettings [get]
 Gets the current aperture type settings. Note that to change the aperture type use CreateApertureTypeSettings and ChangeApertureTypeSettings.
 
bool DisableClearSemiDiameterMarginsForThisSurface [get, set]
 Disable Clear Semi Diameter Margins for this Surface. When enabled, this will cause the values specified in the system explorer for ISDApertureData.SemiDiameterMargin and ISDApertureData.SemiDiameterMarginPct to be ignored.
 

Detailed Description

Surface properties aperture tab. This interface can be accessed via the ILDERow interface.

Usage (see Example 19 for a full sample)

C#

// To specify an aperture to a surface, we need to first create an ISurfaceApertureType and then assign it.
ISurfaceApertureType Rect_Aper = TheLDE.GetSurfaceAt(2).ApertureData.CreateApertureTypeSettings(SurfaceApertureTypes.RectangularAperture);
Rect_Aper._S_RectangularAperture.XHalfWidth = 10;
Rect_Aper._S_RectangularAperture.YHalfWidth = 10;
TheLDE.GetSurfaceAt(2).ApertureData.ChangeApertureTypeSettings(Rect_Aper);
TheLDE.GetSurfaceAt(3).ApertureData.PickupFrom = 2;
Base interface for settings specific to a SurfaceApertureTypes. This interface can be retrieved from ...
Definition: InterfacesLDE.cs:4729
SurfaceApertureTypes
Definition: InterfacesLDE.cs:4597

C++

// To specify an aperture to a surface, we need to first create an ISurfaceApertureType and then assign it.
ISurfaceApertureTypePtr Rect_Aper = TheLDE->GetSurfaceAt(2)->ApertureData->CreateApertureTypeSettings(SurfaceApertureTypes_RectangularAperture);
Rect_Aper->_S_RectangularAperture->XHalfWidth = 10;
Rect_Aper->_S_RectangularAperture->YHalfWidth = 10;
TheLDE->GetSurfaceAt(2)->ApertureData->ChangeApertureTypeSettings(Rect_Aper);
TheLDE->GetSurfaceAt(3)->ApertureData->PickupFrom = 2;

Matlab

% To specify an aperture to a surface, we need to first create an ISurfaceApertureType and then assign it.
Rect_Aper = TheLDE.GetSurfaceAt(2).ApertureData.CreateApertureTypeSettings(ZOSAPI.Editors.LDE.SurfaceApertureTypes.RectangularAperture);
Rect_Aper.S_RectangularAperture_.XHalfWidth = 10;
Rect_Aper.S_RectangularAperture_.YHalfWidth = 10;
TheLDE.GetSurfaceAt(2).ApertureData.ChangeApertureTypeSettings(Rect_Aper);
TheLDE.GetSurfaceAt(3).ApertureData.PickupFrom = 2;
Definition: InterfacesLDE.cs:8
Definition: InterfacesEditors.cs:12
The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...
Definition: IAS_FieldCurvatureAndDistortion.cs:5

Python

# To specify an aperture to a surface, we need to first create an ISurfaceApertureType and then assign it.
Rect_Aper = TheLDE.GetSurfaceAt(2).ApertureData.CreateApertureTypeSettings(ZOSAPI.Editors.LDE.SurfaceApertureTypes.RectangularAperture)
Rect_Aper._S_RectangularAperture.XHalfWidth = 10
Rect_Aper._S_RectangularAperture.YHalfWidth = 10
TheLDE.GetSurfaceAt(2).ApertureData.ChangeApertureTypeSettings(Rect_Aper)
TheLDE.GetSurfaceAt(3).ApertureData.PickupFrom = 2

Member Function Documentation

◆ ChangeApertureTypeSettings()

bool ZOSAPI.Editors.LDE.ILDEApertureData.ChangeApertureTypeSettings ( ISurfaceApertureType  settings)

Updates the surface aperture with the specified settings. Use CurrentTypeSettings or CreateApertureTypeSettings to retrieve the appropriate settings interface.

Usage (see Example 11 for a full sample)

C#

// Add Rectangular Aperture to Surface 1
// Get surface 1, create aperture settings
Surf_1 = TheSystem.LDE.GetSurfaceAt(1);
ISurfaceApertureType rAperture = Surf_1.ApertureData.CreateApertureTypeSettings(SurfaceApertureTypes.RectangularAperture);
// Set aperture size
rAperture._S_RectangularAperture.XHalfWidth = 0.1;
rAperture._S_RectangularAperture.YHalfWidth = 0.1;
// Apply aperture settings to surface 1
Surf_1.ApertureData.ChangeApertureTypeSettings(rAperture);

C++

// Add Rectangular Aperture to Surface 1
// Get surface 1, create aperture settings
Surf_1 = TheSystem->LDE->GetSurfaceAt(1);
ISurfaceApertureTypePtr rAperture = Surf_1->ApertureData->CreateApertureTypeSettings(SurfaceApertureTypes_RectangularAperture);
// Set aperture size
rAperture->_S_RectangularAperture->XHalfWidth = 0.1;
rAperture->_S_RectangularAperture->YHalfWidth = 0.1;
// Apply aperture settings to surface 1
Surf_1->ApertureData->ChangeApertureTypeSettings(rAperture);

Matlab

% Add Rectangular Aperture to Surface 1
% Get surface 1, create aperture settings
Surf_1 = TheSystem.LDE.GetSurfaceAt(1);
rAperture = Surf_1.ApertureData.CreateApertureTypeSettings(ZOSAPI.Editors.LDE.SurfaceApertureTypes.RectangularAperture);
% Set aperture size
rAperture.S_RectangularAperture_.XHalfWidth = 0.1;
rAperture.S_RectangularAperture_.YHalfWidth = 0.1;
% Apply aperture settings to surface 1
Surf_1.ApertureData.ChangeApertureTypeSettings(rAperture);

Python

# Add Rectangular Aperture to Surface 1
# Get surface 1, create aperture settings
Surf_1 = TheSystem.LDE.GetSurfaceAt(1)
rAperture = Surf_1.ApertureData.CreateApertureTypeSettings(ZOSAPI.Editors.LDE.SurfaceApertureTypes.RectangularAperture)
# Set aperture size
rAperture._S_RectangularAperture.XHalfWidth = .1
rAperture._S_RectangularAperture.YHalfWidth = .1
# Apply aperture settings to surface 1
Surf_1.ApertureData.ChangeApertureTypeSettings(rAperture)
Parameters
settingsThe new settings.
Returns
Examples
CSharpStandalone_11_Basic_Seq.cs, and CSharpStandalone_19_Surface_Properties.cs.

◆ CreateApertureTypeSettings()

ISurfaceApertureType ZOSAPI.Editors.LDE.ILDEApertureData.CreateApertureTypeSettings ( SurfaceApertureTypes  type)

Creates the a settings interface for the specified aperture type. Note that changing these settings will have no effect until you call ChangeApertureTypeSettings.

Usage (see Example 11 for a full sample)

C#

// Add Rectangular Aperture to Surface 1
// Get surface 1, create aperture settings
Surf_1 = TheSystem.LDE.GetSurfaceAt(1);
ISurfaceApertureType rAperture = Surf_1.ApertureData.CreateApertureTypeSettings(SurfaceApertureTypes.RectangularAperture);
// Set aperture size
rAperture._S_RectangularAperture.XHalfWidth = 0.1;
rAperture._S_RectangularAperture.YHalfWidth = 0.1;
// Apply aperture settings to surface 1
Surf_1.ApertureData.ChangeApertureTypeSettings(rAperture);

C++

// Add Rectangular Aperture to Surface 1
// Get surface 1, create aperture settings
Surf_1 = TheSystem->LDE->GetSurfaceAt(1);
ISurfaceApertureTypePtr rAperture = Surf_1->ApertureData->CreateApertureTypeSettings(SurfaceApertureTypes_RectangularAperture);
// Set aperture size
rAperture->_S_RectangularAperture->XHalfWidth = 0.1;
rAperture->_S_RectangularAperture->YHalfWidth = 0.1;
// Apply aperture settings to surface 1
Surf_1->ApertureData->ChangeApertureTypeSettings(rAperture);

Matlab

% Add Rectangular Aperture to Surface 1
% Get surface 1, create aperture settings
Surf_1 = TheSystem.LDE.GetSurfaceAt(1);
rAperture = Surf_1.ApertureData.CreateApertureTypeSettings(ZOSAPI.Editors.LDE.SurfaceApertureTypes.RectangularAperture);
% Set aperture size
rAperture.S_RectangularAperture_.XHalfWidth = 0.1;
rAperture.S_RectangularAperture_.YHalfWidth = 0.1;
% Apply aperture settings to surface 1
Surf_1.ApertureData.ChangeApertureTypeSettings(rAperture);

Python

# Add Rectangular Aperture to Surface 1
# Get surface 1, create aperture settings
Surf_1 = TheSystem.LDE.GetSurfaceAt(1)
rAperture = Surf_1.ApertureData.CreateApertureTypeSettings(ZOSAPI.Editors.LDE.SurfaceApertureTypes.RectangularAperture)
# Set aperture size
rAperture._S_RectangularAperture.XHalfWidth = .1
rAperture._S_RectangularAperture.YHalfWidth = .1
# Apply aperture settings to surface 1
Surf_1.ApertureData.ChangeApertureTypeSettings(rAperture)
Parameters
typeThe type.
Returns
Examples
CSharpStandalone_11_Basic_Seq.cs, and CSharpStandalone_19_Surface_Properties.cs.

◆ SetPickupNone()

void ZOSAPI.Editors.LDE.ILDEApertureData.SetPickupNone ( )

Sets PickupFrom to None.

Property Documentation

◆ CurrentType

SurfaceApertureTypes ZOSAPI.Editors.LDE.ILDEApertureData.CurrentType
get

Gets the current aperture type.

The type of the current aperture.

◆ CurrentTypeSettings

ISurfaceApertureType ZOSAPI.Editors.LDE.ILDEApertureData.CurrentTypeSettings
get

Gets the current aperture type settings. Note that to change the aperture type use CreateApertureTypeSettings and ChangeApertureTypeSettings.

The current aperture type settings.

◆ DisableClearSemiDiameterMarginsForThisSurface

bool ZOSAPI.Editors.LDE.ILDEApertureData.DisableClearSemiDiameterMarginsForThisSurface
getset

Disable Clear Semi Diameter Margins for this Surface. When enabled, this will cause the values specified in the system explorer for ISDApertureData.SemiDiameterMargin and ISDApertureData.SemiDiameterMarginPct to be ignored.

◆ IsPickedUp

bool ZOSAPI.Editors.LDE.ILDEApertureData.IsPickedUp
get

Gets a value indicating whether the aperture data is being picked up from another surface. If true, ChangeApertureTypeSettings will always return false.

true if this instance is picking up settings from another surface; otherwise, false.

◆ PickupFrom

int ZOSAPI.Editors.LDE.ILDEApertureData.PickupFrom
getset

Gets or sets the surface to pickup settings from.

The surface number to pickup (0 for None).

Examples
CSharpStandalone_19_Surface_Properties.cs.

Connect with Ansys