~hh8476

71
1.0 BASICS Introduction This tutorial will guide you through some of the basic features of FastShip. In it, you will learn about the layout of the user interface, read an existing surface file, and perform some basic operations on that file. Finally, you will be shown the basics of starting a new design. Steps that you should carry out are preceeded by a bullet symbol (·). 1.1 The User Interface 1.2 Reading & Displaying a Surface 1.3 Viewing Options 1.4 Parts and Properties 1.5 Sections 1.6 Measuring Points and Hydrostatics 1.7 Starting a Hull Design 1.8 Recovering Lost Data j0196114.wmf (6762 bytes) FastShip 6 Tutorials 1.0 BASICS 1.1 The User Interface 1.2 Reading & Displaying a Surface 1.3 Viewing Options 1.4 Parts and Properties 1.5 Sections 1.6 Measuring Points and Hydrostatics 1.7 Starting a Hull Design 1.8 Recovering Lost Data 2.0 EDITING 2.1 Constraint Planes 2.2 Transforming Points, Patches, Parts 2.3 Defining Sections 2.4 Changing the Weight of Control Point 2.5 Adding Rows or Columns into the Net 2.6 Adding Knots to the Surface 2.7 Splitting Surfaces 2.8 Linking Control Points Together 3.0 IMPORT/EXPORT 3.1 Refining Sections 3.2 The Parts Tree 3.3 Data Export 3.4 Data Import 3.5 Lines Drawings and Offset Tables 4.0 ADVANCED EDITING 4.1 Construction Geometry 4.2 Absolute & Relative Coordinate Systems 4.3 XYZ & CYL Coordinate Systems 4.4 Measuring Curvature and Fairness 4.5 The Command Line & Macros 4.6 FastGen 4.7 Fitting to Existing Offsets 4.8 Surface Intersections 4.9 Surface Trimming 5.0 SPECIFIC GEOMETRIES 5.1 Chines/Knuckles 5.2 Bow Bulbs 5.3 Bilge Radii 5.4 Broken Sheerlines 5.5 Bow Thrusters &Tunnels 5.6 Bow Cones 5.7 Cylinders 6.0 NURBS SURFACES FastShip is designed to be an easy-to-use, intuitive program for the design of ship and yacht hulls, appendages, and superstructures. With FastShip, you can quickly and easily your create designs. At the same time, FastShip is a very sophisticated and flexible program, with many options and features to allow you to create very complex designs. Like any program, learning to use all of the features will help you to use it to its full potential, in a more efficient manner. To this end, we have created a series of tutorials, which go through the major functions and features of FastShip in a step-by-step manner. Working through these tutorials, experimenting with the program, and where necessary, gathering further detail from the Command Reference will enhance your experience and results with FastShip. Each of the tutorials builds on the previous lessons. Please take the time to work through (or at least read) each of the tutorials. Tutorial 1, BASICS, will show you how to start the program, read in an existing surface file, and view it on screen. In addition, some basic measuring, such as measuring points on the surface, and computing hydrostatics are covered. Finally, the various methods for beginning a new design are shown. In Tutorial 2, EDITING, the lessons describe all of the methods for editing the shape of the surface, as well as adding extra control in the form of new rows and columns in the net, and knots on the surface. Finally, methods are described to split surfaces, and to link points together, such as along the edges of two surfaces. What do you do once you have finished your surface? Tutorial 3, IMPORT/EXPORT first discusses how to prepare your data for export, and then how to create various forms of output. While we're here, we'll see how to bring data into FastShip as well. Tutorial 4, ADVANCED EDITING, is where you see the features that really set FastShip apart, those that allow you to precisely place the control points to give you exactly the surface shape that you want. If you need to create a surface that matches existing offsets, FastShip has tools to make the job easier, and the process is covered here in a step-by-step fashion (more theoretical detail is given in a referenced document). Surface intersections and trimming are described, which give you great flexibility in creating complex models. All of what has been learned to this point is applied to specific, real-world geometries that ship and yacht designers must create in Tutorial 5, SPECIFIC GEOMETRIES. The methods shown are by no means the only way to create these shapes, but present a logical method to solve these everyday modeling problems. Finally, some theoretical background to NURBS surfaces is given in Tutorial 6, NURBS surfaces. While this is not a hands-on tutorial, it is worthwhile reading, as it will give you insight into how the surfaces react to your changes. When you're ready to get started, just click on the appropriate lesson in the left-hand column. And remember, if you need help, contact Proteus or one of our representatives . Page 1 of 71 FastShip 6 Tutorials 28-08-2013 file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

description

catamaran

Transcript of ~hh8476

Page 1: ~hh8476

1.0 BASICS

IntroductionThis tutorial will guide you through some of the basic features of FastShip. In it, you will learn about the layout of the user interface, read an existing surface file, and perform some basic operations on that file. Finally, you will be shown the basics of starting a new design.

Steps that you should carry out are preceeded by a bullet symbol (·).

1.1 The User Interface1.2 Reading & Displaying a Surface1.3 Viewing Options1.4 Parts and Properties1.5 Sections1.6 Measuring Points and Hydrostatics1.7 Starting a Hull Design

1.8 Recovering Lost Data

j0196114.wmf (6762 bytes)

FastShip 6 Tutorials

1.0 BASICS

1.1 The User Interface1.2 Reading & Displaying a Surface1.3 Viewing Options1.4 Parts and Properties1.5 Sections1.6 Measuring Points and Hydrostatics1.7 Starting a Hull Design

1.8 Recovering Lost Data

2.0 EDITING

2.1 Constraint Planes2.2 Transforming Points, Patches, Parts2.3 Defining Sections2.4 Changing the Weight of Control Point2.5 Adding Rows or Columns into the Net2.6 Adding Knots to the Surface2.7 Splitting Surfaces2.8 Linking Control Points Together

3.0 IMPORT/EXPORT

3.1 Refining Sections3.2 The Parts Tree3.3 Data Export3.4 Data Import3.5 Lines Drawings and Offset Tables

4.0 ADVANCED EDITING

4.1 Construction Geometry4.2 Absolute & Relative Coordinate Systems4.3 XYZ & CYL Coordinate Systems4.4 Measuring Curvature and Fairness4.5 The Command Line & Macros4.6 FastGen4.7 Fitting to Existing Offsets4.8 Surface Intersections4.9 Surface Trimming

5.0 SPECIFIC GEOMETRIES

5.1 Chines/Knuckles5.2 Bow Bulbs5.3 Bilge Radii5.4 Broken Sheerlines5.5 Bow Thrusters &Tunnels5.6 Bow Cones5.7 Cylinders

6.0 NURBS SURFACES

FastShip is designed to be an easy-to-use, intuitive program for the design of ship and yacht hulls, appendages, and superstructures. With FastShip, you can quickly and easily your create designs. At the same time, FastShip is a very sophisticated and flexible program, with many options and features to allow you to create very complex designs.

Like any program, learning to use all of the features will help you to use it to its full potential, in a more efficient manner. To this end, we have created a series of tutorials, which go through the major functions and features of FastShip in a step-by-step manner. Working through these tutorials, experimenting with the program, and where necessary, gathering further detail from the Command Reference will enhance your experience and results with FastShip.

Each of the tutorials builds on the previous lessons. Please take the time to work through (or at least read) each of the tutorials.

Tutorial 1, BASICS, will show you how to start the program, read in an existing surface file, and view it on screen. In addition, some basic measuring, such as measuring points on the surface, and computing hydrostatics are covered. Finally, the various methods for beginning a new design are shown.

In Tutorial 2, EDITING, the lessons describe all of the methods for editing the shape of the surface, as well as adding extra control in the form of new rows and columns in the net, and knots on the surface. Finally, methods are described to split surfaces, and to link points together, such as along the edges of two surfaces.

What do you do once you have finished your surface? Tutorial 3, IMPORT/EXPORT first discusses how to prepare your data for export, and then how to create various forms of output. While we're here, we'll see how to bring data into FastShip as well.

Tutorial 4, ADVANCED EDITING, is where you see the features that really set FastShip apart, those that allow you to precisely place the control points to give you exactly the surface shape that you want. If you need to create a surface that matches existing offsets, FastShip has tools to make the job easier, and the process is covered here in a step-by-step fashion (more theoretical detail is given in a referenced document). Surface intersections and trimming are described, which give you great flexibility in creating complex models.

All of what has been learned to this point is applied to specific, real-world geometries that ship and yacht designers must create in Tutorial 5, SPECIFIC GEOMETRIES. The methods shown are by no means the only way to create these shapes, but present a logical method to solve these everyday modeling problems.

Finally, some theoretical background to NURBS surfaces is given in Tutorial 6, NURBS surfaces. While this is not a hands-on tutorial, it is worthwhile reading, as it will give you insight into how the surfaces react to your changes.

When you're ready to get started, just click on the appropriate lesson in the left-hand column. And remember, if you need help, contact Proteus or one of our representatives.

Page 1 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 2: ~hh8476

1.1 The User Interface

The FastShip user interface has six major components:

1. Pull Down Menus: All of the functions are available in the pull-down menus. Most of these functions can be accessed through the toolbars.

2. Toolbars: Toolbars are groups of buttons organized by function. They may be rearranged, undocked, and turned off (use View/Toolbars).

3. Parts Tree: This pane shows a hierarchical view of your model, in a fashion similar to the Windows® Explorer.

4. Command Line: FastShip is fundamentally command driven. This means that each function in the pull-down menus and each button has a corrresponding command that could be typed in the Command Line (there are a few exceptions to this). As you become more familiar with the program you may find it quicker sometimes to type a command. Also, some functions that are initialized with the graphical interface require you to enter information, which you do on the Command Line.

5. Command Echo: As commands are processed, they are displayed in the Command Echo area. Watching this area is a good way to learn the command language.

6. Prompts: As you move the mouse over the buttons or commands in the pull-down menus, the lower prompt line will display a description of the function. The upper prompt line displays prompts as commands are executed.

1.2 Reading & Displaying a Surface

µ Click on the Open button ( ) µ Select "demoship.srf"

Your screen should look like the following figure:

The red lines are know as the "surface mesh". They are one way of displaying the surface, and the lines are computed directly from the NURBS control points. Notice in the Parts Tree pane, the part "Top" now has a plus sign next to it.

µ Expand the parts tree by clicking on the plus sign (+). Notice the list of parts that make up this model; aftbulwark, fwdbulwark, main hull, new, and transom (note the symbol next to "new" is different; this indicates that the surface "new" is invisible).

t1_userinterface.jpg (25856 bytes)

t1_readsurface.jpg (19112 bytes)

t1_parttree1.jpg (4637 bytes)

Page 2 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 3: ~hh8476

By default, when a new surface is read in, the view is a Profile view.

µ To view the hull in Bodyplan, click on the Bodyplan button ( ) µ To view the hull in Profile, click on the Profile button ( ) µ To view the hull in Planview, click on the Planview button ( ) µ To revert to the previous view, click on the Last button ( ) µ To Zoom in, click on the Zoom In button ( ), and draw a box around the area where you wish to zoom in. Click once for the first corner, and click again for the

second corner. (If you have a mouse with a wheel, scrolling the wheel will zoom in and out. Holding SHIFT or CTRL will increase the zoom factor.) µ To fit the entire model into the graphics window, click the Fit button ( ). µ To pan the view, click on the Pan button ( ), and then click, hold, and drag the view. µ To rotate the model, click on the Spin button ( ), and click and drag to rotate to the desired view. µ To toggle to a perspective view, click on the Perspective button ( ).

1.3 Viewing Options

Surface Visibility

FastShip allows you to view the hull with many different options. Some of these are controlled with the Surface Visibility toolbar. From left to right, these buttons turn on or off the following:

Perimeter: The Perimeter is the edge of the surface(s), as well as any "multiple knots", of multiplicity equal to the degree of the surface (multiple knots will be described in more detail later, and are used to create discontinuities in the surface, such as chines or knuckles).

Sections: These are stations, buttocks, waterlines, cant frames, diagonals, inclinces, or any other planar section cut through the surface.

Intersections: The curve resulting from intersecting one surface with another.

Mesh: As described earlier, isoparametric lines computed directly from the control points (Net).

Solid: Renders the surface as a continuous, solid surface.

Lights: Highlights the hull with lighting. By default this light is coming from where you are sitting. Lights are only in effect when Solid is turned on.

Any or all of these options may be turned on at the same time. Experiment with various combinations, and spin the hull as described in Section 1.2.

Control Net Display

So far, we have seen the surface, viewed it from different angles, and rendered it with different representations. But how is the shape created? As with any spline technique, NURBS curves and surfaces have control points that define their shape. In FastShip, these control points are arranged as a series of rows and columns, which together make up the "Control Net" (sometimes referred to simply as "the net"; the control points are sometimes referred to as "vertices" or "poles"). The NURBS tutorial will give you a basic understanding of the mathematics, and the true relationship between the net and the surface.

For now, you can think of the surface as a "mathematical sheet of rubber", with the net lying outside of the hull. The surface does not, in general, pass through any of the control points, but is attracted in the direction of the control points.

µ Turn on the Control Net, by clicking on the Net button. µ Turn on the Surface, by clicking on the Surface button. µ Turn on both, by clicking on the Net + Surface button. µ The TAB key will toggle through Net, Surface, and Net+Surface. Press the TAB key to see this behavior.

To learn more about the net/surface relationship,

µ Click on the Open button, and select the file tutorial_1_3.srf. Your screen should look like the following figure:

Now spin the surface, and turn on both the net and the surface. Notice that the surface is "stretched" in the direction of the control points, but does not pass through them (except at the corners).

Reference Geometry

In addition to the surface and the control net, FastShip can display a number of different types of reference geometry. These include:

tutorial_1_3.gif (34304 bytes)

Page 3 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 4: ~hh8476

Frame: The frame, which is on by default, shows the coordinate system as three rectangles representing the X=0, Y=0, and Z=0 planes.

Construction Geometry: With FastShip you can create construction geometry in the form of markers and lines to help you precisely place control points.

Offsets: Offset data, in the form of polylines, can be read from an IDF file and displayed. This is particularly useful if you are trying to re-create an existing design.

Waterplane: A flat "water surface" is drawn at Z=0 for rendering purposes. The waterplane only shows when Solid is turned on.

View Layout

So far, we have only seen one view of the surface. FastShip can also divide the graphics area into two or four viewports, with each viewport having an independent view of the model.

µ Click on the split horizontal button to divide the graphics area into two viewports, split by a horizontal line

Notice that each viewport has a number in its upper, right-hand corner. They are numbered 0 through 3, with 3 being the default viewport for a single viewport. When you switch to the horizontal split view, you will see viewports 3 and 1. Notice that one of the numbers is green; this indicates that this viewport is the "active" viewport, and will be the viewport used for editing. You can change the active viewport by clicking on the toggle viewport button.

µ Click on the four-view button µ Change the active viewport by clicking on the toggle viewport button (CTRL-TAB will also toggle the active viewport)

Inactive viewports can be used for selection of control points for editing, or anytime a command is prompting you to select a surface or other geometry. Note that construction geometry is only shown in the viewport where it was defined.

Cutting Planes

Sometimes it is helpful to only view a part of the model, and to make the rest invisible. This can be done by:

-turning off reference geometry

-making individual surfaces invisible (more on this in the next section)

-using Cutting Planes

A cutting plane is a plane in space beyond which everything is invisible. The planes are oriented in the three principal directions, and are called station (X=constant), buttock (Y=constant), and waterline (Z=constant).

µ Insert a station cutting plane by selecting View/Cutting Plane/Station from the pull-down menu µ Click anywhere in the surface where you want the cutting plane to be inserted µ Click on the side of the cutting plane that you want to remain visible

You may insert more than one cutting plane at a time, to further reduce the part of the model to be displayed.

µ Display the entire model by selecting View/Cutting Plane/Delete.

Cutting planes only affect the display of the model. The surface, construction geometry, offsets, etc. all still exist, but are just not drawn.

1.4 Parts and Properties

The Hierarchical Parts Tree

Frequently FastShip models are made using more than one surface, and it is useful to organize the surfaces in a hierarchical fashion, similar to the way that files and folders are organized on a hard disk. In FastShip terminology, files are surfaces, and folders are nodes, and both are thought of as parts.

partsTreeTB.jpg (1893 bytes)

In this example, a model is made up of 23 surfaces. With the hierarchical organization, surfaces can be grouped logically, and can be acted on as a group (moved, made visible/invisible, color changed, deleted, etc.). Without this organization, it would be difficult to manage all 23 surfaces, just as it would be difficult to manage files on your computer if they were all in the root directory.

The hierarchical organization of parts is known as the Parts Tree. The root of the tree is always called "top" (roughly equivalent to c:\ on your hard disk). Any number of surfaces and nodes can be created under top, and each of these nodes can have children (note that surfaces can have children as well, but this is not considered to be good practice). In the figure, the aft engineroom bulkhead surface is "/top/internals/bulkheads/xverse/aftengine". The parts tree pane can be turned on and off with the parts tree button.

Page 4 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 5: ~hh8476

Part Properties

Every part has a set of properties, including its visibility, whether it is the current part or view part, mesh density, surface/section/perimeter/intersection/offset color, and offset. These properties are typically set by right-clicking on the part name in the parts tree, or right-clicking on the surface when no other functions are active.

µ Right-click on a surface name in the parts tree; escape to close the menu. µ Click on the Cancel button ( ) to make sure no other functions are active, then right-click on the surface in the graphics area.

You should see a context menu like this figure: By selecting the last item, Properties, you can see a table summarizing the properties of all of the surfaces. Each of the properties are described below. Setting any properties on a part sets those same properties on that part's children.

Visibility: Any part, including its children, can have its visibility turned off. This affects all viewports.

Current Part: The "current part" indicates which part or parts are available for editing. The current part and all of its children are accessible for editing and measuring. By default, "/top" is the current part, which means that any surface is accessible. The current part is shown with the hand icon. Note that "current part" is viewport independent. If you should try to edit or measure a surface that is not below the current part in the tree, FastShip will ignore it. The current part can be set by clicking on the current part button, and then either clicking on the surface, or typing the name of the part in the command line.

View Part: One of the uses of the parts tree is to make it easy to view just a portion of your model. The "View Part" is used to tell FastShip what part you would like to have displayed in the current viewport. The view part and all of its children will be displayed. In the example above, "mainhull" is the view part, and its children will be displayed ("bow thruster", "hull", "shaft", and "transom"). Note that the view part is indicated by the cyan coloring of the folder icon. The view part can be set by clicking on the view part button, and then either clicking on the surface, or typing the name of the part in the command line.

Color: The color may be independently set for a surface's mesh (also used for solid rendering), sections, perimeter, intersection curves, and any offsets in that part.

Offset: A surface may be offset by a distance, which is usually done to deduct the thickness of planking when building a plug for a mold. This offset is normal to the surface.

Mesh Divisions: The mesh div sets the number of points that will be computed in the surface mesh. The surface mesh is drawn by connecting these points with straight lines. Therefore, the denser the mesh, the smoother the curves will appear on the screen. The density of the mesh also affects the accuracy of the hydrostatics, curvature measurements, and the smoothness and accuracy of the sections (before the Refine-Sections command is used, at which point the smoothness and accuracy of the sections is independent of the mesh div). The figure shows the same surface, with two different mesh division settings.

parts_tree.jpg (19999 bytes)

context_menu1.gif (11404 bytes)

Page 5 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 6: ~hh8476

The mesh div is specified as a column division and row division (by default, 3x3). This means that by default each interval in the surface will be divided into three mesh intervals, or panels (an interval in the surface is defined by the area from one solid net row or column to the next). A mesh div of 1x1 would yield just one mesh panel for each interval in the surface, which would be a crude representation of the surface (unless the surface was flat, or straight in that direction). The column division specifies how many mesh panels from one net column to the next, and the row division specifies how many mesh panels from one row column to the next. The column and row divisions do not have to be the same value.

µ Adjust the mesh div by selecting Mesh Density from the menu, and enter the new values for column and row divisions, and click on OK.

The mesh div value is stored in the auxiliary file, and will be applied the next time the surface is read. If, however the auxiliary file is deleted or is not present for some reason, the mesh div value will revert to its default value of 3x3.

Copying, Deleting, and Mirroring Parts

You may copy, delete, or mirror (about the centerplane) a part from the right-click context menu. All of these actions are performed on the current part and all of its children. Note that before a part is deleted, it will be hightlighted in the graphics area, and you will be requested to confirm the deletion.

Create a new Node

New nodes can be created by right-clicking on a part in the parts tree, and selecting New Node from the context menu. The new node will be created under the part that you clicked on. You can also create a new node from the Parts/Create menu.

1.5 Sections

1.5.1 Introduction

Sections are polylines that are initially computed by interpolating the mesh. They can be computed to a finer (smoother) tolerance with the Refine function. Before refining, their smoothness on the screen is a function of the mesh div of the surface. Any section is simply a plane cut through the surface, and is a result of how the surface has been shaped. Sections therefore do not control the shape of the surface. Section types include station, buttock, waterline, diagonal, incline, cant, and general.

In order to see sections, you must complete two steps. The first is to define the type and location of the sections that you wish to see, and the second is to turn them on with the Sections button ( ) in the Surface Visibility toolbar. To define the sections, select the Group Section Definition button from the Sections toolbar (

). In the Sections dialog box below, you will be shown a list of the currently defined sections (there may be none). To add sections to the list, click on the Add button at the bottom of the screen.

mesh_div.gif (6839 bytes)

Page 6 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 7: ~hh8476

1.5.2 ADD

The Add Sections dialog box allows a great deal of flexibility in the definition of sections. The input fields are described here:

Mode

The two options are to specify the section by location or by number. By default, the origin for section numbering is (0,0,0), and the default spacing for section numbering is 1 meter. See Numbering for a description of the section numbering system. If you select Section Location, you will be entering coordinate values (for example, X values for stations). If you select Section Number, you will be defining sections by their section number, and the coordinates will be automatically determined using the current numbering system (origin and spacing).

Type

Here you specify what type of section you are going to define (station, buttock, waterline, cant, diagonal, incline, or general).

List

Section Location Mode: You can enter a list of the coordinates for the sections that you wish to add here. For example, if you are adding waterlines, type in a list of the Z values for the waterlines. The values may be separated by a comma or space.

Section Number Mode: You can enter a list of the section numbers that you wish to add. The values may be separated by a comma or space.

Group definition

Here you can specify sections by section spacing, number of sections, or a combination of both. Depending on the options that you have chosen, you can enter the section spacing, the number of sections, the starting location, and the ending location. Additionally, if you are defining cants, diagonals or inclines, you need to enter an angle. If you are defining a general plane, you will need to enter the normal vector to the plane.

If you don’t know the minimum and maximum values of your surface(s), clicking on the Compute Extents button will fill them into the Start and End fields automatically.

Once you have entered all of the information, click on the Add button. At this point, you can either add more sections, or click on the Close button to return to the Sections dialog box.

1.5.3 Editing Individual Sections

Double clicking on any section in the list will open a dialog box that allows you to change the Section Calculation (On/Off), Label, Section Number, Plane Constant, and Normal Vector for that plane. You may also double-click on the section itself to open this dialog box, but there must not be an active function in the command prompt; click on the Cancel button ( ) or hit ESC to cancel any active functions.

1.5.4 Delete

To delete sections, highlight them by clicking on them. You can highlight multiple sections by clicking and dragging the cursor, or by holding the Control key and clicking on individual sections. When you have highlighted the desired sections, click on the Delete button.

1.5.5 Calc on/off

Page 7 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 8: ~hh8476

Sections can be set to “calc off”, which means that their definition is kept, but they are not computed or stored. This capability is used to speed up functions such as refining when the sections are in an area of the surface that you are not currently concerned with. For example, if you have a lot of stations defined in the bow area, but are working on the stern, you could turn off the stations in the bow. Another example might be that if you are concentrating on waterline shape, you might turn off the calculation of all of the stations and buttocks.

To select sections to change their calculation flag, highlight them by clicking on them. You can highlight multiple sections by clicking and dragging the cursor, or by holding the Control key and clicking on individual sections. When you have highlighted the desired sections, click on the Calc On/Off button.

1.5.6 Numbering

Sections are listed in the Sections dialog box by both their Section Number and their Plane Constant. By default, the origin for section numbering is (0,0,0), and the default spacing for section numbering is 1 unit/section (e.g. meter). For example, stations at X=0, 2, 4, and 6 meters would be number 0, 2, 4 and 6. If the meters/section number were changed to 0.5, the stations would be numbered 0, 4, 8, and 12.

To change the section numbering, click on the Numbering button. You can then change the location of the origin for numbering, and the units/section value for stations, buttocks, and waterlines.

When you change these values, you can select whether the sections will stay in the same physical location and have their section numbers change, or stay at their previous section numbers, and have their physical location change.

1.5.7 Narrowing the list

In the Sections dialog box, you can indicate the section type that you would like displayed. By default, All sections are shown, but you can select just Stations, Buttocks, Waterlines, Inclines, Cants, Diagonals, or General.

1.5.8 Defining using Pivot

Sometimes it is convenient to be able to define sections just by clicking on the desired locations. To do this, select Sections/Station (or Buttock or Waterline), and then click on the desired location. The appropriate plane constant will be derived from the location that you clicked on (X for stations, Y for buttocks, Z for waterlines), and the section will be inserted. If you wish to use this function to define more than one section, click on the Replay button (in the Fast Button area), after clicking on Sections/Station. You can now click on multiple locations, and click on Cancel when you are finished.

1.5.9 Defining from the command line

Sections can be defined from the command line, with the command define-sections.

1.5.10 Defining from a macro

If you have a long list of sections to define, and you have them in some sort of data file, it may be convenient to write a short macro to define them in FastShip. For example, if you had a list of X values for stations, you could write an ASCII file similar to the following example:

define-sections sta list {i,j,k...}

where i,j,k... are your X values. After creating the file, read your surface into FastShip, and then select Utils/Read Macro.

1.5.11 Refining

The sections (stations, buttocks, waterlines, etc.) are initially computed by interpolating the mesh, so their smoothness is controlled by the resolution of the mesh. This yields very fast computation, and adequate resolution for the screen. But for output to files such as DXF, and for computation such as curvature (porcupines), they must be computed more accurately.

The sections can be “refined”, whereby they are re-computed directly from the surface, to a user-specified tolerance. This tolerance is the maximum distance from the section polyline to the actual surface, and is typically in the range of 0.25 to 1.0 mm. The figure shows an enlarged portion of a section.

To refine the sections, select Sections/Refine, and then choose a tolerance (the tolerance is in the current units). Refining “On Surface” keeps the same number of points on each section polyline, but corrects any points that are slightly off the actual surface due to the interpolating process.

While the refining is being done, a message will be shown in the Prompt Line, showing the progress of the computation. Any editing done after refining will “unrefine”the sections, so they should be refined again before output or porcupining.

Page 8 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 9: ~hh8476

1.6 Measuring Points and Hydrostatics (under construction)

see measure-position

see measure-volume-ex

1.7 Starting a Hull Design

When beginning a new design in FastShip, there are 6 basic approaches. All of these approaches supply you with a starting point, from which you can continue to modify the shape of the surface to meet your needs. The 6 approaches are:

1. Read in an existing file2. Use a Hull Wizard3. Select a hull from the Hull Library4. Use FastGen (Parametric FastShip) to modify a parent hull5. Start "from scratch" with a flat plate which will be molded into the desired shape 6. Match existing offsets (this will be discussed in more detail in Section 4.7, and the white paper "Fitting Surfaces to Existing Offsets")

Each of these approaches is described in more detail below.

1.7.1 Read an Existing File

Although this seems obvious, its power should not be overlooked. Every design that you create has enormous potential value to save you time on a later design project. It is not unheard of to complete a hull design in just a few minutes, by reading an existing design, scaling independently in length, beam, and depth, and perhaps making some local modifications.

1.7.2 Using a Hull Wizard

FastShip has Hull Wizards for planing hulls and containerships. While the planing hull wizard is quite flexible, the containership wizard, because of the complexity of the geometry, is perhaps better suited for quick conceptual studies than detail design

To use the hull wizards, select Tools/Hull Wizards, then select either Planing Hull or Containership. Both wizards have a tabbed dialog box with a number of entries that are described in the dialog box.

µ Select Tools/Hull Wizard/Planing Hull

You will see the following dialog box:

After entering all of the desired dimensions and shape factors, click on OK. A new surface will be created with the part name "planing hull", which is cubic longitudinally and quadratic in the transverse direction. The surface will have a single chine, unless a non-zero chine width is entered. If you wish to make the surface cubic in both directions, select NURBS/Raise Degree/Col, and click on the surface. At this point, you may edit the surface just as you would any other surface.

1.7.3 The Hull Library

The hull library is used to organize surface files, together with information about the vessel. It provides a very convenient method of cataloging surface files by more than just the file name; dimensional and non-dimensional information is stored and displayed as you scroll through the library. In addition, a bitmap file (.bmp) may be displayed to give the user more information about the hull.

planing_wizard.jpg (31169 bytes)

Page 9 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 10: ~hh8476

To choose a hull from the hull library, select File/Hull Library. The following dialog will be shown:

Navigate using the tree-view on the left. As you select each file, its dimensions and other information will be shown on the right. When you have found the hull that you want, click on OK. This brings up the next dialog, where you can input either new dimensions or scaling factors, together with a Project Name and Description:

Click on OK, and you will have your new hull. Again, this hull may now be modified like any other surface.

If you have the Basic Hull Library optional module, you can also store hulls into the Hull Library. When your hull is ready to be stored, select File/Export, and select Hull Library Format (.hml) as the file type. (Be sure to browse to the correct location for storing the file. When browsing the hull library, it is best to organize the library files in directories by the ship type.) The following dialog will be shown:

hull_library.jpg (48539 bytes)

hull_library2.jpg (19306 bytes)

Page 10 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 11: ~hh8476

Enter a flotation plane height (near the bottom of the dialog) and click on Calculate. This will automatically fill in the length, beam, draft, etc. and non-dimensional parameters. Next, enter the Synopsis, Source, DWT, Speed, and Propulsion information, and click on OK.

If you would like to have a bitmap displayed along with the information, create the .bmp file with the same name as the library file, but with the extension .bmp. The bitmap should be approximately 400x130 pixels. One approach to creating a lines drawing view is to first create a 3-view dxf file, and then to use a program like PaintShop Pro to convert it to a bitmap file.

1.7.4 FastGen (Parametric FastShip)

FastGen is a set of macros that are used to parametrically modify a special parent hull. FastGen is part of the "Parametric FastShip and Basic Hull Library" optional module. The three macros can:

µ Modify Gross Dimensions (length, beam, depth, draft, overhangs)

µ Modify Cx

µ Modify the Sectional Area Curve (LCB, Cp, Length of Parallel Midbody)

These macros use a parent hull, which has been developed with the following rules:

-single surface (plus an optional skeg surface)

-positive z up

-z=0 at the DWL

-must have parallel midbody (even if it is shrunken to zero length)

In addition, an ascii file with the extension .pmf is created, which contains a description of the surface topology, in naval architectural terms. For example, the indices of the forward and aft columns of the parallel midbody, the upper and lower bounds of the bilge radius, etc. are described.

For more information on using FastGen, see Section 4.6.

1.7.5 Starting from Scratch

This is the most basic method of designing a hull. In this approach, you first create a flat "plate" of NURBS surface, with the appropriate length and height. You then move each of the vertices in the control net to create the 3-D shape of the hull. This method is used if you do not have a good starting point in your existing files, the hull library, or as a FastGen parent hull. After a bit of practice, a new hull can be created quite quickly.

In the following figures, we will trace the steps in the creation of a patrol boat-type hull. The particular series of steps is not critical; whatever approach you are comfortable with will work. (In various steps in the tutorial, there are surface files available in the FastShip installation to match that step in the tutorial; these will be indicated in green.)

The basic steps are as follows:

hull_library3.jpg (39542 bytes)

Page 11 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 12: ~hh8476

µ set your units and coordinate system

µ create a flat plate with the correct length and height

µ modify the flat surface in profile view to the shape of the vessel in profile

µ pull the surface out in the transverse direction to create the 3-d shape

µ refine the shape and check the fairness

µ Let's get started; start FastShip, and select Parts/Create. The following dialog will appear:

Make sure that Positive Z is set to Up, and on the Units tab, make sure your units are metric.

Now, let's create the part (surface) that will be the hull. Select Parts/Create from the menu, and you will see this dialog:

In this dialog, there are a number of important settings:

-Part Type: In this case, we want to create a "Plate". This is a flat sheet of NURBS surface. Creating a "Node" would be similar to creating a directory or folder on your hard disk. "Cylinder" creates a cylindrical NURBS surface.

-Part Name: Type in "Hull"

-Degree: Usually, surfaces with degree 3 are used. If you are designing a flat or straight surface, you should use degree 1.

tut1_7_1.jpg (27536 bytes)

tut1_7_2.jpg (24442 bytes)

Page 12 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 13: ~hh8476

-Intervals: This controls how many rows and columns will be in your control net to start with (ie "how many ducks on your spline"). Set these to 3 in both the Length and Height directions. (We will add more later.)

-Orientation: Usually, for a hull the XZ plane is used.

-Size: Enter 100 for the Length, and 10 for the Height.

-Center Location: Enter 50 for X (longitudinal), 0 for Y (transverse) and 5 for Z (vertical)

Click on OK, then select the 4-view layout from the View Layout toolbar ( ). Your screen should look like the following:

Turn on the net in viewports 0 and 2, and both the net and surface in viewports 1 and 3. Rotate the views in 1 and 3, similar to the following:

This is a good time to save your hull. As with any program, it is good practice to save your work as you go. Select File/Save As, and save the file.

FastShip maintains an autosave file, which is updated when a "destructive" function is initiated, such as as Move, Cancel, etc. In File/Preferences, you can set how often this autosave occurs, including 0 (never). If you are working over a network or on a slow machine, you might want to set this to 5 or higher. If you are on a faster machine, you might want to keep it as low as 1. If for some reason you needed to recover this file (the power went out, etc.), the steps are as follows:

-re-start FastShip

-before doing anything else, select File/Recover from the menu. This will bring in the latest version of your design

-re-save it under a new name

tut1_7_3.jpg (14852 bytes)

tut1_7_4.jpg (29735 bytes)

Page 13 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 14: ~hh8476

As you work through this tutorial, remember to save your work occasionally..

At this point, we will begin to shape the control net in profile view, to create a 2-D model of the ship. Select the "Move" transform mode in the Transform toolbar ( ), and then the "Selection" tool ( ). Select and move the control points, so that your surface looks like the following. The tip of the stem has been moved up to Z=13. For now, move the points on the stem so that they are close to a straight line; a little later, we will see how to make sure the stem is exactly straight.

At this point, we have a surface that is a good start to the profile shape of the hull. The forefoot, however, is still a sharp corner. We need to round this off, with a technique known as "corner wrap". Corner wrapping provides both slope and curvature continuity from the stem to the bottom curve.

Zoom in on the bow area, and select Construct/Marker/G2Mix (Corner Wrap). You will be prompted to click on the two vertices that are aft of the corner, and then the two vertices above the corner. A construction marker will then be drawn, showing the location where the corner vertex should be moved to ensure continuity around the corner. With the selection tool ( ), move the point to the marker. To make sure that the vertex goes exactly on the marker, use the "Snap to Construction Geometry" button in the Snap Filters toolbar( ). Your net should look like the following:

Now that we have the hull shaped in 2-D (or at least a good start at it), we'll start to make it into a 3-D shape. Rotate the hull around to a perspective view (you can click on the Parallel/Perspective button ( ) if you wish):

(This surface is available as pb_1.srf.)

There are two good approaches to the next step, which is pulling the hull out in the transverse, or Y, direction, to make it 3-D. One is to work column by column (usually starting aft and working forward), and the other is to work row by row, usually starting at the deck and working down. For this example, we'll work by rows.

tut1_7_5.jpg (29457 bytes)

tut1_7_6.jpg (8645 bytes)

tut1_7_7.jpg (11208 bytes)

Page 14 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 15: ~hh8476

Before we get started on this editing, a discussion of "editing constraints" is in order. While editing in FastShip, there is always an editing constraint in force, which defines the plane or axis that you can move points in. The plane can be an X=constant, Y=constant, or Z=constant plane, and the axis can by X, Y, or Z. For example, when using the X=constant plane, any point that you move will retain its X value, and you will be moving it in the Y and Z directions, no matter what view you are in. This last point is important, because one of the nice features of FastShip is the ability to edit in a perspective view, like the one shown above. But for this to be workable, you (and FastShip) have to know what plane or axis you are using.

The constraint may be set manually in the transform toolbar ( ). When you select one of the primary views (bodyplan, profile, or

planview) from the view control toolbar ( ), the constraint is automatically set (X=constant for bodyplan, Y=constant for profile, and Z=constant for planview), so usually you don't need to change the constraint. However, if you rotate the hull to a different view (like the one above), you probably do want to change it. In this example, we rotated from a profile view (so we had a Y=constant constraint plane), but now have rotated it almost to a bodyplan view. Once you pass about 60º away from the original view, the corresponding constraint plane will become too oblique, and FastShip will not allow you to use that constraint plane. A message will be shown in the command line prompting you to either change the constraint plane to better match the view, or change the view to match the constraint plane.

In our example, we have already set the X and Z values of the vertices, and all we want to do is to move the points in the Y direction to make our hull 3-D. Therefore, we should use the Y-axis constraint.

Click on the Y-axis constraint, and then make sure that the transform mode is move ( ), and click on the selection tool ( ). Starting with the furthest aft point on the sheer, move the points outboard, so that your hull looks similar to the following:

As you move place each point in viewport 0, you will see it updated in viewport 2. FastShip can update both viewports in real-time, by turning on the Global Dragging option in the Preferences dialog box (File/Preferences).

Continue this process for the remaining rows. The following figures show the hull as it progresses:

view controlTB.jpg (2259 bytes)

tut1_7_8.jpg (24498 bytes)

Page 15 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 16: ~hh8476

(This surface is available as pb_2.srf.)

Now that we have molded the net into a more interesting shape, let's take a look at the surface. First, toggle the surface on with the "surface" button in the control net display toolbar ( ), or by hitting the TAB key. You should see the surface mesh, in red. Now, rather than viewing the mesh, let's look at the sections (stations, buttocks, and waterlines). In the Surface Visibility toolbar ( ), turn off the mesh, and turn on perimeter and sections. You should see only the perimeter, since we have not yet defined any sections.

Sections, as described in section 1.5, do not define the surface, but are simply planes cut through the surface. You can therefore cut as many sections as you want at any time, in any location, without affecting the shape of the surface. To define section locations, select Sections/Group Define from the menu, or the Group Sections Definition button from the Sections toolbar ( ). You will first see the Sections dialog box. Click on the Add button, to see the following dialog box:

tut1_7_9.jpg (24635 bytes)

tut1_7_10.jpg (25405 bytes)

Page 16 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 17: ~hh8476

In the upper right, you set what type of section you want to define. First, we will define some stations. There are a number of ways to define the locations of the stations; by listing their X-values, by specifying their spacing, or the number that you want, or a combination of these. Each combination needs further information, such as the starting and ending locations, number, and spacing.

In this case, select "Section Spacing", enter a spacing of 4, a Start of 4 and an End of 96. This will give us stations spaced 4 meters apart, beginning at X=4 and ending at X=96. Click on the Add button, and you will see the list of stations generated in the Sections dialog. Now, change the section type to Buttock, set a Spacing of 1.5, a Start of 1.5, and and End of 6. Click on Add. Finally, for Waterlines, use a Spacing of 1.5, a Start of 1.5, and and End of 12. Click on Add, then on Close. Click on OK in the Sections dialog box, and you will see the surface, represented as sections. Rotate this view to study the shape that you have created.

To get more of a feel for the net/surface relationship, turn them both on, and try moving a few points. You will see the sections update in real-time.

You will notice that the sections are not completely smooth. They are polylines, computed by interpolating the mesh. The smoothness of the sections is therefore controlled by how many points were computed on the mesh, or the "mesh density". (The sections are computed more exactly before any output is done, with the Sections/Refine command). The mesh density is controlled by the mesh divisions setting for each part. To increase the mesh divisions for this hull, right click on the part name in the parts tree, and select Mesh Divisions. Increase it to a higher number, for example 8 by 6.

You will see that the sections are now much smoother. However, while they look fine on the screen, you wil want them to be even smoother for output (DXF, lines drawing, offset tables, etc.). This is done by "refining" the sections. In this process, FastShip computes and adds more points to the sections (or removes points) to meet

tut1_7_11.jpg (31239 bytes)

tut1_7_11_2.jpg (39109 bytes)

Page 17 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 18: ~hh8476

a "chordal tolerance", which is specified in units, such as 0.0001 m. This means that the polyline representation of the curve will never be more than 0.1 mm away from the actual curve.

To refine the sections, select Sections/Refine from the menu, and select a refinement level. You may be able to see the improvement in the sections. Note that as soon as you edit the surface, the refinement is lost until you refine again. See Section 3.1 for more details.

To model this hull further, we should add more rows and columns, to give more local control over the shape. First we will add two more rows. Turn on just the net, and put the hull into a bodyplan view, as shown below:

(This surface is available as pb_3.srf.)

Using the Insert Net button on the topology toolbar ( ), we will insert two new rows, so that the net will look like the following:

When inserting new rows, you are prompted to click on a point on the row above and below the new row, on the same column. By default, the new row is inserted midway between the existing rows.

After the new rows are inserted, they are spread out a little, using the Move transform, to look like the following:

tut1_7_12.jpg (10411 bytes)

topologyTB.jpg (1773 bytes)

tut1_7_13.jpg (13243 bytes)

Page 18 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 19: ~hh8476

Now, we'll insert three new columns. Change the view to profile, and, and insert new columns as shown below, using the Insert Net button on the topology toolbar. In this case you should click on points on the columns on either side of the location of the new column, with both points on the same row.

Now that we have these new columns, let's go back and look at the stem, to make sure that it is exactly straight. Switch to a profile view, and zoom in on the stem (remember that you can zoom with the mouse wheel, using Shift or CTRL to speed it up).

The first step is to decide which two vertices correctly define the line that you want, and then to draw a construction line through those two points. Select the Construct Line 2-Pts button from the Construction Geometry toolbar ( ), or from Construct/Line/2Pts from the menu. Click on the two vertices that you want to use to define the line.

Now that you have the line, you can move the other points on the stem, and force them to "snap" into that line, with the snapping constraints in the Snap Filters toolbar (). Select the Snap to Construction Geometry button, but make sure that the Snap to Endpoints button is off (otherwise it would only snap to the two

points that you used to define the construction line. Snap to Endpoints is usually used when snapping to the net, so that the vertices snap just to other vertices, and not to the net lines connecting them). Again, with the Move transform, select the other points on the stem, and move them into the construction line, as shown below. Notice that the points are moved so that they are more evenly spaced, and sweep up in a fashion similar to the sheer (top row in the net).

tut1_7_14.jpg (11640 bytes)

tut1_7_15.jpg (13583 bytes)

tut1_7_15_2.jpg (19555 bytes)

Page 19 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 20: ~hh8476

At this point, because we have inserted the new rows and columns, and because we have moved the points on the stem, we should re-do the corner wrap. Select Construct/Marker/G2Mix from the menu (or the toolbar), click on the two points aft of the corner, and then the two points above the corner. A new marker will be shown. Since you already have the Snap to Construction Geometry filter on, you can easily move the corner point onto the new marker.

(This surface is available as pb_4.srf.)

If you turn on the surface, and look at the hull in planview, you will see that the waterlines in the bow come in sharply, with no bow rounding. Our next step will be to apply a boundary condition, that will force the waterlines to come into centerline at 90 degrees.

As you have noticed, the control net is mostly made up of solid blue and green lines, but some of the net lines are dashed. The dashed lines are (almost) always the first row or column in from any edge; that is, the first column aft of the stem, the first row below the sheer, etc. The purpose of these dashed rows and columns is to control the slope and curvature of the surface as it approaches the edge of the surface. The surface will hit the edge tangent to the last leg in the control net (locally). For example, if you turn on the net and surface, and compare the waterlines to the net in the bow, you will see that the slope of the waterlines is controlled by the slope of the net lines from the dashed column to the stem column.

With this property, it is easy to see that to have a rounded stem, the points on the dashed column should be directly outboard of their corresponding points on the stem, as shown below:

Not only should they be at the same X value, which you can see in this view, but they should also have the same Z value (into the screen in this view). FastShip has tools to make this process easy; when moving one of the dashed points, rather than thinking that its X and Z values should be the same as its corresponding point on the stem, we say that the difference between their values should be zero. In other words, we move one point relative to the other, and set their relative distances to zero.

To use the Relative coordinate system, click on ABS in the Coordinate Display Toolbar ( ), to change it to REL. Now, select the point on the dashed column, with the Selection Tool ( ). You will notice that the coordinates being displayed are now the distance that you have moved from where the point began. In other words, the origin (or "anchor") of the coordinate system is no longer 0,0,0, but is now the original location of the point. In our case, we want the anchor to be at the corresponding point on the stem. Select the Set Anchor Net button from the Transform Toolbar, and click on the point on the stem. Now, the coordinates being displayed are relative to that point.

Right click, and you will see the Specify Position dialog box. The "Coordinates" section in the lower right should be set to Relative. Set the X and Z values to 0, and click on OK. For now, don't worry about the Y values. Repeat these steps for each of the rows.

Now we want to set the Y values for all of these points, without changing their X values. Select the Y-axis as your editing constraint, and lay out the points to look like the figure above. Finally, refine the sections to see how they come into centerline (Sections/Refine in the menu).

In this process, we moved the dashed column much further forward than it was, and now we have a large "unsupported" area in the bow. To fix this, we will move the next column further forward, and slope it so that in plan view it makes a nice transition from the vertical column aft of it, to the dashed column and stem forward of it. The next two figures show the new positioning of the column. In addition, the rows were lowered in profile view in the middle of the ship, since we need the control down around the turn of the bilge:

tut1_7_16.jpg (23675 bytes)

coordinatedisp.gif (2390 bytes)

Page 20 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 21: ~hh8476

(This surface is available as pb_5.srf.)

Now, you should look at your sections to judge their fairness. There are three basic tools in FastShip to judge fairness; the first, and perhaps most important, is your visual judgement of the fairness of the control net. "A fair net will yield a fair surface" is an important rule to remember when working with NURBS surfaces. The second tool is a curvature measurement along the sections, called "porcupines". The third is a measurement of the surface curvature; minimum, maximum, average, or gaussian curvature may be displayed either as a color map or as quills on the surface.

Assuming you are satisfied with how the control net looks, let's take a look at the porcupines on the sections. FastShip allows you to do this on a "one-time" basis, where the porcupine is drawn on a section, but erased as soon as you begin editing again. You can also enable a real-time porcupine for a section, which will dynamically updated as you edit the surface.

First, we'll do the "one-time" version. The first step is to refine the surface (if you don't, the porcupine will look very jagged). Next, select Measure/Porcupine from the menu. You will be presented with a number of scale factors; depending on the size of the hull and the amount of curvature, different scale factors will be appropriate. For this case, select 2, and click on a station.

Next, we will turn on real-time porcupines for one of the sections. Double-click on a section (there must not be an active function in the command stack; hit the ESC key to cancel any pending functions, or click on the CANCEL button ). You will see the Edit Section dialog box. Enter a Quill Norm (similar to the scaling factor above) of 2, and click on OK.

tut1_7_17.jpg (31796 bytes)

tut1_7_18.jpg (11433 bytes)

tut1_7_18_2.jpg (15428 bytes)

Page 21 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 22: ~hh8476

The following figure shows the hull with porcupines on some of the sections. You should edit your hull and porcupine it, to learn more about the relationship between the net, surface, and the porcupines.

The next figure shows the final hull in four views:

Now that we have finished the hull, we can create a bow thruster tunnel. The steps are:

-create the cylindrical surface, and position it

-find the intersection between the cylinder and the hull

-trim both the cylinder and the hull to this intersection curve

Select Parts/Create Part from the menu, to bring up the following dialog box:

tut1_7_19.jpg (39816 bytes)

tut1_7_20.jpg (31365 bytes)

Page 22 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 23: ~hh8476

Select "Cylinder" as the Part Type, and give it the name "Thruster". Since the cylinder will be straight, we will leave the degree in the Length direction as 1, and the Circum. direction will be 2 (it's easier to model cylinders and other conics with quadratic surfaces). We don't need to adjust the number of intervals, and the Orientation will be along the Y-axis (transverse direction).

An appropriate size is a Length of 2, a Radius of 0.5, and an Angle of 360 (a complet cylinder; 180 would be a half cylinder). The Center Location will be at 12.5, 1, 2.5. (Note that like any other surface, the resulting surface can be resized, moved, and edited after it is created.)

When you click on OK, the cylinder will be created. The view below shows the hull, rendered as a solid with lights turned on, and the perimeter turned on. The lower viewport is a zoomed in view of the upper viewport (note that the Mesh Divisions on the cylinder have been changed to 1x8, and its color has been changed to green; do these by right-clicking on the part name in the Parts tree).

(This surface is available as pb_6.srf.)

Next, we will create the intersection curve. Like sections, you must both define the curve, and turn it on. Turn on intersections by clicking on the Intersections button in

the Surface Visibility toolbar ( ). Next, select Create Intersection ( ) in the Intersections toolbar ( ). You will be prompted to select a point on each surface (near the intersection, then prompted for a step size (the default of 0.1 is fine), and finally a name for the intersection. This name is not required, but it is good practice to supply one, to make it easier to manage multiple intersections later in the project. The intersection is then computed, and shown as in this figure:

tut1_7_21.jpg (23631 bytes)

tut1_7_22.jpg (15538 bytes)

intersectionsTB.jpg (2103 bytes)

Page 23 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 24: ~hh8476

Like other sections, the intersection curve may be refined, turned on and off, and have its color changed. For more information on intersections, see Section 4.8.

The next step is to trim both surfaces to this intersection curve, and to turn off the trimmed portions. (If you have perimeters on, it may be helpful to turn them off at this point.) Like intersections and sections, you must both define the trimming, and have trimming turned on to see the results. First, turn on trimming with the Surface Trimming button in the Intersections Toolbar. Next, select the Trim Surface button. You will be prompted for the surface that you want to trim (click on the cylinder), and next the curve against which to trim (click on the intersection curve). Since this is the only curve we are trimming against, hit Enter, which gives the command the "End" keyword (in some situations, you could be trimming against more than one curve at a time, in which case you would continue to indicate each trimming curve, and hit Enter when you were finished). Next, you will be prompted for the portion of the surface that is to be turned off. Again, click on the cylinder. Your hull should look like the following (the rest of the cylinder is inside of the hull):

Now we will trim off the hull, inside of the cylinder. Again, select Trim Surface, click on the hull, then click on the intersection curve, and hit Enter. Finally, click on the portion of the hull inside of the cylinder. Your view should be similar to the following:

You can rotate the hull around to look into the thruster tunnel.

By the same process the model has been extended to include a deck and transom, which have been intersected and trimmed, as shown here, before and after the trimming:

tut1_7_23.jpg (3088 bytes)

tut1_7_24.jpg (1729 bytes)

tut1_7_25.jpg (2072 bytes)

Page 24 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 25: ~hh8476

(This surface is available as pb_final.srf.)

1.7.6 Matching an Existing Set of Offsets

Often FastShip is used to re-create an existing design, which is then either faired or modified for further use. Any of the methods already discussed can be used to create an initial surface, which is then modified to match offsets from the original design. These offsets are imported from an IDF file, which may be created in a text editor, or translated from a DXF or GF file. This process is described in Section 4.7, and in the white paper "Fitting Surfaces to Existing Offsets".

tut1_7_26.jpg (38470 bytes)

tut1_7_27.jpg (7959 bytes)

Page 25 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 26: ~hh8476

1.8 Recovering Lost Data

To recover data after the program has stopped abnormally (power outage, etc.), you can use the Recover command in the File menu. The keyboard equivalent is recover.

By default, FastShip updates two data files, #autosav.rcv, and #autosav.aux, each time you begin a transform, or execute some other destructive function (cancel, undo, etc.). When the Recover function is used, these files are copied to autosav.srf and autosav.aux, and are read in. If you want to recover lost data, the Recover function must be the first thing you do when you re-start FastShip. Otherwise, #autosav.* will be overwritten, and the data will be lost.

If you want to change the frequency with which FastShip updates the recovery files, select File/Preferences from the menu, or use the command set-recover-freq. A value of 0 means that the files will never be updated.

2.0 EDITING

IntroductionThis tutorial will guide you through the basic editing features of FastShip. In it, you will learn about how to perform the basic functions for modifying the shape of the surface.

Steps that you should carry out are preceeded by a bullet symbol (·).

2.1 Constraint Planes2.2 Transforming Points, Patches, Parts2.3 Defining Sections2.4 Changing the Weight of Control Point2.5 Adding Rows or Columns into the Net2.6 Adding Knots to the Surface2.7 Splitting Surfaces2.8 Linking Control Points Together

2.1 Constraint Planes

While editing in FastShip, there is always an editing constraint in force, which defines the plane or axis that you can move points in. The plane can be an X=constant (), Y=constant ( ), or Z=constant plane ( ), and the axis can by X ( ), Y ( ), or Z ( ). For example, when using the X=constant plane, any point that you move

will retain its X value, and you will be moving it in the Y and Z directions, no matter what view you are in. This last point is important, because one of the nice features of FastShip is the ability to edit in a perspective view. But for this to be workable, you (and FastShip) have to know what plane or axis you are using.

(Remember that FastShip uses the following coordinate system: X=long'l, Y=transverse, Z=vertical. Y is always positive to starboard. If Z is positive up, then X is positive aft, and vice versa.)

It is sometimes very useful to constrain movement to a single axis, especially in a perspective view, so that there is no ambiguity about which direction the vertex is being moved. Also, for example, if you have set the heights of the vertices correctly in the profile view, when you switch to bodyplan view you should use the Y-axis constraint, so that you don't inadvertently change the Z values. Another time that constraining to an axis is very useful is when moving vertices that are on centerline, and should remain at Y=0. Using the X-plane constraint in bodyplan view is valid, but you may inadvertently move points off of the centerline. In this case, you should use the Y-axis constraint.

The constraint may be set manually in the transform toolbar ( ). When you select one of the primary views (bodyplan, profile, or

planview) from the view control toolbar ( ), the constraint is automatically set (X=constant for bodyplan, Y=constant for profile, and Z=constant for planview), so usually you don't need to change the constraint.

However, if you rotate the hull to a different view, you probably do want to change it. In this example, we rotated from a profile view (so we had a Y=constant constraint plane), but now have rotated it almost to a bodyplan view. Once you pass about 60º away from the original view, the corresponding constraint plane will become too oblique, and FastShip will not allow you to use that constraint plane. A message will be shown in the command line prompting you to either change the constraint plane to better match the view, or change the view to match the constraint plane.

view controlTB.jpg (2259 bytes)

Page 26 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 27: ~hh8476

In this figure, the top view would allow editing in the Y and Z axes, but not the X, because the X axis is too close to being perpendicular to the screen. Therefore, the constraints that would be valid are X-plane, Y-axis, or Z-axis.

In the lower viewport, the Z-plane, X-axis, or Y-axis would be valid. Note that in this figure, the lower viewport is active (the green box in the upper right hand corner indicates this). If you were to make the upper viewport active, the constraint does not change, and you would receive a warning in the prompt area, stating that the view and constraint plane do not agree. At this point, you would have to change the view (heel the boat away, for example), or change the editing constraint.

2.2 Moving, Scaling Rotating, and Radial Scaling

Introduction

The fundamental activity in FastShip is the placement of control vertices (also called "points"), in order to create the desired shape of the hull. The transformation modes available include Move, Scale, Rotate, and Radial Scale.

FastShip allows you to transform a single point, a rectangular group of points (patch), an entire surface (part), or a group of surfaces (part). In addition, any combination of these may be transformed at one time. For example, a single point on one surface may be moved together with a patch on a second surface and an entire third surface.

The point or points to be transformed constitute the "selection set", which is defined with the Selection Tool ( ) in the Transform toolbar (). This selection set is operated on by any of the transformations. The first step in moving, scaling, etc. is to select the

transformation mode (if it is not already selected), and then to select the point or points to be transformed. At this point, you are immediately in the transformation, and you may either move the point, or select further points to be added to the selection set. While moving, the location of the point is displayed in the Coordinate Display

toolbar ( ).

Selecting Control Net Vertices and Parts for Editing

To select and edit one or more control net vertices click the selection tool icon in the “Transform” toolbar. Then select the vertex to edit. You will notice immediately that the selected vertices are highlighted with bold markers. This way you can tell exactly what vertices if any are selected at any time (even when no transformation command is active). After selecting a vertex the program is placed immediately in transformation mode where the selected vertex (and associated portion of the surface) are transformed according to the mouse (i.e. handle) position and the selected transformation type.

If the user wishes to expand the selection, several options are available to do so. Holding the <SHIFT> key down while selecting another vertex selects a contiguous rectangular patch of vertices starting from the initial selected vertex. This is the mechanism the user employs to simulate the old method of transforming a patch.

To select an entire part the user can either select the part from the parts tree immediately after clicking the selection tool icon or click on the part with the right mouse button while holding the shift key down. This latter method for selecting parts can be performed either immediately after clicking the selection tool icon or after the dynamic transformation has begun.

The <CTRL> key modifier allows the user to “add” to the current selection. After the initial or subsequent selections, the user can hold the <CTRL> keyboard key down while performing any of the selection actions described above to add to the current selection. So for example, the user can click the selection tool icon, then click a vertex with the left mouse button to select that vertex, and finally click on another vertex with the left mouse button and with the <CTRL> key depressed to add the

tut1_7_11_2.jpg (39109 bytes)

s

coordinatedisp.gif (2390 bytes)

Page 27 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 28: ~hh8476

vertex to the selection.

Table 1 summarizes the keyboard/mouse sequences required to generate various selection actions. In addition to these graphical forms of selecting and transforming points, you may also do it from the command line (or a macro), with the commands select, move, scale, rotate, and radial_scale.

Control Net Selection Actions

Once a point or points have been selected, and you are in the transformation mode, you can simply move the vertex to the desired position, and left-click to put the point down. Alternatively, you can right-click to get the Specify Position dialog:

You can type in the new coordinates (Handle Position), or if you select the Transformation option, you can specify the displacement (how far the Handle has moved). Note that you can use either the Cartesian (XYZ) or Cylindrical coordinate systems. For more on these coordinate systems, see Section 4.2 Absolute and Relative Coordinate Systems, and 4.3 XYZ and CYL Coordinate Systems.

The Handle

The Handle is the point that the mouse is moving, and whose coordinates are being displayed in the Coordinate Display toolbar. When transforming a single point, that point is the Handle. When moving multiple points, the last point indicated becomes the handle. If you wish to switch the Handle to another point, select the Set Handle

button ( ) from the Transform toolbar ( ).

2.3 Defining Sections

Introduction

As described earlier, sections are planar "slices" through the surface. They are computed by intersecting a plane with the NURBS surface, and therefore do not affect the shape of the surface. Sections are just another way to visualize the surface.

As such, you are free to define as many sections as you wish, of any type (station, buttock, waterline, cant, incline, and diagonal). You may add, delete, and modify section locations at any time. For example, you may wish to have only 11 stations early in a project, but later to define a station on every frame for export to a CAD program.

Section locations are saved when you save a surface. They are included in the auxiliary file (.aux), rather than in the surface file itself (.srf). This means that if you copy a surface or send a surface to someone, you should include the auxiliary file if you wish to include the section definitions.

Selection Action Keyboard/mouse sequenceSelect a vertex Left mouse click on vertexSelect a patch Left mouse click on first vertex then <SHIFT> + left mouse click on second vertexSelect a part <SHIFT> + right mouse click on any vertex in partAdd a vertex to selection <CTRL> + left mouse click on vertex

Add a patch to selection <CTRL> + left mouse click on first vertex in patch to add then <CTRL> + <SHIFT> + left mouse click on second vertex

Add a part to selection <CTRL> + <SHIFT> + right mouse click on any vertex in part to addReselect patch After selecting patch, <SHIFT> + left mouse click on new second vertex to define patch (first vertex will be retained)

context_menu4.jpg (12896 bytes)

Page 28 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 29: ~hh8476

Defining the Sections

To define the sections, select the Group Section Definition button from the Sections toolbar ( ), or select Sections/Group Define from the menu. In the Sections dialog box below, you will be shown a list of the currently defined sections (there may be none). To add sections to the list, click on the Add button at the bottom of the screen.

ADD

The Add Sections dialog box allows a great deal of flexibility in the definition of sections. The input fields are described here:

Mode

The two options are to specify the section by location or by number. By default, the origin for section numbering is (0,0,0), and the default spacing for section numbering is 1 meter. See Numbering for a description of the section numbering system. If you select Section Location, you will be entering coordinate values (for example, X values for stations). If you select Section Number, you will be defining sections by their section number, and the coordinates will be automatically determined using the current numbering system (origin and spacing).

Type

Here you specify what type of section you are going to define (station, buttock, waterline, cant, diagonal, incline, or general).

List

Page 29 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 30: ~hh8476

Section Location Mode: You can enter a list of the coordinates for the sections that you wish to add here. For example, if you are adding waterlines, type in a list of the Z values for the waterlines. The values may be separated by a comma or space.

Section Number Mode: You can enter a list of the section numbers that you wish to add. The values may be separated by a comma or space.

Group definition

Here you can specify sections by section spacing, number of sections, or a combination of both. Depending on the options that you have chosen, you can enter the section spacing, the number of sections, the starting location, and the ending location. Additionally, if you are defining cants, diagonals or inclines, you need to enter an angle. If you are defining a general plane, you will need to enter the normal vector to the plane.

If you don’t know the minimum and maximum values of your surface(s), clicking on the Compute Extents button will fill them into the Start and End fields automatically.

Once you have entered all of the information, click on the Add button. At this point, you can either add more sections, or click on the Close button to return to the Sections dialog box.

Editing Individual Sections

Double clicking on any section in the list will open a dialog box that allows you to change the Section Calculation (On/Off), Label, Section Number, Plane Constant, and Normal Vector for that plane. You may also double-click on the section itself to open this dialog box, but there must not be an active function in the command prompt; click on the Cancel button ( ) or hit ESC to cancel any active functions.

Delete

To delete sections, highlight them by clicking on them. You can highlight multiple sections by clicking and dragging the cursor, or by holding the Control key and clicking on individual sections. When you have highlighted the desired sections, click on the Delete button.

Calc on/off

Sections can be set to “calc off”, which means that their definition is kept, but they are not computed or stored. This capability is used to speed up functions such as refining when the sections are in an area of the surface that you are not currently concerned with. For example, if you have a lot of stations defined in the bow area, but are working on the stern, you could turn off the stations in the bow. Another example might be that if you are concentrating on waterline shape, you might turn off the calculation of all of the stations and buttocks.

To select sections to change their calculation flag, highlight them by clicking on them. You can highlight multiple sections by clicking and dragging the cursor, or by holding the Control key and clicking on individual sections. When you have highlighted the desired sections, click on the Calc On/Off button.

Numbering

Sections are listed in the Sections dialog box by both their Section Number and their Plane Constant. By default, the origin for section numbering is (0,0,0), and the default spacing for section numbering is 1 unit/section (e.g. meter). For example, stations at X=0, 2, 4, and 6 meters would be number 0, 2, 4 and 6. If the meters/section number were changed to 0.5, the stations would be numbered 0, 4, 8, and 12.

To change the section numbering, click on the Numbering button. You can then change the location of the origin for numbering, and the units/section value for stations, buttocks, and waterlines.

When you change these values, you can select whether the sections will stay in the same physical location and have their section numbers change, or stay at their previous section numbers, and have their physical location change.

Narrowing the list

In the Sections dialog box, you can indicate the section type that you would like displayed. By default, All sections are shown, but you can select just Stations, Buttocks, Waterlines, Inclines, Cants, Diagonals, or General.

Defining using Pivot

Sometimes it is convenient to be able to define sections just by clicking on the desired locations. To do this, select Sections/Station (or Buttock or Waterline), and then click on the desired location. The appropriate plane constant will be derived from the location that you clicked on (X for stations, Y for buttocks, Z for waterlines), and the section will be inserted. If you wish to use this function to define more than one section, click on the Replay button (in the Fast Button area), after clicking on Sections/Station. You can now click on multiple locations, and click on Cancel when you are finished.

Defining from the command line

Sections can be defined from the command line, with the command define-sections.

Defining from a macro

If you have a long list of sections to define, and you have them in some sort of data file, it may be convenient to write a short macro to define them in FastShip. For example, if you had a list of X values for stations, you could write an ASCII file similar to the following example:

define-sections sta list {i,j,k...}

Page 30 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 31: ~hh8476

where i,j,k... are your X values. After creating the file, read your surface into FastShip, and then select Utils/Read Macro.

Defining Individual Sections

You may add an individual section graphically. Select Add Station, Add Buttock, or Add Waterline from the Sections toolbar, or from the Sections menu. You will be prompted to click on the location for the new section. While this is not a very precise method of defining a section it is an easy way to add a new section when the precise location is not important. You can use the Replay button on the Command Stack toolbar ( ) to add multiple sections.

Changing a Section's Properties

A section's properties may be changed using the Sections dialog as described above, or you may double-click on a section on the screen (assuming there are no functions active in the command line; hit ESC or click on the CANCEL button to cancel any pending functions). You will see the Edit Section dialog, as shown below:

In this dialog, you can turn the section on or off, change its number or plane constant, and its label. In addition, you can turn on real-time curvature measurement (porcupines) by entering a non-zero Quill Norm. The value of the Quill Norm is scaling factor on the curvature quills that are displayed.

If you wish to change the orientation of the section's plane, you can edit the Normal Vector. This is the i, j, k values for a vector that is perpendicular to the section's plane.

Refining the Sections

Sections are computed by interpolating the surface mesh. The density of the surface mesh (the number of points that are computed) is controlled by the user, and this affects how smooth the sections will look (the surface, mesh, and sections are intrinsically smooth, since they are completely defined by the NURBS mathematics; this is only a question of how smooth they will look on the screen and in the output). You can increase the smoothness of the sections by increasing the mesh divisions, by right-clicking on the part name in the Parts Tree.

While increasing the smoothness of a section by increasing the Mesh Divisions is great for visualation, it is not good enough (in general) for output, or for interrogating the section for curvature. A separate step, Refine, re-computes the sections to a user-specified curvature tolerance, which is generally on the order of 0.5 mm for output to drawings, or 1 mm for output to other programs such as stability.

See Section 3.1, Refining Sections, for more information.

2.4 Changing the Weight of Vertices

Individual vertices can be adjusted to have more or less "weight" than other vertices. This is the "rational" part of "non-uniform rational b-splines surfaces" (NURBS). For the most part, all vertices in a control net have an equal weight of 1.

The most common use of changing this weight is when modeling a conic surface (cones, cylinders). In this case, it is necessary to adjust the weight of some of the vertices to create an exact conic. For example, the quarter cylinder shown below as some vertices with weights adjusted as shown.

section_menu.jpg (12395 bytes)

Page 31 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 32: ~hh8476

Adjusting weights is occassionally used in fairing, but this is not generally recommended because it can create local unfairness, especially if the weight is adjusted to be significantly different than 1. This property can be used to advantage sometimes, however, where a radical shape change is desired. For example, a discontinuity can be created by greatly increasing the weight of a vertex, rather than inserting a multiple knot or using separate surfaces. The example below shows a discontinuity at the top of a propeller bossing that was created in this fashion:

Another example shows a discontinuity in a sheerline:

To adjust the weight of a vertex, double-click on it to bring up the following dialog:

Enter a new weight, and click on OK.

If you need to adjust the weight of many points, it may be easier to manually edit the surface (.srf) file. Here is a partial listing of a surface file; the data for the vertices is X, Y, Z, Weight:

-39.32, 0.7, -0.2, 1-39.32, 2.1, -1.7, 1-39.32, 2.9, -4.4, 1-39.32, 4.3, -4.7, 1-39.32, 8.4, -5.5, 1-39.32, 9.9, -6.0, 1

2.5 Adding and Deleting Rows or Columns to the Net

Introduction

At any time during the design process, you may add or delete rows and columns in your net, to give you more control over a portion of your surface, or to take out control that you don't need.

A basic rule of fairing with NURBS surfaces is to keep the control net as sparse as possible. This will yield the fairest surface that is easiest to work with. Before deciding to insert an extra row or column, first look to see if you could gain the control you need in a specific area by moving an existing row or column. In the figure below, a column was moved forward to give more control over the shape in the bow, while simplifying the control net aft, where the shape is not changing dramatically:

Inserting Rows and Columns

tut2_5_1.gif (10135 bytes)

tut2_5_2.gif (9524 bytes)

Page 32 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 33: ~hh8476

If you decide that you do want to add a row or column, first make the control net visible, then click on the Insert Net button in the Topology toolbar, or select NURBS/Insert Net/Midpoint from the menu (see also insert-net). Then select a point on either side of the location of the new row or column. If you are going to insert a new row, the two points that you click on should be on the same column, on either side of where the new row is to be placed, and vice versa. The new row or column will be placed midway between the rows or columns on either side, as shown in the figure below:

Note that when you insert a new net row or column, you will change the shape of the surface. Deleting the new row or column will return the surface to its original shape, assuming that you have not moved any points. The Undo command does not undo a net row or column insertion. If you are unsure about whether you will really want the new row or column, save your surface before inserting, and then save again under a new name after inserting.

You may also insert new rows or columns at positions other than midway between adjacent rows and columns, and you may insert more than one at a time. To do this, select NURBS/Insert Net/Specify from the menu, or type insert-net at the command line. You will be prompted for the fractional interval(s) where you want the new row(s) or column(s) to go. For example, if you wanted two new rows, 30% and 60% of the distance between two existing rows, enter 0.3, 0.6 (the distance is measured from the row or column with the lower index, which usually means up from the bottom or from the aft end).

Doubling

A special case of adding rows or columns is "doubling". With this unique feature, you can double the number of rows or columns in a surface without changing its shape. This can be very useful, especially towards the end of a design, where you don't expect to make any big changes, but need more local control. Sometimes a surface is split into two surfaces, and one is doubled. This gives more control in that surface, but the two surfaces will still meet along their boundary (assuming you do not move the control points on the boundary or on the dashed line next to the boundary on either surface).

To double the number of net rows or columns, select NURBS/Double Net from the menu, and the option Row, Column, or both. Next, select the surface. Undo does not undo this command, so save your surface before using this command.

Deleting Rows or Columns

Rows or columns may be deleted from the surface at any time. Again, you want your net to be as simple as possible, so delete rows or columns if they are unnecessary. Deleting a row or column will change the shape of your surface, and Undo will not restore the row or column, so save your surface before deleting.

To delete a row or column, select the Delete Net button from the Topology toolbar, or select NURBS/Delete Net from the menu. Then click on any two points on the row or column.

2.6 Adding Knots to the Surface

Introduction

The purpose of inserting knots is usually to create a discontinuity in the surface. This discontinuity may be a chine or knuckle, or a longitudinal disconuity such as a break in a sheerline, or corner in a skeg or keel.

A less common use of inserting knots into the surface is to provide more local control over a surface. This is usually done by inserting new net lines, rather than knots, but inserting knots has the advantage of not changing the shape of the surface. The disadvantage is that the surface becomes unevenly spaced parametrically, which can make fairing a bit more difficult and non-intuitive.

For a description of the mathematics, and the change in the surface behavior when knots are inserted, please see Section 6 on NURBS surfaces.

tut2_5_3.gif (3760 bytes)

tut2_5_4.gif (2695 bytes)

Page 33 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 34: ~hh8476

Before inserting any knots, a surface is said to have a "uniform knot vector". This means that all of the knots have an even spacing in the "knot vector", usually 1.0. The "NU" in NURBS stands for "non-uniform", which means that knots may be inserted into the surface at non-even spacings.

Viewing the Knots

Read in the example surface pb_5.srf.

To simplify this discussion, we will talk about cubic surfaces, since they are the mostly widely used. Any cubic surface has as many knots as it has solid net rows and columns. There is a knot corresponding to each of these solid lines in the net. If a cubic surface does not have any dashed lines except those just in from the edges, then there are no "non-uniform" knots in the surface, and the surface is said to be uniform.

To see the knots, turn on the surface mesh (by default drawn in red). In the File/Preferences dialog box, select the Graphics tab.

Change the line weight of the Primary mesh lines to 1, and the line weight of the Secondary mesh lines to 0, and click on OK (a line weight of 0 means that the lines will not be drawn). All of the mesh lines that are now visible are knot lines.

Inserting a Knot

To insert a knot, you must indicate the type of knot (row or column) and its location. The location may be specified graphically, by clicking on the surface, or may be more precisely described by entering the surface interval and fraction from the keyboard, as shown in the following figure:

tut2_6_1.gif (9367 bytes)

tut2_6_2.gif (8103 bytes)

Page 34 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 35: ~hh8476

Note that where there were two solid columns, there are now three dashed columns, indicating a non-uniform spacing in the knot vector. The shape of the surface has not changed, but the one-to-one correspondence between the net lines and knots has been lost. However, there is more flexibility now in how you can control the surface.

Creating a Chine or Knuckle

The most common use of inserting knots is to create a chine or knuckle in a surface. In this case, you must create a "multiple knot". This means that a new knot will be inserted directly on an existing knot, until you have as many knots as the degree of the surface (for a cubic surface, the degree is 3; therefore, you insert 2 new knots on an existing knot, for a total of 3).

Let's put a chine into the example surface created in Section 1.7. Read in pb_5.srf. First, make sure that you are viewing the mesh, and in File/Preferences/Graphics, set the Primary mesh line weight to 1, and the Secondary to 0 so that you are seeing only the knots.

Select Net/Insert Knot/Row from the menu, and click on the row indicated in the figure below:

Rather than clicking on the mesh row, you could have entered the interval number and fraction. Since this is an existing knot, at the boundary of intervals 1 and 2, you could have entered {1,1} for interval 1, with a fraction of 1 (all the way at the end of interval 1), or {2,0}, meaning interval 2, with the fraction of zero meaning right at the start of interval 2.

Note that the surface has not changed shape, but the net is different.

Now, to insert the third knot, repeat the step above, clicking on the same row in the mesh. The net will now look like the following:

tut2_6_3.gif (5950 bytes)

tut2_6_4.gif (5721 bytes)

tut2_6_5.gif (5758 bytes)

Page 35 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 36: ~hh8476

Again, the surface has not changed, but the net looks quite different. Where there was a single solid row in the net, there are now two new dashed rows on either side. The solid row defines the chine, just like the edge of a surface. The dashed lines control the slope and curvature of the surface as it approaches the chine.

Even though we have created a "tripled" knot, the shape of the surface has not changed; the hull is still round-bilged. We have not yet created a chine, we have created the potential for a chine. The dashed lines here act just like the dashed lines around the edge of the surface; the slope of the column segment from the dashed point to the chine (or the edge) controls the slope of the surface locally. Notice that at each column the two dashed points on either side of the chine, and the point on the chine itself, are in a straight line, as indicated in this figure:

As long as this is the case, the surface will have equal slope coming from both sides of the chine, and there will not be a slope discontinuity. Now, if one of the three points are moved, the surface will have a discontinuity. Select any of the points along the chine, and move it outboard. You will see the surface develop a chine. In bodyplan view, move the points in a fashion similar to that shown below:

tut2_6_6.gif (10617 bytes)

tut2_6_7.gif (8853 bytes)

Page 36 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 37: ~hh8476

(This surface is available as pb_5_chine_1.srf.)

Notice that since the points on the forward columns have not been disturbed, that the chine fades out as it goes forward. If the chine had already been created, it could be made to fade out again by putting the three points across the chine in a straight line, by creating a construction line with two of the points, and snapping the third point to the line. To maintain precise continuity, make sure that the spacing of the dashed points on either side of the chine is consistent from column to column, on those columns where you are maintaining continuity. In other words, the ratio of the distance of the dashed line above the solid line to the distance to the dashed line below the solid line should remain consistent at each column.

Creating a "Point" Discontinuity

As mentioned previously, another use of inserting knots is to create a point discontinuity, such as a "hard point" in the profile of a keel. In the following figure, the hull that we have been using has had a knot inserted as shown, and the bottom points on the two resulting dashed columns have been snapped together. This creates a discontinuity in the profile of the keel:

Removing Knots

Removing knots is not always a straightforward task. Before you insert any knots, save your surface under a new name, to make it easy to go back to it if you are not happy with the new surface with the new knot(s). Depending on the order in which the knots were inserted, you may be able to delete the dashed columns, just as you would delete any other column. This may affect the shape of the surface.

If you cannot remove the knot graphically, you can manually edit the surface (.srf) file. This excerpt from a surface file shows a surface with a non-uniform knot vector:

Tutorial ~Step 171hullnonrational, nonrationalopen, open4, 4, 0, 0, 0, 09, 100.000000, 0.000000, 0.000000, 0.000000, 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 6.000000, 6.000000, 6.0000000.000000, 0.000000, 0.000000, 0.000000, 1.000000, 2.000000, 2.000000, 2.000000, 3.000000, 4.000000, 5.000000, 5.000000, 5.000000, 5.0000100.000000, 0.000000, 5.500000, 1.000000100.000000, 0.830000, 5.500000, 1.000000100.000000, 4.470000, 5.500000, 1.000000100.000000, ....

Line 1: Comment

Line 2: # of surfaces

tut2_6_8.gif (13037 bytes)

tut2_6_9.gif (6296 bytes)

Page 37 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 38: ~hh8476

Line 3: Surface name

Line 4: Type of surface

Line 5: Type of knot vector

Line 6: Order in row direction, order in column direction, trimming/intersection information

Line 7: Number of columns, Number of Rows

Line 8: Knot vector in the Row direction

Line 9: Knot vector in the Column direction

Line 10-...: X,Y,Z, weight of the individual rows and columns, given column by column

To remove a knot, you need to adjust three areas:

µ Line 7: Alter the number of rows or columns appropriately µ Line 8 or Line 9: Remove the knot; in the above example, there is a multiple knot at 2.0000, since there are three knots at 2.0000 (note that there will always be a

multiplicity of knots at the beginning and end of the knot vector, equal to the order of the surface) µ Line 10 or above: remove the lines with the XYZWeight of the appropriate points

See also insert-knot

2.7 Splitting Surfaces

Introduction

A surface may be split into two surfaces along any mesh line. One of the most common uses for this is to separate two parts of a surface, so that one part may have its control net altered (extra knots or doubled-nets) without affecting the other.

To split a surface, select NURBS/Split Surface from the menu, and select either Row or Column. With the mesh visible, select the mesh row or column where you wish the surface to be split. You will be prompted for the names for the two new surfaces, which will be at the same level in the parts tree as the original surface. Note that the original surface still exists. You must delete it if you do not wish to keep it. The figure below shows a surface that was split, and the color changed on one of the surfaces:

The location of the split does not have to correspond to a particular row or column in the mesh, but the split will take place along a constant u or v in the parametric description of the surface. This means that it will always be parallel to a mesh line, if it is not on a mesh. Therefore, when selecting the point for the split, you can click on any surface point (mesh, sections, or perimeter). But remember that the split will not take place along that section, for example, but rather along a constant u or v line (mesh line) that goes through the point that you selected.

See also split-surface, rename-part, and delete-part.

2.8 Linking Control Points TogetherAt times it is useful to link two or more control points together, so that when one is transformed (moved, scaled, rotated), the other is transformed with it. The effect is just as if you had selected both points before transforming, but linking them together saves you the effort of the selection, or having to remember that you wanted to keep a certain relationship between the points.

An example of when you would use this technique is putting "bow rounding" on a hull. This boundary condition, sometimes called a mirror boundary condition, means that the waterlines will come in perpendicular to centerline, giving a rounded stem. FastShip makes this boundary condition easy; simply move the vertices on the dashed column to the same X and Z value of the corresponding point on the stem column. The Y value is then varied to change the "radius" of the curve.

Once you have created this shape, you should be careful not to change the relationship. If you want to move a point on the dashed column, use the Y-axis constraint. If you want to move them both to change the shape of the stem, either select both points, or link them together, so that you cannot move one without moving the other.

tut2_7_1.gif (4493 bytes)

Page 38 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 39: ~hh8476

Another example is where two surfaces are joined together along a common edge, as in this simple hull and deck example. Once the sheer points on the hull and the edge points on the deck are linked, the two surfaces will remain joined. In the figure, the link has been made, and a point on the hullhas been selected and is being moved. The linked point on the deck is therefore moved as well.

See also make-link and break-link.

3.0 IMPORT/EXPORT

IntroductionThis section first discusses how to prepare your data for export, and then how to create various forms of output. While we're here, we'll see how to bring data into FastShip as well.

Steps that you should carry out are preceeded by a bullet symbol (·).

3.1 Refining Sections3.2 The Parts Tree3.3 Data Export3.4 Data Import3.5 Lines Drawings and Offset Tables

3.1 Refining Sections

The sections (stations, buttocks, waterlines, etc.) are initially computed by interpolating the mesh, so their smoothness is controlled by the resolution of the mesh. This yields very fast computation, and adequate resolution for the screen. But for output to files such as DXF, and for computation such as curvature (porcupines), they must be computed more accurately.

tut2_8_1.gif (45436 bytes)

tut2_8_2.gif (9220 bytes)

Page 39 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 40: ~hh8476

The sections can be “refined”, whereby they are re-computed directly from the surface, to a user-specified tolerance. This tolerance is the maximum distance from the section polyline to the actual surface, and is typically in the range of 0.25 to 1.0 mm. The figure shows an enlarged portion of a section.

To refine the sections, select Sections/Refine, and then choose a tolerance (the tolerance is in the current units). Refining “On Surface” keeps the same number of points on each section polyline, but corrects any points that are slightly off the actual surface due to the interpolating process.

While the refining is being done, a message will be shown in the Prompt Line, showing the progress of the computation. Any editing done after refining will “unrefine”the sections, so they should be refined again before output or porcupining.

3.2 The Parts Tree

The Hierarchical Parts Tree

Frequently FastShip models are made using more than one surface, and it is useful to organize the surfaces in a hierarchical fashion, similar to the way that files and folders are organized on a hard disk. In FastShip terminology, files are surfaces, and folders are nodes, and both are thought of as parts.

The Parts Tree is a pane that is normally docked on the right side of the screen. It may be moved and resized like any other dockable item, and may be turned on and off from the Parts Tree toolbar.

The Parts Tree shows the list of surfaces and nodes, organized hierarchically, similar to the Windows® Explorer tree. Nodes correspond roughly to directories, while surfaces correspond to files within the directories (“roughly” because surfaces may also act as nodes; they may have other surfaces as children).

Part Properties

Every part has a set of properties, including its visibility, whether it is the current part or view part, mesh density, surface/section/perimeter/intersection/offset color, and offset. These properties are typically set by right-clicking on the part name in the parts tree, or right-clicking on the surface when no other functions are active.

partsTreeTB.jpg (1893 bytes)

parts_tree.jpg (19999 bytes) In this example, a model is made up of 23 surfaces. With the hierarchical organization, surfaces can be grouped logically, and can be acted on as a group (moved, made visible/invisible, color changed, deleted, etc.). Without this organization, it would be difficult to manage all 23 surfaces, just as it would be difficult to manage files on your computer if they were all in the root directory.

The hierarchical organization of parts is known as the Parts Tree. The root of the tree is always called "top" (roughly equivalent to c:\ on your hard disk). Any number of surfaces and nodes can be created under top, and each of these nodes can have children (note that surfaces can have children as well, but this is not considered to be good practice). In the figure, the aft engineroom bulkhead surface is "/top/internals/bulkheads/xverse/aftengine". The parts tree pane can be turned on and off with the parts tree button.

One of the uses of the parts hierarchy is to filter the surfaces for output. All of FastShip's export functions take a part specification as one of the arguments of the command. For example, when creating a DXF file, you may wish to only include a portion of your model; in the example shown, you could choose to export only the "superstructure", which would include all of the parts under the node "superstructure".

When importing data, the data is put into the current part. Be sure that the correct part is the current part before importing data.

Page 40 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 41: ~hh8476

µ Right-click on a surface name in the parts tree; escape to close the menu. µ Click on the Cancel button ( ) to make sure no other functions are active, then right-click on the surface in the graphics area.

You should see a context menu like this figure: By selecting the last item, Properties, you can see a table summarizing the properties of all of the surfaces. Each of the properties are described below. Setting any properties on a part sets those same properties on that part's children.

Visibility: Any part, including its children, can have its visibility turned off. This affects all viewports.

Current Part: The "current part" indicates which part or parts are available for editing. The current part and all of its children are accessible for editing and measuring. By default, "/top" is the current part, which means that any surface is accessible. The current part is shown with the hand icon. Note that "current part" is viewport independent. If you should try to edit or measure a surface that is not below the current part in the tree, FastShip will ignore it. The current part can be set by clicking on the current part button, and then either clicking on the surface, or typing the name of the part in the command line.

View Part: One of the uses of the parts tree is to make it easy to view just a portion of your model. The "View Part" is used to tell FastShip what part you would like to have displayed in the current viewport. The view part and all of its children will be displayed. In the example above, "mainhull" is the view part, and its children will be displayed ("bow thruster", "hull", "shaft", and "transom"). Note that the view part is indicated by the cyan coloring of the folder icon. The view part can be set by clicking on the view part button, and then either clicking on the surface, or typing the name of the part in the command line.

Color: The color may be independently set for a surface's mesh (also used for solid rendering), sections, perimeter, intersection curves, and any offsets in that part.

Offset: A surface may be offset by a distance, which is usually done to deduct the thickness of planking when building a plug for a mold. This offset is normal to the surface.

Mesh Density: The mesh div sets the number of points that will be computed in the surface mesh. The surface mesh is drawn by connecting these points with straight lines. Therefore, the denser the mesh, the smoother the curves will appear on the screen. The density of the mesh also affects the accuracy of the hydrostatics, curvature measurements, and the smoothness and accuracy of the sections (before the Refine-Sections command is used, at which point the smoothness and accuracy of the sections is independent of the mesh div). The figure shows the same surface, with two different mesh division settings.

The mesh div is specified as a column division and row division (by default, 3x3). This means that by default each interval in the surface will be divided into three mesh intervals, or panels (an interval in the surface is defined by the area from one solid net row or column to the next). A mesh div of 1x1 would yield just one mesh panel for each interval in the surface, which would be a crude representation of the surface (unless the surface was flat, or straight in that direction). The column division specifies how many mesh panels from one net column to the next, and the row division specifies how many mesh panels from one row column to the next. The column and row divisions do not have to be the same value.

µ Adjust the mesh div by selecting Mesh Density from the menu, and enter the new values for column and row divisions, and click on OK.

The mesh div value is stored in the auxiliary file, and will be applied the next time the surface is read. If, however the auxiliary file is deleted or is not present for some reason, the mesh div value will revert to its default value of 3x3.

Copying, Deleting, and Mirroring Parts

You may copy, delete, or mirror (about the centerplane) a part from the right-click context menu. All of these actions are performed on the current part and all of its children. Note that before a part is deleted, it will be hightlighted in the graphics area, and you will be requested to confirm the deletion.

Create a new Node

New nodes can be created by right-clicking on a part in the parts tree, and selecting New Node from the context menu. The new node will be created under the part that you clicked on. You can also create a new node from the Parts/Create menu.

context_menu1.gif (11404 bytes)

mesh_div.gif (6839 bytes)

Page 41 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 42: ~hh8476

3.3 Data Export

DXF files

DXF files can be created in either 2D or 3D format, and include 2D or 3D polylines representing the sections. Define and refine your sections, and select File/Export. In the File Export dialog box, select a File Export Type (at the bottom of the dialog box) of DXF, enter the desired file name, and click on OK. This brings up the DXF Export Options dialog box, where you select the parts to be included in the file, and whether you want a 2D or 3D file. If you are creating a 2D file, you also have the following options:

2D View: Here you select whether you want a 3-View, Bodyplan, Profile, Planview, or Viewport view (the same view as the currently active viewport)2D View Options:

Curve Label Size: the size of the labels on each curve (0 means that no labels will be included). The labels are drawn at the end of each curve, and display the constant value for that curve (e.g. the X value for a station).

Bodyplan Split Location: The bodyplan will be drawn with the forward half on the right side of centerline, and the aft half on the left. The split is taken at midlength, unless you specify a different location.

Each Section on Separate Layer: By default, each type of section goes out on its own layer; that is all stations go on a layer entitled “Stations”. If you select this option, each section will go out on its own layer, so that there will be as many layers as you have sections. In either case, the surface mesh is on a layer entitled “mesh”.

See also write-2d-dxf and write-3d-dxf.

IDF files

IDF files are human and machine readable ASCII files, containing hull geometry information in various possible formats, or entity types. These entities can be section polylines, wireframe mesh, NURBS surfaces, area curve data, or hydrostatic parameters. The IDF format is often used to exchange data between marine software, such as exporting data to MAESTRO, GHS, NavCad, and ShipCAM. See Appendix B for details on the IDF format.

Select File/Export, and in the File Export dialog box, select a File Export Type (at the bottom of the dialog box) of IDF, enter the desired file name, and click on OK. This brings up the IDF Options dialog box, where you select the parts to be included in the file, and what entities you want to include in the file. Note that IDF files can contain multiple entity entries, and new data will be appended to an existing file, rather than writing over that file. If you are including the Hydro entity, you must enter the flotation plane and mirror option, because the hydrostatics must be computed before the data is exported.

If you have a multiple surface model, and you are exporting sections to a program that does not deal with multiple surfaces (such as GHS), you should refine the sections and trim them before creating the IDF file. You must select the Composite Sections option under IDF Entities in the IDF Options dialog box.

See also write-idf, write-model, and write-sections.

IGES files

FastShip can write an IGES Entity #128 file, which is NURBS surfaces. To create the file, select File/Export, and in the File Export dialog box, select a File Export Type (at the bottom of the dialog box) of IGES, enter the desired file name, and click on OK. This brings up the General Options dialog box, where you select the parts to be included in the file, and click on OK.

See also write-iges.

Screen Postscript and HPGL files

FastShip can create Postscript and HPGL files of the drawing area of the screen. The resolution of these files is controlled by your output device, and is not limited to the resolution of the screen.

To create one of these files, use the commands hardcopy-postscript or hardcopy-hpgl. You will be prompted for a filename. For a postscript file, you can enter the optional keyword color if you want a color postscript file. If you want an encapsulated postscript file, use the file extension .eps. Otherwise, use just .ps.

Screen Hardcopy to a Printer

FastShip can output a copy of the screen directly to the current Windows printer. Select File/Print-Plot/Hardcopy, and then follow the dialog boxes for your printer.

Output for other FlagShip programs

The following table summarizes the data file formats that are appropriate for some programs commonly used with FastShip:

Program Format NotesGHS IDF Sections Refine and trim the sections.

Page 42 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 43: ~hh8476

IMS files

IMS ofe files for use in the IMS VPP can be created using the macro idf2ims.mac. Sections should be defined in the appropriate locations. Run the macro by selecting Utils/Read Macro, and entering idf2ims. Follow the prompts.

3.4 Data Import

FastShip can import two types of files; surface files, containing NURBS information, and wireframe data files, which contain points on curves (stations, buttocks, etc.). The NURBS data that is read in gives a surface which may be manipulated like any surface that is created in FastShip. The wireframe data is usually used as a template, for matching a surface to the data. The NURBS data may be in an IGES or IDF format. The wireframe data may be in an IDF for DIG format. Additionally, FastShip can translate DXF and GF (from GHS) files into IDF format, so that they may be read in.

Translating Files (DXF and GF)

Translating DXF and GF files is done with the File Conversion function in the Tools menu. The following dialog is shown:

Translating a GF file from GHS is straightforward, since the coordinate system is known. Simply select "From GF to IDF", and enter the Input and Output file names. When the conversion is complete, select File/Import, choose a file type of IDF, and read in the file.

Translating from DXF to IDF can be a bit more complex, since there is no way for FastShip to know what coordinate system the DXF file uses. It is important to realize that DXF files store the polylines in the coordinate system that they were originally created in, not a UCS. If you have a DXF file where different curves were created in different coordinate systems, you will have to separate them into separate DXF files before translating them. Also, FastShip does not read lightweight polylines.

Before doing the translation, make sure that your settings for the maximum number of layers, max number of curves, and max number of points per curve are set appropriately in the Input/Output tab of the File/Preferences dialog:

NavCad IDF Hydro entityMAESTRO IDF Sections Refine and trim the sections.ShipCAM IDF Mesh entity Must be a very dense mesh.AutoCAD DXF 2D or 3DIntergraph VDS/EMS IGES or Debug

tut3_4_1.gif (9895 bytes)

Page 43 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 44: ~hh8476

Once these are set, in the File Translator dialog, you enter the names of the input and output files. Additionally, you may enter the following data:

File Units: The units that the DXF file is in

Coordinate Transformation: This is the coordinate combination in the DXF file that corresponds to the longitudinal, transverse, and vertical dimensions

Scale Factors (X, Y, and Z): These are multipliers that are applied to the data as it is read (X is applied to the FastShip longitudinal data, Y to the FastShip transverse data, and Z to the FastShip vertical data). They can be used to change the directions or magnitude of a coordinate. For example, if the data comes in upside-down, re-do the translation with a Z multiplier of -1.

IDF Files

IDF files are read by selecting File/Import from the menu. The following dialog is shown:

You may select the type of IDF entity to be read (for more information on the format of IDF files, see the IDF Specification). Sections and Mesh are wireframe entities, and NURBS contains the NURBS surface data. Select the file to be read, and click on OK. Note that the data will be inserted as a new part in the parts tree, below thecurrent part. If you are reading NURBS data, the surface will come in with the default color of red, and default mesh divisions of 3 by 3.

See also read-idf and read-model.

Offset (.dig) files

tut3_4_2.gif (8216 bytes)

tut3_4_3.gif (8556 bytes)

Page 44 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 45: ~hh8476

Dig files are a more compact way to describe wireframe data. For the file format, see Appendix B.

To read a Dig file, select File/Import from the menu, and select a file type of Dig, and select the file. As with IDF files, the data will be inserted as a new part in the parts tree, below the current part.

See also read-offsets.

IGES files

FastShip can read IGES Entity #128 files (NURBS surfaces). To read an IGES file, select File/Import from the menu, and select a file type of IGES, and select the file. As with IDF files, the data will be inserted as a new part in the parts tree, below the current part. FastShip will ignore all entities in the IGES file except #128.

See also read-iges.

3.5 Lines Drawings and Offset Tables

Lines

A lines drawing may be output directly to a Windows printer, by selecting File/Lines Drawing. To create the lines drawing, first define the sections that you want to have in the drawing, and refine them to the desired level (refining them to a finer tolerance than necessary will slow down the plotting, so don’t go too far). Then select File/Lines Drawing. In the Lines Drawing dialog box, you will specify the parts to include in the plot and the plotting scale. The scale is plotting units per full-size unit. For example, a 1/10th drawing would have a scale of 0.1 (the scale can also be entered as a negative number; for example, a scale of -10 is gives a 1/10th scale).

If you wish to include a skin-thickness deduction or addition in the lines drawing, change the Offset in Parts/Properties before refining and creating the lines drawing.

See also create-lines.

Offset tables

Offset tables can be created quickly and easily. For each station defined, a list of half-breadths at each waterline and heights at each buttock will be tabulated. Endings of waterlines and buttocks are also given, as are offsets for the perimeter curves and chines/knuckles that are defined using multiple knots. The data is stored in an ASCII file, which may be read into any word processor or text editor (such as Windows Write, Word for Windows, or DOS Edit). It is also shown on the screen, and may be printed directly.

To create the offset table, first define and refine your sections, then select File/Offset Table. In the Offset Table dialog box, enter the name of the file to be created, the parts to be included, and whether you want the data output in decimal or fractional format (e.g. feet-inches-eighths +/-), and click on OK.

If you wish to include a skin-thickness deduction or addition in the offsets, change the Offset in Parts/Properties before refining and creating the offset table.

See also create-offset-table.

4.0 ADVANCED EDITING

IntroductionTutorial 4, ADVANCED EDITING, is where you see the features that really set FastShip apart, those that allow you to precisely place the control points to give you exactly the surface shape that you want. If you need to create a surface that matches existing offsets, FastShip has tools to make the job easier, and the process is covered here in a step-by-step fashion (more theoretical detail is given in a referenced document). Surface intersections and trimming are described, which give you great flexibility in creating complex models.

tut3_5_1.gif (4143 bytes)

Page 45 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 46: ~hh8476

Steps that you should carry out are preceeded by a bullet symbol (·).

4.1 Construction Geometry4.2 Absolute & Relative Coordinate Systems4.3 XYZ & CYL Coordinate Systems4.4 Measuring Curvature and Fairness4.5 The Command Line & Macros4.6 FastGen4.7 Fitting to Existing Offsets4.8 Surface Intersections4.9 Surface Trimming

4.6 FastGen

4.6.1 Introduction

The FastShip Hull Form Generation program (FastGen) is a collection of macros designed to facilitate rapid generation of surface ship hull forms through parametric variation of existing FastShip NURBS surface models.

Naval architects often wish to develop a new design or modify an existing one based on a set of parametric constraints. FastGen provides the engineer with a series of parametric “handles” with which to control hull shape. FastGen takes advantage of a key feature offered in Parametric FastShip, namely an embedded programming language known as Perl (Programming Extraction and Report Language). Parametric FastShip, an extension of the base FastShip program, provides direct access to much of the basic functionality of the program, allowing the macro programmer to develop customized applications tailored to specific user needs.

Hull form manipulation using FastGen utilizes the concept of a “parent hull”, which is an existing NURBS surface model possessing the essential topological features required in a new design. These design features are defined in a parent hull auxiliary file that must accompany the parent hull NURBS surface file. (Note that this auxiliary is not to be confused with the FastShip auxiliary file referred to in the FastShip User’s Manual). The current FastGen release includes a parent hull form representing a typical tanker hull surface model. Additional parent hull models are readily constructed. A description of the requirements for FastGen parent hulls and of the parent hull auxiliary file are presented in Section 4.6.2.

FastGen macro modules are applied individually to a parent hull to obtain a design with desired parameter values. FastGen includes three basic modules as follows:

• Gross Hull Dimensions

• Midship Section

• Sectional Area Curve

These modules give the engineer most of the primary control handles necessary to achieve a reasonable design with the desired characteristics. The following provides a list of parameters used or controlled in FastGen:

LWL length on designed load waterline

BX beam at maximum section

TX draft at maximum section

D10 depth at station 10

OH0 overhang at forward perpendicular

OH20 overhang at aft perpendicular

CX maximum section coefficient

LCB longitudinal position center of buoyancy from FP

AX maximum sectional area

PMB parallel mid-body

xAx longitudinal position of the section of maximum area, expressed as a station number

CPprismatic coefficient,

Page 46 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 47: ~hh8476

A description of the use and restrictions on the FastGen modules is presented in Section 4.6.3.

One final item of particular importance is emphasized here. FastGen provides the user with an enormous amount of control over the NURBS model geometry. It is possible to push the hull surface model beyond what might be considered good naval architectural practice with FastGen. The program will do its best to meet specified inputs, but may result in something that would not be considered a fair ship hull form. The designer’s judgment must be exercised to resolve this situation (i.e., some parameters may need to be compromised or an alternate parent hull may be appropriate.)

4.6.2 FastGen Parent Hulls

4.6.2.1 General

All parametric variations made using the FastGen macro suite are initiated with a “parent hull form” which contains the salient topological features required to represent the final design. Parent hull forms are FastShip surfaces that meet certain specific requirements including a particular surface naming convention and set of required topological features. The specific requirements for FastGen parent hulls are presented in 4.6.2.2.

Although its inherent nomenclature, features, and overall philosophy are geared for the design of marine structures, FastShip is really a general surface sculpting tool. It has no knowledge a priori of the topological features of a particular design such as where the parallel midbody begins and ends or where the skeg is located if one exists at all. FastGen, on the other hand, works directly with the key naval architectural features of a design. Since FastGen can only obtain information through interrogation of either FastShip or the user, some standard mechanism is required for FastGen to determine what the key topological features of the parent hull are. For FastGen, these features are defined in the parent hull auxiliary (‘.pmf’) file. The “.pmf” file is not to be confused with the standard FastShip auxiliary file (“.aux” file) which contains information such as section locations, surface colors, and global settings.Any parent hull forms that are delivered in your Parametric FastShip distribution already have a parent hull auxiliary file included. If you are creating your own parent hull form, you will have to create your own parent hull auxiliary file. The details of creating a parent hull auxiliary file are presented in Section 4.6.2.3.

4.6.2.2 Parent Hull Requirements

A number of requirements exist in regard to the organization and topology of a FastGen parent hull surface model. These are as follows:

- The parent hull model must be a FastShip surface.

- The parent hull must be comprised of a single surface representing half of a hull that is symmetrical about the centerplane (y=0 plane) and optionally may contain a separate skeg surface.

- The part name for the main hull surface must be ‘/top/hull/hull’ and for the skeg surface, if it exists, must be ‘/top/appendages/skeg/skeg’. Any other surfaces in the model will be ignored by the FastGen macros.

- The surface must be oriented with control net vertex [0,0] located at the aft end of the hull on the centerplane. Here and in subsequent references to control net vertices, the first number is the FastShip “u-direction” index (usually the column direction), and the second number is the “v-direction” index (usually the row direction).

- The global Cartesian coordinate system must be oriented with the origin located at the forward end of the design waterline (the FP in most cases) on the centerplane with the positive x-axis pointing forward, the positive y-axis to starboard, and the positive z-axis pointing up.

- The parent hull surface must contain a parallel midbody “plug” which can have zero longitudinal extent if no parallel midbody really exists but which must still be present topologically. If the length of parallel midbody is 0, then the “plug” location represents the location of the Station of Maximum Area.

4.6.2.3 Parent Hull Auxiliary File

As described in earlier in Section 4.6.2.1, the FastGen parent hull auxiliary file (‘.pmf’ file) is an ASCII file containing a description of the key parent hull features. A listing of a sample parent hull auxiliary file is provided in Figure 4.6.2-1. Note that the file format consists of a series of records, each record in the file containing a description of the feature followed by its FastGen variable name, then an ‘=’ sign, then the value. The routine which reads and parses this file keys on the FastGen variable name, the ‘=’ sign followed by the value. There can only be spaces separating these three items. Any other spaces or characters in the file are ignored, so the user is free to put any or no description, and the records can be placed in any order. If a FastGen variable is given a value in multiple locations in the file, the last value will be the one assigned to the variable. Table 4.6.2-1 provides a detailed description of the variables contained in the FastGen auxiliary file. In this table, “columns” refer to the u-parametric direction and correspond to the “n” suffix/prefix in the FastGen variable names while “rows” refer to the v-parametric direction and correspond to the “m” suffix/prefix in the FastGen variable names.

Figure 4.6.2-1: Sample Listing of Parent Hull Auxiliary File

Page 47 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 48: ~hh8476

Table 4.6.2-1: Description of FastGen Variables Found in the FastGen Auxiliary File

*************************************************************

GENERAL NET TOPOLOGY

*************************************************************

Maximum net column index in hull, maxn = 22

Maximum net row index in hull, maxm = 14

Maximum net column index in skeg, maxskegn = 6

Maximum net row index in skeg, maxskegm = 6

Aft column index of parallel midbody, nmidaft = 9

Fwd column index of parallel midbody, nmidfwd = 12

*************************************************************

NET TOPOLOGY RELATING TO CX INFLUENCE

*************************************************************

Fwd column index for Cx influence, maxncx = 16

Aft column index for Cx influence, minncx = 3

Lower row index for Cx influence, minmcx = 0

Upper row index for Cx influence, maxmcx = 11

Lower row index defining bilge radius, mbilgelo = 3

Upper row index defining bilge radius, mbilgehi = 7

Fwd column index for parallel Cx influence, maxncxmid = 14

Aft column index for parallel Cx influence, minncxmid = 8

*************************************************************

NET TOPOLOGY RELATING TO VERTICAL SCALING FOR DEPTH AND DRAFT *************************************************************

Depth/draft ratio for z-scaling interface, depth_ratio = 1.2

*************************************************************

NET TOPOLOGY DEFINING FIXED VERTICES AND STRAIGHT PATCHES

*************************************************************

Lower row of stem patch, stemminm = 7

Aft column of stem patch, stemminn = 20

Stem boundary condition, stembc = mirror

Lower row of stern patch, sternminm = 0

Straight patch, str_patch = 0,11,19,14,col

Straight patch, str_patch = 21,7,22,14,col

Fixed point indices in Cx region, fixpt = 6,1

Fixed point indices in Cx region, fixpt = 6,2

Fixed point indices in Cx region, fixpt = 6,3

Assumes hull is one surface with {0,0} at aft inboard end.

FastGen Variable Description Default

Page 48 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 49: ~hh8476

Valuemaxn Maximum column index in the main hull surface;

equal to number of columns - 1None

maxm Maximum row index in the main hull surface; equal to the number of rows - 1

None

maxskegn Maximum column index in the skeg surface 0maxskegm Maximum row index in the skeg surface 0

nmidaft The column index corresponding to the aft end ofthe parallel midbody. Note that this is not the

index of the tangency control column.

None

nmidfwd The column index corresponding to the forward end of the parallel midbody. Note that this is not

the index of the tangency control column.Usually, nmidfwd - nmidaft = 3

None

maxncx The maximum (forwardmost) column index for control net variation when implementing the macro for Cx modification. Note that no net vertices are moved from this column forward during Cx modification, although the surface

itself may change somewhat here.

None

minncx The minimum (aftmost) column index for controlnet variation when implementing the macro for Cx modification. Note that no net vertices are

moved from this column aft during Cx modification, although the surface itself may

change somewhat here.

None

maxmcx The maximum (uppermost) row index for control net variation when implementing the macro for Cx modification. Note that no net vertices are

moved from this row up during Cx modification, although the surface itself may change somewhat

here.

None

minmcx The minimum (lowermost) row index for control net variation when implementing the macro for Cx modification. Note that no net vertices are

moved from this row down during Cx modification, although the surface itself may

change somewhat.

None

mbilgelo The row index defining the “bottom” of the bilge radius.

None

mbilgehi The row index defining the “top” of the bilge radius.

None

maxncxmid The column index defining the forward end of the “parallel” Cx net influence. Note that the

influence of the Cx modification on the net can be broken into a region of parallel influence, and forward and aft regions of scaled influence. See

the appropriate reference section for more details. Often the tangency control column just

forward of nmidfwd.

None

minncxmid The column index defining the aft end of the “parallel” Cx net influence. See the note above for ‘maxncxmid’. Often the tangency control

column just aft of nmidaft.

None

depth_ratio The depth-to-draft ratio defining the interface of the linear and parabolic vertical scaling regions.

Usually somewhat greater than 1 (typically around 1.2) to minimize the effect of nonlinear

scaling on the wetted hull.

None

stemminm The row index defining the bottom of the stem patch for stem overhang adjustment. Typically near the stem/bulb intersection if a bulb exists.

None

stemminn The column index defining the aft end of the stem patch for stem overhang adjustment.

Typically one or two columns aft of the stem.

None

stembc A keyword defining the stem boundary condition. Either ‘mirror’ for a mirror boundary condition at the stem or anything else otherwise.

Non-mirror b.c.

sternminm The row index defining the bottom of the stern column for stern overhang adjustment. Usually the row where the transom meets the centerline

for transom stern hulls.

None

str_patch A net patch followed by a keyword for defining patches in the net where rows or columns are

linear (straight). The format is index1, index2, index3, index4, key where index1 and index2 are the column and row indices, respectively, of one corner of the net patch and index3, index4 define

the opposite corner. key has a value of either ‘row’ or ‘col’ corresponding to whether rows or

columns are to be kept straight in this patch.

None

fixpt A net vertex that should not move during Cx modification. The format is index1, index2

where index1 is the column index of the vertex and index2 is the row index of the vertex.

Typically, fixed points are specified for vertices which are within one of the regions influenced by Cx modification but which are located at or aft of the aft end of the flat of bottom. These

points are often on the half-siding and should not

None

Page 49 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 50: ~hh8476

4.6.3 PROGRAM OPERATION

To use the FastGen macros, first read in a parent hull. Then, from the Tools/FastGen menu, select the macro that you wish to use:

Modify Gross Dimensions Macro

When this button is selected, a series of prompts follow. After the user responds to the prompts, FastGen will calculate the new length overall, length on waterline, bow and stern overhangs, and waterline beam, draft, and freeboard, based on the information provided in the responses. The calculations are then displayed in the Info form. Note: When responding to the prompts, all responses must be keyed in, even if the user wishes to accept the default value.

Modify CX

When this button is selected, a series of prompts follow. The final prompt will be, “Enter max. number of iterations”. Multiple iterations are required by FastGen because the program uses NURBS surfaces and the manipulation of the vertices does not have a 1:1 correspondence ratio with the surface. When responding to this prompt, the user should keep in mind that the number of necessary iterations depends on the order of magnitude of the change. The greater the change, the more iterations that are usually required. However, iterations require memory and requesting an excessive number of iterations may result in a program crash if the available memory is exceeded. Note: FastGen will stop processing iterations if the calculated CX result is within of the input target value.

After the user responds to all of the prompts, FastGen will calculate the new midship section coefficient, CX, based on the information provided in the responses. The calculations from each iteration are then displayed in the Info form. Note: When responding to the prompts, all responses must be keyed in, even if the user wishes to accept the default value.

Modify Section Area Curve

When this button is selected, a series of prompts follow. The final prompt will be, “Enter max. number of iterations”. Multiple iterations are required by FastGen because the program uses NURBS surfaces and the manipulation of the vertices does not have a 1:1 correspondence ratio with the surface. When responding to this prompt, the user should keep in mind that the number of necessary iterations depends on the order of magnitude of the change. The greater the change, the more iterations that are usually required. However, iterations require memory and requesting an excessive number of iterations may result in a program crash if the available memory is exceeded. Note: FastGen will stop processing iterations if all the calculated results reach the input target values, within tolerances.

After the user responds to all of the prompts, FastGen will calculate the new longitudinal prismatic coefficient, longitudinal center of buoyancy, and length of parallel midbody, based on the information provided in the responses. The calculations for each iteration are then displayed in the Info form. Note: When responding to the prompts, all responses must be keyed in, even if the user wishes to accept the default value.

Undo Last FastGen Modification

This button will undo the last change, by referring back to the previous fgen_tmp file. The fgen_tmp files are updated at the beginning of any of the FastGen macros, so the changes made by that macro can be undone.

Update Cx Reference State

This button updates geometric reference points and vectors required for the CXMOD macro. UpRef must be executed prior to CXMOD if the user has modified the unit system (i.e., SI or English) or manually manipulated the vertices defining the parent hull.

4.8 Surface Intersections

The FastShip 6 Advanced Modeling (AM) module allows the user to compute the intersection of two arbitrary NURBS surfaces.These surface/surface

move.

Page 50 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 51: ~hh8476

intersections are in many ways like standard planar sections. They are updated dynamically as the user manipulates either of the surfaces involved in the intersection, they can be refined to a user-specified tolerance, they can have their attributes set (such as color and whether or not they are calculable), and they can be exported to a variety of data file types. However, surface/surface intersections are also different from planar sections in a number of ways that the user must consider. First, they are defined by two NURBS surfaces so if either surface changes they must be updated and if either surface is deleted they must be deleted. This is different from the case of planar sections where the implict plane used to create the section can remain independent of any surfaces it might cut. Furthermore, since surface/surface intersections involve two surfaces, they are rendered as two curves, one associated with each surface. This is done so that the user may set a view part (see set-view-part) to be either of the two surfaces in the intersection and the intersection curve remains visible. Another notable difference between planar sections and surface/surface intersections is that the sections are determined intially from the surface mesh and thus before refinement are only approximate while intersections are computed directly from the NURBS surface definition and thus are always refined to at least "On Surface".

To create a surface/surface intersection, invoke the command define-intersection either from the command line, the main menu under NURBS/Intersections/Create, or via the Intersections and Trimming toolbar icon ( ). The input to this command consists of points on the two surfaces in the vicinity of the intersection, a step size, and an optional name for the intersection. In the following paragraphs, each of this inputs will be described in detail.

The first two input items provide two essential pieces of information for the intersection calculation, namely, the two surfaces that are to be intersected and an initial guess at the starting point for the intersection calculation (sometimes called a "seed location"). The intersection calculation used in FastShip 6 employs a marching algorithm which starts by finding some initial point on the intersection and continues marching along the intersection curve computing new points until one of the following happens: a) a natural boundary (or edge) of one or both of the surfaces is reached, b) the intersection curve forms a closed loop (such as a cylinder intersecting a plane). As in many other surface modeling programs, FastShip does not permit calculation of surface intersections that would be self-intersecting except at their endpoints. In other words, an intersection curve may not cross itself other than at its endpoints. The initial point on the intersection curve is found by starting from a user-provided seed location then iterating until an intersection point is found. When the define-intersection command is invoked, the user is prompted to "Select/enter the first surface defining the intersection near the intersection". At this point the user may use the mouse to click on the first surface in the intersection. When selecting this surface the user should consider two things. First, the location on the surface where the user selects will be used as the seed location to find an initial point on the intersection. Therefore it is important that the user select the surface in the vicinity of the intersection. Probably the easiest way to do this is to toggle solids and lights on to view a shaded image of the model before creating the intersection. The second consideration is that it can be significant which surface is chosen as the first surface in the intersection. The method for computing the intial point on the intersection from the seed location involves projecting the seed point from the second surface onto the first surface perpendicular to the first surface. Thus it is usually wise to select the surface which has the greatest span around the intersection as the first surface. For example, if a small appendage is being intersected with a larger hull surface, it usually makes sense to choose the hull as the first surface because a point selected on the appendage can generally be projected onto the hull without difficulty. However, the user should be aware that if the program fails to find an intersection or seems to compute an incorrect intersection, you might try to reverse the order of surface selection to solve the problem. After selecting the first surface in the intersection, the user is of course prompted to select the second surface again in the vicinity of the intersection. The user can use the mouse to select a point on the second surface near the intersection.

The next input item is the step size to use in the marching algorithm. The step size is the physical distance in current length units between points on the intersection curve. Much like choosing a surface mesh density (see set-mesh-div), choosing a step size is a compromise between accuracy and performance.The smaller the step size, the more "refined" the resulting intersection curve will be but the slower the system will respond since more points are being calculated. Remember that points on intersection curves are always on the surface, so the step size is affecting the maximum deviation of the computed curve from the actual intersection in between points (sometimes called a chord height tolerance). When executing the define-intersectioncommand, the system offers a default step size of 0.1 length units which may be appropriate for many classes of problems. However, the user should consider this value carefully in relation to the current problem to select a suitable value because a step size which is very small relative to the overall length of the intersection can have a noticeable impact on system performance.

The last input item for creating an intersection is an optional name for the intersection. Although this argument is optional it is recommended that the user specify a name as this will assist the user in identifying the intersection curve after it has been created. The user should choose a unique name so that no two intersection curves have the same name, although FastShip does not force this behavior.

Once an intersection curve has been successfully computed it is displayed in all viewports for which surface intersection visiblility has been turned on. Use the command set-intersections, which can be accessed from the command line, from the View Options dialog, or from the Surface Visibility toolbar icon

, to make intersections visible in a particular viewport. The user may review and edit all currently defined intersection curves using the Intersections dialog box, which may be opened via the NURBS/Intersections/List... menu item or the Intersections and Trimming toolbar icon ( ).This dialog box lists for each intersection its ID, name, step size, defining surfaces, seed locations, calculation mode and number of points. The user can edit the seed locations, step size, and calculation mode by double clicking a section in the first column or selecting a section and clicking the Edit button. Currently, an intersection curve can be uniquely defined only by its section ID. Intersection names are not required to be unique although it is advisable to do so.

When modifying the topology of a surface by inserting or deleting a net row and/or column (see insert-net and delete-net), it is possible that a previously defined intersection will no longer be calculable either because the two surfaces no longer intersect or because the seed location does not allow the initial point to be computed. As noted above, the Intersections dialog box allows the user to see how many points were computed on the intersection curve. If a particular curve is shown to have zero points, then it is empty. The user may wish to delete this intersection which can be done by selecting the intersection and clicking the Delete button or by issuing the delete-sections command from the command line, the NURBS/Intersections/Delete menu item, or the Intersections and Trimming icon ( ).

If two surfaces intersect more than once, i.e. their intersection would be a discontinuous curve, then these surfaces are considered to have multiple, separate intersection curves. Each intersection would then have to be defined separately if it was desired to find all intersections. The user controls which intersection is found through the choice of seed location as described above.

Surface/surface intersections are persisted in the .aux file when the current model is saved, like planar sections. Therefore, if the .aux file is deleted or not included when transferring a surface model, the intersections (like the sections) will be missing and will have to be redefined.

The figures below illustrate the process of computing a surface/surface intersection between a hull surface and a cylindrical transom surface. Notice in the

Page 51 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 52: ~hh8476

first figure the user selects the transom in the vicinity of the intersection as the first surface. In the second figure the hull is selected near the same location on the intersection as the second surface. It will be very easy for the program to project the second point selected onto the first surface without any ambiguity. After accepting the default step size of 0.1 and providing an intersection name, the intersection is computed and displayed as shown in the third figure. Notice the apparent discrepancy in this figure between the computed intersection curve and the transom surface.This is because the surface is rendered as its approximating mesh while the intersection curve is being computed on the actual surface. As the mesh div of the transom is increased, the two match more closely as shown in the fourth figure.

Page 52 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 53: ~hh8476

Related Commands:define-intersection, delete-sections, set-intersections, set-intersections-color, refine-sections, set-sections-calc

4.9 Surface Trimming

Introduction

The FastShip 6 Advanced Modeling (AM) module allows the user to create and modify trimmed NURBS surfaces of any order. The addition of trimming capabilities to FastShip makes certain design problems which were sometimes awkward to handle in earlier versions much easier to solve and additionally opens up a whole new class of problems which would have been virtually impossible to solve previously. Issues such as appendages, superstructures, transoms, decks, and internal compartmentation can be addressed in a straightforward manner within the FastShip environment.

While FastShip allows for trimming operations in the classical sense in which the user picks a surface to trim, a curve to trim against, and a portion of the surface to discard, it also provides a logical extension to the trimming paradigm. This extension allows the user to add trimming curves to a surface in order to define distinct topological regions whose attributes may be independently set. As an example, a user might wish to set the color of a hull below the waterline which is different from that above the waterline. To do this the user would first define a trimming curve on the surface from a waterline and then set the color attribute of the region above and below the waterline to the desired values.

One feature of FastShip trimming which differentiates it from some other modeling programs is that trimming is dynamic.This is because trimming curves retain their linkage to their defining curves. If a trimming curve was defined from a surface/surface intersection then when the shape of either of the surfaces changes, the intersection is recomputed and so is the trimming boundary. Of course users are free to break this link if dynamic trimming is not desired.

Trimmed Surface Topology

Before the user can understand how to use the trimming functions in FastShip it is important to understand some of the relevant terminology and concepts. A surface may be considered to consist of one or more bounded regions. The boundary of a particular region is called a loop, and a loop may be composed of one or more curves which we call trimming curves. In the simplest case a new untrimmed surface can be considered to have one region contained within a single loop consisting of 4 trimming curves. These trimming curves are the natural edges of the surface. However, say a user wishes to trim a surface at an intersection with another surface. As described later in the example below, the intersection curve is "added" to the surface as a trimming curve forming two loops and hence two regions.Now the user is free to set the visibility attribute of either loop so that either, both, or neither of the two regions is displayed. The basic process to create a trimmed surface then involves defining trimming curves, then setting loop attributes as appropriate. Notice that the process of forming the loops is done automatically by FastShip whenever a trimming curve is added to the surface.

First we examine trimming curves. Surface trimming curves are curves which lie precisely on a surface and which have been denoted by the user or by the program's internal logic to be special surface curves which can participate in forming loops. By defining trimming curves in the parametric space of the containing surface, we can be assured that they lie on the surface, regardless of what the rendering may look like. Thus in order to create a trimming curve, we must be able to define a curve on a surface. Two ways for the user to define curves on a surface are by defining planar sections and surface/surface intersections. FastShip provides a function called add-trim-curve which allows the user to define a trimming curve from a section or intersection. This command may be executed from the command line, the NURBS/Trimming/Add Trim Curve menu, or the Intersections and Trimming toolbar icon . When a trimming curve is added to a surface in this fashion, it becomes a separate entity from the section or intersection used to define it. However, it maintains a linkage to the defining curve so that whenever anything happens which might cause the defining curve to change the linked trim curve is also updated. This is how the dynamic behavior of trimming is maintained in FastShip. It is important to understand that the trimming curve and the curve used to define it are separate, though interdependent entities. A user can break this link using the function link-trim-curve. When this is done, the trim curve is defined solely by its parametric location on the containing surface and has no knowledge of how it was created. As its name implies, link-trim-curve can also be used to re-establish a link between a trim curve and a particular section or intersection. This command can be executed from the command line or from the NURBS/Trimming/Link-Unlink Trim Curve menu item.

A surface's trimming curves are displayed whenever the user sets perimeters to be visible. This is because perimeter is really an alias for boundary, both external and internal. Thus the surfaces natural edge boundaries are considered trimming curves as well, but the program creates them automatically for any surface. Another case in

Page 53 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 54: ~hh8476

which the program can automatically create trimming curves is when FastShip imports a trimmed surface definition from an external file, say an IGES file. In this case, because the external file does not preserve the parentage of the trimming curve(s), the trim curves are unlinked.

As trimming curves are added to a particular surface, FastShip automatically recalculates all possible closed loops by considering these trim curves together with the natural boundaries of the surface. The second part of defining trimmed surfaces in FastShip involves setting loop attributes. Currently only 2 loop attributes may be controlled by the user; namely these are visibility and color (remember color specifications in FastShip also include things such as transparency, gloss, etc.). The command set-loop-attribute allows the user to select a particular loop in a surface and set it visibility and color attributes. The default visibility attribute is 'on' and the default color attribute is to inherit the containing surface's color. This command can be executed from the command line, from the NURBS/Trimming/Set Loop Attribute menu item or from the intersections and trimming toolbar icon .

It is important to realize that in order to make surface trimming truly dynamic, the system must allow loops to come and go as a surface is manipulated. A loop that might have existed at one stage of editing may not exist as the surface is further modified. For an analogous example which might help to make this clearer, consider the case of a buttock cut through a hull near the maximum width of a bow bulb. As the surface is edited in the region of the bulb, the connectivity of the buttock in that region varies quite drastically from a single continuous buttock through the hull and bulb, to separate buttock segments through the hull and the bulb, until the buttock completely disappears in the bulb but remains in the hull. Similar behavior can occur with trimming curves which might form drastically different loop topologies as the surface is edited. In order to have some hope of retaining user-specified loop attributes, all loop attributes contain as part of their definition a parametric location on the surface. It is this location which associates an attribute with a particular loop. If the parametric location is found to be inside of a particular loop then the association is automatically made. This algorithm makes the assumption that if the surface manipulation does not cause the overall loop topology to change, a parametric location which was in a particular loop before the manipulation occurred will continue to remain inside that loop afterwards. Although this methodology is not foolproof, it does allow users to manipulate the surface which a reasonable chance of maintaining intended loop attributes. One of the more significant conclusions to be drawn from this discussion is that when selecting a loop to associate a loop attribute with it is important that the user select near a representative "center" of the intended region as this will increase the likelihood of the attribute remaining associated with the intended loop as surfaces are manipulated. The user should be aware that if the assumption regarding loop attribute parametric locations does not hold true for a particular surface manipulation, it will merely cause an attribute to become associated with an unintended loop. Fortunately if this happens it is generally easily observable in the FastShip display and can be corrected using the set-loop-attribute command as described earlier.

Users should be aware that trimming curves must meet within the internal system tolerance in order for them to join to form a loop. This may become an issue when using surface/surface intersection curves to define trimming curves. If a user expects two trimming curves to join to form a closed loop but they do not join because of a tolerance issue, the loop will not be closed which could lead to unexpected results. As an example, say a user has intersected a circular cylinder with a flat plate and has added that intersection as a trimming curve. On the plate, the user would expect two loops to result, one inside the circular intersection and another outside. If the original cylinder surface was not closed within the system tolerance (i.e. the seam where the two edges were supposed to be joined had a gap), the resulting trimming curve would not be closed, and the loop formed by the intersection would be a degenerate loop which starts at the beginning of the intersection curve, traverses to the end then returns back on itself to become closed. If the user then tried to cut a hole in the plate by setting the loop attribute of region "inside" the circular intersection to be invisible, the entire plate would become invisible. In short, be certain that control net points are merged properly and positioned precisely in order to ensure expected behavior from the trimming algorithms.

As might be imagined, the number of additional computations which must be made in order to work with trimmed surfaces is significant. Factors which affect these calculations include the number of points on the trimming curves (and hence the step size and refinement level for their defining sections/intersections) and the surface mesh density. In some cases their can be a significant performance penalty when working with trimmed surfaces. In order to allow the user to work with the speed of untrimmed surfaces yet maintain the trimming definitions until a time when it is necessary to work with the trimmed surfaces, FastShip provides a function called set-surface-trimming which allows the user to alternately toggle surface trimming calculations on or off. When surface trimming is turned off, the user sees the full untrimmed surface(s) in the display and the program operates with in its usual high-performance mode. The user is free to add trimming curves and set loop attributes in this mode, but the effects will not be computed until trimming is turned on. This command can be executed from the command line, from the NURBS/Trimming/On menu item, or from the Intersections and Trimming toolbar icon .

In summary, the basic procedure for working with trimmed NURBS surfaces in FastShip involves defining curves on the surface (either planar sections or surface/surface intersections), defining trimming curves from these surface curves using the add-trim-curve command and setting attributes for the resulting loops as appropriate using the set-loop-attribute command. Many times the user wishes to execute a trimming operation in the traditional sense in which a surface is selected, one or more curves to trim the surface to are selected next, then the region of the surface to discard is selected, and the trim is completed in one operation. FastShip 6 provides the command trim-surface to facilitate this procedure. Although it is transparent to the user, it is easy to see that internally all this command is doing is adding specified curves to the surface as trimming curves and then setting the loop attribute for the selected region to have no visibility. The command trim-surface can be executed from the command line, from the NURBS/Trimming/Trim Surface menu item or from the Intersections and Trimming toolbar icon .

FastShip provides two functions to remove trimming information from a surface. The command trim-surface when given a keyword of 'clear' removes all trimming curves and loop attributes from the selected surface(s). This command can be executed from the command line, from the NURBS/Trimming/Clear Trimming menu item, or from the Intersections and Trimming toolbar icon . The command remove-trim-curve allows the user to remove a single trim curve at a time from a surface. It can be executed from the command line or from the NURBS/Trimming/Remove Trim Curve menu item. Note that there is no command to remove one loop attribute at a time. This is because any given loop can only contain a single attribute. If you set a loop attribute on a loop that already has an attribute, the existing attribute is replaced with the new one.

Example

The following series of figures illustrate a surface trimming example. The example begins with a hull surface containing a surface/surface intersection curve obtained by intersecting the hull and a transom surface. See Section 4.9, Surface Intersections to find out how to create this intersection curve. The first figure shows the hull surface with the mouse cursor pointing to the intersection curve. The second figure shows the same surface but with the control net displayed as well. In the third figure the user has executed the trim-surface command to trim away the unwanted portion of the hull. Of course surface trimming was turned on prior to executing this command via the command set-surface-trimming. In the trim-surface command the user selected the hull surface to trim, the transom intersection curve to trim to, and pointed to the region of the surface shown by the mouse pointer in the third figure to discard. The fourth figure shows the trimmed surface with the control net displayed. Notice that the control net is identical to the one in the second figure. It is important to understand that trimming a surface has no effect on the underlying control net. Only the surface mesh and sections are trimmed. The fifth figure shows a shaded rendering of the trimmed surface with perimeters turned on so that the loop boundaries can be seen. In the final two figures, the trimming process was continued on the port side of the hull, on the transom, and on the deck to obtain a trimmed surface model as shown.

Page 54 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 55: ~hh8476

Page 55 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 56: ~hh8476

Related Commands:trim-surface, add-trim-curve, remove-trim-curve, link-trim-curve, set-loop-attribute, set-surface-trimming

5.0 SPECIFIC GEOMETRIES (Under construction)

IntroductionAll of what has been learned to this point is applied to specific, real-world geometries that ship and yacht designers must create in Tutorial 5, SPECIFIC GEOMETRIES. The methods shown are by no means the only way to create these shapes, but present a logical method to solve these everyday modeling problems.

Steps that you should carry out are preceeded by a bullet symbol (·).

5.1 Chines/Knuckles5.2 Bow Bulbs5.3 Bilge Radii5.4 Broken Sheerlines5.5 Bow Thrusters &Tunnels5.6 Bow Cones5.7 Cylinders

6.0 Basic NURBS Surface Theory

In the beginning tutorials, you created your first surface models without necessarily knowing anything about NURBS surfaces. These exercise were intended, at least in part, to demonstrate the simplicity with which FastShip allows designs to be developed. But what was really happening behind the scenes in these examples? This discussion attempts to provide some answers by describing some of the basic concepts of NURBS surface theory. One might ask why it is necessary for the user to have to understand some of the theoretical underpinnings of an application such as FastShip. While our intent is not to try to convert any of you into mathematicians, it has become clear that at least a rudimentary understanding of NURBS surface mathematics allows the user to realize the greatest benefit from FastShip. The approach taken in the following discussion will be to demonstrate the properties of NURBS curves and surfaces graphically so as to give the user an intuitive feel rather than a purely theoretical (and potentially confusing) one. For the user who wishes to understand more about the underlying mathematics of NURBS surfaces, some suggested references include:

Rogers, David F. and J. Alan Adams, Mathematical Elements for Computer Graphics, second edition, McGraw-Hill Publishing Company, New York, 1990.

Farin, Gerald, Curves and Surfaces for Computer Aided Geometric Design: A Practical Guide, Academic Press, Inc., Boston, 1988.

Our discussion of basic NURBS surface theory will cover the following topics:

What is NURBS?

Key Terms and Concepts

A Simple Cubic B-Spline Example

A Simple Quadratic B-Spline Example

A Simple Linear B-Spline Curve Example

Multiple Knot Insertion

B-Spline Curves Versus Traditional Interpolating Curves

Convex Hull Properties of B-Spline Curves

Adding Control

Page 56 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 57: ~hh8476

The "Rational" Part of NURBS

The Extension from Curves to Surfaces

Boundary Conditions and Discontinuities

A Summary of Important NURBS Properties

What is NURBS?

Our first task is to define what the term NURBS really means. NURBS stands for NonUniform Rational B-Spline. Now you see why we shorten it to NURBS. We will attempt to address each portion of this rather verbose phrase in turn throughout the ensuing discussion. At the root of this NURBS expansion is the term B-Spline. What’s a B-Spline? The first thing to understand is that when discussing NURBS we can talk about NURBS surfaces or NURBS curves. For the sake of simplicity we shall confine our discussion to the topic of NURBS curves initially, and then extend our treatment to include NURBS surfaces. Put succinctly then, a B-Spline curve is a curve generated by using the vertices of a defining polygon with some interpolation scheme to establish the relationship between the curve and the polygon. There are a number of different curves that obey this same property of being generated from a defining polygon. What makes the B-Spline curve unique is that the relationship between the curve and the defining polygon is a special set of polynomial functions known as the B-Spline basis functions. Before one can really understand what this means we must first make a brief digression to describe some of the key terminology related to NURBS theory.

Key Terms and Concepts

Essential to even a basic understanding of NURBS surface mathematics is an introduction to some key terms and concepts. The first concept we examine is that of the parametric vs non-parametric curve. Thinking back to the days of childhood mathematics, remember that space curves may be defined mathematically by either non-parametric functions or parametric functions. For the simple case of a two-dimensional straight line in the x-y plane, we have the following two ways for defining the line:

Non-parametric Function: y = ax + b = f(x)

Parametric Functions: x = g(u); y = h(u)

The explicit non-parametric function above seems like a concise and convenient form to use, and sometimes it is. If I give you an x value, you can evaluate the function f and return a y value. However, what happens when the curve is not a line but some curve that loops back on itself such that at a given value of x there are two or more distinct values of y as shown in Figure 1? It becomes easy to see how such a functional definition can cause confusion in the context of a computer program where multivaluedness is not readily dealt with. In fact, a number of engineering programs which use non-parametric function definitions place limitations on the types of geometry that can be represented. To avoid this problem FastShip uses a parametric definition in which both x and y (and z in three dimensions) are independent functions of some "parameter value", u in this example. The restriction here is that u must increase or decrease monotonically as the curve is traversed from one end to the other. The parameter value, u, is really just a mathematical artifice and does not necessarily have any direct physical property relating it to the curve. It is important not to think of u merely as distance along the curve although there is some generally nonlinear relationship between the two.

Figure 1: Parametric vs. Non-parametric Curves

Although the gain is evident we do pay a price for using a parametric definition. First, referring to the previous example of a straight line, to evaluate the location in

Page 57 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 58: ~hh8476

space of point on the line takes two equation evaluations as opposed to one in the case of an explicit non-parametric curve definition. So computationally, it is more expensive. Second, we often wish to evaluate y at a given x or x at a given y and know nothing of what the value of u is. In the parametric definition, we must first evaluate the parameter value associated with the given x before evaluating the y. This is not always a straightforward task.

With that under our belt we can move on to discuss some of the other key concepts. Consider the B-Spline curve shown in Figure 2. The solid line represents the curve and the dashed line represents the defining control polygon. The control polygon consists of a series of vertices, denoted B0 thru B5 in the figure, connected by straight line segments. It is these vertices from which the actual shape of the curve is determined. As noted earlier, the curve and the control polygon are related through a set of polynomial blending functions known as the B-Spline basis functions. Note the similarity in shape between the control polygon and the curve. In some senses the control polygon may be thought of as a caricature or exaggeration of the curve which it defines. With a little practice, discerning the shape of a B-Spline curve from its defining contol polygon will become second nature. Furthermore, the vertices are the handles which allow the user to manipulate the shape of the curve. By adjusting the positions of the vertices the curve shape is adjusted in a natural (and eventually intuitive) way. Although it is not strictly correct, it is sometimes useful for new users to think of the vertices as being "connected" to the curve with springs or alternatively as the curve being "attracted" to the vertices like magnets.

The next concept which must be examined before proceeding with a more complete discussion of NURBS mathematics relates to something called a knot vector. Simply put, the knot vector is a list of parameter ("u") values along the curve which serve to define how the control polygon vertices are situated in parametric space. For the example curve shown in Figure 2, knot values are denoted by filled circles on the curve. There are a number of ways in which one might try to contemplate the significance of the knot vector. Values in the knot vector define interval breaks in the curve, i.e. locations along the curve where one polynomial interval ends and the next begins. For the fourth order (cubic) B-Spline example of Figure 2, the portion of the curve from the left end to the first interior knot value is a cubic curve while the portion from that knot to the next is another distinct cubic (with slope and curvature continuity across the joint in this case). In some senses, the values of the knot vector are analogous to duck weights used by the loftsman to arrange a batten. In yet another sense, the knot vector defines the connectivity of the curve. Although this may seem vague at present, it will become more clear as we proceed with some examples.

Figure 2: Key NURBS Terms and Concepts

One final note before continuing with some B-Spline curve examples. There is often confusion over the terminology order and degree as applied to polynomial curves. In the context of this discussion, degree refers to the highest integer power found in the function defining the curve. The term order is simply the degree plus one and stems from the fact that in a simple polynomial function such as f(x) = ax3 + bx2 + cx + d the number of unknown coefficients is one greater than the highest degree because of the constant, or zeroth degree, coefficient. Hence, a cubic B-Spline curve has degree three but is fourth order.

A Simple Cubic B-Spline Example

For our first example consider the cubic (fourth order) B-Spline curve shown in Figure 3. The control polygon is composed of four vertices labeled B0, B1, B2 and B3connected by dashed line segments. What can we determine about this cubic curve? Let's ask and answer several questions about this curve.

First, how many points are required to define a cubic curve? It turns out that you need a number equal to the curve order. It takes two points to define a line, three to define a quadratic, and four to define a cubic. Since we have four points in our defining polygon one can surmise that we have a single cubic interval in this example.

What does the parametric space of this curve look like, i.e. how does u vary along the curve? We are free to let u vary between any begin and end value as long as it increases monotonically along the curve from start to finish. Furthermore, it is not the absolute magnitude of the parameter value which is important but instead the variation of this value along the curve. For convenience we will let u vary between 0 and 1 as we travel from beginning to end of the curve.

Next, what is the knot vector for this curve? Well since we know that the curve consists of a single cubic interval and the knot vector values define the locations of joints between curve intervals, we might guess the knot vector looks like [0, 1]. This is close but not quite right. The type of knot vectors we use in the current version of FastShip are known as open knot vectors (as opposed to the periodic knot vectors used in FastShip versions 3 and earlier). Open knot vectors have the property that there is a multiplicity of knot values equal to the order of the curve at the beginning and end of the knot vector. Thus the knot vector for this example really is [0, 0, 0, 0, 1, 1, 1, 1]. The effect of this multiplicity of knot values is to force the ends of the curve to be coincident with the first and last vertices of the defining control polygon. This is an important property which is true in general and should be restated. For B-Spline curves with open knot vectors, the curve interpolates to the control polygon at the ends.

Next what is the meaning of the numerical values located next to each curve in Figure 3. Those numbers represent parametric (u) values along the curve with which the control polygon vertices are most closely associated, i.e. the location of the control polygon vertices in parametric space. The influence of any particular vertex on the curve is greatest at these parametric locations. Remember previously we said that one of the functions of the knot vector was to define how the control polygon vertices are arranged in parametric space. Well parametric values associated with polygon vertices may be determined by the following approach.Using the knot vector above, strip off the first and last values. We will sometimes refer to these knot values as "phantom" values because they are present simply to allow the mathematical algorithm used for computing B-Spline basis functions to work properly. Then starting from the beginning, average successive groupings of knot values with the group size equal

Page 58 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 59: ~hh8476

to the degree of the curve. The resulting averages are the associated parametric values. If we apply this technique to the current example we take groups of three values at a time (after stripping the phantom values off) and get the following groups: {0,0,0} average to 0; {0,0,1} average to 1/3; {0,1,1}average to 2/3; and {1,1,1} average to 1. So for example if we move vertex B1, it will influence the entire curve but it will have its greatest effect at a parameter value of 1/3.

Finally, how does one evaluate the location of a point on the curve given the defining polygon and the knot vector? To demonstrate this let's evaluate a point on the curve at a u value of 0.5. The process consists of applying repeated sets of linear interpolations. Since this is a cubic it turns out that three sets of linear interpolations will be required. First interpolate each of the three legs of the control polygon at half the distance (because the desired u value is half way along the parametric space of the curve) along the leg giving three new points, shown as diamonds on the original control polygon in Figure 3. Now interpolate the two new legs formed by connecting these points halfway along to give two more new points shown as diamonds on the new legs in Figure 3. Finally, interpolating the leg formed by connecting these two points gives a point on the curve at u = 0.5.

Figure 3: Cubic B-Spline Curve Example

A Simple Quadratic B-Spline Example

Now we look to another B-Spline curve example. Consider the quadratic (third order) B-Spline curve shown in Figure 4 defined here by three control polygon vertices. Applying what we learned in the previous example here we know it takes three points to define a quadratic implying that only a single quadratic interval exists here. The open knot vector with phantom values at the ends would look like [0, 0, 0, 1, 1, 1]. You may have noticed that there is a relationship between the number of contol polygon vertices and the number of knot values in the knot vector. For B-Spline curves in general, the number of knot values equals the number of vertices in the control polygon plus the order of the curve, in this case 3 + 3 = 6. As noted in the previous example, the effect of this multiplicity of knot values is to force the ends of the curve to be coincident with the first and last vertices.

Applying the technique for finding parametric values associated with the vertices, we strip the phantoms from the knot vector and average successive pairs of knot values giving 0, 0.5, and 1 as the associated values. Now lets evaluate the curve at a parametric value of 0.5. As mentioned earlier the process consists of successive linear interpolations. Take the first leg and interpolate it at half the distance along the leg. Do the same for the second leg yielding the points marked as diamonds in Figure 4. Consider now the new leg formed by connecting these two interpolated points. Interpolate that leg half way along and the resulting point is a point on the curve at a u value of 0.5. Note that it required two successive sets of linear interpolations to evaluate the curve, and you will find in general that it requires a number of successive sets of linear interpolation equal to the degree of the curve to evaluate it. A similar procedure could be followed to evaluate any point on this curve. Of course, this is a purely graphical explanation of B-Spline curve evaluation. Established mathematical algorithms (such as teh well-known Cox-DeBoor algorithm) exist to permit rapid evaluation of B-Spline curves and surfaces, and these are used internally in FastShip. However, this graphical approach is useful for demystifying some of the NURBS mathematics as well as for demonstrating a number of important properties.

Note in Figure 4 that the ends of the curve not only interpolate to the ends of the control polygon but also appear to leave tangent to the first and last leg of the polygon. This is also a general property. B-Spline curves with open knot vectors approach the ends of the control polygon tangent to the first and last legs of the defining control polygon.

Page 59 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 60: ~hh8476

Figure 4: Quadratic B-Spline Curve Example

A Simple Linear B-Spline Curve Example

For our last example, consider the linear B-Spline curve example shown in Figure 5. The control polygon is composed of three vertices labeled B0, B1, and B2. What can we determine about this linear "curve"? We know it only takes two points to determine a line, so it there must be two linear intervals. It takes three knot values in the knot vector to define 2 intervals, one at the beginning, one at the end and one interior knot value. For many of the surfaces you will be working with in FastShip, a uniform knot vector will be used. This simply means that the interior knot values are equally spaced parametrically. We will consider nonuniform knot vectors later in this discussion. Hence a uniform knot vector for this example would look like [0, 0.5, 1]. The open uniform knot vector for this curve with proper multiplicity of knot values at the ends would then be [0, 0, 0.5, 1, 1]. By applying the averaging technique described earlier for determining the parametric values associated with the control vertices, we see that the parametric values associated with each vertex is identical to the knot vector itself (without the multiplicity of values). The final significant property to glean from this example is related to evaluation of the curve at any parametric value. If asked to evaluate the curve at a parameter value of 0.25, one would intuitively consider the leg defined by B0 and B1 whose associated parametric values are 0 and 0.5, and travel mid way between the two. This intuition is exactly correct. Linear interpolation is a powerful concept applied to B-Spline curves. It turns out in fact that for the linear B-Spline curve the curve and the control polygon are coincident, i.e. the curve lies on top of the polygon.

Figure 5: Simple Linear B-Spline Curve Example

Multiple Knot Insertion

Lets consider a somewhat modified approach to evaluating the curve at u = 0.5 for the initial cubic B-Spline example described above. We saw earlier that at the ends of the knot vector, the multiplicity of knot values equal to the order of the curve forces the curve to interpolate to the ends of the control polygon. Well as luck would have a similar property exists in the interior of the curve as well. If a multiplicity of knot values equal to the degree of the curve exists in the interior of the curve, the curve

Page 60 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 61: ~hh8476

must coincide with a polygon vertex at that parametric value.

So the approach here to evaluate the curve will be to insert multiple knots (three since this is a cubic) at a parameter value of 0.5. Figure 6 shows the process. Adding the first knot value gives a knot vector of [0, 0, 0, 0, 0.5, 1, 1, 1, 1]. Clearly since the number of knot values equals the number of vertices plus the curve order, if we add a knot to the knot vector we must add a polygon vertex as well, but where and how? Consider the following algorithm. Determine the parametric values associated with the polygon vertices from the knot vector after adding the knot value using the averaging process described earlier. Here we get 0, 1/6, 1/2, 5/6, 1. Interpolate the original control polygon at these locations giving a new control polygon as shown in Figure 6. This new polygon is a valid B-Spline control polygon defining the same B-Spline curve as the original but with the new knot vector. Now insert a second knot value at 0.5 giving the knot vector [0, 0, 0, 0, 0.5, 0.5, 1, 1, 1, 1] and the associated values 0, 1/6, 1/3, 2/3, 5/6, 1 and the new control polygon shown in Figure 6. Finally, insert a third knot value of 0.5 giving the knot vector [0, 0, 0, 0, 0.5, 0.5, 0.5, 1, 1, 1, 1] and the associated values 0, 1/6, 1/3, 1/2, 2/3, 5/6, 1 and the final control polygon shown in Figure 6. Notice that there is now a polygon vertex associated with a parametric value of 1/2 and since we have a multiple knot at this location, the B-Spline curve passes through that vertex and in fact approaches from either side tangent to the polygon leg on either side. This procedure has served to demonstrate the duality of inserting multiple knots into the knot vector and evaluating the B-Spline curve.

One final comment may be made here regarding the knot vectors discussed above. Up until this example only uniform knot vectors have been considered. What about the case when multiple interior knot values exist? This is one example of a nonuniform knot vector. The interior spacing of knot values is no longer constant. This is in fact the most likely instance of nonuniform knot vectors (though not the only possible instance) that you will encounter in FastShip.

Figure 6: Evaluation of B-Spline Curve through Knot Insertion

B-Spline Curves Versus Traditional Interpolating Curves

Many of you have worked with interpolating curves in one form or another, the "cubic splines" used in many applications to interpolate between a discrete set of data points. How are these curves different from B-Spline curves and why aren’t they used in FastShip? The following discussion points out the basic differences between the use of interpolating splines and B-splines in a design context. For the sake of discussion, we will only consider the case of the fourth order, or cubic splines functions, since these functions closely approximate the physical behavior of mechanical battens, and hence most of the materials from which marine craft are built. The user is referred to Figure 7 for the following discussion.

We will begin by discussing space curves and then extend the discussion to include surfaces. The principle difference between the cubic B-spline representation of a space curve and a parametric cubic spline (expressed in terms of interpolating a set of points) is the set of ‘handles’ that the designer has to manipulate the curve. The B-spline representation uses an auxiliary control net (polygon vertices) to push and pull the curve, whereas the interpolating spline uses the nodes (‘ducks’) to directly position the curve in space.

At first glance this latter method of directly manipulating nodes on the curve to design the overall shape of the curve seems extremely intutitive and natural, while the concept of manipulating an auxiliary figure like the control net to shape the curve seems to be an unnecessary abstraction. Natural, perhaps, in the sense that it parallels the manual process of positioning spline weights, but the results are sometimes anything but intuitive.

Figure 7 shows two splines, each with five control points (ducks or polygon vertices) where the middle point is displaced vertically by a unit amount. This displacement in the vertical direction can be thought of as our designer’s first attempt to modify the initially straight curve. Notice the quite different resulting curves. The interpolated spline does indeed pass through all of the defining control points, but oscillates above and below the baseline in a not so intuitive fashion, while the B-spline did not actually pass through the moved control vertex, but rather smoothly mimicked the control net in a somewhat understated fashion. It is also worth noting that had the example curve contained more nodes (control points) on either end of the curve, the resulting B-spline would have been the same, while the interpolating spline would have continued to exhibit a decaying oscillatory nature all the way to the ends of the curve.

Page 61 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 62: ~hh8476

Figure 7: A Comparison of B-Spline and Interpolating Curves

Two important properties of B-spline manipulation are demonstrated by this simple example. First, the spline’s response to a movement in the defining control net,can only be in a direction parallel to the movement of the control point, with the magitude of movement dependent upon proximity to the moved control point. Second, there is a limited span of influence that any control point has on the curve, ie. only local changes in curve shape will result from moving a single control point.

These properties are clearly not shared by the interpolating spline which is required to pass through the manipulated control points. In fact, it can be shown that the impact of moving any single control point is felt over the entire length of the curve, and that the change in shape is essentially oscillatory in nature.

There is no magic or slight of hand being performed here. The essential nature of B-splines when manipulated by their associated control net is to move more than a single node at a time. Returning to Figure 7, one can see that the central node associated with the moved control vertex moved 2/3 as far as the vertex, while the two adjacent nodes each moved in a parallel direction but with only 1/6 of the magnitude. This movement of adjacent nodes was exactly sufficient to attenuate and ultimately negate the internal moments in the spline that would have propagated the oscillatory wave down the length of the curve. Functionally the designer using the interpolating spline could produce the identical curve by moving the three nodes in question to the locations indicated by the B-spline, but such a precise positioning of the nodes is intuitively unlikely. Likewise, the designer using the B-spline handles could have produced the oscillatory curve from the interpolation example, but he/she would have had to create an oscillatory net to do so!

The essential point of the preceeding discussion is to lead the reader to consider (by extension of the same principles) the choice of ‘design handle’ that should be used in a real curve or surface design tool. In the very narrow arena of naval architectural design software, both interpolating and B-spline manipulation schemes have been implemented. FastShip chose to produce a surface design tool which presents the designer with a surface control net which he uses to sculpt his surfaces to the desired shape, with prescribed or interactively determined edge conditions. Some programs use a B-spline scheme to design ‘master sections’, but then longitudinally ‘fair’these sections by passing an interpolating spline function through the control points on the master sections. Obviously, in this critical longitudinal direction, small changes in the master sections can result in oscillatory perturbations down the entire length of the vessel being designed. Not only does this make such common tasks as imbedding sections of straight line in the longitudinal curves practically impossible, but it fundamentally implies that local design changes are never really local!

Convex Hull Properties of B-Spline Curves

One significant and very useful property of B-Spline curves is the so-called convex hull property which helps one to visualize the shape of a B-Spline curve given its control polygon. Put concisely, a B-Spline curve must lie within the convex polygon defined by considering successive vertices in groups of size equal to the order of the curve. Consider the fourth order B-Spline control polygon in Figure 8. Starting from the left end, take the first four vertices and close the figure to form a trapezoid. Now take the second through fifth vertices and again form a closed trapezoid. Continue this procedure until the last four points are reached. The outermost bounds of the resulting auxiliary figure form a convex hull inside which the B-Spline curve must lie.

Repeat this same procedure for the third order control polygon this time considering three points at a time and forming triangles. Note that although the defining control polygons are identical, the third order curve has a smaller convex hull than the fourth order curve indicating that the curve more nearly resembles the polygon. Taking this one step further, the convex hull for the second order (linear) curve is the polygon itself. This is further proof of the fact that for a linear B-Spline, the curve is coincident with its defining polygon. This technique can be very useful for visualizing the shape of a B-Spline curve from its defining polygon.

Figure 9 demonstrates another use for the convex hull property of B-Spline curves. Consider first the top figure in Figure 9. This is a quadratic (third order) B-Spline with seven colinear polygon vertices. Applying the convex hull property by grouping three vertices at a time yields the convex hull shown in the figure. Note that there is a finite, well-defined portion of the control polygon over which the convex hull degnerates to a line and therefore over which the curve itself must be linear. In general, the distance inboard from the ends of a colinear segment of the control polygon over which the curve itself is colinear is equal to the order of the curve - 2 vertices. Hence here we need only move one vertex inboard of the colinear segment before the colinear portion of the curve begins. Clearly then for a cubic, we must move two vertices inboard while for a linear B-Spline, a linear portion of the polygon corresponds precisely to a linear portion of the curve. Furthermore, we may state that the influence of any single vertex on the curve can only be felt as far away as the (curve order)/2 intervals away from the point in either direction.

The bottom figure of Figure 9 demonstrates another property. For this quadratic B-Spline, there are two coincident polygon vertices in the interior of the curve. Applying the convex hull property once again we see that the curve must pass through these coincident points. Generalizing, a multiplicity of coincident polygon vertices equal to the degree of the curve is sufficient to force the curve to pass through these vertices. Furthermore, addition of multiple vertices reduces the guaranteed continuity across the vertices by one degree per added vertex.

Page 62 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 63: ~hh8476

Figure 8: Convex Hull Properties of B-Spline Curves

Figure 9: Convex Hull Properties of B-Spline Curves (cont'd)

Adding Control

We now focus our attention on the issue of adding control to a B-Spline curve or surface. There will be many times while using FastShip when the user finds he/she desires greater control over the shape of the surface. The obvious means for adding control is to add control polygon vertices. As we know this implies adding values to the knot vector as well. Two specific approaches are used in FastShip to add control to a surface. The first is a function denoted insert-net while the second is a function called insert-knot. We will describe each of these briefly in the following discussion.

Figure 10 displays the "insert net" approach for adding control. Consider a cubic B-Spline consisting of four control polygon vertices (a single interval) and an open uniform knot vector as shown in the left figure of Slide 20. This is the same cubic example we looked at earlier with auxiliary lines showing how a point on the curve at a u value of 0.5 is evaluated. We want to insert a net vertex in the middle of the curve to gain more control there. The way the insert-net function works is to leave all existing polygon vertices in their current position, insert a new vertex into the polygon along a specified leg some specified distance, and add a knot value into the knot vector so as to maintain a uniform knot vector. In this example, the new vertex was inserted mid way between the second and third vertices, and a new knot value of 0.5 was added. (Note that in FastShip the new knot vector would have been [0, 0, 0, 0, 1, 2, 2, 2, 2] since FastShip chooses to maintain integral knot values. Proportionately, however this is the same knot vector as shown here and will yield precisely the same curve.) If we use the techniques we have already learned to evaluate the curve with the additional control, we find that it differs slightly from the original curve. But we do have added control. The key points here then are that the insert-net function does not maintain curve shape but does maintain uniformity of the knot vector.

Page 63 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 64: ~hh8476

Figure 10: Adding Definition Via "Insert Net"

Now refer to Figure 11 for a discussion of the "insert knot" approach for adding control. We begin with the same cubic B-Spline curve shown in the left figure of this slide. The user specifies where in parametric space he/she wishes to insert the knot, in this example at a parameter value of 0.75. The knot vector is updated accordingly, and a new vertex is added. However, here some vertices in the intial polygon are moved from there original positions. The technique described earlier, where the parametric values associated with the vertices is determined by averaging the knot vector, is used, and a new polygon is generated as shown in the right figure of Figure 11. The key points here is that the insert-knot function does maintain curve shape but does not generally maintain uniformity of the knot vector. In fact, except for this specific case of a single interval knot vector, there is no location where one can insert a knot value into a uniform, multi-interval knot vector and maintain its uniformity.

Figure 11: Adding Definition Via "Insert Knot"

The "Rational" Part of NURBS

To this point we have discussed all of the individual pieces that make up NURBS except for one: the "rational" part of NURBS. Rational B-Splines are defined such that each control polygon vertex has a weight value associated with it. These weights can be thought of as affecting the "strength" of the influence of any given vertex on the curve. Consider the illustration shown in Figure 12. Here we are attempting to define a 90 degree arc (quarter) of a circle using a quadratic B-Spline curve defined by three polygon vertices. Since we know that the curve approaches either end tangent to the first and last leg of the polygon, in order to obtain a 90 degree arc, the two polygon legs must be perpendicular. Arranging the polygon as shown but leaving the vertex weights at 1 yields the top curve in the figure, clearly not circular. Our initial instinct might be to lower vertex B1 until a more circular figure was obtained. Although this might be an adequate way to approximate a circular arc it cannot be precisely correct for two reasons. First, lowering B1 means that the two legs are not longer perpendicular which eliminates the possibility that tangents to the ends of the curve are perpendicular. Second, and perhaps more importantly, we have shown previously that moving a vertex in the net effects a parallel transformation, i.e. all points on the curve move parallel to the direction of vertex movement but by differing magnitudes. What we really want here is a perspective transformation in which the points on the curve move away from B1 in a radial direction. This is accomplished by modifying the weight associated with vertex B1. In this example the weight is decreased to allow representation of a circle. There is a precise distribution of weights

amongst the vertices of a control polygon which allow it to define a circle. Although in certain specific cases this distribution is easily evaluated, it is not in the general

Page 64 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 65: ~hh8476

case. For most models developed in FastShip, it is sufficient to approximate circular regions using vertices with uniform weight. The Advanced FastShip Training Course provides some specific examples of how to use rational B-Splines to represent circular regions.

Figure 12: The Rational Part of NURBS

The Extension from Curves to Surfaces

It is time to make the leap from curves to surfaces. Really this is a rather straightforward leap because most of what has been discussed in relation to NURBS curves applies to NURBS surfaces as well. The concept of the control polygon is maintained but now extends in two directions and is called a control net. We must now transition from talking about the single u-parameter space to the two-parameter u-v space. Most of the properties determined earlier apply here as well if you remember to consider these properties in terms of two-parameter space. For surfaces we have the additional useful property that at any point on the surface the cross-products of two tangents to the surface gives the outward normal. Finally, as illustrated in Figure 13, the NURBS surface "follows" the control net less than the NURBS curve followed the control polygon. This is the result of the fact that FastShip implements tensor product surfaces. So in the case of the B-Spline curve, where the effect of moving a polygon vertex one unit up causes the curve to move one half unit up, in the case of the B-Spline surface moving a net vertex one unit up can be thought of as having an influence on the surface of one half unit in each parametric direction giving a net effect of moving the surface one quarter unit up.

Figure 13: Extension to B-Spline Surfaces

Boundary Conditions and Discontinuities

The final two topics to be convered in our discussion of NURBS surface theory relate to boundary conditions and discontinuities. We know at this point that for a

Page 65 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 66: ~hh8476

NURBS curve the curve approaches the ends tangent to the first and last legs of the control polygon. Consider a draftsman drawing a waterline ending in a lines drawing with a flexible batten. If the draftsman places ducks weights along the batten such that the last duck is right at the leading edge of the waterline, and the batten is free to take whatever shape is natural forward of this point, the result is what is termed a natural spline end condition. This may be represented by a B-Spline curve with the last three polygon vertices being colinear as shown Figure 14. Often times, however, the waterline ending comes in perpendicular to the centerplane such as with an elliptical waterline ending. The draftsman would have to somehow torture the batten or preferably use a ship’s curve to accomplish this. With a B-Spline curve this is easily accomplished by making the last leg of the polygon perpendicular to the centerplane. This is termed the mirror boundary condition. Here we see just how valuable the B-Spline definition is for enforcing with no ambiguity such an end condition.

The second topic involves curve and surface discontinuities. We saw earlier how we could use either multiple net vertices or multiple knot values to force a B-Spline curve to pass through a specific point and how the curve must approach this point tangent to the polygon leg on either side of it. This implies that either technique could be used to insert a chine or knuckle into the curve by arranging the polygon such that the legs on either side of this point are not colinear. The question then arises, which is the better choice, multiple nets or multiple knots? Two comments may be made in this regard. First, multiple knot values may be considered a generally more elegant or rhobust solution because it is well-defined in terms of NURBS mathematics and requires no degeneracies or singularities to be handled in the solution. Be aware that some NURBS-based applications cannot handle the case of multiple net vertices so if you are planning to transfer your NURBS definition to another application, you could conceivably encounter a problem requiring some sort of workaround. The second comment is that it seems generally appropriate to use multiple knots to represent surface discontinuities when they extend over some significant portion of the model such as in a chine. It might be more appropriate, however, to use multiple net vertices when the discontinuity is local to a point such as at a transom corner or deck knuckle.

Figure 14: Boundary Conditions and Discontinuities

A Summary of Important NURBS Properties

A summary of the most pertinent NURBS properties is given below. These are the major points which should have been absorbed in the preceding discussion:

µ The surface generally follows the shape of the defining control net. In fact the control net can be thought of as a caricature or exaggeration of the surface it defines. Thus if there are inflections in the net there will be inflections in the surface. Taken a step further, if we wish to have a "fair" hull, we must also have a "fair" net.

µ B-Spline surfaces possess a convex hull property as follows. Consider a B-Spline surface of order k in one parametric direction and order l in the other. Create a convex hull by taking k by l neighboring vertices in the defining control net. Perform this for all possible groupings of k by l vertices and create a composite convex hull consisting of the union of all of these "sub-hulls". The B-Spline surface defined by this control net must lie withing this composite convex hull.

µ The influence of any single vertex in a defining control net is limited to plus or minus the surface order / 2 in either parametric direction. µ The surface is invariant with respect to an affine transformation. An affine transformation can be thought of as one which preserves ratios such as moving,

scaling, and rotating. In other words, performing any affine transformation to the control net transforms the underlying surface in exactly the same way. µ Surface continuity within an interval is equal to the surface order - 2 in each parametric directions. In fact, if there are no multiple vertices and no multiple knot

values, this continuity is guaranteed across intervals as well. µ A multiplicity of net vertices or a multiplicity of interior knot values reduces the guaranteed continuity across the associated intervals by one order each. Thus,

having a multiplicity of net vertices or knot values equal to the degree of the surface in a particular parametric direction, permits the introduction of a slope discontinuity also known as a knuckle to the naval architect

µ A B-Spline surface is coincident with the defining control net vertices at the corners of the surface; furthermore, the surface approaches each corner with the edges tangent to the control net legs extending from that corner

µ In order to precisely represent circular cylinders and other conics with a NURBS surface, it is necessary to adjust the vertex weights. However, one can come arbitrarily close without adjusting vertex weights, but instead by adding rows or columns of net vertices.

µ A B-Spline surface of given orders can always be represented by an equivalent surface of greater orders but not generally by a surface with lower orders

Bruce Hays ([email protected])

George Hazen ([email protected])

Page 66 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 67: ~hh8476

Proteus Engineering

345 Pier One Road, Suite 200

Stevensville, MD 21666 USA

Tel +1 (410) 643-7496

Fax +1 (410) 643-7535

http://www.proteusengineering.com

1 Introduction

Often in the course of hull design the problem of re-creating an existing set of offsets arises. This problem can take on many different characteristics, depending on the goal of the re-creation, the origin of the offsets, and the tools available to tackle the job. All of these must be taken into account in developing the best approach to solving the problem in the most efficient manner.

It is a common assumption that there is an automatic mathematical solution to this problem, which given a set of offsets in a format familiar to naval architects, will automatically produce a fair surface which can then be used for modification, development of frames and plates, and analysis such as hydrostatics and finite element analysis. There are programs which claim and attempt to do this, and at first glance seem to succeed. In fact, this approach almost never yields useful results. We will discuss why this is the case, and why an approach based on manual and semi-automatic methods is very productive. We will first examine some of the issues regarding the surface mathematics being used, then describe some of the different characteristics of the basic problem, and finally discuss some successful as well as some less successful approaches to solving them.

2 Surface Mathematics

The process of automatic or semi-automatic fitting of a surface to offsets requires some sort of mapping of each offset point to a corresponding point on the surface. One approach that has been used is to first fit a spline to stations, thus mapping the offset points to points on the splines, and then to pass longitudinal splines through these station-wise splines to define the hull. Often this method uses interpolating splines in either the station-wise, longitudinal, or both directions (interpolating splines are splines in which the curve passes through the control vertices). In this case, each offset point on a station would be a control vertex, to guarantee that the curve would pass through it. The problem arises in the oscillatory nature of these splines, which means that although the curve will pass through the offset points, it may oscillate between them. Even if the stations are fit with approximating splines, the same problem can arise in the longitudinal fairing, which may contain oscillations. Also, this process tends to fair across any features such as chines or knuckles, losing these features in the process. In summary, if interpolating splines are used, and control points are placed on the offset data points, the match to the offsets might be good, but the surface may well oscillate in a non-fair fashion in-between the offsets. Put in terms of the problem at hand, matching the offsets of stations is not enough if the stations and the surface between the stations is not fair. Approaches that rely on interpolating splines suffer from this problem; it may be relatively simple to match the offsets on frames, but achieving the offsets together with a satisfactory overall shape can be considerably more difficult. Also, defining the splines, and hence the cross-fairing

longitudinals, on offsets that are organized in a pattern that does not define or describe the topology of the hull will ultimately fail, because either the features will be lost, or the resulting surface definition will be overly complex.

This discussion focuses on the use of a NURBS-based hullform design program, where the surface is defined by a "control net", together with a knot vector. A NURBS control net is a grid of vertices, arranged in a series of rows and columns that explicitly define the surface shape. In Figure 1, a typical ship hull control net is shown in the upper half of the screen, consisting of a main surface with 14 columns and 15 rows (three rows are coincident at the knuckle near the main deck), and two smaller bulwark surfaces. The main surface therefore has 210 control vertices. The lower half of the screen shows a planview of the forward portion of the net and the resulting surface.

NURBS surfaces have two important properties that directly impact the task of offset re-creation. First, they are "approximating" spline surfaces, which means that the surface does not, in general, pass through the control vertices (the surface and control vertices usually do coincide in the corners of the control net). This can be seen in the lower half of Figure 1, where the planview of the control net and surface do not coincide. This means that simply placing control vertices on the offset locations will not result in a surface that matches the offsets. However, this same property avoids the tendency of oscillation that interpolating splines display. The use of NURBS surfaces can make satisfying both requirements more tractable.

The second important feature of NURBS surfaces is that of "local region of influence". This means that any control vertex does not influence the entire surface (except in very simple surfaces, which would not have enough control to realistically define a hullform). With cubic surfaces, which are most commonly used for hull design, each vertex influences the surface two vertices away from itself. Beyond that point, the vertex has no influence (with interpolating splines, this is not the case, and modifications made to the bow of a hull can change the shape of the stern). This feature has the advantage that any change made to the surface is somewhat localized, and is faired in nicely over a region of the surface. However, if the control net is made too dense, the area over which a change to the control net is faired in can become too small, and local unfairness may result. Therefore it is advantageous to work with as simple a control net as possible.

3 Description of the Problem

3.1 The Goal

The first question that must be asked is what the surface that is being fit to the existing offsets will be used for when it is completed. Some of the possible uses for the surface, and their requirements are shown in Table 1.

Table 1: Surface Uses and Requirements

Use of the Surface Requirements

Construction (lines, frame and plate definition).

The final surface must be extremely fair. Therefore, if the surface matches the offsets exactly, the offsets must be extremely fair to begin with. Otherwise, the surface should be

Page 67 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 68: ~hh8476

Two important questions arise from these considerations:

1. Should the offsets be exactly matched or should they be faired? In the next section we will discuss the origin of the offsets, and their assumed quality.

2. How dense a control net can be tolerated? If the surface is to be used only for interrogation (cutting sections, measuring hydrostatics, measuring surface properties, lofting plates and frames), and will not be modified further, a net that is too dense for manual modification may be acceptable. Otherwise, the control net that is created must be reasonable in the quantity and placement of the control vertices.

3.2 The Offsets

Knowing the source and quality of the offsets to be matched is very important, as well as having access to the original source to check offsets and to get more data.

Offset Quality

The quality of the offsets that are being matched is very important in the process of re-creating the hull. Are the offsets measured from an existing hull or from a lofted book of offsets? If so, it might not be unreasonable to try to match them very closely. On the other hand, if they are measured from a scaled lines drawing, they are not likely to be entirely fair or accurate. In this case, you probably do not want to match them exactly, but rather want to design a fair surface that is "somewhat" close to the offsets. In other words, fairness of the surface is the overriding requirement.

In many cases, a book or file of offsets will contain erroneous data. This data must be either removed or corrected so that the error does not influence the final surface shape. Having access to the original set of lines can be very important in this case.

Offset Format

Often the offsets being used in the matching process are only frames or stations. Stations can do an adequate job of describing the shape of a hull in the midship area, where the waterlines are mostly parallel to the centerline. But in the ends of the vessel, where the shape is changing rapidly as one moves forward or aft, stations are not the best way to describe the shape. Stem and stern profile shapes are especially poorly defined using only stations. If possible, the offsets that you work with should include the centerline profile, waterline endings at both ends of the vessel, and offsets of any chine or knuckle in the hull, as well as feature lines such as the flat-of-side and flat-of-bottom. The human eye is remarkably adept at seeing knuckles and feature lines in station offsets, even when they are not defined explicitly by curves. The computer is just as remarkably poor at finding these features when they are not defined explicitly.

Time spent preparing the offsets to be used in the re-creation process is time well spent. Make sure that the data is error-free, and that the vessel is well defined by the offsets, especially if it is critical that the offsets be matched closely. Your trained naval architect’s eye may be able to easily interpolate the shape of the hull from a small number of offsets, but the computer will not be able to do so.

4 The Problem with an Automatic Approach to Surface Fitting

4.1 Overview

Many programs and algorithms exist for "skinning" a surface through a series of offsets, including most major CAD systems, such as ProEngineer™, Autodesk’s AutoSurf®, Intergraph EMS™, as well as some hull design programs. Why not just push the button in one of these programs and call it a day? After all, they claim to create a surface that passes through the given offset points, and NURBS mathematics tells us that a surface can be found that will pass through each of the offset points. This is a classic case of "when things seem too good to be true, they usually are".

The first problem with this approach is that it assumes that the offsets completely define the hull, and that they are perfectly fair (a rare case indeed). Even if the offsets are fair and very complete, they are usually organized in a station-wise fashion, which is not consistent with the manner in which points on a surface are distributed, especially in the ends of the hull. This can cause surfaces that are unnaturally contorted, as in Figure 2.

The second problem is that the surface that results from such a process is usually far too dense to allow any reasonable modification by hand (in the extreme, a direct solution of a surface to match a set of offsets creates a control vertex for every offset point). So if you want to change the surface because it suffers from the use of incomplete, inaccurate, or unfair offsets, it is impossible to do so in a practical manner.

Finally, as mentioned previously, it is very difficult for automatic methods to find topological features such as chines, tangent lines, etc. These important features of a hullform are usually lost during a fully automatic re-creation process.

faired knowing that the offsets will not be exactly matched (also known as lofting).

Computing intermediate sections, for example for use in other programs such as finite element analysis or hydrostatics, where fairness is not a high priority.

The surface can be a close or exact match to existing offsets, without worrying about how many vertices are used in the control net to describe the surface, since the surface will not be modified, and fairness is not critical.

Design, where the hullform may change as the design progresses.

Fairness of the final surface is more important here than an exact match of the offsets, since the hull may change anyway. Also, the control net must not be too dense, so as to be manageable for further modification.

Page 68 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 69: ~hh8476

Figure 2 shows a surface that was created by automatically skinning a set of offsets, on a relatively simple hull with no distinct features such as chines. The upper half of the screen shows the resulting control net, with 4850 vertices (a similar hull designed from scratch might have 100 vertices). The lower half of the screen shows the surface that results. The figure shows the overwhelming density of the control net, the fundamental unfairness of the surface, and even a control vertex on the wrong side of centerline. Even with all of that, the lower half of Figure 3, which shows sections cut through this surface, is striking in how reasonable it looks at first glance, and how close the fit is to the original offsets. However, close inspection of these sections reveals that they are not fair and could not be used in construction. This dense control net could be used for interpolation of more frames for use in finite element analysis or hydrostatics, where fairness and accuracy are not critical, but is far too dense to allow for practical manual modification.

4.2 Curve and Surface Fitting

Why do these automatic methods fail? In order to better appreciate the difficult issues involved in surface fitting, it is useful to compare and contrast this activity with the more common and well understood process of fitting analytic curves to point data.

It is commonly assumed that the only input required to successfully fit point data with a curve is the set of points themselves. Perhaps such a notion is a holdover from graphing exercises in school when the student was given ordered pairs of numbers to plot. What is readily overlooked is the implicit assumption that these pairs of numbers are presented in a meaningful sequence thus indicating the connectivity between points. Once the curve fitting exercise is reduced to a numerical procedure this implicit sequencing is typically codified as a monotonically increasing parameter. Here the curve fitting practitioner starts making assumptions that are not explicitly contained in the data he has been given to fit. At a minimum, he must answer the following two questions:

µ What sort of function should be used to interpolate or approximate the data? µ How should parametric values be assigned to the individual data points?

Polynomials and piecewise polynomials (splines) are frequently chosen candidate functions for fitting because of their versatility, well know properties and computational efficiency. In special cases, where there is a foreknowledge of an expected functional relationship between the points to be fit, the appropriate functional form can be used. Though picking an appropriate functional representation often receives the greatest amount of consideration, frequently it is the assignment of parametric values that determines the ultimate success or failure of the fitting exercise.

Mathematically our only requirement for this assignment is that our chosen parametric values increase monotonically as we travel from point to point in the desired sequence. Typical choices for this parametric assignment are based upon sequence number or spatial distances between sequential points. For nearly evenly spaced data sets there is little discernible difference between the geometric representation of curve fits using either of these parameterizations, but when the spacing is irregular considerable differences result. It is up to the practitioner to decide whether or not the resulting curve is an appropriate functional representation of the data. This subjective appraisal is true whether or not the point data was interpolated or approximated — this is the hidden reality of fitting functions to point data; someone has to be responsible for deciding whether the geometric properties of the resulting function represent the implicit character and form desired!

The ambiguities to be resolved when curve fitting data seem minor when compared with these same considerations as manifest when fitting data to functional surfaces. This is especially true when those surfaces are intended to be general enough to capture all of the geometric diversity found in naval architecture. In order to offer concrete examples of both the problems and strategies to overcome them, we will limit the following discussion to surfaces with two independent parametric variables.

Once again, the surface fitting practitioner must choose an appropriate class of function for the job. In the case of a tensor product NURBS surface, this means choosing the degree and the number of defining control points for the splines in each independent direction. Though the degree and number of spans in each parameter need not be the same, the grid of control points must be rectangular; i.e. each control point can be thought of as belonging to a particular row and column. This observation leads directly to the realization that surface fitting is nearly always a task of approximation rather than interpolation, since interpolation requires that the input data also be rectangular. Certainly ship offset tables seldom meet this requirement, so a least-squares approximation to the input data is formulated instead.

When considering a NURBS surface approximation to a point data set, our intrepid surface fitter must once again begin by assigning parametric pairs to each point in that data set. Here simple algorithms can rarely be formulated which are generally applicable. Attempts to use girth based parametric assignments typically fail unless all of the data points can be organized into rows or columns. To escape the requirement for a rectangular input matrix of data points, the rows or columns can be curve fit first and then each resulting curve can be evaluated at a consistent number of points along its length. In naval architectural practice, this typically involves fairing transverse sections and then interpolating longitudinally. Notice that this cross-fairing approach requires that each curve be assigned an appropriate parametric value. Though the practice of cross-fairing between stations and iso-girths has had many practitioners, it has enjoyed limited success, frequently requires exhaustive data preparation and utterly fails when confronted with all but the most straightforward hullforms.

Once again the success or failure of our attempts to fit functional surfaces to point data is not so much determined by our mathematical methods, but rather by our ability to capture the essential topology of the surface. Fitting common geometric features including chines, bow and stern bulbs, and embedded surface flats all requires a heuristic understanding of naval architectural practices and purpose. Such an adaptive topological understanding is beyond the ken of automatic fitting algorithms, but not the naval designer.

Thus, the most effective surface fitting can be achieved by including the naval architect/surface designer in the process. With a ‘candidate’ surface provided by the designer that includes all relevant topological features, the data set can be projected onto this surface where the implicit parameters can be evaluated and assigned to each data point. Now that each point in the data set has both Cartesian and parametric coordinates, a least-squares fit solution can be computed for the surface control points. Such a scheme allows and encourages the designer to further modify each successive candidate surface and then repeat the fitting process until a satisfactory surface model is produced. This process, which can be considered to be semi-automatic surface fitting, will be discussed further in the next Section.

5 The Manual and Semi-Automatic Approaches to Fitting

There is a better, more practical approach to the re-creation of offsets. With FastShip, we have provided a number of tools to make the process as easy and efficient as possible, while creating useful, practical results. These tools can be divided into two categories: manual fitting tools, and semi-automatic fitting tools. Although these tools are not an automatic, instant solution to the problem, they represent significant capability to realistically and efficiently solve the problem of re-creating an existing

Page 69 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 70: ~hh8476

set of offsets.

5.1 Manual Fitting/Fairing

The basic approach to re-creating a set of offsets is to manually create a surface, and compare it to the target offsets, and refine it as necessary until a satisfactory match is achieved. With this approach, the designer can build a surface that has the correct topology (chines, knuckles, circular bilge turns, conical bow, straight sections, parallel midbody, etc.), without relying on an automatic program to discern all of these features from the offsets. An important part of this process that it gives the designer the ability to make the tradeoff between matching the offsets and assuring fairness, selectively ignoring offsets when appropriate. This is why this process is referred to as both "fitting" and "fairing".

FastShip supplies a number of important tools to help with this process:

µ Display of offset data and/or markers superimposed on surface

Any offsets can be displayed on the screen superimposed on the surface, and sections of the surface being designed at the same locations as the target offsets. This gives immediate display of the differences between the offset file and the surface being designed.

µ Real-time editing

To help speed the process of modifying the surface to match the offsets, FastShip displays the sections rubberbanding in real time as the control vertices are moved. With this capability and the display of offsets, the designer can interactively position the control net vertices to give the best match to the offsets.

µ Global dragging with multiple viewports

Interactive editing is further enhanced when the surface and offsets can be viewed in multiple viewports, to show different views of the hull at the same time. With Global Dragging, the real time rubberbanding is displayed in all viewports.

µ Measurement tools

FastShip allows the designer to measure the absolute location of any point on the surface, as well as measuring the distance between an offset and a point on the surface. Also, hydrostatics can be computed almost instantly, to give information on whether the surface has the intended volumetric properties. Fairness can be measured by surface curvature and curvature along any section.

µ Double-net function

There are times when more control vertices are needed in a portion of the surface in order to give enough control to match the offsets in that area. At any time in the design process, a new "row" or "column" may be added into the control net. However, this has the disadvantage of changing the shape of the surface. To solve this problem, FastShip has a function that can double the number of rows or columns (or both) in the surface, without changing the surface shape. While this adds to the complexity of the control net, it also greatly increases the amount of local control. This function can be used together with the split-net function, which allows a portion of the surface to be split off as a separate surface. The double-net function can then be used on just the portion of the surface that has been split, so that the remaining portion of the control net does not become more complex.

µ Macro to report offset differences

FastShip provides a macro to print a table of offsets, together with the "error" between the surface and the target offsets, including a least-squares summary. Also, an error-band summary is given, tallying the percentage of offsets within given error tolerances. This error-band approach is sometimes used as the specification for how close a given set of offsets must be matched.

In its most basic form, this manual process begins with a "flat sheet" of NURBS surface, which is then stretched and molded to create the desired shape, with additional control vertices being added as necessary as the design process continues. The time spent in reproducing a hull can be significantly reduced if an existing surface in the designer’s library has a similar topology to that of the offsets being re-created. For example, most container ships are topologically similar; they are single screw, have a flat-of-side and -bottom, circular bilge turn, bulbous bow, and bulwarks. Even if an existing surface is not close to the same size as the target offsets, if it has the correct topology, it can be quickly scaled to a new size, and the surface can then be locally modified to match the target offsets.

5.2 Semi-automatic Fitting

FastShip includes a function ("fit-surface") to automatically modify the control net so that the surface matches the offsets in the best least-squares sense. With this function, the designer first creates a surface that is close in shape to the offsets, with the necessary topological features (chines, etc.). This function works quite well in areas of the surface that do not contain discontinuities, such as tangent lines and chines. However, it can produce unpredictable results near the edges of surfaces, so the designer should manually fit the edges of the surface and any interior feature curves such as tangent lines and chines. Then these areas of the surface may be excluded from the fit-surface process with the freeze-net function before proceeding with the fit-surface function.

The fit-surface function does not add or delete rows or columns in the net; it only moves existing control vertices. This maintains the density of the surface, so that an overly complex surface is not created (as was the case in Figures 2 and 3). It can be selectively applied to only portions of the surface, so that if one area needs to have a very close fit, while another area does not, it can be used only on the appropriate portion of the surface.

The fit-surface command is most effectively used in an iterative process, alternating between the designer’s fairing and the computer’s fitting. Fairness is therefore still in the hands of the user, with the usual tools for measuring fairness (curvature measurement along curves, surface curvature measurements, etc.). If the result of a fit-surface command fits the offsets well, but is not fair in the designer’s opinion, the operation can be reversed with the Undo command. An even better approach is to modify the new surface by hand with fairness as the constraint, and then to run the fit-surface command again (the fit-surface command can take between 3-20 seconds, depending on the speed of the computer, the density of the offsets, and the complexity of the surface). This process can continue as long as is necessary to successfully make the tradeoff between the matching of the offsets and the fairness of the surface.

6 Summary

The creation of a surface to match a set of offsets is a complex problem with many different facets. It is not really a single problem, but many different ones, each with its own set of inputs, constraints, and desired results. Rarely do these combine to create a situation where a totally automatic solution is satisfactory.

Spline-based solutions have a tendency to create over-defined models, which can contain oscillations that are difficult to remove even manually. They also can fair over and lose features in the surface, and for these reasons, they are an unsatisfactory solution in an automatic, semi-automatic, or manual mode.

NURBS surfaces, when used in a fully automatic approach, can also suffer from over-defined models, and the loss of key topological features in the surface. The best solution to the re-creation of offsets is a semi-automatic method using NURBS surfaces, where the designer creates a surface with the correct topology, which the computer then modifies to create a best fit to the offsets.

It is important that the designer understand the source and quality of the given offsets, to know whether it is important or even possible to exactly match them (why match a set of offsets exactly if they have not been faired already?). If the surface is to be used only to compute sections to be used for hydrostatics calculations, fairness is a low priority, and accuracy is not too important as long as the integrated properties (volume, center of buoyancy, etc.) are matched.

Page 70 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm

Page 71: ~hh8476

Usually, fairness is the overriding requirement in the process, which means that the target offsets may not be matched exactly. In this case, manual and semi-automatic approaches are the most productive, producing surfaces that can be faired reliably and modified easily.

Page 71 of 71FastShip 6 Tutorials

28-08-2013file:///C:/Users/sarat/AppData/Local/Temp/~hh8476.htm