Closed pwarciszewski closed 1 year ago
Hi, After clicking the "Refocus" function the calculated distance is getting accumulated each time when the function is invoked. As result, the focal plane is getting shifted from the correct position. I believe that the bug is in this line: https://github.com/mjhoptics/ray-optics/blob/311a030908eed9b7a18ce972a30def706c78257e/src/rayoptics/gui/appcmds.py#L374
Replacing += with = seems to solve the issue.
+=
=
Best, pwarciszewski
Fixed in this commit
Thanks for reporting and investigating it. Mike
Description
Hi, After clicking the "Refocus" function the calculated distance is getting accumulated each time when the function is invoked. As result, the focal plane is getting shifted from the correct position. I believe that the bug is in this line: https://github.com/mjhoptics/ray-optics/blob/311a030908eed9b7a18ce972a30def706c78257e/src/rayoptics/gui/appcmds.py#L374
Solution
Replacing
+=
with=
seems to solve the issue.Best, pwarciszewski