Volume objects designed in 3D CAD packages such as SolidWorks, ProEngineer and CATIA can be imported to ZEMAX using a variety of CAD exchange formats. This allows a wide range of objects to be used for optical modeling. However, there are some specific issues in assigning optical properties to the surfaces of such objects.

First, CAD objects are large, typically several megabytes of data. Secondly, CAD programs often export data in no discernable order, therefore requiring a phase of work in which the CAD entities that comprise the surface of the object are organized into meaningful faces.

For example, consider this optical detector system:

mobile phone lens

This object contains 178 separate CAD surfaces, which are the elemental units the CAD program uses to describe the object. Worse, they are not listed in any sequential order, so knowing where CAD surface 45 is gives no clue as to the location of CAD surface 46, for example.

Now this object comprises two lenses. One is used to provide the flash illumination of the object scene, and the other images the object scene onto the system's detector. Each path was designed separately as a sequential design in ZEMAX: the lenses were then exported to a CAD program, combined and the associated mounting hardware added. The final CAD object was re-exported back into ZEMAX for an opto-mechanical assessment of efficiency, image quality and stray light.

The object is produced by injection moulding. Only two surface finishes are used. The lens surfaces are smooth, polished and have a cold coating applied to them. All other surfaces are produced by spark-eroding the molding tool so that a rough, scattering finish is produced.

Clearly nobody wants to edit 178 CAD surfaces by hand! Also, other CAD objects can be significantly larger. For this reason, ZEMAX gives you useful options for how to allocate ZEMAX faces to CAD surfaces. This is controlled by the "Face Mode" property of the Imported object. It has these values:

  • Face Mode = 0: All surfaces are assigned face number 0. The entire object will have just one face.
  • Face Mode = 1: All surfaces whose edges meet along a non-zero length curve, and whose normal vectors along the curve of contact are parallel within a user defined angle tolerance are assigned a common face number. The angle tolerance is defined by the Face Angle (parameter 8). This mode allows control over how finely the faces are numbered. If the Face Angle is set to a large value (such as 180) then all faces that touch will share a common number. Larger Face Angles yield fewer unique faces.
  • Face Mode = 2: All surfaces are uniquely numbered. This mode yields the largest number of unique faces.
  • Face Mode = 3: Retains the face numbers defined in the imported file. Some CAD files, such as those created by ZEMAX, have face numbers already defined. If ZEMAX recognizes the face numbers, they will be used. If ZEMAX does not detect the face numbers, the surfaces will be numbered as for Face Mode = 2.
  • Face Mode = 4: All surfaces on each separate object defined in the CAD file are assigned a common face number. This option is useful for applying one property to all surfaces on each object when more than one object is defined with a single CAD file.

In this case, I have chosen to import the object using Face Mode 2, so that all surfaces are uniquely identified. There are 178 CAD surfaces. However, I only want to use two surface finishes to define the coating/scattering properties: one is well-polished, low scatter, anti-reflection coated, the other is uncoated and highly scattering. To do this, double-click on the object and go to the Faces tab of the Object Properties:



Note that each CAD surface is allocated a unique face number, up to face 50. Before launching the object viewer, we select Viewer Highlights: By Surface and then press View Object. The Object Viewer opens:



Use {left-mouse-down}{move mouse} in conjunction with the Spin control to orient the object as you wish in the viewer. Then, back in the object properties dialog, I press Select All. All CAD surfaces in the object viewer are now highlighted.




I then press the Change to -> button to change all CAD surfaces to be associated with Face 0:



And last I press Clear All so that no surfaces are highlighted. So now, all surfaces of the object have the same face number. But, I want the polished lens faces to have a different face number: face 1 for example. In the object viewer, I just click with the mouse on the object to highlight the selected faces. By clicking and spinning with the mouse, I can easily select all the faces that comprise the smooth, polished, lens areas of the object:



Clicking with the mouse on the object viewer, and using mouse spinning, is much easier than selecting the surfaces in the drop-down list on the Object Properties Face tab! Note that the CAD surfaces selected with the mouse are also highlighted in the drop-down list for convenience. Once I have highlighted all the CAD surfaces I want with the mouse, I select "Face 1" in the drop-down list of  faces, and press Change To -> again to make these surfaces all Face 1. My object now consists of just two faces, to which I can add coating and scattering functions as before: