This article describes the process of using OpticsBuilder to automate the creation of lens drawings by creating a custom drawing template in SOLIDWORKS. OpticsBuilder can create automated ISO 10110 compliant drawings of circular lenses with the Generate Lens Drawing tool. This tool generates a drawing for a lens with dimensions and material data filled out using custom properties imported with the ZBD file format. The drawing tool executes a macro that handles number formatting, picture and table placement, lens dimensioning, and auto-population of lens data.
Authored By Jacob Hart
SOLIDWORKS assembly files created using OpticsBuilder contain mechanical and optical components. OpticsBuilder can create drawings of circular lenses using the Generate Lens Drawing tool. The drawing template is the framework that organizes and presents lens geometry and properties in a drawing. This article is a step-by-step guide to understand what information is contained in a custom drawing template and how to create a custom drawing template for use with OpticsBuilder.
Figure 1 shows the Generate Lens Drawing icon circled in red. Figure 2 shows the Generate Lens Drawing Tool dialog box.
Figure 1. Generate Lens Drawing
To use the drawing tool:
- Import a ZBD file into OpticsBuilder
- Save the imported lenses to a SOLIDWORKS assembly
- Click Generate Lens Drawing
- Select the optical components to generate drawings for (see Figure 2)
- Select a drawing template (OpticsBuilder, SOLIDWORKS, or Custom)
- Click the green check mark to start the drawing tool
Figure 2. Generate Lens Drawing Tool
After the drawing tool is started drawings are created of lens front and cross-section views. Dimensions are added for lens thickness and face diameters. If the user selects the OpticsBuilder template in the drawing tool the drawing will appear as shown in Figure 3. The SOLIDWORKS template is not customized for optical drawings although lens data may be brought into the template for drawing generation.
Figure 3. OpticsBuilder Drawing Template
When using the OpticsBuilder template the following data is automatically populated in the drawing table if it exists in the ZBD file:
- Lens radius of curvature with sign to indicate concave or convex (R)
- Clear aperture radii (Øe)
- Lens material (Glass:)
- Refractive index with uncertainty (Nd)
- Abbe number with uncertainty (Vd)
- Power Irregularity (3/)
- Tilt (4/)
- Surface Imperfection Tolerance (5/)
- Reference wavelength (6/)
- Material Imperfections – Stress birefringence (0/)
- Material Imperfections – Bubbles and Inclusions (1/)
- Material Imperfections – Inhomogeneity and Striae (2/)
- Lens name (Part/DRAWING)
- Drawing sheet scale (SCALE)
Doublet lens assemblies automatically generate drawings for individual lenses and the cemented lens group. Aspherical lenses (even aspheres only) have additional drawing sheets generated to include aspheric coefficients and sag tables.
The custom drawing template allows a user to define their own drawing template to fit their needs. Users may create tables, notes, pictures, and add variables related to lens geometry and material properties. If the custom template will have a different drawing size or orientation from the OpticsBuilder template then the template must be created from a blank sheet.
The first step to create a custom drawing template is to create a new drawing in SOLIDWORKS. Before the drawing is created the user is prompted to select a sheet format to define the sheet size and orientation. A blank drawing is created after the sheet format is selected if “display sheet format” is unchecked as shown in Figure 4.
Figure 4. Sheet Format Dialog
After drawing creation the user should select the Sheet Format tab and then Edit Sheet Format shown in Figure 5. This allows the drawing border, tables, and annotations to be created.
The drawing border acts as a reference to create table geometry. The Automatic Border icon is highlighted in Figure 5.
Figure 5. Edit Sheet Format
To create the drawing border:
- Select Automatic Border
- Click the right arrow in the Automatic Border dialog box
- Define drawing margin sizes as shown in Figure 6
- Uncheck Show Zone Dividers
- Uncheck Show Columns
- Uncheck Show Rows
- Click the green check mark at the top of the Automatic Border dialog box
- Select the four corner points of the border and fix them in place with the anchor icon as shown in Figure 7
Figures 6 and 7. Automatic Border and Border Anchoring
Before further drawing creation the user should open the Layer and Line Format toolbars by right clicking on the Command Toolbar and selecting both Layer and Line Format. The Layer and Line Format icons are highlighted in Figure 8.
Figure 8. Command manager, layer and line format toolbars
The layer and line Format toolbars may be docked wherever it is convenient for the user. Select Layer Properties shown in Figure 9 to create a new layer to organize objects that are not visible in the final drawing template, such as table dimensions and hidden annotations. Layers may also be hidden during printing by hiding the printer icon for a layer as shown in Figure 10.
Figures 9 and 10. Layer and Line Format Toolbars and Layer Properties Dialog
After toolbar docking the user should start creating their drawing template table. To start the table the user should first select the Sketch tab. In the Sketch tab the line and box tools can be used to construct a table. Lines created with the line and box tools may be drawn anywhere on a sheet. If a line is started or finished on the drawing border or on another line the line is automatically constrained to be coincident with the overlapped line. An example of constraints placed on a horizontal line (2nd from top of table) is shown in Figure 11.
Figure 11. Line Constraints
By default, the center point of existing lines (including the border) are snapped to when the mouse cursor is near them. SOLIDWORKS automatically places horizontal and vertical constraints on lines as appropriate when they are created.
Placing new objects into a drawing with many annotations and table lines can be difficult since SOLIDWORKS automatically snaps to horizontal and vertical locations of existing objects. To keep SOLIDWORKS from snapping to horizontal and vertical alignment cues based on existing object locations the user should hold down the alt key while placing lines and annotations.
After setting up the drawing template table dimensions may be added as needed to format the table. Figure 12 shows the dimension and annotation icons.
Figure 12. Dimension and Annotation Icons
Dimensions should be placed in a unique layer so that they may be hidden before saving the drawing template. Figure 13 shows a landscape version of the OpticsBuilder template table with dimensions for an A (ANSI) size landscape orientation.
Figure 13. Table Dimensions
Populating the table shown in Figure 13 with annotations is the next step in drawing template creation. Annotations may contain text, auto-filled lens data, or a combination of text and data. Annotations with automatically populated lens data are linked to custom properties that are associated with a lens, such as radius of curvature or material. Custom properties are attached to each lens after ZBD file import into SOLIDWORKS.
To view custom properties go to File...Properties...Custom. A list of the custom properties available for a lens is shown in Figure 14.
Figure 14. Custom Properties List
When creating a custom drawing template from scratch there are no custom properties defined. Custom properties must be copied from a drawing generated using the OpticsBuilder or SOLIDWORKS template. To transfer custom properties from an OpticsBuilder drawing template to a custom drawing template:
- Open the custom properties list in a lens drawing made with the OpticsBuilder template
- Highlight the rows of the custom properties list to be transferred and type Ctrl+C
- Open the custom drawing template custom properties list
- Highlight any existing rows in the custom drawing template custom properties list
- Type Ctrl+V
After this step the custom drawing template contains all the custom properties that were copied from an OpticsBuilder or SoildWorks drawing template.
To add an annotation that contains a custom property the user should add an annotation and select Link to Property (highlighted in Figure 15). This brings up the dropdown menu circled in Figure 16 to select a custom property name to populate the annotation.
Figures 15 and 16. Annotation and Link to Property Dialog Boxes
Text and custom properties may be combined in a single annotation by adding a custom property, text, and then another custom property name. This is useful for creating data fields that include tolerances. To aid in drawing creation custom property names used in the OpticsBuilder drawing template are shown in blue in Figure 17.
Figure 17. OpticsBuilder Drawing Template, Custom Property Names
Aspherical lenses are a special case for the drawing tool, with support for even aspheres only. When a drawing is made of an even asphere the OpticsBuilder template includes a sag equation at the top of the first sheet and two additional sheets containing aspherical coefficients and a sag table for both faces of the asphere. A multi-sheet drawing for an even aspherical lens is shown in Figure 18.
Figure 18. OpticsBuilder Template, Even Asphere Format
To create the extra sheets for an asphere in a custom drawing template the user should:
- Add an extra sheet using Insert...Sheet (uncheck Display Sheet Format)
- Add a table using Insert...Tables...General Table
- Populate the table with Aspheric Coefficient labels
- Populate the table with custom properties for Aspheric Coefficients (0_ORDERTERM_L) by double clicking a table cell and selecting Link to Property
- Add another extra sheet using Insert...Sheet (uncheck Display Sheet Format)
- Add another table using Insert...Tables...General Table
- Populate the second table with custom properties for Sag (0_SAG_VALUE_L) by double clicking a table cell and selecting Link to Property
In a drawing with multiple sheets the sheet format may be changed for each sheet in case the user wants different formats on each sheet. To edit the sheet format for a newly added sheet select Edit Sheet Format and right click on the sheet. After right clicking on the sheet to be changed go to Edit...Properties. The user may then select a new sheet size, orientation, or create a blank sheet by unchecking Display Sheet Format. See Figure 4 to view the Sheet Properties dialog box.
Once a drawing template is created with a table, annotations, and custom properties the user should:
- Select the Sheet Format tab
- Unselect Edit Sheet Format
- Save the sheet format using File...Save Sheet Format (*.slddrt format)
- Save the drawing template using File...Save As (*.drwdot format).
The sheet format contains the drawing orientation, size, and border. The drawing template contains all tables, pictures, and annotations used on a sheet. A drawing template references a sheet format(s) when it is saved.