Professional Documents
Culture Documents
.aIu r,on .
Revision Lag
Date
20101103
Page(s) Revision
I
Description of Revision
j Release
I c
I Update for M2
I M2sp2
Updates
Updates to th is manual w ill be issued as replacement pages and a new
Update History Sh eet
complete w ith instructions on w h ich pages to remove and destroy, and
w h ere to insert th e new
sh eets. Please ensure th at you h ave received all th e updates
sh ow n on th e History Sh eet.
A ll
updates
are h igh ligh ted by
a
revision code marker, w h ich appears to th e left of new
material .
SuggestiontProblems
I f you h ave a suggestion about th is
manual, th e system to w h ich it refers, or are unfortunate
enough to encounter a problem,
please report it to th e training department at
Fax +44 191 201 0001
Email
train
ing(c
-
~tribon, com
Copyrigh t
O
2002 Tribon Solutions
A ll righ ts reserved . No part of th is publication may be
reproduced or used in any form or by any
means (graph ic, electronic, mech anical, ph otocopying,
recording, taping, or oth erw ise) w ith out
w ritten permission of th e publish er
.
Printed by Tribon Solutions (UK) Ltd on 15 September
2003
.,ontents
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
.
. . . . . . .
5
2
Starting PACE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 1
2.2
Curve
tool
bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.1 3
2.3
View manipulation . .
.
. .
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
.
.
.
. . . . .
.
.
.
. . . . . . . . . . . . . . . . .1 4
2.3 .1
Window box
zoom and view reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.1 4
2.3 .3
Data bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 5
2.5
Curve Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 6
2.5.1
Point Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
. .
.
. .
. . . . . . .1 7
2.5.2
Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1
Course
Structure
The training course is divided into 4half-day sessions, of 3 hours duration each . Each
session or
group of sessions consists of up to three parts.
Presentation of
concepts
Demonstration by trainer
Practical examples for the students
Chapter 1
1 . 4
Using t h is guide
Th rough out t h is manual t h e following convent ions and abbreviat ions are used;
Cascading pulldown menu sequences are sh own as follows ; FILE > SAVE AS
But t ons wit h a t ext label t h at sh ould be push ed are
sh own
as;
Generat e
Dialogue box t it les
and
t abs
are sh own as ; Propert ies
Labels for radio but t ons, ch eck boxes, list s or dat a ent ry boxes are
sh own as ; Dist ance
List box select ions, user ent ered dat a, et c, are sh own as, Pline
Th e left mouse but t ons referred t o wit h t h e abbreviat ion " l . m . b"
Th e righ t mouse but t on is referred t o wit h t h e abbreviat ion
" r
. m . b"
Th e middle mouse but t on is referred t o wit h t h e abbreviat ion " m. m,b"
1 .5 Overview
I n it ia l Design
Workfl ow
Pa ra met ers
( L B P, B , T , et c .)
Offset s or Pa ren t Form
T
1
FORM 1 1 0 ,
L I NES
DESI GN
7
HUL L
B ASI C
Offset s or
Pa ren t
Form
CAL L
SURFACE
0 1 0 .
HYDRO
COMPART MENT
Offset s
1 .6
TheGraphicalUserInterface
uOF NLn ( / } NNC, ~~ MALL y
-
3
~H'1 . ~~7chS`.11?12R7'y
ouc~
~a~t`
r
11~
X -
A
QE j
- 1404
" i a + .
4 i- + + + +
0
Y
YJ
L)
1 .7
Tool Bars
Standard
1 2 3 4
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
Display
5 6 7
New
Open
Save
Macro Editor
NewWindow
View
Shade
Select Curves
User Params
Create
Fairing
2D Construction
3D Construction
View
1 2 3 4 5 6 7 8 91 0 1 1 1 2
L ir' ir
lli pday 1 3
8 9 1 0 1 1 1 2 1 31 41 5 1 6
1 7
1 8 1 9 20 21 22 23 2425 26
3
;
SW
E'
N
z~
~l
1 4
1 5
1 6
1 7
1 8
1 9
20
21
22
23
24
25
26
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
Patch
and Curveeditor
Edit
CurveEndings
Patch
Decks
PMB
Distort
Analyse Curve
Directory
Plotting
L oftbook
Export
Stogy
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
Section view
Waterline view
Buttock view
Obliqueview
Reset
Zoom In
Zoom Out
Window
Previous window
Next window
Clear
Redraw
Display
All
Display Boundaries
Display Sections
Display Waterlines
Display Buttocks
Display Knuckles
Display
Tangents
Display Plines
Display Clines
Display
Patches
Display Fitted Patches
Display
End surfaces
Edit
1 2
3
4
5
6 7 8
9
1 0 1 1 1 2 1 3 1 4
Identify
L ines lderi-1 2
ED 1 6 ( I>
1 2 3
1 Identify
2
Identify Range
3
1 0 Patch
1 Undo
2 Redo
3 Prefit
4
ShowPoints
5
ShowCurve
6
Show
Curvature
7
ShowVertices
8
Show
Knots
9
Window( point)
1 0
Window( curve)
1 1
Starting PACE
For curve editing, PACEcan be activated in a number of ways:
Use
the patch and curve editor icon
2.
3.
4.
5.
6.
1 . Apply changes to the model
2. Undo
3.
Redo
4.
Show
grid lines
1 . drag zoom window
2. set viewto defaults
3. pan model
4.
pick mode
5.
navigate mode
Curveprecision
Straighten curve between points
Insert datapoints before
Insert
datapoints after
Arrowkey nudgesize
Newcurve
2 . 3
View
manipulation
2 . 3 . 1
zoom the
view
l . m. b .
VVIndow
I)Cx zoo ii sand V: e-1 ; ,% % i
resc-
2 . 3 . 3
Data b ar
2 .4 .1
Curves tab
Curves
Data Points
Cordrol Pouts
colour
1
Correspondence
I f
checked, the data points are
displayed in all views.
Curvature
I ndex
Act1
Pant Type
x
[ ft]
y [ m]
z [ in]
pre
ox
Pre
my
Pro
or
post ax
post
ay
post ffiz
1
Frame 1 8 .75
rv -
Tangent
1 8 .7500
0 0000
00000
0 000
0800
90 .000
2
Frame 1 8 .75
Ordinary
1 8 .7500
2 .401 5
1 .0000
3
Frame 1 8 .75
re-
Ordinary
1 8.7500
251 95
1 21 34
"
4
Frame 1 8 .75
Ordinary
1 8 .7500
25443
1 .2645
cGrves
Data Points
Cortrai Points
Cotalr5
4
Active
a tangent point where the user can control the angle the
curve passes through
the point at .
Tangent(auto)
a tangent point
where the system controls the angle the
curve passes through the point at
.
Knuckle(none)
Control Points
Colours Curves
Knuckle(pre)
Knuckle(post)
Knuckle(both)
2. 4 . 4
Colours tab
a
knuckle point w ith control of the preceding angle.
a knuckle point w ith control of the follow ing angle.
a knuckle point w ith control of both angles .
the
coordinates
of
the point
.
For orthogonal curves one column
w ill alw ays be
greyed out.
the controlling angles for knuckle and tangent points .
Only those angles that are
coordinates of the control point. For orthogonal curves, one of the
columns w ill
alw ays be greyed out.
Entily
double click to set the colour
for
display of the
selected entity type.
set the colour
for
the selected entity type bye
entering an integer in the range
0-255.
2. 5
Curve
Manipulation
To interactively manipulate a curve, either Pick mode
R
should be selected
from the view tool bar
or the view tools should be displayed .
Curve Index
1 Frame 1 8. 7 5 0
Frame 1 8. 7 5 1
3 Frame 1 8. 7 5 2
A Frame 1 8. 7 5 3
Background
255 255 255
2 Curves 0 0 255
3 Curves (interpolsted) 255 0 0
Control polygon 0 Q
1 27
1 -LA
Curves
Data
Points : ;ordrul Points Colours
x [ tr]
1 8. 7 500
y
[ m]
L
0. 0000
z [ m]
MGM
1 8. 7 500 0. 887 2 0. 0000
1 8. 7 500 2. 0369 0. 297 2
1 8. 7 500 2. 4824 1 . 1 57 3
2. 5 . 1
Point Manipulation
To Manipulate points, the curve must be specified as fitted and the data
points displayed in the
graphics windows .
To interactively move a point, move the cursor so it is over the required point (the
point will
highlight when selected), hold the Lm. b. and drag the cursor to the required position
then release
the l . m. b.
Alternatively, move the cursor
over the
point
and click
the I . m
. b .
then use the arrow keys to nudge
the point in fixed steps . For orthogonal views, the up and down arrows control movement in the V
axis and the left and right arrows movement in the Uaxis .
The
nudge step size is controlled by the arrow key nudge size
icon to on the curve tool bar. Enter the required nudge step and
press OK.
J
J
I nsert Datapoint
Remove Datapoint
Frame 29. 25
37 I v - Ordinary
29,25 00 1 5 ,2220 1 2 . 01 23
Curves XOets Points
Cordrol Poirts
Colours
There are two methods of inserting
a point .
Nudge sere :
0. 01 m
Cancel
I f
the curvature curve is displayed, it will continuously change as the data points are moved .
To numerically change a point, select the data points tab of the data bar and select the required
point in the graphics window as above, the point will be highlighted in the data points tab. Double
click the coordinate to change and enter the new value.
For knuckle and tangent
points,
angle
values can be changed
using the same process_
To remove one or more data points, select the required point or points by clicking the I . m. b.
in
the
first column . The standard microsft shift and ctri functions can be used to select multiple points .
Click the r. m. b. in the fisrt column of any of the selected points and select remove .
Point
Type
x Mfr} . j
vh] hl
z
I m)
pre ex
pre my
pre oz
past
I n the
graphics window, select the point before which the new point is to be
inserted, using the
I . m . b. I n the data points tab highlight the row containing the point by clicking the I . m . b.
in
the
first
column .
From the
r
. m. b . menu select insert, a point will be inserted on the curve,
midway between
the selected point and the preceding point .
To insert points by cursor,
first,
in
the graphics
window,
select
the point before or after which it is
required to insert a point. Select either the insert datapoints before icon
.
On exiting PACE, the system, will
prompt
Apply changes to model before
closing?
Press Yes to update the Lines
model and exit
No to exit without updating
the Lines model
Cancel to remain in
PACE (the Lines model will not be updated)
Nudge S ize:
0,01
m
Updating the Lines
model from PACE, does not save
the
Lines
model, therefore the user must
also save the Lines
model when exiting Lines .
Exercise
1 .
S tart PACE
b y selecting all the b oundary curves and the af t sections.
3 .
Symbolic Substitution
$define al prefit:display curve :display kurvature
Chapter 3
The graphical user
interface of
TID
Lines evolved from a command driven system
which contained
a number
of shortcut features to simplify its use . These features can still be used within the Lines
system.
Symbolic substitution,
allows the user to define an alphanumeric shortcut, that activates a
sequence of one or more
commands . To create a symbol, the command
$DEFINE
is used .
A typical example, of where
symbolic substitution is useful, is the common sequence of fitting a
curve to a
set of points, then displaying the curve and curvature . A symbol for this sequence could
be defined as follows ;
In this example, a1 is the symbol being defined,
this
is followed by the sequence of commands,
separated by colons " :" , that
are associated with this symbol. To use the symbol, the user
only
needs
to enter a1 in the command line and press return .
Symbols only
exist
while
Lines is active, when the user exits from the program they are lost. If the
user develops a set of symbols
that are in frequent use, these can automatically be defined each
time Lines is started, by including the symbol definitions in a file which has the name Lines . ini and
placing this file in the directory where the Lines executable is stored .
To check which symbols are defined, the command $SHOWshould be entered via the command
line. This will fist each symbol and its associated commands .
Output Window
elFI
Executing
MACRO
file : LLIES
. W
Al =prefit :display curve display kvrvature
A2 =view sec :dis sec /all /aft
:dis knu /ala :dis tan /a/a
A3 =view sec :dis sec /all /for :dis knu /a/f :dis tan /a/!
3 . 2
Parametric macros
Macros are a means by which a sequence of commands can be stored in a file and used to
automate a particular task. They are more powerful
than symbolic
substitution, where the string of
commands
is
limited
to a single input line .
At its most basic, a macro is a sequence of Lines commands for a specific task. They can be
made more general and flexible by the use of
variables,
flow control
and
data access .
3.2 .1
Asimple macro.
$variable num
drop
halfb radius midy thetal theta2 adj
$variable char cname
radius "Enter the camber radius"
identify the
$inquire
$inquire cname "Enter a name to
dir part
$set halfb #BEAM/2
$set thetal asin(halfb/radius)
$set adj
cos(thetal)*radius
$set drop radius - adj
$set theta2 thetal/2
$set midy tan(theta2) * radius
$open temprcam.dat
$fprint " 0 .0 0 .0 K"
$fprint " ",midy," 0 .0 K"
$fprint " ",halfb," - ",drop,"'
$close
view section
create camber 'cname'
dis point
prefit
arc tang /num 2 rad 'radius'
prefit
dis point
dis cu
acc
K"
/f temprcam.dat
inc o.5
As an example, thefollowing is asimple macrothat generates
acircularcamber
The macrois composed of twotypes of commands;
y
camber"
Interface commands, which begin with the dollar symbol
$. These are common to all
command based Initial Design modules.
Application commands, which are specificto each Initial Design module, e.g . Lines.
The first twoline of the macro, declarethevariables that will be
used
by
the macro. There are two
types of variables, numeric and character. As their names imply, these handle numeric
values
and characterstrings respectively.
The content of the initial input variables can be specified either as astring of
parameteron the
macrocommand
line or
by
prompting forindividual values from within the macro. The next
to lines
prompt
the userto specify the
camberradius and the name that will be used to identify and store
the camber.
Certain Lines commands automatically return values to system defined variables
that the usercan
then
access.
These variables all begin with a# sign. The fifth line uses the "directory particulars"
command to assign system variables foreach of the general particulars, e.g . LBP, BEAM etc.
The next six lines calculate values forthe variables used to generate the camber, based
on the
input parameters. The first of these lines uses the
system variable #BEAM assigned by the
previous command.
22
The group
of
lines
delimited by the $open and $close commands, open a
new datafile in the
current directory and output aseries of data points to the file .
The remainder
of the macro is a sequence of lines commands that use the datafile to create
the
camber and store it within thedatastore.
Themacro is terminated by the$exit
command.
To use
the macro, the text file of the macro commands, should be stored either in the
directory
where the Lines
datastore on which it will be used is stored or for general use in the
Lines
executable directory
. Macro
files
should be stored with the extension MAC, so that they
are
recognised by I nitial Design, e. g . rcam . mac.
To execute the macro the user would enter the command
a@rcam
3 . 2 . 2
Reverse=", reverse
$ENDDO
$ENDDO
$VAR
NUMforward reverse
$SETforward 0
%labell
$SETforward forward+1
$I Fforward ? 1 0 THEN$GOTO%endl
$PRI NT"Forward=",forward
$SETreverseforward+1
%label2
$SETreverse reverse-1
$I F
reverse <
1 THEN$GOTO%end2
$PRI NT
" Reverse=", reverse
$GOTO%label2
%end2
$GOTO
%labell
%endl
$EXI T
Exits from current macro.
This will return to the calling macro if it has been nested .
$FPRINT < "Message" > <,Variable > . . .
Outputs to the f ile o pened by the $OPEN co mmand the value o f any variable
to gether with an
asso ciated message if required . The message sho uld be enclo sed within do uble-quo tes
"". Any
number o f variables and messages can be inter-mingled but
each sho uld be separated by a
co mma',' .
If the o utput f ile has no t been $OPENed then the messages will go to the screen
.
e. g .
$FPRINT"NUMBER
OFPOINTS", COUNT.
$GOT4%label
Go to the line co ntaining the given label . Labels must be pref ixed by %.
e. g . $GOTO %next-lo o p
$IF ( Co nditio nal Expressio n ) THEN ( Co mmand ) <ELSE( Co mmand ) >
If statements co nditio nally
transf er co ntro l
o r
co nditio nally
execute a co mmand. The statement f irst
evaluates the lo gical expressio n. If the value o f the expressio n is TRUE( -1) then the co mmand af ter
the THEN is executed
.
If the value
o f the expressio n is
FALSEthen the co mmand af ter the ELSE is
executed
if
there is o ne, o therwise the co mmand o n the next
line is executed. Any Interf ace o r
Applicatio n co mmand can be used
.
e. g . $IFlo o p+1>=max THEN $GOTO %next-lo o p ELSE$GOTO
%f inish-lo o p
$IFwidth*height* depth > maxvo l THEN $SETmaxvo l width*height*depth
$IFa>b &a>cTHEN $GOTO %f ailed
The list o f available
Precedence
o perato rs is
Symbo l Descriptio n
1 o r
2 & and
3 = equal to
3 >
less
greater
than
3
<
than
3 <
no t equal to
3 >= greater than o r equal to
3 <= less than o r equal to
4
+
add
4 - subtract
5 multiply
5 divide
6 -
unary minus
7 ^ raise to the po wer o f
8
COS(x)
8
SIN(x)
8
TAN(x)
8
ACOS(x)
8
ASIN(x)
8
ATAN x)
8
EXPx)
8 'Ex}
8
SQRT((x ) )
8
MNT(x)
8
EQS(strl,str2)
cosine
sine
tangent
$SET width 12 . 5
26
Character expressions consist of string concatenations .
where,
$SET height
width
A
2. 0
$SET OKa>b
n . b. TRUE =- 1
e. g .
i
. e .
first 7
characters
$SETname "NEW",old- name(4: )
$TRACE(0 !1 !2!3)
Set trace level when macros are executing .
0 = Nothing should be echoed.
1 =
Only show macro calls .
2= Show macro calls &Application commands
. (DEFAULT)
3= Show all .
$VARI ABLE
(CHAR!
NUM) (Variable
<
[ Dimension ] >
. . . )
Declares one or more variable to be of the given type. Note that this
command only declares the
variables and they cannot be used until they have been given a value by the $SET or $DEFAULT
commands . Atype code must be supplied with the variable and this should be
one of the following : -
CHARfor character variables
NUMfor numeric variable, no distinction is made between I nteger and Real
e. g .
$VARI ABLE
NUMx1 x2 yl y2
$VARI ABLE CHARnamel name2
Note also that all variables( except parameters to macros ) are global and therefore can be used
at
any time .
To use a variable within
an
I NTERFACE
command the user
should supply the name of the variable
e. g .
$SETarea width*height
$I F area > max- area THEN $GOTO%too- big
$PRI NT "AREA",area," I S LARGERTHEN MAXI MUMALLOWED",max- area
To use a variable as part of an APPLI CATI ON command it must be placed within single quotes .
Arrays can be defined using ' [ Dimension ] ' option. The Dimension of the
array must be a positive
whole number. The array indexes will be 1 , 2 ,
3 , . .
.
.
, Dimension.
$WAIT
e. g_
GETSECTION' curve-pos'
e. g .
$VARIABLEcount myarray[ 1 0]
$DOcount ; 1 ; 1 0
$SET myarray[ count] count*count
$ENDDO
Pauses execution of the macro until the user indicates whether to continue or
abort execution.
3 . 2 . 3
Macro Organisation
Macros can be stored as individual text f iles (with the extension MAC)
or organised into a user
library. When a user issues a call to a macro, then the search order used to f ind
the macro is as
f ollows;
D
D
D
D
Text f iles
in
the directory
specif ied by the location of the current datastore.
Text f iles in the Lines executable
directory .
User macro library
(MAC$USR)in
the
Lines executable directory .
System macro
library (MAC$SYS) in the Lines executable directory .
Simple macros created
f or
a particular project, will normally be
stored as text f iles, in the directory
with the associated datastore.
General macros that all users can use, should be stored
in the Lines executable directory, either
as text f iles or in a user library . The benef its of using a user library
are;
D
D
D
a
single
f ile to
manage
the user can
list the available macros in Lines
large macros with extensive f low control, will run f aster
The user cannot store macros in the system macro library .
The interf ace commands available to organise macros are;
$DIRECTORY
$FREE
$LOAD
List available macros.
Unload macro.
Load macro in library .
$DIRECTORY
Gives a list of the macros in the current user and system libraries .
Output Window
IRON
Lib Macro name
--- ----------
11SR auto3da. mac
UM auto3df . mac
USR cre3d. mac
SYS LIN ESA. mac
SYS LIlESB. nwc
SYS LIHESC. mac
SYS PLIDEITT . mac
SYS SECAFT . mac
SYS SECALL . mac
SYS SECFWD. mac
SYS STEf lS. mac
SYS
STEMWS. mar
SYS plicf Pnl . mar
Af t body f airing
curve creatioa
Fore body f airing
curve creation
Import of Plines f ran single input f ile
Lines 2 . x, Limes Plan
A
Lines 2 . x, Lines Plan B
Lines 2 . x, Lines Plan C
Lines 2 . x, Identif y curve
Lines 2 . x, Body Plan af t Sections
Lines 2 . x, Body Plan af t/f ind Sections
Lines 2 . x, Body Plan
MSections
Lines 2 . x, Estimate Stem HS by extrapolation
Lines 2 . x, Estimate Stern HS by extrapolation
Lines 2 . x, Identif y curve
30
The output
lists,
the library in which a macro is stored, the macro name, and an description that
explains its f unction .
The description is specif ied by an optional label %HDR `string', that can be added as the
f irst line
in a macro,
e. g .
%HDR A f t body f airing curve creat ion
$FREE
( Macro-name )
Removes
a macro f rom
User
Macro Library.
$LOA D ( Macro-name)
Loadst he given macro int o
t he User Macro Library but does not execut e it . Thecommandswit hin t he
macro are NOTchecked f or correct synt ax but any labels are pre-processed t o avoid re-scanning t he
macro. The def ault f ile ext ension is MA Cwhich will be appended aut omat ically if a f ile ext ension is
not supplied
.
To creat e a user macro
library, t he user must have a open dat ast ore and it should exist in t he
same direct ory as t he macro f iles. Theeasiest way t o handle t his, is t o creat e a direct ory under t he
lines
execut able direct ory, e. g . user macros, in which all t he macro f iles are st ored along wit h an
empt y
Lines dat ast ore.
When t he user f irst loads a macro, t he f ile
MA C$USR will be creat ed in t he direct ory where t he
open dat ast ore is locat ed
.
The
user should load all t he required macros, t hen move t he library t o
t he execut able
direct ory . To load addit ional macros at a lat er dat e, t he library should be moved
back t o t he direct ory where t he macro f iles are
locat ed and t he macros loaded .
The
library can
t hen
be moved back t o t he execut able direct ory .
Exercise 2
The following exercise shows how macros
can be used t o aut omat e t he
process of defining t he aft
body of a t unnel st ern t ug.
The aft erbody plan for t he t ug is given below: -
Main t asks t o be performed: -
1 .
Creat e new ship TUGand input general part iculars file and read in
brit fair file TUG1 . BR1 .
2.
Make each sect ion in t urn t he current curve and out put t he st art point s t o t he
buffer (COORD
POINTIBUFF).
4. Creat e t he knuckle SKEGusing t he command CREATE
KNUSKEG/BUFF.
J. l? .
The repet it ive series of act ions performed in st eps 3 and
4, are t ypical of t he act ions t hat can be
aut omat ed by t he use of
macros.
The macro given below is an one example of how t hese st eps could be
aut omat ed . It can be input
as a
file
called t ugl
. mac in t he current direct ory and used t o aut omat e st eps
3 and 4.
$variable num . secno
$variable char curname curtype answer
$inquire curtype "Input type of 3D curve to create"
$inquire curname "Input name used to store curve"
vi sec
dis sec all
quit buffer
%pick_point
identify
$set secno ##IDP
mod sec 'secno"
dis poi
coord poi buf
quit
$inquire answer "Are there more points to select (YIN)"
$if
eqs(answer,"Y") THEN $goto %pick_point
create 'curtype' 'curname' buf
vi obl
prefit
dis cu
accept
$exit
5. Clear the points buffer then place the
coordinates
of the second point in each curve into the
buffer. Usethesepoints to create the tangent curve TAND.
fi. Clear the buffer then get the coordinates of the third point in each curve and use these to
create the knuckle KNUA
7.
Switch
off
thetangentTAND thefit all frames using onlythe 3D
curves.
10 . Makeeach section currentandreplacethe mid knucklewith anarcof 500
mmradius.
Themacrogivenbelowcan be used to automate this process.
$variable num arad
start end incr counter
$inquire arad "Input radius of arc"
$inquire start "Input the identifier of the first section"
$inquire end "Input the identifier of the last section"
$inquire incr "Input
the increment between
succesive sections"
vi sec
dis sec /all
$do counter;start;end;incr
mod sec 'counter'
arc tan /num 2 rad 'arad'
prefit
dis cu
acc
$enddo
cle red
$exit
33
11 . Use the coordinate buffer to obtain the coordinates of
al l the arc start points and create a
tangent
curveTANB.
The macro tugl . mac coul d be used for this process, but as we nowhave
a l ot more sections,
al l of which contain the same number of points, we can speed up the process as
shown in the
fol l owing macro.
$VARIABLE NUM secno
$VARIABLE CHAR curname curtype answer
$INQUIRE curtype "Input type o 3D curve to create"
$INQUIRE curname "Input name used to store curve"
vi sec
dis sec al l
quit buffer
$DO secno ;-3 :20
mod
sec
'secno'
coord NUM 2 poi buf
quit
$ENI)DO
create 'curtype' 'curname' buf
vi
obl
prefit
dis cu
accept
$EXIT
12. Use the coordinate buffer to obtain the coordinates of al l the arc
end points and create a
tangent curve TANC_
The previous macro can be used for this purpose by mal ting the fol l owing change to the l ine 10
Coord
NUM20 poi buf
20 is the sequential point number of the final arc tangent
point
.
13 . Create angl e curve to control the sections for TANB (0 degrees) . This
is created by
intersection_
14 . Create angl e curve for the sections for TANC (90 degrees) . This is created by intersection
.
15 . Create angl e curve to control the sections for SKEG (upper 0 degrees) . This is created by
intersection .
16 . Switch on Tangent TAND .
17 . Create angl e curve to control the sections
for
TAND (0
degrees) . This must be created from a
fil e.
18. Switch off knuckl e KNUA.
19. Create a series Plines
between TANB and TANC, that will support the arc when the sections
are
ref itted . The simplest way to do this is f it a pline through common arc point using the
previous macro.
20 . F it all sections again .
21 . Use sections to f it
buttocks .
22 . Use
sections and/or buttocks to create waterlines . Use a near point of cline sort .
23 . Modif y each waterline if
necessary by using manual sorting to give the required shapes .
F itting a pline to every 2n arc point should
be suf f icient . Edit the previous macro to use
sequential point numbers 4,6,8,10,12,14,16 &
18
in turn .
14 .
Fair the forward waterlines as shown then update the
sections in this region. The sections will
need to be manually sorted again.
15. Use PACE to fit a surface .
4
Complex hullforms
4. 1
Stern Profile
Twin
skeg forms present the user with a number of problems to solve. Open the datastore
twins keg. blines, which can be found in the directory . . . \ I nitial DesignkExampies, created as part of
the Tribon installation .
4 . 1
. 2
Flat of bottom
'
J.
' hapter 4
Assign
an oblique view to a graphics display window and display knuckles . I t will be seen that the
stern profile has been defined as a knuckle curve called sterncl.
The
reason that it is not defined by the Boundary curve Stern Profile, is that when fitting
waterlines, the
system automatically removes all points aft of the curve Stern Profile and
all
points
forward of the curve Stem Profile.
For twin skeg vessels, waterlines in way of the
skeg will
generate points aft of the stern profile therefore if
the
boundary curve was used, these points
would be removed and the waterlines would be
incorrect.
Change to a waterline view and display tangent curves . I t will be seen that the flat of bottom is has
been defined by two tangent curves each of which should have angle curves associated with it to
FOB
POHO
control the intersection of the sections and buttocks . The
angle curves w ill all have constant values
of 0 degrees, as can be seen from examining the curves TXFOBI, TXFOBO.
The reason for using tw o tangent curves instead of the FOB boundary curve, is that w hen using
the FOB curve, the system w ill only calculate and assign and angle to the flat of bottom point,
if
both the start point and the flat of bottom point are at Z=0 or if a rise of floor has been
defined by
the ROFand FOKparameters .
If these conditions are not fulfilled, w hich is the case w ith the
tw in skeg, then no angle is calculated
and the flat of bottom region w ill not remain flat .
Additionally, the flat of bottom is divided into tw o tangent curves, as the system
cannot assign
angles to multiple intersection points therefore if the flat of bottom w as defined as one
tangent
curve, only the first intersection w ould get the angle of 0 and the flat of bottom region
w ould again
not
be flat.
4. 1 . 3
Pre_fit
Nearest
S O ft
x
Start point
for
sort
When fitting the
sections
in
way of
the
bossing , after
removing the points
in way ofthe hul l it wil l
normal l y be necessary to use the nearpoint sort before fitting the curve
.
Sometimes it may be necessary forthe userto use the manual sort to correct l ocal probl ems.
F il e Edit view Curve Anal yse Y(indow J j eip
G ii;
I G dP40 %x "-'~14%I K ~~
pretit /cl ose
E'9 17
v
The curve can be cl osed by issuing the command PREF I T /CLO SE
from the command l ine. This
dupl icates the start point and inserts it at the end ofthe curve, therefore ifany modifications are
made to the curve this point wil l stil l exist and it is onl y necessary to us Prefit.
Whenf i t t i ng
wat erli nes t he user wi ll g enerally have t o apply a near po i nt so rt t o each wat erli ne i n
way o f t he bo ssi ng .
U rwt s I Curve I Pat ch
Dat a set
Axas
Part i culars
Sat
DaI eurt met ho d
C'
St andard
! ` I nX
r
.
I nY
F
.
I nZ
r+ Nearest t o
~ ` Cuso r
l"'
U
10. 000000 V 100 . 00000
Thi s can be set as t he def ault so rt i n t he U ser Paramet ers
di alo g ue.
I f
t he user uses a Vvalue
f o r
t he so rt
t hat
i s
well t o t he neg at i ve si de o f t he shi p, e. g . -100, t hen t here sho uld be li t t le need t o
so rt i ndi vi dual wat erli nes
.
4. 2
Create a knuc kl e fo r th e o utbo ard h ul l c entrel ine (HULLCL), using th e fo l l o wing po ints .
3.
Create a Cl ine (KIN 1 1 B) in butto c k view, to define th e pro fil e o f th e inbo ard l o wer knuc kl e, using
th e fo l l o wing po ints .
A ngl e 0. 72 7
' " 0 . Ci
LOA 65 . 000000
LBP 60 . 000000
Beam 2 4 . 000000
Draft
4 . 500000
Depth 1 0 . 000000
Stem o verh ang 5 . 000000
Max Depth 1 0 . 000000
X
Y Z Set To
0 . 000000 9. 000000
1 . 000000 Tangent A ngl e 0
2 0 . 000000 9. 000000
0. 005000 Tangent } Straigh t
59 . 000000 9. 000000 0. 500000 Knuc kl e } Line
60 . 000000 9_000000 4 . 500000 Knuc kl e
64 . 000000 9_000000 8. 000000 Knuc kl e
65 . 000000 9. 000000 1 0. 000000 Knuc kl e
X Z Set To
0
. 000000
U50000 Knuc kl e
2 0 . 000000 0. 750000 Tangent
59 . 375000 2 . 000000 Tangent
using the following points .
Angle 10
I _ I
'. L
t?~
! J
!
5.
wr ~ saern; u,,
.
X
I rteuectl Prged/Fm
Mepe
Crave jy pe
Knuckle
blame
knSl
~ Aaater Buttock
KKK
KN218
$lave WarerFx
KN1rW
KNt9W
KN21W
KN20W
Create
fi .
Create a Cline (KN10W) in waterline view, to define the plan of the lower outboard knuckle,
using the following points .
Angle -10
44
X Y Set To
0. 000000 7. 000000 Knuckle
30. 000000 7. 000000 Tangent
59. 375000 9. 000000 Tangent
X Y Set To
0. 000000 11 . 000000 Knuckle
30. 000000
11
. 000000
Tangent
59. 375000 9. 000000 Tangent
~_(~
i
_-
--------
-._ ..__
iF .
7.
Merge the Clines KN1 IB and KN10Wto create the lower outboard
knuckle (KN10).
8.
Set To
64.000000 9 .000000 8 .000000 Ordi n ary
64.000000 0.000000 8 .000000
Ordi n ary
16_ Create the uppermost kn uckle
(TOP), usi n g the followi n g
data
.
X-
17 . Create the wet deck cen treli n e kn uckle (WETCL), usi n g the
followi n g poi n ts
10
_
r,
F. Cl
: ,
1
X Y Z Set To
0,000000 0.000000 10.000000 Ordi n ary
0.000000 12.000000 10.000000 Kn uckle
60 .000000
12
.000000 10.000000
Tan g en t
65
.000000 9 .000000 10.000000 Tan g en t An g le -90
65 .000000 0.000000 10.000000 Ordi n ary
X Y Z Set To
0.000000 0 .000000 8 .000000 Ordi n ary
64.000000 0 .000000 8 .000000 Kn uckle
65 .000000 0 .000000 10.000000 Kn uckle
4. 2 . 2
F i t t i n g t he sect i on s
1 .
I n t he user paramet ers, set t he sort i n g met hod t o be a n ear poi n t sort , st art i n g wi t h t he poi n t
closest t o t he coordi n at es 0 , 8.
U n i t s
Dat a set
Def ault met hod
St an dard
C '
I n x
! '
I n Y
I n Z
C
Nearest t o
C ursor
t:
u
0 D0 0 0
0 0
V
I
C W" e
I
Pat h
I pat t i es
2 .
F i t
sect i on s 0 t hroug h 64 i n i n cremen t s of 1 , usi n g on ly t he kn uckles .
Li n es : Edi t
Sat
3.
Modi f y each of t he i n correct ly sort ed sect i on s, an d use man ual sort t o correct t hem.
S e l e c t t he l ast p o i n t i n t he c o rre c t p art o f t he se que n c e ( i n t hi s c ase p o i n t n umbe r
1 ) . The n di gi t i se
t he i n c o rre c t p o i n t s, i n t he o rde r i n whi c h t he y sho ul d be so rt e d . Pre ss t he
r. m
. b.
t o t e rmi n at e t he n
fi t a c urve t o t he p o i n t s .
1 . 0 1
Re p e at t hi s p ro c e ss
fo r al l
t he
i n c o rre c t l y so rt e d c urve s .
4. 2 . 3
Adding
Angle CupVc
s
i. C- "
~`r
t~i
4.
Creat e
t he
lowerangle curve
for
t he knuckle HULLCL, by int erpolat ing t he int ersect ion angles
form t he sect ions_
ch. I r.. ,bar. ~..
a
. *
I
View
r.
~OCt pn
r
$uRUa
r
w*dw.
rlwcmi
r
Ln. ckle
i- QPM'
J
0. 0
Remove all t he point s up t o but not including
sect ion 52 and insert t he t wo point s 0, 0 and 2 3 , 0,
t he second
point should be set t o a t angent point and a curve fit t ed . Adjust t he vert ex following t he
t angent
point , by - - 6 met res in t he Uaxis .
5. Creat e t he upperangle
curve
for
t he knuckle HULLCL, as above. Edit t he angle curve in t he
sameway as was done fort he lowercurve.
8.
Interpolate waterline
9 using sections .
1 ss . nv
Setthe point at section 54
to atangent point. Removethe points at sections 61 through 64and set
the point at section 64.5, to a tangent
point with an angle of -90.
F inally , fit
all the sections again. Someof the sections will
need to be sorted manually as before.
4
.2 .5
:: D
::-:
v
ie D
V
F V
-:
, ~,
~-:~ -
i.~e
i~ :, h e:i :. i: - .i i
e~
:
e:~
:~
.: i: :
i~~- :
.ie. i
-
.i
:~e i:
e~
: -.i
` `
~:..:
1
To set the default sorting
method to use the c line, enter the above c ommand via the c ommand
line .
12 . F it the waterlines
F it the above range of waterlines
.
Lmes . reiung
I Get
115iegond I
Curve Type
r S oc tian
r B
j~doc k
r
wee
S elec tion
r
ai
r
sein
F -1
e
r
.
Re. e
O ptions
r sew
r glove
13 . S ort the forward ends of the waterlines manually .
I meipdetion
1
A~tiorrc '
r
r Digponds
r
.
14 .
Fair the forward waterlines as shown then update the
sections in this region . The sections will
need to be manually sorted again .
15. Use PACEto fit a surface .