Skip to content

Exporting and importing self designed components #128

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

You must be logged in to vote

Hello @Joostth98,
Thank you for posting this question. I've put together an example below to show how to save and combine lens models in ray-optics. Please let me know if you have further questions.
Thank you!
Mike Hayford

Issue #128 - Combining files example

This example uses the add_from_file method of the OpticalModel to insert the lens in the file into the optical model. Any file type that can be imported by ray-optics (e.g. .zmx, .seq, .roa) can be used.

The example is in 3 parts:

  • Create an apochromatic triplet model and save it
  • Create an orthoscopic eyepiece model and save it
  • Using add_from_file, create a telscope model from the objective and eyepiece models.

The lens prescription…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by Joostth98
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