Skip to content

PartTree question #77

Answered by mjhoptics
dibyendumajumdar asked this question in Q&A
Discussion options

You must be logged in to vote

This is code that I hope I never have to change again... The use cases it's attempting to handle include:

  1. single lens
  2. single mirror
  3. cemented lenses (2 or more)
  4. Mangin mirror (lens with mirror coat on rear surface, i.e. a buried reflector)
  5. cemented Mangin mirror

The modification of i within the loop is intended and there are no side effects because every time thru the loop, the enumerate function returns a new value for i. I can't say that I'm proud of this code, but it works.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dibyendumajumdar
Comment options

Answer selected by dibyendumajumdar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants