file formats. The choice of CAD format you use is likely to be based on the CAD program you use. STL is good for objects that are inherently faceted, or where you will use stereolithography to generate rapid prototypes. IGES and STEP are CAD exchange standards, and the choice between them will probably be based on the quality of your CAD program's export routines. SAT format will be used if your CAD program is based on the ACIS engine.
The ability to import CAD objects into ZEMAX is very important, particularly when undertaking complex opto-mechanical stray light simulations, where reflections and scattering from mounts is critical. It is also important in illumination system, where light may be directed down a complex-shaped lightpipe, for example in automotive dashboard design. ZEMAX has powerful and flexible CAD import capabilities, and supports common CAD exchange formats.
Because CAD objects can be of arbitrary complexity, a ray may interact with it many times. As a consequence, we use non-sequential ray-tracing to describe the interaction of rays with CAD objects. CAD objects may be easily included in otherwise sequential optical systems by using hybrid mode non-sequential ray-tracing.
ZEMAX supports four CAD formats: STL, IGES, STEP and SAT. Of these, only STL uses facets to represent the object: the other three model the object as a smooth, continuous surface shape. Facets are only used to draw these objects on screen. Therefore ray-tracing to the continuous, smooth CAD surface is exact, at least to the limit of the accuracy of the CAD model, despite facets being used to draw the object.
Its important to realize that although ZEMAX supports genuinely faceted objects, in most cases facets are only used for rendering purposes, and the real surface shape used for ray-tracing is exact.
STL (Stereolithography Tesselation Language) format is widely used in rapid prototyping, and allows easy definition of very general shapes. It is based on a tri-mesh representation of the object, in which the surface shape of the object is approximated by a set of triangular facets.
Reference 1 gives a useful overview of the STL format. Each facet in an STL file is defined by the {x,y,z} coordinates of the three corners, and the surface normal vector. Here, for example, is the first few lines of a sample .stl file produced by AutoCAD:
solid AutoCAD |






There are a set of properties that you can use to control the Imported object. These controls apply also to STEP and SAT objects:
The properties are:
STEP, the Standard for the Exchange of Product Model Data, is a comprehensive ISO standard (ISO 10303) that describes how to represent and exchange digital product information. Reference 4 contains a lot of information on STEP.
For the ZEMAX user there is little to choose between IGES and STEP. Both work well with ZEMAX, and your choice between these two standards is likely to be based on the quality of your CAD program's export routines. IGES is the older format, and several CAD vendors use their own export translator, which leads to some variation between vendors. STEP is newer, and most CAD vendors use bought-in libraries like Step Tools, which means that there may be more uniformity between different CAD packages' implementation of STEP.
STEP objects are accessed and behave exactly like IGES objects in ZEMAX.
Objects from CAD packages import easily using the STL Object for faceted objects and Imported Object for continuous, smooth objects using IGES, STEP or SAT file formats.
Not all types of surface shapes may be ray traced with adequate accuracy using representations supported by CAD file formats, such as IGES, SAT, and STEP. For planes, spheres, and cylinders, the CAD representation, if done correctly, is of very high precision suitable for optical accuracy ray tracing. However, higher order shapes do not usually have a native representation in CAD formats.
For example, an aspheric surface with a polynomial term of the form r16 may have no equivalent representation in the chosen CAD format. A CAD program will generally approximate this shape using a segmented spline3, which is in general a piece-wise fit of the surface using multiple lower order polynomials. Typically, multiple third or fourth order polynomials are used to approximate the surface. This is probably adequate for mechanical design, but not for optical precision ray tracing, where surfaces must be know to tiny fractions of the wavelength of light.
This problem often arises when a high optical precision surface is modeled in ZEMAX, then exported as a CAD file, then imported as an CAD file for subsequent ray tracing. The optical precision of the part is lost upon exporting the native ZEMAX asphere as a CAD spline.
For non-imaging optics, and when importing mechanical parts for stray-light analysis, the precision of the CAD representation is usually adequate. For imaging systems, great care must be taken to verify that the imported CAD part is a suitably accurate description of the desired shape. Note ZEMAX uses a relative internal optical precision of about 1E-12 for ray tracing. Most CAD representations of objects are many orders of magnitude more coarse.
Simple objects such as spherical lenses typically ray trace slower when imported in CAD format than the native ZEMAX object of identical shape. In general, always use ZEMAX's built-in objects where a suitable object exists. Ray tracing speed for imported objects is critically dependent upon the efficient representation of the solid shape within the imported file.
The identical object may be represented in a nearly infinite number of ways using the various solid and surface entity types supported by the CAD formats ZEMAX can import. For example, an efficient representation of an object may use only a few spline surfaces; while an inefficient representation of the object may use hundreds of smaller spline surfaces. Although from a mechanical modeling perspective the two representations may both be valid and the resulting solids identical, the representation with the larger number of spline surfaces will ray trace slower. The only remedy is to return to the source of the CAD file and see if a more efficient representation may be generated. We have experience of seeing several orders of magnitude difference in both exported object size and ray-tracing speed by tuning the CAD programs export routines to yield the most efficient representation.
Importing CAD objects allows ZEMAX to take advantage of the generality of design that mechanical CAD programs allow. This is particularly important when performing stray light analysis, as a full accounting of opto-mechanical effects can be made. CAD import is also useful in a wide range of illumination work, including automotive component testing.
The choice of CAD format you use is likely to be based on the CAD program you use. STL is good for objects that are inherently faceted, or where you will use stereolithography to generate rapid prototypes. IGES and STEP are CAD exchange standards, and the choice between them will probably be based on the quality of your CAD program's export routines. SAT format will be used if your CAD program is based on the ACIS engine.
External References
1. http://www.mmsonline.com/articles/019704.html
2. http://www.nist.gov/iges
3. The NURBS Book, Second Edition, by Les Piegl and Wayne Tiller, Springer-Verlag, ISBN 3-540-61545-8.
4. http://www.steptools.com/
5. http://www.spatial.com/
ACIS and SAT are registered trademarks of Spatial Corporation.