ZEMAX Users' Knowledge Base - http://www.zemax.com/kb
How Do I Change The Size and Shape of An Optical Component?
http://www.zemax.com/kb/articles/161/1/How-Do-I-Change-The-Size-and-Shape-of-An-Optical-Component/Page1.html
By Mark Nicholson
Published on 23 February 2007
 
Question: ZEMAX draws all my optical surfaces as if they has circular apertures. How do I make it draw a rectangular cross-section, or some general cross-section?

How Do I Change the Size and Shape of an Optical Component?
Question: ZEMAX draws all my optical surfaces as if they has circular apertures. How do I make it draw a rectangular cross-section, or some general cross-section?

By default, ZEMAX assumes that all optical surfaces are of circular shape, and it computes the size of the circle by tracing marginal rays and setting the semi-diameter of the surface equal to the largest radial distance a marginal ray makes. (In non-sequential ray-tracing, the aperture of objects is defined as an object-specific set of parameters.)

This makes each surface just big enough to allow the marginal rays through. It is usually required to make the real lens larger than this: for example, the lens mount will need some glass to clamp against, and so the lens must be made larger than this semi-diameter. In some cases, the surface is in a caustic, and the marginal rays are not the limiting rays that should be used to define the component size. In other cases, it is required to make lenses with rectangular or other cross-sections. This is easy to achieve.

One way to make the lens larger than the circular aperture computed by ZEMAX, is to simply type the desired semi-diameter into the semi-diameter column in the Lens Data Editor. Alternatively, click on General...Miscellaneous and tell ZEMAX to add a margin either as a fixed amount in lens units, or as a percentage of the semi-diameter. This is particularly useful during optimization, as it ensures the lens is always large enough to be mounted.

A margin can be easily added to the semi-diameter of any surface

To define other aperture shapes, double-click on the surface, and in its properties dialog, go to the Aperture tab:
 
Any kind of aperture may be applied. In this case a rectangualr aperture is being used.

You may add circular, elliptical, rectangular or user-defined apertures to the surface. It is usual, but not required, to use the same aperture shape on both sides of the component. For example, here is a cylindrical lens ground to have a rectangular aperture: 

A cylinder lens with rectangular paertures

See the sample file provided with ZEMAX at {ZEMAX root}\Samples\Sequential\Miscellaneous\Cylinder.zmx for a good example.

More complex apertures are easily defined using the user-defined aperture capability. All  aperture types can be decentered for ease of placement.