Vous êtes sur la page 1sur 26

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

Surfaces can be classified into two groups under NAPA: A surface can either be a general surface, in which case the surface is defined by a set of curves (grid) or it can be a special surface, for example, a plane, a cylinder, a sphere, etc. Hull surfaces are typically general surfaces, and most of the surfaces needed in the internal geometry are special surfaces. We will concentrate on the theory of surface definition. In this chapter we will continue to define the patrol boat hull using the Geometry Window. General properties of the Geometry Window tool will also be discussed. In the following chapter we will create a couple of simple fore and aft bodies in order to give some ideas for sample grids for different types of hull forms.

6.1 General surfaces


The syntax of a general surface is: SUR THR [OUT name 'descr. text' curve1, curve2, curve3, ... x, y or z]

If the outside of the surface is not defined, NAPA uses OUT Y as a default which, at least regarding normal hulls, is nearly always the right selection. The information about the orientation of the surface is required when defining rooms. Let us have an example. We have created a surface named CSUR - as illustrated in the next figure - consisting of five curves, C1 ... C5. We can check the definition with the command DES *CSUR, in which the *-symbol means 'show also the curves the surface is referring to'. The command gives us the following printout, showing us how the surface was defined. CUR XY CUR XY CUR YZ CUR YZ CUR YZ SUR, THR OUT, C1; Z, 0 (70, 110), (100, 130), (140, 140) C2; Z, 10 (70, 175), (100, 195), (140, 205) C3; X, 70 C1, C2 C4; X, 100 C1, C2 C5; X, 140 C1, C2 CSUR, P C1, C2, C3, C4, C5 Z

It is recommended that all intersections between curves are explicit, i.e. one curve references the other. Otherwise, the intersection points have to be found geometrically, and this may fail in some cases. For example, the following definition would not necessarily work because there are no explicitly defined intersection points between curve C1, C2 and C3. CUR XY C1; Z, 0 (70, 110), (100, 130), (140, 140)

1 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

CUR XY CUR YZ etc.

C2; Z, 10 (70, 175), (100, 195), (140, 205) C3; X, 70 (110, 0), (175, 10)

To NAPA they just seem to have the same coordinates at their end points, and without a direct reference to each other, NAPA interprets the situation in just this way. The same applies to point objects. Two or more curves can have a point object as their definition point, but to NAPA there is no intersection point between them unless the second curve refers to the first curveby means of the syntax CURVE1/POINT. The previous example had a surface with two PATCHES. A patch is the finite element of a surface, and the surface is just a collection of patches. A patch is an area which is limited by the nearest curves in the GRID. A grid is a collection of curves used in general surface definition. The patches always have four sides. If the surface element has more than four sides, it has to be divided as presented by the figure below. This is done automatically at preparation, but for high quality fairing it is not recommended to rely on this automatic function, as the division may not be the best one.

A patch is mathematically described by the coordinates of its corner points and by the angles from each corner point along the sides and across the surface. In total 48 parameters are needed to describe each patch. The parameters are: corner points (x, y, z) 3 x 4= 12 corner derivates (dx, dy, dz) 2 x 3 x 4 = 24 cross derivates (dx, dy, dz) 3 x 4 = 12

In the case of triangles, there are two alternatives for defining a surface. As a default, the patch is considered to have four corner points, two of which coincide. The patch can optionally be defined with a virtual corner point outside the patch area. The patch can then be considered as a four-sided patch with a restricted area. The genuine three-sided patch gives, in general, a better fairness in relatively flat areas, while the default method is recommended for highly-curved places.

2 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

After the grid has been defined, it is time to check the results. Three very important commands for this, will be explained here. Note that the same functions as performed by these commands can be achieved using the Geometry Window. UPD {surface} updates all grid references. For example, if curve C2 referring to C1 and C1 had recently been changed, curve C2 would be updated with the command UPD C2 or UPD CSUR. PRE {surface} prepares the surface for a patch representation. Practically speaking, it could be said that NAPA creates a mathematical representation of the patches. SEC {surface} marks the surface to be intersected, which can then be drawn in several ways. For example, using commands: X D=0.5 draws sections in direction of X with an increment of 0.5 m Y (0.6 7 0.2) direction Y ; from Y=0.6 to Y=7 ; increment 0.2 m X #16 frame number 16 (frames defined in the reference system) The following provides two examples of surfaces. These examples, however, are though quite theoretical unless there is a real connection to practical hull definition. Even so, it isIt is recommended to examine these before continuing to hull definitions. CUR YZ CUR YZ CUR XZ CUR XZ SUR, THR OUT, C1; X, 0 (0, 2), (10, 2) C2; X, 10 (0, 5), (10, 5) C3; Y, 0 0/, C1, C2 C4; Y, 10 0/, C1, C2 SUR1, P C1, C2, C3, C4 +Z

CUR YZ CUR

C5; X, 0 (0, 1), (10, 1) C6; X, 3

3 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

YZ CUR YZ CUR YZ CUR YZ CUR XZ CUR XZ SUR, THR OUT,

(0, 1), (10, 1) C7; X, 6 (0, 2), (10, 2) C8; X, 7 (0, 5), (10, 5) C9; X, 10 (0, 5), (10, 5) C10; Y, 0 <> C5, C6, C7, C8, C9 C11; Y, 10 <> C5, C6, C7, C8, C9 SUR2, P C5, C6, C7, C8, C9, C10, C11 +Z

Let us now make some practical surface definitions by finishing the grid for which main curves were defined in the previous chapter. It is possible to define the surface already at this stage, but the surface would probably become quite unfair because NAPA would have to divide the large area into several four-sided patches. NAPA's logic concerning how a surface has to be split does not necessarily fit in with the designer's idea of the surface. We can, however, take a look at how the surface would behave in this case. In the PATROL version of project P1234 we open up the HULLF surface in the Geometry Window.

6.1.1 Updating the HULLF


We select a curve by clicking with the middle button (or with the left and right button simultaneously on a two-button mouse) on the curve. The name of the selected curve can be found in the Object box and the name of this object's parent in the Main Object box.

4 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

By clicking on the green update button next to the Main Object Box, the main object, which is a surface, will be updated and prepared. After the surface has been prepared, it is possible to plot the patch structure of the surface and its intersections. Let us then update the surface by pressing the Update button . To see the result, we will have to will have to be pressed before

choose to see the surface as well as the grid. The blue plot surface button

down. To see the x-sections of the surface, we should also press down the x-sections button we click on the draw button .

Note: Please keep an eye on the main window, as the preparation diagnostics appear there.

Note that the surface will be filled with a brown colour, and that the default increment between the x-sections is 1 metre. To change the drawing properties we can click on the Edit Drawing Properties button to open the drawing properties dialogue.

Here you can turn off the filling used for the plotting of geometric objects by clicking in the check-box of that row. On the X Sects tab you can change the intersection interval to 0.5 metres. After closing the properties dialogue you will have to click on the draw button again.

5 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

The problem with this surface is the big area lacking control in the middle. There can be many approaches of to filling up the area with nice square like patches. Depending on what our starting point was, we might continue with water lines here as our main source of form for the surface, or we might continue with some frames. In this example, we will continue with some frames that will be connected by longitudinal secondary curves.

6.1.2 Entering frames curves


The next problem now is to select which frames to enter into our surface. Starting from the main frame (FRF), it is good to enter a frame quite close to the main frame. This is very easy to define, as it very seldom needs any points other than the reference to the flat of side and the bottom tangent. The idea behind such a curve is to stabilize the longitudinal curves (that will be defined later) and to give them a good direction when coming into the bilge radius. The next frames will be chosen on the base of the areas that need support in the surface. These are the end points of the FSF and the FBF. Using the curve/curve syntax, these curves are defined as being locatad at the x-planes in the end points. Please note the reference to the points in the form of the curve. Both frames have been given two explicitly defined points, to give them the required shape. The curves are added to the curve and surface definitions in the text editor. If the text from the earlier session was not saved, it is possible to recreate the definition from the curves in the data base by loading the definitions into the work area. This is done by writing >**HULLF into the object combo box. (See chapter 3 page 36 for an example) Then we continue... ... CUR YZ CUR YZ CUR YZ FRF1; X 18.5 FBF, FSF FRF2; X FSF/DECKF FBF, (2.17,0.6), (2.73,2.25), FSF/DECKF FRF3; X FBF/STEM FBF/STEM, (0.83,0.85), (1.46,2.63), DECKF

SUR, HULLF, P THR FRF, STEM, DECKF, FSF, FBF, SN, FRF1, FRF2, FRF3 OK Clicking on the run button of the text editor and the draw button in the Geometry window will show us the result:

6.1.3 Creating longitudinal lines


The next step in the process is to plan the longitudinal curves to be used. By looking at the grid in projection X, we can do the initial planning. We know from the patch theory that the longitudinal curves should intersect the frames near the definition points and should connect other 'free' points of the grid into the surface.

6 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

Starting the planning we can 'see' three possible locations for longitudinal curves:

To create these longitudinal curves, we could enter the coordinates in the same way as when creating the frames, but there is a more interactive way to do so using the Geometry window and its clipboard facility. Let us first locate the clipboard and try out its functionality before we define the longitudinal TF curves.

The clipboard of the Geometry window is located at the end of the second row of tools in the tool bar area. Each time you click on the drawing area with the left button of the mouse, the coordinate pair representing the position of the cursor in ship scale will be entered into the clipboard. Selecting a curve with the middle button will enter the name of the curve into the clipboard. Clicking on the big red cross will empty the clipboard. To enter the TF1 curve into our surface definition, we will start by defining the beginning into the editor: ... cur tf1 yz Then we will work with the Geometry window and show the coordinates of the location surface. This is done by first clearing the clipboard and then clicking on the drawing, which should be in the X-projection. Because of the X-projection, the coordinate pairs will be YZ.

As we now have the two coordinate pairs needed for the location surface in the clipboard of the Geometry window, and as they are selected, we can paste them into the required position in the text editor simply by locating the cursor in the wanted position and clicking on the middle button:

7 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

cur tf1 yz (-0.101 1.003) (2.821, 0.473) xy *hullf To finalize the definition, we have added the line 'xy *hullf' to the editor. The form of the TF1 curve will be taken as a reference for all curves in the HULLF surface. When this is run, NAPA will open up the definition of the *HULLF statement and replace it with the curves of the surface that are in fact intersected by this location surface. To see and append the curve as it has been defined to the surface we can use the >TF1 syntax in the combo box of the editor or we can press the append definition button and select the TF1 curve. ... cur tf1 yz (-0.101 1.003) (2.821, 0.473) xy *hullf SUR, HULLF, P THR FRF, STEM, DECKF, FSF, FBF, SN, FRF1, FRF2, FRF3 OK CUR YZ, XY TF1 (-0.101 1.003) (2.821, 0.473) FRF, FRF1, FRF2, FRF3, STEM

As you can now see, the curve will be appended at the end of the work area. Using cut and paste techniques we can move it up and place it before the surface definition. At the same time, we can edit it. For example the first position in the location surface (-0.101 1.003) can be replaced by an exact reference STEM/Z=1. The curve TF1 is also added to the surface. CUR YZ, XY TF1 STEM/Z=1 (2.821, 0.473) FRF, FRF1, FRF2, FRF3, STEM

SUR, HULLF, P THR FRF, STEM, DECKF, FSF, FBF, SN, FRF1, FRF2, FRF3 TF1 OK Using the same technique, we will add the curves TF2 and TF3 to the surface. NOTE: Use of the curve/curve syntax to make exact positioning of the curves after the initial mouse positioning. To make the forward end area work better, we will also add some angles in and around the stem area. Esspecially note the technique of entering the soft nose curve (SN) with a free angle and continuing into the stem curve with a 90 degree angle. CUR YZ, XY CUR YZ, XY TF1 STEM/Z=1,(2.821,0.473) FRF, FRF1, FRF2, FRF3, -25/, STEM TF2 STEM/SN, FRF/FSF FRF/FSF, FRF1, FRF2, FRF3, STEM/SN

CUR TF3 YZ, (-0.051, 2.885), (1.513, 2.609), (2.78, 2.22), FSF/FRF1 XY FSF/FRF1, FRF2, FRF3, -/, SN,-90/ STEM SUR, HULLF, P THR FRF, STEM, DECKF, FSF, FBF, SN, FRF1, FRF2, FRF3 TF1, TF2, TF3 OK

8 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

Examination of the fore body shows us that it now fulfils our requirements regarding this project .

6.1.4 Checking the surface using the Geometry Window


The upper row of tools in the tool bar of the Geometry Window is used to control the drawing properties of the drawing area of the window. Starting from the left, we have the Open button to open the active object for drawing Object combo box, where the name of the active object can be written or selected from the list of objects that have been active this session Plot the hull button to plot the surface. Note the default drawing property is to draw it with a brown filling.

9 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

Plot the grid, i.e. the curves that make the surface definition Show the definition points Show point objects Show names of curves Show x sections Show y sections Show z sections Show curves of equal inclination Show porcupine curves Show porcupines on the selected curve Erase the screen before drawing Draw the object with the selected features Edit the drawing properties

A good and simple way to check the fairness of a hull surface is to intersect the hull and to use the special feature of colouring according to the curvature of the intersections. In command mode the, command to set this up with is col *. Using the Geometry window, the same can be achieved by setting up the drawing properties. We click the Drawing properties button and select the X sections tab.

Here we can set the colour of the sections to section curvature and the step between sections to 0.1 When we now close the properties window and draw the picture again with the x-sections selected, we can see the curvature of the sections of the surface. The different shades of red and blue represent different levels of curvature. White represents straight lines within the tolerance.

10 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

6.1.5 Editing curves using the Geometry Window


Curves can be edited by editing the coordinates directly in the text editor through which we have done the definition, but the Geometry window can also be used to edit and modify curves directly. Editing of surfaces and curves is controlled with the tools in the lower row of the tool bar. Selecting of a curve to edit is done by pointing to the curve and clicking on the middle button of the mouse. The object to edit is shown in the object box.

By clicking on the 'edit object' button or the 'append object to editor' button a text editor window will open with the object definition in it. Changes in this window are activated by pressing the run button of the editor. Another way to edit the curve is to click on the 'Open curve editor tool' button. This will open the interactive curve editor:

The interactive curve editor allows the user to edit the curve by editing the points directly in the definition area of the window. By clicking on the apply button the change will be available in the drawing area of the Geometry Window. The Move button allows the user interactively to move explicit definition points in the shape of the curve, using a drag event. Before clicking on the Move button the projection should be set to X, as we will be moving YZ coordinates of this curve. By pressing the left button on the mouse and dragging we can move the explicit definition points. To end the 'move-mode', the right mouse button must be clicked on the mouse. The Add and Delete button can be used similarly. Please note that the current definition will also change in the text area of the curve editor window.

11 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

Note: as long as the curve editor window is open, all changes to this curve can be undone one by one by clicking on the undo button, or we can return to the original curve (before the editing session) by clicking the cancel button. More than one curve editor tool can be open simultaneously. After an interactive (or after any kind of change, in fact) we will have to click on the update button in the Geometry Window to have the secondary curves updated and the preparation done. Note: If a curve has been changed interactively with the edit curve tool, the text in the text editor is still unchanged. Use cut and paste techniques to update the text from the curve definitions into the text editor.

6.1.6 Creating the HULLA


We will define the curves of the aft ship in a similar manner as the curves of the fore ship. We will define the main curves of the aft ship in the text editor: cur yz sc cur xz cur xy cur xz, yz sc cur xz sc cur xy sur thr fra; x, 13 (0, 0), -/, (1.8, 0), (3, 1.2), /-, (3, 4.4) , m stern; y, 0 (-2.6, 4.4), -/, (-2, 2.2), /-, /-, -/, (2.7, 0), /-, fra decka; z, 4.4 stern, -/, (-2.6, 3), /-, fra transom (-2.6, 4.4), (-2, 2.2) stern/z=2.2, -/, (2.4, 2.4), (3, 3), /-, decka/y=3 , -//fsa; y, 3 transom/z=3, , p 0/, fra/z=1.2 -/, (1.8, 1.3),

fba; z, 0 15/, stern/x=2.7, (4, 0.3), /-, 0/, fra/y=1.8 hulla fra stern decka transom fsa fba

-/, (10, 0.3), /-,

In the following, two figures illustrate the definition of curves FBA, FRA and TRANSOM.

12 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

The usual method of defining a surface grid is to define all main curves first. In our case, the knuckle curve between the skeg and the rest of the hull has not yet been defined, so we will continue by defining this knuckle curve. This kind of hull with a knuckle between the skeg and the main surface, would be better defined as a trimmed surface, in which the skeg and the other part of the hull are first defined separately and then combined to form one surface. We will, however, define this hull in the traditional way, and will deal with an example of the trimmed surface later.

To be able to define the knuckle curve, we need to know the angle of the STERN curve between the transom and skeg. This can be checked with the command LIST STERN in the command input area of the main window. DEF?>lis stern LIST OF CURVE: STERN ************************************** X Y Z T SC -2.600 0.000 4.400 -74.75 -2.000 2.200 -74.75 -/ -13.32 /1.800 1.300 -13.32 -/ -55.31 /2.700 0.000 -55.31 -/ 0.00 /13.000 0.000 0.00 (M/)

REF.CURVE

FRA

13 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

cur ta1 xz stern/x=1.8, /-13.3 fba/x=10 xy 15/ stern/x=1.8 (3.1, 0.3) /- fba sc -//-

The next curve to be defined is the frame located at the end point of the skeg. Note that a free angle (-/) will be needed because the flat bottom is defined without the side condition P. We will start it from the STERN curve, as this will cut the flat bottom area into four-sided patches. cur fra3 x 10 yz stern -/ fba fsa

The next step to be taken is to define a frame at the starting point of the skeg. It is, however, impossible to define this curve without having some support for it. One possibility would be simply to add a point to the curve, but the point would need manual adjustment later at the fairing stage. A clearly a better solution would be first to define a space curve from the transom to the main frame and use it to give the needed support to the frame. cur ta2 xz transom/y=2.4 /-13.3 fra/z=0.6 xy transom fra3 fra

As we have now created space curve TA2, we can define curve FRA1 through this curve. The starting angle from STERN will be the same as TRANSOM (5 degrees). cur fra1

14 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

x 1.8 yz stern /5 ta2 fsa

Now it can be seen that we still have a couple of definition points in need of support. What we will do next is to define a 'frame' with a knuckle on its location surface. Below the knuckle line (TA1) the location surface will be inclined while above the knuckle it will be on the X-plane. One factor causing us some trouble is the angle at which the new frame has to enter TA2. If no angle condition is given, the frame would without doubt hang much too low in the area between TA1 and TA2. We could check the angles at which frames FRA1 and FRA3 enter TA2 and then, by trial and error, we could search for the right angle. But on the other hand, why should we do such manual work as we can let NAPA do the work for us? The easiest way is to define a tangent function for TA2 and then let the tangent function define the angle in question. tgf ta2 xt transom fra1 fra3 fra cur fra2 zx <> (4 0) ta1/x=3.1 (3.1 10) zy stern -/ fba /- ta1 */ ta2 fsa

Note that in the definition of FRA2, no free angles entering/leaving were needed when referring to curve TA1. This is because TA1 was defined with the side condition SC -//- (a knuckle). If, however, we wanted to define an angle condition at either side, then the side condition would be neglected and we would also be forced to define the free angle explicitly. For example ... -/, TA1, /15, ... The last thing we need to do to finish the grid is to split the five-sided transom into two patches in order to avoid the automatic splitting which takes place when a patch has more than four sides. If NAPA is allowed to take care of the splitting automatically, you cannot be completely sure about the result. cur ta3 z transom/fsa yx stern -/ transom sur hulla thr fra stern decka transom fsa fba ta1 fra3 ta2 fra1 fra2 ta3 ok

15 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

As the grid is now ready, it is time to check the fairness of the surface. This time we will use the command language to check the fairness of the hull. This can be done by drawing sections in different projections. The colouring with drawing command COL * is a very effective tool for the purpose. DEF?>upd hulla DEF?>pre hulla DEF?>sec hulla DR?>col *

Although the surface might still need some fairing before steel production, it is good enough for project purposes. We only need to define the parallel mid body and, after combining the parts, we have a completed hull to proceed with our project. Note that the FRA and FRF are already defined in the HULLA and HULLF definitions. cur clm; y 0

16 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

xz

fra frf

cur deckm; z 4.4 xy fra frf cur fsm; z 1.2 xy fra frf cur fbm; y 1.8 xz fra frf sur hullm thr fra frf clm deckm fsm fbm sur hull com hulla hullm hullf ok

Note that the combined HULL suface has to be prepared before we can use it for intersections etc. This can be done by writing HULL in the main object combo box and then clicking on the update button, or by giving the following command sequence in the command input area of the main window: DEF?>upd hull DEF?>pre hull

6.2 Some useful drawing commands


In this chapter will look at the commands that control graphics in NAPA. Most of the tasks can also be performed interactively through the Geometry Window, but the use of commands is necessary for writing macros. Note that in the following, the commands are explained very briefly. For a more thorough explanation, see the explanation texts with the command !EXPL or by using the Help Viewer. For the plotting of arrangement drawings, the commands SETUP and DRW are provided. SETUP defines a system of plans and generates a layout for showing them, while DRW draw objects in these plans. These functions are described in more detail in connection with the chapter 'Ship Model'.

6.2.1 Drawing environment


PROJECTION Defines how the 3D objects are projected onto the 2D drawing area. The main alternatives are: PRO X projection along the x-axis PRO Y projection along the y-axis PRO Z projection along the z-axis PRO A predefined perspective projection from aft PRO F predefined perspective projection from fore PRO phi,theta arbitrary parallel projection The projection can also be defined interactively (PRO I), in which case it can be changed by moving the mouse while the left button is held down. The object can be moved with the centre button of the mouse and the right button ends the interactive session.

17 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

SIZE

Generates the scale and position of a drawn result so that a given region in the ship coordinate system fits the screen. There are several ways to give the region: SIZE S size of the ship (from REF task) SIZE F size of the fore body SIZE A size of the aft body SIZE name size of the given object, e.g. SIZE HULLF SIZE xmin,xmax,ymin,ymax,zmin,zmax size given explicitly SIZE * size of the currently intersected object The command SIZE without any options shows the current setting. Starts a new drawing; it clears any graphics on the screen and resets all control parameters. It assigns a name to the drawing, which is relevant when storing it. For example: DRA FRAMES In the 3D mode, the internal graphics storage is maintained in a way that allows it to be adapted to the changed SIZE and projection. In this mode, these changes have immediate effect. Turns 2D mode on.

DRAWING

!VIEW 3D

!VIEW 2D

6.2.2 Output commands


PLOT An object can be plotted with the command PLOT (for example, PLOT STEM. When a surface is plotted, the patch representation of the surface will be drawn (for example, PLOT HULLF). Plot the grid curves of a surface, e.g. GRI HULLF Plot sections of the object(s) made active with the command SECT. For example: SECT HULL; X 50 Plot a given text at a given position. The text can be controlled by the commands TCOL, FONT and TH. Plot a figure (figure = a stored drawing) Plot a polygon through given points. For example: POL (1 2) (4 4) draws a straight line between the points POL / (1 2) (4 4) draws a box between the points POL : the points are to be shown with the mouse POL I the same as POL : but interactive Plot a coordinate grid. Plot a frame scale.

GRID X,Y,Z TEXT FIG POL

NET FSCALE

6.2.3 Drawing options (control commands)


COLOUR COLOUR * DASH THICKNESS FILL ID Set the colour of lines. For example, COL 2 or COL red Set a special colouring mode where the curvature is expressed in shades of red and blue. This gives a fast way of estimating the fairness of a curve or a surface. Set dash pattern, 1=solid line, 2,3,...=various patterns Set line thickness (1,2...) Fill colour for closed curves (colour index or logical fill code). E.g. FILL 3 or FILL c-hfo Identification mode. The most usual identification options are: ID P points, both defined and intersections ID D definition points ID NAME name of objects Second identification. The same as ID but two identifications can be used simultaneously. Cancel identification. Set text colour. Set font type.

ID2 ID OFF TCOL FONT

18 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

TH

Set height of the text.

6.2.4 General services


!ZOOM !SEND Zoom into the drawing. The zoom area can be defined explicitly (e.g. !ZOOM 20 25 5 15 10 15) or graphically with the mouse (e.g. !ZOOM : or !ZOOM I). Make a hardcopy of the current drawing or save it to the database. Examples: !SEND TO P1 !SEND TO IOF !SEND TO DB4 Several options available. See the on-line explanation text. In AUTO mode, curves are drawn automatically when defined or modified. Cancel AUTO mode. Show the current arguments.

AUTO AUTO OFF ARGS

6.2.5 Examples
The following example will create a profile view of our hull with buttock lines intersected at 10 cm intervals. Note that the drawing will be created in an active drawing area when the macro is run. If no drawing area is active, a separate default drawing window will be opened. dr sec hull pro y siz * y d=0.1 plo decka deckm deckf

Note the command SIZ * which was used above. This command sets the size of the drawing to fit the object currently selected for intersections (SECT HULL). In this example we will make a traditional frame drawing and send it turned to the default printer in scale 1/100. dr sec hull pro x ref x<15 siz * x d=0.5 y 0 !send d t scale=.01

19 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

We have used the command REF X<15, which means that all parts (both sections and curves) locating at x<15 metres will be drawn to the negative side of the y-plane as a reflection.

6.3 Special surfaces


In this chapter we will examine special surfaces of NAPA but with only a few words; the examples will speak for themselves. By default the special surfaces will be facet surfaces i.e. made out of straight plane parts. By using the option P when defining the special surface, the surface will be created as true PATCH surfaces.

6.3.1 Plane
The first special surface is a plane, which can be defined in many different ways. For example: PLANE P1 ; X 10 PLANE P2 ; THR Y (-3,0) (-1,3) Plane parallel with the y-axis, defined with two coordinates. PLANE P3 ; THR Y (-3,0) 56 Plane parallel with y-axis, defined with one coordinate and an angle (56 degrees). PLANE P4 ; THR (8,0,0) (6,8,0) (7,8,5) Arbitrary plane defined by three points PLANE P5 ; THR 5 -1 10 (Water) plane defined as draught, trim heel Plane parallel with a coordinate plane.

6.3.2 Cylinder
If the cylinder ends are closed, the optional CLOSE command adds the ends, making a closed surface.

20 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

CYL, TUNNEL AXIS, (74.2, -5, 1.4), (74.2, 5, 1.4) FORM, R=0.6 CLOSE

A cylinder can also be formed so that a curve, the generator, is moved along another curve, the base curve. The base curve can be defined as an independent curve or by an imbedded curve definition, as in the example below. CYL, Y, XZ, GEN, DECK -16 ><, (-5, 10), (100, 10), (100, 13), (130, 13) Y, 32

6.3.3 Double Cylinder


A double cylinder differs from a simple one in that the generator can also be curved. NOTE: The generator is placed so that its origin moves along the base curve. CUR YZ CUR XZ GENERATOR; X, 0 (-16, -1), (0, 0), (16, -1) BASE; Y, 0 (-5, 10), (50, 9), -/, (100, 11), /-, 14), /-, (110, 14.4), (130, 15) -/, (100,

DCY, DECK BASE, BASE GEN, GENERATOR

21 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

6.3.4 Tube
A tube object is formed when a given shape is moved along a given curve, turning the shape as the base curve turns. The turning makes this type differ from the double cylinder (DCYL). The tube object can typically be used to model tubes or ducts etc. A tube is defined by the records BASE + FORM, where BASE gives the reference curve and FORM the cross-section CUR BASE XYZ (0,0,0), (5,2,0), (10,5,5) TUB, BAS, FOR, TUBE BASE R=1

TUB, XYZ, FOR,

DUCT ><, (0, 0, 0), (10, 0, 0), (10, 0, 2), (13, 0, 2) /, (-0.5, -0.2), (0.5, 0.2)

6.3.5 Connection Surface


A connection surface is formed when points on two curves are connected pairwise. As with the other types, the curves can be defined separately (as in the example below) or imbedded in the surface

22 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

definition. For the connection surface to work, the curves must be sufficiently similar (analogous startpoints, same rotation direction). CUR XY CUR XY BASE1; Z, 3.8 5/, (-1.4, 0), BASE2; Z, 0.4 5/, (-1.2, 0),

-5/, (0.3, 0.15), -5/, (0.25, 0.13),

-90/, (0.6, 0) -90/, (0.5, 0)

CNS, CNSUR BASE, BASE1 BASE, BASE2

6.3.6 Sphere
SPH, SPHERE CENTER,(3, 0, 3), R=2

6.3.7 Rotation Surface


A rotation surface is formed when a curve is rotated around a given axis. By default, the base is rotated 360 degrees. Another angle can be specified in the AXIS command. CUR YZ BASE; X, 3 * 30/, (0.5, 0.5), (2, 4)

ROT, ROTSUR AXIS, (3, 0, 0), (3, 0, 10) BASE, BASE

23 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

6.3.8 Pyramid
A pyramid is formed when the points on a curve, the base, are connected to a given point, the top. If the base is closed, it can be included by adding the optional CLOSE command. If the base curve is a circle, the result is a cone. CUR XY BASE; Z, 0 * <> (2, 2), (6, 2), (6, -2), (2, -2), (2, 2)

PYR, PYRAMID BASE, BASE TOP, (4, 0, 4)

6.3.9 Facet Surface


A facet surface can be defined through a set of n*m points. Four neighbouring points are connected to the sides of a plane. A three-sided facet can be formed by adding coinciding points. If the points forming a facet do not lie on the same plane, a warning is given, but the result is accepted.

24 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

6.3.10 Examples (Patrol)


The following example defines the internal planes, cylinders and double cylinders that are used in the definition of the P1234 version PATROL. PLA, X, PLA, X, PLA, X, PLA, X, CUR YZ CUR XZ DCY, BAS, GEN, CYL, Y, XZ, GEN, CUR BH1 5 BH2 9 BH3 17 BH4 26 CAMBER; X 0 (-3.5,-0.15), (0,0), (3.5,-0.15) SHEAR; Y 0 (-3,3.8), /-1, (34,4.4) DECK, P CAMBER SHEAR TTOP -4 ><, (-3, 1.7), (5, 1.7), (5, 1), (9, 1), (9, 0.6), (26, 0.6), (26, 1.7), (35, 1.7) Y, +8 BRFOREBASE; Z 0

25 of 26

7/11/2012 11:21 AM

6 Surfaces

file:///C:/Napa/man/Man091/html/intro/surfaces/index.html

YX CUR ZX

(-0.4,-3), (0,0), (-0.4,3) BRFOREGEN; Y 0 <> (17.7,3.6), (17.1,5.6), (17.4,6.7), (17.1,7)

DCY, BRFORE BASE, BRFOREBASE GEN, BRFOREGEN CYL, Y, XZ, GEN, PLA, THR, BRAFT -3 ><, (8.9, 3.6), (10.5, 7) Y, 6 BRSIDE (-, 2.3, 3.7), (-, 2, 7)

PLA BRTOP Z 7

26 of 26

7/11/2012 11:21 AM

Vous aimerez peut-être aussi