Your source for optical design software and consulting.

AutoCAD

Importing Lamp Models

AutoCAD 2000 and later versions work such that using the DXFIN command opens a new drawing window instead of importing the geometry directly into the open drawing. The following lists two ways to import lamp models into your existing drawing:

  1. Using the DXFIN or OPEN command - If you attempt to import a lamp model DXF file into an existing drawing (a non-empty drawing), then AutoCAD 2000 will create a new drawing window into which the lamp model will be placed. This is a consequence of AutoCAD 2000's new Multiple Document Interface (MDI) abilities. You can switch between multiple drawing windows by selecting the drawing name under the Window menu item. The lamp in the new drawing window can be copied by first ensuring that all of the lamp layers are ON, then selecting all of its entities, then copying the lamp to the clipboard via a Ctrl-C or by selecting Copy from the AutoCAD Edit menu. Then switch to your existing drawing and select Paste to Original Coordinates from the Edit menu. NOTE: Be sure that both drawings are in the same UCS so that the lamp is pasted into its proper original orientation.
  2. Using the INSERT command - The INSERT command now reads both DWG and DXF files. When importing the lamp model this way you can specify the lamp insertion point explicitly in the INSERT dialog or by clicking a point on-screen. If you do not want the lamp to come in as a block, then be sure to the "Explode" checkbox at the bottom of the INSERT dialog. It is recommended that you do Explode the lamp. This will eliminate possible problems with lamp models and blocks. For your convenience, the INSERT command is called when you select the Import Lamp option from the Photopia menu item within AutoCAD. NOTE: The INSERT command does not always scale all parts of the lamp model properly. So if you are applying a scale factor to change the lamp from its original scale in inches to millimeters, for example, then you may have problems. To avoid these problems it is recommended that you do not use the SCALE option in the INSERT dialog and scale as a separate step after the INSERT command is finished.

-back to top-

Working with Solid Models

Solids within AutoCAD can quickly be converted into Polyline Mesh surfaces (which Photopia accepts) by following these steps:

  1. Put each part onto a unique layer. This will facilitate assigning materials in Photopia since materials are assigned to each layer in the model.
  2. Set the mesh resolution with the FACETRES system variable. The default value of 0.5 is very low and results in a course polygon mesh approximating the shape of your model. We recommend you set the value to a higher level to create a more accurate part shape. If you are using Photopia 1.5, then a value between 5 and 8 is recommended. If you are using Photopia 2.0, then use the maximum setting of 10.
  3. Export the solids to a 3D Studio files using the 3DSOUT command or by selecting File / Export from main menu and setting 3D Studio as the file type. If you have AutoCAD 2007 or later, please follow these directions to enable the 3DSOUT command. Keep the default settings on the 3D Studio File Export Options screen. Note: If the mesh contains too many vertices, then AutoCAD will not export the part. The 3DSOUT command will give an error message if this occurs. If you encounter this problem, then try one of the following options:
    Reduce the FACETRES variable to a lower value and try again. If the 3DSOUT command continues to fail or if the facet resolution is not acceptable at the level AutoCAD will support, then try the next option.

    Use the EXPLODE command on the solid to convert it to a set of regions and/or bodies. Then create several new layers and put a portion of the regions and bodies onto each of the new layers. Now try and export the set of regions and bodies from each layer individually using the 3DSOUT command. If it still fails, then reduce the amount of geometry on each layer until it succeeds
  4. Import the 3D Studio file into a new AutoCAD drawing using the 3DSIN command or by selecting Insert / 3D Studio from the main menu. Click the Add All button in the Available Objects section of the Import 3D Studio File Options screen and keep the rest of the settings at their default values.
  5. Save the meshed parts to a 2000 DWG file. This .DWG file can then be imported into Photopia.

-back to top-

3DSOUT Command

For AutoCAD 2007-2009, the 3DSOUT command which is used to create .3ds files from AutoCAD drawings, was removed. This command was widely used to convert solids within AutoCAD to faces. AutoCAD has released a patch which re-enables the 3DSOUT command in AutoCAD 2007-2009. Follow these directions to install and use the command:

  1. Download the 32-bit and 64-bit version of the patch, save it to a temporary location, and unzip the folder.
  2. Double click the 3dsout32bit_enu.exe or 3dsout64bit_enu.exe to run the installation.
  3. Accept the license agreeement.
  4. Enter the location of the program folder for which you want to use the 3DSOUT command (for example, C:\Program Files\AutoCAD2007).
  5. Open AutoCAD and type "appload" at the command prompt.
  6. In the Load/Unload Application dialog box, navigate to the folder where you installed the Ac3Dsout.arx file and select it and click Load and Close.
  7. Use the 3dsout command like you normally would, by typing 3DSOUT at the command link and then selecting the objects to export.

Currently AutoCAD 2010 does not contain the 3DSOUT command, and the program referenced above cannot be used. Your only option for converting Solids to Meshes in 2010 is to use STLOUT. However, STLOUT has limitations, including exporting only one solid at a time and forcing everything to be in positive coordinate space.

*This information was taken from the AutoCAD website and the exe files are from AutoCAD. Lighting Technologies makes no guarantees.

-back to top-

Converting 2D Part Drawings to 3D Models

  1. Open the 2D drawing containing the reflector profile. The following steps assume that the 2D geometry is constructed in the XY plane of AutoCAD's World Coordinate System (WCS).
  2. Define new layers in AutoCAD for 2D profiles and 3D surfaces for the various luminaire components, i.e. Profile-Main, Refl-Main, Profile-Lens, Tran-Lens, etc.
  3. Delete extraneous geometry so that only the essential geometry remains that is required to make the 3D surfaces of the various luminaire parts, i.e. lines or polylines describing the reflector profile, lens profile and lamp holder locations.
  4. Change the properties of the 2D entities so that they reside on the appropriate layers just created in AutoCAD, i.e. put the main reflector profile on layer Profile-Main.
  5. Move the entities (lines, arcs, etc.) that comprise the 2D profiles of the luminaire components so that the center of the luminaire opening is located at (0,0,0) in AutoCAD's WCS.
  6. Rotate the 2D profiles of the luminaire components so that the reflector opening is oriented toward the -Y axis if the luminaire produces downward directed light or toward the +Y axis if the luminaire produces upward directed light.
  7. Change the view to an isometric view that allows the geometry to be seen in 3D. The "SE Isometric" view is a good choice. This can be obtained from the View toolbar or from the menu (R14: View - 3D Viewpoint - SE Isometric) or (2000-2002: View - 3D Views - SE Isometric)
  8. From the main menu, select Modify - 3D Operation - Rotate 3D to rotate the 2D profiles for the luminaire geometry so that it is tilted up into the Front view (the Front view is in the world XZ plane). This is done by rotating the geometry +90° about the world X axis.
  9. If the reflector is comprised of linear extrusions, then create the appropriate "direction vectors" in preparation for the "TABSURF" command. To make a direction vector, draw a "Line" entity the proper length and direction. Then make the appropriate 3D geometry layer current, for example Refl-Main, so that the new polyline mesh created by the TABSURF command will be created on the appropriate layer. After the mesh is created, it needs to be moved half its length so that it is centered about the profile used to create it. Note, all Line entities should be converted to Polylines using the "PEDIT" command. Also note that all Arc entities will be subdivided along their profile according to the SURFTAB1 setting.
  10. If the reflector is comprised of circular components, then create the appropriate "axis of revolution" in preparation for the "REVSURF" command. To make an axis of revolution, draw a "Line" entity at the proper location and in the proper direction. Then make the appropriate 3D geometry layer current, for example Refl-Main, so that the new polyline mesh created by the REVSURF command will be created on the appropriate layer. The revolved surface will have an azimuthal resolution defined by the SURFTAB1 setting. Note, all Line entities should be converted to Polylines using the "PEDIT" command. Also note that all Arc entities will be subdivided along their profile according to the SURFTAB2 setting.
  11. If SAILs are being used to orient surfaces, then make the appropriate SAILs for the 3D reflector surfaces using Lines with a linetype of "DASHED." Remember to put the SAILs onto the same layer as the reflector surfaces to which they are attached.
  12. If the reflector is a linear extrusion, then construct the end plates using the 3DFACE command. Note that each 3DFACE is 4 sided.
  13. Import the appropriate lamp model for the design. Rotate, move and scale the lamp as required so that it is placed correctly within the luminaire. Note that all lamp models import with a scale of inches. Thus, if the project is being drawn in millimeters, then the lamp model needs to be scaled by a factor of 25.4. When modifying a lamp model be sure to select all lamp entities at the ends and in the center of the model.
  14. Copy the lamp model as needed to get the right number of lamps placed within the luminaire. Note that Photopia does not allow lamp models to be mirrored.
  15. Turn on all lamp, reflector and lens layers for the 3D luminaire parts and turn off all construction and 2D profile layers. Then save the drawing so that it can be imported into Photopia.

-back to top-

Photopia Luminaire Modeling Conventions

  • Photopia's coordinate system for photometry - direct light towards -Z, fluorescent lamps along Y axis for quadrilateral symmetry in North America, fluorescent lamps along X axis for bilateral symmetry. Outside North America, the fluorescent lamps should be along the X axis for quadrilateral symmetry and bilateral symmetry.
  • Layer naming conventions ("REFL-", "TRAN-", "REFR-")
  • SAILs must be DASHED lines
  • Importing lamp models into AutoCAD - use the "DXFIN" command

-back to top-

General AutoCAD Reference

AutoCAD has a command line interface similar to Photopia. The following are some basic tools in AutoCAD, with their command alias in square brackets.

Basic Entities:

  • line [l]
  • polylines [pline or 3dpoly]
  • circle [c]
  • arc [a]
  • basic text [text]
  • multi-line text [mtext]
  • 3dface [3d]
  • Surface Creation Tools:

  • [revsurf] - revolves a profile about a specified line
  • [tabsurf] - extrudes a profile along a line (called a "direction vector")
  • [rulesurf] - creates a surface between 2 arbitrary curves
  • [edgesurf] - creates a surface between 4 arbitrary curves with are joined
  • [surftab1] & [surftab2] - set the resolutions used to create the wireframes
  • Editing Tools:

  • copy [c]
  • erase [e]
  • move [m]
  • array [ar]
  • rotate [ro]
  • rotate3d
  • mirror [mi]
  • scale
  • explode [x]
  • stretch [st]
  • trim [tr]
  • extend [ex]
  • pedit [pe]
  • Drawing Tools:

  • OSnap to End, Mid, Center, Nearest, etc. [F3]
  • Absolute/Relative Coordinates [@] symbol to specify relative coordinates
  • Ortho Mode [F8]
  • Drawing Tasks:

  • Drawing lines at angles, ex. [@10<12] makes a line 10 units long at a 12 degree angle.
  • To set the UCS to the current view [ucs | v]
  • Zoom Window [z | w]
  • Zoom All [z | a]
  • Terminate a Command [ESC]
  • -back to top-