Importing board outline and cutouts from AutoCAD
|
Among data formats that EDWinXP can
import we have .DXF, two-dimensional output from AutoCAD. This import is
included as an option of Graphic Imports and Reconstruct from Graphics features accessible
from Fabrication Manager. These tools are basically intended for reconstruction of project databases (PCB layout and schematics) from artworks in Gerber ASCII format files. Data in such files is “dumb graphics” and the user has to decide what constitutes what in imported elements. These may be lines, circles, rectangles, triangles and polygons. But it is not always clear how these graphics should be interpreted – whether they constitute traces, pads, text or silk screen. Therefore import and reconstruction requires grouping of imported graphics into categories – pad stacks, traces, silk screen elements or copper pour. Through application of various filters relevant for given category elements may be extracted from input files. Since filtering is not always perfect, there is a provision for transferring elements between categories. When all is imported, the user may edit at will any element, remove stray elements that don’t belong to a category and even add new elements. AutoCAD is not a package suitable for drawing PCB artworks. Nevertheless, it is used to design mechanical parts of equipment where PCBs are housed. In such case the board outline with eventual cutouts would be usually defined in AutoCAD too. Although design of board outline and cutouts is fully supported by EDWinXP, it may be in such case more effective to import this information in DXF format prior to designing the circuit - especially when the outlines are complex and require accuracy in definition. Below, you will find short tutorial explaining how the import of outlines from DXF and their reconstruction works in EDWinXP. The Board.DXF file that we have used as example in this tutorial may be downloaded from our website and should be stored in currently selected folder for EDWinXP job files (most likely it would be EDWinXP\JOB) |
| Preprocessing .DXF file |
In the first step, Board.DXF file has to be converted to intermediary format that in EDWinXP is termed “artwork file” (extension .ART). This intermediary file is necessary for faster viewing and for filtering if necessary. Even Gerber ASCII files have to be converted to this format. Practically the same procedure is applied in both cases. Start Fabrication Manager and from menu Files invoke Gerber Viewer Setup dialog. Click on tab DXF Preprocessor , select file BOARD.DXF and click on Preprocess button. This will result in intermediary creation of artwork file 0.ART in folder EDWinXP\JOB\ DXF_ARTs. This file may be viewed in exactly the same way as artwork files obtained from Gerber ASCII format conversion. (See tab Artwork Viewer Setup in the same dialog).
| | Importing outlines to Board Outline category |
To import, select entry Graphic Imports from Tools menu. Click on Import Graphic Items tool button to invoke dialog Graphic Imports. (Observe that most of the functions available in this dialog are invoked from pop-up menus that appear when you click with right mouse on elements displayed in explorer window on the left hand side of this dialog). Expand Board Outline node to see node Import Artwork files. Click right mouse button on this node for pop-up menu and through entry Add Artwork file select 0.ART. Subsequently, click right mouse button on Board Outline node, for a menu from which the import may be executed. The imported graphics will be subsequently displayed on the screen. Now we have imported the whole contents of .DXF file into one category Board Outline. This doesn’t mean that actual board outline polygon has been created in project database proper. We have just stored graphics items from this file in common category for farther processing. You may also notice that this board has two visible internal cutouts – one rectangular to the left and one circular to the right. We have imported all this to one category because no sensible filter could be applied here since all lines were of the same width. We need now apply few editing functions to selectively transfer those lines and circle that constitute cutouts to the proper category.
|
| Editing graphic imports |
As may be clearly seen from tools available in this toolbar, editing graphics is very similar to editing packages and symbols in Layout Editor or Copper and Notes in Fabrication Manager. Items may be moved, stretched or deleted and new items may be added to those that were imported. There are some restrictions regarding usage of certain tools depending on category. It is for example not allowed to add filled circles or rectangles to outlines since it doesn’t make any practical sense. To start with, make sure that the two toolbars Layers as well as Layout View are visible above the screen (menuView->Toolbar). It is important to distinguish between “visible” and “active” categories. The display order and visibility of categories are controlled from a dialog invoked by button View Import Categories. Categories are displayed in the stack, with the one that is active always on top. Only one category may be edited at a time and switching between active categories is done through drop down list Active Category. In our case the Board Outline category should be active. If not make sure the Board Outline category is active. For transferring items from one category to another, use tool Item Property. With this tool active, click on circular cutout. The dialog that pops up after this has “Category” entry at the bottom where selected item’s category is displayed. Clicking on this entry accesses drop down list from which the target category for selected item may be chosen. Select “Cutouts” and the transfer will be confirmed by item changing color to the one assigned to this category. You may now repeat the same operation for remaining four lines that constitute rectangular cutouts.
Now the elements imported from DXF file are distributed to proper categories and may be correctly interpreted by automatic reconstruction functions. There is though one small thing there should be corrected before reconstruction of cutouts. It is necessary to ensure that graphic items (lines in our example) form a closed contour and are continuous, i.e. at coordinates where one line ends the other line should start. The lines are not exactly continuous in case of the rectangular outline – see upper left corner. Such a flaw may be easily remedied by shortening top horizontal line that is slightly too long. This may be done by stretching the start of this line so it touches the end of the right hand vertical line of the cutout outline. |
| Reconstructing board outline |
At this stage the graphics import is prepared for reconstruction. Board outline and cutouts are in EDWinXP defined as polygons. Reconstruction is nothing else but creating equivalent object in project data base using imported graphics as a template. In our case, the coordinates of vertices in these polygons will correspond to coordinates of start and end points of imported lines. The reconstruction of complete database has to be done in proper sequence – first board outline and cutouts, then components and subsequently traces and net list. From all reconstructing tasks, most laborious is reconstructing of components and we shall dedicate the whole article to this issue in the future. Reconstructing of other elements is more straightforward and in most cases automatic. Current example covers only two first tasks. For reconstructing we have to switch to other toolbar (menu Tools->Reconstruct from graphics). It is now clearly visible that the tools in this toolbar are arranged in the same sequence as mentioned above and the tool for the first task - Reconstruct board outline - is active by default. Option buttons allow selecting the mode of reconstruction, which vary depending on category. The other characteristic feature is that the screen displays whatever is in current project database plus the graphic elements in the category that is set for reconstruction. In our case we shall see only board outlines – the display of imported cutout elements will be at this stage suppressed. Since now the recreated project database objects shall be displayed it is important to ensure their visibility. Set therefore display of board outline and cutouts ON with buttons in the toolbars above the screen. Select Auto-reconstruct mode (option tool F5) on the option toolbar and click on any line in the board outline. The result of this operation will be signalled by redrawing new board outline polygon in the color selected for this object. Switch tool to Reconstruct cutouts and repeat the same operations by clicking on any element in circular and rectangular cutouts. Now, when you start Layout Editor – you will see that properly defined board outline and cutouts are there and may be farther edited if required.
|
|
| |
|