[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [femm] *.dxf files



In a message dated 8/22/00 9:09:19 PM Eastern Daylight Time, 
bmfrusta@xxxxxxxxx writes:

> I just started using the software and I am pleased with the results I 
> obtained. I am currently employed by an engineering firm that designs 
> and builds electric motor prototypes. We write our own windows based 
> motor design software. I am trying to tackle the problem of importing 
> *.dxf files into our programs. I am wondering if anybody can give me 
> some insight on how to manipulate *.dxf files. Any help would be 
> appreciated.

Importing dxf files is in some ways pretty easy, and in others, annoyingly 
hard.

Information specifying the file format of dxf is available on the web. A 
good site for info is http://fileformat.virtualave.net/index.htm Enter "dxf" 
in the site search, and a list of documents on dxf will come up. I have 
found the winhelp-format downloads particularly useful in the past.

Anyhow, dxf consists of a series of entities or objects, and then some 
parameters that describe them. You end up parsing an ascii dxf file by just 
reading in lines until you see an entity that you know what to do with. 
Then, you strip off the data that is related to that particular instance of 
the entity. This is a little more subtle than reading data out of a 
multi-column array, but not too much harder.

The hard part is converting the information from the dxf into a consistent 
geometry for finite elements or whatever. dxf is just a drawing format, not 
a format for specifying finite element info. You will end up writing a lot 
of code trying to sort out whether multiple points in the dxf file are really 
intended to be the same point, whether two lines that nearly intersect are 
actually intended to intersect, and so on. I still haven't solved these 
issues to my own satisfaction in femm.

Dave.
--
http://members.aol.com/dcm3c