vendredi 10 juin 2016

PyZDDE - get ray trace information in global coordinates


I have successfully traced a ray in Zemax using pyzdde. (using zGetTrace) However I need the information in global coordinates as opposed to local. is there a way to get that? Thanks.

-T

edit:

Here is the test code. The ray object returns the ray information in correct local coordinates. I need it in global. Basically the same effect when one checks the "global coordinate" box in the Zemax ray trace window.

import sys
import pyzdde.zdde as pyz

ln = pyz.createLink()

path = 'C:\'
filename = 'myZemaxFile.zmx'
fullpath = path + filename
ln.zLoadFile(fullpath)
hx = 0.0; hy = 0
px = 0.0; py = 0.0
wave = 1;surf = 4
mode = 0
# mode 0 = real
ray = ln.zGetTrace(wave,mode,surf,hx,hy,px,py)

# close the communication channel 
pyz.closeLink()

Aucun commentaire:

Enregistrer un commentaire