How to export a lens to CAD

This article is part of the Imaging System Fundamentals and the Illumination Systems Fundamentals free tutorials.

In the creation of an optomechanical system, the optical engineer needs to be able to share his finalized optical design with the mechanical engineer so that the mechanical geometry around the assembly can be built and a virtual prototype of the full optomechanical design can be created.

In this article, we will show how the Export CAD File tool can be used for this purpose in the case of a singlet lens and explain some of the export settings and tool limitations.

Authored By Alastair Humphrey, Alessandra Croce and Flurin Herren


Article Attachments


The Export CAD Files tool may be used to export sequential or non-sequential components to common CAD file formats such as IGES, STEP, and SAT. This is particularly convenient to migrate the optical design from OpticStudio to mechanical design software, such as CREO or Ansys SpaceClaim, which can be used to model the necessary mechanical components and create a virtual prototype of the full optomechanical design. The Export CAD File tool may also be used to export the ray path across the system, providing mechanical engineers with a useful guideline that can be exploited to avoid beam clipping.


Exporting a singlet lens

The file attached to this article contains a simple singlet that has been constructed in Sequential mode. Once you open it, you can navigate to File...CAD Files to open the Export CAD Files tool. This opens a separate dialog window with a number of different settings controlling the export options. The most commonly used settings are briefly described below. More details can be found in the OpticStudio Help Files at "The File Tab...Export Group...CAD Files."

Let’s assume you only want to export the two surfaces making up the singlet, i.e. the front and rear surfaces. This can be quickly achieved by selecting:

  1. The range of surfaces to export via First Surface and Last Surface
  2. The format to which the surfaces should be exported via File Type (OpticStudio supports export to STEP, IGES, SAT and STL formats)
  3. OK




Clicking OK opens a standard file explorer window. In this window:

  1. Enter a File name;
  2. Select a file location;
  3. Select Save to run the tool and export the desired surfaces.




How to export rays

The Export CAD File tool can also be used to export ray information into IGES, STEP and SAT formats. Note that STL format does not support a line entity, so when exporting to STL format, no rays are exported.

Let’s now assume you wish to export the full system, with similar settings as the example above, but this time including rays at both Field points as shown in OpticStudio Layout plot.




To do so, open File...CAD Files and specify:

  1. The full range of surfaces by selecting First Surface: 1 Stop is free to move and Last Surface: 4
  2. The ray pattern and density to export by selecing Ray Pattern: XY Fan and Number Of Rays: 7
  3. Wavelength: All and Field: All to export all rays. 

Finally, just proceed to run the tool as described above.




The STEP file created may be opened in CAD software, for example, Ansys SpaceClaim to yield the same distribution of rays that were displayed in OpticStudio.




Note that CAD software does not read and show ray information by default. To learn how to get SolidWorks and Autodesk Inventor to display the exported rays, refer to the Knowledgebase article, "How to show exported rays in SolidWorks and Autodesk Inventor."

The Export CAD File tool can also be used in Non-Sequential Mode. The main difference is that the Number of Rays and Ray Pattern options are greyed out. This is because the number and distribution of rays to export are controlled by the Source Objects being exported and their # Layout Rays parameter in the Non-Sequential Component Editor.


Coordinate origin within optical system

As visible on the image of the exported Singlet above, the origin of the global coordinate system within the CAD environment is set at the beginning of the rays. This is because Surface 1 (STOP Surface) is set as the Global Coordinate Reference in the Surface Properties of OpticStudio. To change the coordinate system origin point of the exported cad file, another surface can be set to be the Global Coordinate Reference surface.


Taking the Singlet as show case example, it can be observed that the origin of the global coordinate system shifted from the beginning of the rays to the front surface of the lens.



Limitations of exported data

OpticStudio supports many types of complex surface and object shapes. Within OpticStudio, these shapes are modeled exactly, yielding the very high numerical precision required for optical ray trace analysis. However, most of the complex optical shapes OpticStudio supports have no analog in commonly used CAD programs and no exact representation in common CAD file formats such as IGES, STEP, and SAT.

For this reason, OpticStudio must approximate the exact surface shape with the closest available analog within the CAD format. This approximation is usually very good, but for some extremely precise aspheric surface shapes, the approximation is not sufficiently accurate for ray tracing. This is not a limitation of OpticStudio. This is a limitation of the CAD data exchange format and the CAD programs OpticStudio is being asked to export data to. In these rare cases, it may be necessary to recreate the complex geometry within the CAD program directly rather than use the OpticStudio export capability. For more information about accuracy of CAD exchange refer to "How accurate is the CAD exchange?"



Was this article helpful?
7 out of 7 found this helpful



Article is closed for comments.