Chapter 3. Converting DXF Files

Table of Contents

A Worked Example
Editing Points
Editing Lines
Editing Boundaries

The hardest part of using pdnMesh is generating the input file. PdnMesh is NOT a CAD program. So do not expect that functionality. However, there are plenty of free CAD programs available. In order to define the geometry of the problem, you can use any one of them. Then after some simpler manipulations, you can convert the drawing you produced using the CAD program to a one suitable for pdnMesh. All you have to do is to produce a drawing of the problem, using only straight line segments and save it as an ASCII DXF file (not a binary DXF file). Any CAD program can be used so long as it produces a DXF file.

We will go through this whole process in this chapter. We have used QCAD, a free and excellent CAD program for this. You can get it from http://www.ribbonsoft.com/qcad.html.

A Worked Example

We consider a simple magnetic circuit with a moving armature and a core with two electromagnets. Please refer to Figure 3.1, “Magnetic Circuit” for more detail. We first draw all the boundaries of this problem using straight lines. Please note that no two lines can lie on top of one another. For instance, The conductors and the iron core (Boundary 1) share some line segments. There cannot be two lines for the same boundary. Also note that the hatching of the armature is not required. It is used here just for illustration. Once again, remember you only need line segments of the boundaries in the drawing.

Figure 3.1. Magnetic Circuit

Magnetic circuit

The solved problem is given in Figure 3.2, “Magnetic Circuit solved”.

Figure 3.2. Magnetic Circuit solved

Magnetic circuit solution

We assume that you managed to create a drawing according to the geometry of the problem and saved it as a DXF file. Now, we run pdnMesh and choose FileImport DXF option. A dialog will appear and ask you for the file name. Just select it from the location where you saved it. After a while, if everything goes well, a new window will appear with the drawing.

If you right click on that window, you will see a menu. Let us consider this popup menu in detail.

Popup->Edit Points In this mode, once you left-click on a point, you can edit it. See the section called “Editing Points” for more detail.

Popup->Edit Edges In this mode, you can select any edge by left-clicking and edit its properties. See the section called “Editing Lines” for more detail.

Popup->Edit Boundaries In this mode, you can add new boundaries and edit their properties. You can also add/remove edges of each boundary. See the section called “Editing Boundaries” for more detail.

Popup->Zoom Window In this mode, you can select a rectangular area using the mouse left button and zoom in.

Popup->Zoom Back Once you select this option, the display will zoom back to previous view.

Popup->Zoom All Once you select this option, the display will zoom to global view.

Popup->Save Once you select this option, you will be asked for a file name to save your coordinate file to be used as input to pdnMesh.

Popup->Close Closes the window. However, your work will not be saved.