# Reverse Engineering 3D Computer Hull Shapes From 2D Lines Drawings and Offsets Tables

Stephen M. Hollister

New Wave Systems, Inc.

There is nothing new under the sun. This quote from an unknown source has been applied many times to the design of boats and ships.  Virtually all boats are developments or extrapolations of previous designs.  With the advent of computer-aided design for boats and ships, there is a desire to recreate many of these tried-and-true designs as 3-dimensional surface models to use as references or starting shapes.  For others, however, the goal is to recreate a classic design on the computer for study purposes or to build a replica of the vessel.  This 2D to 3D reverse engineering problem will be discussed in this article.

First, let’s make it very clear that there is no one unique solution to fitting exact 3D mathematical surfaces to a set of curves and offsets points.  In fact, the lines drawing and offsets data might not agree.  The traditional lines drawing approach by hand required the designer to both create fair curves (stations, waterlines, buttocks, diagonals) and to make sure that the curves matched up to each other in the three main drawing views: Profile, Plan, and Section. Generally speaking, however, one will find when studying lines drawings in books that the curves might look smooth and fair, but the lines do not agree exactly in the three views. For example, the half breadth of station 5 at waterline 3 in the section view might not agree with the half breadth of waterline 3 at station 5 in the plan view. On top of that, the designer creates the traditional offsets table by measuring or scaling off the half breadths and heights from the lines drawing.

Hopefully, these errors will be within building tolerances. But, if you ever talk to loftsmen who have worked with these offsets tables, you will hear some great stories.  After dealing with possible errors in the offsets table, there is the variation between how loftsmen interpret the shape of the hull between the defined offset points and curves.  If you give a table of offsets and a lines drawing to five different loftsmen, you will end up with 5 different boats.  Another problem occurs during lofting when you begin to recreate and fair the curves full size. You tweak a little bit here and fair a little bit there and before you know it, the boat changes shape!  One story goes that when a designer came back to check on the final, full size loft patterns of his design, he said to the loftsman … “That’s a nice, fair hull, but that’s not my boat!”

Before going on, I need to comment on another term you might encounter: “a faired table of offsets”.  Well, most designers liked to think that the original table of offsets that were measured from the lines drawing was fair and accurate. However, loftsmen knew better. They knew which designers were the best draftsmen.  This led to the practice where the loftsman would create a new table of offsets based on their full-size templates.  These offsets were called “faired”, even though the original table of offsets might be perfectly fine.  Since these faired offsets were used to build the boat, then one might consider that they more closely represented the true shape of the original boat. But, then you hear all of the stories about how hulls were modified in shape during construction.  This now becomes a question of historical accuracy that is independent of the problems discussed in this article.

These traditional hand drafting and lofting problems are important because they are the exact same problems encountered when you try to recreate the 3D hull surface shape on the computer. Namely, given a limited set of 2D curves and offsets on a hull, there is no single way to fit a 3D surface to this collection of points and curves. Secondly, once you fit a surface to the original curve and offsets data, there is a great tendency to change the shape of the hull during the final shaping and fairing process.  The computer program is not smart enough to do this final shaping itself.  It needs the judgment of an experienced designer or boatbuilder. The next section will discuss the general process of using a computer-aided design program to recreate the curves and offsets data as 3D surfaces.

Before going further, you need to read the article called “Reverse Engineering”, by Stephen Hollister in the Tutorials section of www.pilot3d.com. This article goes into great detail about the techniques that can be used to get input curves and coordinate points into a CAD program.  It also talks specifically about using our Pilot3D program (which is a subset of our ProSurf 3 program for boats and ships) for performing these tasks.  You can also read the Reverse Engineering Example on the same tutorial web page.  This example explains how a Romer digitizing arm was used to digitize a damaged portion of a ship’s hull (with a radiused cut-out) and how the raw data was read into Pilot3D and fit with a NURB surface and then finally unwrapped to create the 2D pattern to be cut.

The following discussion will talk about how these techniques can be applied to the reverse engineering of a hull surface.

You need to start by figuring out what you want to do with the hull shape once you get it into the computer.  This really affects the effort you need to put into the task.  I will break the job into the following levels of difficulty:

Calculations Only - You only wish to get the shape of the vessel into the computer to do some calculations.  This means that you only need to define the shape for a series of stations along the length of the boat.  These shapes do not have to be perfectly fair because all calculation programs for hydrostatics and stability and resistance are not sensitive to the smoothness of the hull.  A one to three percent error is perfectly acceptable.  All calculation programs are based on station shapes so you do not need to convert the stations to a full surface model to perform their calculations.  All calculation programs, like NWS, SHCP or GHS, are based only on station shapes.  The conversion from stations (or other curves) into a full surface model is where the trouble begins.  You do not need a hull fairing program if all you want to do are the calculations!

Surface Fitting -You need to convert the stations into a surface model to take advantage of the capabilities of hull surface modeling and fairing programs.  This means that you need some CAD program that will allow you to skin, loft, or fit surfaces to the input station or curve data that describes the hull.  As I said, this is where the trouble begins.  Most surface programs use NURB surfaces (see the tutorial on NURB surfaces) to describe the shape of the hull.  NURB surfaces are very powerful, but they have their problems.  It takes some experience to figure out the best way to skin or loft the curves of a hull with these surfaces.  (By the way, some reverse engineering programs that use NURB surfaces for the non-marine market cost ten to twenty thousand (or more) dollars, like Raindrop Geomagic and Paraform.) You will notice that the quality of the fit of the surfaces to the curves will vary greatly depending on how you orient the surfaces and the quality and amount of input curves that you have.

Surface Clean Up - Once you have fit the curves with one or more NURB surfaces, you will have to clean up or fair the shape, just like the job of the loftsman.  How much of this clean up you have to do depends on what you need to do with the hull. If you want to take the hull and stretch or modify its shape greatly, then you probably do not want to spend the time to clean up the initial hull shape.  You should wait until you pull and tweak the initial shape into its final form.

Surface Fairing - If you want to recreate the original hull, but you do not care if it is perfect, then you can go ahead and use the program’s shaping and fairing tools to clean up and fair the hull shape.

Surface Accuracy - If, however, you want to recreate the original lines drawing and offsets table as accurately as possible, then you have to do the final shaping and fairing by changing the hull as little as possible.  This requires the exact same judgment as the loftsman on the loft floor.  Using a computer program, there is a great tendency to change the shape during this final fairing process.  One way to control this process is by keeping the original input lines drawing curves in the CAD program to show you how far you are changing the hull shape. Again, this is where experience is critical.  No computer program can make these trade-offs between accuracy and shape.

As you can see, this reverse engineering process is one of the more difficult tasks to perform, especially right after you first purchase your boat design program.  It is better to tackle this process after you have has a little practice with the program.  However, here are a few extraneous notes.

Note 1:  When you fit or skin or loft a surface through a set of defining curves, you often have control over the number of edit or control points or curves to use.  (We call them rows or columns of the surface.) The more rows or columns that you use in the fitting process, the more accurate will be the surface fit to the defining curves, but the more difficult it will be to perform the final shaping and fairing. More edit or control points mean more tweaking and fairing of the surface.  If you plan on modifying the shape of the original input hull curves, then you may wish to use fewer rows or columns in the fitting process

Note 2:  See the article on “The Dirty Little Secrets of Hull Design by Computer”, by Stephen Hollister for a good explanation of the problems associated with fitting NURB surfaces (or any type of surface, for that matter), to a set of input curves.

Finally, the following is just one example of recreating a 3D hull shape on the computer.  It starts with offsets of a classic canoe defined in an Excel spreadsheet, not necessarily in the most convenient format.

1. Opened up the BNMorris.XLS file in Excel.

2. For each station (spreadsheet tab), I saved them to separate TXT files using the File-Save As command.  I had to do this because Excel only allows me to output one tab sheet per TXT file.  I used the "Text (Tab Delimited) *.txt option for the Save As command.  Station 0 I called BN0.txt; Station 1 I called BN1.txt ... to the stem, which I called BNstem.txt

3. I used Start-Programs-Accessories-NotePad to read each TXT file and edited them to fit the following ProSurf TXT File Input format for polylines:

PLINE3D

Npts=5

X1   Y1   Z1

X2   Y2   Z2

X3   Y3   Z3

X4   Y4   Z4

X5   Y5   Z5

This is the general layout for defining a polyline.  The ones I created typically had more points.  I did this for all of the station files.

4. Started up ProSurf 3 and changed it to display just one Window showing the section or body play view.  (Many people like the 4 view split screen, but I really prefer to look at one large view of the boat.)

5. For each TXT station file, I used the following commands:

A. File-Data File Input-TXT Input to read in a TXT station file.

B. Curve-CurveFit command to convert the 3D station polyline to a curve.

C. Curve-ReFit Curve-Equal Spacing command to evenly re-space the points on the curve. This improves the fairness of the station curve.

D. Right-clicked on the curve (not near any of the edit points) to see the attribute box for the curve. Turned the "Symmetric" check box to make sure that I will create both halves of the boat.

6. At this point, you should have all of the stations (and stem) read into ProSurf and curvefit and partially faired. Evaluate the hull in 3D View to make sure that you have both sides of the hull.

7. Now, you need to create the mirrored "other half" of the boat.  Start by selecting the Modify-Mirror Entity/Group-Mirror by Set Plane command and fill in the following values:

X1 = 8.5    Y1 = 0.0    Z1 = 1.0

X2 = 8.5    Y2 = 0.0    Z2 = 0.0

X3 = 8.5    Y3 = 1.0    Z3 = 0.0

This defines a mirror plane at X = 8.5 [3 points define a plane] but it does not do anything.

8. Select the Modify-Mirror Entity/Group-COPY Mirror by Set Plane command.  Note that we want to make a COPY of each command and mirror it about X = 8.5

9. Pick the station curves at X=7, X=5.5, X=4, X=2.5, X=1.75, X=1, and the Stem. [But, do NOT pick the X=8.5 station, since there will be only one of these.]  Each time you pick a curve, the program will make a copy of it and mirror it about the X=8.5 plane.

10. Look at the boat in the 3D view to see if everything is OK.  Remember, all we have right now are 3D curves that run the length of the boat.

11. Display the boat in the profile view.

12. Select the Create 3D-Skin/Loft command. Then pick each station [near the top of the curve], starting at the bow station and continuing aft to the stern station.  As you pick each station curve, the program will "highlight" [invert its color] the station.  After you have picked the stern station, pick the right mouse button (anywhere) and a dialog box will be displayed.  Take the default values and just pick the OK button.  The program will then fit one NURB surface through all of the picked stations.  When I did this, I got the result shown below:

Actually, this is a "hidden line" view of the hull.  This is what I got even though I did no preliminary fairing of the input curves other than to curvefit the polylines and re-space the curves.  The fairness is not perfect, but it shouldn't take too much effort to fix it up.