Documentation

Engineering

Importing .zmx lenses

File → Import .zmx lens… reads a Zemax prescription file and builds it on the bench, with a screen placed on the image surface.

What comes across

ZemaxBecomes
STANDARD surfacesSpherical or conic surfaces, with CURV and CONI
EVENASPH surfacesAspheric terms (ρ⁴ … ρ¹⁰). The ρ² term is not used and is reported
DISZSpacing between surfaces
DIAMAperture. Missing diameters default to 25.4 mm and are logged
GLASMatched to a built-in glass, to a loaded catalogue, or approximated from the nd/Vd on the line
UnitsConverted to millimetres automatically

What does not

  • Mirror surfaces are skipped — the importer builds refractive elements only.
  • Cemented doublets are modelled with a 10 µm air gap between the elements rather than a true cement layer.
  • Surface types other than STANDARD and EVENASPH are imported as STANDARD, and you are told which.
  • An unknown glass with no nd/Vd on its line falls back to BK7, and says so.

Every substitution and assumption appears in an import log, so you always know what was interpreted rather than read.

Two demos — Achromat and Asphere — are built from the sample .zmx files in the samples folder, so you can see what a clean import looks like.