Skip to main content
Solved

How to set STOP surface using ZOS-API?

  • November 17, 2023
  • 3 replies
  • 155 views

dgeorgiev

Hi,

i am new and playing with zos-api and programmatically defining an optical system in sequential mode.

However, i was not able to find how to set the STOP surface using the zos-api.

Any hints? Your advice is highly appreciated.

Best answer by chaasjes

Ah, my apologies, I misread your question. Maybe I shouldn't respond to these questions during the weekend ;), apparently it doesn't improve the quality of my answers.Yes, if you want a setter, this is the way to go (at least it's what I use, and I think the implementation makes sense if you consider how it is done in OpticStudio). Thanks for the heads up!

3 replies

chaasjes
Forum|alt.badge.img
  • Visible
  • 38 replies
  • November 17, 2023

Hi @dgeorgiev,

If you have an ILensDataEditor object TheLDE, you can get the index of the stop surface from TheLDE.StopSurface.

If you are using ZOSPy (which is worth a try if you are getting started with the ZOS-API), you can access this property through oss.LDE.StopSurface.


dgeorgiev
  • Author
  • Infrared
  • 12 replies
  • November 21, 2023

Thank you for the hint @chaasjes,

this is nice way  to realize a getter.

For setter the follwing worked for me

oss.LDE.GetSurfaceAt(xx).IsStop=True

 

P.S. As you can see it in the right flavour. :-)

 

 


chaasjes
Forum|alt.badge.img
  • Visible
  • 38 replies
  • Answer
  • November 21, 2023

Ah, my apologies, I misread your question. Maybe I shouldn't respond to these questions during the weekend ;), apparently it doesn't improve the quality of my answers.Yes, if you want a setter, this is the way to go (at least it's what I use, and I think the implementation makes sense if you consider how it is done in OpticStudio). Thanks for the heads up!