Hi,
I tried to trace some ray in C++ through a simple test lens file with two surfaces after the lens and the IMAGE surface (see file).
I create a batch with CreateDirectunpol() function but I noticed two behaviors that seemed strange to me :
- when I set toSurface parameter to a negative number (CreateDirectUnpol(1000, RaysType_Paraxial, 0, -1) for example), no error are thrown, and the function does not return nullptr. Even more strange, I could add rays, trace them and read output result. Obviously, rays were unchanged.
- when I set toSurface parameter to TheSystem->LDE->NumberOfSurfaces, I have the exact same output as TheSystem->LDE->NumberOfSurfaces - 1.
Do you have any explanation for these behaviors ?
Thanks