"Chip Zone" and "Mech Semi-Dia" for User-Defined Surfaces

  • 14 May 2020
  • 2 replies
  • 185 views

Symptom: I ran into a problem when trying the set LDE cell-values for user-defined surfaces with the python ZOS-API. Setting/getting the values (IntegerValue as much as DoubleValue) caused an error:



pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'Zemax', 'Expected Double, got 'String'', None, 0, -2147024809), None)

Cause: I could trace back the error to the entries '-' for the 'Chip Zone' and 'Mech Semi-Dia' columns: It seems like an update of these two is triggerred  after setting (or getting) a value in the respective LDE row. This update does not tolerate the string-type entry '-'. I looked through several UDS examples and the issue appears the same.


Limited workaround: I found that setting/getting the desired LDE values for the UDS indirectly via the a configuration and the MCE is still possible -- so this can be a workaround for me at the moment. But I can think about systems, where I would not want to include the respective parameters in an already crowded MCE.


My question: is there a way to set the chip zone and mechanical semi-diameter with the UDS DLL? Could they even be calculated inside a DLL? It looks like the standard examples do not include that route, and I could not find entries that I would attribute to the two parameters in the FIXED_DATAn structures.


2 replies

Hello Stefan,


To answer your question, no the Chip Zone and Mech. Semi-Diamter parameters are not supported in the UDS. The reason for this, is these parameters are not supported in most non-rotationally symmetric surfaces. 


However, this does not mean that you are not able to build these into your UDS. You could create new paramaters for Chip Zone and Mech. Semi-Diam and you would have to describe how these numbers effect your sag in 'Case 3' of the UDS. You will probably not have to update 'Case 5' because rays should not trace through the Chip Zone/Mech Semi-Diam. 


To adress the cause of your question - are you receiving this error when trying to set values other than the 'Chip Zone' and 'Mech. Semi-Diam'? For example, if you wanted to change the 'Radius' on the UDS do you receive an error?


-Kaleb

Hi Kaleb,



thank you for your answer (which I am only noticing now). Thanks for your suggestions. Following up on your question: yes the error ocurred when setting parameters other than 'Chip Zone' and 'Mech. Semi-Diam.'. This as back in OpticStudio 19. When I find some time, I'll try it now in 21 an see if I can still produce this error.


-S

Reply