- Home
- CAD Exchange
- How to Import CAD Objects
- Home
- Non Sequential Ray Tracing
- Objects
- How to Import CAD Objects
How to Import CAD Objects
- By Mark Nicholson
- Published 13 September 2005
- CAD Exchange , Objects
-
Rating:




Comments on Accuracy and Ray Tracing Speed
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.