Soon, we will launch a new and updated customer portal, which is an important step toward providing our customers with one place to learn, interact, and get help.
Learn more.

How to Explode a CAD Assembly

This article explains how to explode a CAD Assembly
 
Dr. Sanjay Gangadhara
07/10/2012
CAD Exchange

Introduction

Zemax supports the ability to create complex geometry objects for optical system modeling in non-sequential mode. Some of these objects, such as the Polygon object (see the article entitled “Creating Polygon Objects in Zemax”) and the Freeform Z object (see the article entitled “How to Perform Freeform Optical Design”), are built directly into Zemax. Other complex geometries may be formed using the non-sequential nesting rules (see the article entitled “How to Create Complex Non-Sequential Objects”) or Boolean operations between built-in objects (see the article entitled “How to Use the Boolean Object and the Combine Objects Tool”). The most general capability for generating a complex geometry in Zemax is via the Zemax Part Designer.

However, there may be cases in which it is not possible to generate the desired object geometry directly in Zemax. In those cases, you may need to design the objects in a CAD program. Objects designed in SolidWorks (version 2017) and Autodesk® Inventor® (version 2018) may be directly loaded into Zemax via the PartLink (see the article entitled “How to Use the PartLink Object”) and AssemblyLink (see the article entitled “How to Use the AssemblyLink Object”) technologies. Using the PartLink technology, individual parts may be dynamically modified and optimized in Zemax.

If the object geometry is created in a CAD program not currently supported by PartLink or AssemblyLink, then the object may be brought into Zemax using the Imported object (see the article entitled “How to Import CAD Objects”). Whether the CAD file represents a single part or an assembly of parts, Zemax will load the entire file as a single object.

If the CAD file represents an assembly, and this assembly is loaded into Zemax as a single object, then the entire assembly may only be given one set of volumetric properties (volume material, bulk scattering distribution). In addition, there may be a limit on the surface properties (thin-film coatings, surface scattering distributions) that can be assigned to the assembly, as the total number of unique faces in an object to which such properties may be assigned is limited to 51. The solution is to use individual objects to represent each of the individual parts of the assembly. Then, each part may be assigned unique properties.

One option for generating this solution would be for the user to export each of the individual parts of the assembly into a separate CAD file. Then each of the individual CAD objects may be loaded into Zemax separately, and the assembly may be re-constructed inside of Zemax. Use of this option assumes that the user has access to the CAD program used to generate the assembly file (e.g. it was not a file that was passed onto the user by someone else) and has detailed information regarding the position and orientation of each part inside of the assembly.

A more robust option is to allow Zemax to break-up, or explode, the assembly into its constituent parts. In this article, we give an example of how Zemax may be used to explode a CAD assembly file into its constituent parts.

Loading the CAD Assembly

In this example, we’ll open up an assembly file obtained from the free CAD distribution website GrabCad (www.grabcad.com). This file is included as an attachment at the end of the article. The original assembly was actually created in SolidWorks, and thus could be loaded into Zemax using the SolidWorks PartLink object (see the article entitled “How to Use the PartLink Object"). However, to illustrate use of the CAD assembly explosion tool, the assembly was saved to a STEP file inside of SolidWorks.

The assembly file chosen for this example represents the structural housing for an LED light source (image taken after opening the assembly in SolidWorks):



To load this assembly into Zemax, we first need to place the CAD file in the appropriate folder. The default folder for CAD files is <Objects>\CAD Files\, where the <Objects> folder may be user-defined (see the section of the manual entitled “Folders” in the chapter entitled “File Menu”). Once the assembly file is in the correct folder, we select the Imported object as the object type in non-sequential mode:



Note that any CAD assembly file with an *.IGS, *.IGES, *.STEP, *.STP, or *.SAT extension (and that is present in the correct folder) can be selected as the input file for this object type – we’ve chosen the file for our LED housing model above. Once the “OK” button is selected from the bottom of the object properties dialog box, the part will load.

Exploding the Assembly

If we then wish to explode this assembly into its constituent parts, simply place your cursor on the row of the non-sequential component editor (NSCE) containing the Imported object, and then select the “Explode Imported Object” feature from the Tools menu of the NSCE:



After doing so, you’ll see the following dialog:


Selecting the “Get Part Count” button will return the number of constituent parts in the assembly:


while selecting the “Explode” button will break the assembly into the constituent parts. Selecting “Explode” for this part leads to:



Note that each of the constituent parts is written to a file in the Zemax object format (.ZOF), and then loaded into Zemax via the Imported object (for more details, see the section of the Zemax manual entitled “Imported objects and ZOF files in the chapter entitled “NSC Objects”). The position and orientation for each of the constituent parts is referenced to the parent assembly via the “Ref Object” flag (for more details, see the section of the manual entitled “Reference objects” in the chapter entitled “NSC - Overview”). While the parent assembly remains in the NSCE, this object will be ignored by rays:



In addition, the parent assembly object will not be drawn:



Thus, with respect to the original assembly, the constituent parts remain the only meaningful objects in the system, while the original CAD object serves purely as a reference. If you would prefer to remove this reference entirely from the system, you may select the option to delete the assembly after explosion:


in which case the subsequent NSCE would look like this:




The position and orientation of each of the constituent parts is still referenced to that of the parent assembly, but the assembly itself has been replaced by a Null object.

The main advantage of deleting the assembly object after explosion is that the Zemax file will require less memory, which may be an issue if the initial assembly is large and memory intensive. However, if the parent assembly is subsequently modified in the CAD program in which it was created, those modifications will not be acknowledged by Zemax if the parent assembly is deleted after explosion, because in this case information about the parent assembly will be lost. Thus, even if the parent assembly is ignored by rays inside of Zemax, keeping this file in the Zemax NSCE ensures that any changes made to the assembly in the creating program are subsequently read in the next time you open your Zemax file containing the exploded assembly.

Constituent Properties

Once the assembly has been exploded, different properties may be assigned to the constituent components. For example, we may choose to define the LED die (object #8) as reflective, and place a thin-film coating representative of the semi-conductor material that this die is made of (see the article entitled “How to Add Coating and Scattering Functions to Non-Sequential Objects”).

In reality, the physical properties of the various components in the LED housing may be very complicated. For example, light may be scattered from each of these objects via complex surface scattering distributions. If the scatter distribution for each object can be measured (using a tool such as the Radiant Zemax IS-SA), this data can be directly incorporated into Zemax via the BSDF scatter model. For more information on this model, see the article entitled “How to Use Tabular BSDF Data to Define the Surface Scattering Distribution”.

That being said, in many cases LED vendors will provide measurements of their sources via ray files, and those data correspond to the light distribution as measured outside of the housing. If you are able to obtain this data, then it would only be necessary to accurately characterize the properties of the housing if you were concerned about emitted light being reflected back towards the housing.

Accurate characteristics would also be needed if you could not obtain measurement data for the LED, and wished to determine the source distribution through simulation in Zemax. For example, a reasonable approximation might be to model the LED source via the Source Rectangle object. We would place this object “on top” of the die, inside of the dome:




We would then need to assign physical properties (volumetric materials, thin-film coatings, scattering distributions) to each of the components in the system. With the assembly file exploded, this is now all possible.

Summary

Zemax supports the ability to create complex object geometries in a number of ways. If a built-in method is not available, the object may be created in a CAD program. If Zemax does not provide a link to the creating program, then that object may still be loaded into Zemax as an Imported object. Finally, if the object represents an assembly of parts, the assembly may be exploded into its constituent parts inside of Zemax, so that individual material properties may be assigned to each part. This allows for accurate characterization of the assembly during ray-tracing in Zemax.