RayCrafterdocumentation

Simple ray tracing with off-the-shelf optics. Very early software: expect rough edges.

Files and reports

Save your work as a RayCrafter project. Use Zemax files to exchange designs with other programs.

Project files

File → Save and Save As write a project file, ending in .raycrafter; File → Open reads one back. A project keeps the whole design: every lens with its full prescription, apertures and the aperture stop, all fields and their colour settings, assemblies, locked gaps, the source and image planes, the detector, the back aperture, your named designs and, for an imported design, the original Zemax file. (The Lock focus button is not saved.) Because each lens is stored in full, a later change to the catalogue does not change a saved design.

The window title shows the project’s name and marks unsaved changes. RayCrafter asks before New, Open, Import or Quit would throw changes away.

File → Open Recent lists the last five files you opened, saved or imported.

File → New from Example starts from a ready-made design, such as a beam expander, a telescope or a microscope.

Importing Zemax files

File → Import ZMX replaces the design with the system in a .zmx file. RayCrafter works with whole lenses, so the import is not exact: a dialog lists whatever was simplified. Read it. See how lenses work compared with Zemax for what changes and what cannot be loaded.

Exporting to Zemax

File → Export ZMX writes a .zmx file. It does not save your design, because a ZMX file cannot hold all of it:

Exported files currently look wrong in Zemax (#9). Do not rely on them yet.

Exporting to CAD (STEP)

File → Export STEP writes the lenses, and rays if you want them, for CAD programs, where you can design the mounts. It needs an optional library; without it, RayCrafter says how to install it.

User parts

A user part is a saved assembly, which may include apertures. Each is a small .raycrafter-part file in your own data folder, so it is available in every design:

macOS~/Library/Application Support/RayCrafter/parts
Windows%APPDATA%\RayCrafter\parts
Linux~/.local/share/raycrafter/parts

To share a part, copy its file into someone else’s folder. RayCrafter cannot yet rename or delete parts (#62). To delete one, delete its file.

Web report

View → Web report opens a page about the current design in your web browser: the first-order numbers, the ray diagram, an interactive 3D view and the analysis plots, with those that apply only sometimes (distortion, colour, glass losses and dispersion, the detector, where scanned beams cross) when they do. Click the ? beside a plot for an explanation of what it shows. The Tutorial switch adds the teaching overlays.

From Python, write_report writes the report to a file.