This application note discusses how to set up a design flow that shares DXF format data files between the AWR Design Environment (AWRDE) and acomplementary mechanical CAD tool such as AutoCAD®.
The topics covered include a description of the drawing entities that can be imported from a DXF file, and information on how to manage the layer definitions and mapping between DXF layers and drawing layers, and how to handle the import process. A description of the drawing shape terms used in this document is found in the appendix.
Associated with this application note is a reference DXF file and a Layout Process File (LPF file) used to personalize the AWRDE.
The AutoCAD drawing exchange format (DXF) standard is popular with EDA, CAD and CAM tools for exchanging mechanical drawing data. You can view DXF files using any ASCII text editor. AutoCAD users can reference the documentation shipped with any program that uses DXF for a description of the syntax they support.
The support of DXF files by the AWR DE is primarily intended for the import and export of mechanical data that is relevant to the design processes of RF and microwave circuits. Typical mechanical data is that used to describe hybrids and modules and their associated housings, piece parts (for example, fixings, nuts and bolts) and component footprints. The AWR DE imports and translates a subset of AutoCAD drawing primitives to the AWR DE equivalent shapes that are used for such mechanical descriptions. Possible applications include the import of a board outline, housing detail, piece parts and informational features. Informational features may include keep-out regions, thermal regions and reference data points defining the location of connector centers. Thus, designers can import into the AWR DE the circuit board predefined to account for manufacturing tolerance and the surrounding housing.
DXF files can contain information relating to conductor shapes generated using tools other than AutoCAD. Often these files make use of the AutoCAD POLYLINE and ARC elements with a finite width. The current version of the AWR DE does not support POLYLINE and ARC elements with finite width. For precision artwork, there are several problems with this representation. You should request that the DXF file be regenerated using the drawing entities that are supported by the AWRDE and then imported. See "AutoCAD DrawingPrimitives and the AWRDE" for a list of supported drawing entities.
Model Layers and Drawing Layers
The graphical shapes in a DXF file display on one or more drawing layers in the AWRDE. These layers are used to organize the graphical information in a logical fashion. The layers of a DXF or GDSII file are termed model layers, and these model layers are mapped to drawing layers in the AWRDE to maintain the data organization and to make the imported information visible. In general, any process that draws shapes in the Layout window does so by sending the drawing instruction to a model layer. This model layer is then mapped to a drawing layer on which the shapes are seen. For more information on using model layers and drawing layers, see the MWO/AO User Guide. There are many reasons for using the model and drawing layer technique; however, these are beyond the scope of this document.
An important AWR DE feature is the handling of DXF and GDS files when a mapping is not defined. When a DXF or GDS file is imported into the AWRDE, the program looks at the name of the layer to see if the layer exists as a model layer. If the model layer exists, no changes are made to the model or drawing layers. If the model layer does not exist, new model and drawing layers are created, each with the name of the DXF or GDS layer name. This powerful feature allows a designer to access the data in a convenient fashion; however, it may not be the optimum way to view and use the imported data. Setting up a multi-design tool design flow is a more efficient way to handle data transfer between several EDA/CAD/CAM tools. Creating the drawing layers, the model layer and the mapping between them is easily accomplished using the built-in Layout editor. The drawing, model and mappings, layer colors, shading, and other attributes are stored in the project as defaults.
There are two ways to reuse the layer and mapping definitions in a simple manner:
Create several LPFs to cater for a range of technologies. You can save and import these LPFs on demand. Simply select the appropriate LPF for the technology of the next design.
Use a template file that imports and initializes the design environment. A template file can also store global equations, MSUB and STACKUP elements, and other useful information such as predefined frequency plans.
You can use either of two methods for working with DXF or GDS file layers when importing the files into the Artwork Cell Editor. Note that this discussion does not apply to importing directly into an Electromagnetic structure. Both methods assume you have first defined a meaningful set of drawing layers. The goal is to minimize the length of the drawing layer list, unless desired otherwise. Setting up drawing layers is beyond the scope of this document; please see the MWO/AO User Guide for more details.
The first method is to import DXF or GDS files into the Layout Editor without addressing any of the layer names in the files. Typically, drawing layer and model layer names won't exist, so the AWR DE creates them. You can then look to see what new drawing layers were created and decide if you want to keep them or not. If you don't want them, in the layer mapping, you should map the newly created model layer to some other drawing layer and then delete that drawing layer. The advantage to this method is that you do not need to know existing layer names. The disadvantage is that new drawing layers might be created, and if not properly managed, the drawing layer list can become unmanageable.
The second method is to add the appropriate model layers before importing a DXF or GDS file. This method assumes you can use another tool to determine what layers exist in the file. You can then assign the new model layers to any drawing layer. If you need a new drawing layer, you can add it and then assign the drawing layer to the new model layer. The advantage to this method is that no new drawing layers are auto-generated. The disadvantage is that you must know what layers exist in the external file and configure these same named model layers before artwork import.
Configuring Drawing Layers and Model Layers
In the Layer Setup dialog box, you can easily add and remove drawing layers and model layers, as well as change the way the layers display in a layout. To access this dialog box, choose Options > Drawing Layers
By clicking the Model Layer Mappings tab in the dialog box you can add and remove model layers, and also select which drawing layer maps to each model layer.
You can define multiple mappings for situations where you may want more than one Layer Mapping file. The reasons for creating multiple mappings are beyond the scope of this document.
All of the drawing layer and model layer settings are saved in the LPF file. You can import LPF files into projects by choosing Project > Process Library > Import LPF or export files from projects by choosing Project > Process Library > Export LPF
Drawing shapes that are exported from mechanical design tools are composed of drawing primitives. The AutoCAD documentation refers to these drawing primitives as graphical objects, which are found in the ENTITIES section of a DXF file. In this document, we use the term drawing primitives in place of ENTITIES. Drawing primitives include LINEs, POLYLINEs, SPLINEs, CIRCLEs and ARCs. To be consistent with the AutoCAD standard documentation, the names of the drawing primitives are capitalized. Note that these drawing primitives are stored in a DXF file in a variety of ways; this subject is beyond the scope of this application note.
Not all AutoCAD drawing primitives have an immediate use by RF/Microwave engineers; thus the AWRDE supports the reduced set shown in the following table.
|LINE, this drawing shows several LINES having the appearance of a POLYLINE. These drawing primitives are created in AutoCAD using the draw line command.|
|POLYLINE, This drawing primitive was created in AutoCAD using the draw polyline command.|
|POLYLINE, with ARCs added as a sub-entity.|
|POLYLINE (closed), This drawing primitive was created in AutoCAD using the POLYGON command.|
|POLYLINE (closed), This drawing primitive was created in AutoCAD using the draw polyline command, and includes ARC and POLYLINE segments.|
|POLYLINE (closed), This drawing primitive was created in AutoCAD using the draw rectangle command.|
In this table, 'closed' means that the shape defined by a series of POLYLINEs and possibly ARCs has the Open/Closed property set to 'Closed'. When a shape is closed, the series of POLYLINEs and possibly ARCs can be thought of as defining the periphery of the shape. The 'closed' property is usually defined at creation time by a designer using an AutoCAD command, although you can toggle this property any time.
A POLYLINE can also appear as a closed shape simply because the first and last points share the same coordinates. You can consider a closed shape as a polygon and an open shape as a line. If the imported shape is closed, then in the Layout window it is filled with a pattern whose characteristics are defined by the LPF. As expected, the open shape displays as a line.
Example LPF and DXF Files
A DXF file (Housing Example.dxf) associated with this application note illustrates the main points of using DXF data. This DXF file contains the design of a circuit board and the housing for an arbitrary RF application. The housing is drawn using lines to represent the inner and outer walls. Some circles are drawn to represent fixings, and the outline of the board is designed to fit inside the housing. Two extra lines serve as guides to the centers of two coaxial connectors. For the first exercise, import the LPF file named simple.lpf, then read in the DXF file into the Artwork Cell Editor. Notice that when you import, new drawing layers and model layers are created.
For the second exercise, start with a new AWRDE project, import the LPF named housing_board.lpf and then read in the DXF file. Notice that no drawing layers or model layers are created because the proper model layers are already defined when the LPF file is imported. Studying the LPF, you can see the drawing layers that share the same name as the associated DXF file. Having imported the LPF, you can then import the DXF file; shown in the following figure.
This application note demonstrates techniques for setting up the Layout Process File (LPF file) for a design environment that shares DXF files between several design tools. Setting up the LPF to define the DXF layers (model layers) and the mapping between model and drawing layers is a precursor to the successful use of the AWR DE and a mechanical design tool.
APPENDIX: AUTOCAD DRAWING PRIMITIVES AND DATA STORAGE
A POLYLINE can consist of one or more:
- LINE segments
- ARC segments
- SPLINE (not supported by the AWRDE)
- FIT (not supported by the AWRDE)
Each segment can have its own start and end width. The property width is not supported by the AWRDE. Both LINE and ARC segments support variable width.
A regular N sided (3 -1024) shape. AutoCAD has a simple command that is used to create these drawing primitives. The command is an automated method of creating a regular POLYLINE with the CLOSED attribute. (Not to be confused with an AWRDE or GDSII POLYGON.) An AWRDE or GDSII polygon is a closed shape defined by three of more vertices. Each segment has a non-zero length.
LWPOLYLINE means Light Weight POLYLINE. AutoDESK has created a data storage mechanism with reduced functionality compared to a POLYLINE, however it does not mean the POLYLINE is thinner! This entity is actually a means of storing a simpler POLYLINE structure with an improved and compact data storage mechanism. An importer needs to read the entity data set. There is no actual LWPOLYLINE drawing command. AutoCAD stores the entity depending on the elements that make it. A LWPOLYLINE does not support the SPLINE or FIT drawing primitives. The AWR DE supports the import of the LWPOLYLINE.
AutoCAD Drawing Primitives and the AWRDE
AutoCAD entities supported within the AWRDE.
|ARC||Segment of circle||Yes|
|LINE||Straight path between two points||Yes|
|POLYLINE (width = 0)||Similar to line or Arc||Yes|
|POLYLINE (width > 0)||Line or Arc with a specific width and shape||No|
|Closed POLYLINE (width=0)|
Closed shape, can be translated to a
|LWPOLYLINE||Light Weight POLYLINE||Yes|
|TEXT||String of ASCII characters||Yes|
|TRACE||X-vertex parallelogram, similar to solid||No|
Regular N Sided Shape (exported from
AutoCAD as a CLOSED POLYLINE