Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various display properties #437

Merged
merged 9 commits into from
Apr 21, 2022
Merged

Fix various display properties #437

merged 9 commits into from
Apr 21, 2022

Conversation

JLBegin
Copy link
Contributor

@JLBegin JLBegin commented Apr 21, 2022

  • Fixed a few display properties inside ImagingPath that were not linked to the Figure.
  • Fixed some design parameters that were not accessible from the design() method.
  • Added showObjectImage design parameter. Useful when using non-interactive display to hide the ObjectRays group.
  • Allow creation of Point(fixToAxis=False) objects that are not anchored to the Z-axis (still anchored by default). Useful if the user wants to draw custom points on the display.

@JLBegin JLBegin added bug Something isn't working enhancement New feature or request labels Apr 21, 2022
@JLBegin JLBegin requested a review from dccote April 21, 2022 14:13
@JLBegin JLBegin self-assigned this Apr 21, 2022
Copy link
Contributor

@dccote dccote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il y a beaucoup de warnings par rapport a l'utilisation de "is" au lieu de " == " dans figure.py. Peux-tu les corriger? Ca apparait lorsqu'on roule les tests.

En fait, je pense que le mieux serait de prendre issubclass pour etre plus general.

/Users/dccote/GitHub/RayTracing/raytracing/figure.py:207: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if instance is 'ObjectRays':
/Users/dccote/GitHub/RayTracing/raytracing/figure.py:217: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if instance is 'LampRays':
/Users/dccote/GitHub/RayTracing/raytracing/figure.py:226: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if instance is 'ObjectRays':
/Users/dccote/GitHub/RayTracing/raytracing/figure.py:231: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif instance is 'LampRays':
/Users/dccote/GitHub/RayTracing/raytracing/figure.py:389: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif type(rays).__name__ is 'LampRays':
/Users/dccote/GitHub/RayTracing/raytracing/figure.py:551: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if backend is 'matplotlib':
/Users/dccote/GitHub/RayTracing/raytracing/figure.py:569: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if backend is 'matplotlib':
/Users/dccote/GitHub/RayTracing/raytracing/graphics.py:456: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if instance is 'Lens':
/Users/dccote/GitHub/RayTracing/raytracing/graphics.py:458: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if instance is 'Space':
/Users/dccote/GitHub/RayTracing/raytracing/graphics.py:460: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if instance is 'Aperture':
...

@JLBegin
Copy link
Contributor Author

JLBegin commented Apr 21, 2022

Il y a beaucoup de warnings par rapport a l'utilisation de "is" au lieu de " == " dans figure.py. Peux-tu les corriger? Ca apparait lorsqu'on roule les tests.

Ok ce n'était pas visible de mon côté, mais je comprends que ca vient de Python 3.8+. Je vais corriger ca.

@JLBegin JLBegin requested a review from dccote April 21, 2022 15:28
@dccote dccote merged commit 503f893 into master Apr 21, 2022
@dccote dccote deleted the improve-design-parameters branch April 21, 2022 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants