Solved

How to get wavelength data using dll in NSC mode

  • 14 April 2023
  • 2 replies
  • 60 views

Dear Sir/Madam,

I am working on dll for NSC and at the moment did an export of all available data, which dll received during the call from Zemax. However, I do not see the wavelength. Which data[??] I should call to get wavelength/reference wavelength values while developing dll for NSC as an object? Or there is another way around to do it. Please check the attached code with my investigation. Thank you very much in advance!

Best regards,
Yiming

icon

Best answer by Mark.Nicholson 14 April 2023, 18:28

View original

2 replies

Userlevel 7
Badge +3

Hi Yiming,

The DLL does not do any raytracing, so it does not need the wavelength of the ray.

The DLL describes an object, which is a shape. So the DLL must be able to create a list of vertices for drawing the object on screen, define faces that take coatings and it must be able to iterate a ray with given x,y,z,l,m,n to an exact point on the surface and compute the surface normal at that point. All this data is independent of the ray wavelength. OpticStudio then does the raytracing using the ray wavelength and material properties.

This is a key difference between sequential DLLs and non-sequential DLLs. The sequential DLL has to trace the ray and give output direction cosines, the NSC one does not.

  • Mark

Hi Yiming,

The DLL does not do any raytracing, so it does not need the wavelength of the ray.

The DLL describes an object, which is a shape. So the DLL must be able to create a list of vertices for drawing the object on screen, define faces that take coatings and it must be able to iterate a ray with given x,y,z,l,m,n to an exact point on the surface and compute the surface normal at that point. All this data is independent of the ray wavelength. OpticStudio then does the raytracing using the ray wavelength and material properties.

This is a key difference between sequential DLLs and non-sequential DLLs. The sequential DLL has to trace the ray and give output direction cosines, the NSC one does not.

  • Mark

Dear Mark,

Thank you very much for your prompt reply with professional assistance!! Now it is clear for me! 😊

Best regards,

Yiming

 

Reply