Solved

How to set STOP surface using ZOS-API?

  • 17 November 2023
  • 3 replies
  • 74 views

Userlevel 1

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.

icon

Best answer by chaasjes 21 November 2023, 13:52

View original

3 replies

Userlevel 3
Badge

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.

Userlevel 1

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. :-)

 

 

Userlevel 3
Badge

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!

Reply