- 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:




STL Format
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 |
(Note that ZEMAX imports both ASCII and binary versions of the STL format). The faceted nature of STL makes it ideal for modelling objects like faceted reflectors and prisms. However, it is less good at modelling smoothly curved objects, where the facetization errors are likely to affect ray-tracing accuracy.
STL objects are imported using the STL object type. The .stl file must be placed in the {zemaxroot}/objects folder.

Once imported it is positioned like any other object.
In this example, the prism is exactly modelled by flat facets, but the sphere is only approximated:

The sphere is formed by a tri-mesh approximation:

In this case, the facets drawn on screen are exactly those generated in the STL file, and rays interact with a series of flat facets.