ZOSAPI.Tools Namespace Reference
Last update: 17.07.2025Namespaces | |
| namespace | FileManager |
| namespace | General |
| namespace | Layouts |
| namespace | Optimization |
| namespace | OptimizationTools |
| namespace | RayTrace |
| namespace | Tolerancing |
Classes | |
| interface | IAPIUtilities |
| interface | IConvertToNSCGroup |
| Interfaces and methods for converting the sequential surfaces to a non-sequential group. This interface can be accessed via the IOpticalSystemTools interface. More... | |
| interface | ICriticalRaysetGenerator |
| Interfaces and methods for generating a 'critical rayset'; these rays can be used after converting to non-sequential in order to verify that the conversion did not fundamentally alter the geometries. This interface can be accessed via the IOpticalSystemTools interface. More... | |
| interface | IDesignLockdown |
| Interfaces and methods for validating a sequential design, prior to manufacturing or conversion to non-sequential. This interface can be accessed via the IOpticalSystemTools interface. More... | |
| interface | IExportToSpeosLensSystem |
| Interface to access the "Export to Speos Lens System" tool. This interface can be accessed via the IOpticalSystemTools interface. More... | |
| interface | IExportToSpeosWhitebox |
| interface | IFileManager |
| interface | IHPCSettings |
| interface | IInternalBirefringenceData |
| interface | IInternalBirefringenceParameter |
| interface | IInternalTransmissionData |
| interface | IInternalTransmissionParameter |
| interface | ILayouts |
| interface | IMaterialsCatalog |
| interface | IMFCalculator |
| Interfaces and methods for calculating the current Merit Function value. This interface can be accessed via the IOpticalSystemTools interface. More... | |
| interface | IOpticalSystemTools |
| Methods to run various system-wide tools. This interface can be accessed via the IOpticalSystem interface. Note that only one ISystemTool can be open at a time; the previous tool must be closed using ISystemTool.Close before a new one can be opened. More... | |
| interface | IShadedModelTriangleList |
| interface | IShadedModelVisualizationExport |
| Interfaces and methods for getting a set of triangles for selected parts of the system. This interface can be accessed via the IOpticalSystemTools interface. More... | |
| interface | ISystemTool |
| Base interface for all system tools. See IOpticalSystemTools for access to specific tools. More... | |
Detailed Description
Usage (see Example 15 for a full sample)
C#
// remove all variables and add a F# solve on last surface radius
ILensDataEditor TheLDE = TheSystem.LDE;
IOpticalSystemTools tools = TheSystem.Tools;
tools.RemoveAllVariables();
ILDERow Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2);
Solver._S_FNumber.FNumber = 3.1415;
Surface_Last.RadiusCell.SetSolveData(Solver);
SampleFile = System.IO.Path.Combine(TheApplication.SamplesDir, @"API\CS\e15_Seq_Optimization\OptimizedFile1.zos");
TheSystem.SaveAs(SampleFile);
Methods to run various system-wide tools. This interface can be accessed via the IOpticalSystem inter...
Definition: Tools.cs:107
bool RemoveAllVariables()
Removes all variables in the system.
Definition: InterfacesEditors.cs:12
The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...
Definition: IAS_FieldCurvatureAndDistortion.cs:5
C++
// remove all variables and add a F# solve on last surface radius
ILensDataEditorPtr TheLDE = TheSystem->LDE;
//IOpticalSystemTools
IOpticalSystemToolsPtr tools = TheSystem->Tools;
tools->RemoveAllVariables();
ILDERowPtr Surface_Last = TheLDE->GetSurfaceAt(TheLDE->NumberOfSurfaces - 2);
ISolveDataPtr Solver = Surface_Last->RadiusCell->CreateSolveType(SolveType::SolveType_FNumber);
Solver->_S_FNumber->FNumber = 3.1415;
Surface_Last->RadiusCell->SetSolveData(Solver);
SampleFile = _bstr_t(TheApplication->SamplesDir) + "\\API\\\Seq_Optimization\\\OptimizedFile1.zos";
TheSystem->SaveAs(SampleFile);
Matlab
% remove all variables and add a F# solve on last surface radius
TheLDE = TheSystem.LDE;
tools = TheSystem.Tools;
tools.RemoveAllVariables();
Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2);
Solver.S_FNumber_.FNumber = 3.1415;
Surface_Last.RadiusCell.SetSolveData(Solver);
SampleFile = System.String.Concat(TheApplication.SamplesDir, '\API\Matlab\e15_Seq_Optimization\OptimizedFile1.zos');
TheSystem.SaveAs(SampleFile);
Python
# remove all variables and add a F# solve on last surface radius
TheLDE = TheSystem.LDE
#IOpticalSystemTools
tools = TheSystem.Tools
tools.RemoveAllVariables()
Surface_Last = TheLDE.GetSurfaceAt(TheLDE.NumberOfSurfaces - 2)
Solver = Surface_Last.RadiusCell.CreateSolveType(ZOSAPI.Editors.SolveType.FNumber)
Solver._S_FNumber.FNumber = 3.1415
Surface_Last.RadiusCell.SetSolveData(Solver)
SampleFile = TheApplication.SamplesDir + '\\API\\Python\\e15_Seq_Optimization\\OptimizedFile1.zos'
TheSystem.SaveAs(SampleFile)