Using a hotwire technique to cut wings can make wing fabrication much faster and easier.  However, to do so requires that your airfoil go from being data points in a file to a physical guide.  Using a laser cutter to cut wood can make this process quicker and more accurate.  The first step, therefore, is to convert the airfoil data into a form that can be used by the laser cutter.

Sample Airfoil

Sample Airfoil

Airfoil data is nominally stored as a set of coordinates in a space delimited CSV file.  The laser cutter uses vector and raster files to control the laser.  Thus, to control the laser the airfoil coordinates simply need to be converted into a poly-line in an SVG image file.  An SVG file is actually just an XML file and, conveniently, there is a python library for creating these files.

The below code loads, formats, and then creates the polyline.

    scale = 96
    xOffset = 0.5
    yOffset = 2

    pts = ""
    line= 0
    # Read airfoil data
    spamReader = csv.reader(open(filename, 'rb'), delimiter=' ', quotechar='|', skipinitialspace="true")
    for row in spamReader:
        #Skip the first line of header information
            #Format and store in a string
            pts+= str((float(row[0])*chord+xOffset)*scale)+","+str((float(row[1])*-chord+yOffset)*scale)+"  "

    #Create a polyline using the formatted airfoil data string
    pl=oh.createPolyline(points=pts,strokewidth=0, stroke='blue')

The addition of some code to handle arguments for the airfoil’s filename and chord length and saving the data then finishes the code.  The next step will be to test the pattern on a laser cutter later this week.  The “scale” parameter is determined by Corel Draw which imports svg files at 92 pixels per inch.  The current code is included below.  This version requires the svg module at pySVG.


Sample Files:

FX 63-137 Airfoil

FX 63-137 Template

The program can easily be controlled from the command line using a statement formatted as below.  Where the chord length is defined in inches by the “-c” flag and the airfoil file location by the “-f” flag.  The program will save the output in the same directory and with the same filename as the airfoil except with a *.svg extension.

python -c 3 -f ./fx63137sm.dat

*** NOTE pySVG recently updated and is no longer compatible with this program.  A revised version will be available shortly (7/21/2011)