xzos / PyZDDE

Zemax/ OpticStudio Extension using Python
MIT License
154 stars 64 forks source link

zSetSurfaceData with coordinate breaks #94

Closed LucVV closed 5 years ago

LucVV commented 5 years ago

Hi Indranil,

I updated the zSetSurfaceData() function to be able to handle CoordinateBreak Surfaces. The current implementation is not able to set the parameters of these surfaces, as these parameters are set by codes 80 and 81 without an additional argument, while the zSetSurfaceData() function expects such an argument for all codes above 70.

Therefore, I changed the if statement that checks if the code is above 70 to an if statement that checks if the code is one of the codes that requires a second argument.

Furthermore, I updated the error handeling to be more descriptive, if an additional argument is required but not supplied.

Could you have a look at these changes?

Best,

Luc