Welcome Guest ( Login | Register )

How to Use the SolidWorks PartLink Object




This article describes how to use the PartLink™ object to dynamically open Solidworks® parts inside Zemax.



Authored by: Akash Arora                                                                                                                                                              






INTRODUCTION


Illumination design pushes the boundaries of most raytrace programs by requiring complex shaped objects to be modeled that aren’t easily described by mathematical equations. Most software codes allow users to easily model primitive shapes (i.e. spheres, cubes, etc.) and common design forms (aspheres, CPCs, etc.), but what if an object is so complex it cannot be modeled using a combination of these objects? Furthermore, what if there is a need to parametrically control the shape of these objects? Even CAD exchange using IGS, STP, SAT, or other formats don’t provide this level of flexibility.



Zemax supports dynamically opening Solidworks part files (*.SLDPRT) and incorporating them into a non-sequential system for simulation purposes. Any “smart dimensions” defined on the object can be exposed and parametrically controlled in the NSC editor. Additionally, the part is treated like any other object in Zemax. It can be assigned coating and scattering properties, modeled as a blackbody emitter, replicated in an array, and much more. Now optical engineers can work with the same files that their mechanical engineers use, without the need for format conversion. Let’s take a look at how such an object is defined in Zemax.





SOLIDWORKS®

The first step required to use this capability is installing Solidworks® (SW). We cannot guarantee that old versions of SW will be compatible, so we recommend installing the latest release (2011) to ensure compatibility. Note: Zemax technical support cannot assist with SW installation. Once SW is installed properly, you must open it manually, prior to using PartLink™. It is not necessary to open the desired part in SW; the program must simply be running.



A lens holder on rails defined as a SW assembly (*.SLDASM) is shown below inside SW. An assembly is composed of numerous SW parts (*.SLDPRT).







We could open all the parts that comprise this assembly in Zemax, but for simplicity let’s say we want to parametrically model the lens holder (light blue) alone. This file is included as an attachment at the end of this article. Opening just this part in SW, note that it has been defined with several “smart dimensions”. These allow various dimensions on the part to be modified and are also what Zemax uses to modify a part.







Smart dimensions are given a default name Dx@Sketchy, where x and y are integer numbers assigned to the dimensions and sketches. Changing the default names to more descriptive strings will make modifying them more intuitive in Zemax. Right-click the dimension name in the red box above and select “Feature Properties” from the menu. Type a descriptive name in the correct field.







The same can be done for specific dimensions within the sketch. Click on the sketch in the tree as before, then right click the dimension(s) that show up in the layout. Select “Configure Dimension” in the menu that is displayed. Right-click the cell highlighted below and rename the dimension.







Do the same for the other three dimensions on this part (D1@Boss-Extrude, D2@Sketch1, D1@Cut-Extrude1). Once complete, save the part.



Now that the part has been defined and named, let’s open Zemax and see how to import the object. Remember, even though the part is currently open in SW, this need not be the case to use it in Zemax. SW simply has to be running to use the capability.





ZEMAX PARTLINK™

A SW part is defined in Zemax using the Solidworks® PartLink™ object in non-sequential mode. SW parts must be located in a specific folder that is user-definable in the Folders tab of the File > Preferences dialog. Once placed in the correct folder, they can be selected within Zemax.



Open a new, non-sequential system, define the first object to be a SW part, and select the appropriate SLDPRT file.







Press OK and open a shaded model layout to view the part. The component looks identical to what was shown in SW.







The next step is to expose the smart dimensions in the NSC editor. To do this, go to the Solidworks® PartLink™ tab in the object properties dialog. Here you will see a list of all the smart dimensions on the part. You can expose any dimensions to the NSC editor by clicking them in the list and choosing expose. Click Expose All and then click OK.







Note that the smart dimensions are now available in the NSC editor for dynamic modification. Try changing a few and seeing the effect on the shape of the part in the shaded model layout.







If the dimensions of the part have been modified, we can overwrite the existing SLDPRT file or create a new one. Simply click on the SW part in the NSC editor and then go to Edit > Save Modified Part in the Edit menu of the NSC editor.

As stated previously, the object behaves just like any other in NSC, allowing material and surface properties to be assigned. In the image below the mount is assigned a partially scattering, partially absorbing, reflective material to simulate a polished metal surface. A standard lens object is also placed in the holder.









SUMMARY

The Solidworks® PartLink™ feature allows Solidworks® SLDPRT files to be incorporated into non-sequential optical systems in Zemax. The dynamic link between Solidworks® and Zemax enables the dimensions of parts to be changed parametrically, which is vastly superior to CAD exchange. This capability also enables optical engineers and mechanical engineers to work seamlessly with identical mechanical components, rather than having to convert files from one format to another.







Attachments


lensholder.sldprt lensholder.sldprt (191.50 KB, 15 views)



© All Rights Reserved.