Updated 10 Aug 2003

Latest Updates

A Wing in Rhino

Latest Tutorial

The design of the wing of an aircraft is obviously fundamental to the way the machine flies. It is also extremely important to the way our 3D model will look. Our eyes and brain are finely tuned to recognise shape, pattern and movement. Wether our final model is digital and viewed on screen or a physical model, its shape must be convincing or otherwise the illusion we are seeking will be lost. Rhino enables us to easily create accurate 3D representations of the surfaces we need for our model, provided we have good data from which to work .

Wing sections, or aerofoils (airfoils in some dictionaries), have been the subject of massive study since Orville and Wilbur built their first wind tunnel. Shapes have been coded and defined and there are several valuable resources on the web to generate the shapes in a form useful to aerodynamicists, engineers, architects and 3D flight sim designers! First place to look is UIUC Applied Aerodynamics Group . Coordinate data for hundreds of different aerofoils is held at UIUC Airfoil Coordinates Database and if you want to find out which particular section was used on the aircraft you are modelling, check out The Incomplete Guide to Airfoil Usage which list hundreds of aircraft and their aerofoils.  To view and edit aerofoil sections there is a very useful piece of software available called Aerofoil Utility which is well worth the small registration fee if you plan to use a lot of different sections. For this exercise however, we will look at  modelling our wing section using the database information directly.

1.   We will start our Martin Baker MB5 wing by checking which aerofoil this aircraft had. Using the Guide web link above, we get ‘RAF34’ for both root and tip sections. If we now use the Database link and search for RAF 34, we find two files available, a .gif bitmap image of the section plotted out and a .dat file, a simple text file, which lists co-ordinates for the upper and lower section profile. Download and save both files.

2.   We could simply import the bitmap image and trace over it. The image we downloaded is a .gif bitmap which isn’t supported by Rhino (in version 2 at least) so open the file in your favourite paint program and save as... or export it as a .jpg or other supported bitmap. I had problems with the .tif format, but the others all worked OK. You can then place the bitmap into one of your views, position and scale as we did in the setup tutorial and trace over the bitmap with the InterpCrv tool. For many purposes this will be perfectly adequate, but since we have numerical coordinate data, lets see if we can use that directly.

3.   Open the .dat file with Notepad or any word processor program. You will find the name of the aerofoil and then 2 pairs of columns of numbers. These are the x and y co-ordinates for the upper and lower curves that make up the section. The first column runs from 0 to 1 and indicates the coordinate positions from leading to trailing edge, while the second column indicates the ‘height’ (or ‘depth’ if negative) above the horizontal axis.

4.   You could use the InterpCrv tool manually, and type the co-ordinates in with the keyboard, but this would be a bit tedious, and prone to mistakes. Rhino has a neat tool called ReadCommandFile which will ‘read’ text files and execute the commands and data it finds. The process is very similar to constructing the commands for the button we made in the Face Tool tutorial. For more details look up ReadCommandFile in the command listing in Rhino’s Help menu.

5.   We can create the text file we need in any text editor; Notepad is perfect. Open the raf34.dat file and save it as a different name, just in case we need to go back to the original. raf34_rhino.txt would be fine. Notice we have changed the file extension from .dat to .txt. This is so Rhino will easily recognise it as a possible command list file later on. Looking at the command list example in the Rhino help file, we can see the text format is slightly different to that in our original .dat file. Firstly, we need an exclamation mark and space; This cancels any unfinished commands still open. Then we need to enter the drawing command we need. In this case InterpCrv is the one to use, it will draw a smooth curve exactly through each point we specify. Then we must delete the blank lines, and the 2 ‘17’ entries, so the next line is the first of our co-ordinates. Then, delete the ‘space’ character in front of each coordinate pair, and replace the ‘space’ between each pair of numbers with a comma (,).

 6.  Remember that we have two curves described within this data, for the upper and lower lines. As we will be working with an upper and a lower wing surface, we will keep the data separate, actually running the InterpCrv command twice. Typing in ‘Enter’ just after the first set of co-ordinates will finish the drawing of the first line. Add a blank line under this ‘Enter’ and type into it a repeat of the ‘InterpCrv’ command. Finally at the end of the second block of co-ordinates, type in ‘Enter’ again to finish the second line, and save the file. Here are two images showing the text file before and after this editing.

7.   To use our text file in Rhino, just select the ‘Read From File...’ command from the Tools/Commands menu,

8.   Browse to and select your edited text file and hit the enter key.

9.   When you press enter, the two curves will be drawn into your workspace; watch carefully, it happens in a blink of an eye! You will find that they have been drawn into the current active view and in the units selected for the Rhino document. Since this model has units set to 1 foot, the section is 1 foot long. It is also facing the wrong way. However it is straightforward to scale and rotate the aerofoil curves to the correct size and location, ready for the next stage of building our wing.

10.  The ‘ReadCommandFile’ tool is an extremely powerful one. All Rhino commands can be written into text files this way, along with the various settings and data required. Any repetitive series of commands, or reused data can be used economically, and the Rhino Help files have some good suggestions. Its use is only limited by your imagination; like any good tool!