Skip to main content

Long ago, people reverse engineered the .zmx file format.  However, this was never a supported file format.

What interest exists for an open source file format for lens systems?

Such a file format (analogous to STEP) would enable inter-operability between commercial and open source software.

Not all of us can afford to purchase all the software that Ansys offers.  I can’t work entirely in the Ansys eco-system.  Can you?  An open source format would allow me to work better with other software vendors and state-of-the-art software developed in universities or in open source.

Hi Brian,

The ZMX file itself is text-based and, although you'll probably need an Ansys license to decipher some of the flags like “Ignore This Surface” or “Square Edges To Next Surface”, these are not really needed for the optical design itself.

The one area where creating a JSON-like format would be including a private glass catalog in the ZMX itself.  Right now, you always need at least 2 files to run a ray trace, the actual ZMX and the AGF glass catalog.  Even working with coworkers who’ve used Zemax for decades, they sometimes still just send the ZMX rather than the ZAR, so having a unified file format would be fantastic.


Yes the ZMX file is text based, but it is not documented or supported.  This means it can change at any time and you can’t rely on it to make investments in software to use it.

Capturing geometry in a json file will help to integrate with design, analysis, systems engineering, ...

 


It’s true that the .ZMX format could ‘change at any time’ but the Zemax team has kept it very stable since inception. A file written in the original MAX code can still be read by the latest version. So I don’t think you should expect any changes to the ZMX that break backwards compatibility.

That said, I do think it would be great to document the .ZMX file format in the help file.

  • Mark

Reply