You MUST be a MEMBER in Hip Pocket Aeronautics "Builders' Forum" to REGISTER for access to the Plan Gallery.
Forum Members can visit This Topic in the Forum to Register. Logging In to the Forum is required.
Home / Airfoils and Propellors / SVG Aerofoils plus data files and source code to (re)create. Top Plans  New Items (Last 10 days)  Search  

Registered users



Log me on automatically next visit?

Forgot password


Random Plan

Profile 140 - Hawker Audax & Hardy
Profile 140 - Hawker Audax & Hardy (Daithi)
PROFILE Publications/PROFILE Aircraft
Comments: 0
Downloads: 890


SVG Aerofoils plus data files and source code to (re)create.
SVG Aerofoils plus data files and source code to (re)create.

             << ZIP may not work for everyone

SVG Aerofoils plus data files and source code to (re)create.
Description: Package Contents:

A readme.txt containing the following notes.

Selig format aerofoil .dat files as downloaded from on

JSON format versions of the Selig files. The JSON formatted data files use the aerofoil name.

SVG aerofoil plots for (nearly) all of the source data files sized for a 100mm chord. If you need another size open the file in your favourite SVG drawing tool (Inkscape, Corel, Adobe etc.) and rescale to suit. Or build and run the AerofoilMake util (see notes below).

A handful of the source files were not processed because they recorded the ordinates in an exponent form or because they contained the older above/below a datum format. The exponent forms weren't processed because I discovered them fairly late on and I couldn't be bothered to rejig the code to deal with them. An exercise for the interested reader.

Source code to:
- Convert Selig format to json format data.
- Code to generate svg file from json format data.

The zip file structure is :

- Code (See later notes)
- Dat

The SVG directory is broken out into sub-directories A to W. Some of the sub-directories are further sub-divided where there are large classes of an aerofoil. For example, SVG\E\Eppler and SVG\N\NACA.

I _strongly_ recommend retaining the directory structure when you unpack the zip file. You can re-organise it afterwards.

The SVG plots are a specified using a single Cubic Bezier Curve path. This seems to give good results for the couple of dozen that I've checked and certainly better results than a polyline. Generally speaking the more ordinate points the smoother the plotted curve. Be warned that there may be dud plots , either because of a DAT to JSON conversion error or because a single path type is inadequate. If you do find a dud please let me know and I'll look into it.

Note well. The code is _nowhere_ near production quality and my work colleagues would have a fit if they saw it, but it's just about good enough for hacking about at home.

The code is organised as three projects in a Visual Studio project and uses .Net Framework 4.5 so any version of MS Visual Studio from 2013 onwards (including Community Editions) should do.

Project: Aerofoil.
Builds a DLL providing methods to load ordinates from JSON data, generate a plot sized for a given chord (in mm) and save the plot to an svg file.

Depends upon NewtonSoft.json.dll. Included.

Ignore the inheritance / interface stuff for the SVG output. I got side-tracked into creating a small GP SVG creation library which was completely unnecessary so I ripped it out. You can simplify the SVG creation a great deal for this special case if you're so minded.

Project: SeligToJson

Command line. Walks a collection of .dat files in a named directory, convert each to a JSON format file in suitable for use by Aerofoil and then write to target directory.

Project AerofoilMake
Command line. Take a single named JSON file, a chord in mm and an output directory. Writes resulting svg file to output directory.

On my cranky old grid (Win 7 32 bit, 8 year old) laptop.
+ JSON generation / conversion takes a few tens of seconds.
+ SVG generation takes about 10 to 15 minutes or so for 1500 aerofoils.

All source code, json and SVG output files public domain. No rights reserved for these.

The .DAT files are due to Selig and treat these as for being for individual use only.
Date: 01.28.2018 20:16
Hits: 1229
Downloads: 305
Rating: 5.00 (1 Vote(s))
File size: 3.3 MB
Added by: TheLurker

There are no comments for this image

Previous Plan:
Single Blade Propellers  
 Next Plan:
Testing Plastic Rubber Powered Props



RSS Feed: SVG Aerofoils plus data files and source code to (re)create. (Comments)