This is the README file for 'dat2dxf' version 0.8.3 24. November 2004
Overview
dat2dxf is a small command line tool to convert the Selig xy formated airfoil coordinates (available from his website at the UIUC
http://www.aae.uiuc.edu/m-selig/ads.html) to dxf output. (tested with qcad, www.qcad.org and AutoCAD)
Usage
dat2dxf - convert selig airfoil coordinates to dxf. visit
http://www.aae.uiuc.edu/m-selig/ads.html for airfoil data.
Usage: dat2dxf [FILE] [OPTION]...
[FILE] Input file with the cordinates ordered in two
coloumns by x and y.
Options:
-c, --stdin Read input from stdin instead from [FILE]
-h, --help Show help.
-n, --noheader Do not write header and footer (NOT dxf compliant).
-o, --output <file> Write output to <file>.
Write to standard output if '-'
-s, --scale <scale> Scale size '1' to <scale> (eg. '1' to 200 mm)
-t, --thickness <factor> Change the thickness and curvature by <factor>
(eg. -t 0.9 makes it 10% thinner and 10% less curved)
-v, --version Display version.
DXF Options:
-l, --layer <layer> Draw the geometry on <layer>
example:
dat2dxf sd7037.dat -s 155 -o sd7037-155mm.dxf -l Wing
Input files
There are many various, slightly different file formats for airfoil coordinates out there. dat2dxf tries to handle them as smooth and correct as possible. But there is no guarantee that all input files or formats are handled right. The well known and established Selig format however is a good start and is aimed to be fully supported.
The coordinates must be represented by two floating point numbers per line respectively to the x and y value of a point. The format of the numbers must match the regular expresion '-?[0-1]?([.]?[0-9]*)' (see the source file "point.c" for more information). Any lines not conforming to this, such as the title or comments, are ignored.
Valid numbers Invalid numbers
-0.01 2.0
-.01 -2.
.01 12.
1.01
Since numbers equal or bigger than 2 are not allowed, lines containing the number of points on each surface are ignored.
Sample imput:
SD7037-092-88 1.00000 0.0 0.99672 0.00042 0.98707 0.00180 0.97146 0.00436 0.95041 0.00811
Split-Surface protection
One variation of the file format is to start drawing both the lower and upper surfaces from the same edge to the oposite one (eg. trailing edge -> leading edge upper surface, trailing edge -> leading edge lower surface), while standard selig coordinates draw both surfaces in one line starting at the trailing edge proceeding counter clockwise. To prevent dat2dxf from drawing an ugly line from the end of the first surface to the startpoint of the second surface, line segments longer than 0.6 are interpreted as surface shift and ignored.
Change thickness and curvature
This function simply multiplies the y value of each point by the factor given by <thickness>. This does not only affect the thickness of the resulting wingsection but also its curvature by the same factor.
Availability
dat2dxf can be downloaded from
http://modellflug.aeolus.ch/download/
Copyright and License
Copyright 2002-2004 by Michael Naef. See the file COPYING for the complete license.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
have fun!
Michael Naef, cal<at>linu[dot]gs