Skip to main content

ZOS-API interface 2024 R2

ZOSAPI.Editors.NCE.IObjectRectangularVolume Interface Reference

Last update: 17.07.2025
Inheritance diagram for ZOSAPI.Editors.NCE.IObjectRectangularVolume:

Properties

IEditorCell X1HalfWidthCell [get]
 
IEditorCell Y1HalfWidthCell [get]
 
IEditorCell ZLengthCell [get]
 
IEditorCell X2HalfWidthCell [get]
 
IEditorCell Y2HalfWidthCell [get]
 
IEditorCell FrontXAngleCell [get]
 
IEditorCell FrontYAngleCell [get]
 
IEditorCell RearXAngleCell [get]
 
IEditorCell RearYAngleCell [get]
 
double X1HalfWidth [get, set]
 
double Y1HalfWidth [get, set]
 
double ZLength [get, set]
 
double X2HalfWidth [get, set]
 
double Y2HalfWidth [get, set]
 
double FrontXAngle [get, set]
 
double FrontYAngle [get, set]
 
double RearXAngle [get, set]
 
double RearYAngle [get, set]
 
- Properties inherited from ZOSAPI.Editors.NCE.IObject
ObjectType Type [get]
 
INCERow Row [get]
 
bool IsValid [get]
 
long Id [get]
 

Detailed Description

Usage (see Example 17 for a full sample)

C#

//Rectangular Volume
//Scattering properties
//Draw:opacity set to 50%
IObjectTypeSettings oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
Object_2.ChangeType(oType_2);
Object_2.ZPosition = 2;
Object_2.Material = "N-BK7";
IObjectRectangularVolume RectVolume2_data = Object_2.ObjectData as IObjectRectangularVolume;
RectVolume2_data.X1HalfWidth = 12;
RectVolume2_data.Y1HalfWidth = 12;
RectVolume2_data.ZLength = 40;
RectVolume2_data.X2HalfWidth = 12;
RectVolume2_data.Y2HalfWidth = 12;
INCEVolumePhysicsData RectVolume2_volphysdata = Object_2.VolumePhysicsData;
RectVolume2_volphysdata.Model = VolumePhysicsModelType.AngleScattering;
RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5;
RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30;
INCEDrawData RectVolume2_Drawdata = Object_2.DrawData;
RectVolume2_Drawdata.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;
Object properties Draw tab. This interface can be accessed via the INCERow interface.
Definition: InterfacesNCE.cs:5789
Object properties Volume Physics tab. This interface can be accessed via the INCERow interface.
Definition: InterfacesNCE.cs:6551
Definition: InterfacesNCE.cs:4582
This interface is used for selecting any files required by a object, and for changing object types....
Definition: InterfacesNCE.cs:1110
Definition: InterfacesCommon.cs:9
Definition: InterfacesNCE.cs:19
VolumePhysicsModelType
Definition: InterfacesNCE.cs:6537
Definition: InterfacesEditors.cs:12
The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...
Definition: IAS_FieldCurvatureAndDistortion.cs:5

C++

//Rectangular Volume
//Scattering properties
//Draw:opacity set to 50%
IObjectTypeSettingsPtr oType_2 = Object_2->GetObjectTypeSettings(ObjectType_RectangularVolume);
Object_2->ChangeType(oType_2);
Object_2->ZPosition = 2;
Object_2->Material = "N-BK7";
IObjectRectangularVolumePtr RectVolume2_data = Object_2->ObjectData;
RectVolume2_data->X1HalfWidth = 12;
RectVolume2_data->Y1HalfWidth = 12;
RectVolume2_data->ZLength = 40;
RectVolume2_data->X2HalfWidth = 12;
RectVolume2_data->Y2HalfWidth = 12;
INCEVolumePhysicsDataPtr RectVolume2_volphysdata = Object_2->VolumePhysicsData;
RectVolume2_volphysdata->Model = VolumePhysicsModelType_AngleScattering;
RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->MeanPath = 5;
RectVolume2_volphysdata->ModelSettings->_S_AngleScattering->Angle = 30;
INCEDrawDataPtr RectVolume2_Drawdata = Object_2->DrawData;
RectVolume2_Drawdata->Opacity = ZemaxOpacity_P50;

Matlabvol

% Rectangular Volume
% Scattering Properties
% Draw:opacity set to 50%
oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume);
Object_2.ChangeType(oType_2);
Object_2.ZPosition = 2;
Object_2.Material = 'N-BK7';
RectVolume2_data = Object_2.ObjectData;
RectVolume2_data.X1HalfWidth = 12;
RectVolume2_data.Y1HalfWidth = 12;
RectVolume2_data.ZLength = 40;
RectVolume2_data.X2HalfWidth = 12;
RectVolume2_data.Y2HalfWidth = 12;
RectVolume2_volphysdata = Object_2.VolumePhysicsData;
RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering;
RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.MeanPath = 5;
RectVolume2_volphysdata.ModelSettings.S_AngleScattering_.Angle = 30;
RectVolume2_DrawData = Object_2.DrawData;
RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50;

Python

# Rectangular Volume
# Scattering Properties
# Draw:opacity set to 50%
oType_2 = Object_2.GetObjectTypeSettings(ZOSAPI.Editors.NCE.ObjectType.RectangularVolume)
Object_2.ChangeType(oType_2)
Object_2.ZPosition = 2
Object_2.Material = "N-BK7"
RectVolume2_data = Object_2.ObjectData
RectVolume2_data.X1HalfWidth = 12
RectVolume2_data.Y1HalfWidth = 12
RectVolume2_data.ZLength = 40
RectVolume2_data.X2HalfWidth = 12
RectVolume2_data.Y2HalfWidth = 12
RectVolume2_volphysdata = Object_2.VolumePhysicsData
RectVolume2_volphysdata.Model = ZOSAPI.Editors.NCE.VolumePhysicsModelType.AngleScattering
RectVolume2_volphysdata.ModelSettings._S_AngleScattering.MeanPath = 5
RectVolume2_volphysdata.ModelSettings._S_AngleScattering.Angle = 30
RectVolume2_DrawData = Object_2.DrawData
RectVolume2_DrawData.Opacity = ZOSAPI.Common.ZemaxOpacity.P50
Examples
CSharpStandalone_17_NSC_BulkScatter.cs.

Property Documentation

◆ FrontXAngle

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.FrontXAngle
getset

◆ FrontXAngleCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.FrontXAngleCell
get

◆ FrontYAngle

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.FrontYAngle
getset

◆ FrontYAngleCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.FrontYAngleCell
get

◆ RearXAngle

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.RearXAngle
getset

◆ RearXAngleCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.RearXAngleCell
get

◆ RearYAngle

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.RearYAngle
getset

◆ RearYAngleCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.RearYAngleCell
get

◆ X1HalfWidth

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.X1HalfWidth
getset

◆ X1HalfWidthCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.X1HalfWidthCell
get

◆ X2HalfWidth

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.X2HalfWidth
getset

◆ X2HalfWidthCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.X2HalfWidthCell
get

◆ Y1HalfWidth

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.Y1HalfWidth
getset

◆ Y1HalfWidthCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.Y1HalfWidthCell
get

◆ Y2HalfWidth

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.Y2HalfWidth
getset

◆ Y2HalfWidthCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.Y2HalfWidthCell
get

◆ ZLength

double ZOSAPI.Editors.NCE.IObjectRectangularVolume.ZLength
getset

◆ ZLengthCell

IEditorCell ZOSAPI.Editors.NCE.IObjectRectangularVolume.ZLengthCell
get

Connect with Ansys