Napa Manuals 2016.3-1 PDF
Napa Manuals 2016.3-1 PDF
Napa Manuals 2016.3-1 PDF
NAPA LTD SHALL NOT BE LIABLE FOR TECHNICAL OR EDITORIAL ERRORS OR OMISSIONS
CONTAINED HEREIN; NOR FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES RESULTING
FROM THE USE OF THIS MATERIAL. Napa Ltd takes no liability on direct or indirect damages
which originate in software error or unsuitability or unprofitability of the software.
It should be noted that although the intention is to keep the system documentation up to date, this
manual collection may contain information which is either out of date or otherwise not completely in
line with the functionality of the system. This is explained by a rather fast development pace of the
NAPA system and very extensive set of existing documentation.
Napa Ltd encourages the users to verify the calculations in order to avoid erroneous results and
output. Especially in cases where the system is used in a non-standard way or calculations of an
extreme nature are performed, the risk of erroneous results increases.
System errors that are reported to Napa Ltd are investigated and corrected in due time. In case of
a severe error, all Napa user organizations are informed and a patch release including the error
correction is issued.
The users shall report critical and important errors to NAPA Customer Service for allowing Napa to
do corrective actions and for informing other NAPA users in case the error could have
consequences.
This document contains information protected by copyright. No parts of this document may be
reproduced in any form without prior consent from Napa Ltd.
Product names mentioned herein may be trademarks and/or registered trademarks of their
respective companies.
Introduction to NAPA
Preface
Getting started
Subsystems of NAPA
General
Design process flow in NAPA
Curves and point objects
Hull surface
Hull Surface Editor
Hydrostatics
Special surfaces
Rooms
Ship Model
Capacities(CP)
Preparations for stability calculations
Loading Conditions
Damage Stability
Stability Criteria
Output
NAPA Manager applications
System administration
Hints & tricks
Transparent commands
System and Administration
NAPA system
Documentation
Presentation of subsystems
Run environment
Running the system
Main Window and main level functions
Project administration (ADM)
Handling of input
List handling
Graphics
Standards, conventions
Error handling
Calculation methods
Short introduction to data management
Common Data
System maintenance functions
Double Precision
Third Party Licenses
Project Administration
Project administration general
Reference system (REF)
Legacy Text Editor
Database functions (TOC)
Server Database (ServerDB)
How to start using ServerDB
Uninstall ServerDB
General Tools and Functions
General Service Functions and Events
Graphical user interface
User Profile
Calculator
Various general functions
Geometry (GM)
Purpose (GM)
General about geometric objects (GM)
Definition of curves (GM)
Definition of general surfaces (hull definition) (GM)
Hull Surface Editor (GM)
Hull Surface Editor technical details (GM)
Transformations (GM)
Special surfaces (GM)
Definition of rooms (GM)
Geometry Editor (GM)
Definition of surface objects (GM)
Special definition functions (GM)
Parametrization of geometric definitions (GM)
Introduction to NAPA
Introduction to NAPA
Preface
Getting started
Subsystems of NAPA
General
Design process flow in NAPA
Curves and point objects
Hull surface
Hull Surface Editor
Hydrostatics
Special surfaces
Rooms
Ship Model
Capacities(CP)
Preparations for stability calculations
Loading Conditions
Damage Stability
Stability Criteria
Output
NAPA Manager applications
System administration
Hints & tricks
Transparent commands
Preface
Dear User, welcome to the NAPA world!
This is an introductory manual to NAPA for Design, including a brief overview of the subsystems, files, administration, graphical tools, and
command language at a level needed to get started with NAPA. By following the examples presented in this manual you can create a complete
NAPA model and perform the most common calculations with it.
In order to keep this presentation simple, many special features and functions used less frequently have been omitted and only the most essential
background information is given. Therefore, it is important to understand that if this manual lacks an explanation for something, it does not mean
the task could not be performed with NAPA; in such cases, the information should be sought in the Napa Manuals which are automatically
installed as part of each NAPA Release. The Napa Manuals should always be used when the full power of the system needs to be harnessed and
a thorough understanding of how NAPA works needs to be gained.
Table of Contents:
1. NAPA in a nutshell
2. How to read this manual
1. NAPA in a nutshell
NAPA incorporates state-of-the-art hull surface and 3D model definition with advanced hydrodynamic, stability, and structural design software
tools. NAPA can be used to design any type of floating structure, and it accommodates every designer’s needs in the early design phases. From
the first sketches through hull design and fairing, basic structural design, and performance predictions to statutory calculations and delivery
documents, only one tool is needed: NAPA.
The 3D product model applicable in all NAPA software solutions forms the central pillar of the accuracy and speed at which NAPA operates, while
NAPA’s modular nature makes it possible to select the functionality required to realize the desired design.
NAPA is a single integrated software system covering the following primary design disciplines:
Contract Design for finding the optimum design solution before signing the contract
Hull Form and Performance for hull design, hydrodynamics, and performance optimization
Statutory Compliance for assuring that the design meets all rules and regulations
NAPA Steel for structural design in the early design stages
Offshore Structures for efficient design and comprehensive analysis of offshore structures
There are also special applications for emergency response, outfitting, and tools for developing, customizing, and automating NAPA to suit user
needs. With NAPA, design efficiency and accuracy can be raised to a totally new level.
NAPA has been the preferred partner for industry’s leading organisations for several decades. Today, NAPA is used successfully by some 400
professional organisations, including the leading shipyards, classification societies, maritime authorities, consultancies, model basins, research
institutes, ship owners, and ship operators worldwide.
From the beginning, NAPA has been developed and tested in a true shipbuilding environment, ensuring that it meets the most demanding needs
of naval architects and maritime industry professionals and making NAPA the optimal choice.
Screenshots are used to illustrate the use of graphical tools. The following notations are used to denote the use of the pointer:
Moving within the menu system will be presented in the following way:
For example:
Getting started
This chapter describes how to create a new project and how to check and change the parameters of the reference system, if needed.
Some general information about the system, commands, command explanation texts, and the Text Editor is provided in the chapter entitled Gener
al.
Table of Contents:
Hint: In a new NAPA installation, the default user name ADMI can be used to log in for the first time. New user IDs are defined with the
USER command in the ADM > INST task. This requires administrator rights.
Only if the NAPA administrator has set up a NAPA password for the user, should it be entered in the Password field. The User Profile field is
used to change the default layout to smaller or larger, and need not normally be used.
User names are defined in the ADM > INST task. The maximum length of a user name is four characters. The following example shows how the
user name JOHN is created and assigned user rights P (full professional).
The USER command without parameters will produce the list of current user names and the !EXP USER command will show the complete
command explanation.
2. Main Window
The command input area of the Main Window is the main area for controlling NAPA when using commands.
The parts of the Main Window and their functions are as follows:
The Title bar looks and works like in any other window in the operating system. The colouring of the title bar usually indicates whether
the window is active.
The information displayed on a title bar in any NAPA window includes the names of the active object and the window, and
identifies the NAPA Release version being used. The active version and project together with the run ID are displayed in square
brackets [ ].
The Menu bar includes the main menu items available. A drop-down menu is opened by clicking on a menu item or, while holding down
the Alt key, by pressing the character key matching the letter of the alphabet underlined on the menu item.
The Tool bar includes a selection of clickable tools. The buttons provide tool tips when the pointer is moved on top of them.
The Open Project button opens the project browser that allows selecting a project from a list.
The Version Selection field allows selecting between versions of the active project.
The Command input area is the area where NAPA commands are normally entered. The prompt and the cursor can be found in this
area. The prompt indicates which NAPA task or what kind of definition process is currently active.
The Status bar is an area used by NAPA to provide information on the status of the system and on what will happen if a button is clicked.
The Status bar is also used as a progress indicator showing the progress of any task both graphically and as a percentage. The Prompt
indicator replicates the prompt to the right-hand end of this info area.
button.
The projects displayed in the list are projects registered in the system database. This means that the path to each project file is known. When a
project is opened for the first time, it is automatically registered.
If the project name does not appear in the list of projects, it can be opened from:
This option allows the user to browse directories and project files. When a project is opened, its location, including the full path, is registered to the
system database, and its name becomes available in the list of projects.
A project can also be opened by using the PRO projectname command at the Task level or by typing its name in the Active Project field. If a
project has already been active during the current NAPA run, its name can be selected from the drop-down list of active projects.
A selection of example projects is included in the NAPA Release, such as D-CONTnnn (in which 'nnn' refers to the release version; for example,
D-CONT111 was delivered with NAPA Release 2011.1). These can be used for practising, for instance, how to move between NAPA tasks.
The Task level is NAPA's topmost level. NAPA always starts at the Task level and all sessions are ended from the Task level.
TASK?>DR
* BEGIN Definition and drawing (GM) *
--- DRAWING ---
DR?>
Alternatively, a task can be launched from the Task menu in the Main Window:
The END command will bring you back one level in the task hierarchy:
DR?>END
GM?>END
TASK?>
The following figure is a simplified presentation of the subsystems of NAPA. The figure also shows the commands used to activate the different
tasks and illustrates the connections between them.
The project's name (max. 24 characters), its description, and the reference dimensions are input in the Creating a New Project dialog box.
In the above example, a new project called NAPAINTRO was created. The first version of this project is identified with A, which is the default
identifier for a new project. However, any other version name could have been used just as well.
When a project is created, two new files are created in the project directory: in this case, napaintro.db and napaintro.sd. The default project
directory is: Napa\pr.
When a project has been created or opened, the reference system can be entered from the Task level:
TASK?>REF
The current parameter values can be listed by using the following commands:
LIST ALL Full list of the reference system including all parameters.
The following parameters are given in the reference system when a new project is created:
The following parameters are assigned default values on the basis of the above parameters:
XMID Largest section; used for calculating frame areas and CP.
REF?>LIST ALL
Reference dimensions
TDWL 4.8 design draught initial
AP 0 aft perpendicular initial
FP 82 fore perpendicular initial
LREF 82 reference length initial (FP-AP ->82)
XREF 41 reference point initial ((FP+AP)/2 ->41)
XMID 41 largest frame initial
XMIN -4.1 aft end initial
XMAX 86.1 fore end initial
LOA 90.2 length over all initial (XMAX-XMIN ->90.2)
BREF 13 reference breadth initial
BMAX 13 maximum breadth initial
TMAX 0 maximum draught undefined
HMD 0 height of main deck undefined
HSD 0 subdivision draught undefined
HMAX 24 total height initial
SHEL 0.01 shell thickness initial
KEEL 0.01 keel initial
RHO 1.025 seawater density initial
FRAMES 0, 1
WEBS not defined
LONG not defined
VERT not defined
Standard names
STRN STERN stern curve missing
STEM STEM stem curve missing
FRM FRM midship section missing
HLID HULL hull label
MOUL HULL moulded hull missing
HYDR HULL hydrostatic hull missing
STAB STABHULL stability hull missing
DAMA DAMHULL damage hull missing
TONN TONHULL tonnage hull missing
BHDE MDECK bulkhead deck missing
MDEC BHDECK main deck missing
PROF PROFILE lateral profile missing
PROV PROFILE visibility limit missing
MARG MARGINLINE margin line missing
DRMA draught marks aft
DRMF draught marks fore
Various parameters
NPA 0 number of passengers
Note! It is the user's responsibility to check the reference parameters before continuing with the project.
If something needs to be changed, new values can be given by using the following command:
REF?>parameter new_value
For example:
REF?>LREF 85
The above command would change the reference length to 85 metres. The same change could also be done by replacing the parameter value
directly in the list and pressing the Enter key on that command line.
A value in the reference system can be either given, calculated, or initial. The UPD command updates all reference dimension values which are
not explicitly given. The calculation is based on the actual geometry of the ship. If a value is given, it can be changed to the calculated value with
the CAL parameter command; for example, CAL XMAX. This should only be done once the geometry has been finalized.
Note! The REF task must be ended using the OK or END command in order to save changes. The SKIP command will leave the REF
task without saving changes.
The frame system is defined by using the FRA command in the reference system. The full syntax of the command is:
in which
The command and its interpretation are illustrated by the following figure:
The LIST FRAcommand shows the current definition of the frame system.
Exercise: Define the frame system for your project as instructed in the above example.
The origin is normally on the centre line, at the baseline, and near the aft end of the ship. Very often the AP and x=0 are the same point.
The coordinate system used is either right-handed (default) or left-handed. In the right-handed system, the positive y values represent the port
side of the ship and the negative y values the starboard side. In the left-handed system, the directions are reversed. The orientation of the
coordinate system in any project or version can be changed in the REF task.
Note! If the orientation of the coordinate system needs to be changed, this must be done before starting with geometry definitions.
The following schematic drawings illustrate the coordinate system and the definition of various draught quantities in NAPA.
Calculations related to volumes of compartments are based on the calculation sections. NAPA automatically generates the calculation sections
whenever needed. The number of sections is controlled with the reference system parameters RACC (relative accuracy) and ACCL (accuracy
class). There are three different accuracy classes to choose from:
GMTOL – Geometry tolerance. Sets the maximum deviation from the geometry that a section or definition polygon can extend to.
RACC – Relative accuracy. Governs the number of calculation sections and their density locally.
INTOL – Iteration tolerance. Rules when a volume iteration (e.g. floating position) is accurate enough.
BTOL – Gap detection tolerance. Used for gap detection between patches or facets in surfaces.
LTOL – Limit tolerance. A forced offset when intersecting an object at the extreme coordinate plane.
The tolerances may be controlled individually after the accuracy class has been applied. Changing the accuracy class will though set all
mentioned tolerances according to the class and overwrite any individual tolerance settings.
Subsystems of NAPA
This chapter provides an overview of the most important subsystems of NAPA. Note that some of the functions presented in this chapter are not
included in the standard NAPA package, but are so-called optional add-on features which your organisation might not have acquired.
In addition to the subsystems presented here, NAPA offers a variety of additional subsystems. See the Napa Manuals for more information.
Table of Contents:
1. General
2. Dependencies between application subsystems
3. Hull Form and Basic Geometry (GM)
3.1. Hull definition
3.2. Inner structures
3.3. Drawing functions
3.4. Panel Generation and Interface
3.5. Link functions
4. Ship Model (SM)
5. Hydrostatics (HD)
6. Capacities (CP)
7. Loading Conditions (LD)
7.1. Inclining Test (INC)
8. Damage Stability (DA)
9. Flooding Simulation (DAFS)
10. Stability Criteria (CR)
11. Launching (LN)
12. Grain Stability (GS)
13. Container Loading (CL)
14. Freeboard Calculation (FRB)
15. Offshore Structure Stability (OSS)
16. Emergency Response (ER)
17. Resistance and Propulsion (SH)
18. General Seakeeping (SHS)
19. Manoeuvring (SHM)
20. Seakeeping 3D Panel Method (SOUR)
21. Viscous Flow Solver (RANS)
22. Potential Flow Solver (TAHARA)
23. NAPA Steel (ST)
24. FEM Mesh Generation and Interface (FEM)
25. Optimisation (OPT)
26. Weight and Cost Calculation (WG)
1. General
The subsystems of NAPA are divided into application subsystems and auxiliary functions. Application subsystems perform tasks that
constitute the reason for using NAPA, in other words the functions related to ship design, such as geometry definition, hydrostatics, loading
conditions, damage stability, and so on. The auxiliary functions are needed for internal functions of the system, such as project administration,
database management, and configuration of the system.
The division into subsystems is partly influenced by tradition. However, the main principle is that each subsystem is made up of functions that
share a common set of data and concepts, while connections between the subsystems are kept as narrow as possible.
However, the running of one subsystem may depend on data created within another subsystem. Above all, this applies to the definition
subsystems GM (Geometry) and SM (Ship Model), which create the basis for all the other subsystems.
The GM subsystem comprises the main geometry functions for defining ship-specific surfaces and arbitrary geometric objects, excluding rooms
and surface objects. It is required for the use of all other application subsystems in NAPA.
The hull surface definition tools can be used for any hull forms, including unconventional hull forms, such as twin-skeg hulls, floating docks,
floating offshore platforms, catamarans, trimarans, submarines, and asymmetric hulls.
A true surface representation, known as the NURBS surface, is used, as this allows each point on the surface grid to be uniquely defined.
Surfaces can be faired to the level required for manufacturing.
The main inner structures, such as bulkheads and decks, are usually presented as reference surfaces, which are further used in the definition of
rooms and surface objects (steel structures).
The object type called room provides the geometry of compartments. A room represents a closed volume that is defined by its limiting surfaces.
The shape of a room adapts automatically to changes in the limiting surfaces.
The main drawing task of NAPA is considered to be a part of the Geometry subsystem. This task contains functions which enable presenting
geometry in a graphical form for the purposes of helping the definition process, creating drawings for various uses, and for graphical verification of
geometric objects. Other graphical elements, such as text, scales, and grids can be added, including figures retrieved from the database.
In most cases, a task-specific graphical window can be used in which case there is no need to use any drawing commands.
Panel Generation and Interface is a tool for generating panels, both on the hull surface and the appendages, needed for a large set of numerical
calculations, such as:
Calculation of the flow field around a hull with the aid of Computational Fluid Dynamics (CFD) methods for both the potential flow and the
viscous flow.
Seakeeping calculations based on panel methods.
The generated panel models can be used in the Potential Flow Solver (TAHARA), the Viscous Flow Solver (RANS), and the Seakeeping 3D
Panel Method (SOUR) subsystems.
Link functions allow transferring geometric objects and drawings between NAPA and other systems. Most link functions are implemented so that
a file is generated and it can then be used as input for the target system. The most commonly used file formats are IGES and DXF.
There are in total about 40 links to and from NAPA, among them the AVEVA Marine, FORAN, and CADMATIC links.
For the purpose of standard naval architectural calculations, the most important aspect of a ship is its general arrangement, described in terms
of compartments. Various other definitions, more local in scope, are handled in their respective subsystems (for example, sounding devices in CP,
tank pairs in LD).
The SM subsystem can be used for lists of compartments and various summaries. The plans needed for general arrangement drawings are
created in the Drawing task.
5. Hydrostatics (HD)
The Hydrostatics (HD) subsystem contains functions for listing and plotting various parameters calculated from the hull form and other geometric
objects. Normally, the calculations are performed with the hull form, but any other object can be used, for instance, parts of the hull or units, such
as tug-barge combinations.
Frame areas (sectional area curves), Bonjean curves and stability data can be output as lists and diagrams.
6. Capacities (CP)
The Capacities (CP) subsystem handles sounding tables and other tables that contain quantities related to the volume or the surface area of
compartments in a ship. The tables are output as a function of filling, in which the filling can be expressed as a percentage, depth, volume, or a
sounding.
The calculations are based on the compartment geometry defined in the GM subsystem, while non-geometric information, such as contents and
density, is defined in the SM subsystem. Tables providing summaries for sets of tanks, called tank tables, are compiled in the SM subsystem.
The CP subsystem also handles the definition of sounding devices and the variable steel reduction.
At minimum, the definition of a loading condition requires a hull form and information on compartments, including their locations, properties, and
purposes. Alternatively, loads can be placed in positions given directly by coordinates as so-called 'mass loads'.
Lightweight and its distribution are either defined in LD's subtask LGDE or obtained from the Weight Calculation (WG) subsystem.
Output functions of the Stability Criteria (CR), Damage Stability (DA), Container Loading (CL), and Grain Stability (GS) subsystems are also
available in LD. Alternatively, load cases can be used as arguments in the mentioned subsystems.
The Inclining Test (INC) module handles the calculation and output of the inclining test report. The inclination can be accomplished by moving
weights or shifting loads in tanks. The measurements can be input by pendulums or devices that give the inclination directly.
Damage cases can be defined manually or they can be generated automatically for a specified subdivision.
Calculate the hydrostatic properties of the ship before, during, and after flooding.
Examine the progress of flooding by simulating the spreading of water in the ship.
Calculate the required GM for intact conditions to meet given damage stability criteria.
Calculate floodable length curves.
Calculate the subdivision index.
Calculate cross-flooding times.
Check whether loading conditions meet the requirements of intact stability criteria.
Calculate values of the minimum GM and the maximum KG of an intact ship (as a function of draught and trim) complying with the
relevant intact stability criteria.
Check whether a ship in a damaged condition meets the requirements of damage stability criteria.
Calculate values of the minimum GM and the maximum KG of a damaged ship (as a function of draught and trim) complying with the
relevant damage stability criteria.
The basis for the calculation is the GZ curve retrieved from the LD or DA subsystem. Other geometric components, such as the lateral profile,
may be required from the GM subsystem. The GZ curve can also be calculated in CR.
Openings are defined in an openings arrangement table. For loads involving containers, the effect on the lateral wind area is obtained from the
Container Loading (CL) subsystem. For grain loads, the grain shift moments are obtained from the Grain Stability subsystem (GS).
The basic geometric components are created in the GM subsystem. Calculation and output of grain shift moment curves and other data involving
grain cargo spaces only are performed in GS. Calculations with respect to a given load case are normally performed in the LD susbsystem, where
grain loads can be included in load cases.
The definition of containers can take advantage of the hull and other geometric components, and containers can be drawn in arrangement plans
or in association with the ship geometry.
Most functions are handled directly in CL. Container loads can be added as components of a loading condition and, to some extent, modified
directly in LD.
The Stability Criteria (CR) subsystem can access the modified wind area calculated in CL.
Propulsion coefficients can be calculated within propulsion calculations. User-defined constant values are used, or the coefficients measured in
model tests can be entered and used instead. Troost-B series open-water propellers and Wageningen ducted propeller series are directly
available in the propulsion calculations. You can also enter any open-water data measured in model tests or calculated with lifting line or lifting
surface programs.
All calculated values can be corrected according to the correlation factors derived from the model test results and calculations of earlier designs.
The vessel's seakeeping properties are then calculated either by the strip theory or by the 3D linear diffraction method. Alternatively, the transfer
functions measured in the model tests can be used in further calculations.
The SHS subsystem handles more than 2,000 quantities related to ship behaviour in varying sea conditions. The NAPA database effectively
stores and maintains this large amount of information, so that the user can easily view the precise data of interest. The information stored in the
database can be output in both graphical and alphanumerical forms by using the flexible report generation function.
The SHM subsystem can be used to predict ship manoeuvrability at an early design stage as required by IMO, and to produce data for
wheelhouse posters, pilot cards, and manoeuvring booklets. The subsystem can also be used for the dimensioning of manoeuvring devices,
predicting ship manoeuvrability, and partly for replacing expensive model tests and full-scale trials at sea.
Environmental conditions include the effects of wind, waves, current, and shallow water. The manoeuvring characteristics of the hull can be
calculated by several different statistical formulas, which can be corrected according to the available correlation. In addition, the coefficients
measured in Planar Motion Mechanism (PMM) model tests can be directly used in manoeuvring calculations.
A selection of turbulence models is available, including Baldwin Lomax, k-epsilon, and k-omega. The results are also available in external text
files for processing in 3D visualisation software.
The system can be used for various ship design purposes, such as calculating weights, painting areas, and the number of parts; generating data
for production planning and cost estimation; and creating classification drawings.
The model can be converted into a FE model and exported to various FEM systems. Interfacing with detail design, outfitting, and classification
societies' systems is also important in order to ensure seamless integration during the whole ship design process.
the idealisation and meshing procedure of the as-built structural model in NAPA Steel. The generated FE model includes the data of nodes,
beams, and shell elements with the properties of the structural model. Additional properties, such as corrosion reduction, derived from the
compartment model, and grouping, can also be included in the FE model.
The calculations are based on the ship model created in the SM subsystem. NAPA Steel weight data can be used for calculations and in
comparisons to the statistically derived values.
The organisation of weights and the calculation rules are defined by the user. The calculation rules can rely on the ship model for providing
measures, such as areas of structures, volumes, and bottom areas of compartments, calculated for given objects or specified subsets. The ship
model also provides the means to designate the location of weights with respect to objects in the ship. To the extent that weights and locations
are connected to the ship model, they are automatically updated when changes are made to the model.
General
This chapter describes how NAPA files and user input are organised into units, files, projects, and versions. An overview of the user interface,
help functions, and some general tools, such as the Text and Table Editors, is also given.
Table of Contents:
Project-specific data created by the user are always saved into unit 1, which is called the project database or DB1.
Secondary data, such as calculation results and drawings, are saved into unit 4, the secondary database or DB4.
Company-specific general data, such as company logos, layout templates, and general-purpose macros, are saved into unit 2, the syste
m database or DB2.
Explanation texts, examples, error messages, macros, and such, supplied by NAPA, are located in unit 7, the NAPA database or DB7.
The NAPA database is a write-protected, read-only database, and each released version of NAPA has its specific NAPA database. For example,
the NAPA database related to NAPA Release 2011.1 would be napadb111.db.
At the system level, these units can be found as four separate binary files. Supposing that the name of a project was NAPAINTRO, then the
corresponding default files would be found in the ...\napa\pr\ directory as follows:
The currently open databases can be listed with the !OPEN LIST command, for example:
TASK?>!OPEN LIST
Data belonging to the current project, such as geometry and loading conditions, are retrieved from the project database by default. Data of
potentially more general use, such as macros, can be retrieved from multiple sources.
First, data are searched for in the actual project and version, in other words amongst the data stored in the project database. If the data are not
found, they will then be searched for in the system database, and finally in the NAPA database. This allows a hierarchic build-up of, for example,
macros. Macros that have a project-specific use are to be stored in the project database, while macros of a more general nature can be stored in
the system database.
If there is a need to modify a macro supplied by NAPA in the NAPA database, it can be saved in the system database using the same name.
Thereafter, it will become the new default macro to be used. In this way the user can, in a very flexible way, customise and modify anything that
has been delivered by NAPA.
The following figure demonstrates the NAPA units and their hierarchy. The DRAW_PICTURE macro, which contains the commands needed to
create a drawing, is run using the !ADD command:
forms of a lines library can be stored as different versions in the same project. The difference between having several versions in the same
database and having different projects is that it is easier to share data between versions than between projects, and the different versions are
kept together by storing them in a single file.
The list of existing versions can be produced with the !VER LIS command:
TASK?>!VER LIS
Version created by stat description
* A 22.9.2011 NAHP Initial version
B 24.9.2011 AHP Transform test
C 3.10.2011 NAHP Testing NAPASTAR macro
The available versions can also be listed as a drop-down list in the Main Window:
One of the versions has been defined as permanent and is, therefore, marked with an asterisk (*) in the above list. This default version is
automatically assigned as current when the project is opened. To make a version permanent, use the VER ver PERM command. In the following
example, version C is made permanent:
TASK?>VER C PERM
Testing NAPASTAR macro
TASK?>!VER LIS
Version created by stat description
A 22.9.2011 NAHP Initial version
B 24.9.2011 AHP Transform test
* C 3.10.2011 NAHP Testing NAPASTAR macro
4. User interface
The NAPA user interface is a combination of command line interface and graphical user interface (GUI). Most of the basic parts of the system
have a graphical user interface. However, the command line interface remains available in all subsystems, in other words everything that can be
done using GUI can also be done by using commands.
When NAPA is started, the Command input area of the Main Window is initiated in insert mode. This means that new text is inserted at the
position of the cursor, which is displayed as a blinking vertical bar (I).
Alternatively, there is the overwrite mode, in which new text will overwrite original text. In the overwrite mode, the cursor takes the shape of a
rectangle. It is possible to toggle between these two modes by selecting:
The Command input area works in block mode. This means that text is sent to NAPA's command interpreter in blocks instead of character by
character. The Enter key sends the entire line on which the cursor is located to the command interpreter and then moves the cursor to the bottom
of the Command input area.
If a selection has been made by highlighting a part of the text, only the selected text will be sent to the command interpreter. Multiple rows can be
selected at a time. The command interpreter will disregard the prompts for as long as the prompt separator ?> is intact.
Pressing the Shift+Enter keys will result in a carriage return and a linefeed without sending the current line to the command interpreter.
Normal copying and pasting functions are available either through the Edit menu, through a right-click in the Command input area, or through the
keyboard:
All this functionality enables the Command input area to be used in a very effective way. The commands used can be retrieved from the buffer of
the Command input area, rerun, and edited very quickly.
5. NAPA commands
A typical NAPA command is formed by the command's name and, usually, a number of parameters. For example:
PLOT HULL
By default, a command equals one line of input. This can be changed by:
Commands can be abbreviated to three characters, for example COL RED and PLO HULL in the previous example.
Note! Comma and space are both valid delimiters between items in a command. However, at the end of a line a space will end the
command but a comma will continue the command on the next line.
Commands are case-insensitive, that is lower case and UPPER CASE are equal. If a text item has to be received literally, it must be enclosed in
apostrophes (' '). For example:
Apostrophes are also necessary if the text contains characters that would otherwise make it appear as separate items (space, comma,
parentheses) or if the text could be interpreted as a number.
TASK?>ADM
ADM?>!COM
A D M I N I S T R A T I V E F U N C T I O N S
This subtask is mainly concerned with project administration but handles
also
tasks related to the installation.
LIST list data about the current/selected projects/runs
INST -> list/update installation parameters
PSW change password
MESSAGE assign message
DELETE delete project(s)
END return to main monitor
REGISTER register the current project
SYNC synchronize data in the system data base
SELECT select projects
UPDATE -> update/list administrative data of the project
UNREG overwrite license entry
TIDY -> removing obsolete data from the data base
INFO collect information about selected projects
ENTER enter project available in a file
VDES change version description
EDIT enter the text editor
In the above list, there is an arrow (->) in front of three command descriptions signifying that these commands lead to the next subtask. The other
commands are active in the present subtask.
An explanation text of each command can be viewed with the command !EXP command as in the following example:
ADM?>!EXP DELETE
DELETE !
!: (opt) force deleting even if there are file errors. This option
is
mainly intended for the case that the file did not exist.
NOTE: If a new project is later created with the same name, it
is
the user's responsibility to avoid confusion with any data
belonging to the previous project.
RELEASE should be used if the project is intended to be
restored
later.
Note!: In addition to local commands, there is a set of transparent commands which can be used in any subtask of NAPA. The most
important transparent commands are explained in the chapter entitled 'Transparent commands'. The !COM ! command produces a list
of transparent commands.
The Help Viewer has been developed to allow access to all of NAPA's command syntaxes in one tool regardless of the task. The Help Viewer is
started by selecting:
Help Viewer
The Help Viewer consists of three sections. In the Task pane, different tasks can be opened in a hierarchic manner. Clicking on the folder icons
will expand and collapse the branches. On the top right-hand side, the tab control allows choosing between: Windows - Commands - Quantities
- Functions - Events. Only a few of the tasks will have further information on all of these tabs.
Selecting a line in the top-right pane will produce the corresponding syntax help description in the lower pane.
7. System messages
NAPA can give the user three types of system messages shown in the Main Window. Each message is identified with capital letter N (notice), W
(warning) or E (error) and a number. Usually also a single-row explanatory text is given, for example:
HYD?>LIS TRI
TRIMS Insufficient range for trim diagram (E 2032)
In the previous example, the error message 2032 - Insufficient range for trim diagram - is displayed. More information about a system message
can be found by giving command !EXP errnr where errnr is the number of the message. For example:
HYD?>!EXP 2032
Insufficient range for trim diagram
The trim diagram is made so that the draught range is applied at aft and
8. Text Editor
The Text Editor can be used to create and edit command sequences, NAPA macros, and documents; to write and edit text files; and to edit
NAPA descriptions in text format.
Text Editor
The list of recently opened items is available on the left-hand side for quick launch. The list view pane can be closed by clicking on the thin,
vertical arrow button in between the two panes.
The Text Editor works as a regular full screen editor and allows normal editing actions that can be found on the Edit menu:
The same functions can also be accessed through a right-click in the work area.
The following is a brief demonstration of writing and running command sequences also called macros. The commands used in the example will
be explained more thoroughly in the following chapters of this manual.
In the work area of the Text Editor, the following commands are entered:
All of the plotting commands can be run by clicking the Run button on the toolbar. They can also be run by selecting:
If the same command sequences are to be run repetitively, it would be very handy to write the commands in the Text Editor and save them as a
macro in the database for future use:
The default location to store macros, as Data Elements, is the project database of the current version. The name of the object is typed in the Obje
ct name field.
Alternatively, simply type the macro's name in the combo box on the toolbar in the Text Editor.
It is possible to add comment lines to text files by using the double 'at' (@@) sign at the beginning of the intended comment line:
@@ This is a comment.
The recommended way of working is to always type the current date and the creator's name on top of each text file and macro.
The Text Editor can also be used for editing NAPA definitions, such as geometry definitions and damage cases. In this case, the Text Editor is
used for editing the text format meaning the command input format of the definition.
Select HULLF:
Using the Get Definition button (>>) on the toolbar would have produced the same result.
Note!: When definitions have been edited, they need to be run to activate changes. Ensure that you are in the correct task before
running definitions (in the previous example, the DEF task). Running the contents of the Text Editor equals to giving the same set of
commands in the Main Window. Note that the existing definition will be overwritten without any warning.
In order to edit an object together with the objects it refers to, the asterisk (*) syntax should be used. Each asterisk denotes one level of
dependencies. For example:
>> **HULLF Edit HULLF, all curve definitions, AND point definitions.
Note! To use the asterisk (*) syntax, the command has to be entered in the Text Editor's combo box.
9. Table Editor
The table calculation module contains a wide range of functions operating on data organised in tables. The module can be accessed through the
Table Editor which allows the editing and viewing of tables in a graphical environment. Much of data in a NAPA model is organised in tables, for
example:
The different table types are identified with prefixes used in front of the table names. For example, the ARR* prefix refers to the general
arrangement and OPE* to an opening arrangement table. Any kind of table can be opened by using the Table Editor:
A table is opened by clicking the Open button and selecting the database from which the table is opened and the table type. In the following
example, the standard purposes table PAR*STD is opened from the NAPA database:
Any table can be exported from NAPA in CSV format for use, for example, in MS Excel. This is can be done by selecting:
When the List Window is open, all list output will be sent there. Several lists can be collected to the same output with the command NL (New list)
or by clicking the New list button in the List Window.
More sophisticated functionality for zooming, projections, and printing is available in the Plot and Geometry Windows, which are opened by
selecting:
Zooming and projections are available by right-clicking the mouse, and also in the corresponding menu items in both windows. Printing options
can be found on the File menu.
There are also keyboard shortcuts available for zooming and projections. All the standard keyboard shortcuts are introduced in Napa Manuals.
Tools for checking surface patches, sections, curvature, and so on, are available in the Geometry Window. These tools are similar to the tools in
the Hull Surface Editor which will be discussed later on.
12. Calculator
The basic function of the calculator is to evaluate the expressions entered as data. In addition to the usual mathematical functions, the calculator
includes a wide range of functions specific to NAPA, ranging from accessing elements in the database to intersecting geometric objects. The list
of available calculator functions can be produced with the command:
!COM C.F
An explanation of the calculator function can be viewed with the !EXP C.id command, in which 'id' refers to the function's name. For example:
TASK?>!EXP C.SQRT
SQRT(a)
EXAMPLE
SQRT(2) -> 1.4142
Most of the functions are used simply with the !CAL command. For example:
TASK?>!CAL SQRT(4)
-> 2
NAPA is an extensive package of mathematical functions and definitions, is very flexible in taking advantage of all the information available about
the ship, and allows the users to define their own macros. Numerous of functions in NAPA can be accessed from within a macro. Conventional
programming is too inefficient for generating the results needed locally, but within NAPA the geometric definition is already at hand.
A collection of commands placed in one file or data object, from where they can later be executed, can be referred to as a macro. As everything
in NAPA can be executed using commands, the macro language is a natural way of making the programme more flexible to the user. The most
efficient use of NAPA often includes creating macros or using macros written by others. For example:
!END
DR
PRO F
SEC HULL
X 42
!Z W
Each line in a macro, unless separately flagged, is considered to be a NAPA command. Programmed components, such as variables or
expressions to be replaced with a value before executing the command, begin with the 'at' (@) sign. For example:
!END
DR
PRO F
@X=REF('XREF')
SEC HULL
X @X
!Z W
NAPA Basic commands are mostly used to control the flow of macros. They do not themselves contribute anything to the project, but by
combining them with NAPA commands one can create more efficient macros. With NAPA Basic commands one can, for example, set conditional
statements (e.g. @IF), create loops (e.g. @FOR), or end the macro in the middle to control what the macro will perform (e.g. @END). NAPA
Basic commands also start with the 'at' (@) sign.
More information on macros and NAPA Basic can be found in the Napa Manuals.
The flow explained here covers only the subjects which are handled in this manual. Information on several other definitions and analyses are
available in the NAPA Online Manuals.
The following figure gives an overview of the NAPA design process and the connections between the definitions and calculations. The
abbreviations refer to the corresponding tasks.
Before starting with any definitions, some reference system parameters should be checked. It should be ensured that, for example, the
coordinate system, the curve generation method, tolerances, and so on, are set correctly. In many cases, the user organisation has defined its
own model reference system which is used when a new project is started. This ensures that the correct settings are used automatically.
Hint: Setting the frame system allows the use of frame numbers instead of coordinates in the definition of geometric objects.
A room is a closed space limited by surfaces or reference coordinates. Rooms are conjoined in a ship model to form an arrangement. Additional
properties, other than the geometry, are assigned as purposes for each room.
3. Hull geometry
The hull is normally defined in two or three parts: the fore body, the aft body, and the parallel mid body, if there is one. It is recommended to use
the default names of these parts: HULLF (fore), HULLA (aft), and HULLM (mid). The hull parts can be defined in any order.
It is noteworthy that only the positive side of the hull is defined that being the port side in the right-handed coordinate system and starboard side in
the left-handed coordinate system. The coordinate system can be changed in the REF task. This change must be made before starting with the
geometric definitions.
The main border curves and possible knuckle curves should be defined first. Primary curves are defined after main curves. Typically, primary
curves are frames but also waterlines or verticals can be selected. Secondary curves are added to finalize the grid. If frames are used as primary
curves, then either waterlines or verticals can be added, but not both. Finally, some additional space curves can be added in the most difficult
areas.
When the fore, mid, and aft bodies have been defined, the surface HULL is completed by combining these partial surfaces.
5. Hydrostatics
At this stage of the design process, most of the hydrostatic calculations can be performed quite accurately. Calculations that require the inclining
of the hull, such as MS and KN curves, however, cannot yet be carried out as the hull is still only an open object with a probably unrealistic hull
height. Therefore, we need to define a STABHULL, a room limited by the surface of the hull on both sides and by a deck above. Also, such
components as the rudder and thruster tunnels can be included in or removed from the hull.
The naming rules for planes and rooms should be considered seriously. Especially in the case of larger ships where the number of rooms can
reach several hundreds and the number of definitions thousands, it is most essential to follow good, standardised naming rules.
Rooms are defined in the Geometry Editor with which they can be directly added to an arrangement. The arrangement is actually a table of all
the rooms that the arrangement is made up of.
7. Ship model
The Ship Model (SM) task is used for working with arrangements. One ship can have several arrangements; of these, one is to be registered as
the default arrangement. If a ship's general arrangement is complicated and contains a large number of rooms, it may be easier to define several
partial arrangements first, and then combine them into a final arrangement.
Each room is assigned a purpose which specifies the room's role in the ship. These purposes can be, for example, HFO for heavy fuel oil, BW for
ballast water, FW for fresh water, and so on. The purpose of the room controls several parameters related to the room which are used later, for
example, in the Loading Conditions and Damage Stability tasks.
8. Compartment capacities
The Capacities (CP) task is used for creating tables of hydrostatic data of compartments. One compartment at a time is handled.
All needed data is retrieved from the arrangement defined in the SM task. A variable steel reduction can be defined in the PAR subtask. This
reduction will be used in the CP task instead of the one defined in the SM task. Another important definition carried out in the CP > PAR task is
the definition of sounding devices which are needed for sounding and ullage tables.
9. Lightweight
One or several lightweight versions can be created and handled in the LGDE task, which is a subtask of LD. Several definition methods are
available, however, at least the total weight and its centre of gravity should be given.
Loading cases are defined in the Loading Conditions Window. These cases are analysed according to a set of calculation arguments. Extra
attention should be paid to the calculation rule of the free surface effect.
The definitions required for criteria study include openings, margin line, profile curve, freeboard deck edge, and so on.
1. Background
2. General
3. Curve definitions with a location surface
4. Sorting definition points
5. Angle conditions
5.1. Free angle
6. Example curves
6.1. Roundings
7. Multiple intersection points between curves
8. Side conditions
9. Curve/curve syntax
10. Point objects
11. The xyz curve
12. Using naming standards
13. Exercises
1. Background
NAPA hull surfaces are general grid surfaces, which means that surfaces are controlled with curves. Hull grid curves are created by using the H
ull Surface Editor which is an easy-to-use graphical user interface for all definitions relating to the grid of curves and hull surfaces.
An explicitly defined point is regarded as the smallest element of geometric definitions. Where useful, a point can be stored as a point object in
the database and, for example, used in the definition of curves. However, points are usually added directly to curve definitions as definition points.
This chapter will concentrate on the definition of curves, whereas point objects are introduced only briefly.
2. General
Curves, as well as all other geometric objects, are defined in the DEF task which can be entered directly from the Task level by giving the DEF co
mmand. The DEF task is part of the Geometry (GM) subsystem the other parts being Ship Model (SM) and Drawing (DR). The following figure
presents the task hierarchy:
Hierarchy of tasks
In NAPA, there are two different types of curves:
Curves with a location surface; this is the basic curve type used in surface definitions.
Curves without a location surface; the xyz curve.
The default curve type is set as the GMTP parameter in the REF task. The GMTO parameter will set the polygonisation tolerance.
In other words, a curve is defined with three or four commands. They are:
The definition is finished off by giving the OK command if working in the command mode. For example:
DEF?>CUR EXAMPLE0
C?>X 22
C?>YZ (0 0) (2 3) (5 7) (10 10)
C?>OK
DEF?>
Although the location surface has to be defined before the shape of the curve, it might be easier to comprehend the process in reverse order: the
shape of the curve is first defined in a main plane and then projected onto the location surface. The location surface can be a main plane (x, y, or
z), a general plane, or a surface that is curved in one direction.
In the following example, a curve that has its location surface on the xy plane on level z=0 is created. The curve proceeds from the origin (0, 0) to
point (4, 2) through point (2, 4).
CUR EXAMPLE1
Z 0
XY (0 0) (2 4) (4 2)
In the next example, the shape of the curve is defined on the xz plane and it is projected onto a plane defined by three points.
CUR EXAMPLE2
THR (0 -1 0) (9 -0.5 4) (5 3 0)
XZ (1 1) (3 2) (4 3)
The following example consists of two curves with the same shape definition. The difference between the curves is that they have different
location surfaces. Curve EXAMPLE3 has a plane location surface at x=-10, whereas curve EXAMPLE4 has a location surface of cylinder shape
on the positive x side.
CUR EXAMPLE3
X -10
YZ (2 5) (3.4 5.5) (5 5) (6.6 4.5) (8 5)
CUR EXAMPLE4
XY (8 0) (9 4.8) (11 8)
YZ (2 5) (3.4 5.5) (5 5) (6.6 4.5) (8 5)
As can be seen from the above examples, a curve is defined by points. Points can be given:
For example:
CUR EXAMPLE5
Y 0
XZ (1 1) CUR1 (3 2.5) CUR2 CUR3 P1
Note! When defining a grid, the curves must refer to each other in order to intersect properly.
If the points have the same key (ordering) values, they will be sorted according to the order of appearance.
The following two lines will give the same result when the points are sorted according to the value of x:
XY (0 0) (1 1) (2 1.5)
XY (1 1) (0 0) (2 1.5)
On the first line, the values of x increase systematically (0, 1, 2), and the order of the points is not changed. On the second line, the second point
has a lower x value than the first point (1, 0, 2), so the order of the first two points is changed.
The order of definition points can be altered by changing the order of the characters defining the curve shape. In the following, xy has been
changed to yx, and the points on the first line will have the same order as those on the second line after NAPA has sorted the points:
Note! Changing the order of xy to yx does not change the order of coordinates given in parentheses. The order of coordinates in
parentheses is always (x y), (x z), (y z), or (x y z).
CUR EXAMPLE6
Z 0
XY (2 2) (3 4) (4.5 3) (3.5 1)
CUR EXAMPLE7
Z 0
XY * (2 2) (3 4) (4.5 3) (3.5 1)
CUR EXAMPLE8
Z 0
YX (2 2) (3 4) (4.5 3) (3.5 1)
5. Angle conditions
A curve definition can contain not only points but also angles connected to them. The following figures illustrate how angles are interpreted by
NAPA. The same applies to all main coordinate planes (xy, xz, and yz).
YZ A /45 0/ B /60 C
The side on which the slash (/) is located indicates whether the curve is 'leaving' the previous point or 'entering' the next point. For example:
angle1/ P /angle2
in which 'angle1' determines the angle before point P and 'angle2' after it.
If an angle condition is not defined, NAPA will calculate the angle using the curve generation method set in the reference system.
A free angle at a point means that the curve behaves in the same way as at an end point. The symbol of a free angle is the minus (-) sign.
A free angle is always valid on a given side of a point. On the other side of the point, the angle is determined by the free angle unless otherwise
specified. The simplest way to create a knuckle is to add a free angle on both sides of a point.
CUR FA1
Z 0
XY A B C D
CUR FA2
Z 0
XY A B -/ C D
CUR FA3
Z 0
XY A B -/ C /- D
CUR FA4
Z 0
XY A B C /- D
A special case of the free angle would be a free angle leaving and entering each definition point. This would mean that each part of the curve
between the points was a straight line. In that case, it would not be necessary to add -/ and /- to each definition point; instead, the <> syntax (or >
<) could be used, as shown below:
CUR FA5
Z 0
XY <> A B C D
6. Example curves
Before moving on, let us examine some examples in order to get a better idea of the behaviour of curves.
CUR EXA1
Z 0
XY (15 55) (55 15)
CUR EXA2
Z 0
XY (15 55) (30 25) (55 15)
CUR EXA3
Z 0
XY (15 55) 0/ (30 25) (55 15)
CUR EXA4
Z 0
XY (15 55) /-45 (30 25) (55 15)
CUR EXA5
Z 0
XY (15 55) (30 25) /- (55 15)
CUR EXA6
Z 0
XY (15 55) -/ (30 25) /- (55 15)
CUR EXA7
Z 0
XY (15 55) -/ (20 30) (30 20) /- (55 15)
CUR EXA8
Z 0
XY <> (15 55) (20 30) (30 20) (55 15)
CUR STERN
Y 0
ZX FRA, (11.832,0), /0, (9.25,0.271), (6.344,1.5), -/,
(4.663,2.7), /-, -/, (4.663,3.9), /-, -/,
(5.69,4.18), (6.8962,5.6), /90, (4.625,7.975), /-,
-/, (-4.176,9.6), /-, (-4.176,20.1)
CUR EXA11
Z 0
XY (15 55) (30 20) /- (55 15)
CUR EXA12
Z 0
YX (15 55) (30 20) /- (55 15)
6.1. Roundings
Rounding options are used to create roundings to curves. For more options, use !EXP ROUND/GEN in the DEF task.
Arbitrary roundings can be defined by applying suitable angle conditions. A rounding formed by a circular arc can be created by defining a knuckle
and equipping it with an instruction for rounding it with a specified radius or with such a radius that it connects to the next point. Roundings are
used in similar ways as angle conditions and should be applied to corner points.
In the following example FRF-ROUND there is only three points given which define a rectangle. NAPA creates the two rounding points
automatically based on the radius given with ROUND option. The other curves can refer to these points with syntax FRF-ROUND/RP/1 or FRF-R
OUND/RP-2.
A typical example would be a frame located in the area of the bulbous bow:
STEM/Z=5 Use the intersection point where the z-coordinate is exactly 5 metres.
The following example represents the situation described above. Two curves are needed: a frame for the bulbous bow and a space curve for the
upper part of the fore body:
CUR FRF5
X 82.5
ZY STEM/Z<2 /25 (1.08 2.2) 152/ STEM/Z=#4
CUR TF4
XY (81.9 0) (86 5)
ZY STEM/Z=5 /75 KNF DECKF
Note! Even though the syntax STEM/Z<4.5 kind of works with the curve FRF5 it is wrong as there are two possible points found with
this syntax. This will cause problems later on. The references to the curves should be unambiguous.
Multiple intersection points are a typical problem when the flat of bottom or the flat side curve refer to the main frame and to the stem curve or the
deck curve, as presented in the following example:
CUR FSF
Y 6.5
XZ FRF/Z=1.8 /0 (65 2.2) 65/ DECKF/X=72
CUR FBF
Z 0
XY FRF/Y=4.7 /0 (65 4.65) STEM/X=80
8. Side conditions
A side condition describes the behaviour of the surface near a curve. Its use is optional, as the same effect can be achieved by adding an angle
condition to each intersecting curve separately. It is, however, a very efficient and convenient tool for the purpose, and its use is highly
recommended, at least in the following three cases. Thus, the most important side conditions are:
If an angle condition has been given in a curve definition, it will override the angle coming from the side condition.
The below example defines the forward main frame. Side condition M means that the normal of the surface is perpendicular to direction x. It also
defines the maximum of y meaning that all other curves must be 'inside' the main frame.
CUR FRF
X 62
YZ (0 0) -/ (4.7 0) (6.5 1.8) /- (6.5 11.5)
SC M
The examples below display the most common ways of using side condition P to define flat areas, such as the flat of side and the flat of bottom
curves:
CUR FSF
Y 6.5
XZ 0/ FRF/Z=1.8 (65 2.2) 65/ DECKF/X=72
SC P
CUR FBF
Z 0
XY 0/ FRF/Y=4.7 (65 4.65) STEM/X=80
SC P
The last example displays how to use the side condition -//- to create a knuckle line:
CUR KNF
XZ (68 7.1) (85 8.5)
XY FSF -30/ (81 3.1) -90/ STEM
SC -//-
9. Curve/curve syntax
The curve/curve syntax has two functions in NAPA:
For example:
CUR WLF2
Z TF4/STEM
XY FSF (75.5 4.2) TF4/STEM
It is possible to define the shape of the curve also by referring only to STEM and then the starting angle is based on STEM only.
In the above, the second line of the curve definition means that the location surface is an xy plane at the z level where curves STEM and TF4
have an intersection point. The same syntax on the third line means that the curve is forced to end at STEM at an angle which is defined by the
current normal of the surface.
The tangent of the surface at the intersection point is defined by the curves STEM and TF4. This affects the entrance angle of curve WLF2. Curve
WLF2 has no effect on the tangent plane.
Directly as coordinates.
By reflecting an existing point.
By translating an existing point.
Along a curve at a certain coordinate.
By using an intersection point of two curves.
POI name (x y z)
For example, the syntax of a point object called P1 located at x=3, y=2, and z=1 would be:
POI P1 (3 2 1)
A new point object can be created as a reflection of an existing one when it is located symmetrically on the other side of the y plane:
POI P2 -P1
The following point object is located on curve CUR1 at the position x=18 metres:
POI P4 CUR1/X=18
The following point object is located at the intersection point of curves CUR1 and CUR2:
POI P5 CUR1/CUR2
The user can view the actual definition with the DES command. However, if the coordinate values need be checked, the LIS command is used for
point objects besides curves.
CURVE XYZ_EX
XYZ (0 1 2) P1 FRA1/TA1 FRA/Z=5
in which
Angle conditions should be also given with plane or optionally with vectors:
For more information on the xyz curve, use the !EX XYZ command at the C> prompt.
FRF The main frame of the fore body of a ship with a parallel mid body
FRA The main frame of the aft body of a ship with a parallel mid body
TRANS Transom
In general, the prefixes for frames, waterlines, and buttocks are: FR, WL, and BT. The suffixes for fore, middle, and aft are: F, M, and A.
Note!: If a naming standard has not been followed, curves can be easily renamed in the Hull Surface Editor.
13. Exercises
The definitions are started from the boundary curves of the fore body.
Exercise:: Define the following limiting curves manually by using the Text Editor.
MAIN FRAME
The default name for the fore body's main frame is FRF:
Before clicking the Run button, ensure that you are in the DEF task. This can be done by checking the prompt in the Main Window or the Text
Editor's prompt indicator.
When the definition has been run, it can be checked with the DES command in the Main Window:
DEF?>DES FRF
CUR FRF; X 62
YZ (0,0), -/, (4.7,0), (6.5,1.8), /-, (6.5,11.5)
SC , M
DEF?>
Note! As soon as the definition is accepted by NAPA, it is written and saved directly in the project database. No specific saving
command is needed when using manual commands.
Plotting commands can also be written in the Text Editor. To only run the drawing commands, highlight the required lines and click the Run butto
n.
!Z W Fit to window.
Note!: The background colour of the graphics area can be changed in the Plot Window: View > Background.... The default
background colour is black.
STEM
The default name for the fore body's centre line is STEM:
The set of drawing commands needed to view both curves in the same drawing in different colours:
!Z W Fit to window.
Define the next three curves simultaneously by typing their definitions into the Text Editor. The OK command is only needed after the last object.
The list of drawing commands is continued to see the curves in the Plot Window.
Note! New curves are always connected to the previous curves by referring to their names.
Note! The COL RND command randomly selects a colour for each object.
KNF
One last curve needs to be added before creating the preliminary surface and continuing to the Hull Surface Editor. Define this knuckle line as a
space curve:
The location plane is defined with two coordinate points instead of a coordinate plane. If it is easier to piece together, the curve is first considered
as a waterline located in z=7.1 and its shape is defined. Then the location plane is changed from the waterline to an 'inclined line' by changing z to
zx and adding the curve's end point coordinates.
Hull surface
In this and the next chapter, we will continue with the exercise to define a hull surface by using the Hull Surface Editor. First, however,
command-based surface definition is introduced and the process to define the hull, including general information relating to surfaces.
Hull surfaces are typically general surfaces, while most surfaces needed in internal geometry are special surfaces.
This hull surface should be a simple presentation of the hull i.e. no tunnel thrusters, appendages or sea chests should be modelled at this stage.
These are modelled as rooms later on. The hull surface should not be the exact steel presentation as this will be trimmed later on. To make sure
the trimming can be done without problems, the hull surface should high enough the create the intersection e.g. with the main deck.
Note! The surface type used in this manual is a patch surface. Another available surface type is the NURBS surface for which there
are special definitions and tools available in the Hull Surface Editor. NURBS surfaces are recommended to be used especially when
exporting to the Iges (.IGS) format.
Table of Contents:
If the outside of the surface is not defined, NAPA will use the positive direction of the average surface normal vector, which is 'out y' in traditional
hull forms. The information on the orientation of the surface is required when defining rooms.
In the following example, a surface named CSUR consisting of five curves, C1-C5, is created:
CUR C1
Z 0
XY (70 110) (100 130) (140 140)
CUR C2
Z 10
XY (70 175) (100 195) (140 205)
CUR C3
X 70
YZ C1 C2
CUR C4
X 100
YZ C1 C2
CUR C5
X 140
YZ C1 C2
SUR CSUR
THR C1 C2 C3 C4 C5
OUT Z
CSUR surface
The surface should be generated and prepared with the PRE CSUR command before viewing.
DEF?>DES CSUR
SUR, CSUR, P
THR C1, C2, C3, C4, C5
OUT, Z
More information on the surface can be viewed with the DES *CSUR command, in which the asterisk (*) means 'also show the curves the surface
refers to'. This command gives us the following printout showing how the surface was defined:
DEF?>DES *CSUR
CUR C1; Z 0
XY (70,110), (100,130), (140,140)
CUR C2; Z 10
XY (70,175), (100,195), (140,205)
CUR C3; X 70
YZ C1, C2
SUR, CSUR, P
THR C1, C2, C3, C4, C5
OUT, Z
Basically, it is required that all intersections between curves are explicit, that is, one curve refers to the other. Otherwise, intersection points have
to be found geometrically, which may fail in some cases. For example, the following definition would not necessarily work because there are no
explicitly defined intersection points between curves C1, C2, and C3:
CUR C1
Z 0
XY (70 110) (100 130) (140 140)
CUR C2
Z 10
XY (70 175) (100 195) (140 205)
CUR C3
X 70
YZ (110 0) (175 10)
To NAPA, these curves simply appear to have the same coordinates at their end points, and without a direct reference to each other NAPA will
interpret 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 curve by means of the syntax 'curve1/point'.
Curves should be defined in topological order which, in practice, means that only the first curve has no references to other curves. The
second curve refers to the first one and the third curve to the first and/or the second curve. There are two arguments that justify this kind of a
principle:
The situation where first curve refers to the second curve, the second curve to the third curve and third curve to the first curve is called
cross-referencing. Cross referencing causes errors which should be solved before continuing.
1.2. Patches
The previous example surface CSUR has two patches. A patch is a finite element of a surface, and a surface is a collection of patches. A patch
is an area which is limited by the nearest curves in a grid. A grid is a collection of curves used in general surface definition.
Patches should always have four sides. If a surface element has more than four sides, it will be divided as presented in the below figure. This will
be done automatically at patch surface preparation. However, for high-quality fairing it is not recommended to rely on this automatic function, as it
may not result in the best possible division and can cause discontinuity points.
At this stage, the following main principles should be taken into account:
Definition points should be supported. This means that they should be in the intersection points of curves.
An ideal grid is a harmonic set of quadrate patches. These patches can be very large in rather plane areas. Smaller patches are needed
in areas that have a strong curvature.
In the final fairing of the hull, all explicitly defined points (with x-, y-, and z-coordinates) have to be adjusted separately causing additional
work. For this reason, it is recommended to keep the number of these points to a minimum. Extra points can be avoided by means of a
thoroughly planned topology between curves.
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. A total of 48 parameters are needed to describe each patch. These parameters are:
The ideal shape of a patch is a rectangle, no twisted nor sharp corners and all the points should be supported, especially in high curvature areas.
The following example will show what happens, if the grid is not fullfilling these conditions and how to solve it.
These surfaces are defined as independent objects and then combined to form the final hull. If higher quality is required, the curves should
continue over the borders of the surface to avoid discontinuity points and gaps. The hull parts can be defined in any order. In the following
example, the fore body HULLF is defined first.
The definition of each hull part is started with defining the surface limiting curves:
Next, primary curves (frames, waterlines, and buttocks) are defined to give the surface some shape and to control the reference curves. Only one
type of primary curve should be selected. When using frames, 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
purpose of such a curve is to stabilize the longitudinal waterline curves, which will be defined later, and to give them a good direction when
coming into the bilge radius.
Once the definition curves have been defined and they have their correct shapes, secondary reference curves are added. In this case, the
selection can be made between waterlines and verticals. Waterlines WLF1 and WLF2 are added in order to create a reasonable grid of the
surface:
The surface is finalized for project purposes by adding some curves in the most difficult, high-curvature areas. As the NAPA patch representation
needs to be more precise, meaning smaller patches in areas that have a lot of changes in the surface form, we add (reference) space curves
TF1-TF5:
The fore body is now finished and its surface definition looks as follows:
SUR HULLF
THR FRF STEM DECKF FBF FSF,
KNF FRF1 FRF2 FRF3 FRF4,
FRF5 FRF6 WLF1 WLF2 TF1,
TF2 TF3 TF4 TF5
To generate the actual surface from the grid, preparation should be carried out before viewing the surface:
PRE HULLF
PLO HULLF
The last surface part to define is HULLM which, in practice, connects the main frames FRF and FRA with straight lines. If the naming standard is
followed, then the Hull Surface Editor will create the mid body quite automatically. The method is explained in more detail later in the section
entitled HULLM.
2.4. Exercise
Exercise: Start the definition of the fore body HULLF using the curves defined in the previous exercise
Once run, the definition can be retrieved from the database with the DES HULLF command. Remember to prepare the surface also!
The trim command can be used inside SUR or with GEN commands. The difference is that surfaces generated with GEN are not updated
automatically when the original surfaces change. Therefore it is recommanded to use SUR:
SUR HULLA+SKEG
TRIM >HULLA >SKEG
OK
Hull trimmed with a skeg, result on the left and parts on the right
4. Useful commands
The following commands can be used to draw the surface grid, update the surface, generate the surface from the grid, and draw the surface:
GRI hullf
UPD hullf
PRE hullf
PLO hullf
Note! The surface will not update automatically until the prepare command has been used. Notice the difference between the GRI and
PLO commands; GRI is for the curves, PLO for the surface.
While plotting the curves and the surface, useful shortcut keys that can be used with the graphics areas are:
3 Interactive projection, rotate the view with left click, end rotation with right click
These shortcutkeys are not commands put can be used with any graphic areas in NAPA. Click the graphic area to set the focus first.
The following commands can be used to catalogue the contents of a database, to view which curves and surfaces have been defined and when.
The CAT command produces a list of all geometric objects. The options TYPE=C and TYPE=S only show curves or surfaces:
DEF?>CAT
Name Description Date Time
DECKF 2011-08-04 13:41
FBF 2011-08-04 13:41
FRF 2011-08-04 11:24
FSF 2011-08-04 13:41
HULLF 2011-08-07 16:15
KNF 2011-08-04 13:49
STEM 2011-08-04 11:30
7 items listed
DEF?>CAT TYPE=C
Name Description Date Time
DECKF 2011-08-04 13:41
FBF 2011-08-04 13:41
FRF 2011-08-04 11:24
FSF 2011-08-04 13:41
KNF 2011-08-04 13:49
STEM 2011-08-04 11:30
6 items listed
DEF?>CAT TYPE=S
Name Description Date Time
HULLF 2011-08-07 16:15
The DES command can be used to view the description of an object, for example HULLF:
DEF?>DES HULLF
SUR, HULLF, P
THR FRF, STEM, DECKF, FSF, FBF, KNF
Table of Contents:
Parallel to the graphical views in several projections, the geometric components can be viewed and modified alphanumerically. The modifications
made in the graphical mode can be mixed freely with the changes made alphanumerically.
The surface and the definition curves created or modified with the Hull Surface Editor are stored in the NAPA databases as standard descriptions
by clicking the SAVE button. Note that by default changes are saved in Hull Surface Editor's runtime memory only. Use of the saving function is
required to store the changes in the project database. Using standard descriptions enables using any traditional means of manipulating also
these. In addition to the traditional command mode, options are available for storing backup copies and for multilevel undo operations.
Hint: When hovering the mouse pointer over a button or a text field in the Hull Surface Editor, tool tips appear providing additional
information.
3. Options
The default options of the Hull Surface Editor, such as colours, visualisation, and tolerances, can be set by selecting:
The Geometry Editing Options dialog box is divided into a number of tabs according to various functions. Only the Visuals tab is presented
here; the rest of the options and settings are explained in the Napa Manuals, see Hull Surface Editor chapter Setting Options.
Note! Saving the settings will save the options in the system database according to NAPA user names, thus allowing each user to have
their own specific settings.
On the Visuals tab, you can set the visual aspects of the different line types and markers. Colour is controlled by the screen colour index,
symbols by the symbol index. Size is controlled according to the ship scale (a positive value) or the drawing scale (a negative value).
The user can select the default background colour, the number and projections of default graphic areas to be opened, and which definition points
are shown.
Note! An important selection, at least for beginners, is to select the Show secondary points option as this will show whether
references exists between curves.
4. Toolbar rows
Toolbar functions are organised according to the hierarchy of surface components:
The top row contains input fields and buttons controlling the current surface in general, and a main selection of visible tools.
The middle row contains tools needed for manipulating the current curve or point object.
The third toolbar row shows the current node of the current curve. The third row can also show different sets of buttons according to
choice. These can be selected by clicking one of the following three buttons
It is better to use independent surfaces only, and not combined surfaces even though that is also possible. Modifying combined surfaces requires
attention to ensure that the right surface part is being updated.
, or
Use the keyboard keys PgUp or PgDn.
Note! The Role in Surface selection should always be set as Primary when working with patch surfaces. This definition is related to
NURBS surfaces only and is used to assign classes to grid curves.
, or
Use the keyboard arrow keys > and <.
The definition of an active point or a node is shown in the Definition combo box located in the third toolbar row:
Note! The graphical representations of definition points and nodes (that is, reference points) are different. If a position represents both a
definition point and a node, then multiple clicking will alternatively activate the node or the definition point.
8. Nodes
A node represents the intersection of curves. One of the curves must have a reference to the other. A definition point, which is also available in a
node, has restricted degrees of freedom: when the point is moved, this will be done in a way that does not violate the location surface of the other
curve.
If a node has no definition point, one can be created by 'fixing' the node. This can be done by activating the node and selecting Fix Node from the
menu that appears when the mouse is right-clicked, or by selecting:
If the node and the reference are in the wrong order, select Reverse from the right-click menu to change the order, or use the shortcut key R.
If there are definition points near the node, but not exactly in it, the node can be 'cleaned' in order to place the definition points exactly in the node.
This can be done by activating the node and selecting Clean Node from the right-click menu or by selecting:
9. Focus
Focus defines where keyboard input is directed. The section of the graphics area having keyboard focus is highlighted with borders around it.
Focus can be switched between the four sections of the graphics area by clicking with the mouse.
10. Locator
A graphical tool called the Locator is available for designating locations and as a precision pointer. It has a location in the ship coordinate system,
and it is displayed in all views by a symbol, the properties of which can be modified. By default, the Locator is represented by a large plus (+) sign
and is located at the origin.
The Locator can be moved by dragging it in any of the views or by typing its location in the coordinate fields. Simply moving the Locator will never
affect the surface, however, it may be relevant for a subsequent editing function.
Fix will create a new point on the active curve at the position of the Locator without changing the form of the curve.
Add will add a new point to the active curve at the position of the Locator.
Pick will position the Locator (x, y, z) on the curve in the current view.
11. Menus
The menu bar of the Hull Surface Editor has menus for manipulating different types of objects: curves, points, nodes, and angles. The correct
type of object needs to be active for the menu to be useful. Right-clicking in the graphics area will make the relevant menu appear.
Points and point objects can be selected and dragged to new locations by holding down the left mouse button when pointing and dragging the
point or point object.
The behaviour that will occur depends on the current Options settings and how the mouse is used. The following alternative actions are available:
A Selection is made by a fast single click with the mouse at the location of interest.
When the left mouse button is clicked at a location, the most primary curve or point object at that position is selected. Further clicks at the same
location will select the following curves in the order of dependencies until all curves at that location have been cycled through. Then the selection
will start over from the first curve. If the mouse is moved to a new location, the selection is started anew from the most primary object.
A simple Move starts when a coordinate point or point object is current and the left mouse button is clicked on the highlighted point and held
down. A change in the shape and colour of the cursor will indicate the beginning of movement action. The point moves with the mouse until the
mouse button is released.
Note! Pressing the Shift key when dragging will restrict the change to only one coordinate at a time, whereas if the Ctrl key is pressed,
no node constraints are applied.
Many parameters that control the moving of points by using the mouse can also be controlled by means of options set in the Options dialog box.
12.2. Using the keyboard to change the active curve and move points
An active curve can be selected for editing from the surface with the keyboard as follows:
Key Command
Delete, D, d Deletes the current point with the options defined in the Options dialog box.
C, c Cleans the current node; the node point nearby is fixed to the reference point.
+ Rotates the angle counter clockwise by a step defined in the Options dialog box. In case the angle was not fixed earlier, an
angle condition is added.
B, b Selects the previous node on the active curve and makes the intersecting curve at the node active.
V, v Selects the next node on the active curve and makes the intersecting curve at the node active.
The active point or point object can be moved by using the arrow keys. Note that the movement action is valid for the active point on the active
curve in the view of the graphics area that has the keyboard focus. The default step of changes can be set in the Options dialog box.
The direction of change depends on the active projection. See the active view and decide which key to use for moving based on this view.
Arbitrary 3D views may be used for moving the points as well, but the direction of motion is predefined as follows:
The Up and Down keys together with the Alt key always work on the z-coordinates.
The Up and Down keys alone will act as 'zoom in' and 'zoom out'.
The Left and Right keys increase and reduce the y-coordinates by default, however, if the Alt key is pressed down, the action will affect
the x-coordinate.
Note! Pressing the Shift key together with the arrow keys will create a ten times smaller movement, whereas pressing the Ctrl key will
create a ten times larger movement.
Many parameters that control the moving of points by using the keyboard can also be controlled by means of options set in the Options dialog
box.
The following shortcut keys are valid for almost all NAPA graphics windows, such as the Plot and Geometry Windows:
Key Command
2 Interactive zooming.
3 interactive projection.
4 Real-time zooming.
The text definition of an active curve can be displayed by clicking the Text Window button
or by selecting:
Changes can be applied by typing them in and then clicking the Apply button which sends the changes to the Hull Surface Editor. The actual
curve definition can be retrieved from the Hull Surface Editor into the Definition editor box by clicking the Revert button.
By default, only one curve definition is visible in the Text Window at a time. However, the previous definitions can be maintained and new
definitions added after them by clicking the Keep button.
The curve class is related to NURBS surface and only primary should be used with patch surface.
Note! When a definition is applied, the previous definition is replaced with the new definition. In case there is a formal error in the
definition, or the definition cannot for some reason be applied, then the entered definition is replaced with the last proper definition of
the current curve.
New points can be created on the active curve by pressing and holding down the Alt key and then clicking on or close to the active curve with the
left mouse button. When using the mouse to add new points, the projection should be a 2D view and not 3D.
Pressing the Alt key and clicking on an existing definition point will delete the point.
Alternatively, the Locator can be used to add or fix a new point to the current curve.
The current point can also be deleted by pressing the D or the Delete key, or by selecting Delete from the Point menu.
The surface edited in the Hull Surface Editor is only saved to the project database by clicking the Save
button. Note that changes will be lost if the Save button is not clicked.
Exercise: The following subparagraphs cover step-by-step instructions for defining surfaces HULLF, HU
LLA, and HULLM. Start this exercise by opening HULLF in the Hull Surface Editor.
13.1. HULLF
13.1.1. Frames
We will start with frames which are selected to be the definition curves. First, new curves are added to the surface and are then manipulated one
by one to give them their correct shapes and locations. New curves can be added by selecting:
Note! When working with patch surfaces, the definition curve type is always set as Primary. Reference curves can also be Primary cur
ves. The other curve types are only applied to NURBS surfaces.
The Location Plane can either be an x-, y-, or z-coordinate, and its location can be defined as a reference to an existing node, definition point, or
locator. The Coordinate Value field can be used to give the location coordinate manually.
Another option would be to use the Range which will add several curves between the defined minimum and maximum coordinates and according
to a set step between the curves.
Curve Identification will define the name and optional description of the new curve. Automatic indexing can be used by selecting the Find first
free index for the name option (for example, FRF1, FRF2). The Append coordinate value to the name option will add the current coordinate
value in the name of the new curve (for example, FRF65.0, FRF75.5).
The default prefixes for the curves are FR for frames (x-curves), WL for waterlines (z-curves), and BT for buttock lines (y-curves). The added third
letter is taken from the last letter of the surface's name, for example in HULLF it would be F. The default name can be changed manually, and the
resulting name of the curve can be seen in the right-hand side Curve Name text field with grey background.
A Description of the curve and a Side Condition can optionally be added in the curve definition, if needed. These can also be added and
modified later.
The new curve is created by clicking either the Create or the Apply button. The only difference between these is that 'Create' will close the dialog
box but 'Apply' will leave it open for the next curve definition.
FRF3 to x = 79
FRF4 to x = 81
FRF5 to x = 82.5
FRF6 to x = 83.7
The x-coordinates can be selected directly from the graphics or they can be entered manually in the Coordinate Value field.
in the Hull Surface Editor to save the new definitions in the project database. It is recommended to do this after each change.
Once all the frames have been defined, the grid should look like as in the following figure:
The next step is to modify the shapes of the frame curves. We will start with FRF1; activate it by clicking it on the screen.
The active curve's definition can be viewed in text format in the Text Window which is opened by clicking the Text Window button
. The definition visible in the Text Window will change interactively when the active object is changed on the screen. The definition of FRF1 is:
Next, we modify the definition in the Text Window and then activate the changes by clicking the Apply button.
The double asterisk (**) in front of the curve's yz definition signifies that the curve's points are sorted according to the shortest distance between
the points. As this default definition can sometimes cause problems, we remove the asterisks. We also remove the references to DECKF and
STEM as we only need the curve between FBF and FSF. The resulting new definition and curve shape can be seen in the following figure:
Curve FRF2 requires two more definition points to assume the correct shape. The new points are added interactively by clicking the curve and
pressing the Alt key. The point locations can be moved using the mouse on screen or by manipulating their definitions in the Text Window. Once
done, the curve description and shape should look as follows:
Furthermore, curve FRF4 requires additional definition points and also an angle condition to define how the curve begins from STEM. The angle
condition can be added manually or by using the Hull Surface Editor's angle condition fields, as in the following figure:
Curves FRF5 and FRF6 also require further modification because they are located in the bulb area and only the lower parts of the curves are
needed.
Both of these curves have three intersection points with the STEM curve, two of which are to be used. Some additional definition points and angle
conditions also need be given to provide the curves their correct shapes. The following definitions can be used:
Hint: You can view several curve definitions in the Text Window concurrently by clicking the Keep button.
After all the above modifications have been carried out, the frame curves should look as follows:
13.1.2. Waterlines
Once the primary curves have been created, we can continue with secondary curves which, in this case, are waterlines.
Exercise: Define waterlines WLF1 and WLF2 by using the Create new curve dialog box. WLF1 is
located in the intersection of FSF/FRF1 and WLF2 at the height of the point where the STEM curve turns
above the bulb (z 4.4).
The curves need to start from FSF instead of FRF. Also, some angle conditions need to be added in order to better control the shape of the curve.
Note that curve WLF1 only refersto FSF in the xy definition as now the entrance angle is calculated from the flat of side only fulfilling the plane
side condition. If there was a reference to FSF/FRF1 also in the xy line, the entrance angle would be calculated from both curves resulting in an
incorrect angle.
The HULLF surface can now be finalized with some additional space curves which are added to the bulb area where the surface's shape varies
the most. These curves are first created manually by using the Text Editor.
Exercise: Define the additional space curves as shown in the following example, and add them to the
HULLF surface.
After you have run the curve definitions in the DEF task, the curves still need be added to the HULLF surface. This can be done manually by
adding the curves' names to the surface definition or by using the Hull Surface Editor. When HULLF is active, select:
Add the curves one by one by first clicking the Browse button
in the Add Curve dialog box and then selecting the curves from the database. Click the Apply button to add the curves to the surface. Remember
to save the surface after all the curves have been added.
New curves can also be added to the active surface by typing the definition directly into Hull Surface Editor's Text Definition Window.
The definitions of the HULLF surface and the curves it refers to can be viewed with the DES **HULLF command:
DEF?>DES **HULLF
CUR FRF; X 62
YZ (0,0), -/, (4.7,0), (6.5,1.8), /-, (6.5,11.5)
SC , M
CUR STEM; Y 0
XZ * FRF, -/, (80,0), 90/, (84,2.2), (82.2,4), 90/,
(81.7,4.4), (81.9,5), /-, (85.5,11.5)
CUR FBF; Z 0
XY FRF/Y=4.7, (65,4.65), STEM/X=80
SC , P
CUR KNF
XZ (68,7.1), (85,8.5)
XY FSF, -30/, (81,3.1), -90/, STEM
SC , -//-
CUR FRF2; X 75
ZY FBF, (4.2,2.2), (4.582,4.4), KNF, DECKF
CUR FRF3; X 79
ZY FBF, (2,2.2), (2.05,4.4), KNF, DECKF
CUR FRF4; X 81
ZY STEM, /12, (1.3,2.2), (1.07,3.35), (0.7,4.4),
(0.69,4.9), KNF, DECKF
CUR FRF1; X 65
YZ FBF, FSF
CUR TF4
YX (81.9,0), (86,5)
ZY STEM/Z=5, /75, KNF, DECKF
CUR TF1
ZY STEM/WLF1, WLF2/FRF3
XZ WLF2/FRF3, FRF4, FRF5, FRF6, STEM/WLF1
CUR TF2
ZY FBF/FRF3, STEM/WLF1
XZ FBF/FRF3, FRF4, FRF5, FRF6, STEM/WLF1
CUR TF3
ZX FRF4/TF1, STEM/Z=4
ZY FRF4/TF1, STEM
CUR TF5
SUR, HULLF, P
THR FRF, STEM, FBF, FSF, DECKF, WLF1, WLF2, KNF, FRF2,
FRF3, FRF4, FRF5, FRF6, FRF1, TF1, TF2, TF3, TF4, TF5
13.2. HULLA
Our next step is to define the aft body, the default name of which is HULLA.
Exercise: Define the limiting boundary curves and add them to surface HULLA as shown in the following
figure.
We will start the definitions manually in the Text Editor:
The definition process of HULLA proceeds in the same way as the definition of HULLF: after boundary curves, we will define frames. The curves
are added in:
Exercise: Create frame curves in the Hull Surface Editor and modify them to their correct shapes as
shown below.
The locations of the curves are as follows:
Curve X location
FRA1 0
FRA2 2.3
FRA3 2.5
FRA4 2.9
FRA5 STERN/FBA
FRA6 7
FRA7 11
FRA8 17
FRA9 20
Once the curves have been added, their shapes are modified. The final curve definitions after modifications should look as shown below:
CUR FRA1; X 0
YZ STERN, /4, (1.377,4.235), (3.05,4.851),
(4.603,5.895), KNA, DECKA
CUR FRA6; X 7
YZ FBA, (2.9,1.4), (3.77,2.64), (5.194,4.418),
(5.811,5.588), KNA, DECKA
CUR FRA7; X 11
YZ FBA, (5.088,1.282), (5.659,2.468), (6.08,4.17),
(6.267,5.413), KNA, DECKA
CUR FRA8; X 17
YZ FBA, (6.2,1.146), (6.446,2.212), FSA
CUR FRA9; X 20
YZ FBA, (6.306,1.051), FSA
Alternatively, you can create new curves in the Hull Surface Editor using the constant z-coordinate and then modify the definition in the Text
Window. This method is used in the following examples.
Next, we will create the WLA2 curve in the same way as WLA1 with the exception that the preliminary z-coordinate is 2.8:
Sometimes it may be difficult to visualise the location plane. In these cases, automatic modification can be used by selecting:
Following this, NAPA will automatically modify the z plane to an xz plane with coordinates. From here on it is easy to further modify the
coordinates or add references with coordinates:
Provided that you have successfully defined all the above curves, your HULLA surface should now look like this:
Some additional space curves are still required in areas where the shape of the surface is more curved. Furthermore, we can also detect some
five-sided patches which can easily be divided into four-sided patches using additional curves.
Exercise: Create the required additional space curves and add them to the definition of HULLA as
instructed below.
Space curves can be created in the same way as waterlines. Alternatively, you can close the Hull Surface Editor, type the definitions in the Text
Editor, and add the curves to the surface later by using the Hull Surface Editor or by adding the new curves to the definition of HULLA.
Now the HULLA surface is completed and can be reopened in the Hull Surface Editor:
CUR FRA; X 22
YZ (0,0), -/, (4.7,0), (6.5,1.8), /-, (6.5,10)
SC , M
CUR STERN; Y 0
XZ * (-2.8,10), /-, -/, (-2.8,7.1), -/, (-2.4,4.4), /-,
(0,4), (2.3,3.5), -90/, (3.2,2.8), -/, (2.5,1.85),
/-, -/, (2.5,1.15), /-, 0/, (5,0), FRA
CUR DECKA; Z 10
XY STERN, /90, -/, (-2.4,4.7), /-, 0/, (15,6.5), FRA
CUR FBA; Z 0
XY STERN/X=5, (11,2.8), 0/, FRA/Y=4.7
SC , P
CUR FRA1; X 0
YZ STERN, /4, (1.377,4.235), (3.05,4.851),
(4.603,5.895), KNA, DECKA
CUR FRA6; X 7
YZ FBA, (2.9,1.4), (3.77,2.64), (5.194,4.418),
(5.811,5.588), KNA, DECKA
CUR FRA7; X 11
YZ FBA, (5.088,1.282), (5.659,2.468), (6.08,4.17),
(6.267,5.413), KNA, DECKA
CUR FRA8; X 17
YZ FBA, (6.2,1.146), (6.446,2.212), FSA
CUR FRA9; X 20
YZ FBA, (6.306,1.051), FSA
CUR WLA1
XZ FRA3/Z=1.5, FRA/Z=1
XY FRA3, FRA4, FRA5, FRA6, FRA7, FRA8, FRA9, FRA
CUR WLA2
XZ STERN/Z=2.8, FSA/FRA9
XY STERN, FRA5, FRA6, FRA7, FRA8, FSA/FRA9
CUR WLA3
XZ TRANS/Z=5, FSA/FRA8
XY TRANS, 20/, FRA1, FRA2, FRA5, FRA6, FRA7, FSA/FRA8
CUR WLA4
XZ TRANS/Z=6, FSA/Z=5.2
XY TRANS, FRA1, FRA2, FRA5, FRA6, FRA7, FSA
CUR TA1
XZ FRA3/Z=1.7, FRA5/WLA2
XY FRA3, FRA4, FRA5/WLA2
CUR TA2
XY TRANS/Y=1.3, /0, FRA5/WLA2
XZ TRANS, FRA1, FRA2, FRA5/WLA2
SUR, HULLA, P
THR STERN, DECKA, FRA, TRANS, FBA, FSA, KNA, FRA1, FRA2,
13.3. HULLM
With HULLF and HULLA completed, it is time to connect these two parts with the parallel mid body HULLM. In practice, this is done by connecting
FRF and FRA with straight lines. If the naming rule has been applied, the Hull Surface Editor will create the parallel mid body HULLM quite
automatically.
Note! If the ship does not have a parallel mid body, it is not necessary to define FRF and FRA at all. Instead, the main frame can be
called FRM, which is used in both HULLA and HULLF.
Exercise: Create the parallel mid body HULLM according to the following instructions.
The parallel mid body HULLM can be created by using a pre-defined template available in NAPADB. The template is launched by selecting:
Hull Surface Editor: File > New from template > HULLM//NAPADB
This selection will create four straight lines between FRA and FRF:
Note! The curves that are referred to but not used in the current surface are indicated by default by the green colour in the Hull Surface
Editor.
As we continue, only some minor modifications are required. For instance, the deck line DECKM connects FRA and FRF. However, the curve is
not horizontal because the deck height changes from 10 metres to 11.5 metres at FRF. Thus the definition of DECKM needs to be modified:
The final definition of HULLM and its curves is presented below. Note that curves FRF and FRA were already defined with HULLF and HULLA
and thus they can now be used in the definition of HULLM.
CUR CLM; Y 0
XZ FRA, FRF
CUR FBM; Z 0
XY FRA/FBA, /-, -/, FRF/FBF
SC , P
CUR DECKM; Z 10
XY FRA, FRF
CUR FRA; X 22
YZ (0,0), -/, (4.7,0), (6.5,1.8), /-, (6.5,10)
SC , M
CUR FRF; X 62
YZ (0,0), -/, (4.7,0), (6.5,1.8), /-, (6.5,11.5)
SC , M
SUR, HULLM, P
THR CLM, FBM, FSM, DECKM, FRA, FRF
This concludes our exercise of defining hull surfaces HULLF, HULLA, and HULLM.
Once the grid has been defined, it is time to check the results. First, the surface has to be updated and prepared for patch representation by
clicking the Update
button in the Hull Surface Editor. Generally speaking, NAPA creates a mathematical representation of the patches. If the patches can be created
without problems, NAPA will display the preparation status "No errors registered for HULLF". However, if any problems occur, the same popup
window will inform of the nature and location of the problems. Should this happen, continue with the surface definition and retry the preparation
until the surface is flawless.
Exercise: Update and prepare all the hull parts, HULLF, HULLA and HULLM, and ensure that there are
no fatal errors.
The hull surface can be intersected using the drawing tools available in the Draw Tools toolbar that is displayed by clicking the Draw Tools
button:
After having selected the drawing options and having set the drawing properties by clicking the Drawing Properties
button, the drawing can be created in the active drawing area by clicking the Draw
button. To revert to the surface grid, click the Draw button on the Surface toolbar (the first row of buttons).
Note! Drawing properties are stored in the system database for each user. The stored properties are also applied when working in the
Geometry Window.
The actual drawing is made in the active view, which is selected with the mouse. The drawing mode is selected from the View menu. It will open
by default in 3D mode, but can be set to OpenGL with Lighting mode to view a rendering of the hull.
Exercise: Define your own drawing properties and check the hull parts by using different intersections
and the OpenGL mode.
New calculation sections will be created for the object if the surface has been modified and prepared.
Note! These calculation sections will not be saved unless the surface is saved when exiting the Hull Surface Editor.
Before defining rooms, the ship's main dimensions must be updated in the reference system to correspond with the actual hull geometry. The
initial main dimensions were given when the project was started but they are unlikely to be up-to-date anymore.
TASK?>REF
REF?>LIS
TDWL 4.8 design draught initial
AP 0 aft perpendicular initial (HULL/TDWL ->-2.488)
FP 82 fore perpendicular initial (HULL/TDWL ->81.802)
LREF 82 reference length initial (FP-AP ->82)
XREF 41 reference point initial ((FP+AP)/2 ->41)
XMID 41 largest frame initial
XMIN -4.1 aft end initial (HULL ->-2.8)
XMAX 86.1 fore end initial (HULL ->85.5)
LOA 90.2 length over all initial (XMAX-XMIN ->90.2)
BREF 13 reference breadth initial (HULL/TDWL ->13)
BMAX 13 maximum breadth initial (HULL ->13)
TMAX 0 maximum draught undefined
HMD 0 height of main deck undefined
HSD 0 subdivision draught undefined
HMAX 24 total height initial
SHEL 0.01 shell thickness initial
KEEL 0.01 keel initial
RHO 1.025 seawater density initial
As can be seen, all the above values are initial. The values calculated from the geometry are presented in parentheses in the last column. Update
the entire reference system by using the UPD command:
REF?>UPD
REF?>LIS
TDWL 4.8 design draught initial
AP -2.4882 aft perpendicular calculated HULL/TDWL
FP 81.8016 fore perpendicular calculated HULL/TDWL
LREF 84.2898 reference length calculated FP-AP
XREF 39.6567 reference point calculated (FP+AP)/2
XMID 39.6567 largest frame calculated HULL/TDWL
XMIN -2.8 aft end calculated HULL
XMAX 85.5 fore end calculated HULL
LOA 88.3 length over all calculated XMAX-XMIN
BREF 13 reference breadth calculated HULL/TDWL
BMAX 13 maximum breadth calculated HULL
TMAX 0 maximum draught undefined
HMD 0 height of main deck undefined
HSD 0 subdivision draught undefined
HMAX 24 total height initial
SHEL 0.01 shell thickness initial
KEEL 0.01 keel initial
RHO 1.025 seawater density initial
The initial values have now been replaced with the calculated values. One more modification is required before leaving the reference system: in
this example ship, the location of the aft perpendicular (AP) should be at the origin. The other values dependent on AP will be automatically
updated:
REF?>AP 0
REF?>LIS
TDWL 4.8 design draught initial
AP 0 aft perpendicular given (HULL/TDWL ->-2.488)
FP 81.8016 fore perpendicular calculated HULL/TDWL
LREF 81.8016 reference length calculated FP-AP
XREF 40.9008 reference point calculated (FP+AP)/2
XMID 40.9008 largest frame calculated HULL/TDWL
XMIN -2.8 aft end calculated HULL
XMAX 85.5 fore end calculated HULL
LOA 88.3 length over all calculated XMAX-XMIN
BREF 13 reference breadth calculated HULL/TDWL
BMAX 13 maximum breadth calculated HULL
TMAX 0 maximum draught undefined
HMD 0 height of main deck undefined
HSD 0 subdivision draught undefined
HMAX 24 total height initial
SHEL 0.01 shell thickness initial
KEEL 0.01 keel initial
RHO 1.025 seawater density initial
REF?>END
Leave the REF task using the command OK to save all changes.
A special window is available for viewing the standard body plan which shows the profile, the sectional area curve, and the standard sections in a
fixed size. This window is opened by selecting:
Furthermore, the Napa Manuals include an entire chapter dedicated to the Hull Surface Editor and its technical details.
Hydrostatics
A ship's hydrostatic quantities in the upright position are calculated, listed, and plotted in the HYD task. The task is easy-to-use yet offers a range
of alternatives for modifying list layouts, calculation arguments, plots, and so on.
List layouts can be fully controlled with the LQ (list quantities) and TOO (table output option) commands, thus enabling the user to compose
customised lists. Output is handled in more detail in the chapter entitled Output.
Table of Contents:
1. Calculation sections
2. Hydrostatics Window
3. Arguments
4. Numerical output
4.1. Default list of hydrostatics
4.2. Loading scale
4.3. Trim diagram list
5. Graphical output
5.1. Hydrostatic curves
5.2. Loading scale diagram
5.3. Trim diagram
6. Stability Curves
6.1. Using the STAB task
1. Calculation sections
The hydrostatic calculations in NAPA are based on calculation sections. Calculation of volume and other hydrostatic quantities for any object
(room, closed surface or HULL) is done based on the calculation sections. The actual calculation is based on the areas of the sections which are
interpolated to get the volume.
Calculation sections are created automatically for any object when these are needed. The creation of calculation sections can be controlled by the
user or if nothing has been defined by user NAPA creates the sections with default options. By default the calculation sections are created so that
in areas where the shape is changing there are more calculation sections. In practice this means that in a traditional ship there are many
calculation section in the aft and bow area, whereas in the parallel midship there are fewer calculation sections. The amount of calculation section
can be controlled as part of the geometry definition with CSE command. For further details see the chapter titled Handling calculation sections.
The amount and distribution of calculation sections is also affected by geometry tolerances and the accuracy class defined in REF task.
In the case of asymmetric HULL surface refer to Asymmetric hull forms chapter.
2. Hydrostatics Window
The HYD task is operated in a task-specific window which is opened by selecting:
The task-specific window is composed of a menu bar, a toolbar, and the work area. Tabs are used to arrange the work area into two layers. The A
rguments tab, which is on top, is the default tab. The use of the Output tab is covered in the chapter entitled Output.
3. Arguments
Hydrostatics is calculated according to set calculation arguments. These can be checked in the command mode with the ARG command, or from
the Arguments tab in the task-specific window.
The values can be changed simply by entering new values in the Value column. The series syntax used in NAPA, the 'from to step', is as follows:
T (1.2 6 1.2)
The above would be interpreted as: 'the draught values go from 1.2 metres to 6 metres with a 1.2-metre step'. Draught and displacement are
alternative arguments: one is given and the other is calculated.
The explanation text of each quantity can be checked by right-clicking on the quantity name and selecting EXPL from the drop-down menu.
Similarly, the units available can be selected by right-clicking the current unit and then selecting a suitable unit.
HULL and T represent the minimum information required to calculate hydrostatics. Upon entering the HYD task, enough default information exists
in the Arguments list to calculate hydrostatics. The default object used in calculations is defined in REF parameter HYDR. Typically the object is
HULL, but can be changed to e.g. STABHULL or some other object. HULL is assumed to be symmetric.
4. Numerical output
Exercise: Create alphanumerical and graphical output with different sets of calculation arguments.
Follow the examples shown below.
The basic output list is created simply by clicking the LIST button:
All list output from the Hydrostatics Window is sent by default to the Main Window.
----------------------------------------------------------------------
T DISP LCB KMT CB WLA MCT TPC
m t m m m2 tm/cm t/cm
----------------------------------------------------------------------
1.200 968.8 42.007 11.677 0.7315 864.6 43.3 8.9
2.400 2066.0 42.041 7.003 0.7833 906.7 47.5 9.3
3.600 3190.7 41.976 5.709 0.8076 924.2 49.8 9.5
4.800 4357.6 41.544 5.438 0.8278 976.7 59.1 10.0
6.000 5584.6 40.962 5.555 0.8490 1014.0 65.7 10.4
----------------------------------------------------------------------
For easy printing, use the List Window which can be opened by selecting:
Note that when this window is open, all listing commands are directed to it one after the other.
To erase all content from the List Window, click the New List
button.
Click on the LDS button to create the loading scale. The ship's estimated lightweight and longitudinal centre of gravity need be provided in the
arguments:
------------------------------------------------------------------
T DISP DW MCT TCP KMT TK
m t t tm/cm t/cm m m
------------------------------------------------------------------
1.200 968.8 -231.2 43.3 8.9 11.677 1.210
2.400 2066.0 866.0 47.5 9.3 7.003 2.410
3.600 3190.7 1990.7 49.8 9.5 5.709 3.610
4.800 4357.6 3157.6 59.1 10.0 5.438 4.810
6.000 5584.6 4384.6 65.7 10.4 5.555 6.010
------------------------------------------------------------------
Click on the TRI button to create the trim diagram list. The draught range is given as an argument, and the trim range should be given as
(TMIN-TMAX, TMAX, TMIN):
5. Graphical output
The loading scale diagram is created by clicking the PL LDS button. The same arguments that were used in the previous example are used here
as well:
The trim diagram is created by clicking the PL TRI button. The arguments used are the same as in the example about the trim diagram list:
6. Stability Curves
The task STAB performs calculations of hydrostatic values involving balance calculations. A number of result quantities are calculated while the
ship is heeled to given angles from a given initial floating position. The displacement and centre of gravity are kept unchanged. This section gives
a very brief introduction to the subject, showing only how to create lists of KN values and the cross curves.
The initial floating position of the ship can be expressed either as a combination of draught and trim or by giving the displacement and LCG. There
can be several values in each set. The main arguments are either:
T draughts
TR trims
or
DISP displacement
There can be several values in each set. The accuracy of the calculation is improved if the height of the centre of gravity is also given. For
example:
STAB?><input>t (1 6 1)</input>
STAB?><input>tr 0</input>
STAB?><input>heel 0 10 20 30 40 50 70 </input>
STAB?><input>too hd=((' ', ' -------------- KN ---------------'), sh
ul)</input>
STAB?><input>lq arg kn</input>
STAB?><input>lis heel t</input>
trim 0.000 m
-------------------- KN ---------------------
heeling 1.000 2.000 3.000 4.000 5.000 6.000
-------------------------------------------------------
0.0 0.000 0.000 0.000 0.000 0.000 0.000
10.0 2.201 1.369 1.076 0.970 0.951 0.969
20.0 3.504 2.642 2.173 1.974 1.916 1.810
30.0 4.127 3.586 3.232 2.991 2.753 2.610
40.0 4.443 4.231 4.043 3.766 3.553 3.328
50.0 4.574 4.668 4.486 4.364 4.162 3.887
70.0 4.578 4.781 4.869 4.788 4.653 4.487
The main complication is that there are three arguments. The LIST command specifies how to represent the arguments: The first one (HEEL in
the example) is run inside the columns; if the second one (T) has many values, the columns are repeated; and if the third one (TR) has many
values, several tables are created.
Note that the single symbol KN in the LQ gives rise to many columns; as many columns as there are values for the second argument. The header
component SH (short header) in this case is replaced by the value of this argument.
The quantity ARG in the LQ is replaced by the quantity mentioned first in the LIST command. In the following example, the quantities T (draught)
and TR (trim) in the LQ refer to the resulting draught and trim. This is illustrated by the following example, showing the floating position as function
of the initial draught and heeling angle:
Heeling: 0.0
Heeling: 10.0
Heeling: 20.0
trim 0.000 m
The displacement is not a function of the heeling angle and is listed for heel=0 only.
Special surfaces
Table of Contents:
1. General
2. Geometry Editor
3. Plane
4. Cylinder
4.1. Corrugated bulkheads
5. Double cylinder
6. Connection surface
7. Facet surface
8. Tube
9. Rotation surface
10. Exercises
10.1. Bulkheads
10.2. Corrugated bulkhead
10.3. Longitudinal bulkheads
10.4. Decks
10.5. Thruster tunnel
10.6. Bridge
10.7. Additional surfaces
1. General
Special surfaces are used to represent watertight boundaries between compartments. The main watertight boundaries, such as decks and main
transverse bulkheads, should be modelled as special surfaces that form the ship's reference surfaces. Using reference surfaces as room
boundaries makes it easier to modify the ship model as only the special surfaces need be modifed in order to alter compartments. The following
figure illustrates a simple reference surface grid and rooms defined on the basis of these surfaces.
Reference surfaces can be created either by using the Geometry Editor or directly with commands. Both methods are explained in this chapter.
Note! Reference surfaces only represent the watertight boundaries between compartments, not real structures. Therefore, they do not
need to be limited inside the hull, for example bulkheads can be defined as infinite planes.
2. Geometry Editor
The Geometry Editor is a tool for defining reference surfaces and rooms. This chapter explains the editor in brief; for a more comprehensive
description, see the chapter entitled Geometry Editor in the Napa Manuals.
The Geometry Editor is opened from the Tools menu in NAPA's Main Window:
In order to run the Geometry Editor, the HULL surface must have been defined. Otherwise, the following message will appear and the Geometry
Editor cannot be opened:
An arrangement table including all the compartments is also needed to run the Geometry Editor. If an arrangement table does not exist, a new
table can be created. How to create arrangement tables is explained in more detail in the chapter entitled Ship Model.
Refence surfaces can be created by using the surface tool buttons which become available when the surface mode is activated. Created
surfaces are collected into a reference surface arrangement table.
Geometry Editor's interactive tools obey snap options. These can be selected from the Tools menu:
3. Plane
The simplest type of a reference surface is a plane which can be defined in many different ways. The simplest type of a plane is a plane parallel
to a coordinate plane. In the Geometry Editor, this type of a plane is created by using the Principal Plane button available in the surface tools. A
plane can be placed interactively in any of the principal views, x, y, or z. However, before the plane can be placed, its name and the type of the
reference surface must be defined:
The default name and types are suggested on the basis of the reference surface types table RTT*PRO. Additional types can be added, if
needed.
Alternatively, planes can be defined by using commands. In the DEF task, the PLANE command is used for this purpose. For example, a plane
located at the x-coordinate 10 would be defined as follows:
PLANE P1
X -10
PLANE P1
X #10
A plane can also be parallel to a coordinate axis. In the following example, a plane parallel to the y-axis is created. The vertical distance between
the plane and the y-axis is constant.
PLANE P2
THR Y (-3 0) (-1 3)
A plane inclined to any direction can be defined by specifying three points which form a plane:
PLANE P3
THR (8 0 0) (6 8 0) (7 8 5)
4. Cylinder
Cylinder surfaces are typically used for modelling knuckled structures. A cylinder is formed by specifying a base curve which is extruded along
the generator line. The base curve can either be pre-defined or defined as part of cylinder definition. These two methods are illustrated in the
below examples.
In the first example, the base curve is defined at the y=-16 plane by specifying points using the (x z) coordinates. The base curve is extruded 32
metres along the y-axis to form the surface.
CYL DECK
Y -16
XZ <> (0 10) (100 10) (100 13) (130 13)
GEN Y 36
A similiar result can be achieved by defining the base curve as a separete curve. This curve can be used as the base curve in cylinder definition.
The base curve is defined at the y=0 plane, and it is extruded 16 metres to the positive and negative y-directions.
CUR DECKSHAPE
Y 0
XZ <> (0 10) (100 10) (100 13) (130 13)
CYL DECK
BAS DECKSHAPE
GEN Y 16 -16
Cylinder surfaces can also be created in the Geometry Editor by using the Cylinder surface button. The base curve can be specified in any
principal view, and it is extruded throughout the ship.
Hint: The Snap options are useful when creating reference surfaces in the Geometry Editor.
Another type of a cylinder is a closed surface. This type of a cylinder is defined by specifying the axis and the radius of the cross-section. A typical
example would be the surface of a thruster tunnel which is ilustrated below. The axis is defined by two points and the radius of the cross-section is
input using the FORM command. This type of a cylinder can be placed interactively in the Geometry Editor. If the ends of the cylinder should be
closed, then the optional CLOSE command will add the ends, making the surface enclosed in all directions.
CYL TUNNEL
AXI (74.2 -5 1.4) (74.2 5 1.4)
FOR R=0.6
CLOSE @@(optional)
Corrugated bulkheads can be defined as cylinder surfaces. The easiest way to define corrugated bulkheads is to use the tool called Vardef
Editor: the parameters related to corrugation are input, and the cylinder surface is automatically created. The Vardef Editor is opened by
selecting:
There are two tables for definition input: one for transversal and the other for longitudinal bulkheads. The names of these tables are
ADDDEF.PAR-CBH_STD (transversal) and ADDDEF.PAR-CBHL_STD (longitudinal), and they can be found in the NAPADB. The required table
is opened by clicking the Open
button.
button:
DEF?>DES CBH1
CYL, CBH1
Z, -0.1
XY, <>, *, (#CBH1.PLA, -7), (#CBH1.PLA, -6.3), (#CBH1.PLA+1.4,
-5.6), (#CBH1.PLA+1.4, -4.9), (#CBH1.PLA, -4.2),
(#CBH1.PLA, -3.5), (#CBH1.PLA+1.4, -2.8),
(#CBH1.PLA+1.4, -2.1), (#CBH1.PLA, -1.4), (#CBH1.PLA,
-0.7), (#CBH1.PLA+1.4, 0.00000012), (#CBH1.PLA+1.4,
0.7), (#CBH1.PLA, 1.4), (#CBH1.PLA, 2.1),
(#CBH1.PLA+1.4, 2.8), (#CBH1.PLA+1.4, 3.5),
(#CBH1.PLA, 4.2), (#CBH1.PLA, 4.9), (#CBH1.PLA+1.4,
5.6), (#CBH1.PLA+1.4, 6.3), (#CBH1.PLA, 7),
(#CBH1.PLA, 7.7), (#CBH1.PLA+1.4, 8.4),
(#CBH1.PLA+1.4, 9.1), (#CBH1.PLA, 9.8), (#CBH1.PLA,
10.5), (#CBH1.PLA+1.4, 11.2), (#CBH1.PLA+1.4, 11.9),
(#CBH1.PLA, 12.6), (#CBH1.PLA, 13.3), (#CBH1.PLA+1.4,
14), (#CBH1.PLA+1.4, 14.7), (#CBH1.PLA, 15.4),
(#CBH1.PLA, 16.1), (#CBH1.PLA+1.4, 16.8),
(#CBH1.PLA+1.4, 17.5), (#CBH1.PLA, 18.2), (#CBH1.PLA,
18.9), (#CBH1.PLA+1.4, 19.6), (#CBH1.PLA+1.4, 20.3),
(#CBH1.PLA, 21)
GEN, Z, 11.1
A reference plane 'name.PLA', in which 'name' refers to the bulkhead's name as given in the Vardef Editor, is automatically created. The
definition of the corrugated bulkhead will refer to this plane when the hash (#) sign is placed in front of the name. The bulkhead can later be
moved later by moving this plane:
DEF?>DES CBH1.PLA
5. Double cylinder
A double cylinder differs from the plain cylinder in that the generator can also be curved.
Note! The generator must be defined so that it passes through the origin of the coordinate system.
CUR GENCURVE
X 0
YZ (-16 -1) (0 0) (16 -1)
CUR DECKSHAPE
Y 0
XZ (-5 10) (50 9) -/ (100 11) /-,
-/ (100 14) /- (110 14.4) (130, 15)
DCY DECK
BAS DECKSHAPE
GEN GENCURVE
6. Connection surface
A connection surface is formed by connecting points on two or several curves pairwise. For the connection surface to work, the curves must be
sufficiently similar, that is they have the same number of points and the same rotation direction:
CUR C.BASE1; Z 22
XY * (#100,0), -/, (#100,5), (#99,7.5), (#95,10), /-,
(#90,10)
CUR C.BASE2; Z 30
XY * (#96,0), -/, (#96,5), (#95,7.5), (#91,10), /-,
(#90,10)
CNS, S.FORE
BAS, C.BASE1
BAS, C.BASE2
CNS, S.FORE
Z, 22
XY, *, (#100, 0), -/, (#100, 5), (#99, 7.5), (#95, 10), /-,
(#90, 10)
Z, 30
XY, *, (#96, 0), -/, (#96, 5), (#95, 7.5), (#91, 10), /-, (#90,
10)
7. Facet surface
A facet surface can be defined through a set of n*m points. Four neighbouring points are connected to form the sides of a plane:
Facet surfaces are defined with the FCS command. The points are input after the FAC syntax:
FCS EXAMPLE
FAC P1 P2 P3
FAC P4 P5 P6
FAC P7 P8 P9
A three-sided facet surface can be formed by adding coinciding points. If the points forming the facet do not lie on the same plane, a warning is
issued, but the result is accepted nevertheless.
The following example illustrates how a wheelhouse surface can be defined as a facet surface:
FCS BRIDGE
FAC (4 4.8 3) (4.75 4.8 3) (6.25 4.2 3) (6.25 0 3)
FAC (4.5 5.3 2.7) (5.25 5.3 2.7) (6.75 4.7 2.7) (6.75 0 2.7)
FAC (4 4.8 1.3) (4.75 4.8 1.3) (6.25 4.2 1.3) (6.25 0 1.3)
FAC (4 4.8 0) (4.75 4.8 0) (6.25 4.2 0) (6.25 0 0)
8. Tube
A tube object is formed by moving a given cross-section along a base curve. Tube objects are typically used for modelling tubes, ducts, and such.
CUR TUBESHAPE
XYZ (0,0,0), (5,2,0), (10,5,5)
TUB TUBE
BAS TUBESHAPE
FOR R=1
A tube can also be rectangular in cross-section. The corner points of the cross-section, in relation to the base curve, are given with the FOR comm
and:
TUB DUCT
XYZ >< (0 0 0) (10 0 0) (10 0 2) (13 0 2)
FOR / (-0.5 -0.2) (0.5 0.2)
9. Rotation surface
A rotation surface is formed by rotating a curve about an axis.
By default, the base is rotated 360 degrees. Another angle can be specified with the AXIS command.
CUR C.TANK1; Y 0
XZ * <> (5,2), /0, (7,3.5), /ROUND=1, (7,7), /ROUND=1,
0/, (5,8)
ROT, S.TANK1
AXI, (5, 0, 2), (5, 0, 8)
BAS, C.TANK1
ROT, S.TANK1
AXI, (5, 0, 2), (5, 0, 8) ANGLE=180
BAS, C.TANK1
10. Exercises
Exercise: Define all the needed reference surfaces for the example ship. The reference surfaces will be
used later in room definitions. Reference surfaces can be defined either by using commands or with the
Geometry Editor.
Surfaces defined by using commands can be added to the reference surface arrangement by clicking the plus (+) sign button:
The dialog box that appears provides functionality for searching surfaces by name. If the Search button is clicked when the Search for field is
empty, all surfaces will be listed. The alternatives are shown on the left-hand side pane and the selected items on the right-hand side. The arrow
buttons are used to move the surfaces between these two panes.
The selected surfaces are added to the reference surface arrangement by clicking the OK or Apply button. When all the required surfaces have
been included in the table, the table area can be closed by clicking the same button that was clicked to open it. The reference surface type
column RTYPE can be left empty as that information is not needed in room definitions.
Exercise: Add all the reference surfaces defined in the previous chapter to the reference surface
arrangement.
10.1. Bulkheads
PLA, BH1
X, #9
PLA, BH2
X, #28
PLA, BH3
X, #46
PLA, BH5
X, #85
PLA, BH6
X, #106
PLA, BH7
X, #113
CUR CORR
Z, 0
XY <> (42.36 -0.37) (42.36 0.37) (43.78, 1.11),
(43.78, 1.85), (42.36, 2.59), (42.36, 3.33),
(43.78, 4.07), (43.78, 4.81), (42.36, 5.55)
CYL, BH4
BASE, CORR
GEN, Z, 10
PLA, CL
Y, 0
PLA, LBH1
Y, 5.1
PLA, LBH2
Y, 2.55
PLA, LBH3
Y, 1.7
10.4. Decks
CYL, TTOP
Y, -8
XZ, ><, (-3, 1), (#28, 1), (#28, 0.8), (90, 0.8)
GEN, Y, 16
PLA, DECKMID
Z, 3.4
PLA, DECK0
Z, 4.7
PLA, MAINDECK
Z, 7.09
PLA, HATCHTOP
Z, 9.2
PLA, DECK2
Z, #MAINDECK+2.7
PLA, DECK3
Z, #DECK2+2.7
PLA, DECK4
Z, #DECK3+2.7
PLA, DECK5
Z, #DECK4+2.75
CUR CAMBER
X, 0
YZ (-10, -0.3), (0, 0), (10, -0.3)
CUR SHEAR
Y, 0
XZ (73, 9.7), /0, (90, 10)
DCY, FOCSDECK
BASE, CAMBER
GEN, SHEAR
CYL, TUNNEL
AXIS, (74.2, -7, 1.4), (74.2, 7, 1.4)
FORM, R=0.6
10.6. Bridge
FCS, BRIDGE
FAC, *, (13.8, 0, 15.19), (13.8, 2.9, 15.19), (12.6, 4, 15.19),
(9.6, 4, 15.19), (9.6, 0, 15.19)
FAC, *, (13.8, 0, 16.19), (13.8, 2.9, 16.19), (12.6, 4, 16.19),
(9.6, 4, 16.19), (9.6, 0, 16.19)
FAC, *, (14.2, 0, 17.39), (14.2, 3.2, 17.39), (13.2, 4, 17.39),
(9.6, 4, 17.39), (9.6, 0, 17.39)
FAC, *, (13.8, 0, 17.99), (13.8, 2.9, 17.99), (12.8, 3.6,
17.99), (10, 3.6, 17.99), (10, 0, 17.99)
Rudder:
CYL, RUDDERUPL
Y, -2
XZ, ><, (-2.43, 2.9), (-0.8, 3.75), (0.8, 3.5)
GEN, Y, 4
CNS, RUDDERCNS
BASE, RUDDERL
BASE, RUDDERU
Funnel:
CYL, FUNAFT
Y, -5
XZ, ><, (#8, 7), (#8, 12.5), (#9, 19.2), (#15, 20)
GEN, Y, 10
Aft side:
CYL, AFTSIDE
Z, 6
XY, (-2.4, 3.3), 0/, (15, 5.1)
GEN, Z, 10
Rooms
In this chapter, we will study how rooms, that is compartments, are defined in NAPA. First, the command-based method is introduced with help of
some examples. The actual tool used for defining rooms is the Geometry Editor which provides a multiview graphics area and interactive
methods for the purpose.
Table of Contents:
1. Room definition
1.1. Elementary room
1.2. Geometric combinations
1.3. Logical combinations
2. Identifying errors
3. Examples
4. Exercise
5. Geometry Editor
5.1. Geometry Editor Window
5.2. Hierarchy tree
5.3. Defining elementary rooms
5.3.1. Defining room limits
5.3.2. Finding limits automatically
5.3.3. Editing limits
5.3.4. Further definitions
5.4. Defining reflected rooms
5.5. Exercise
1. Room definition
A room is interpreted by NAPA simply as a space that is limited by surfaces in all directions. A room has to be enclosed in all directions; it may not
'leak'. The limiting surfaces may be larger than the room itself. A limiting surface can be a pre-defined reference surface or a coordinate plane.
Rooms can be defined in any order. However, they may not overlap and there may not be any gaps between them.
The most simple type of a NAPA room is an elementary room defined by limiting surfaces in all directions.
For example:
ROOM BOX
LIM X>5, X<10, Y>0, Y<5, Z>0, Z<5
Note! The room limits must form a closed boundary in all directions, otherwise room creation will fail.
Giving a descriptive name to a room is optional yet recommended for administrative purposes to help manage a large number of rooms.
Furthermore, use of standardised names is also recommended in order to keep the database organised and help users locate data easily.
A room limit can be a named surface, such as HULL or BH3, or a coordinate plane, for example x 13 (metres) or x #32 (frame number). Basically,
there should be six limits, in the following order:
X> xmin
X< xmax
Y> ymin
Y< ymax
Z> zmin
Z< zmax
For example:
ROOM R2
LIM X>8 X<20 Y>0 Y<HULL Z>TTOP Z<4
It is not necessary to define all limits explicitly (such as x>) if the limits can be interpreted on the basis of the default order as listed above. For
example, the previous example would equal:
ROOM R3
LIM 8 20 0 HULL TTOP 4
In most cases, a room is defined by giving the six limiting surfaces. This is not always necessary and might sometimes even lead to overdefining
causing a geometric failure. The basic idea is that there should be enough limits to form closed intersections in all directions but not more
than that.
The repetition of a limiting surface can be marked with the minus (-) sign:
In the above example, both y-max and z-min use HULL as a limiting surface. If there are several possibilities to place HULL, y-max should be
given priority.
A very convenient option in room definition is the 'inside/outside' a surface. For example:
ROOM R4
LIM X>BH6 X<BH7 Y>0 <HULL Z<MAINDECK >TUNNEL
The general rule is that the most natural way of expressing a limit is usually the most reliable one. For example, if a surface is clearly the bottom
surface, z>name is likely to work better than >name, even if the latter, strictly speaking, is correct.
Note! Coordinate directions can only be used with the axis given as the orientation (x, y, or z). The orientation of a surface can be
checked with the INFO command, for example INFO TTOP.
If a side cannot be indicated by a coordinate direction, for example because the surface is closed, then the concepts 'inside' and 'outside' have to
be used.
A hull is generally defined only on the positive y side (HULL). The reflection can be addressed as -HULL, and the combination of both sides as +
HULL.
A non-elementary room is formed by combining several elementary rooms or by applying transformations. The general syntax of a
non-elementary room definition is:
ROOM name
LIM limits
ADD room/limits
RED room/limits
REF/SYM
The ADD command will define a new set of limits or a room to be added, while REDUCT will define a new set of limits or a room to be reduced. The
result is called a geometric combination.
The LIM command must always be used first, whereas the ADD and RED commands may follow each other in any order and a number of times.
The operations invoked with these commands are carried out in the given order, which makes the order significant. For example:
Or:
ROOM HATCH2
LIM #28, #64, -5.1, 5.1, 7.09, 9.2
Reflecting operations are made by using the REFLECT and SYMMETRIC commands. The REFLECT command reflects the defined room about the
centre plane. Similarly, the SYMMETRIC command will make a room symmetric about the centre plane. Reflecting operations do not apply to the
possible subsequent ADD or REDUCT commands. Thus, a room as a whole is symmetric only if the SYMMETRIC command is used last. For
example:
ROOM R1
LIM BH3, BH4, 0, HULL, Z<MAINDECK
SYM
ROOM R2
LIM BH3, BH4, 0, HULL, Z<MAINDECK
REFLECT <comment />
Rooms can also be created by combining rooms with the COM command. This method is called logical combination. In logical combinations, the
calculation sections of rooms are combined rather than the geometries. The logical combination method is recommended for defining rooms only
in some special cases, for example when a very small room needs to be combined with a large room. In that case, combining calculation sections
instead of geometries will give more accurate results of volume-oriented calculations.
Note! If rooms overlap, the overlapping volume is taken into account twice: the volume of the logically combined room will be as large
as the sum of the separate rooms. In geometric combinations, the overlapping volume is not calculated twice. In most cases, it is,
therefore, recommended to use the geometric combination method.
ROOM name
COM room1 room2 ...
For example:
ROOM ENGCAS1
LIM #8, #14, -1.8, 1.8, DECK0, MAINDECK
ROOM ENGCAS2
LIM #8, #14, -1.8, 1.8, MAINDECK, DECK2
ROOM ENGCASING
COM ENGCAS1, ENGCAS2
The part to be removed is preceded by the minus (-) sign. For example:
ROOM STABHULL
COM STABHULL0 RUDDER PROPELLER -BOWTHRUSTER
2. Identifying errors
The correctness of a room definition can be checked by several methods. First, one must check that the limits have been defined correctly.
Limiting surfaces must form clear intersections with each other in order to form an enclosed boundary:
Rooms can be plotted with the PLOT command in the same way as curves and surfaces. If a room definition is incorrect, an error message will
appear and NAPA will not be able to plot the room. One should also check that the intersection of the room can be generated in all directions.
This can be done by using the SEC command. The direction and interval of the intersection can be spefified by using the syntax X D=0.5. For
example:
SEC R02008
X D=0.5
Y D=0.5
Z D=0.5
If a room is defined incorrectly, some sections may fail. This can be corrected by redefining the limits properly.
When a room is defined correctly, its volume is calculated. The volume can be seen, for example, by using the INFO command:
DEF?>LQ NAME, GSTYPE, DATE, TIME, XMIN, XMAX, REFQ, ORNT, SS, VOL
DEF?>INFO R02008
If the volume is missing, it can be concluded that the room has been defined incorrectly.
3. Examples
Example 1:
Example 2:
Example 3:
4. Exercise
Exercise: Define room STABHULL by using commands in the Text Editor as shown below.
STABHULL is a default object name used in Loading Conditions and other intact stability calculations.
ROOM STABHULL
LIM -, -, 0, HULL, -, 7.1, >TUNNEL
SYM
5. Geometry Editor
The Geometry Editor is mainly intended for creating and editing the ship model's inner geometry. This tool provides a multiview graphics area
and interactive methods for room definition. The room definition syntax is visualised with help of a hierarchy tree for easier editing.
Creating and editing rooms is done by using runtime geometry, that is the room definition is only stored in the database when it is saved. The
Geometry Editor also supports 'undo' functionality. When the created room is saved in the database, it is also added, if so desired, to the
Compartment Arrangement.
When the Geometry Editor opens, it is assumed that the project includes an arrangement table (ARR*), which is defined as the default
arrangement. If no default arrangement exists, the tool will create a table named ARR*A and use that as the default arrangement. The Geometry
Editor also requires a hull surface, the default name of which is HULL.
The Geometry Editor's graphics area consists of three section views (longitudinal, transversal, and vertical) and a 3D view as seen in the following
figure. Each section view displays a fine, grey cross-hair locator to indicate and change the location of the sections.
A new location can be selected by dragging the cross-hairs or by holding down the Alt key and left-clicking with the mouse. The exact location of
the cross-hair locator can also be typed into the three fields available in the main toolbar on top of the graphics area. When the cross-hairs are
moved in one of the views, the sections in the other two section views will change accordingly.
More detailed instructions on how to use the Geometry Editor are available in the Napa Manuals: Geometry (GM) - 10 Geometry Editor.
The definition of a room is divided into components. These components include the elementary definition; the add, reduce, and symmetry
components; and reflection tags. The Add and Reduce components can be either existing rooms or spaces defined by limits. Each component in
the hierarchy tree corresponds with a modification carried out in the room definitions (ADD, RED, SYM, ...): one text line in a room definition
equals to one component in the hierarchy tree.
The hierarchy tree is used to manage the room definition and its components as shown in the following figure. Each component is shown as a
child of the room definition. The definition of an active component is shown in the edit area located below the hierarchy tree. Components can be
added to the hierarchy tree, deleted from it, and moved upwards and downwards in the tree. The toolbox for performing these operations is
located to the left of the hierarchy tree.
A room defined by one set of limiting surfaces only is considered an elementary room in contrast to rooms defined by combining elementary parts.
The definition of an elementary room is formed by limiting surfaces and instructions as to which side of the room each surface will form.
In this dialog box, the user will provide, at least, the room's name, its type, and will designate which arrangement the room belongs to. It is also
possible to define independent rooms which are not part of any arrangement. The Descriptive text and Purpose fields are for additional
information. The purposes will be discussed further later in this manual. See the chapter entitled Ship Model for more information.
Once the definition of a new elementary room has been started, the name of the room will appear on the top level of the hierarchy tree. Below the
hierarchy tree's top level, there is an item called Limits. When this item is activated in the hierarchy tree, room boundaries can be selected from
the different views. Limits are selected by clicking the left mouse button near the required reference surface or coordinate point and selecting the
correct limit from the dialog box that appears. The Geometry Editor will automatically display all possible alternatives near each clicking point.
Limits can be selected in any order, and they are shown in the hierarchy tree. The figure below illustrates selecting limits.
after all the required limits have been selected will generate the room and the calculation sections. These are shown in the lower right-hand side
corner view. The result can be saved either by clicking the Save button
or by selecting File > Save or File > Save As.... Once the room has been saved, the creation of another room can be started.
Exercise: Define room HFO1P as explained in the above example. The room belongs to arrangement A
and its purpose remains unknown at this point.
The easiest way to select room limits is to let NAPA do it on your behalf. First, the cross-hairs' intersection point is moved inside the boundaries of
a room, and then the Find Limits button
is clicked. As a result, the nearest visible reference surfaces are automatically located and applied to the room definition.
The result is applied and saved in the same way as in the manual method.
Hint: Any reference surface can be temporarily hidden by right-clicking on the surface and selecting Hide from the menu that appears.
Hidden surfaces are indicated with a dashed line and will be excluded from searches for the nearest limiting surfaces by the automatic
limits finding method.
A limit can be reapplied by clicking on it in the hierarchy tree and then finding another limit in the same way as described in the previous
chapter.
A limit can be modified manually in the hierarchy tree (double click).
In addition to double-clicking, single-clicking while pressing down the F2 key will also activate a limit for editing.
Clicking the line below the last limit will allow adding more limits either by typing them or selecting manually from the graphics area.
The entire room definition can be edited in text form by clicking the Edit Room Definition button
. Modifications can be run by clicking either the Apply or the Update button.
The selected limit is highlighted in all of the views to help recognition. A room definition can always be applied by clicking the Apply button to
check that it has been defined correctly and to view what the room looks like.
After the basic limits have been defined, defining the elementary room can be continued. All functionality needed for defining rooms is available in
the toolbar that is located on the left-hand side of the hierarchy tree:
Toolbar
The buttons in this toolbar have the following functions:
Reflect The defined room is on one side of the ship but in reality is located on the other side.
Delete The selected item, such as Add or Reduce, is deleted. Cannot be used to delete a room or a limit
item.
Move Up Moves the selected item one level upwards in the hierarchy tree.
Move Moves the selected item one level downwards in the hierarchy tree.
Down
Find Limits Automatic finding and applying of limits closest to the intersection of the cross-hairs.
Apply Creates a temporary room and calculation sections for it which are plotted in the 3D view.
The automatic limits finder can be used in the same way as described in the Finding limits automaticallyAdd and Reduce items. The Reflect and
Symmetric items can be used only once in a room definition but they can be used anywhere in the hierarchy. These items have an effect only on
the definition defined before them. The Apply button can be used anytime something new is defined to check that the definition is working; it is
also recommended to do so.
To define a fully reflected room, select Reflected in the New Room dialog box as room type instead of Elementary. A reflected room is a room
mirrored of an already existing room about the centre line. The source room must have been defined entirely on one side of the centre line. A
reflected room is defined by selecting an existing room from the Reflect list below the hierarchy tree. The result can be checked by clicking the A
pply or the Save button when the source room is selected.
5.5. Exercise
Exercise: Define the following rooms using he Geometry Editor. Add all the rooms to the ARR*A arrang
ement. The purposes will be assigned to the rooms in the Ship Model task, so purpose definition can be
left empty for now.
SYM
ROOM R00022
REF R00021
ADD ENGCAS1
ADD ENGCAS2
ADD R01042
Ship Model
The Ship Model subsystem acts as a kind of a database for most of the other subsystems. The 3D compartment model is defined as an
arrangement table in the Ship Model subsystem. The arrangement table is a source of information when calculating for example damage stability
or loading conditions. An arrangement is simply a table declaring the rooms that are included in the compartment model and assigning various
attributes to the rooms.
When rooms are defined with the Geometry Editor , or using commands, they can be included in an arrangement. This arrangement is a table
containing the names of all the rooms that are part of the general arrangement. The default arrangement A is automatically created when the
Geometry Editor is opened and NAPA cannot find any existing arrangement. The table behind the arrangement A is the NAPA table ARR*A whic
h can be edited in the Ship Model (SM) task.
Each room in the arrangement is assigned a purpose specifying the room's role in the ship model. This can be done already when the room is
defined in the Geometry Editor or at a later stage in the Ship Model Window. Purposes determine many properties and provide a lot of
information and control over rooms.
The compartments in the arrangement table should not be overlapping one another. There shouldn't be any empty spaces between the
compartments either since these can cause false results in calculations. Any possible "empty" spaces between rooms are to be defined as rooms,
included in the arrangement and set the purpose VOID or some other suitable purpose.
In most subsystems, the compartment information obtained from SM, such as permeability or density, can be overridden, whereas the values
defined in SM usually serve as default values.
The SM task can be entered directly from the Task level and through the DEF, LD, and CL subtasks. The SM task has a graphical user interface,
the Ship Model Window, for working with the general arrangement and purpose definitions.
Table of Contents:
1. Structure of the SM
2. Working with the Ship Model Window
2.1. Arrangement table
2.2. Parameters associated with purposes
3. Useful commands
3.1. Shortcut in a new project
3.2. Default arrangement
3.3. Combined arrangement
4. Arrangement drawings
4.1. Plan Definition task
4.2. Setup Editor
1. Structure of the SM
The Ship Model task encompasses four subtasks:
Defining arrangements . An arrangement can be defined by creating a new arrangement and adding compartments to it or by
combining existing arrangements. An example of a combined arrangement would be a combination of arrangements consisting of
compartments on different decks.
Assigning purposes for compartments in the purposes table PAR*PRO. Several properties, such as steel reduction, density, filling
degree, type of load, and capacity, are associated with the purpose. For example, all compartments containing ballast water will have the
same steel reduction by default. If, however, one ballast water tank had a different steel reduction than the other BW tanks, then the steel
reduction for that particular tank could be defined in the arrangement table.
Listing compartment quantities. It is possible to select both the 'group' of compartments and the quantities to be listed.
Making arrangement drawings. These can be made directly in SM or in the DR task by using the arrangements defined in SM as a
basis.
When the Ship Model Window is opened, it will show the default arrangement:
First it must be checked that all the rooms which should be included in the arrangement can be found in the NAME column of the arrangement
table ARR*A. If any rooms are missing, they can be added by selecting from the drop-down list that opens when an empty cell on the last line of
the the NAME column is clicked as illustrated in the figure below:
Exercise: Ensure that all the needed rooms are included in the ARR*A table. In total, the table should
contain 36 rooms. These are listed below.
The arrangement table's columns are explained below. Note that most of the default values are based on the purpose selected in the PAR*PRO
table.
CCODE Compartment code; an alternative 'name' for the compartment used in output.
TYPE Load type; used to determine free surface rules, for example L=liquid.
RED Compartment steel reduction (0-100%); for calculation of net volume. For example, RED=5.00 => 5% reduction.
CAP Capacity of compartment (0.0-1.0); a fraction of the net volume that can be loaded. For example, CAP=0.98 => 98% capacity.
PERM Permeability used in damage stability, for example PERM=0.95 => 95% permeability.
IPERM Variable permeability as a function of height or draught used in damage stability. Replaces PERM if defined.
LFCODE Logical fill code. Refers to the Fill codes table in which fill colours and patterns are defined for different purposes and graphics
devices.
The NAME and PURP columns are compulsory; all others are either optional or filled automatically when a purpose is selected.
The next step is to assign each room its correct purpose. The available purposes can be found in the standard purposes table named PAR*STD s
hown on the Std. Purposes tab in the SM window. The standard purposes table is stored in NAPADB (or SYSDB). It contains predefined
purposes which can be used as such or can be further modified in the PAR*PRO table.
As soon as a room is assigned a purpose, the purpose's definition is copied from the PAR*STD table to the project-specific PAR*PRO table which
can be seen on the Purposes tab in the SM window. The project-specific modifications of purposes as well as definition of totally new purposes
can be made in the PAR*PRO table.
PURP Identification of compartment's purpose, for example HFO, BW, DO, FW.
PDES Description of purpose; for example Heavy fuel oil, Ballast water, Diesel oil, Fresh water.
CLASS Class of the compartment content used for grouping loads. The most important cases are the groups defined for different free
surface rules. The classes so far 'standardized' are:
B = Bunker
X = Ballast water
In addition to these, any other letter of the alphabet can be used.
TYPE The physical type of load which controls free surface corrections and the determination of the centre of gravity. The most important
type is L which stands for liquid and means that a free surface correction can be calculated for that content.
Type is mainly used in loading conditions, where the relevant types are:
L = Liquid
B = Bulk
H = Homogeneous
LH = Homogeneous with a free surface
S = Solid
GR / GRX = Grain cargo
C = Containers
PMC = Partially movable cargo
RED Steel reduction for calculation of net volume; for example 2.00 => 2% reduction.
CAP Maximum capacity; for example 0.95 => max. 95% filling degree; a fraction of the net volume that can be loaded.
LFCODE Logical fill code. The filling colour/pattern is defined in the TAB*FILLCODES table for different devices.
Exercise: Assign each room a purpose in ARR*A. The purposes needed are listed below.
3. Useful commands
Most actions in the SM task are carried out in the Ship Model Window. As in any other NAPA task, everything can also be done by using
commands in the Main Window when the SM task is active. Below is a list of commands which can be very useful even if the graphical user
interface is mainly used. This list provides only short descriptions of the commands. For more detailed information, see the online explanation
texts using the command !EXPL command.
CAT Catalogues the arrangements existing in the current project and version.
GET name Retrieves a given arrangement from the database and makes it the current work arrangement.
RENAME Renames the current arrangement which must first be activated with the GET command. If there is no existing arrangement ne
new_name w_name, the arrangement has to be saved by using the SAVE command.
REG Sets the default arrangement used in other subsystems, such as LD and DA.
If all rooms need be added to an arrangement, there is a very fast way to accomplish this:
SM?>!SEL TYPE=R
SM?>NEW testarr
SM?>ADD LIST()
SM?>SAVE
In the above, !SEL TYPE=R will collect the names of all rooms defined in the project/version into an array called the LIST. The contents of this
array can be checked with the !VAR LIST LIST command, in which the second LIST equates the name of the array.
When several arrangements are defined, one of them is registered as permanent. It will act as the default arrangement from which information is
retrieved to other tasks. The Geometry Editor will create the default arrangement A, however, if the default needs to be changed, this can be done
with the REG command. For example, arrangement B would be set as default as follows:
SM?>REG B PERM
A combined arrangement can be defined by combining existing arrangements. One reason for having combined arrangements is that they make it
easier to control the smaller parts, such as decks, compared to handling one enourmous arrangement.
A combined arrangement itself cannot be modified, but it can be altered by modifying its parts.
The name given to the new combined arrangement is EXAMPLE, and it is a combination of the arrangements DECK1, DECK2, DECK3, and
DECK4.
Note! If a room is part of more than one partial arrangement, all room parameters will be taken from the first partial arrangement in
which the room is found.
4. Arrangement drawings
Arrangement drawings can be defined and created once an arrangement has been defined. An arrangement drawing is composed of parts,
referred to as plans, which show the ship from different directions. The purpose is to show the ship geometry as such, or to show various aspects
in relation to the ship geometry, such as loads, damage cases, equipment, weight distributions, or containers. Various non-geometric aspects of
the arrangement can be highlighted by using colouring and texts. In addition to the SM and DR tasks, arrangements can also be drawn in many
other tasks, for instance in LD, DA, and CL.
The two main commands relevant to arrangement drawings are SETUP and DRW. The SETUP command defines the contents and layout of the
drawing, whereas DRW draws the setup and additional objects on the screen. Setups can be saved in the database for future use. Furthermore,
users can define multiple setups for various purposes, for example one to be used in Loading Conditions, another in Damage Stability, and a third
for showing only the arrangement of the superstructure.
For example, the following setup contains the z section at 1 metre and the ship's profile:
The following is a list of commands for creating, saving, and using setups:
SET SAVE name Saves the current setup as {name}. Note that an existing setup with the same name will be replaced without a warning.
Drawings can be complemented with texts, filling colours indicating rooms' purposes, the frame scale, and so on. The following commands are
available:
FILL The possible filling could be, for example RED, RND (random), or PURP. Fill codes for different purposes are retrieved from the
filling PAR*PRO table.
DRW Draws a single object, such as a room, to the arrangement drawing. Additional possibilities and options for this command are
{object} detailed in the explanation texts; see !EXPL DRW.
Both absolute coordinate planes and predefined plans can be used in a setup. Plans are defined in the Plan Definition task, PLD.
Each plan in the setup has its own row except the items defined inside parentheses ( ) which will be drawn on a single row. PROF is a special
case in setup definition and it stands for y=0.01. For example:
Space reservations in an arrangement drawing are defined using the dimensions in the reference system as default dimensions. Sometimes the
amount of space between the plans needs adjusting. In the following example, the space reservation between the plans is explicitly given in
metres in the ship's coordinate system:
The Plan Definition task, PLD, is used for defining plans for arrangement drawings. The basic case is that several decks in the superstructure
need be drawn adjacent to each other. The problem is that the arrangement drawing will assign each deck a space reservation corresponding the
size of the whole ship. This area can be restricted by defining a plan for the purpose. For example:
DEF?>DES DECK2
PLA, DECK2
Z, #MAINDECK+2.7
In the above, deck DECK2 is defined 2.7 metres higher that the object MAINDECK. However, DECK2 is only used in the superstucture and is,
therefore, not as long as MAINDECK. Let us create a plan with a restricted object size:
DEF?>PLD
--- DRAWING ---
Definition of arrangement plans
PLD?>PLAN D2 Z=#DECK2
PLAN?>SIZ #-4 #28 - -
PLAN?>WIN #-4 #28 - -
PLAN?>OK
The SIZE command defines the plan's size for the purpose of reserving space. The WINDOW command defines the limits within the plan, and is
restricted by clipping. The hash (#) sign in Z=#DECK2 means that the z-coordinate defined by object DECK2 will be used.
The predefined plan can be used in the setup definition simply by referring to its name:
SM?>set d2
D2 plan definition applied (N 1255)
SM?>id name
SM?>drw all
Exercise: Define plans D2, D3, D4, and FOCS for the setup drawing.
The RESTRICT command adds an instruction to restrict the set of objects to those within the given coordinate limits. The EXCEPTIONS command
can be used both for adding and deleting rooms from the drawing and also for setting a different coordinate plane for a specific room. In the
following example, room WBFP is drawn at height z=4 even though all other rooms are drawn at z=1:
DR?>SET TESTPLAN
TESTPLAN plan definition applied (N 1255)
DR?>ID NAME
DR?>DRW ALL
All general drawing commands and figures available in the database can be used in plan definition. In the following example, predefined figures
from the NAPA database and project database are used:
DR?>SET PROFILE
PROFILE plan definition applied (N 1255)
DR?>DRW ALL
CRUISERLOGO read from the NAPA data base (N11053)
FIG.PROP read from the project data base (N11051)
ENGINE (N11051)
ANCHOR (N11051)
Note that in the above definition, MAINDECK refers to a predefined plane and PROF to a special definition of y=0.01. Plans D2, D3, D4, and
FOCS are predfined plans.
Capacities(CP)
The Capacities (CP) task is used for creating tables of hydrostatic data of compartments. The CP task is entered directly from the Task level by
giving the CP command or by opening the task-specific window:
The CP task, in general, retrieves all the needed data from the arrangement defined in the SM task. Only one compartment at a time is handled.
Output is ontrolled with calculation arguments and the normal output commands, or by using the Output tab.
Table of Contents:
1. Arguments
2. Definitions
2.1. Sounding devices
2.1.1. Exercises
2.2. Steel reductions
3. Output
1. Arguments
A compartment has to be selected when entering the CP task. The arguments can be viewed on the Arguments tab in the Capacities Window o
r with the ARG command in the CP task.
COMP The compartment to be calculated. If the compartment belongs to the current arrangement, the density of the contents (argument
RHO) and the steel reduction (RED) are assigned from SM.
SDE Selects the sounding device for the current compartment or the default for subsequent compartments.
RHO The density of compartment contents is used if weights or free surface moments are calculated. When selecting a compartment,
the density is automatically set to the value defined in SM, if any; otherwise 1.
RED The steel reduction is used for calculating net volume and weight of contents. When selecting a compartment, the steel reduction
is automatically set to the value defined in SM, if any; otherwise 0.
REFZ Defines the reference height from which the calculation heights given by H are counted. When a new compartment is read, REFZ
is set to the reference height defined for it, if any; otherwise the lowest z-coordinate of the compartment.
DMODE This argument controls the way undefined or redundant values are listed in the output.
TRRANGE Defines a trim range, taken into account when deciding the range from which gauge readings are selected when applying the GS
TEP argument.
WLS Specifies whether quantities related to the surface area should be calculated by doing sections from the object or by using the
calculation sections.
The following arguments are exclusionary, that is, only one can be given at a time:
H Specifies the calculation depths by heights measured from the reference height REFZ.
STEP Defines the calculation heights by a step. The calculation heights are selected at multiples of the step within the range covered by
the compartment.
GAUGE Defines the calculation heights by sounding values. A subsequent COMP or SDE argument will cancel the values set with this
command (assumed no longer relevant).
GSTEP Defines sounding arguments by a step. The arguments will be selected in the range covered by the heights of the tank and the
sounding device. See also argument TRRANGE.
VOL Selects the depth argument so that specified (net) volumes are obtained.
VSTEP Selects the depth argument so that (net) volumes are obtained as multiples of the given step.
FILL The calculation depths are expressed as filling, that is a fraction of total volume. Effect of varying steel reduction not taken into
account.
FSTEP Same as FILL, but the values are selected as a multiple of the given step.
The arguments can be changed simply by typing a new value into the Value column in the Capacities Window. Online explanation texts of the
arguments are available by selecting the symbol, right-clicking with the mouse, and selecting Expl from the drop-down list.
2. Definitions
Sounding devices and variable steel reductions for the compartments are defined in the PAR subtask of CP. There are no graphical tools
available but commands are used.
The regular administrative commands (CAT, DES, DEL) also apply in the CP task, but the RED option should be used with commands related to
the defined steel reductions. For example, the CAT command will create a catalogue of the defined sounding devices, but the CAT RED command
will create a catalogue of the defined steel reductions.
When defining remote sounding (RS) or remote ullage (RU) devices, the command syntax is as follows:
In which:
/name (Opt) name of device. Must be given when there are several devices of the same type in a compartment.
Examples:
When defining manual sounding (MS) or manual ullage (MU) devices, the command syntax is as follows:
In which:
/name (Opt) name of device. Must be given when there are several devices of the same type in a compartment.
curve Definition of geometry of the tube in the form of (x1, y1, z1), (x2, y2, z2)...
h (Opt) height of zero point (MS only). Defines the point from which soundings are measured; default=starting point of the curve. h is
measured in metres from the baseline, and it has to be above the lower end of the pipe.
Examples:
2.1.1. Exercises
TASK?>CP
* BEGIN COMPARTMENT HYDROSTATICS (CP) *
CURRENT ARRANGEMENT:A
CP?>PAR
The list of existing devices can be viewed by using the CAT command:
PAR?>CAT
Sounding devices defined
Compartment Devices
In the above, no sounding devices are listed meaning that none have yet been defined in this project.
PAR?>DES HFO2P
DEV, HFO2P, RS, (#73+0.3, 1.2, 0.01)
The definition can be modified easily by first manipulating the text description, then highlighting the whole definition and pressing Enter to rerun
the definition which will automatically overwrite the old definition.
Also, rooms WB3P and WB3S will have manual sounding devices:
A compartment may have several sounding devices, even of the same type, in which case these devices have to be separated from each other by
naming them. In the following, we will define a couple of additional sounding devices for room WB3P. The first will be defined using an existing
device as a basis for the new device and the second will be defined using the direct method. Note that only the device MS/TEST needs a name
because a device of the same type already exists. Device type RS does not exist for the compartment, so no optional name is needed for that
device.
PAR?>DEV WB3P MS/TEST (#83+0.3 5 0.05) (#83+0.3 6.3 3) (#83+0.3 6.3 7.5)
PAR?>DEV WB3P RS (#83+0.3 4.5 0.02)
Following this, the existing devices can be catalogued with the CAT command:
PAR?>CAT
Sounding devices defined
Compartment Devices
HFO2P RS
HFO2S RS
WB3P MS, MS/TEST, RS
WB3S MS
Existing sounding devices can be deleted from the database with the DEL command. For example:
Sounding devices can be drawn to a setup drawing by using the DRW SDEV command in the DR task, as shown in the following example:
DR?>SET X=#73
DR?>DRW ALL
DR?>DRW ID
DR?>ID NAME
DR?>DRW SDEV
A variable steel reduction for a room can be defined in the PAR subtask. This reduction will be used in the CP task instead of the one defined in
SM. The CP task's special feature of variable steel reduction is not available elsewhere in NAPA. This feature is especially useful in NAPA
Loading Computer applications in which case there might be a need to adjust the tables in accordance with laser-based measurements of a cargo
tank. By using a variable steel reduction, it is possible to define precisely the required sounding table.
The command for steel reduction which varies with the filling is RED. The command syntax is as follows:
In which:
r1,r2 Corresponding local steel reduction, that is a fraction of the area at the given height.
The list of existing steel reductions can be viewed with the CAT RED command:
PAR?>CAT RED
Name Date Time
WB4P 15.7.2011 10:22
The following diagram illustrates the variable steel reduction as defined for room WB4P:
Steel reductions can be deleted from the database with the DEL RED command. For example:
3. Output
Before creating any output, it must be ensured that the correct arguments are being used. Special attention should be paid to SDE. The first
available device will be selected automatically so in case a room has several devices care should be taken to check that the one needed is being
used.
The basic list is produced by clicking the LIST button. If the List Window is open, the results are directed to it:
--------------------------------------------------------
H VNET CGX CGY CGZ AWP CGXA CGYA
m m3 m m m m2 m m
--------------------------------------------------------
0.00 0.0 50.15 3.61 0.00 31.2 50.16 3.62
0.50 20.4 50.18 4.01 0.26 46.9 50.18 4.19
1.00 38.0 50.18 4.24 0.46 16.7 50.17 5.69
1.50 46.9 50.18 4.53 0.62 19.2 50.17 5.78
2.00 56.5 50.18 4.75 0.81 19.9 50.17 5.80
2.50 66.3 50.17 4.90 1.02 19.9 50.17 5.80
3.00 76.0 50.17 5.02 1.24 19.9 50.17 5.80
3.50 85.8 50.17 5.10 1.47 19.9 50.17 5.80
4.00 95.5 50.17 5.18 1.70 19.9 50.17 5.80
4.50 105.3 50.17 5.23 1.94 19.9 50.17 5.80
5.00 115.0 50.17 5.28 2.18 19.9 50.17 5.80
5.50 124.7 50.17 5.32 2.42 19.9 50.17 5.80
6.00 134.5 50.17 5.36 2.66 19.9 50.17 5.80
6.50 144.2 50.17 5.39 2.90 19.9 50.17 5.80
7.00 154.0 50.17 5.41 3.14 19.9 50.17 5.80
7.09 155.7 50.17 5.42 3.19 19.9 50.17 5.80
--------------------------------------------------------
In addition to this default list both numeric and graphical output can be created by using the Output tab in the Capacities Window. Please see
the chapter entitled Output for additional instructions.
Table of Contents:
STABHULL is a room limited by the surface of the hull on both sides and by the deck above. Appendages, such as the rudder and thruster
tunnels, can be added to or reduced from the object.
ROOM STABHULL
LIM -, -, 0, HULL, -, 7.1, >TUNNEL
SYM
OK
However, the above defined the room object only up to the level of the main deck. For instance, the upper parts of cargo holds CH1C and CH2C
are not yet included in STABHULL. Let us, therefore, modify the STABHULL further:
ROOM STABHULL
LIM -, -, 0, HULL, -, MAINDECK, >TUNNEL
SYM
ADD CH1C
ADD CH2C
ADD STFC
ADD RUDDER
OK
Now the upper parts of the cargo holds and also the forecastle store and rudder are included in STABHULL.
DAMHULL comprises a watertight hull. In many cases it can be identical with the STABHULL. However, it is imperative that all the rooms which
may be affected by any damage are included in the definition. DAMHULL is defined as follows:
ROOM DAMHULL
LIM -, -, 0, HULL, -, MAINDECK, >TUNNEL
SYM
ADD CH1C
ADD CH2C
ADD STFC
OK
2. Openings
Holes within the geometry, such as hatches, windows, and manholes, are defined as openings in an opening arrangement table. It is a NAPA
table with the prefix OPE*. An empty model table named OPE*MODEL is available in the NAPA database. In the opening arrangement table,
each row represents an opening. At least the opening's location and type of watertightness must be given. Usually it is enough to define only the
lowest point (the point submerging first) of the opening because that is the interesting information.
The easiest way to start a new opening arrangement is to open the Table Editor and create a new table:
In the New table dialog box, the name of the new table is given, including the prefix. Alternative model tables can be viewed and selected from
the drop-down list:
Exercise: Create a new opening arrangement table. Name the table as OPENINGS, and then select
OPE* as prefix. Use the model table OPE*MODEL.
The compulsory colums of an opening arrangement table are:
FR/REFX, REFY, Position of the lowest point of the opening in the ship coordinate system.
REFZ
OTYPE Construction type of the opening. Defines types other than those related to watertightness, for example PIPE, PUMP, ESCAPE,
and ESCAPEROUTE result in special handling. These are related to cross-flooding calculation, progressive flooding, and
damage simulation.
GEOMOBJ Reference to the geometric object representing the opening, for example a point, a curve, or an object intersection.
CONN Connects two compartments. Controls when and how openings are taken into account. For example, ROOM1 ROOM2 or SEA
-> ROOM1. This data is used in the progressive stages of flooding.
STAGE The flooding stage at which an opening is taken into account in the calculation of probabilistic damage stability in accordance
with SOLAS II-1.
Exercise: Define the opening arrangement table OPE*OPENINGS presented below. Remember to save
the table by clicking the Save button before closing the editor.
3. Profile
The profile curve is needed for specifying the ship's lateral profile used in wind moment calculations. The floating position is taken into account
automatically when determining the profile area and the lever.
If deckhouse compartments are defined in ARR*A, the profile can easily be created as a section of the arrangement at the centre line with the GE
N command in the DEF task:
Note! Usually, the profile curve can be created exactly on the centre line (ARR*A/Y=0). Sometimes, however, this may fail, for example,
due to a hull definition that is only until the centre line.
The MERGE option in the above definition removes all decks and bulkheads from the section.
The definition of the generated curve can be displayed in text form as follows:
DEF?>DES PROFILE !
In case of a more complicated shape, a tolerance can be set to control when the points are forced to show to limit the number of shown points.
Tolerance means the maximum allowed distance from the real shape in metres.
DEF?>PRO Y
--- DRAWING ---
DR?>PLO PROFILE
CUR PROFILE2; Y 0
XZ * (-2.8,10), /-, -/, (-2.8,7.1), -/, (-2.4,4.4),
/-, (0,4), (2.3,3.5), -90/, (3.2,2.8), -/, (2.5,1.85),
/-, -/, (2.5,1.15), /-, 0/, (5,0), FRA, /-, -/, FRF,
-/, (80,0), 90/, (84,2.2), (82.2,4), 90/, (81.7,4.4),
(81.9,5), /-, -/, (85.5,11.5), /-, -/, (75,11.5), /-,
-/, (75,10), /-, -/, (67,10), /-, -/, (67,11), /-,
-/, (43.5,11), /-, -/, (43.5,10), /-, -/, (41.5,10),
/-, -/, (41.5,11), /-, -/, (18,11), /-, -/, (18,10),
/-, -/, (15,10), /-, -/, (15,18), /-, -/, (8,18), /-,
-/, (8,22), /-, -/, (5,21), /-, -/, (4,12), /-, -/,
(1,12), /-, -/, (1,10), /-, -/, (-2.8,10)
OK
4. Margin line
Margin line is a line defined at least 76 mm below the upper surface of the bulkhead deck at the ship side. It is used in damage stability output
lists and plots when the margin line immersion or the reserve to the immersion of the margin line is required.
The margin line can be defined in several different ways, for example:
Margin line definition in the DAM task refers to the generated curve:
TASK?>DAM
Dam?>MARG MARGIN
***Definition of a new margin line
Marg?>CUR MARGINLINE
Marg?>OK
Exercise: Define a margin line that is located 76 mm below the main deck.
6. Bilge line
The bilge curve is used for calculating the heeling angle at which the defined (bilge) curve will rise above the water's surface. Naturally, the bilge
line can be used to describe anything in the ship which rising out of water needs to be studied. The bilge line can be defined similarly to the
freeboard deck edge and margin line. The commands used in the CR task are BILGE and CBILGE.
Loading Conditions
The behaviour of a loaded ship can be analysed in the Loading Conditions (LD) task. Free surface corrections can be applied to any loading
condition in various ways. There is a direct access to the CR task for checking stability criteria. Furthermore, a ship's lightweight can be defined in
the LGDE subtask of LD.
The LD task can be entered directly from the Task level. The LGDE task can only be entered from the LD task. A number of direct accesses to
and from other tasks exists, as illustrated by the following figure:
Weight and centre of gravity of the total weight, deadweight, and selected subsets.
Floating position and related hydrostatics.
The GZ curve and required GM for the loaded ship.
Free surface corrections for each liquid load.
Longitudinal distribution of weight, buoyancy, shear force, corrected shear force, and the bending moment.
Torsion moments.
Combined stress (the sum of the bending moment and torsion moments multiplied by certain factors).
Deflection of the ship.
Application of grain shifting moments (from the Grain Stability (GS) subsystem).
Behaviour of a ship with compartments open to the sea.
Behaviour of a grounded ship (grounding).
Table of Contents:
1. Lightweight
1.1. Useful commands of the LGDE task
1.2. Lightweight without load distribution
1.3. Weight and distribution defined by a curve
1.4. Weight and distribution defined by elements
1.5. Combining the distribution curve and lightweight elements
1.6. Saving and replacing
2. Defining loading conditions
2.1. Loading Conditions Window
2.2. Loading compartments
2.3. Mass loads
3. Calculation arguments
3.1. Calculation mode
3.2. Handling of free surfaces
3.3. Heeling angles
3.4. Strength limit curves
4. Balancing tool
5. Loading conditions group
6. Useful commands in the LD task
7. Output
1. Lightweight
A ship's lightweight is defined in the LGDE task. This is a subtask of LD and cannot be entered from any other task. In lightweight definition, at
least the total weight, the centre of gravity, and the longitudinal weight distribution of the ship must be given. Weight distribution can be left
undefined, but in that case calculations for longitudinal strength cannot be performed.
Note! At least one lightweight version is required in order to create any loading conditions.
Only the total weight and the centre of gravity are given; the distribution is undefined.
The total lightweight and the centre of gravity are given and distributed according to a non-dimensional curve.
The total lightweight and its distribution are defined by a dimensional curve.
The total lightweight and its distribution are defined by local weight elements.
The total lightweight, the centre of gravity, and a non-dimensional distribution curve are given. Local weight elements are added and the
weight distribution curve adjusted so that the given weight and centre of gravity remain unchanged.
The distribution is retrieved from the Weight Calculation (WG) subsystem.
A non-dimensional distribution curve can either be a Lloyd's distribution (Lloyd's coffin diagram) or a user-defined distribution. A dimensional
distribution curve with absolute weights [ton/m] is always a user-defined curve. Note that if a dimensional distribution curve is defined, any weight
definition given with the commands WEIGHT and CG will be neglected.
Instead of using the LGDE task, the weight and its distribution calculated in the WG task can be used. In this case, the weight is first calculated in
the WG task and then linked to the LGDE task, and the LGDE task need not be entered at all.
The LD task uses a lightweight condition named A as the default, so it is convenient to define at least this condition.
In the LGDE task, all definitions are done by using commands as this task is not covered by the graphical user interface.
UNSAVE LIG Deletes a lightweight version from the database. For example:
UNS LIG TEST
DESCRIPTION Shows the description of the current lightweight version or weight distribution. For example:
DES
DES DIST
REPL Replaces an existing lightweight definition in the database with the current one.
DIST Defines the method or the curve according to which lightweight is distributed. See the explanation text !EXPL DIST for examples.
ELEM Uses a given table as a source for lightweight elements. For example:
ELEM FROM ELE*ELEMENTS
The simplest way to define a lightweight case is to give the weight and its centre of gravity. In the following, a new lightweight definition A is
defined by giving a weight of 1100 tons and its centre of gravity at x=35, y=0, and z=4 metres.
LD?>LGDE
Enter lightweight definition
Current version: A
LGDE?>CAT
** NO LIGHTWEIGHT VERSIONS DEFINED
LGDE?>NEW A
LGDE?>WEI 1100
LGDE?>CG 35 0 4
LGDE?>SAVE
LGDE?>CAT
A 10.8.2011 12:14
A very simple method of defining the longitudinal distribution of a weight is to use the Lloyd's coffin diagram. A block coefficient has to be given in
this method; it should be between 0.55 and 0.85. This base curve will then be adjusted so that the centre of gravity will be as given with the
command CG. In the following, a block coefficient of 0.83 has been used:
LGDE?>NEW B
LGDE?>WEI 1200
LGDE?>CG 32 0 4.2
LGDE?>DIST LLOYD 0.83
LGDE?>SAVE
LGDE?>CAT
A 10.8.2011 12:14
B 10.8.2011 12:20
LGDE?>WHE
** LIGHTWEIGHT VERSION: B
LGDE?>DES
** Lightweight version B
** ========================
** Date 10.8.2010 12:20
** Origin Lloyd's lightweight distribution cb=0.83
DIST,LLOY, 0.83;
WEI, 1200; ** (t)
CG, 32.000, 0, 4.2
Note! Lloyd's coffin diagram is based on the old ship design data and therefore it's not realistic for modern ships types.
It is also possible to define arbitrary weight distribution curves. In this case, the distribution is defined with the command
DIST u ,v ,u ,v ,...
in which u represents the relative location of relative weight v (both given as a value from 0 to 1).
In the following example, the relative weight at the aft end of the ship is 0.1, at the position 0.5*LOA the weight is 0.35, and at the fore of the ship
the weight is 0.05. A descriptive name is given for the lightweight version in the example. Also note that, in this case, the DIST USER command
has to be given:
LGDE?>NEW C
LGDE?>WEI 1200
LGDE?>CG 32 0 4.2
LGDE?>DIST 0 0.1 0.2 0.4 0.5 0.35 0.8 0.2 1 0.05
LGDE?>DIST USER
LGDE?>TEXT 'User defined distribution'
LGDE?>SAVE
LGDE?>CAT
A 10.8.2011 12:14
B 10.8.2011 12:20
C 10.8.2011 12:44 User defined distribution
LGDE?>WHE
** LIGHTWEIGHT VERSION: C
LGDE?>DES DIST
** user defined distribution curve (undimensional):
DIST, 0.00, 0.10, 0.20, 0.40, 0.50, 0.35,
0.80, 0.20, 1.00, 0.05;
In the following example, a lightweight is defined using a dimensional (ton/m) weight distribution curve:
LGDE?>NEW D
LGDE?>TEXT 'Abs. weight curve'
LGDE?>DIST DIM (-2.8 5) (3 8) (10 30) (20 20) (30 15) (55 15) (85 5)
LGDE?>SAVE
LGDE?>CAT
A 10.8.2011 12:14
B 10.8.2011 12:20
D 10.8.2011 13:32 Abs. weight curve
C 10.8.2011 12:44 User defined distribution
In the following, a new lightweight version is defined using a lightweight elements table, which is a NAPA table with the prefix ELE*. An empty
model table named ELE*MODEL can be found in the NAPA database. In the lightweight elements table, each row represents one element.
This table is created in the Table Editor in the same way as the openings arrangement table (explained in the previous chapter).
The weights and locations of lightweight elements are defined in the table. Optionally, also the longitudinal extension of any element can be given
by using either the x-coordinates or frame numbers. A default extension will be used if the longitudinal extension is not given. The weight
distribution of lightweight elements is a trapezoid, which requires that the centre of gravity is between 1/3 and 2/3 of the length. In calculations, the
extension is modified if this condition is not met.
Exercise: Create a new lightweight elements table. Name the table as ELEMENTS, and then select
ELE* as table prefix. Use the ELE*MODEL model table. Define the elements as in the figure above and
save the table.
The lightweight elements table can be used in lightweight definition as follows:
LGDE?>NEW E
LGDE?>ELEM FROM ELE*ELEMENTS
LGDE?>SAVE
Note! Modifying the lightweight elements table will not directly modify the actual lightweight. The ELEM FROM table command has to
be rerun, and the lightweight saved (replaced) for this to take place.
A lightweight is often defined by combining the distribution curve and additional information from the lightweight elements table. This is a
convenient method when the lightweight information improves during the design process and more accurate information becomes available. The
designer can add new lightweight elements anytime new information becomes available and update the lightweight definition.
Adding new elements will not affect the given total weight and the centre of gravity; only the shape of the distribution curve is modified on the
basis of the element information. The total weight and the centre of gravity have to be modified using the WEIGHT and CG commands. Finally, the
elements table will contain so accurate information that the lightweight distribution can be changed to be based on the lightweight elements only.
LGDE?>GET F
LGDE?>DES
** Lightweight version F
** ========================
** Date 2012-02-06 14:20
** Origin distribution defined by user (undimensional)
DIST,USER;
WEI, 1200; ** (t)
CG, 32.000, 0, 4.2;
** user defined distribution curve (undimensional):
DIST, 0.00, 0.10, 0.20, 0.40, 0.50, 0.35,
0.80, 0.20, 1.00, 0.05;
The second definition is the same as the first but with an elements table (the ELE FROM ELEMENTS1 command):
LGDE?>GET G
LGDE?>DES
** Lightweight version G
** ========================
** Date 2012-02-06 14:41
** Origin distribution defined by user (undimensional)
DIST,USER;
WEI, 1200; ** (t)
CG, 32.000, 0, 4.2;
ELEM FROM ELEMENTS1
** user defined distribution curve (undimensional):
DIST, 0.00, 0.10, 0.20, 0.40, 0.50, 0.35,
0.80, 0.20, 1.00, 0.05;
The ELE*ELEMENTS1 lightweight elements table used in the above lightweight definition looks as follows:
The floating positions of these two lightweight definitions would be exactly the same because the total weights and the centres of gravity are
exactly the same. The longitudinal weight distribution, however, would be different because of the used lightweight elements. Therefore, also
bending moments and shear force curves would differ.
The weight distribution of the first lightweight definition without lightweight elements looks as follows:
The weight distribution of the second lightweight definition with lightweight elements looks as follows:
The non-dimensional distribution curve defined by the user is adjusted when lightweight elements are added to maintain the given total weight
and centre of gravity.
Two commands are available for saving lightweight definitions: SAVE and REPLACE.
The SAVE command is used when any definition is saved for the very first time, whereas REPLACE is used when an existing definition is replaced.
The reason for having these two options is to prevent accidental overwriting of already existing definitions. The SAVE and REPLACE commands
are also used elsewhere in NAPA, for example, when loading conditions (in the LD task) or tables (in the TAB task) are defined by using
commands instead of the graphical user interface.
There are four main tabs in the Loading Conditions Window. These are located in the upper left area of the window:
Compartments tab is used when loading compartments in the arrangement. There are three separate views available on the
Compartments tab:
Load is used to load and unload compartments.
Free surfaces shows the current free surface moment, the correction of GM, and the rule for free surface calculation.
Compartment info shows the compartment details based on the geometry.
Mass Loads tab can be used to place loads anywhere by giving the mass, the coordinates of the CG, and, optionally, the longitudinal
extension of the load.
Containers tab is used to place containers in rows, bays, and tiers (requires a separate user licence for the Container Loading feature).
Grain tab is used to load grain (requires a separate user licence for the Grain Stability feature).
Arguments tab for arguments used in the calculations. The current set of arguments is always saved together with the loading case.
Criteria tab can be used for a quick check of intact stability criteria.
Results tab is used to view the results of the loading condition as a whole. The values are automatically updated according to the
changes in the loading condition.
Edit Tank tab is an alternative tool to load and unload compartments.
Output tab in used to create output lists and diagrams.
Purposes tab shows the PAR*PRO table containing the purposes used in the arrangement.
Std. Purposes tab shows the standard purposes table PAR*STD.
Cnt. Types tab is active only if a container arrangement has been defined in the CL task.
Any predefined setup (arrangement drawing definition) can be opened in the graphics area on the right-hand side of the window. The setup will
show the current loading condition and can also be used to load and unload compartments.
which will pick compartments from the default arrangement ARR*A to the upper table area. A predefined setup drawing can be opened in the
graphics area by selecting it from the drop-down list in the Select Setup field.
Compartments can be loaded by using the Mass (tons), Vload (m3), or Vrel (filling degree %) columns on the Compartments tab. As soon as
one of these values is given, the others are calculated. The setup will then indicate the loaded tanks with colours according to their purposes.
Also, the floating position and waterline are shown in the drawing.
Another way to load and unload tanks is using the setup drawing. A compartment is selected by clicking on it. The Loading menu is opened with
a right-click (this works also in the table area). Several compartments can be handled at the same time by clicking on the setup (or the
compartments in the table area) with the Ctrl key pressed down.
The third method to load a compartment is to select its name in the Compartments table and then open the Edit Tank tab in the lower table area.
The filling values can be given in the input fields or by using the sliding clutch on the right-hand side.
LOAD2
LOAD3
The Mass Loads tab in the Loading Conditions Window can be used for loading arbitrary loads anywhere onboard the ship.
The location of a mass load is expressed by its centre of gravity. As there is no associated geometry, there is no source for the distribution, which
is relevant for longitudinal strength calculations. When needed, the extension must, therefore, be given in the XMIN and XMAX columns in the
table defining mass loads. The weight distribution of a mass load has a trapezoid shape similarly to lightweight elements. This requires that the
centre of gravity is between 1/3 and 2/3 of the length. The following figure shows the Mass Loads tab as well as a few defined mass loads.
There are two reasons why it may be useful to define the formal location:
A free surface moment can be given to any mass load by using the FRSM column in the definition table.
The location of mass loads can be checked graphically in the Loading Conditions Window by opening the setup when the Mass Loads tab is
active. Load names and other drawing properties can be set in Drawing options.
In the above figure, Deadweight Constant (DWC) is used as a load. DWC also exists in the PAR*STD table as a purpose, therefore, it is
accounted for in the below example output list but 'PAINT' is not because there is no such purpose in the current purposes table. Mass loads
PAINT1 and PAINT2 are grouped in the output list because they have the same load definition but MASS1 and MASS2 are not, as can be seen in
the following output example:
LD?>LIST PAR
---------------------------------------------------------------------
NAME LOAD MASS FILL XM YM ZM FRSM
t % m m m tm
---------------------------------------------------------------------
CONTENTS= (RHO=0)
CONTENTS= (RHO=0)
CONTENTS= (RHO=1)
3. Calculation arguments
The calculations are controlled with a set of arguments which can be checked on the Arguments tab of the LD window or with the ARG command.
The arguments' explanation texts are available behind a right-click (Expl) in the LD window when an argument is selected or with the !EXPL com
mand; for example !EXPL MODE. An argument can be changed simply by typing the argument's new value in the Value column or with the
argument command; for example HEEL 0 5 10 15 20 30 40 50.
LD?>args
HULL STABHULL ;** hull name
RHO 1.025 ;** density
T/M3
MODE LFIX SRED USTR TRIM ;** calculation mode
HEEL 0 5 10 15 20 30 40 50 ;** heeling angle
DEGREE
ARRV A ;** arrangement version
LIGV A ;** lightweight version
FRSV STD ;** free surface version
SLACK 0.98 0.01 ;** slack limit
WAVE not given ;** wave
YREF OFF ;** fix ycg at 0.0
SYTOL 0.01 ;** symmetry tolerance M
DFL not given ;** deflection of the ship
OPARR not given ;** opening arrangement
FORCE not given ;** force heel side & range
STLIM not given ;** strength limits
TLIM not given ;** draught limit
PAR not given ;** parameters
AZI not given ;** azimuth angle
DEGREE
ROP ... ;** relevant openings
Note: It is strongly recommended and very important to always check the calculation arguments before calculating any results and
producing output. Note that the arguments are saved together with the loading case and that default arguments will apply when a new
case is started from scratch.
RHO Seawater density, default comes from the reference system (REF).
MODE Calculation mode related e.g. to the calculation of the floating position and longitudinal strength.
A set of calculation modes is used to control how, for example, the floating position is calculated and steel reduction is taken into account. The
following alternatives are available for the four components:
In the handling of free surface moments, rooms are defined as belonging to different groups (based on PURP and CLASS) in SM. Each group
may apply its own rule as to calculating the effect of free surfaces. For a single compartment in a group carrying liquid cargo, ten methods are
available for calculating free surface effects. These are presented in the below table.
DGZREAL Reduction of GM is calculated from the slope of the GZ curve GMRED = GM0 - d(GZ)/dheel; the slope calculated at the given
angle (default 5 degrees); correction of GZ as a real moment.
LLMAX (Maximum according to Lloyd's Register for MARPOL 25A) GM corrected by the largest moment of inertia at even keel; GZ
corrected by the real free surface moment using a filling for which the real free surface moment is a maximum at a 30-degree
angle of heel.
ITREAL GM corrected as in the rule REAL; GZ corrected as IT*sin(heel)/DISP, in which 'IT' is the transverse moment of inertia of the free
surface used for correction of GM.
REAL5 Real moment for slack tanks; GM correction at 5-degree heel for 98% filling. If filling is less than 98%, REAL will be applied.
FMAX Maximum free surface moment in the given fill range that is defined by FILLMIN and FILLMAX in the Load command. By default,
the whole net volume is included (FILLMIN=0 and FILLMAX=100).
The calculated moments are used for the free surface correction of the GM value and the GZ curve.
Note that in order to get a free surface moment for a tank, the Type of its purpose has to be either L or LH.
The handling of free surface calculations is mainly controlled by two arguments: FRS for defining the rules and SLACK for defining the limits
regarding when to calculate REAL free surface moments. The real free surface moment is calculated only if a tank's filling degree is within the
slack limits. Outside the limits the tank is considered to be empty or full. The default limits are 1% and 98%.
The free surface moments with the rule applied in the calculation for each room can be seen on the Free surfaces tab in the Loading
Conditions Window. The LIST FRS command will create a corresponding list.
The optional subgroup definition is used if only a selected part of the whole group is taken into account in the calculation of the free surface
moment. The subgroup is given as a qualifier of the rule, as in the examples below. The five subgroup alternatives are:
SLACK Only the slack tanks of the 'group' are taken into account in the calculation.
MAX The tank (or tank pair) that has the maximum free surface moment at 50% filling and at a 30 degree heeling angle is taken into
account. (IMO)
MAXL The same as the previous but only the loaded tanks are encountered. This alternative is usually only used when the IMO rules are
interpreted so that only loaded tanks can have free surface moments. (The default for the rule IMO is that all tanks regardless if they
are loaded or not, are taken into account.)
+SLACK This alternative takes into account the tanks that satisfy the criteria of MAX and are slack. In practice this also means that the tank
has to be loaded because a slack tank in NAPA is a tank with at least 1% filling, by default.
The following examples show a few possibilities of how the FRS rules can be used. See the main LD documentation for a more thorough
explanation.
FRS '*B IMO' 'OTHERS Tanks with CLASS (as defined in the arrangement) starting with the letter B (bunkers) with rule IMO, others with
REAL' REAL. This is the default free surface.
FRS 'ALL IMO' Rule IMO will be applied so that compartments of the maximum moment in each group (e.g. HFO) will be used. In
other words, the subgroup MAX is used as default.
FRS '*C REAL' Rule REAL will be applied to all classes having a name starting with the letter C (cargo); for other load groups, rule
'OTHERS IMO' IMO will be applied.
FRS '*C REAL' As above but only CARGO tanks will be taken into account; other tanks will have no free surface at all.
FRS 'BW0 0' 'OTHERS Free surface correction will not be calculated for load BW0; for other liquid load groups, rule IMO will be applied.
IMO'
FRS '(T10) 100' '(T20) Corrections given directly for given tanks.
120' '(T30) 300' Moment curve=sinus
FRS 'ALL 0' Corrections for free surfaces will not be calculated at all.
FRS '(HFO1 HFO2) R50' Here the tanks HFO1 and HFO2 are calculated with a real moment at 50% filling; all other bunker (CLASS=B)
'*B IMO' 'OTHERS tanks according to IMO (subgroup MAX as the default), and all other (slack) tanks with a real surface moment.
REAL'
The default free surface calculation setting STD contains the free surface calculation rule FRS '*B IMO', 'OTHERS REAL' and the slack limits
SLACK 0.98, 0.01.
The HEEL argument defines heeling angles for stability calculations. It is recommended to have an increment between the angles that is small
enough, at least with small heeling angles, to fit more information to a GZ curve through the calculated points. For example:
HEEL 0 5 10 15 20 30 40 50
HEEL 0 10 20 30 40 50
The curves limiting longitudinal strength can be created using a Manager Application called STRLIM. This application can be opened directly from
the LD Window:
MGR*STRLIM is a normal NAPA Manager Application which are explained more in detailed in an own chapter later in this book.
Limit curves for bending moment, shear force and torsion moment can be defined for harbour, seagoing and damaged conditions in this
application. The top level of the application is shown in the below figure where names and descriptive texts for the limit curve groups can be
given. The defined curves are automatically included in these groups to be used in the arguments of loading conditions.
4. Balancing tool
The required floating position can be established easily by using the balancing tool with which the target draught, trim, and heel with possible
strength limits can be given. The method determining how the loads can be changed or moved is given, and then NAPA will attempt to establish
the target floating position. If successful, NAPA will inform which operations are required to reach the target and will perform them automatically, if
needed.
Balancing Window
The balancing operation can be done with a set of tanks selected either from the setup drawing in the LD window or on the basis of the purpose of
the tanks, for example, ballast water. The target values are given as input.
There are five alternative methods to search for the target based on the amount of load to be used:
If strength limit curves were taken into use in LD arguments, then these can be taken into account in balancing as well.
When the required input has been provided, solution search is started by clicking the Preview button. If a solution is found, the required
operations will be shown in the upper-right Operations pane of the Balancing Window. The proposed operations can be applied to the current
loading condition by clicking the Apply button. Simply closing the Balancing Window will not change the loading condition at all.
In the following example, all BW tanks are fully loaded. The ship is trimming 1.546 metres. The target is zero trim with a minimum amount of
ballast water loaded. The input and solution are shown in the following figure:
Command Description
CAT Catalogues of stored data, such as CAT LOAD, CAT LGR, CAT LCUR.
DES LOAD R Description of the current loading condition with relative values.
UPDATE ALL Updates calculated data of all loading conditions; useful after geometric changes.
More information on each of the above commands can be viewed with the !EXPL command.
7. Output
Both alphanumeric and graphical output can be produced by using the Output tab in the LD window. Please see the chapter entitled Output for
detailed instructions.
Damage Stability
The Damage Stability (DAM) task is used to calculate stability and stability requirements for a damaged ship. The calculation method is based
on real conditions meaning that NAPA will calculate the actual physical behaviour of the ship in a damaged condition without approximations or
interpolations from pre-calculated tables.
The surfaces of inflooded water and liquid cargoes are always horizontal (parallel to the sea level), but also sliding cargo can be handled. The real
shifting moments of moving masses are also applied when calculating the GZ curve. GM values in damage stability are represented by using the
derivative (inclination) of the GZ curve. These quantities are called GMACT and GMACT0 and they represent the GZ derivative at equilibrium and
upright respectively.
In general, damaged compartments are treated as lost buoyancy. This applies to the final equilibrium condition. For intermediate phases, a
special approach is required to ensure consistent GZ curves between the intermediate phases and the final equilibrium condition. By default, a
common free surface is assumed in flooded rooms. Moreover, the amount of floodwater in intermediate phases is normally defined at the upright
position and kept constant when the GZ curve is calculated. This calculation can be controlled with various options.
The 'added weight' method is applied to liquid loads and accumulated water, as well as flooding in time-domain simulation.
From the user's point of view, the Damage Stability task can be divided into three main parts:
Input.
Calculation.
Alphanumerical and graphical output.
In order to calculate the stability of a damaged ship, the user has to define a minimum set of information, including:
In order to obtain complete damage calculation results, the openings, margin line, relevant damage stability criteria, and so on, are needed as
well.
All output, criteria calculation, immersion of openings, and the margin line are calculated on the basis of the stability results saved in the
secondary database. This means that these objects can be redefined and modified without having to recalculate the stability results.
Table of Contents:
For more information on how to define DAMHULL, see the chapter entitled Preparations for Stability Calculations.
2. Initial conditions
The initial condition determines the ship's floating position and centre of gravity and liquid loads onboard before the damage.
These alternatives may not be intermixed. If the initial condition is defined with draught and trim, then GM or KG must be given. Similarly, if
displacement is used, CG must be given. Otherwise, the situation remains undefined.
For example:
Or:
It is also possible to define the liquid loads onboard. However, liquids are rarely used, or should be used, in the definition of the initial
condition. Most of the commonly used stability rules and regulations require that calculations are carried out assuming that compartments are
empty, that is, the outflow of liquid load is not taken into account. Exceptions would be, for example, the calculation of damage stability for tankers
and the case where permanent ballast is used, or there are heeling water tanks that are always (partly) filled.
When defining liquid loads, the amount of load can be given as volume (m3), filling degree (%), or weight (t). Unless otherwise defined, the
compartment is assumed to be full.
When liquid loads are defined and a compartment containing a liquid load is damaged, the density of the liquid in the compartment will gradually
change towards the density of sea water.
If the compartment is above the sea level, it is assumed to become empty as a result of the damage.
One way to define the initial condition is to refer to an existing loading condition defined in the LD task. In this case, the displacement, floating
position, centre of gravity, stability curve, and liquid loads will automatically be retrieved from the loading condition.
Note! The user must be aware of the consequences when referring to a loading condition (asymmetric floating position, free surfaces,
outflow of liquid loads, recalculation of damage case if loading condition changes, permeabilities, and so on).
The recommended way to refer to a loading condition is to use the so-called independent mode, option IND, which breaks the connection
between the loading condition and the initial condition. Only displacement, the centre of gravity, and possible liquid loads, including GM
reductions, are transferred to the initial condition. The intact stability is recalculated in the DAM task. For example:
The following example shows how an initial condition can be defined in a way that it is dependent on the original source, i.e. changes in the
loading condition make the initial condition out-of-date:
To simplify the actual calculation command, initial conditions can be grouped. A group of initial conditions is defined simply by naming the group
and specifying which initial conditions belong to it. For example:
Dam?>IGR IG
IGR?>INI INI1 INI2 INI3
IGR?>OK
In the above, the name of the group of initial conditions is IG and the members of the group are INI1, INI2, and INI3.
DES INI group_name Descriptions of all the initial conditions belonging to the group.
2.3. Exercise
INIT INI1
T 5
TR 1
GM 1.3
OK
INIT INI2
T 4.5
GM 2
OK
IGR IG
INI INI1 INI2
OK
3. Damage definitions
At its simplest, a damage definition is just a list of damaged compartments. For example:
Dam?>DAM DAM1
Case?>ROOM R1 R2 R3 R4
Case?>OK
A damage definition can be divided into numerous stages, each of which will end at the equilibrium position. If, for example, a damage case has
two stages, the first of these could be the situation before cross-flooding, and the second after cross-flooding (the final equilibrium). The names of
these stages can be selected freely; in the following example, 'FIRST' and 'FINAL' have been used:
Dam?>DAM DAM2
Case?>STAGE FIRST
Case?>ROOM R1 R2
Case?>STAGE FINAL
Case?>ROOM R3
Case?>OK
The stages can be divided into a set of quasi-static intermediate phases. If, for example, a stage is divided into five phases, it means that the
damaged compartments will be filled gradually in five phases (in addition to the equilibrium phase), and that stability will be calculated at the end
of each phase. For example:
Dam?>DAM DAM3
Case?>STAGE FIRST
Case?>PHASE 2
Case?>ROOM R1 R2
Case?>STAGE FINAL
Case?>PHASE 4
Case?>ROOM R3
Case?>OK
In the above example, stage FIRST has two and stage FINAL four intermediate phases.
A common water surface allowing free water flow between rooms (default). The total volume of inflooded water in the rooms is kept
constant when the ship is heeled, causing the amount of flood water in individual rooms to vary as a function of heel.
Individual water surfaces at different heights. The volume of inflooded water in a room is kept constant when the ship is heeled. The
individual water surface is defined with the IND option in damage definition.
In the following example, room R1 has an individual water surface, and rooms R2 and R3 have a common water surface:
Dam?>DAM DAM4
Case?>STAGE FIRST
Case?>PHASE 2
Case?>ROOM R1/IND R2 R3
Case?>OK
A group of damage definitions is defined by naming the group and specifying which damage definitions belong to it. For example:
Dam?>DGR DG
DGR?>DAM DAM1 DAM2 DAM3
DGR?>OK
In the above, the name of the group of damage definitions is DG and the members of the group are DAM1, DAM2, and DAM3.
DES DAM group_name Descriptions of all the damage definitions belonging to the group.
3.3. Exercise
DAM DAM1
STA FINAL
PHA 2
ROO HFO3P WB4P
OK
DAM DAM2
STA FIRST
PHA 1
ROO WB3P WB4P
STA FINAL
PHA 2
ROO CH2C PERM=0.6
ROO HFO3P HFO2P
OK
DGR DG
DAM DAM1 DAM2
OK
As can be seen from the above exercise, a compartment's permeability can also be defined in a damage case. This permeability is valid in one
particular damage definition only overriding the permeability defined in SM.
4. Calculation arguments
Calculations are controlled with a set of arguments which can be checked with the ARG command. The arguments' explanation texts can be
viewed with the !EXPL command , for example: !EXPL OPTION. An argument can be changed simply by typing the argument's new value with
the argument command, for example: ROP OPE1 OPE2 OPE3.
Dam?>ARG
HULL DAMHULL ;** hull name
HEEL 0 1 3 5 7 10 12 15 20 30 40 50 ;** heeling angle
DEGREE
ARRV A ;** arrangement version
OPARR not given ;** opening arrangement
CCONN not given ;** compartment
connections
FORCE OFF ;** force heel side &
range
OPTION PERM NOPROGR LOG CDISP CDIR ;** calc. and output
options
MARGIN not given ;** margin line
ROP ... ;** relevant openings
RCR not given ;** relevant criteria
CGM not given ;** changed gm
M
WTARR not given ;** watertight
arrangement
SYTOL 0.001 ;** symmetry tolerance
M
TRLIM 80 ;** trim limit
DEGREE
SWH not given ;** significant wave
height M
FRBD not given ;** freeboard deck edge
AAS not given ;** auto assign of
arguments
Note! It is strongly recommended and essential to always check the calculation arguments before calculating any results and producing
output.
HULL Name of the hull object used in the calculations; default is DAMHULL.
CCONN Name of the compartment connection table (with prefix CCONN*). This table defines the rooms which are connected together in
the flooding process.
OPTION There are seven options for controlling calculation and output. Each of these has two or more alternatives.
RCR Relevant damage stability criteria. The command ICR ALL (ICR = irrelevant criteria) will drop the criterion or criteria group out of
the arguments of DA by making them irrelevant.
TRLIM Normally, if a ship trims more than 80 degrees, it is considered lost. It takes some time to iterate the floating position beyond the
80- degree limit. If there are many damages leading to the case of 'ship trims upside down', time can be saved by assigning a
smaller trim limit.
FRBD Freeboard deck edge; defined similarly to the margin line, and is mostly used in water-on-deck calculations.
Note! Only the most common option alternatives are introduced below. The detailed explanation of each can be viewed with the !EX
OPT command in the DAM task.
PERM The steel reductions of damaged tanks are replaced by permeabilities in flooded condition. This means that the water occupies a
volume specified by the permeability defined for the compartment.
NOPERM The steel reductions of damaged tanks are NOT replaced by permeabilities in flooded condition. This means that the water
occupies the same volume as the load did before the damage in cases where the compartment was fully loaded with capacity=1.
NOPROGR Studying of progressive flooding not allowed, but the range of the GZ curve will be cut to the angle when the first opening
touches the water.
PROGR Studying of progressive flooding is allowed. The spreading of flood water through unprotected openings in the ship is checked.
Instead of being cut when a weathertight or unprotected opening immerses, the GZ curve will get a step, which means that the
quantities, such as the area and range, of the curve will be taken into account after the immersed opening.
NOLOG Flooded compartments and heeling angles in the calculation log are not printed.
CDISP Prints and plots the results with reference to the constant displacement method.
VDISP Prints and plots the results with reference to the variable displacement method, that is, takes the loss of liquid load into account.
CDIR Calculates the GZ curve in the constant direction specified by the azimuth angle in the initial condition.
DB Keeps results in the database but removes them from memory immediately after use. This option enables extensive runs also on lower
capacity computers.
MEM Keeps results in memory during the whole run without removing them after use. This option may be used if connection to the database
is slow and there is enough memory space on the computer to keep all the results in memory at the same time.
COMM Rooms open to sea fill with a common surface (provided they are not marked to flood individually).
The current margin line is defined as the argument MARGIN. In the following example, the curve MARGIN is defined in the DEF task and taken
into use in the MARGIN argument:
Dam?>MARGIN MARG
Marg?>CURVE MARGIN
Marg?>OK
The openings defined in the openings arrangement table (argument OPARR) are not automatically taken into account unless they are made
relevant with the ROP command. If all openings from the selected arrangement are used, the ROP ALL command is given. If only a set of
openings is made relevant, the command is:
in which op1, op2, and so on, are the names of the openings in the arrangement.
The selection of relevant openings is emptied with the command IRO ALL (IRO = irrelevant openings).
Openings are used as calculation arguments only if progressive flooding stages are calculated. Otherwise, they are treated as output parameters
and may be changed freely after calculation.
The CAL command starts the calculation of the hydrostatics of a given case or a group of cases. The results of each stage and phase are
automatically stored in the secondary database (DB4) for future use (output).
CAL INI1/DAM1 Calculates the damage 'DAM1' with 'INI1' as initial condition.
CAL IG/DG Calculates damages from the damage group 'DG' with initial conditions from the group 'IG'.
If the calculation results have already been stored in the database and are up-to-date, the cases can be recalculated by using the FORCE option.
Exercise: Calculate damage stability for IG/DG. Remember to check the arguments before starting the
calculation.
6. Output
The easiest way to create output is to use the Output tab in the task-specific window.
However, output commands can sometimes be very useful for quick results checks. The following paragraphs introduce some basic output
commands. More detailed information on all output commands is available in the Napa Manuals, or can be viewed with the !EXPL command.
The chapter entitled Output chapter provides more detailed information on how to produce output.
The floating position of each case can be checked with LIST FLOAT ini/dam. For example:
--------------------------------------------------------------------------
------
CASE STAGE PHASE SIDE T TR HEEL RESFLD
OPEN RESMRG
m m degree m m
--------------------------------------------------------------------------
------
INI1/DAM1 INTACT EQ - 5.000 1.000 0.0 -
- -
INI1/DAM1 FINAL 1 PS 5.093 1.417 2.9 -
- -
INI1/DAM1 FINAL 2 PS 5.147 1.746 5.7 -
- -
INI1/DAM1 FINAL EQ PS 5.173 1.998 8.5 -
- -
--------------------------------------------------------------------------
------
In the above, the columns RESFLD (reserve to downflooding), OPEN (critical opening), and RESMRG (reserve to immersion of margin line) are
empty because the margin line and relevant openings were not given in the arguments.
Next, the opening arrangement OPE*OPENINGS is activated in the arguments, and all the openings in the table are set as relevant. The
commands needed to do this are:
Dam?>OPARR OPENINGS
Dam?>ROP ALL
Dam?>ARG
HULL DAMHULL ;** hull name
HEEL 0 1 3 5 7 10 12 15 20 30 40 50 ;** heeling angle
DEGREE
ARRV A ;** arrangement
version
OPARR OPENINGS ;** opening
arrangement
CCONN not given ;** compartment
connections
FORCE OFF ;** force heel
side & range
OPTION PERM NOPROGR LOG CDISP CDIR ;** calc. and
output options
MARGIN not given ;** margin line
ROP OP1P OP1S OP2P OP2S OP3P OP3S OP4P OP4S OP5P OP5S OP6P
OP6S
;** relevant openings
RCR not given ;** relevant
criteria
CGM not given ;** changed gm
M
WTARR not given ;** watertight
arrangement
SYTOL 0.001 ;** symmetry
tolerance M
TRLIM 80 ;** trim limit
DEGREE
SWH not given ;** significant
wave height M
FRBD not given ;** freeboard deck
edge
AAS not given ;** auto assign of
arguments
--------------------------------------------------------------------------
------
CASE STAGE PHASE SIDE T TR HEEL RESFLD
OPEN RESMRG
m m degree m m
--------------------------------------------------------------------------
------
INI1/DAM1 INTACT EQ - 5.000 1.000 0.0 3.07
OP6P -
INI1/DAM1 FINAL 1 PS 5.093 1.417 2.9 2.63
OP6P -
INI1/DAM1 FINAL 2 PS 5.147 1.746 5.7 2.25
OP6P -
INI1/DAM1 FINAL EQ PS 5.173 1.998 8.5 1.92
OP6P -
--------------------------------------------------------------------------
------
As can be seen, the latter output is completed with the information pertaining to both the most critical opening (OP6P) and the reserve to
downflooding (RESFLD) at each stage and phase.
Additional useful output alternatives can be viewed with the !EXP LIST command in the DA task.
The NAPA database contains several standard macros, so-called 'dot macros', for list output. These macros can be catalogued with the LIST
.CAT command. A short explanation text for each is available with the option ?, for example LIST .DRES ?.
These macros are started with the LIST command. For example:
Graphical output is handled with a number of PQ/POO-controllable PLD commands. The list of alternatives can be viewed with the !EXP PLD co
mmand. For example:
The list of alternatives can be viewed with the !EX DRW command. A setup should be defined or opened before giving the drawing command. For
example:
A number of standard macros for graphical output is available in NAPADB. More information on standard macros can be found in the Output
chapter of this manual.
These macros can be catalogued with the PLOT .CAT command. Further help is available with the ? option in the same way as with listing
macros. These macros are started with the PLOT command (PLOT .DAMDEF dam). For example:
The case scanner can be activated on the Case Scanner tab in the DA task-specific window.
To start a scanning session, an initial group and a damage group must be selected in the Select cases pane. Either the buttons or the drop-down
list of the combo boxes can be used to select cases.
When the groups have been selected, all possible combinations of calculation cases will appear in the Scan cases pane. Selecting one
calculation case by clicking on it will activate the Stage-Phase-Side portion of the pane displaying all possible GZ curves that have been
calculated for the case. If the calculations for the case are not up-to-date, nothing will show up in the Stage-Phase-Side pane. Automatic
calculations can be enforced by ticking the Calculate obsol. cases option.
In the Output windows pane, the preferred output formats can be chosen for the selected case.
Changing the active case will update all open Output windows.
The required subdivision index R is calculated for the ship according to the rule formula which is based on the subdivision length of the ship. In
the case of a passenger vessel, the number of passengers is taken into account as well. The attained subdivision index A must be equal to or
greater than the required index. In other words,
A R
in which
In the calculation of the attained index A, the following factors are used:
7.1. General
Probabilistic damage stability calculation in NAPA is based on table and standard calculations and a variety of output functions. The easiest way
to perform these quite long and complex calculations is to use the NAPA Manager application MGR*PROB. Nevertheless, the command-based
calculation process is presented here in order to give an idea of the required steps, definitions, and most important options.
This chapter will introduce a case of SOLAS 2009 calculations for the cargo ship used as an example in this manual. Openings and compartment
connections are not taken into account, neither are any of the more advanced calculation options. More detailed information about probabilistic
damage stability can be found in the chapter entitled Damage Stability in the Napa Manuals.
Prior to starting the calculation process, it must be ensured that the following definitions exist and are error-free:
Hull surface.
DAMHULL.
General arrangement.
First, subdivision draught needs to be defined as the parameter HSD in the REF task to ensure accurate calculation of b values:
TASK?>REF
REF?>HSD 4.8
REF?>OK
A surface which follows the shape of the hull at a distance of B/2 at the height of subdivision draught is needed as the extreme penetration limit of
the damages. This surface can be created in the DEF task with the GEN command:
In the above, the name of the generated surface is B2LIM. The Y option at the end of the command means that the surface is not limited to the
centre line but extends to the negative side of the ship.
If both sides are to be studied, the limiting surface is needed on the other side of the ship as well. This can be done as easily as by reflecting the
existing surface B2LIM:
DEF?>SUR B2LIM_NEG
S?>REF B2LIM
S?>OK
The permeabilities of purposes should be checked in the PAR*PRO table because there are some special requirements in SOLAS 2009
pertaining to them. The PERM column defines the constant permeability and, according to the rules, the following are to be used:
Spaces Permeability
Stores 0.60
Accommodation 0.95
In addition to the above, a variable permeability depending on the current draught is to be defined for the following compartment types:
The variable permeability is defined in the IPERM column. PERM is ignored whenever IPERM is available. The definition syntax is as follows:
In the above, 'T' in front of the syntax refers to the draught; 'perm1' is the permeability used up to draught 'T1'; 'perm2' the permeability used up to
draught 'T2'; and so forth. The draughts where permeability changes should be selected from between the lightest/partial (T1) and partial/deepest
(T2) draughts.
For example, let us say the example ship's deepest draught is 4.8 metres and the lightest service draught 3.3 metres. Based on the rule formula,
the partial draught is then 4.2 metres. The variable permeability IPERM should be defined for the purpose CAL (liquid cargo) in the PAR*PRO
table:
The definition above means that permeability 0.95 is used until draught is 3.75 metres (between the lightest and partial draughts) where
permeability will change to 0.90. The permeability will change again to 0.70 when the draught is 4.5 metres (between the partial and deepest
draught).
The default subdivision name to be used should be defined as a new quantity in the REF task. The below example sets the default subdivision
table SUBD*ZONES:
TASK?>REF
REF?>ADD SUBD ZONES
REF?>OK
The subdivision is defined as a table with the SUBD* prefix, and it presents the framework for the penetration of the damage:
Zones: x limits.
Longitudinal bulkheads: y limits.
Decks: z limits.
The graphical user interface is available for defining the subdivision table:
No strict rules govern the subdividing except the subdivision length: Ls defines the extremes of the actual hull. In practice, all watertight
boundaries should be used in the subdivision to get a good index. Zone boundaries need not coincide with physical watertight boundaries. In the
case of passenger ships, also A-class boundaries should be included in the subdivision.
Transversal limits
In the SUBD* table, the Aft Limit column is the zone's aft boundary and Fwd Limit the fore boundary.
Longitudinal limits
In the SUBD* table, the PS Limit column is the zone's port side penetration limit and SB Limit the starboard side penetration limit until the B/2
boundary. An existing longitudinal bulkhead on the centre line should be included in the longitudinal limits in those zones where the breadth of the
hull is smaller than the reference breadth at the subdivision height. The B/2 surface acts automatically as the extreme penetration limit and,
therefore, need not be included in the subdivision table.
If a zone has multiple longitudinal limits, they are given in the order from the ship’s side towards the centre line, separated with a slash (/).
Horizontal limits
In the SUBD* table, the Deck Lower column is the horizontal boundary limiting the damage downwards for the zone and Deck Upper is the
horizontal boundary limiting the damage upwards for the zone.
If a zone has multiple horizontal limits, they are given in the order from bottom upwards, separated with a slash (/).
Note!: As there are three load lines, some horizontal limits can appear in both columns. Load lines will be discussed further in the
following chapters.
Hint: The easiest way to collect horizontal limits to correct columns is to start from the deepest subdivision draught and check which
limits are below that level. These limits are input in the Deck Lower column. Then continue from the lightest draught and check which
limits are above that level. These limits are input in the Deck Upper column.
Example: The SUBD*ZONES subdivision is created for the example ship for PS damages.
In the example below, there is a small gap between zones Z04 and Z05. This is due to the corrugated bulkhead between the large cargo tanks. If
the limit is put in the middle of the bulkhead, both cargo tanks would always be flooded if a damage occurred in either zone. With this trick, only
cargo hold CH1C will be damaged in zone Z04, and cargo hold CH2C in zone Z05.
When the limits have been input, the corresponding coordinate values are displayed in columns X1, X2, BP, BS, HHSD, and HHSU of the
subdivision table. The BP and BS values display the distance from the hull surface to the longitudinal limit.
The subdivision draught set in the REF task is shown in the subdivision graphical user interface. If the value is redefined there, then the new value
will be saved in reference system, too.
Each watertight compartment is placed within the grid work of the subdivision in the compartment limits table. This table is generated
automatically, however, it must be checked before continuing with the process. Any error in this table will inevitably cause errors in the generated
damage cases.
Main Window: Task > Damage Stability > Definition of Compartment Limits
A new table is created by clicking the New button and naming the table; 'CLIM' is used in the below example. All compartments within DAMHULL
are collected in the NAME column and located in the watertight zones as soon as the name of the used subdivision table is selected from the
drop-down list:
When a compartment name is selected in the NAME column, the corresponding compartment will be highlighted in the setup drawing. This makes
it easy to browse through the list of compartments and check that NAPA has located a given compartment in a correct zone. If there are errors in
the table, that usually indicates that something is wrong either in the arrangement or in the subdivision table.
To generate single-zone damages, the GEN DAM command is used in the DAM task. This will generate cases based on the subdivision table and
the locations of compartments within this subdivision. This command has numerous options, the most relevant of which are introduced below:
in which:
BOX Box-shaped damage (default; should be always used with SOLAS 2009!).
<pref><side><zone>.<ls>.<hsu>-<hsd>
Examples:
SDSP2.1.1-1 Same as above but with the lesser extent limit downwards.
The generating command will add new lines to the damage table, if one already exists. To delete an old table, the UNS command should
be used in the TAB task.
It is recommended to reset the runtime memory of any tables before running the generating command. This can be done at the Task leve
l with the !TAB RESET command.
The set of single-zone damages for our example ship is created as follows:
A total of 30 damages were generated and saved in the TAB*DAM1 table. The damage definitions were stored in the database as well.
NAPA creates multiple-zone damages by combining them from a set of single-compartment damages. Multiple-zone damages are needed to gain
a better index, however, the number of damages grows easily very large, even in a simple arrangement. Normally, at least 2- and 3-zone
damages are generated.
Multiple-zone damages are generated with the GEN DAM command in the same way as single-zone damages. Basically, the command options
are similar; only the number of adjacent zones and the name of the table containing the single-zone damages need be added:
nn Number of adjacent zones, for example 2-3 for 2- and 3-zone damages.
The existing results table must be deleted and runtime memory reset before running the command.
2- and 3-zone damages are created for our example ship as follows:
A total of 109 damages were generated and saved in the TAB*DAM2 table. The damage definitions were stored in the database as well.
According to SOLAS 2009, each damage should be calculated with three initial conditions:
The needed draughts were discussed earlier when defining variable permeabilities, and now they are used in the initial conditions:
The calculation of damage cases can be controlled by means of a summary table. An empty model table, called TAB*SOLASII-1MODEL, can be
found in NAPADB.
There is one line per each initial condition, and the damage table must be entered into the summary table. The columns are:
In the above table, all three initial conditions are calculated with both single-zone (table DAM1) and multiple-zone (table DAM2) damages. The
weight coefficients (0.4/0.2) are based on the rules.
The calculation formulas are based on the ship type, the alternatives being PASSENGER or CARGO. This is to be set as the parameter PBTY in
the reference system:
TASK?>REF
REF?>ADD PBTY CARGO 'S factor calc. parameter'
REF?>OK
Note! If the PBTY parameter is missing, NAPA will use the calculation formula for cargo ships.
Before starting to calculate the damage cases, the arguments of DAM should be checked. The most important of these are:
in which
For example:
The above command will start the calculation of each possible case based on the initial conditions and the damage tables included in the
summary table TAB*SUMMARY. The results will be saved both in the database and the table named TAB*RESULT.
Note! The CAL command only adds new lines to the existing results tables. It is good practice to unsave the tables and to reset the
table calculation task before rerunning calculations. See the example at the end of this chapter.
After calculating all possible cases, duplicate cases need to be removed from the results tables. Each case in a results table has a control
number, and the cases with identical control numbers are considered duplicates (lesser extent damages). The duplicates are to be removed on
the basis of the following alternative rules:
Select the case having the minimum s and remove others (MINS).
Select the case having the minimum s and, if several have the same minimum s, among these select the one having the greatest heeling
angle (MINS, MAXHEEL).
Select the cases having s>0 (NOZ).
The above command will select the cases with the minimum s and the greatest heeling angle from the TAB*RESULT table, and will save the
results as TAB*RESULT1. Note that the original damages and calculation results will not be removed from the database, but a new table is
created based on the selection.
DAM?>TAB
TAB?>UNS RESULT RESULT1
TAB?>OK
TAB?>!END
TASK?>!TAB RESET
TASK?>DAM
Probabilities are calculated with a separate command, CAL PROB. The command actually performs the calculation A=p*v*s for each load line.
Note that the r value is included in the p value:
The resulting factors of each case are added in the results table.
The results of probabilistic damage stability can be listed, for example, by using the LIST PSUM and LIST PRES commands. A huge number of
modifications can be created by working with TOO (Table Output Options) and LQs (List Quantities). For the NAPA Basic programmer, all
information is available in the results tables, and even more output can be created through table calculation.
A short probabilistic damage stability summary can be produced with the LIST PSUM command. This command will add information on the case
and one line per initial case. The required index is also shown. For example:
The LIST PRES command contains all possible quantities as a function of the calculation case. Two predefined LQs are used in the following
examples:
--------------------------------
DAMAGES W*P*V*S
--------------------------------
1-ZONE DAMAGES 0.54154
2-ZONE DAMAGES 0.25351
3-ZONE DAMAGES 0.02350
--------------------------------
A-INDEX TOTAL 0.81856
--------------------------------
------------------------------------------------------------------
CASE P V S W W*P*V*S
------------------------------------------------------------------
DL/SDSP1.1.1 0.07472 0.28513 1.00000 0.200 0.00426
DL/SDSP1.1.0 0.07472 0.71487 1.00000 0.200 0.01068
DL/SDSP2.1.1 0.06943 0.28513 1.00000 0.200 0.00396
DL/SDSP2.1.0 0.06943 0.71487 1.00000 0.200 0.00993
...
...
...
DS/SDSP6-8.3.0 0.00250 0.76513 0.00000 0.400 0.00000
DS/SDSP6-8.4.1 0.00686 0.00000 0.53440 0.400 0.00000
DS/SDSP6-8.4.2 0.00686 0.23487 0.00000 0.400 0.00000
DS/SDSP6-8.4.0 0.00686 0.76513 0.00000 0.400 0.00000
------------------------------------------------------------------
SUBTOTAL 0.32906
------------------------------------------------------------------
TOTAL 0.81856
------------------------------------------------------------------
The s factor diagram can be produced with the macro DA.SFACDIAG. The instructions for the macro are got by running the macro without
parameters, !ADD DA.SFACDIAG. The diagram is based on the calculated s values in the result table, and shows the severity of damages. More
information can be found from NAPA Manuals.
Dam?>!ADD DA.SFACDIAG('SDSD1RES1-TR0','ZONES','P','DS',1)
NAPA offers good tools for finding the minimum GMs that will ensure the fulfilment of the rules. The MINGM option of the CAL PROB command will
perform an online calculation without changing the results table or the initial cases:
SUM(P*V)=0.985508
GM decreased -2.5 m giving A=0.06214
GM decreased -1.25 m giving A=0.59365
GM decreased -1.875 m giving A=0.41321
GM decreased -1.562 m giving A=0.51780
GM decreased -1.719 m giving A=0.48520
GM decreased -1.797 m giving A=0.46224
GM decreased -1.836 m giving A=0.44243
GM decreased -1.855 m giving A=0.43117
GM decreased -1.846 m giving A=0.43581
GM decreased -1.851 m giving A=0.43358
GM decreased -1.853 m giving A=0.43240
GM decreased -1.854 m giving A=0.43179
GM decreased -1.854 m giving A=0.43210
GM decreased -1.854 m giving A=0.43194
If one wants to use the optimized GM values in the results, then the initial conditions have to be modified, and a new calculation round must be
started.
Stability Criteria
Stability Criteria (CR) is an independent subsystem of NAPA and it can be entered directly from the Task level. It is, however, perhaps more
understandable to consider it as a subsystem of LD and DAM tasks. The CR task can be used in two environments:
The following figure illustrates the relations between the LD, CR, and DAM tasks:
Check whether the current loading condition or damage case meets the current stability criteria requirements.
Iterate the minimum GM and the maximum KG to assure compliance with the relevant stability criteria.
If the CR task has been entered directly from the Task level, the working environment will be INTACT (CR_I). In this case, the environment can be
changed to DAMAGE (CR_D) in the arguments (ENV). However, if the CR task has been entered from LD or DAM, the environment cannot be
changed.
The CR_I task has a task-specific window that can be opened by selecting:
A loading condition can be checked against intact stability criteria in the CR_I task. The loading case is first opened in LD, and then moved to the
CR_I task as follows:
LD?>GET LOAD2
LD?>CR
CR_I?>
Before creating any output, it has to be ensured that the arguments have been set correctly. The most important arguments are as follows:
RCR Relevant criteria against which the loading condition is checked. One criterion, several criteria, or the name of a criteria group is
given. In the above example, RCR IMO (criteria group) has been used.
ROP Relevant openings; determines which openings in the OPARR table are taken into account.
Note! When a loading condition is given as input, T, TR, GM, HULL, HEEL, and MODE arguments will be ignored. These are used to
define a local loading condition.
Output can be created with the LIST and PLD commands. For example:
-------------------------------------------------------------------
RCR TEXT REQ ATTV UNIT STAT SIDE
-------------------------------------------------------------------
AREA30 Area under GZ curve . 0.055 0.610 mrad OK SB
AREA40 Area under GZ curve . 0.090 0.869 mrad OK SB
AREA3040Area under GZ curve . 0.030 0.259 mrad OK SB
GZ0.2 Max GZ > 0.2 0.200 1.720 m OK SB
MAXGZ25 Max. GZ at an angle . 25.000 26.247 deg OK SB
GM0.15 GM > 0.15 m 0.150 4.064 m OK SB
-------------------------------------------------------------------
Criteria check is made on the Criteria tab in the LD window. The calculation arguments for criteria check can be set by clicking the Intact
Criteria... button. The external window contains the same calculation arguments as the CR task.
The intact minimum GM and maximum KG limit curves are output in the CR task, which is entered directly from the Task level. Limit curves use
local floating position values. In other words, the arguments for lists and diagrams must be set first. The most important calculation arguments to
define/check in addition to the previously mentioned arguments are:
It is important to set the arguments correctly especially for the graphical output. In the example below, the draughts of the loading conditions are
between 1.465 m and 4.881 m. The local draught values are from 1 m to 5.5 m with a step of 0.5 m.
Note! The minimum GM that assures compliance with the criteria is calculated from the GZ curve using an iterative method so the
received values are not absolute values. The above criteria check produces the primary results. The maximum KG values are always
calculated by using the minimum GM values.
List output can be created with the LIST LIM command. For example:
LIMIT CURVE
-----------------------------------------
T TR MINGM MAXKG DCRI
m m m m
-----------------------------------------
1.000 0.000 9.314 3.935 V.MAXGZ25
1.500 0.000 4.834 5.005 V.MAXGZ25
2.000 0.000 2.020 5.968 V.MAXGZ25
2.391 0.000 0.699 6.392
2.500 0.000 0.499 6.345 V.AREA30.
2.661 0.000 0.354 6.273
2.810 0.000 0.271 6.157
3.000 0.000 0.212 5.962 V.AREA30
3.491 0.000 0.150 5.633
3.500 0.000 0.150 5.626 V.GM0.15
3.581 0.000 0.150 5.590
4.000 0.000 0.156 5.400 V.AREA30
4.500 0.000 0.216 5.246 V.AREA30
4.739 0.000 0.261 5.197
4.867 0.000 0.312 5.143
5.000 0.000 0.410 5.043 V.AREA30.
5.500 0.000 2.772 2.723 V.AREA30.
-----------------------------------------
Note! The determining criterion (DCRI) is missing from the list output when there are more than one determining criterion; for example,
the determining criterion changes in the point).
The graphical output can be created using the PLD LIM command. Besides the arguments, plot output options must be set correctly so that the
diagrams will be scaled properly and the correct quantities are output. For example:
CR_I?>PLD LIM
CR_I?>PLD LIM
The output commands used are LIST DLIM and PLD DLIM. These commands have more options than in the CR_I task. The condition, stage,
and phase of the damage must all be specified. When making criteria check diagrams, also the relevant criteria must be given. For example:
Case INI1/DAM1...
...OK
STABILITY CRITERIA
--------------------------------------------------------------------------
CASE STAGE PHASE RCR REQ ATTV UNIT STAT MINGM
--------------------------------------------------------------------------
INI3/DAM1 1 EQ RANGE.S 15.000 31.800 deg OK 0.018
INI3/DAM1 1 EQ MINAREA1. 0.015 0.035 mrad OK 0.203
INI3/DAM1 1 EQ MAXGZ.S 0.100 0.388 m OK 0.092
INI3/DAM1 1 EQ MAXGZW.S 0.040 0.381 m OK 0.016
INI3/DAM1 1 EQ MAXGZP.S 0.040 0.388 m OK 0.004
INI3/DAM1 1 EQ MAXHEEL1. 7.000 3.579 deg OK 0.185
INI3/DAM1 1 EQ MINGM.S 0.050 0.585 m OK -0.046
INI3/DAM1 1 EQ MARGIN.S 0.000 1.427 m OK -0.047
INI3/DAM1 1 EQ PROGR.S 0.000 3.052 m OK -0.083
--------------------------------------------------------------------------
The damage minimum GM and maximum KG limit curves can be checked directly in the DAM task without entering CR_D. The basic principles
are similar to intact criteria limits; the most important thing is to check the arguments before creating any output.
As initial conditions are used instead of local draughts, the lists will automatically contain the correct draughts, and the diagrams will be
automatically properly scaled. The lists also contain the draught where several relevant criteria are limiting the minimum GM and maximum KG
values. For example:
LIMIT CURVE
---------------------------------------
T MINGM MAXKG DCRI DAM
---------------------------------------
1.466 4.652 4.766 MAXHEEL1.DAM3
2.551 3.098 4.255
3.474 2.853 2.745 MAXHEEL1.DAM2
4.881 2.682 1.598 MAXHEEL1.DAM2
---------------------------------------
The diagram output quantities are somewhat different compared to the intact criteria limits. The quantities GMLIMDA and KGLIMDA are used
instead.
It is possible to plot intact and damage criteria limit curves into the same diagram. This can be done by using either the CR_I or the CR_D task.
First, the intact criteria limit curves must be saved once they have been plotted in the CR_I task. The intact criteria limit curves are plotted
together with the damage criteria limit curves in the CR_D or the DAM task with the INLIM option of the PLD DLIM command.
In the following examples, the draught argument is scaled according to the initial cases making only those parts of the intact criteria limit curves
visible:
The list of available predefined criteria can be checked with the CAT CRI command, and the list of available criteria groups with the CAT CGR co
mmand.
Relevant criteria are set by referring to a single criterion or criteria groups with the RCR command. For example:
CR_I?>RCR A749-3.1
CR_I?>RCR
4. Criteria definitions
As the NAPA database contains examples of the most common criteria (in NAPADB), the users may define their own criteria. Intact stability
criteria are defined in CR_I and damage stability criteria in CR_D. The definition method is the same in both environments.
A criterion can be named freely. However, it is recommended to use logical names and also the optional description text to make later
identification easier.
The explanations of the subcommands can be got by using the CRI qualifier in the !EXP command, or without the qualifier during criteria
definition:
CR_I?>!EXP RANGE/CRI
CR_I?>CRI DUMMY
Crit?>!EXP RANGE
...
...
Crit?>SKIP
CR_I?>
There are 21 criterion types available in NAPA. In addition, criteria can be defined by using macros. The criterion type defines which quantity is
calculated from the GZ curve. The following table introduces these alternatives:
4.2. Requirements
REQ The required value, that is, the minimum or the maximum value for the quantity stated by the TYPE command, is either constant or an
equation. One criterion can at most set one requirement to the GZ curve. In other words, if there are several requirements, there must
also be several criteria, each corresponding to one requirement.
The given requirement may be marked with the minus sign (-) to indicate that nothing at all is required.
PHA This command defines the requirement applied at the intermediate flooding phases. The same parameter alternatives are available as
in the REQ command. If the command is missing, the requirement of REQ will be applied.
This command is only relevant in damage stability criteria!
STA This command defines the requirement applied at the intermediate flooding stages. The same parameter alternatives are available as
in the REQ command. If the command is missing, the requirement of REQ will be applied.
This command is only relevant in damage stability criteria!
FIN This command defines the requirement applied at the final stage, that is after flooding has ended. The same parameter alternatives are
available as in the REQ command. If the command is missing, the requirement of REQ will be applied.
This command is only relevant in damage stability criteria!
PRO This command defines the requirement applied at the progressive stage of flooding. The same parameter alternatives are available as
in the REQ command. If the command is missing, the requirement of REQ will be applied.
This command is only relevant in damage stability criteria!
4.3. Range
The calculation of some quantities may be limited within a part of the GZ curve. Limiting may take place when using the following quantities:
MAXGZ, MINAREA, RANGE, POSMAX, RESFLD, RESFRB, RESMRG, ARATIO1, RESDYN, DYNARM, GZRATIO, and MINGM.
RANGE lim1,lim2
in which 'lim1' is the lower and 'lim2' the upper limit of the range (deg). The limits can be also given as several different alternatives, as an angle of
downflooding of unprotected openings (FAUN), or an angle of immersion of the freeboard deck edge (FRB). The different options can be listed
with the !EXP RANGE/CRI command in the CR task.
Intact stability criteria are defined in the CR_I task, which can be entered either from the Task level or from LD.
The criteria are saved into the project database using the OK command. To save the criteria into the system database, the SAVE SYSDB comman
d is used instead.
The first example is of a simple criterion for the area under the GZ curve: the area should not be less than 0.03 mrad in a range of 30 ... 40
degrees:
The second example is of a criterion for the maximum height of the GZ curve: it should be at least 0.2 m with a heeling angle of 30 degrees or
more:
In the third example, the position of the maximum of the GZ curve is investigated. It should occur at an angle of more than 25 degrees:
The last example is of a criterion with the MINGM type requiring a minimum value for GM. By default, GM is calculated at the upright position (=
heeling 0.0). In this case, it should be at least 15 cm:
The definition method for damage stability criteria is identical with that of intact stability criteria. The only difference is that one should be in the CR
_D task entered from the Task level (change the environment to DAM) or from the DAM task.
The first example is of a simple criterion for the area under the GZ curve: the area should not be less than 0.015 mrad in a range between the
angle of steady equilibrium (first intercept) and 22 degrees or the angle of downflooding, whichever comes first:
The second example is of a criterion for the range of positive stability: it should be at least 15 degrees in the final equilibrium and at least 7
degrees in the intermediate stages and phases:
In many cases, it is convenient to group frequently used criteria. A criteria group can be defined with the CGR command:
In the above, a group named EXAMPLE containing two criteria, MINAREA1.S and RANGE.S, is defined.
4.7. Exercises
Exercise: Define four intact stability criteria and a criteria group named TESTGROUP.
TEST1: The righting lever GZ should be at least 0.20 m at a heeling angle equal to or greater than 30 °.
TEST2: The maximum righting arm should occur at a heeling angle not less than 25 °.
TEST3: The initial metacentric height GM0 should not be less than 0.15 m.
TEST4: The area under the GZ curve between the heeling angles 30° and 40° or between 30° and the flooding angle of unprotected
opening (provided that this angle is less than 40°) should not be less than 0.03 mrad.
CGR TESTGROUP
CRI TEST1 TEST2 TEST3 TEST4
OK
Moment curves independent of the actual loading condition. The moment values of these curves are known by NAPA all the time.
Moment curves which are dependent on some attributes of the loading conditions, such as draught. The actual moment values of these
curves will not be known prior to the criteria containing them being applied to the loading conditions or damage cases.
Moment curves independent of loading conditions, initial conditions, and damage cases:
Independent moments are defined in the CR task using the following syntax:
Note! See the Napa Manuals (Stability Criteria (CR): 9.4 Heeling moments) for a more detailed explanation of moment curves.
Examples:
MOM LIFT
CURVE EXPR
MOM ’W*(Y*COS(HEEL)+Z*SIN(HEEL))’
Dependent moments are defined in the CR task using the following syntax:
Note! See the Napa Manuals (Stability Criteria (CR): 9.4 Heeling moments) for a more detailed explanation of moment types and
parameters.
Examples:
5.3. Exercise
Exercise: Create the moments MOM1 and MOM2. Use the MOM2 moment in the TEST1 criterion.
CAT CRI
CAT CGR
CAT MOM
Definition of a moment:
Output
This chapter discusses the creation and manipulation of output. The topic is divided into five main categories:
Settings.
List Output.
Plot Output.
Output tab.
Documentation system (DOC).
Table of Contents:
1. Settings
1.1. Printer setup
1.2. Taking DOCBOOK into use
2. List Output
2.1. The NAPA list concept
2.2. LQ (List Quantities)
2.3. TOO (Table Output Options)
2.4. Output with the List Window tool
2.5. Exercise
3. Plot Output
3.1. PQ (Plot Quantities)
3.2. POO (Plot Output Options)
3.3. Output with the Plot Window tool
4. Output tab
5. Documentation system (DOC)
5.1. General
5.2. Source data
5.3. Output of DOC commands
5.4. Basic DOC commands
6. Examples
1. Settings
NAPA produces output data in neutral format. The printing device must be used so that data can be formatted before output. The selected printer
in NAPA is a printing device. This device is used to create output which is then sent to the actual Windows printer. NAPA's printing devices
supported in Windows environment are DOCBOOK, DOCBOOKBW (black & white), WPR, and WPRBW (black & white).
DOCBOOK produces neutral data in XML format. The data is formatted for output automatically by a style sheet. Since output is produced in XML
format, standard software can be used for extracting data also for other purposes. DOCBOOK also allows sending the data directly to different
formats in PDF and DOC (MS Word) formats. WPR is a more limited device that converts the neutral output to the Windows printer. The
formatting of output with WPR is very simple, as shown in the below figure.
The default printer is set in ADM task by modifying the installation parameters. For example:
TASK?>ADM
ADM?>INST
INST?>PRINTER DOCBOOK
INST?>OK
ADM?>
DOCBOOK is automatically available as a selectable printing device in a number of dialog boxes in relatively new NAPA installations. However, if
NAPA usage has started prior to NAPA Release 2008.1, DOCBOOK will need to be introduced separately. This can be done by running the
DATA*DEV.ADD_DOCBOOK macro from the NAPA database. Running the macro will add the DOCBOOK and DOCBOOKBW printing devices in
the MN*DEVICES table in the system database. Administrator rights are required to run this macro.
2. List Output
Each time a user enters a calculation task, a new results list is opened. As long as the results list is not closed, all commands that incur results to
be written will be written in the same results list. The command NL (New List) can be used to divide output from a calculation module into
independent lists and to control various aspects of a results list. It is also possible to list results from different tasks in the same list by using the
options of the NL command. With the NL command, the currently open results list will be closed and a new one opened. For example:
NL TEST
Generated lists can be named and stored in the secondary database (DB4) for future use. The lists can be retrieved from DB4 when the final
output document is created.
The purpose of the LQ/TOO concept is to define the contents and layout of alphanumerical lists. Each LQ/TOO is bound to a single LIST comm
and as follows:
TOO Table Output Options; defines headers, subtotals, sorting, and such, in the output.
T DISP LCB CB
m ton m
---------------------------------
1.200 987.7 42.283 0.7458
2.400 2088.4 42.237 0.7919
3.600 3213.0 42.092 0.8133
4.800 4380.6 41.632 0.8321
6.000 5607.5 41.040 0.8525
The LQ/TOO concept does apply to most LIST commands. However, in most subsystems there are normally both fixed lists and lists that can be
modified with LQ and TOO. Fixed lists are usually combined lists or older list types. In many subsystems, there are several LIST commands which
are adjustable with the LQ/TOO tools. In these cases, the separate LIST commands and the LQs must be identified using identifiers. For
example: LIST {id}, LQ {id}, and so on.
The length of a field and the number of decimals of a quantity are defined in the Form task. These can be temporarily changed for output with LQ
options. Another possibility would be the use of the !FORM command. The Form task is briefly explained in this manual's chapter entitled System
administration, and in more detail in the Napa Manuals.
The LQ/TOO concept works basically in the same way in all tasks. The CP and SM tasks are used here in the examples.
Administration
A current LQ can be saved in either the project database (DB1) or the system database (DB2). An existing LQ can be retrieved from DB1, DB2, or
the NAPA database (DB7).
If an LQ is saved using the name STD, it will be used as the default. When a subsystem is entered, the LQ carrying the name STD is first looked
for in the project database, then in the system database, and finally in the NAPA database (DB1 > DB2 > DB7). If no LQ with the name STD is
found, all available quantities are selected.
TOOs defined with LQs are always automatically saved with the LQ and, therefore, need not be saved separately.
As mentioned earlier, the LQ command is used to choose quantities and the order in which they are listed. With the LQ command, quantities can
be modified, and new quantities can be defined by formulas. The commands LQ ALT and LQ ALT L both produce a list of all quantities that can
be used in the current context.
For example, in the CP task, there are two LIST commands adjustable with the LQ/TOO commands. These are LIST CP and LIST SM. The LI
ST CP command is the default, meaning that the commands LIST, LQ, and TOO (without any options) are the same as LIST CP, LQ CP, and TO
O CP.
LQ id SAVE name Saves the current LQ in a database. Professional user rights are required for saving LQs in DB2. For
[database] example:
LQ SAVE test
LQ SM SAVE test
LQ id DEL name Deletes LQs from the project database. For example:
LQ DEL test
LQ SM DEL test
In the following, the possibilities of LQ are introduced further through some examples. The general online explanation texts can be viewed with the
!EXPL LQ/GEN command. Task-specific online help is available with the !EXPL LQ command which also covers the task-specific qualifiers of
the LQ command.
The format of a quantity and a header can be changed by defining them in parentheses directly after the quantity's name.
Changing the symbol of a quantity: instead of 'H', the symbol for height in the output will be 'HEIGHT':
LQ ... H('HEIGHT') ...
The format of quantity 'T' will be modified to: field length=7, number of decimals=2. This applies to output only. The quantity's symbol is
also changed:
LQ ... T('DRAUGHT',F=7.2), ...
A qualifier creates variations of the same quantity as supported by the application. Qualifiers are added after a slash (/):
LCB will be measured from the reference point defined in the reference system:
LQ ... LCB/XREF ...
LCB will be measured from x=40:
LQ ... LCB/40 ...
LQ ... LCB/'LCB-40' ... (LCB)
The qualifier for the FSM quantity controls the heeling angle for which the free surface moment is calculated:
LQ CP H, FSM('Fsm.10')/10, FSM('Fsm.20')/20, FSM('Fsm.30')/30, FSM('Fsm.40')/40
The qualifier for the VNET quantity controls the trim for which volume is calculated:
LQ CP GAUGE, VNET('VOL.tr-1')/-1, VNET('VOL.tr-0.5')/-0.5, VNET, VNET('VOL.tr+0.5')/+0.5
The net volume in the third column will be calculated at a heeling angle of 10 degrees and with a trim of 2 metres:
LQ CP GAUGE, VNET/T2, VNET('Heel10')/H10T2
User-defined quantities can be added if they can be generated from standard quantities. A new quantity is defined by a formula that is entered
after a slash in apostrophes (/ ' ').
The TOO command controls the layout of the quantities selected with the LQ command. Normally, this command is quite short, for example TOO
HD=(S, U, UL), however, if user-defined headers, sorting, grouping, and such are applied, then the command can become rather long.
The TOO command is inseparably linked to the corresponding LQ command. TOO is saved and retrieved together with LQ, which means that such
administrative commands as SAVE and GET are not needed for TOO.
The table output options are normally given with the TOO command, but they can also be given as an option using the LIST command. In this
case, the TOO options given with the LIST command will override the options given with the TOO command.
For all options and the command syntax, see !EXPL TOO/GEN.
HD Selects headers:
TOO HD=(UL, S, U, UL, -, UL)
The options of HD are explained in more detail following the below 'Special functions' list.
V,H Selects the vertical or horizontal layout. Vertical layout is the default, so the first two examples below will give the same result:
TOO HD=(UL, S, U, UL, -, UL)
TOO HD=(UL, S, U, UL, -, UL), V
TOO HD=(UL, S, U, UL, -, UL), H
Special functions:
TAB 9 Generates an output table in the Table Calculation task (to allow further processing, for example, a diagram drawing):
TOO TAB
TOO TAB=ONLY
TOO TAB=tablename-ONLY
TOO TAB='C:/napa/temp/test.csv'
PLOT Generates tables also graphically (table both in alphanumerical and graphical windows).
RHD Repeats headers; only relevant when output is grouped, in which case the headers are repeated for each group:
TOO HD=(S, U, UL), GROUP=PURP, RHD
FH1 Field length reserved for the first header (horizontal output only):
TOO SEL='PURP="BW"', FH1=5, H
UL Adds underlining to horizontally oriented tables. The line is added under the first quantity:
TOO SEL='TYPE="L"', H UL
RQ Repeats quantities:
TOO SEL='TYPE="L"', RQ=0
BORDER Specifies borders without implying plotting. Relevant for DocBook output.
TOO HD=(UL, S, U, UL), BORDER=HHHVVV
N None.
U Unit.
If, for example, HD=(S, U, UL) was given in the TOO command, there would be three header lines: the first line showing the symbols, the
second showing the units, and the third underlining the previous two with minus signs.
In the following examples, compartment parameters are listed in the Ship Model (SM) task.
Example 1:
First, compartments that have a volume larger than 100 m3 are listed. The list is then sorted according to the volume in descending order and
listed without any header:
Next, the same list is listed with the header, including separators (UL), symbols (S), and units (S). The minus sign indicates the location of the
listed values:
Following this, the subtotal values for each purpose and total values of all the compartments are added to the list:
Example 2:
In the following list, only the compartments with purposes HFO and DO are selected. Because quantity PURP is included in the selection criterion,
it must also be included in the LQ definition, at least as a hidden quantity. Two description lines between the groups are added by using an empty
character and the hidden quantities of LQ:
SM?>LQ SM, NAME(F=10), (PURP), (PDES), VOLM, CGX, CGY, CGZ, (RHO)
SM?>TOO SM, HD=(UL, S, U, UL, -, UL),
SEL='OR(PURP="HFO",PURP="DO")', GROUP=PURP, SUBT,
TOT, LBG=(' ', 'Contents: %PDES Rho: %RHO')
SM?>LIST SM
--------------------------------------
NAME VOLM CGX CGY CGZ
m3 m m m
--------------------------------------
Example 3:
In the third example, the compartment capacity table for tank R03003 is listed in the CP task. The qualifiers for trim are used to list the net volume
with two decimals with trims -1 m, 0 m, and 1 m. The additional header line is added to describe the different trims:
TASK?>CP
* BEGIN COMPARTMENT HYDROSTATICS (CP) *
CURRENT ARRANGEMENT:A
CP?>GET R03003
CP?>GSTEP 100
CP?>SDEV MS
CP?>TR 0
CP?>LQ CP, GAUGE, VNET(F=10.2)/-1, VNET(F=10.2), VNET(F=10.2)/1
CP?>TOO HD=(UL, S, U, (' ', 'TR=-1', 'TR=0', 'TR=1'), UL, -, UL)
CP?>LIST CP
---------------------------------------
GAUGE VNET VNET VNET
cm m3 m3 m3
TR=-1 TR=0 TR=1
---------------------------------------
0 1.47 1.65 2.25
100 37.18 37.39 37.62
200 53.95 54.21 54.48
300 71.78 72.04 72.31
400 90.89 91.15 91.42
500 110.37 110.64 110.90
600 129.85 130.12 130.39
700 149.34 149.60 149.87
---------------------------------------
Example 4:
In the last example, the compartment capacity table is listed and stored to a table. The table is opened with Table Editor.
The List Window tool is used to view and handle the current list. When the List Window is open, all results are directed to it, and no results output
is available in the Main Window.
The results list can be output from the List Window. The List Window contains controls for setting and selecting the active header, sending the
results list to various places, and setting options for the NL command. The page header can be set with the page header control available on the
File menu in the List Window:
By default, the Policy option is set to 'Current'. See !EXPL !HEADER for complete information on the usage of the command.
The available dynamic header components in the default header definition pane, such as *YCN in the above figure, can be listed with the !DTX co
mmand. Selecting the Named option allows choosing from saved headers.
A 'New List' is needed before a new header can be used. The default 'New List' can be activated by clicking the NL button
or by choosing New List on the File menu. The properties of a new list can be modified in the New List dialog box:
A results list can be sent to the default printer by clicking the Print button
on the toolbar in the List Window or by selecting Print with Defaults on the File menu.
The Print List dialog box is used to set output options or to send the results list to a destination other than the default printer. By sending a list to
the secondary database (DB4) with a specific name, it can be later retrieved and used in larger output documents.
Print preview is available for the selected printer in the Print List dialog box or by clicking the Print Preview button
2.5. Exercise
Enter the HYD task. Set the list quantities and list output options, define the calculation arguments, and run the LIST HYD command:
TASK?>HYD
HYD?>T (1.2 6 0.3)
HYD?>LQ HYD, T, DISP, LCB, KMT, CB, WLA, MCT, TCP(TPC)
HYD?>TOO HYD, HD=(UL, S, U, UL, -, UL), FIELD=*2, SPACE=5,
STYLE=SMALL_TABLE
HYD?>LIST HYD
3. Plot Output
The following commands are the graphical equivalents of LIST, LQ, and TOO:
POO Plot Output Options; defines output options, such as curve colours.
The PQ command defines the quantities to be displayed, and it works in exactly the same way as LQ. The first quantity is the argument, all others
are drawn as functions of this argument. The argument is shown as the horizontal axis unless the vertical argument option VA is given in the POO
definition. The administrative commands are also similar to LQ; only the string 'LQ' is replaced with the string 'PQ'.
The POO command controls how to draw functions and adds auxiliary components. In the first example, a net, axes for the quantities, and the pen
code for the quantity VOLM are added. POO is analogous with TOO, however, the available set of options is different, and there is the need to add
options for specific quantities, as demonstrated in the below examples.
Below, another function, LCB, is added to the diagram, and options are given separately for VOLM and LCB:
The essential point of interest here are the syntaxes T:, VOLM:, and LCB:, that is, the quantities' names followed by a colon (:). The colon
indicates that the subsequent options concern the given quantity only. Options not flagged in this way, such as NET in the example, are common
to all quantities or the whole diagram. The quantities can also be referred to as ARG (argument, the first quantity in the PQ in the first example) or
The commands PQ id and PQ without any options show the current PQ. The commands POO id and POO without any options show the current
POO.
Options for the POO command can be given in the following three forms:
id
id=par
id=(par1,par2,...)
These parameters may contain variables flagged with the percentage sign (%). Coordinates and dimensions can be given relative to the screen
size or size of the drawing area by adding the asterisk (*) in front.
For all options and the command syntax, see !EXPL POO/GEN. The most common options are presented below.
The axes present which quantities are involved and which numerical values correspond with the shown curves. The main options for the axes are
the location and place of the tick marks, expressed as a parameter to the AXIS option. The first letter indicates the location:
The direction of tick marks is expressed as A=above or B=below. For vertical scales; B=to the left and A=to the right.
Other relating options are LABEL which adds the label text; TICK which defines the spacing between tick marks; and THA for controlling the text
height.
The NET option will add grid curves but no axis. It is controlled by the argument and the function that it belongs to; by default=the first function.
Representation of a function
The default is to represent functions as curves that connect data points with straight lines. Line type can be selected with the PEN option, as in the
previous examples. The PEN option gives a logical pen. For a macro to plot a pen code map: !ADD PLOT.PENCODES.
All available predefined pen codes are stored in the TAB*PENCODES table in NAPADB. A pen code can be defined with a line type codes
expressed directly. More detailed information is available in the Napa Manuals.
The SMOOTH option draws a smooth curve through data points. With the MARK option, the data points can be marked with a given symbol (given
as a marker type, such as #5). With the NOCURVE option, only data points are marked.
In the following example, the F1 pen code is used for quantity VOLM, and options SMOOTH and MARK are applied:
PQ HYD, T, VOLM
POO HYD, BOX, NET=BGNET, SMOOTH,
ARG: AXIS=LB,
VOLM: AXIS=LB, PEN=F1, MARK=#5
Scaling
Functions are scaled so that a specified range will cover the area. By default, range is taken from the provided data. A different scaling can be
obtained by using the RANGE or the RMARG option, as in the following example:
In the above diagram, a specific range has been defined for quantity volume from 0 to 6000 m3. A margin of 10% has been added to the range of
quantity LCB.
Range can also be copied from another quantity. For example, quantity VOLT (total volume) can follow the range of VOLM (moulded volume) as
in the following example. Both quantities can use the same axis because the range is the same. The axis LABEL is set specifically so that it is the
same for both quantities.
Identification of curves
In the examples above, it is not clear which curve represents which quantity. This can be expressed by using the options ID and LEGEND. The ID
option will add data labels to the curves, while LEGEND will add above the diagram a separate presentation identifying which line type has been
assigned to each quantity. In the following example, both of the options are used:
The LEGEND option only determines whether a legend is added to the diagram; other options control its layout and contents. The LGTYPE option
defines the general layout; in this case: I=in line and L=text to the left. The LGTEXT option defines the legend entries. Instead of the manually
defined legend entries used in the example, the common options LGTEXT=S or LGTEXT=LH (long header) could have been used just as well.
The ID=S option means that the symbol of the quantity is marked in the diagram, and can, therefore, be given as a common option. Individual
texts could have been given in the same way as for the legend entries with the option ID=text.
The Plot Window tool is used to view and handle the current drawing. If the Plot Window is not open when a diagram is plotted, NAPA will use
the graphics area of the Main Window. As the functionality of the Plot Window tool is better-suited for plotting diagrams, its use is recommended
over the Main Window.
Drawings can be output from the Plot Window. The Plot Window contains controls for setting the background colour and sending drawings to
various places. It also has zoom and projection (3D drawing mode) tools.
The Print with Options option enables sending drawings to a printing device, into a file (in .dxf format), to the clipboard, to the secondary
database (DB4), and so on, using different options:
Sending a drawing to the secondary database (DB4) with a specific name ensures that it can be used later in larger output documents. Drawings
in the Plot Window can also be send to DB4 by using the !SEND command.
4. Output tab
Tasks having a specific task window also feature a tab called Output. The Output tab combines all NAPA's different output functions into a
manageable whole through the Output Control Data pane.
The Output Control Data pane is divided into five rows. The LQ row is used to control the different lists of this task, the lists that are
LQ-controlled. The PQ row works analogously for the task's different PLD commands.
The List and Plot rows control the so-called 'dot macros', output collected into macros to create specific output.
NAPA's report system can be accessed via the Report row. Not all tasks have predefined reports.
The List and PLD buttons in the LQ and PQ rows generate the output to the Main Window and to the currently active graphics area. The Edit bu
ttons open either a list layout (LQ) or a diagram layout (PQ) window in which it is easy to modify the output:
LQ and TOO definitions can be modified either in the popup windows opened from the Edit menu or manually in the text fields.
In the LQ definition window, list quantities can be selected and all previously presented LQ options (with list output) can be set, such as the
quantities' units and number of decimals.
In the TOO definition window, the previously presented TOO options (with list output) can be set, such as selection, sorting, and grouping.
The modified LQ and TOO definitions can be named and saved in database DB1 or DB2 for future use:
From the List Layout Window, a list can also be sent to a currently open list. If the List Window is not open, the list is sent to the Main Window.
In other words, to print a list, first open the List Window and then use the Send to current open list option on the Send menu in the List Layout
Window.
5.1. General
The purpose of the documentation system (DOC) is to create formatted documents of unformatted source texts. The system offers a number of
additional functions, such as handling chapters and the table of contents, inserting figures, creating tables, and so on.
The documentation system is an integrated part of NAPA, meaning, among other things, that all general functions are available. The databases
are available as a source of data and figures. The documentation system can be used for compiling larger documents from pieces created by the
various calculation tasks.
Note! All DOC-specific commands start with the full stop (.).
Use the !COM DOA command for a full list of available DOC commands. To view an explanation of a particular DOC command, use the !EXP
.xxx/DOA command. For example:
!EXP .AL/DOA
The lists and drawings generated in the calculation tasks are stored in the database so that they can be used in compiling the output documents
with the DOC commands. There are a few different ways to store lists in the database:
From the List Window by using Print List... (as described earlier in connection with list output).
With the mn.savelist service function, for example:
HYD?>LIST HYD
HYD?>@ok=mn.savelist(1,'listname','NH')
HYD?>LIST HYD
HYD?>SCAN LAST
SCAN?>SAVE AS listname NH
SCAN?>END
Sending the current view with the Print with Options... option from the Plot Window (as described earlier in connection with the Plot
Window) or with Send View... from the Main Window's graphics area.
Manually with the !SEND command, for example: !SEND TO DB NAME=DIAGRAM.
DOC system commands cannot be output as regular NAPA commands. The best way to output them is to type them into the Text Editor and use
the printing method called the Document Formatter:
Chapter header
By dividing a document into chapters, a number of additional functions are obtained, the most important of which is the table of contents.
A new chapter is started with the .C command which has the chapter level and header text as parameters. The chapters form a hierarchy of
subordinated levels, and the level number following the .C indicates the level on which the new chapter is started. A table of contents is printed
using chapter headers, unless otherwise specified with the TOC parameter of the .SET command. For example:
List
A list generated in a calculation task and stored in the database can be retrieved with the .AL command (Add list). This command has the list's
name as a parameter. The optional second parameter R reconstructs table headers on new pages when a table does not fit into the space
reserved for it on a page. For example:
.AL hydrostatics R
Figure
A figure stored in the database can be added to a document using the .FIG command. This command has the figure's name as a parameter. The
figure's size and alignment can be set with optional parameters. For example:
.FIG hydrostatics
Other
Empty line breaks can be produced with the .R command, which has the number of empty line as a parameter. For example, .R 5 for five empty
lines.
Free text can be input without any commands. By default, text is input on the same line even if the text was wrapped on several lines in the Text
Editor. A line break is added with the 'greater than' (>) sign. For example:
Page headers are created with the .H command by providing the header text and its location as parameters. A header contains three fields, and
its maximum length is 10 lines. Dynamic texts are available just like with the common headers, as described earlier with list output. For example:
6. Examples
Example of source data generated in the Main Window:
HYD?>NL
HYD?>LIS HYD
HYD?>SCAN LAST
SCAN?>SAVE AS hydrostatics NH
LIST*HYDROSTATICS saved
DBXML*HYDROSTATICS saved
SCAN?>END
HYD?>PLD HYD
HYD?>!Z W
HYD?>!SEND TO DB NAME=hydrostatics !
Drawing HYDROSTATICS stored
Example of results output created by using the Document Formatter with DocBook:
1. General
1.1. What is a Manager application?
1.2. How to open Manager applications
1.3. How Manager applications work
1.4. Beta versions of Manager applications
1.5. Manager application development
2. Available NAPA Manager applications
2.1. Introduction
2.2. ExportDB Manager
2.3. Ship Model Manager
2.4. PROB Manager
2.5. Inclining Test Manager
2.6. Offshore Structure Stability Manager
2.7. Drawing Manager
2.8. Sounding Manager
2.9. Additional Manager applications
1. General
A Manager application is a graphical user interface that combines input and output in a user-friendly way. It makes possible to combine
definitions, verification, and output of several different NAPA tasks in a single window. A Manager application is used, for example:
A NAPA Manager application is opened from the database. All default Manager applications can be found in the NAPA database (DB7):
A Manager application contains a set of items which are usually updated one by one from the top to down. In some Manager applications some
items can also be used separately, and in some cases only a part of the application needs to be used.
A branch in the Manager tree can be expanded and collapsed by clicking on the icon, or by double-clicking on the item's name. Updating an
entire folder is a quick way to proceed once all input data have been given in the subitems as then all subitems will be updated simultaneously.
When an item is updated, the results are produced or actions carried out by the macros controlling the item. All output results produced in the Ma
nager Window can also be output directly from the Manager Window.
The buttons on the toolbar to the left of the Manager tree perform the following commands:
Activates/Inactivates an item.
Updates an item.
or
The incorporated update management functionality is for describing the status of the results behind each item in the hierarchy tree. An item may
be marked with one of four update status symbols, which are described in the table below. If an item is inactive, it will not display any update
status symbol and its icon is coloured light grey. The update status symbol may also be missing even if the item is active. This means that the
item in question will not produce any results to the output area of the Manager Window.
Item is up-to-date.
Output
When the Print button is used, the results of the selected item are output provided that the item is included in the output. If the Print button is
used when a folder is selected, all results of the items and subitems in the folder are output.
The header settings of the output document can be controlled by the user:
Some Manager applications will display a popup note when the application is opened. The purpose of this note is to indicate that the application is
perhaps not intended to be used in production, but rather has been added to serve as an example, or that the development of the application is
not quite finished. In other words, the functionality of the Manager application is limited.
The NAPA Manager tool offers an easy-to-use framework for the users to develop own Manager applications to meet their particular needs, for
example, pertaining to a specific design process. Many NAPA user organisations have already developed their own Manager applications
successfully. More information can be found in the Napa Manuals in the chapter entitled NAPA Manager: 4 Manager application developer's
guide.
2.1. Introduction
The NAPA database (DB7) contains a wide selection of Manager applications. Some of the most commonly used are introduced here.
Descriptions of all available Manager applications and more detailed guides can be found in the Napa Manuals, in the chapter entitled Manager
Applications. Some of the Manager applications may require a separate user licence to operate.
The ExportDB Manager application is intended for consolidating, securing, and exporting NAPA databases.
The first part of the Manager, the Copying Descriptions folder, is intended for copying descriptions from one version to another. This part has
tools for copying most of the common items in a ship model. The copying uses the topology and dependency of objects. In other words, when, for
example, an arrangement is copied, everything else connected to it, such as rooms and surfaces, is copied as well so that the arrangement will
work properly in the target version.
The last item in the folder, the Miscellaneous items, is where any type of description found in the ship database can be selected and copied.
This item does not support topology or dependency.
The second part of the Manager, the Export and secure database folder, is intended for exporting the selected version and for securing objects
included in a new project and secondary databases.
The Ship Model Manager application offers tools to define, modify, and verify the definitions made in the ship model. The most useful tools
include geometry and compartment arrangement checks, and calculation argument and opening definitions.
The PROB Manager application offers the tools needed for probabilistic damage stability calculations in accordance with the SOLAS rule Chapter
II-1, Part B-1, Regulation 25-1; and in accordance with the Revised Text of SOLAS Chapter II-1, Parts B and B-1 as adopted at MSC 80 (SOLAS
2009), which is the valid rule.
The Manager is divided into different parts, the first of which contains all definitions needed for calculating the subdivision and opening definitions.
The other parts cover the calculation arguments, damage generation, calculation, analysing results, and the report.
Regulations 8 and 9, and water-on-deck calculations are organised into their own folders, which all contain separate damage generation,
calculation, and results analysing tools.
The Inclining Test Manager application is intended for calculating a ship's total weight and lightweight, and the longitudinal and vertical centre of
gravity. The calculations are carried out by comparing inclination readings when masses are shifted during the test. There are two methods
available for carrying out the inclining test: using either inclining tanks or weights. This Manager application is divided into two parts, Input and Ou
tput.
The Offshore Structure Stability Manager application guides through the stability analysis process of a vessel subject to the MODU regulations.
The Drawing Manager application is used for producing and managing drawings and keeping them up-to-date. The drawings are created from a
NAPA Steel model but also other drawings can be managed. The Drawing Manager can be used to mass-create subdrawings from a NAPA Steel
model, and the created classification drawings can be modified interactively.
The Sounding Manager application is intended for defining sounding devices and producing sounding tables by using the CP task.
Contract Design: This Manager application is intended for creating a ship model from scratch. It contains, for example, the tools for hull
form transformation and loading condition generation, and links to different editors, such as the Hull Surface Editor and Geometry Editor.
Flooding Simulation: This Manager application is a tool for an easy approach to getting started with flooding simulation analysis.
Freeboard: This Manager application is a tool for calculating the minimum geometric freeboard in accordance with Resolution
MSC.143(77) and CCS.
Hull to Offset: This Manager is designed for producing output tables of the HULL surface and can serve as a link for transferring a HULL
surface.
Insulating: This Manager application is used for evaluating a ship model's fire integrity in accordance with the SOLAS 2009 II-2
requirements for fire integrity.
SH-Powering: This Manager application is an interface to the SH subsystem of NAPA. It is intended to provide a user-friendly tool for the
early design stages and integrated powering analysis in the overall design process.
Visibility: This Manager application is intended for producing standard reports in accordance with the IMO visibility criteria for different
container loading conditions.
Please note that only a selection of the available Manager applications have been described above. The complete list of Manager applications
available in the NAPA database can be found in the Napa Manuals.
System administration
This chapter describes the most important administrative tasks and related features in NAPA. Some of these features require full professional or
administrator user rights.
Table of Contents:
The most important installation parameters can be listed with the LIST command. Some of these are listed below:
The RREG command controls whether a register of current NAPA runs is maintained. Command RREG ON in the ADM/INST task activates
keeping the run register if it is not automatically kept. Information about currently active runs can be obtained from this register with the !LR comm
and and with the MN.RUNS function. The following shows example results of the !LR command:
!LR
The timeout limit is defined with the TIMEOUT installation parameter. The UNREG command in the ADM task can be used to overwrite a licence
entry which has not removed itself from the run register. Active runs (idle less than timeout limit) cannot be overwritten.
The run of NJSS in the above example can be unregistered with command UNREG R288 NJSS.
User administration is carried out using the USER command in the INST task. Each user of NAPA is represented by his or her initials, which serve
as user ID. These initials are required for starting the system. A maximum of four (4) letters can be used as user ID.
The users of NAPA can be divided into three categories: administrators, professional users, and ordinary users. Administrators hold all rights and
privileges. A subset of these rights is granted to professional users, whereas the ordinary user is only granted a set of privileges covering the
regular usage of the system. If no administrators are defined, the professional users will have administrator rights.
INST?>!EXP USER
INST?>user
USER ADMI A
USER JSS P 'Joe S. Smith'
USER TT U 'Tim Tester'
USER NN U
In the ADM task, the SELECT command can be used to select one or several projects by name or a selection criterion. The functions LIST, UPDA
TE, DELETE, SYNC, and INFO can be performed on the selected project(s). The UPDATE function requires that only a single project is selected.
All the existing projects and versions can be used for collecting useful information for further use. The projects are first selected using the SELECT
command and then the selected data is retrieved with the INFO command.
The INFO command will generate a table containing information on the selected projects. In addition to the parameters from project administration
(the UPD task), information from the reference system (the REF task) can be added. The information is arranged into a table that can be listed
with the standard table calculation commands. The columns are named as the reference system parameters.
TASK?>ADM
ADM?>SEL NAME>NAPA
Project version created by stat description
NAPAMOON A 2008-02-07 JSS Small PAX ship with car deck
NAPASTAR CLEAN 2004-05-12 NJSS Napastar JSS
NAPASTAR64 A 2010-11-11 JSS 64bit Napastar
ADM?>INFO RR
Result in the current table, use SEL, LIST for listing
Current table: TAB*PROJECTDATA
INFO?>WHERE
Current table is TAB*PROJECTDATA
Current work area: INFO
changes made
SELECT NAME VERS DES LREF BREF TDWL HMAX
INFO?>LIST
The SEL ALL command can be used to select all available columns instead of the default column selection. The created table,
TAB*PROJECTDATA, will only be in runtime memory but can be saved, if needed. The table can also be processed in the Table Editor. The
explanation texts describe all the available command options, such as SELECT and INFO.
Project data, such as project descriptions, can be updated in the ADM/UPD task:
UPD?>LIST
PROJECT: NAPASTAR
VERSION: A
SHIPNAME: ''
DESCR.: 'Napastar demo project'
SHTYPE:
USER: NOP
DATE: 2011-10-26
STATUS PUBLIC
FILENAME: 'pr\napastar.db'
ACC: P32
Unnecessary versions can be deleted in the ADM/TIDY subsystem. ADM can be entered from the Task level.
Note! Before deleting versions, it is essential to ensure that nobody else is using the project. The command !LR (list data of current
runs) is useful for checking that nobody is using the same project. It is also strongly recommended to always have proper backups
made before carrying out any database administration (the TOC and ADM tasks).
TIDY?>!EXP RVER
RVER remove versions
--------------------------------------------------------------------------
This command removes given versions. The versions removed will be deleted
from the list of versions maintained in the project administration.
RVER v1,v2...
v1,v2...: versions to be removed
The deletion operation is started with the START command after which the system will prompt for a confirmation:
TIDY?>RVER C
Project: C-TEST
FILE BOTH; ** main+aux. project data base
NAME:pr\c-test.db
Remove versions:
RVER, C
LIST ON
METHOD STD; ** rearrange directly in the given file
If OK, use command START to start the operation
TIDY?>START
...
*********** end of file ************
4057 descriptions selected
The listed descriptions will be SAVED
OK to continue? OK??>OK
Note! Great care must be taken when using the ADM/TIDY task as it will delete descriptions permanently without the possibility of
revoking the action. For example, if the SELECTION command in the TIDY task is used erroneously, the data is lost forever. In this
connection, the SELECTION command is for saving only and not to be used for deleting. Please see!COM and !EXP SEL for more
information.
The current project or projects selected with the SELECT command are deleted using the DELETE command in the ADM task. This will remove the
files and the data of the project(s) from the system database. The permission to delete is requested separately for each project:
TASK?>ADM
ADM?>DEL NAPASTAR
DELETING OF PROJECT(S)
NAPASTAR Test project for deletion
OK TO DELETE PROJECT?>Y
ADM?>END
Note: Do not delete NAPA projects using the Operating system but using NAPA to keep the project data in the system database
up-to-date.
Note! It is strongly recommended to always have proper backups made before carrying out any database administration (the TOC and
ADM tasks).
Possible database errors can be detected with the CHECK command. The options D and * are for more complete checks. A check is always run
only in the active database, defined with the UNIT command. A corrupted database structure can be restored using the MEND command.
The TIDY command can also be useful in solving database problems. It is used to remove deleted descriptions from the database and to improve
the file structure.
Detailed explanations, viewable with commands !EXP CHECK, !EXP MEND, and !EXP TIDY, should be studied carefully before proceeding with
these commands.
DEF >CAT
4 11095 110091
TASK?TOC
* BEGIN FILE & DESCR HANDLING (DB02) *
CURRENT UNIT IS: 1
TOC?>CHECK
--- start directory check ---
--- end of directory check ---
4 11095 110091
DATA BASE ERROR, UNIT= 1
SYSTEM ERROR
ERRORS IN DESCR. A/TEST
*********** END OF FILE ************
7 DESCRIPTIONS TREATED
TOC?>MEND
4 11095 110091
DATA BASE ERROR, UNIT= 1
SYSTEM ERROR
ERRORS IN DESCR. A/TEST
OK TO DELETE?>Y
DESCRIPTION DELETED
*********** END OF FILE ************
7 DESCRIPTIONS TREATED
TOC?>CHECK
--- start directory check ---
--- end of directory check ---
*********** END OF FILE ************
6 DESCRIPTIONS TREATED
TOC?>
The easiest way of copying descriptions between versions is to use ExportDB Manager Application (explained in the NAPA Manager Applications
chapter). This application can also be used to export one version to a new project, for example, to be sent to the classification society or NAPA
customer service.
TOC?>!OPEN d-container 6
TOC?>UNI
TOC?>CAT
VERS NAME DATE TIME TYPE
A DATA*FIRST 2012-10-31 11:48 0
*********** end of file ************
1 descriptions treated
TOC?>UNI 6
TOC?>UNI
TASK?>TOC
* BEGIN FILE & DESCR HANDLING (DB02) *
CURRENT UNIT IS: 1
TOC?>UNI
Currently open data base files
unit file name
* 1 pr\napastar.db UTF8
2 pr\SYSDB.DB UTF8
4 pr\napastar.sd UTF8
7 C:\Napa\20121\database\napadb.db UTF8
current unit=1
TOC?>SEL VER=A NAME<DATA*F
TOC?>CAT
VERS NAME DATE TIME TYPE
A DATA*FIRST 2012-10-31 11:48 0
*********** end of file ************
1 descriptions treated
TOC?>COPY TO B
COPY WITHIN UNIT 1 TO VERSION B
OK?>Y
VERS NAME DATE TIME TYPE
A DATA*FIRST 2012-10-31 11:48 0
*********** end of file ************
1 descriptions treated
All available quantities can be listed using the LIST command, and the definitions of all quantities can be viewed with the DES ALL command.
The same information on all available units can be viewed with the commands LIST UNIT and DES UNIT ALL.
The quantity standard used at run time in NAPA is created by collecting definitions from three sources:
Quantities defined by the developer of the NAPA system (that is, the NAPA Group).
New and/or updated quantities defined by the user organisation to be common for all projects.
New and/or updated quantities defined by the user organisation for a specific project and version.
The NAPA-defined quantities are delivered in the NAPA*QUANTITIES* description stored in the NAPA database. This is the main part of the
runtime set.
The user-specific definitions will be stored in the USER*QUANTITIES* description stored in the system database. The project-dependent
definitions are stored in the PROJ*QUANTITIES* description which is stored in the project database.
Whenever the user changes the project or version, a new set of quantities is formed according to the information defined in these three basic
sources. Thus, the location where a change is made will determine its scope of influence.
In case a quantity is defined in several locations, the project-defined changes will override both the NAPA-specific and user-specific changes, and
the user-specific changes will override the NAPA definitions.
Quantities are modified by replacing old values with new values, or by entering entirely new data.
Note! Quantity symbols and record numbers must be unique. The user should never change the record number or the symbol of an
old quantity.
FORM?>DES DISP
Q DISP 2202 T 8 1 'total disp.' 'total displacement'
FORM?>Q DISP 2202 T 9 2 'total disp.' 'total displacement'
In the above, the DISP quantity was changed so that, by default, the field length is nine characters and two decimals are always shown. After this,
the change should be saved.
The transparent command !FORM can be used to make temporary changes to formats, units, and header information of quantities, and to define
summation rules. The !FORM command can also be used under the FORM task except for resetting quantities.
Parameters defined for general usage, independent of specific ships, are stored in the system database in a table named PAR*STD. There is a
PAR*STD table available in the NAPA database (DB7) which is meant to serve as an example for user organisations. All user organisations are
recommended to define their own set of purposes with the correct attribute values, such as densities and steel reductions, in the PAR*STD table,
and store it in their system database (DB2). The simplest way to do this is to open the PAR*STD table from DB7, save it in DB2, and then modify
it as needed.
The Napa Manuals are automatically installed with each NAPA release, excluding patch releases. They include information on how to use NAPA
from scratch. The manual provides a walkthrough of the processes step-by-step with help of explanations and examples. A search option is also
available. Napa Manuals can be opened in NAPA with the function key F1 or using the shortcut created by the installer.
The Help Viewer can be found on the Help drop-down menu that can be opened from the main menu bar in every NAPA window. The Help
Viewer lists all the windows, commands, quantities, functions, and events of specified tasks when applicable. Subfolders and subtasks can be
accessed by clicking on the folders.
Below is a list of helpful commands that can be used in the NAPA task window:
!COM xx.F Lists all service functions of a defined subsystem; for example, !COM gm.f
!COM xx.Q Lists all quantities, when applicable; for example, !COM da.q
!COM string Lists available commands the explanations of which include the given string.
!EXP command Shows an explanation of a command, a list of options, and possibly some examples.
In addition to the commands above, command explanations can be viewed by highlighting a command or an error/warning/notification number in
the Main Window, right-clicking, and selecting Explanation of... from the popup menu that appears.
Also, using the keyboard shortcut CTRL+W will invoke the explanation when the name or number is highlighted.
Finally, there is always the friendly NAPA Customer Service Team, glad to help you out. Please send your questions by email to customer.serv
[email protected]. If you have problems with your model, you might consider sending us your project database, too, or at least the specified data. Also,
in many cases screenshots come handy.
The easiest way to strip your database is to use the ExportDB Manager application. The instructions are explained in detail in the Napa Manuals
(see the chapter entitled Manager Applications: 9 ExportDB Manager (EXPORTDB)).
It is possible to compress NAPA databases quite efficiently. When you email a project database, it is useful to first compress the files to .zip, .rar,
or other such format. If you already have results that are time-consuming to calculate, it is useful to send the secondary database (.sd) as well. If
the file sizes are too large to send by email, the files can be uploaded to the NapaNet (www.napa.fi) for NAPA Customer Service's attention.
2. System messages
When operations are executed in NAPA, the system may issue three different types of messages: notices, warnings, and errors. For example:
As all system messages are generated in the Main Window, it is essential to keep monitoring it when working with NAPA. A system tool called
the Error Catcher is available in the Main Window on the Tools menu. When the Error Catcher is open, all errors are also listed there in addition
to the Main Window.
A notice (N) is issued when the system wants the user to be aware of some circumstance or event that is not usually an error.
A warning (W) is often associated with an error, but the current task is not interrupted. However, the result may be incorrect or incomplete in
some respect.
An ordinary error (E) message is issued when a function cannot be carried out. The function in question may be the entire current task (for
example, calculation of hydrostatic tables) or some part of it (for example, drawing a curve or interpreting a single data record).
A system error is issued when an error prevents the further running of the system entirely or makes the further running of the system risky.
Examples of this include database errors and an overflow of runtime storage. In these cases, the run is interrupted unless the test mode is on (the
!TEST command).
To view a more specific explanation of a specific message, use the !EXP command:
TAB?>!EXP 19702
Table already saved
use command REPLACE
4. Transparent commands
Using the 'DES object' command in the DEF task will return the description of a named object, such as a curve or a surface. However, the
description can be retrieved in any task, for example in LD, by using the !GM command:
The LQ and INFO commands can also be used in any task with !GM:
LD?>!GM LQ VOL
4.2. Calculator
NAPA's calculator is a tool for performing a large number of mathematical and other operations. It is an independent function and can be used in
all subsystems. The syntax of the calculator is:
!CALC expression/function
!COM C.F
Besides the common arithmetic functions, NAPA contains a large set of other calculator functions for calculating, for example, an object's volume
and centre of gravity. The following list contains the most common calculator functions:
!CALC VOL() Volume of an object given as a parameter; for example: !CALC VOL('ROOM1').
!CALC CG() Centre of gravity of an object; for example: !CALC CG('ROOM1',1) returns the x-coordinate of cg.
!CALC LL(), !CALC UL() The lower and upper limit of an object; for example: !CALC UL('ROOM1',3) returns the upper z limit.
!CALC AREA() Area of a curve, a surface, or a room; for example: !CALC AREA('FRA') returns the main frame area.
!CALC REF() Reference system parameters; for example: !CALC REF('COORD') returns the orientation of the coordinate
system.
!CALC FR(), !CALC Frame - x-coordinate conversions; for example: !CAL FR(30) returns the frame number at x=30.
XFR()
Macros in the database can be run with the !ADD command. If a macro requires parameters, they can be provided in parentheses. For example:
TASK?>!ADD COLOURMAP
TASK?>!ADD TESTMACRO(‘HULL’)
5. Geometry-related hints
The DES command returns the description of an object as it is saved in the database. In many cases, the object will consist of other objects,
curves, and/or points. Using the asterisk (*) option will give the descriptions one step further and using the double asterisk (**) again one more
step further. The maximum number of steps is four (****). For example:
DEF?>DES HULL
SUR, HULL
COM HULLA, HULLM, HULLF
DEF?>DES *HULL
SUR, HULLA, P
THR STERN, FRA, FSA, FBA, DECKA, TRANS, KNA, FRA1, FRA2,
FRA3, FRA4, FRA5, FRA6, FRA7, FRA8, FRA9, WLA1, WLA2,
WLA3, WLA4, TA1, TA2
SUR, HULLM, P
THR FRA, FRF, CLM, FBM, FSM, DECKM
SUR, HULLF, P
THR FRF, STEM, FBF, FSF, DECKF, WLF1, WLF2, KNF, FRF2,
FRF3, FRF4, FRF5, FRF6, FRF1, TF1, TF2, TF3, TF4, TF5
SUR, HULL
COM HULLA, HULLM, HULLF
The descriptions can be retrieved in the Text Editor by typing a double 'less than' sign (>>) and the object's name in the command field. The
asterisk (*) option works in the Text Editor as well. For example:
Sometimes it may be needed to have curves which follow some surface etc. The curves can generated with the command GENERATE in DEF
task. For example, the frame curves can be generated from the existing surface:
If the generated curves are needed to be modified, they must be modified first, as done in the next chapter.
It may be useful to convert a generated curve or a DXF curve into a 'native' NAPA curve. This will enable editing the curve. For instance, a
generated wind profile curve can be used as follows:
DEF?>DES MARGINLINE
This definition can now be highlighted and run to create a typical NAPA curve. As the curve has too many points to be useful for editing,
geometric tolerance should be temporarily increased to reduce the number of points. Geometric tolerance can be defined with the TOL option of
the DES command, however, this is optional. The default geometric tolerance (GMTOL) defined in the REF task is used otherwise.
A new surface geometric object can be created by using an already existing object by translation, in other words by generating a copy of the
original object to a different location. The translation syntax is given between the brackets after the original object name. The translation can be
used for various geometric objects as surfaces and rooms.
In the example below a new surface is created from an existing one, and located 30 meters forward from the original surface.
SUR, SURFACE1, P
THR CURVE1, CURVE2, CURVE3, CURVE4, CURVE5, CURVE6, CURVE7, CURVE8
SUR, SURFACE2
COM SURFACE1(X+30)
ROOM ROOM2
LIM ROOM1(X+30)
It may be difficult to debug room definitions when a complicated compartment model is concerned. One simple visual aid is the PTR option of the '
ID drawing' command. When using a setup drawing, this command will outline the rooms and add a tracing red line to each compartment
according to a given setup. This red line locates at a certain distance inside the compartment as it is defined. Therefore, if a red line should cross
a room boundary, there may be a problem with the model.
It may be useful to adjust the offset distance between the room boundary and the trace lines. For example:
DR?>SET Y=0.01
DR?>DRW ALL
It is also useful to check whether compartments overlap. The easiest way to check all compartments is to use either the Verify or the Ship Model
Manager application (as in the figure below). The checking can also be done manually in the command window by using the GM.OVERLAP
service function.
6. Interface-related hints
Tables can be imported and exported in the comma separated value (.CSV) format. The easiest way to do this is to use the Table Editor. The
Table Editor's File menu contains the options Import from CSV... and Export to CSV.... These functions can also be carried out by using the LO
AD and DUMP commands in the TAB task.
When importing a table, the first row of the source table must contain the names of the columns. The prefix and name of the table are given in a
popup window after the source table has been selected.
Drawings can be exported in the drawing exchange format (.DXF) directly from the currently open graphics area. This can be done by using the P
rint with Options... function in the Plot Window, or Send View... in the Main Window's graphics area. Clicking either of these will launch a print
dialog box with the options Export file and AutoCAD (DXF).
Transparent commands
Transparent commands can be used independently of the current task and are identified with an exclamation mark (!) in front of them. This
chapter presents the most frequently used transparent commands including some examples.
For more thorough explanations and examples, see the explanation texts with the !EXP {command} command. The complete list of transparent
commands can be viewed with the !COM !command.
Table of Contents:
1. Administrative commands
2. Database handling
3. Selecting
4. Graphics and drawing
5. Various
1. Administrative commands
!WHE "Where am I?" Indicates the current project, version, active task, and information about the NAPA version.
!CAT ALL Creates a catalogue of elements in the database. All items of all versions will be included in the catalogue.
!CAT TAB* Catalogues all tables from DB1 that are newer than 31 August 2011.
DATE>110831
!CAT Catalogues all elements from DB1 that belong to version A and that have the string 'LD*CON' included somewhere in their
NAME<LD*CON names. (All loading conditions in version A will be included in the catalogue.)
VER=A
!CAT 2 DATA* Catalogues all macros from DB2 (system database) the names of which start with the string 'REP'.
NAME>REP
!CAT 7 TAB* Catalogues all tables from DB7 (NAPA database) that have the string 'STD' included somewhere in their names.
NAME<STD
!ADD drawing/B/P1234 Runs the macro 'drawing' from version B of project P1234.
2. Database handling
!END Ends the current task and moves directly back to the Task level.
!FORM Makes temporary changes in the quantity standard as defined in the Form task. Controls various
aspects of the appearance of numerical values in results lists.
!OPEN P1234 6 AUX Opens DB4 of project P1234 (=file p1234.sd) as unit 6.
3. Selecting
!SEL The same as for the !CAT command but as the default in the current version. The selected items will be saved in an array variable
LIST. The contents of the variable can be checked with the !VAR LIST LIST command. When selecting items equipped with a prefix,
it is possible to get only the part of interest into the array variable, for example, in the following way:
!SEL 'LD*CON('
!VAR LIST LIST
LOAD1 LOAD2 LOAD3 LOAD4
!SEL NAME<LD*CON
!VAR LIST LIST
LD*CON(LOAD1) LD*CON(LOAD2) LD*CON(LOAD3) LD*CON(LOAD4)
!SEND Sends the current view from the graphics area to the printer or stores it into a database.
!SEND TO DXF Sends the view to DXF from the active graphics viewer to the napa\temp folder with the name
FILE='temp/plan.dxf' 'plan.dxf'.
5. Various
!FRN Returns the frame number of a given x-coordinate or the x-coordinate of a given frame number.
!FRN 60 FRN=88.85
!CAL Calculates an expression. The expression can be an ordinary arithmetic expression or anything involving NAPA calculator functions,
the list of which can be obtained by using the !COM C.F command. See the !EXP ! CAL command for several examples.
!TYPE text This command simply writes the input record in the log. It is intended as output command for NAPA BASIC programs.
!DATE Without parameters, this command displays the current date and time.
!DTX Lists all dynamic texts (used in output) available and their current values. For example: project name, version, version description, user
name, and so on.
NAPA system
The NAPA system (the Naval Architectural Package) is a computer-aided engineering (CAE) system for ship design. The NAPA system has been
developed by Napa Ltd, Finland.
The present document, the System document, presents general properties of the NAPA system. This chapter describes the field of application
and general features.
Table of Contents:
1. Purpose
2. Hardware and operating systems
3. Graphics environment
4. Peripherals
4.1. Tablets
4.2. Printers
5. Summary of functions
6. Central features
6.1. Ship model
6.2. Geometry
6.3. Accuracy
6.4. Management of dependencies
6.5. Integration
6.6. Modularity
6.7. Command language
6.8. Tailoring
7. Interfaces
8. Onboard-NAPA
1. Purpose
The NAPA system is intended to serve the initial and the basic design of a ship. The general idea is that NAPA should provide the means for
creating the design and making sure that the result is technically feasible and satisfies the requirements set by the owner, the shipyard and the
authorities.
Interfaces are provided to more specialized systems to use the information created in NAPA for the detailed design stages and for analyses not
carried out by NAPA.
An important function is also the production of delivery documents related to the stability and safety of the ship. See also the section on Onboard-
NAPA, presented below.
3. Graphics environment
The NAPA Graphical User Interface (GUI) is based on Motif and on Windows operating system OpenText Exceed is needed. It is an X-emulator
that allows Motif programs to run on Windows.
4. Peripherals
4.1. Tablets
A tablet or digitizer can be used for input of data from a drawing. Because of the rich variety of protocols, Napa Ltd should be consulted for the
suitability of different devices in connection with a given workstation.
4.2. Printers
Napa uses the Windows printers that are available through windows. For historical reasons there are some built in printer drivers in Napa (e.g.
PS, Capsl etc), but the recommended practice is to use the windows printer drivers.
5. Summary of functions
The following summary gives a short presentation of the functions provided by the system:
6. Central features
The core of the system is formed by a description of the ship called the ship model. Emphasis has been placed on creating a system that is
capable of supporting the iterative nature of the design process, while keeping the degree of detail at a level that is relevant for the applications
handled by NAPA.
The ambition is that the ship model can be used as a tool for managing the design process, by providing a single, primary source for the general
design that can be easily maintained and shared by other systems via interfaces.
6.2. Geometry
Any form can be treated for instance twin skegs, catamarans, unsymmetric hulls, drilling platforms. This also concerns other components besides
the hull: decks, bulkheads, deck house walls etc.
Objects can be defined with reference to others by topological and other relationships, minimizing the need for primary geometric information,
improving internal consistency and allowing automatic update of dependent objects.
6.3. Accuracy
A low degree of detail does not necessarily mean lack of accuracy: whatever is defined can be defined to the desired degree of accuracy
including, among other things, the hull surface to the accuracy needed for production.
Although the normal use of NAPA only requires what is called a global description of the ship, there is no limit on the degree of detail that can be
applied.
The calculations are based on the geometric model without approximating assumptions. The calculation applications affecting the ship's safety
(such as stability and unsinkability) have been approved by several maritime administrations.
The iterative nature of the design process is supported by a management of dependencies, of which the topological relationships mentioned
above is one example. This allows automatic recalculation of dependent data when changes have been made.
6.5. Integration
The system is completely integrated, with the database at the center. Information defined is automatically available to any functions that need it.
The database is divided into databases for individual projects, common installation data and data delivered with the system.
6.6. Modularity
The functions of the system are organized into subsystems, which are independent as much as possible while still sharing common data and
common functions. These are collected into a single executable program, making installation simple and allowing easy transition between
functions.
The system is controlled by a powerful command language and graphical user interface. The command language can be used in combination with
the graphical user interface and the graphical user interface can take advantage of the command language.
An essential feature is a flexible macro language, repeated tasks can be streamlined, own output functions can be designed and by which
completely new applications can be created.
6.8. Tailoring
Unnecessary connections to specific standards, layouts and similar aspects have been avoided in the system code, and replaced by definitions
that can be modified. With the macro language, you can implement your own routines and functions.
7. Interfaces
There is a large number of interfaces to and from NAPA, covering geometry, graphics and other data. For exporting geometry, a special case is
formed by the so-called direct interfaces. Other important surface interfaces are IGES (selected entities) and VDAFS. Graphics can be imported
and exported in the DXF format amongst others.
Data in table form can be exported to EXCEL or any spreadsheet supporting comma separated value formatted text.
Of the more specialized interfaces, there is a transfer of FEM models using DXF or IGES and generating data for CFD calculations.
The system is very open, and where the standard interfaces cannot be used, there are general tools for accessing practically any data and for
outputting data according to your specifications.
8. Onboard-NAPA
The functions related to loading conditions, stability in general and damage stability in particular are available for use on ships as the so-called
Onboard-NAPA. The Onboard-NAPA is based on the same functions as NAPA, only the user interface is different. Among other things, this
means that the calculations are based on the same geometric model. In addition, there are functions specifically supporting onboard use, such as
reading data from the tank automation system.
Documentation
Table of Contents:
1. Main documents
1.1. System document
1.2. General system functions
1.3. Reference manuals for each subsystem
1.4. Introduction to NAPA
1.5. Update infos (UDI)
2. Run time documentation
1. Main documents
The user documentation contains the following parts and it is distributed in electronic format.
The system document presents general information concerning the system as a whole. This chapter is part of the system document.
The system document gives an overview of the functions. Information related to the practical use of the general functions is collected into three
documents:
Monitor: running the system, project administration, editor, calculator, various EDP oriented subjects
Listing and documents: general functions related to producing list output and documents
Graphics and drawing: management of graphics, general graphics functions, the general drawing task, general functions for drawing of
diagrams.
The purpose of the reference manuals is to provide a complete presentation of the function and use of the subsystem. Some details are
presented in the command descriptions.
The Introduction to NAPA contains examples and short descriptions of the main functions. With the help of the introduction, one should be able to
get started.
The update infos give information on changes in new releases. Their primary purpose is to present changes and new features.
Presentation of subsystems
This chapter gives an overview of the functions in NAPA, presenting the services offered by the various subsystems and the connections between
them. Note that all functions presented here are not necessarily included in a given customer version, as the available functions are controlled by
a license file.
Table of Contents:
1. General
2. Dependencies between application subsystems
3. List of subsystems
3.1. Application subsystems
3.2. Auxiliary subsystems
3.3. General service functions (not recorded as subsystems)
4. Ship model subsystem (SM)
4.1. Main ship model
4.2. Outfit subsystem
5. Geometry subsystem (GM)
5.1. Hull definition
5.2. Defining inner structures
5.3. Link functions (interfaces)
5.4. Auxiliary functions
6. Definition of structures, NAPA Steel
7. Hydrostatics subsystem (HD)
8. Capacities subsystem (CP)
9. Loading conditions subsystem (LD)
10. Stability criteria subsystem (CR)
11. Damage stability subsystem (DA)
12. Miscellaneous functions
12.1. Launching
12.2. Inclining test
13. Weight calculation (WG)
14. Grain stability (GS)
15. Container loading (CL)
16. Basic Ship Hydrodynamics - Powering (SH)
17. Seakeeping (SHS)
18. Manoeuvring (SHM)
19. Information system (IS)
20. General service functions
20.1. Drawing functions
20.2. Text editor
20.3. Documentation system
20.4. Calculator
20.5. Table calculation
20.6. Diagram drawing function
1. General
The subsystems of NAPA are divided into application subsystems and auxiliary subsystems. In addition, there are general service functions,
which are not classified as subsystems.
The application subsystems perform the tasks that form the reason for using the system: functions related to ship design such as lines definition,
hydrostatics, loading conditions, damage stability, etc.
The auxiliary subsystems mainly take care of inner functions of the system such as data management, graphics, calculations, most of which are
not visible to the user. The auxiliary subsystems are therefore not presented.
At the top command level of NAPA, the functions of the system appear as a set of so-called tasks. There is no one-to-one correspondence
between the subsystems and the tasks, but in general, each task belongs to a given subsystem.
The division into subsystems is partly influenced by tradition, but the central principle is that each subsystem is formed by functions sharing a
common set of data and concepts, while connections between the subsystems are kept as narrow as possible.
However, the running of one subsystem may be dependent on data created within another. Above all, this concerns the definition subsystems GM
(geometry) and SM (ship model) which create the basis for all the others. Another central set is the loading conditions defined under LD.
3. List of subsystems
Name Abbreviation
Ship model SM
Geometry GM
NAPA Steel ST
Hydrostatics HD
Capacities CP
Loading conditions LD
Stability criteria CR
Damage stability DA
Miscellaneous MI
Weight calculation WG
Grain stability GS
Container loading CL
Ship hydrodynamics SH
Seakeeping SHS
Manoeuvring SHM
Information system IS
Name Abbreviation
Monitor MN
Database management DB
Basic geometry GB
Integrals IN
Alphanumeric input AI
Alphanumeric output AP
Graphics GR
Error handling ER
Various functions AD
Text editor
Documentation system
Calculator
Table calculation
Diagram drawing
The SM is needed for most of the naval architectural calculation subsystems (CP, LD, DA, etc.).
The purpose of the Outfit subsystem is to manage various pieces of equipment, anything from main engines to pieces of deck equipment, in the
context of the ship model. 'Manage' means here that the location can be defined with respect to the structures or to other equipment and that
these can be studied together, above all graphically. This is supported by geometric definitions of the equipment, which may be produced by
NAPA or imported.
The data obtained can be used for verifying space utilization, for various calculations, e.g. weight, for administrative purposes, for supporting
simulations etc.
The functions for handling of surfaces, applicable for hull forms, decks, bulkheads or any other surfaces, are:
The hull surface definition is not limited to conventional ship forms. For example, twin skeg hulls, floating docks, oil drilling platforms, catamarans,
trimarans, submarines, and asymmetric hulls, can all be handled.
A true surface representation, known as the patch surface (Coon's patches), is used, as this allows each point on the surface to be uniquely
defined. Surfaces can be faired up to the level required for manufacturing the steel hull.
For definition of decks, bulkheads and similar objects, the surface object is provided defining these shapes using topological relationships. There
are no limitations as to the geometric shape of the structures to be defined.
The hull surface is in principle just a special case of a geometric shape, albeit the most complicated one, but from the practical point of view it is
convenient to regard hull definition as a separate function.
Direct definition
This means creating a surface from its geometric elements (points, curves, angles) which can be picked from a sketch and then refined to
the desired quality or digitized from a drawing.
Parametric definition
A skeleton for a hull form of a certain type can be defined parametrically, i.e. by providing parameters such as main dimensions, bilge
radius and others having a direct connection with the components of the surface.
Transformation of an existing form
An existing form can be transformed to meet desired main dimensions (L,B,H,D,LCB) and to some extent other properties. Existing
designs can be stored in the form of a lines library.
Interactive modification of a form
Various types of surface manipulation facilities are provided for use at an interactive graphic terminal.
Applying an operation on an existing surface
A surface can be generated by applying a (small) offset in the direction of the normal or by cutting a surface with another.
Where needed, the general surface definition method can be used for defining surfaces needed for the generation of the inner structures or
deckhouse walls, but most of these can be handled by some of the elementary surface types available (planes, cylinders, etc).
For representing the geometry of compartments, an object type called room is provided. A room represents a closed volume, defined by its
limiting surfaces. The shape of a room adapts automatically to changes in the limiting surfaces.
For representing the geometry of structures (decks, bulkheads, deckhouse walls, etc), an object type called surface object is provided. A surface
object is formed by delimiting a surface with the aid of other surfaces. Its shape is automatically updated if the surfaces it depends on are
changed.
Note: for this linkage, only the functions covered by the NAPA system are delivered by Napa Ltd.
transfer of curves
transfer of surface objects
transfer of drawings
this interface makes the NAPA Patch Surface and the NAPA intersection routines directly accessible for all surface-related operations in
TRIBON
transfer of curves
transfer of surface objects
transfer of drawings
DXF INTERFACE
The DXF interface transfers drawings bidirectionally in DXF format between NAPA and other systems supporting the DXF 2D interface,
e.g. AutoCAD, Intergraph, ME-10, WordPerfect and many Windows applications, e.g. MS Word and MS Excel. There is also a 3D DXF
interface for the transferring of space curves from NAPA.
VDAFS INTERFACE
The VDAFS interface transfers curves as well as surfaces in patch representation in accordance with the VDAFS standard (DIN 66301),
to other systems that have the same interface. Both versions 1.0 and 2.0 are supported.
HULL FORM LINK FROM SIKOB TO NAPA
Semi-automatic conversion of the Sikob hull form description into NAPA.
LINK FROM B-LINES TO NAPA
Via this link the B-lines hull form description (from BMT) can be transferred semi-automatically to NAPA.
IGES INTERFACE
The IGES interface transfers polynomial surfaces (NURBS, IGES type 128) to NAPA from other systems supporting the IGES interface.
NAPA patch surfaces can be transferred to IGES surfaces (type 114 and type 128). The interface has been tested for Macsurf and
IGES
DXF
user-defined list of node points, lines and surface elements
Note: for this linkage, only the functions covered by the NAPA system are delivered by Napa Ltd.
This interface makes the NAPA Patch Surface and the NAPA intersection routines directly accessible for all surface-related operations in
NUPAS.
There are listing functions for showing properties of objects (coordinates, angles, areas, volumes, etc), a catalog function for finding objects in the
database, special definition and modification functions. The definition of any object can be displayed, with or without the definition of the objects it
depends on. Output of lofting tables is available as a separate task.
The definitions are made independently of the block structure, but output can be done according to it.
The functions include definitions, graphic presentations, calculation of derived properties, e.g. weight, interfaces to other systems.
The system is intended for the basic design stage, and emphasis is placed on the efficient production of a model that covers the needs of this
stage.
hydrostatic booklets
Bon Jean tables and curves
sectional area curves
standard stability tables and curves
trim tables and trim diagram
loading scale
stability in waves at any angle of encounter
compartment hydrostatics
capacity tables
free-surface shifting-moment calculations
GM calculations
lightweight calculation, center of gravity
calculation of the effect of hull deflection
inclining with solid weights or liquid shifts in tanks
error estimate
printing of a test report
The stability criteria can be calculated in accordance with the following rules or requirements: SOLAS 90, SOLAS 1974 (Carriage of Grain), IMO
Resolutions A.749 (ES.IV), A.562(14), A.649(16), IBC Code (Resolution MSC.4(48)), IGC Code (Resolution MSC.6(48)), Marpol, Det Norske
Veritas and others.
Damage stability can be calculated in accordance with the following rules: SOLAS 90, SOLAS 1974 (Carriage of Grain), IMO Resolutions A.749
(ES.IV), A.562(14), A.649(16), IBC Code (Resolution MSC.4(48)), IGC Code (Resolution MSC.6(48)), Marpol, Det Norske Veritas and others.
In addition, user-defined damage stability criteria can be accommodated for deterministic damage stability analysis.
12.1. Launching
way pressures
anti-tipping moment
speed
stopping point
The inclining test module handles the calculations and output of the report of the inclining test. The inclination can be accomplished by moved
weights or tanks. The measurement can be done by pendulums or a device giving the inclination directly.
The calculations are based on the Ship Model created by the SM.
The organisation of weights and the calculation rules are entered as data. The calculation rules can rely on the ship model for providing measures
such as areas of structures, volumes and bottom areas of compartments, calculated for given objects or specified subsets. The ship model also
provides the means to designate the location of weights with respect to objects in the ship. To the extent that weights and locations are connected
to the Ship Model, they are automatically updated when changes are made.
A reference ship can be used as a source of data or for comparisons. The weight distribution can be transferred for use in the calculation of
longitudinal strength in the LD subsystem.
Hull parameters
Resistance
Propulsion
propeller optimization
propulsion calculations
propulsion coefficients in accordance with Holtrop
propulsion merit coefficients
Excitation
routines for SH database access, and a set of tools for building and maintaining model test correlation databases
relative and absolute motion amplitude, velocity and acceleration limits in all three directions
bottom and flare slamming
shipping of green water on deck
passenger seasickness indexes
motion limits
The Seakeeping subsystem handles more than 2,000 quantities related to ship behavior in varying sea conditions. The NAPA database is used
effectively to store and maintain the large amount of information so that you can view the precise data in which you are interested.
The information stored in the database can be output by using the flexible report generation facility. Both graphical and alphanumeric output are
possible.
wind
current
waves
shallow water
trim
roll to yaw coupling
The SHM subsystem can be used to predict ship manoeuverability at an early design stage as required by IMO, and to produce data for
wheelhouse posters, pilot cards and manoeuvring booklets. The system can be used for the dimensioning of the manoeuvring devices, for
predicting ship manoeuverability and for partly replacing expensive model tests and full-scale trials at sea.
Fairplay International Research Services (FIRS) delivers large ship files of all vessels delivered, under construction or on order. The FIRS files are
converted into the NAPA database form by routines included in the information system to allow further studies in NAPA using regression analysis,
scatter plots, etc.
The main drawing task contains functions for presenting geometry in graphic form for the purpose of aiding the definition process, for graphic
verification of geometric objects and for creating drawings for various uses.
The basis of the drawing task is a set of general drawing functions, by which geometric objects can be shown as sections or various projections.
Other graphic elements such as texts, scales, grids etc. can be added, including figures read from the database.
Special support is available for showing the general arrangement, as plans where, in addition to the geometry, one can show various aspects of
the design by colouring or texts. These plans also form the basis for graphic verification and documentation of loading conditions, damage cases,
weight calculation and container arrangements.
There are functions available for supporting hull definition by showing multiple views, use of colouring for displaying the curvature, plotting curves
of equal inclination and others.
The text editor handles creating, modifying and storing of texts for any purpose inside or outside the system. These texts include macros,
document source texts and others. The editor can be accessed from practically every subtask, where the editor is available for convenient
modification of definitions of the task in question.
The editor also contains functions for supporting system development, operations on text directories, running processes outside NAPA and
others.
The documentation system was originally introduced to support the generation of NAPA documents, but it has found extensive use in the ship
design also. The purpose of the documentation system is to produce formatted documents from unformatted source texts. The documentation
system is not intended to compete with dedicated text processing systems, but because it is integrated with NAPA, one has access to calculation
results, figures and standard functions such as macros and the calculator.
20.4. Calculator
The basic function of the calculator is to evaluate expressions entered as data. In addition to the usual mathematic functions, the calculator
includes a wide range of functions specific for NAPA, ranging from access to elements in the database to doing sections of objects.
The calculator is accessible independently by the !CALC command, and it is available embedded in other system functions. The most important
case is the usage of calculator functions in macros, by which the usefulness of the macro facility is essentially increased, allowing genuinely new
applications to be created.
The table calculation module contains a wide range of functions operating on data organized as a table. In addition to definition, modification,
storing, retrieving and output, these functions include the processing of the data inside a table or combining data between tables.
The table calculation module is a tool by which you can carry out your own data processing tasks, where the input can be fetched from the
applications of NAPA.
The table calculation module is also used as the basis for many other functions, including the ship model and weight calculation.
The diagram drawing module is used internally by the output functions producing diagrams, and it is available as an independent function where
data can be entered manually or fetched from applications within NAPA, above all, the table calculation module.
Run environment
This chapter describes the files that are necessary for running NAPA.
Table of Contents:
1. Overview of files
2. Program files
3. NAPA database
4. System database
5. Intermediate output file
6. Project files
7. Directory TEMP
8. Context for file names
9. Installation parameters
1. Overview of files
The following scheme shows the central files used when running NAPA.
IOF: intermediate output file, temporary storage of lists and plots (common for the installation)
PROJ.DB: main project database, primary data (separately for each project)
AUX.DB: auxiliary project database, calculated data (separately for each project)
There may also be the so-called protected database, presently available for weight calculation only.
The files are described in more detail below. Depending on the environment or the tasks used, other files may be needed as presented below.
2. Program files
Napa is delivered as an installer program that installs the required files on the machine. Napa can be removed from Control Panel / Add and
remove programs.
3. NAPA database
The NAPA database is a file organized the same way as all NAPA database files. Its purpose is to contain all such data that is delivered as part of
the system and common for all NAPA users. Part of the data is such that the users are not expected to modify it, and this part is read from the
NAPA database only, while part forms default data that the users may tailor to their own purposes and store in the system database.
The NAPA database is delivered with the system and updated with each new release. The NAPA database is assigned as unit 7, and it is
available as read only.
4. System database
The system database also has the format of a NAPA database file. Its purpose is to contain all such data that are specific to the user organization,
but common to all projects.
the installation parameters: installation specific standards and data about the hardware
administration of projects
generally used macros, figures, tables, list and plot control data, etc
various data specific for a subsystem
For a closer description of the contents of the NAPA database and the system database, see chapter Common Data. This chapter also presents
the rules for reading from various sources.
A system database containing a model for the installation data is delivered with the system. The name under which the system database is
installed can be recorded in the environment parameter NAPASYSDB. If this parameter is missing, the default sysdb location is pr\sysdb.db.
Normally, there is one system database per installation, but if needed, different groups of users can have their own, provided that the
corresponding environment parameters are assigned. Unless project administration data is manually copied between the system databases, the
different user groups cannot share projects.
The system database is assigned as database unit 2. Writing to it is restricted as presented in the Monitor manual, chapter Project Administration.
By default the intermediate output file is pr\iof.dat. The environment parameter NAPAIOF can be used to define a custome location.
It is recommended to have a separate IOF file for each machine running Napa.
If the IOF is missing when NAPA is started, it is created automatically. Its size can be modified with the command IOF in task TOC.
6. Project files
Two files are used for storing project data, both having the standard database format. The main file contains all primary data, i.e. data that cannot
be replaced if lost. The auxiliary file contains results of calculations and other operations that can be repeated if necessary. Drawings are treated
as calculated data, and stored in the auxiliary file.
In addition, there is the optional protected database. This file is presently used by the Weight Calculation (WG) task only when so specified. Its
purpose is to provide a place where data needing special access protection can be stored.
The project files are created when projects are created. There must be a directory reserved for this purpose, the name of which can be stored in
the installation parameters or provided by an environmental variable NAPAPR (the latter overrides the former).
Unless specified otherwise at creation, new projects will be created in this directory. However, the project files may reside in any directory (e.g. as
a result of copying), provided that the file name registered in the system database is correct. The file name can be checked and changed under
subtask UPD in task ADM. Even the last requirement can be disregarded if NAPA is run by specifying directly the name of the project file.
The auxiliary database may be missing, in which case an empty file is generated automatically.
The names of NAPA databases are identified by the file extensions .db (main project database), .sd (auxiliary database) and .pd (protected
database). Since release 2003.1, the alternatives .napadb and .napasd are available for the project main and auxiliary databases in case there
should be conflicts with other systems. The extension to be used for new files can be changed by the parameter EXT in the installation
parameters. Regardless of this, both alternatives are accepted for existing files.
7. Directory TEMP
A directory named TEMP must be available. It is used for temporary files. The name of this directory may be changed if provided in the
environment variable NAPATEMP.
Note: this parameter is not available when opening the system database.
9. Installation parameters
The so-called installation parameters are stored in the system database and provide installation specific information. The parameters are mainly
of edp-technical nature, but some of the parameters refer to shipyard standards (orientation of coordinate system, rule for trim sign, name rules).
An important part of the parameters provide information about the hardware devices.
In the installation parameters, there is also the user register. The user register contains a list of users allowed to use the system and assigns
various rights.
The installation parameters are listed and modified in subtask INST under task ADM. More information is found in the Monitor manual and in the
associated command explanations.
1. General
2. Concepts related to running
2.1. Current user
2.2. Current project
2.3. Run identification
3. Simultaneous use
4. Batch runs
5. Starting a session
6. Finishing a session
7. Current command environment
8. Division into tasks
9. Interrupting the run
10. NAPA run without Graphical user interface
11. Using NAPA efficiently in a global network
11.1. Global network and NAPA
11.2. Speed of use
11.3. Network configuration
11.3.1. NAPA main server
11.3.2. NAPA local servers
11.3.3. NAPA clients
11.4. Files and locations
11.4.1. Global system database
11.4.2. Local system database
11.4.3. The DB5 mode
11.4.4. Project databases
11.4.5. IOF
11.5. Starting the system
11.5.1. The batch file
11.5.2. Initialization macro
11.5.3. Running initialization macro already from the batch file
11.6. ANALYSING THE NETWORK TRAFFIC
1. General
Before an application can be run, there is a number of functions of administrative nature that must be handled, which are taken care of by the
monitor task. This chapter presents some general issues related to running the system.
Details about these functions such as the format of commands are presented in the Monitor Manual.
When the system is started, the first thing inquired is the identification of the user (user ID).
The user must be registered in the installation parameters. The user may be granted different rights regarding system functions or access to
project data (see the Monitor Manual, project administration).
The user ID also serves as part of the identification of various types of output, providing among other things a useful criterion for searching among
saved lists or plots.
The IDs are also registered when writing to the database and available for information or selection criterion.
Except for some auxiliary functions, all functions require that there is a project available. Therefore, there is normally a project assigned to a run,
providing the current project. Within this project, there is a current version.
With the exception of a few special functions (e.g. transformations), all storing and retrieving of project data concern the current project and
version. It is possible to modify data of another project only in some specially provided functions (e.g. the COPY command under TOC).
The current project and version are defined when starting a session, but these can be changed any time without restarting the system.
The project and version also serve as part of the identification of output.
Each run is assigned a run identification. Its main function is to help identify the results (lists, plots) stored in the intermediate file. The run
identification is selected automatically when starting a run by adding a number to the letter R (interactive runs) or B (batch runs). The number is
increased by one each time a new run is started.
3. Simultaneous use
The system allows several users (or batch runs) to have access to the same project simultaneously. This means that the database of the project
is handled so that its integrity is not at risk. However, it is the users' responsibility to see that the tasks performed simultaneously do not interfere
with each other, for example, by two people modifying the same surface.
4. Batch runs
In a batch run, a macro is run without user interaction. With modern machine resources and the possibility to run multiple sessions at a
workstation, the importance of batch runs has been much reduced.
5. Starting a session
A session is defined as the tasks performed during the time between entering the system and exiting.
Using the services provided by the operating system, the routine for starting the system is usually arranged as found suitable by the user
organization, for example, as part of the login procedure or by providing a suitable abbreviation.
user ID
password
user profile
A user can achieve a certain degree of personalizing by storing a macro named INIT*nn in the system database (nn=user ID). If such a text
exists, the commands are run after entering the initials.
After this, the top command level is entered (see below), designated by the prompt TASK?> on the screen. Any function of the system can be
started with the corresponding command.
6. Finishing a session
A session is finished by entering the command X at the TASK?> prompt. An emergency stop can be made by pressing Ctrl C twice.
In many cases, when a command has been successfully carried out the only visible result is that the prompt reappears. If the command has not
been successfully carried out, an error message is written.
Some commands do not carry out any function of their own, only transfer control to a new command environment. Normally, when returning from
a command environment with the command END, the one from which it was accessed becomes current again. There is a universally available
command !END which always leads directly back to the top command level i.e. the level at which NAPA is initially entered.
A list of currently available commands can be obtained by the command !COM, and the details of specific command can be obtained with
command !EXP [command].
where 'task' is an identifier that refers to the task in various contexts, for example, in the catalog of the intermediate file, and 'description' is a text
that shortly presents the task.
A macro name TINIT*task is executed if found in the system database or the project database.
At exit from the task, a number of control parameters is reset, open lists and graphics are closed and the free storage is cleaned.
Note: descriptions read with the calculator function DB are likely to be among the removed ones.
The !WHERE command tells, among other things, the current task and subtasks.
When pressed once, it interrupts the current process without interrupting the run. When pressed twice, without entering any commands between,
the NAPA run is interrupted.
A single Ctrl C affects only those processes where the interrupt has been taken into account. Such processes are running an macro with !ADD,
the PRINT command of the editor, the CATALOG command and others in the task TOC, updating a surface, the generation of calculation sections,
the iterations of IN and many others.
Requirements
NAPA installation
napaapi.dll file corresponding to the NAPA installation
NapaRunmacro.exe file
NAPA license must have NAPA API feature
.bat file to startup the run with desired parameters
Setting up
Install NAPA
Copy napaapi.dll and NapaRunMacro.exe into the same folder, for instance INSTALL_FOLDER\NapaRunMacro.
Create the macro you want to run and ensure that it works with ordinary NAPA run (i.e. from graphical user interface)
Create a batch file (.bat file) which starts the Napa run without user interface. The batch file starts NapaRunMacro.exe with parameters.
The path of the installation folder, INSTALL_FOLDER\bin\20113 needs to be given in the batch file (see example below). Note that the
name of the last folder depends on the installed NAPA release.
-u User name
set NAPADIR=C:\NAPA\PR\
set NAPADB=C:\NAPA\PR\NAPADB.DB>
set SYSDB=C:\NAPA\PR\SYSDB.DB
set NAPALIC=C:\NAPA\PR\napalic.txt
set NAPAIOF=C:\NAPA\PR\IOF.dat
set USER=NAJK
set PROJECT=C:\NAPA\PR\D-Ropax.db
set MACRO=RUN_3DD
set PATH=C:\NAPA\BIN\20113;%PATH%
It is useful to include text output to a file from the macro which is run in order to check everything is working as expected
Global network means here that NAPA is used so that several offices / sites are connected to each other and one common NAPA license is used
among all the users. Different sites may have their own confidential information which is not available for all the users.
The speed of NAPA use is almost totally depending on the network latency and the amount of descriptions searched from the network locations.
The general guideline to improve the speed of NAPA use is to have all the files as local as possible. This means, for example, that all the client
computers should have NAPADB (DB7) in their local napa\pr folders.
The company’s global system database and NAPA license file are located here.
The local system database is located here as well as all the local projects. The local system database is not mandatory if there is no need for that.
Client computers will run NAPA from the main server but the NAPADB is recommended to be run from the local hard drives.
This is the normal NAPA system database which is used by all the clients. The global system database (DB2) handles the licensing issues and
project administration. All the company specific data should also be stored here, such as common macros etc.
This is also a normal system database but the licensing issues are not handled here. This is opened in the UNIT 5 using !OPEN command
!OPEN 'K:/NAPA/PR/KSYSDB.DB' 5
All the site specific data can be stored here, i.e. data needed only on that site but not globally by all the sites.
The, so called, DB5 mode can be activated with the following command
!CAL DB.DB5MODE(1)
The DB5 mode will change the search order in NAPA, as follows
Activating the DB5 mode (and opening the local system database in the unit 5) can be done with a macro which is run when NAPA is started.
Project databases should be stored as close the client computers as possible. This means that usually they are located on the local servers.
Projects that are common for all the sites can be located on the NAPA main server.
User rights for different projects should be handled in the operating system (Windows) not in the NAPA. User rights can be easily handled by
locating projects in different folders and allowing only certain persons or groups to access those.
The recommended ways of opening projects in NAPA are either by PRO command or by PROJECT > OPEN PROJECT FROM FILE… The
OPEN PROJECT dialogue is not recommended if there are a lot of projects registered in the system database because fetching the data from the
global system database may take quite some time due to network latency.
11.4.5. IOF
NAPA intermediate output file (IOF) should be on client computers to reduce all unnecessary network traffic.
There are few tricks to be taken into account when an optimum NAPA global network configuration is opened on the client computers.
NAPA run can be started with a so called batch file, for example “NAPA_20102.bat”, which can be used, instead of, the normal start-up icon on
the desktop. The benefit of using batch files is that the locations of the different files and folders can be specified. The batch file can be something
as follows
set NAPADB102=c:\napa\pr\napadb102.db
REM set NAPALICENSE=N:\napa\pr\napalic.txt
REM set NAPASYSDB=N:\napa\pr\sysdb.db
set NAPAIOF=c:\napa\temp\iof.dat
set NAPATEMP=c:\napa\temp
cd \
N:
cd napa
"N:\napa\bin\20102\napa102.exe"
There are more environmental variables available but now the most important is NAPADBnnn, where ‘nnn’ is the release number, because NAPA
database is now located on a local hard drive. NAPA should be started in the main server’s NAPA folder and the executable run from the
bin/release folder.
A convenient way to activate the DB5 mode is to run an initialization macro when NAPA is started. User specific initialization macros can be
stored in the system database with naming logic INIT*UI.userid. The following kind of initialization macro can be used to activate the DB5 mode.
!OPEN 'K:/NAPA/PR/KSYSDB.DB' 5
!cal db.db5mode(1)
!type
!type DB5 Mode is now activated
!type
!ope lis
The DB5 mode can be activated also so that the batch file runs an external initialization macro which activates the DB5 mode. This can be done
using option ‘i' in the start command. The last row of the above shown would then be, as follows
"N:\napa\bin\20102\napa102.exe" –i db5_start.txt
The text file called DB5_START.TXT is located in the folder where NAPA is started (N:\napa in the above example). The text file could be
something, as follows
!OPEN 'K:/NAPA/PR/KSYSDB.DB' 5
!cal db.db5mode(1)
!type
!type DB5 Mode is now activated
!type
!ope lis
The two first lines should be either empty or commented lines in this case, as they have a specific meaning.
The main reason for possible slowness of NAPA use is in network latency. Most of the descriptions located in different databases are searched
according to the standard search order (DB1 -> DB5 -> DB2 -> DB7) when requested by the system or the user. The global system database
(DB2) is the most critical one because it is located farthest away from the client computers meaning that the latency is probably the highest.
The key to improve the efficiency is to minimize the traffic to DB2. The traffic can be analyzed using DB.STATISTICS functionality in NAPA. The
!CAL DB.STATISTICS(‘ON’)
Table called TAB*DBACCESS is created and it keeps a record of all read or inquiry access to DB2. The table is only in runtime memory. It can be
accessed, for example, using Table Editor and Treat (File > Treat). View > Refresh can be used to show the current situation and running
command SIZE 0 will empty the table.
Table of Contents:
1. Main level
2. Summary of top level commands
3. Starting a session
4. Creating a project
5. Changing/creating a new version
6. Entering a task
7. Starting a batch run
1. Main level
The main level is the part of the system that contains the top command level from which all other functions are accessed.
The main level is entered after starting the system and re-entered after finishing the tasks started from it. The transparent command !END always
leads directly to the main level. This level is characterized by the prompt TASK:
TASK>
Exiting from the main level, i.e. finishing a session is done by the command X.
The key is used for emergency exit in the tty-mode. If the key is pressed twice (between entering NAPA commands), the program will stop
directly. When pressed once, it will only stop some functions such as the listing functions of the Editor, the database scanning functions in the
TOC task, running added data elements, etc. Under the graphical user interface, the break function is handled by control+point or the
INTERRUPT button in the TASK menu.
This command gives access to various functions such as list administrative data for the project,
update installation parameters, enlarge the project data base, table of contents etc.
A napa run is started as a batch process using the given text element as input.
dir>file: special case; run the specified command file instead of a napa run
dir>prog: napa program to use (optional, default is the one defined in installation parameters)
Note, that the batch command requires sufficient priviledges to certain system services. Below
is a brief description of the services on different platforms. See your local system for more
details.
In Windows, batch runs use the schedule service. The service must be installed and running,
its login account must have access to the logical names and other resources required by napa
and the user must have access to the service.
EDIT name
name: (opt) the name of the text to be treated. If no such exists, an empty one in created (same as
ED; GET name or ED; NEW, name). NOTE: the current contents of the work area are erased.
If the name is omitted, the editor will continue with the one last treated, if any.
Under this subtask, formatting and other parameters of quantities can be listed and changed
permamently. Temporary changes of most properties can be done with command !FORM.
A napa run is started as a background process using the given text element as input.
dir>file: special case; run the specified command file instead of a napa run
dir>prog: napa program to use (optional, default is the one defined in installation parameters)
This command starts the output of drawings from the intermediate file or project data base to a
plotter or screen. This way access to editing of drawings is also obtained.
PLOT name
name: (opt) name of drawing to be fetched from the data base. If not given, searching from the
intermediate file is done.
An existing project is made current. (To create new project, you can use mn.newproject()
service function or menu command Project / New project)
PROJECT project/version
PROJECT file
This program handles the reference system. Updating of main dimensions, changing of
ship-related parameters and frame system handling is done here.
The run is restarted from the place where the user's initials are inquired. The command must
be entered unabbrieved.
This command starts the list scanner, by which lists in the list file can be studied or sent to the
printer.
This program contains various functions for handling database files such as table of contents,
copying, mending and handling of individual descriptions.
By this command, the a new version is made current. If such a version does not exist, it is
created.
PERM: (opt) specifies that the version given will be the permanent current version, i.e. the one
assumed when starting the monitor.
VERSION LIST
List versions in the current project. In the 'stat' column, P=private, R=read-only, RN=read
only/nonowner.
X leaving NAPA
This command finishes the current session and returns control to the operating system.
3. Starting a session
A new session is started each time the NAPA program is started. This takes place either automatically as a part of the login process or by
entering the name of the NAPA exe file, for example.
When giving a file name for the project, it is supposed to be the main project database, and the name must have the .db suffix.
Normally, a dialog is displayed where the name of the user, the password and optionally a user profile can be entered.
YOUR INITIALS>
The answer to this defines the current user. The user must be registered in the installation parameters, where the rights associated with the user
are recorded. If these rights are enforced by a password, the password will be inquired for. If the password given is incorrect, four opportunities
will be given to repeat it, after which access to the system is denied. A name is assigned to the session and displayed. This name can be used as
a search criterion when looking for lists or plots created during the session.
If a text named INIT*SYSTEM exists in the system database, it runs as if the command !ADD *INIT*SYSTEM had been done. Then it is tested
whether a text named INIT*user is stored in the system database, and if such a text is found, it is run the same way.
Under the graphical user interface mode (default since Release 97.1), the INIT*UI.SYSTEM macro is run instead of INIT*SYSTEM and
INIT*UI.user instead of INIT*USER. The user and passwords are entered into a dialog displayed.
The macros listed above allow the installation or the user to display messages or do initial operations, such as assignment of a different printer or
assignments of abbreviations or other variables.
Next, the program will ask for the project and optionally, the version:
PROJECT>
The answer defines the current project. If the project given does not exist, a new one is created after verifying that the answer was not a mistake.
Unless otherwise specified, the permanent current version is selected as current version for the run. A different version can be given separated by
a slash:
PROJECT>project/version
A new version cannot be created while entering the project - a separate VERSION command is needed.
The description of the selected project (and version) is displayed. If only auxiliary functions such as output handling are to be used, the project
need not be given (empty answer).
After this, the main level is entered, and any NAPA task can be selected.
The project can be given in the INIT* macro. As an example, the following commands start the project P1234, unless a different one is given as
answer to the inquiry at line 110:
100 &PROJ='P1234'
110 &PROJ=....
120 &PROJ
(The first non-transparent answer will be the answer to the PROJECT inquiry).
The project can be changed without starting a new session using the command PROJECT.
It may happen that the program gets stuck into an abnormal state. The command RESET at task level is usually the fastest way to resume normal
function. A session is then initiated beginning from inquiring the user. (This is the NAPA equivalent to power OFF/ON on a hardware device).
4. Creating a project
When the name of an unknown project is entered at the start of a session or as parameter to the PROJECT command, a project is created unless
declared to be a typing error. The following presentation concerns the case that the graphical user interface is not active; otherwise, the same
information is entered into the fields of the dialog presented.
It is first verified that the name given is not the result of a typing error:
If the answer to this is E (error), the project will be asked again; if the answer is O (OMIT), the project will be undefined. If the answer is C
(CREATE), a new project with the given name is created. The following questions will then be asked:
The answer to this is at most one line of text, which will be displayed each time the project is accessed. The text is accepted literally, i.e. no
apostrophes are needed.
The answer to this defines the initial values for the reference length and breadth and for the design draught. If these are not known exactly,
approximate values can be given and adjusted later (task REF). By defining these dimensions here, it is assured that the dimensions are never
undefined.
The status of a new project will be public. If one wants it to be private or controlled, the command STATUS under ADM must be used.
The user who created the project will be registered as its owner. The owner can be changed under UPD/ADM.
The files of the new project are created in the directory specified by the installation parameter PRDIR. This parameter can be overridden by the
environmental parameter NAPAPR.
If a project is not registered, but files are available that satisfy the name rule, the project is registered automatically. The file have to be in the
directory specified as above and name <project>.db. Note: a project file never used with the Release 98.1 or later may not contain the information
needed for this. The auxiliary file (<project>.sd) may be missing.
If the given version already exists, it is simply made current. If it does not exist, it is first verified that the version given was not a typing error, and
if not, a new version is created and made current. Creating a new version means that it is registered in project administration and a reference
system is created. The information requested is the same as asked when a new project is created, except for the opportunity to copy the
reference system from another version (see chapter Reference system (REF)).
The optional parameter PERM makes the given version the permanent current version, i.e. the one automatically selected when accessing the
project.
The new version will have status=public. The status can be changed to private under subtask UPD/ADM. The user who created the version will be
registered as its owner. Versions created by doing a transformation will have no owner. The owner can be changed/assigned under task UPD.
6. Entering a task
Some of the commands on the main level start functions that are a part of the monitor (internal task), entered without special preparations. The
applications are installed as so-called external tasks. When entering an external task, a text telling the task name and a short description is
displayed, for example
Between two external tasks, some tidying up is done: data left in the free storage is deleted, lists and drawings are closed, etc.
When entering an external task it is checked whether a text named TINIT*task is present in project database or in the system database, and if this
is the case, the text is run as a macro. This way, either project-specific or installation-specific initial operations can be done automatically. With the
calculator variable PROFM, the professional status of the user can be inquired, and used for decisions regarding advice or similar. Running this
macro can be prevented by adding option - (minus sign) to the TASK command, for example
TASK>LD -
When generating a batch run, the monitor automatically provides the answers to the questions posed at initiation of a session, giving the current
user, project and version. The first command in the macro will therefore be run at the place the TASK prompt is presented.
Note: the version will be the current version of the session from which it is started, not necessarily the permanent current version.
A batch run can also be started from within the Editor, using the current work area as task sequence.
The progress of a long batch run can be followed by reading the log under task SCAN. Lists belonging to batch runs can be distinguished on the
basis of the run name, which begins with B instead of the usual R.
This chapter describes the functions related to the administration of projects. The special functions provided for this purpose are installed task
ADM of the main command level. Some of the commands listed below lead to own command environments described separately.
Handling of installation parameters, which is also accessed under ADM, is described in the chapter 'System maintenance functions'.
The functions related to access control are described in this chapter. The corresponding definition functions belong partly to the installation
parameters (subtask INST) and partly to project administration as presented here.
Table of Contents:
1. Overview of functions
1.1. Listing
1.2. Deleting and releasing projects
1.3. Changing name and location of files
1.4. Updating or listing information in the administration
1.5. Setting a message
1.6. Removing obsolete data
1.7. Maintaining a register of current runs
1.8. Access control
2. Commands LIST and INFO
3. Updating/listing of project administrative data (UPD)
3.1. Changing name and location of files
4. Tidying the project database (TIDY)
5. Maintaining a register of current runs
6. Access control
6.1. Functions needing administrator privileges
6.2. Functions needing full professional status
6.3. Owner of a project
6.4. Owner of a version
6.5. Handling passwords
6.6. Read-only versions
6.7. Protected database
6.8. Protecting output in the intermediate file
6.9. Access control with standard operating system functions
7. Command specifications
7.1. Commands under ADM
7.2. Updating project data (subtask UPD)
7.3. Tidying the project database (subtask TIDY)
1. Overview of functions
1.1. Listing
With the LIST command, information about versions in the project or projects in the database is obtained. In order to list information about
projects, the SELECT command must first be used, for selecting the set of interesting projects.
LIST U lists data about project usage, telling among other things, what projects have been idle for some time.
The INFO command allows larger sets of data to be selected and listed for sets of projects and optionally for their versions. The primary result is a
table, containing data collected from the project administration and the reference systems. The table calculation task is entered and a standard
listing is made from the table. Other listings can be made by using the standard table functions.
With the terms= DELETE, project/>DELETE command, the current project or the projects selected with SELECT are deleted. Deleting means that
both the files and the administrative information in the system database are deleted.
Alternatively, the command RELEASE can be used, deleting only the files. This alternative is intended for use when a back copy has been made
and the project is temporarily taken out of use.
If the project status is 'controlled', these operations are allowed for the owner of the project only.
Under subtask UPD, commands RENAME and MOVE are available for changing the name of the project and to move the files to another directory.
The subtask UPD allows the administrative information stored in the system database to be listed or changed.
With the MESSAGE command, a message can be stored, that is displayed when the project is entered. This function is considered obsolete, being
replaced by the PINIT*project macro.
Under the subtask TIDY, versions no longer needed can be deleted from the project database.
There is the option to keep a register of current runs. Among other things, it makes it possible to see whether someone else is running the current
project.
There are various ways by which access to projects and to various functions can be restricted.
Without parameters, the LIST command gives the output represented by the following sample:
P: private
C: controlled
R: read only
I: inactive
With option V, the list is given for all versions separately. The option U (usage) is intended for the system manager to see what projects are
actively used:
'Last access' is the date when the project was last selected for the current project of run and 'nr' is the total count of such accesses. This
information can also be obtained for versions separately.
Project filename
D-STAR /n/pr/ship/d-star.db
NAPASHIP /n/pr/ship/napaship.db
TEST /n/pr/ship/test.db
The INFO command gives more comprehensive information about the selected projects. It is done in two steps: first the information for the
relevant set of projects and versions is collected into a table and then table calculation is entered. All items from the project administration are
collected, in addition all reference system parameters. This requires opening the project database, and if this cannot be done for some reason
(e.g. project private), it is omitted. A default selection of columns is made automatically. The total set of columns can be seen with the command D
ES.
The following output sample is made with a slightly restricted default set:
Under subtask UPDATE/ADM, this information can be listed and changed. The following example of output from LIST illustrates that main items
treated:
PROJECT: D-MOON
VERSION: RE
SHIPNAME: 'Napamoon'
DESCR.: 'm/s NAPA MOON, passenger ship for demonstrations'
USER: EK
DATE: 7.10.1994
STATUS PUBLIC
FILENAME: '/n/pr/ship/d-moon.db'
When updating project data, it must be remembered that this function only replaces data in the system database and does not imply any changes
in the properties described. For example, this facility allows changing the name of the project database file, if some operation done outside NAPA
should have resulted in a file named differently than stored in the system database, but the renaming command does not itself change the file
name. However, see commands RENAME and MOVE, presented below.
Note also the command LIST that is available directly under ADM.
The listing commands produce data in the same form as accepted for input.
If the project status is 'private' or 'controlled', entering this task is allowed for the owner of the project only.
The name of the project can be changed with the command RENAME. The effect of this command is to rename the administration description
stored in the system database and the project files. The project files are renamed so that they are kept in the current directory and obeying the
name rule <project>.db and <project>.sd. The file operations are made by sending the corresponding operating system commands. Since the
success of these command will not be available for Napa, permission to continue is asked. This permission must not be granted if the messages
obtained indicate a failure, in other cases it must be granted. Caution: operating system messages may not reach the NAPA command window.
The command MOVE transfers the files to another directory. It is implemented in a similar way as RENAME, including the verification.
There are two possibilities for doing the operation. By default, it is done so that descriptions are reordered within the current files. Alternatively, an
auxiliary file can be used as follows: first, the subset to be saved is transferred to the auxiliary file. A list of transferred descriptions is displayed.
After this, permission to continue with the second step is asked for, so that after the first step, one still has the opportunity to cancel the operation.
In the second step, the transferred set is copied back into the original file, replacing the previous contents.
The first method has the advantage that the risk for running out of disk space is eliminated. However, should the operation be interrupted for
some reason, the file is left in a disordered state, making it even more advisable to have a valid back-up.
The single-file TIDY operation is also available under TOC, but then there is no connection to the project administration. The RSC command under
TOC can be used for badly damaged files. It collects anything that can be identified into a valid database file.
The TIDY function should preferably be used when a thorough cleaning is to be done, i.e. the amount of data remaining is much smaller than
initially. Deleting smaller amounts of data can be done under task TOC.
The normal way of doing the cleaning is by removing versions, but other criteria can also be given. Versions are removed with commands RVER (r
emove versions) or SVER (save versions). In contrast to the general selection criterion (SELECT), the project administration will be updated with
these commands, i.e. the list of versions is updated.
By default, the main project database is the object of the tidying operation. With the command FILE, the operation can be done to the auxiliary
database or the protected database.
In order to help decisions regarding versions to be removed, the command LIST V; gives a list of versions and statistics about their usage.
The actual operation is started with the command START, the other commands only define options. The current options are displayed when giving
the RVER or SVER command or when separately asking with the command ARGS.
In VAX, an alternative method is available, taking advantage of the version mechanism of VMS. Instead of copying the saved data into a
temporary file, from which the data are copied back to the original file, the database contents are copied to a file with the same name but higher
version number, without copying back. This file will automatically be taken into use when the project is started next time, or a RESET is done in
the current run. The old file must be deleted under VMS (DELETE or PURGE). The main advantage with the new method is that the new file
contains no unused records (the same effect as obtained by truncation in other machines). By deleting the new file instead of the old one, the
TIDY can be cancelled. The new method is selected with the command NM.
When the register is activated, information about currently active runs is obtained with command !LR (list runs). The following example shows the
output of this command:
The column 'Idle' gives the time in minutes since the run last reported to the run register. The reason for failure to report may be that the run has
terminated abnormally and therefore not been removed from the register.
6. Access control
This section describes the functions by which access to various functions can be controlled. These functions are intended to help preventing
unintentional destruction of data and maintaining a clear division of responsibilities, rather than preventing deliberate misuse of data. The
possibility to prevent modification of data by freezing a version is also treated here.
For this purpose, the following categories of user rights are recorded:
system-administrator
The system administrator handles functions concerning the installation as a whole, such as installation parameters, general data, etc.
'full professional' user
This status means that the user knows the system well enough to be allowed to do certain functions which are not considered belonging
to normal use, and with possible risk for undesired effects. (The old distinction between ordinary professional users and non-professional
ones has presently lost significance).
owner of a project
This status is relevant for projects with status 'private' or 'controlled', where all or some functions are reserved for the owner.
owner of a version
This status is relevant for versions with status 'private' or 'read-only-nonowner'.
The two first aspects are handled by the user register contained in the installation parameters, while the latter ones are handled as part of the
project administration. A user not registered is denied access to the system, unless the formal user 'any' (note the lower case) is registered.
The privileges can be supported by user-specific passwords, which must be given when a run is started.
If there is no system administrator registered, this requirement is replaced by full professional status.
The system administrator also has the rights of the owners of projects and versions.
The general idea behind the so-called full professional status is that a person with this status can be allowed to do certain tasks that are not
needed in ordinary work or require more than basic knowledge of how the system works.
To these tasks belong all writing to the system database except personal INIT*s. The transparent commands !OPEN (of database), !VER and !IO
C, commands PREP, DELETE and LOAD under TOC need full professional status.
An own group is formed by those functions that support system development (commands CMP, MDA, LOAD, RLD, MDA, MDR, MDL, -TD under the
editor, transparent commands !DML, !MAP).
The person who creates a project is registered as its owner. Under subtask UPD, the owner can be changed.
If a project's status is 'private', only the owner (and system administrator) has access to it by selecting it as the current project.
The status 'controlled' is an intermediate status between private and public: non-owners can access the project, but the following functions are
reserved for the owner:
doing TIDY
deleting the project
changing the status
using task UPDATE
writing PINITs
using the command PREP under TOC
The following functions are also allowed for the owner of the version concerned:
A version can have status 'private' with similar meaning as in the case of the project.
Ownership of a version can replace ownership of the project in the cases indicated above.
When changing version (the command VER), the command is rejected if the version is private for another user. When entering a project, the
operation is not cancelled if the given or implicit version is private for another user, instead the version is changed to A without further checks. It is
therefore recommended that in a non-private project, version A should be public.
For more rigorous access control, passwords can be assigned to users. The passwords are given when a run is started.
If passwords are used, these are recorded in connection with the user register. The passwords as such are not stored, and cannot therefore be
listed. Instead, passwords are checked against the result of a check algorithm.
Whether a user has a password or not is decided by the system administrator under task INST. A user can change or set his own password by
using the command PSW under subtask ADM.
The contents of a version can be fixed by defining the version as read-only. The read-only status does not imply any restriction on what task can
be used, but any functions that result in a write attempt will cause an error (not classified as system error).
The read-only status is applied to the main project database and the protected database only.
As an intermediate form, there the state read-only-nonowner, meaning that the read-only status does not concern the owner of the version.
When entering a read-only version, a message informing about this is given. The command !WHERE will also do it.
The read-only status is not checked when a file is accessed without using the project administration. Therefore, opening a file elsewhere than in
temp requires system administrator's privileges when done by directly giving the file name (the command !OPEN).
The so-called protected database has been introduced for storing more sensitive data than normally. Primarily, it is only an alternative file and any
access restrictions are supposed to be placed outside Napa, using the facilities provided by the operating system.
The protected database is presently used in weight calculations only, if so specified. The file is normally not opened except when entering weight
calculation.
Lists and plots stored in the intermediate file can be protected from access by others than their owner and the system administrator. This is done
by setting the private list mode using the command !PRL. The default for this mode is OFF except for private projects where it is ON. Automatic
setting of the private list mode can be obtained by using PINITs, VINITs or TINITS.
All lists and plots started when the private list mode is on will have the protection.
A single list can be protected by using option P in the NL (new list) command.
Access to project files can also be controlled by using normal read/write control possibilities of the operating system. If a user has only read
access to a project file, he can open it but attempts to write are handled as for read only versions.
7. Command specifications
The current project or the project(s) selected by command SELECT are deleted, i.e. the files
are deleted and the data about the project removed from the system data base. A permission
to delete is requested separately for each project.
DELETE !
!: (opt) force deleting even if there are file errors. This option is mainly intended for the case that
the file did not exist. NOTE: If a new project is later created with the same name, it is the user's
responsibility to avoid confusion with any data belonging to the previous project. RELEASE
should be used if the project is intended to be restored later.
This command is intended for the case that a project has been copied to a new environment
with a different system data base, where it is not known. This command creates a project using
the project data stored in the file. The information needed is not maintained by releases older
than 98.1. Note: does not imply SELECT.
ENTER 'filename' !
filename: name of file in the form recognized by the file system. Alternatively, it can be given as dir>file.
The file name must end with .db and the preceding part provides the project name.
!: (opt) needed if the project already exists in the system data base. In this case one can also use
command UPDATE SYSDB i in subtask UPD/ADM.
EXAMPLE
ENTER '/napa/projects/p1234.db'
Creates a project named P1234, the main data base of which is in file given. The auxiliary data
base (/napa/projects/p1234.sd in the example) is used if existing, else a new one created the
starting the project.
This command generates a table containing information about the selected projects (see
command SELECT). In addition to parameters from the project administration, information from
the reference systems can be added. The information is formed into a table, that can be listed
with the standard commands of table calculation. The columns are named as the reference
system parameters, in addition, there are NAME, VERS, OWNER, DES, STAT, LUSED (date
of last use), NACC (number of accesses) and CREATE (date of creation), DES (project
description), SHTYPE (ship type), FILE (path name) DIR (directory), EXISTS (0/1 depending
on whether the files exist). The table calculation task is entered automatically.
INFO R V I
R: (opt) add information from the reference system, default=only from the project administration.
Single R=only reference dimensions, RR=add group 'identification and background', RRR=add
group 'various', RRRR=all parameters.
V: (opt) add information separately for all versions, otherwise default version only. With this
option, OWNER, DES, STAT, LUSE, NACC and CREATE concern the versions, else the
project.
The data described below are listed for the current project or, if the SELECT command has
been used, for the projects selected. LIST RUNS lists data for current runs.
LIST, sel, V
omitted: name,date of creation, user, status description. The status is designated by P=private,
R=read-only, C=controlled, I=inactive.
This command lists data for currently active runs. The user register must be activated because
of restricted license or option RREG ON; in the installation parameters.
In the output, ** marks the current run, !!=the entry of the current run taken over by another
one.
The message assigned by this function will be displayed each time the project is opened. This
function is considered obsolete. The contents of the message is inquired one line at a time. An
empty line ends the message.
This command allows the user to change his password, provided that one is already in use.
The command must be entered from the terminal - not from a macro. Before accepting, the
new password must be re-entered as a check against mistakes.
This is the same function as REF on the task level. NOTE: concerns the current project and
version regardless of SELECT.
The current project is registered in the system data base. This function is intended fo the case
that the project has been started by giving a file name and the project has not been identified in
the system data base. It can also be used just for updating the information recorded in the
system data base.
REGISTER name F
name: (opt) name of the project, default=current name (shown within parentheses if not identified in
the sysdb).
F: (opt) force registration even if a project with the given name already exists. The effect is then
only to copy information from the project to the system data base.
The function is in all respects equal to DELETE, but the project remains registered in the
system data base and can thus be restored for example from a backup copy if one exists.
This command selects one or several projects given by name or by a selection criterion. The
project(s) selected will be the target of the functions LIST, UPDATE, DELETE, SYNC and
INFO. UPDATE requires that a single project is selected.
SELECT p1 p2 ... NL
NL: (opt) do not list, default=list data for the selected set
SELECT filename
Select the project given by the name of the file containing it. A file is distinguished from a
project name by the suffix .db.
SELECT ALL NL
crit: selection criterion. The selection criterion obeys the the general syntax (!expl SEL/GEN) and
uses the following quantities:
NAME: name of project. Note: before rel 2007, NAME=name was applied as NAME>name.
NOTE: if the first subcriterion concerns NAME, it is applied separately (candidates not
satisfying the name criterion eliminated first).
LA: date of last access (last time the project was used as the current project
FILE: name of the project file (as registered in the project administration)
SHTYPE: ship type as registered in the project administration (new item since 2007.1)
EXISTS: value=0, 1 or -1 depending on whether the file recorded in the project administration
exists or not (0=missing, 1=exists, -1=unknown)
ACC: accuracy: select according to the accuracy registered in the project administration,
alternatives P32, P64 or empty. Empty=projects where this item is missing, in practice same as
P32.
Only those projects are selected, that satisfy all criteria simultaneously. Dates are given in the
form YYMMDD.
As above, but the candidates are fetched form a given directory instead of using the project
administration in the system data base. Possible candidates are files with the suffix .db and
containing the project general data (description PROJECT).
EXAMPLES
SELECT P1234
Select all projects created by NN, the name of which begins with P.
SELECT EXIST=0
Select all projects registered in the system data base, the files of which do not exist.
Select all project in the directoy 'temp' that have not been used since January 1. 2006.
For all selected projects, the project administration data in the system data base is updated by
copying from those in the project file. The file names are not changed. The function cannot be
used if the selection of projects is not from the system data base (DIR option must not be used
in the SELECT command) This operation is normally not needed, as the synchronization is
done each time the project is accessed the normal way by giving the name of the project.
In this subtask, obsolete versions or data selected otherwise can be removed from the data
base. In contrast to deleting under TOC, the project administration is updated and the file is
reorganized to avoid fragmentation. In case there are corrupted descriptions in the database,
tidy will remove them. Backing up the database before the operation is recommended.
This command is intended for removing the license registration of a run that has crashed. If the
current run has no license at the call, the released license is taken over.
user: (opt) user running. May be omitted if this is the current user. A different user requires
administrators rights.
The function has subcommands, available after the command UPDATE is entered. The project
concerned is either the current one or the one selected by the SELECT command. In the latter
case, there must be only one project selected.
This command allows the description of a version in the CURRENT project to be changed
without entering task UPD. The purpose of this command is to make this operation possible for
a user without the privileges to use the UPD subtask.
This sets the item telling the accuracy of the data base. It only concerns the information
registered in the project administration and does NOT affect the file.
ACC alt
The list of versions is updated according to the existence of reference systems. This command
is available for the current project only (as selected by PROJECT command). If a reference
system is found (description COM*DATA) for a version that is not in the list, it is added and if
there is none corresponding to registered one, the version is removed from the list.
This refers to the file containing the main project data base, expressed in the format used by
the operating system. The name must end with suffix .db.
V: list of versions
This command moves the project files to another directory and updates the project
administration record accordingly. The files are moved by running the command of the
operating system. Permission to continue is then asked for, which should NOT be granted, if
the messages from the copying operation indicate a failure. The secondary data base is moved
in a separate operation.
MOVE directory
OK normal finish
If changes have been made, the data in the system data base are replaced.
This command renames the project by renaming the corresponding administration description
(PROJECT*project) in the system data base and renaming the files accordingly. The files are
renamed by running the command of the operating system. Permission to continue is then
asked for, which should NOT be granted, if the messages from the renaming operation indicate
a failure, otherwise it SHOULD be granted. The secondary system data base is renamed in a
separate operation.
RENAME name
Used as default for the reference system parameter SNAM when a new version is created.
This item has been added to be used as selection criterion when selecting projects (command
SELECT/ADM or the function MN.SELECT). It has presently no connection with the
parameters in the reference system.
SHTYPE type
If any changes have been made, they are ignored. NOTE: the RENAME and MOVE are carried
out directly and the SKIP command does not cancel these operations.
This command defines the project status. The current status is given by command LIST.
NOTE!: changes between INACTIVE/active status only change the record - not the actual
availability of project files.
STATUS stat
CONTROLLED: may be used without access restrictions, but certain functions are reserved for
the owner.
UPDATE copy from the system data base to the project data base
The copy of the project administration stored in the project data base is replaced by the one in
the system data base. This operation is provided for special cases only, for example if the
project administration recorded in the project data base has been corrupted. Normally, the
project data base is the primary source and the information in the system data base is just a
copy.
UPDATE PROJDB
V, id, descr
DELETE: version is deleted from the list. NOTE: this does not imply deleting from the data
base.
This command sets the permanent version, i.e. the one selected when starting a project.
VER version
This command changes the owner, access status and read-only status of a version. Command
LIST VS gives this information for all versions in the form of VSTAT commands.
ro: (opt) either empty, READ-ONLY or READ-ONLY-NONOWNER. The last alternative means that
only the owner has write access to the version. Note: read-only status does not concern the
auxiliary data base.
This command lists the parameters defining the current operation. The same list is obtained
after using SVER, RVER or SELECT, with opportunity to cancel the operation.
FILE file
AUX=auxiliary project file (the one containing calculation sections and other data that can be
recalculated).
BOTH: both files (default). If the main file is also included, the auxiliary file is cleaned without listing or
asking.
This command can be used for suppressing the list of descriptions made in the first phase or
for doing a list of versions.
LIST ON/OFF
LIST V
List the versions in the current project, including data about usage.
LIST R
List the users of the current project (same as !LR P). The user register must be activated
because of restricted license or option RREG ON; in the installation parameters.
The standard method (STD) is to do the operation by moving data inside the given file. The
alternative method (AUX) does the operation in two phases:
First, the data to be SAVED are moved to a temporary file. Then, the temporary file is copied
back into the project file. Between these phases, a permission to continue is requested. The
data copied in the first phase are listed.
METHOD id
If the file to be tidied has a different binary format than used by the current machine (a UNIX
file transferred to Windows or vice versa) only method STD is supported and the tidied file will
have the native format.
This command removes given versions. The versions removed will be deleted from the list of
versions maintained in the project administration. NOTE! It is recommended to make a backup
of the project file before removing versions.
RVER v1,v2...
This command allows the data to be saved (=not deleted) to be selected by using the general
selection criterion.
SELECT selection
This command is otherwise equivalent with RVER, except that the versions to be SAVED are
listed.
SVER v1,v2...
Handling of input
This chapter deals with the command interface in contrast to input handled with the graphical user interface (GUI). The command interface is
used in macros and when controlling the system by commands from the command window.
Table of Contents:
1. General
2. Summary
3. Commands
3.1. Command identifier
3.2. Items
3.3. Delimiters
3.4. Backslash
4. Listing previous commands
5. Run log
6. Common commands and formats
6.1. Generally used commands
6.2. Generally used syntaxes
7. Macros
8. Commands related to input and running macros
8.1. Starting a macro (command !ADD)
8.2. Other ways of running macros
8.3. Immediate mode
8.4. Standard list and plot macros
8.5. Repeating commands with !DO
8.6. Controlling the data echo
9. Graphic input
9.1. Input from digitizer or screen
9.2. Input from the screen
10. Data echo and log
11. Block mode
12. Various functions
12.1. Transparent commands
12.2. Using frames or reference coordinates of objects
12.3. Running a macro in step mode
12.4. Accessing previous commands
13. Variable replacement and programming
13.1. Variable replacement
13.2. Programming and NAPA BASIC
13.3. Service functions
14. General check function
14.1. Main data type
14.2. Specification of allowed values
14.3. Acceptance test by macro
14.4. Optional items
14.5. Adding service functions to the criterion
14.6. Variable replacement in the check criterion
14.7. Access to the check function
15. Command specifications
1. General
This paragraph describes the main principles for handling input from the user, either from the keyboard of the terminal, from the graphic screen or
from a tablet.
Commands can also be stored in advance as a text (for example, data element, macro), from which they can be run instead of typing at the
terminal. The macros can have variable components and commands for creating loops and decisions.
To an increasing extent, the end user does not see the functions as presented here, only as they appear in the graphic user interface.
Regardless of its original source, all input is converted to a set of alphanumeric characters. Input in this form will therefore be described first.
2. Summary
The principles concerning input are treated in more detail in the Monitor Manual; the most important input conventions are listed here.
Commands !COM and !EXPL <command> provide run time help. The command !END always leads out of the task to the top command level.
3. Commands
Data is entered in NAPA as commands. Each command forms a set of logically connected data, treated as a whole.
In most cases, a command is an instruction to the system to do something. The first item in the record is then treated as the command identifier.
The identifier defines the purpose and hence the interpretation of the record.
The command identifiers are selected so that the first three characters are unique in their own context. The identifiers can therefore be
abbreviated to three characters. More abbreviation is allowed if uniqueness is preserved.
At any given place in the system, there is a given set of commands available, which is different in different places. An exception is formed by the
so-called transparent commands, which are available everywhere, for example, the command !COMMANDS by which a list of the currently valid
commands is obtained.
Input is not considered a command, and consequently it does not contain a command identifier when entered as an answer to a specific question,
e.g.:
The parameters of a command are formed by items that can be numbers or strings, separated by delimiters. The items and delimiters can form
structures, by which different relations can be expressed, for example
The syntaxes are designed to be a good compromise between compactness and readability. The formal properties allow for various input errors
to be detected and make it possible to have standard functions for interpreting the input. This subject is presented in more detail in the Monitor
Manual.
As the graphical user interface develops, the importance of commands for direct input gets smaller, but it will still be essential for the writing of
macros.
In most cases, a command is an instruction to the system to do something. The first item in the record is then treated as the command identifier.
The identifier defines the purpose and hence the interpretation of the record.
The command identifiers are selected so that the first three characters are unique in their own context. The identifiers can therefore be
abbreviated to three characters. More abbreviation is allowed if uniqueness is preserved, however, in macros this is not recommended because
new commands may be added later.
At any given place in the system, there is a given set of commands available, which is different in different places. An exception is formed by the
so-called transparent commands, which are handled independently of the current application. The identifier of these commands begin with !. An
example is the command !COMMANDS, by which a list of the currently valid commands is obtained.
The input is not considered a command, and consequently not containing a command identifier when entered as answer to a specific question,
e.g.:
3.2. Items
A number is anything that according to normal conventions can be interpreted as such. The decimal point is optional in numbers.
Other non-empty items are treated as strings. Note that a number will not be accepted as a string. Unless otherwise specified, lower case letters
in a string are converted to uppercase. A string can always be enclosed within apostrophes, having the effect that the item will be taken literally. A
postrophes are necessary if:
'12.5'
'Jones'
Two delimiters such as ,, or () with no item between are treated as delimiting a special item, the empty item.
3.3. Delimiters
The basic delimiter is formed by the spaceor the comma. These are otherwise interchangeable, except that additional spaces are ignored while
commas are always taken into account. The following alternatives are therefore equivalent:
AA BB CC
AA,BB CC
AA BB, CC
/ (slash)
( (left parenthesis)
) (right parenthesis)
= (equal sign)
The items combined by these characters form so-called structures. The left and right parentheses must always occur pairwise.
The following characters have special meaning when occurring as so-called prefixes i.e. written immediately before an item:
-,+,*,<,>,#
The prefixes may influence on the interpretation of the item, but are not considered part of it. Plus and minus in front of numbers have their usual
meaning. (A single prefix, e.g. *, is interpreted as a prefixed empty item).
allow design of flexible commands, where the information can be entered in various ways while still having general system functions for
handling the interpretation
allow data to be entered in a compact but readable way
give possibility to detect input data errors
The usage of various delimiters is described in the specification of the corresponding commands, but some general principles are presented
below.
The error message 11, 'formal error in the input', means that the command entered does not form a valid structure according to the general
principles. The error message 12, 'syntax error', means that structure does not conform to the rules of the specific command.
3.4. Backslash
The backslash (\) has two special functions: inputting special characters and creating continuation lines.
Inside apostrophes, the effect of the backslash is to create a nonprinting character or to accept the following character without interpretation, while
the backslash itself is dropped. In addition, there is the special case \@, which prevents the @ from being interpreted as the variable flag. The
effect is the same as a temporary !VAR OFF.
Example:
giving
This feature can be disabled with !VAR BSL OFF. It should only be done so temporarily, as many functions of the graphic user interface are
dependent on this role of the backslash.
Creating continuation lines with the backslash is needed only in NAPA BASIC commands.
Adding an asterisk runs the commands selected. The selection of commands works as above, except that if the command is selected by the start
characters, only the last occurrence is used. Examples:
Commands run by a macro are not registered in the list used by !L, only the !ADD command. The !L command is not registered. The number of
commands remembered can be set with !L (n), default=500.
GET !L
If the preceding operations have done something that may be useful in the future, this way one can save the relevant commands as macro.
Macro recording can also be done by starting it in advance with !MACRO. The macro is then stored automatically when entering !MACRO END.
5. Run log
Output supporting running the system rather than forming part of the result is made to the log, output as listclass 4. Commands entered are also
written to the log, so that commands, error messages and other output appear in chronological order. In the log, commands are flagged with the
characters > and can be output separately by using option M in the PRINT and SEND commands. With the command MACRO, the commands
can be collected into a macro.
A separate log is made for each task entry, and at task level, no log is written.
These command relate to creating and modifying objects such as texts, drawings, tables, loading conditions, arrangements etc, where definitions
are made, that primarily concern an object in the run time memory.
<name of quantity> value of other quantity controlling the calculation (e.g. CGX, cgx).
Transfer of control
OK, END exit from the current subtask to the next upper level
Various commands
!ZOOM zooming
The syntax characters (,),/,=,<,> are used for delimiting items in a command and at the same time provide some indication of their mutual
relations. The interpretation depends on the context, but the following syntaxes are commonly used:
Parentheses ()
SELECT VER=(A,B,C)
Special cases:
The form id(....) is used for array indices or parameter lists for functions or macros. Note the special cases
Slash /
name/version/project or name/version/DBn:
Object in the database with optional version and project/db-unit.
name/axis=q: point on curve given by coordinate.
Equal sign =
Delimits the symbol for a quantity or option and its values, e.g. TOL=0.01
Express inequalities. '>' is also used as delimiter between directory and file name.
Prefixes
* (asterisk):
symbolizes fraction (e.g. LOAD HFO *0.5, SCALE *0.5)
'multiplies' the effect in some sense, e.g. DES *HULL -> repeat for all parts individually.
+ and -: symbolize increments with respect to initial values (e.g. LOAD HFO +50).
# in front of numbers: specifies x-coordinate by frame number (#n or #n+d). In front of a name, it stands for the reference coordinate.
< and > designate inside and outside in certain geometric definitions
@: (at sign) means that the following component shall be interpreted as an expression or programming statement.
For the running of macros, there is the universally available command !ADD. The effect of the !ADD command is the same as if the same text had
been from the terminal. With the option S, the macro is run in the step mode, as presented below.
As an alternative to using the project database, both the editor and the !ADD command can use normal text files or the system database.
Comments can be written in macros in the form of commands with the command identifier ** or !*. The normal rule for terminating commands is
valid. Comments can also be given preceded by @@, having the effect that whatever follows on the same line will be ignored.
The power of the macro facility is greatly increased by using programming, as presented below.
A special way of creating a macro is provided by command *MACRO. While the MACRO command is in effect, all commands entered are stored
in the given receiver, which can the be modified in the editor (if needed) and reused. The same effect can be obtained by the (later added)
command GET !L of the editor.
7. Macros
Commands likely to be needed repeatedly can be stored as macros. A macro is simply a stored text, which can be used as input instead of
directly entering the text with the keyboard. Macros are created with the aid of the Text Editor. The Editor does not make any kind of interpretation
of the texts handled by it. Macros are normally stored in the project database, within the currently active version.
For the running of macros, there is the command !ADD <macroname>. The effect of the command is the same as if the same text had been
typed at the terminal. With the option S, the macro is run in the step mode, as presented below.
As an alternative to using the project database, both the Editor and the !ADD command can use normal text files or the system database.
Comments can be written in macros in the form of commands with the command identifier ** or !*. The normal rule for terminating commands is
valid. Comments can also be given preceded by @@, having the effect that whatever follows on the same line will be ignored.
The power of the macro facility is greatly increased by using programming, as presented below.
A macro, i.e. a set of stored NAPA commands is run with the command !ADD:
!ADD macro
The effect is to run the commands stored in the macro as if entered from the keyboard.
Without special instructions, the macro is fetched from the standard sources, i.e. from the current version of the current project in the first place. If
not found, the version COMMON, the system database and the NAPA database are tested in this order. The location can be specified explicitly in
one of the following ways:
For testing a macro, it may be useful to run it in step mode. In step mode, each line is displayed before executing, and one has the opportunity to
check values of variables and expressions and to interrupt the execution. Step mode is set with option S:
A double S (i.e. SS) is stronger: then the step mode will be applied in called macros also (i.e. macros run by !ADD commands in the given one).
Note that there is the possibility to give
@ONERR STEPMODE
in the macro. Then step mode is entered automatically if an error is raised. It is sometimes useful to force step mode at a specific place by adding
temporarily
ENTER STEPMODE
After interrupting a macro run in step mode (answer Q), execution of it can be resumed by
!ADD *
The functions available in step mode are presented in more detail in connection with NAPA BASIC.
A macro can have parameters, i.e. they are controlled by values given in the call. The parameters are given in parentheses directly after the
macro name or after the syntax forming the macro name.
!ADD macro(parameters)
for example
!ADD PLOT('HULL','RED')
!ADD TEMP>DIST(0,0,10,5)
The parameters of a macro are treated the same way as parameters to a calculator function. A string without apostrophes is interpreted
as the name of a variable.
Macros can be used for specifying actions in various contexts not involving any explicit !ADD command: call backs for widgets, actions for events,
calculator functions created by macros. There are also more specialized forms of macros, for example acceptance criteria (see below), definition
of profiles in NAPA Steel. These uses of macros are described in their respective contexts.
Normally, a running macro is equivalent with entering commands and the execution of the macro obeys the same condition as for command: the
next line is executed when the system is ready to accept a new command and the command must be available in current task.
Especially the context listed above, the so-called immediate mode is often needed . This means that the macro is executed directly when
encountered and independently of the current command environment.
Whether the macro is run in immediate mode is in most cases determined by the context from which it is started, e.g. by executing the calculator
function RESULTOF. It can also be specified explicitly by using the service function AI.RUN.
A good example is a macro calculating a result and run by the RESULTOF calculator function, entered as a formula in an LQ: this macro must be
run immediately when the formula is evaluated, while the normal mode would run it only after the listing is finished.
A macro to be run in immediate mode cannot contain normal commands: it can only contain NAPA-BASIC commands and functions. Since not
nearly all functions of NAPA are available this way, many subsystems offer a service function that actually runs a command, e.g. MN.COMMAND,
TP.COMMAND, DR.COMMAND.
Macros are frequently used for creating output of various types. There is a service by which such macros can be run in a way that resembles
normal commands. The actual running of the macro is normal, but there is a support for
This service must be supported by the local LIST and PLOT commands, which must recognize the syntax
LISTtask.macro
PLOTtask.macro
where 'task' refers to the current task and 'macro' is the name given in the LIST or PLOT command, for example
LISTLD.SUMMARY
PLOTHYD.SHEET
The task specific prefix is given in the explanation of the LIST or PLOT command.
For finding the macros belonging to a given command, there is the .CAT option:
LIST .CAT
PLOT .CAT
The result is the names of the macros (without task prefix) and the first line from each macro. The catalog automatically covers all sources
(project database, system database, NAPA database.) The following example from DA shows only the NAPADB:
Parameters given in the command are collected into a string array named LISTPAR. Help concerning the use of the macro must be provided by
the macro itself. For accessing the help, the convention is recommended that help is requested with parameter ?. The following example
illustrates accessing parameters and giving help:
There is similar service tied to the task in general and provided by the !ADD command:
This works otherwise as the LIST and PLOT macros, but the macro is named
ADDtask.macro
where 'task' is the current task, the name of which can be seen from the output of !WHERE (the last item in the task list).
The !DO command provides a fast way of repeating an operation many times. The operation can be given by a macro or by commands entered in
the !DO command. The general form of the !DO command is
where 'commands' represent the command to be run by either the name of a macro or commands given within apostrophes, for example:
The last possibility is available in SH only. In the first case the !DO command is repeated for all values in the series given, in the example x=0,
10,20 ...100. In the second case, 'LIST' is an array containing strings, and the commands are repeated as many times as there are values in the
list.
!DO commands n
When the commands to be executed are entered directly in the !DO command, variables to be evaluated when executing the !DO command and
not when interpreting it must be flagged by %.
Example:
ASCII code 32 =
ASCII code 33 = !
ASCII code 34 =
ASCII code 35 = #
ASCII code 36 = $
ASCII code 37 = %
ASCII code 38 = &
The !SELECT command is useful for preparing control to !DO, for example:
The !SELECT command generates a calculator array named LIST containing all curves, the name of which begin with FR. The !DO command
repeats the PLOT command for all these curves. The following example uses a macro:
This example is supposed to be run in CP after the SELECT command has been entered, creating the array CPLIST.
The execution of the commands in !DO is implemented as running macros. The data echo can therefore be suppressed with !CDE 0.
The data echo, i.e. output of commands given, is normally done so that directly given commands are written to log (in the IOF) only, while
commands run by a macro are echoed to the command window. The data echo of commands run as a macro can be controlled with command
!CDE (control data echo):
@ECHO OFF
@ECHO ON
9. Graphic input
Data can be entered graphically, either from a digitizer or from the graphic screen. In both cases, coordinates can be entered. From a screen, one
can also point at objects, provided that a so-called segmented drawing is used. For more information about graphic input, see the Drawing
Manual; here only some basic principles are presented.
There are some differences between using graphical input from a digitizer (or tablet) or the graphic screen. The main difference is that input from
the digitizer can be done independently of graphical output, while input from the screen is connected to the coordinate system used for output.
Input from the digitizer may not need a separate signal, as in the case of input from the screen.
In the normal state, NAPA expects input from the keyboard. The intention to do graphic input is communicated by entering a line ending with a
colon. Graphic input is then activated, and the input continues graphically until finished by pressing the key reserved for the purpose. The items
entered graphically are added to the current input command in the equivalent alphanumeric form, and the result is processed as if entered
originally in this form.
When running a macro, graphic input can be entered similarly, by a line ending with a double colon.
When running a macro, the data echo is also sent to the terminal. This echo can be suppressed with the command !CDE (control data echo).
Data entered graphically is echoed to the screen in the equivalent alphanumeric form.
Even if entered on the same line, commands are echoed separately, in the correct chronological order with respect to possible intermediate
output.
Normally, NAPA is run in block mode on a terminal emulator (such as Exceed). Any alphanumeric terminal or terminal emulator can be used for
running NAPA. However, the facility called block mode will make running of NAPA much more efficient and convenient. The block mode means
that all operations on the screen take place locally, and only when pressing the send (or return) key, characters are transferred to the computer.
The power of this facility lies in the fact that the characters can be picked anywhere from the screen, including characters that originally were sent
by the computer.
Commands beginning with an asterisk or exclamation mark are treated as so-called transparent commands. These commands are handled
without passing them to the currently active task, which therefore does not 'see' them. Thus, the transparent commands are independent of the
tasks and hence available everywhere. They start functions of a generally useful nature such as providing explanations to commands and error
numbers. These commands are described in the Monitor Manual.
Items with the prefix # will be interpreted as the number of a frame, entered with reference to the frame system or geometric objects.
If # is followed by a number, it means a frame number, which can be given as a fraction, e.g.
If followed by WEB or LONG, (or shorter W, L) the notation refers to the web or longitudinal system (as defined in the reference system), e.g.
#WEB10, #LONG-2
The special cases #X and #T refer to the reference coordinates XREF and TDWL. The remaining cases will be interpreted as the reference
coordinate of a geometric object, e.g.
#BH2, #DECK2
#10+0.2
The interpretation of these syntaxes is done by the input system. They are therefore consistently available, but the application program cannot
check whether the references are meaningful in the context.
In room definitions, the syntaxes are interpreted by the GM task. Regarding the increment to a frame number, there is the restriction that the
frame number must be an integer and the increment less than 10 in this case.
Primarily for the purpose of debugging NAPA BASIC programs, the possibility to run a macro in step mode is available. In step mode, each
command is shown before execution, and there is the possibility to inquire values of variables and to interrupt the execution. Step mode is set by
option S in the !ADD command. For the functions in step mode, see the Monitor Manual, chapter 'NAPA BASIC'.
Preceding commands can be listed or repeated with the command !L. By default, the 500 last commands are stored, but this number can be
changed with command the !L.
In all input, components flagged with the at-sign (@) will be passed to the calculator. The syntax following the flag will be interpreted as a
calculator expression, the value of which is substituted before the command is further processed.
In macros, there is also the possibility to use commands that control the function of the macro rather than the application. The functions include
assignment of variables, controlling the flow of the macro and using input/output statements. These functions make the macro facility a genuine
programming language, which greatly increases the possibilities offered by macros. Because of certain similarities, this programming language is
referred to as NAPA BASIC.
The calculator and its use in commands and macros is presented in Monitor Manual.
In macros, control by way of calculator functions has obtained a major role. The main reasons for this are:
calculator functions provide a two-way communication between the system and the macros
in contrast to commands, calculator functions are not tied to a specific command environment
In many cases, especially in the graphical user interface, it is necessary to have control over when a function is run, which is best obtained when
running it in the so-called immediate mode, i.e. directly when called instead of being put to the stack of running macros. This requires that the
macro contains no commands.
All this is supported by an increasing number of so-called service functions. These in all respects normal calculator functions but organized into
groups corresponding to the subsystems of NAPA. Many of these functions are not primarily designed for doing a calculation or returning a result,
but for starting some action.
The service functions are evolving into an alternative interface to the application subsystems. In some subsystems, missing functions are
compensated by functions such as DR.COMMAND, TP.COMMAND that run a command but on the same conditions as a calculator function.
The primary objective is to provide a test that can be applied by the general input functions so that invalid values can be discarded before being
passed to the application.
The essential function is to interpret a syntax defining the properties of a given data item and test a given value against it.
In user macros, the check function can be accessed by the service function AD.CHECK.
In many cases, the criterion implies a finite set of possible alternatives. This set can be output by the function AD.ALTERNATIVES.
When this is written, the function is just being taken into use and all partial functions are not implemented although presented below. Alternatives
not available are marked.
The main type can be integer, real, string, special syntax or undefined.
A real can be specified more closely by defining it to be a specific quantity, which implies a specific unit, or by giving a unit directly. The unit
implies a unit conversion before applying any range tests or showing values to the user.
Unless separately specified, a string is assumed to represent a NAPA symbol such as the name of database object, a quantity or an option. Such
strings are assumed to be case insensitive and must not contain delimiters.
A string can be specified more closely by defining it to be the name of a particular type of object.
Special syntaxes are presently defined for geometric data only as presented below, e.g. point syntax (u,v).
These aspects are defined by the first item in the syntax, formed by the type symbol, multiplicity specification and qualifier, of which the two last
ones are optional:
type*n/qual
I integer
R real
S string, symbol
For strings, a qualifier ending with * or () means a database criterion. G, C, R etc. refer to geometric objects in general (also available as database
criteria), T any type of table and D means any description found in the database.
Examples:
R real
I integer
S arbitrary symbol
In addition to the main category, additional restrictions on the possible values can be defined.
For integers and strings, sets of allowable values can be defined the following ways:
Examples:
The usage of macros and service functions is presented below. For cases when it is not possible to list the range of allowable values, but only test
whether a given one is acceptable, service functions can be used for doing the test.
A macro can be written to perform the acceptance test. The macro must have a @PARAMETERS command declaring one string parameter,
which is the value to be tested. The result of the test is stored in the variable $RESULT, either 0=ok, or error number.
@PARAMETERS(TEST=S)
@X=VALUE(TEST)
@Q=FR(X)-INT(FR(X)+0.001)
@$RESULT=0
@IF ABS(Q)>0.002 @$RESULT=89
Assuming that the macro is named FRAMETEST, an example of its use could be
@AD.CHECK('R DATA*FRAMETEST','12.5')
If the test is dependent on a list of allowable values, the macro can return the list rather than doing the test itself. This makes the criterion useful in
AD.ALTERNATIVES. This case differs from the one above in that the format in AD.CHECK is LIST*macro, and that the macro returns a string
array as the value of $RESULT. NOTE: this variable must be a local one in the macro (automatically so if the @PARAMETERS statement is
given). A string parameter can be passed from AD.CHECK as in the following example:
@PARAMETERS(NAME=S)
@$RESULT=ARR(3)
@S=GM.SELECT(NAME,C)
@DM.COPY(S,$RESULT)
The effect of the macro is to return a list of curves referenced from the surface, the name of which is given by the variable HULL. Assuming that
the macro is named REFCURVES, an example of its use could be
@AD.CHECK('S
LIST*REFCURVES(%HULL)','CLF')
O as the last item in the criterion means that the item is optional and an empty value is accepted regardless of other criteria, e.g.
A subsystem service function can be added to the criterion for providing the check directly or for providing a list of allowable values. The behavior
of the service function is declared by one of the syntaxes below:
C=ss.id(parameters)
ss.id(parameters)
A=ss.id(parameters)
'parameters' is formed by a list of symbols separated by commas. These are transferred to the function as numeric or string constants. Variables
can be used, but they must be flagged by %.
In the two first cases, there is a parameter that must be assigned by the check function, marked by * in the parameter list. In the first case, this
parameters is formed by the value to be checked, and in the second case by an array reserved by the check function.
Examples:
'S C=ST.CHECK(PROFILE,*)'
The function ST.CHECK checks that the given string is a valid profile. The function is specified as errornr=ST.CHECK(quantity,value)
'S CP.DEVICES(%COMP,*)'
CP.DEVICES returns the list of sounding devices belonging to the compartment referenced by variable COMP. The list is returned in an array that
must be provided by the caller, in this case the check function.
'S A=AD.FORM(S)'
the symbol must belong to the array returned by AD.FORM('S') (List of quantity symbols)
Given items in the criterion can be replaced by reference to variables or calculator expressions by flagging the expression with %:
Examples:
'S %LIST'
'R 0...%VOL(HULL)'
The check can be done using the calculator function AD.CHECK, having the specification
error=AD.CHECK(criterion,value)
where 'criterion' is the string providing the criterion (in the syntax presented above) and 'value' is the value to be tested (string). The function value
is 0 if the value is accepted, error number if an error is found or -1 if there is an error in the check syntax.
EXAMPLES
AD.CHECK('R','12')
AD.CHECK('R ...%MAX','12')
The value must be a real with upper limit given by the variable MAX.
AD.CHECK('I (1,2,3,10)','1')
AD.CHECK('S
(LREF,BDWL,ZDWL,HMAX,XMIN,XMAX)','BDWL')
AD.CHECK('S %LIST','A')
AD.CHECK('S AD.UNITS(*,M)','mm')
AD.CHECK('S
AD.UNITS(*,%UNIT)','mm')
The value must be a unit with the same dimension as the one given by the variable UNIT.
AD.CHECK('S A=AD.FORM(Q)','VOLM')
AD.CHECK('S C=ST.CHECK(PROFILE,*)','B*100*10')
AD.CHECK('S/G','STEM')
AD.CHECK('S/C /FR*/','FR1')
The command runs the contents of a given text exactly as if the same data had been entered
from the keyboard. The !ADD command must be entered as an independent line of input.
name: name of the macro. If the source is not specified by the other parameters, the following sources
are attempted in this order:
/vers: (opt) version, fetch the macro from the given version
/proj: (opt) name of project, default=current project. A data base unit in the form DB1, DB2 can also
be given.
S: (opt) set step mode, alt. SS=also for referenced macros, 1. level, SSS=for all levels. For
functions in step mode, see below. With OS, the effect is the same as if the macro had
contained the statement @onerr stepmode.
!ADD name(p1,p2...)
Run a macro with parameters. The values p1,p2 etc will be assigned to local variables named
$1, $2 etc when running the macro. The number of parameters is stored as variable $$. This
syntax can be used in all forms of the !ADD command, by adding the parameters directly after
the 'name' parameter. The names $1 etc can be changed by a @parameters command in the
macro. Quotes (") are converted to apostrophes ('). NOTE: a string without apostrophes is
treated as the name of a variable. In the form !ADD name((p1,p2,...)) strings will be treated as
string constants.
!ADD FILE=path
The asterisk means that the text is fetched from the system data base even if present in the
project data base.
!ADD refnr()
This form runs a set of commands present in the run time memory, for example, in a calculator
array. The syntax refnr() is what is returned by the calculator in !ADD @m if the variable m
refers to an array or description. NOTE: the macro is not removed from the run time memory.
With !ADD *refnr() the macro is removed.
EXAMPLES
!ADD LINESDRAWING
!ADD *STDHYD
Run the macro named STDHYD from the system data base.
!ADD TEMP>T
!ADD HULL/B/DB6
!ADD PLOT('HULL')
This form runs the macro PLOT with the parameter 'HULL'.
!ADD PLOT('HULL')/A
This command runs a standard macro for the current task. The macro is named
ADDcontext.macro, where 'context' is the name of the current task, or in case of subtasks, the
lowest one (see command !WHERE). On the task level 'context' is empty. Option *ADD .CAT
gives a catalog of macros in the current set.
EXAMPLES
!ADD .CBH
!ADD .CAT
!ADD *
This form resumes running of a data element interrupted by control-C, or command Q in step
mode. beginning with the line mentioned in the interrupt message. !ADD + has the same effect,
except that the run continues with the following line.
In step mode, execution of the macro stops at each line (note) and the following answers are
possible:
ENTER STEPMODE
(literally as presented)
This command repeats given commands while at the same time changing the value of a control
variable or the current directory (in the SH sense). The repetition is controlled by giving the
values of the control variable directly, by giving an array or by using the result of a preceding
!SELECT command. Note also the command SCAN ...SEL in the editor.
empty: use directories (in the SH sense) selected by the preceding !SELECT command. One at
a time these will be made current directory and the command(s) performed. The current name
and version of the directories can be found in variables NAME and VER.
var=val1,val2...: repeat by given the variable 'var' the given values usual repetition syntax.
var=arr: as above, but the range of values is given by an array (in the sense of the calculator,
obtained by calculator functions ARR or REC).
This form is otherwise equivalent with the one above, but the commands are given using an
add element. The effect is equivalent with
name: name of a data element or *=current editor work area (Note that with *, exit from the editor must
usually be done separately).
EXAMPLES:
!DO '!TYPE %A' A=ARR1
Type values of array ARR1.
!DO '!TYPE %ARR1(I)' I=(1,@RSIZE(ARR1),1)
Equivalent with the preceding example. Note the percent sign
(reference to be resolved in the loop) and the @ sign (reference to
be resolved before interpreting the !DO command).
!DO 'PLOT %NAME' NAME=CURVELIST
Perform command PLOT for each name in array CURVELIST
!DO LIST
!DO '!ADD LIST' (equivalent with preceding)
Run macro LIST for each directory obtained by the
preceding !SELECT
The !DO command works as if a set of *ADD commands had been given. The associated data
echo can be suppressed the normal way with *CDE 0.
List handling
Table of Contents:
1. General
2. Categories of output
3. Intermediate output file
4. Saving lists
5. Direct printing
6. Adding figures
7. Controlling alphanumeric output
8. Page headers
9. Selection of printer
10. Controlling the page size
11. Controlling the formatting of numbers
12. Output in different languages
13. Standard commands
14. Standard table output module
15. Documentation system
16. List in HTML format
1. General
The final results obtained from the system are either alphanumeric or graphic. This paragraph presents the handling of output in alphanumeric
form, i.e. result lists, run log etc.
2. Categories of output
In order to have flexible control over the output, it is divided into categories called listclasses. The parameters controlling the output can be
assigned separately for different listclasses.
In normal use, the most important listclasses are the result list and the log.
The output of a listclass can be directed to various receivers, the most important of which are the screen and the intermediate output file. Other
possibilities are the current drawing or a normal text file.
The handling of listclasses is treated in more detail in the document LIST OUTPUT.
The final formatting of result lists is made when the list is sent to the printer (adding of headers, margins). When output on the screen, where
space is more valuable, the lists will therefore appear in a more compact form.
The list file is not intended as a permanent storage. The available space is re-used cyclically, and after a time dependent on the intensity of
system use and the size of the file, the lists will be overwritten.
4. Saving lists
Lists can be saved permanently in the database by the command SAVE in the SCAN task. This function was introduced in order to support the
inclusion of lists in documents created under the documentation system (see below).
Lists are considered generated information, which is saved in the auxiliary database. Since release 2003.1, the saving can also be done in the
main project database (parameter LST in the REF task or INST task).
5. Direct printing
A shortcut for printing on paper is available, in which the output to the screen is printed in a hard copy fashion. Direct printing starts after being
turned on (command !PRINT ON) and is finished when turned off (command !PRINT OFF).
6. Adding figures
Figures stored in the database or created at the same time as the list can be included in lists. The figure is added when the list is sent to the
printer.
normal result lists are sent to the screen and to the list file
long result lists are only stored in the list file
the run log is displayed at the terminal and sent to the file. The data echo is merged with the run log in the file.
The possibilities for run time control of list output are presented in the LIST OUTPUT Manual.
8. Page headers
Result lists are usually equipped with page headers, appearing at the top of every page, providing information such as page number, date,
project, user, list name, etc. The headers are not considered useful when outputting the list at the terminal, but added when the list is sent to the
printer.
There is a standard header stored in the system database. Using the command !HEADER it is possible to change the header either for the run
only or permanently. It is also possible to store alternative headers.
9. Selection of printer
The printer to be used is declared in the installation parameters. If there are alternatives, a different printer can be selected with the command !P
RINTER. In the installation parameters, the paper size of the printer is defined. If one wants to use the same printer with different paper sizes, two
names can be reserved and the different sizes associated with the different names.
The page size can be inquired or modified with the command !PAGE.
NL (new list) starts an independent list and allows the setting of some options, e.g. list name.
NP new page
LF line feed
The following additional facilities are provided by the table output module:
Two standard commands are associated with this function, TOO (table output options) for controlling the layout and LQ (list quantities) for
selecting the quantities to be listed.
Graphics
Table of Contents:
1. Graphic output
2. Storing of drawings
3. Windows, drawings, layers, zooming
4. Selecting the device
5. Summary of commands
1. Graphic output
In the same way as lists, graphical output can be produced directly on a graphic device while the program creating it is running, or saved in the
output file and drawn later. Graphical output can also be saved in the database.
Direct output requires that a graphic device is available when running the system. Presently, this usually means a separate window on the
workstation. When running from a terminal, graphics can be directed to a separate device if necessary.
Direct graphical output is always done to the screen. What is seen on the screen can be directly sent to a paper device or it can be sent via the
intermediate file in the same way as lists. The graphic output can also be converted into various formats that can be used by other systems, e.g.
DXF. For distribution in the web, the SVG (scalable vector graphics) format is available.
2. Storing of drawings
In addition to direct output of graphics, graphic output can be stored in the intermediate output file. This allows graphical output when there is no
graphic device directly available or in batch runs. This also makes it possible to repeat the output on different devices or in different scales. A
drawing can first be checked on a graphic screen or in small scale on paper before being drawn in full scale. Handling of stored graphic output is
in all respects analogous with handling of stored lists among other things, the search functions are the same. Outputting of stored drawings is
presented in more detail in the Drawing (DR) manual.
As in the case of lists, the intermediate output file provides only a temporary storage, and it is not available for direct access (only via the search
function). When needed, drawings can also be stored in the database. This can be done directly (!GR DB) or using the SAVE command in the
PLOT task. Drawings are calculated results and stored in the auxiliary database. A drawing stored in the database can be output under the PLOT
task or added to lists, documents or other drawings (command FIG).
Traditionally, graphics have been treated as generated results and stored in the auxiliary database. With the introduction of functions for directly
modifying a drawing, this has changed and since Release 2003.1, graphics can also be stored in the main project database.
There may be many drawings active at the same time, controlled by the !VIEW command, either in different windows or sharing the same
window.
A drawing can be divided into layers by command !LAYER. The layers share the coordinate system and scaling but have individual control of
colours and other graphic properties. The layers can be changed and made visible independently of each other.
Temporary enlargements of the current screen can be done with the !ZOOM command.
The way graphics is output can be changed with the command !GR. With this command, the output can be directed to a different device or the
properties of the current device can be redefined. The latter alternative is needed if the current device has not been identified correctly or when it
can be used in many ways. With the command !GR, it can also be specified whether to direct output to the intermediate output file or to the
database, either alone or in addition to direct output.
5. Summary of commands
While most drawing functions are handled by the individual tasks, the following functions are handled directly by the graphics subsystem using the
following transparent commands:
Standards, conventions
Table of Contents:
1. Coordinate system
2. Viewing direction
3. Units
4. Reference dimensions
5. Draught, trim and heel
6. Dates
1. Coordinate system
Objects and locations in the ship are designated by coordinates in a Cartesian coordinate system where the axes are placed as follows:
Y-axis: breadth coordinate, positive direction depending on the orientation of the coordinate system (right-handed: port side - left-handed:
starboard side)
Whether the coordinate system is left or right handed is declared in the installation parameters. It can be redefined in the reference system of
individual projects and versions.
The ship is fixed to the coordinate system regardless of draught, heel and trim.
For the axes in a plane coordinate system in general, the symbols u and v are used for the horizontal and vertical axis respectively. Angles are
measured counter-clockwise from the u-axis.
This notation is also used in commands. A point in the three dimensional coordinate system is presented as (x,y,z).
2. Viewing direction
In drawings where the layout is generated by the system (e.g. deck plan), the ship is viewed as follows:
Note: in the general drawing task, the local u- and v-axes are associated with the coordinate axes as presented in the preceding
section. Where needed, a specific viewing direction can be accomplished by adding the REFLECT command.
3. Units
Internally, the system uses a fixed set of units. Externally (i.e. in commands and listings) other units may be used to a varying extent. The most
important units are listed in the following table.
Quantity Unit
length meter
The trim is stored internally as radians. For the external representation of the trim, see below.
In geometric definitions, the standard unit is always used. In most calculation tasks, the input and output unit can be controlled with the !FORM co
mmand. The defaults are stored in the quantity standard.
4. Reference dimensions
The reference system contains among other things the reference dimensions and reference coordinates. The purpose and definition of these are
described in the Monitor Manual. Here, the most important ones will be pointed out. The following figure illustrates the reference dimensions:
TDWL depth of the design waterline, used as default in many functions, usually defines AP, FP.
XREF place where the draught is measured (see below), the place around which the ship is trimmed
AP,FP aft, fore perpendiculars. The difference between the draughts at FP, AP define the trim
XMID location of the largest frame, the place where quantities related to the midship are calculated
LREF,BREF used in the calculation of fullness coefficients and for various estimates needing the ship size
Note: misleading or incorrect results may be obtained if the dimensions mentioned are not up-to-date.
The dimensions and coordinates are usually related to the geometry as indicated by the figure. Upon request, they can be determined
automatically from the hull form. The dimensions are updated in the REF task only.
The building frame system is defined by giving the x-coordinate of frame 0, and the frame spacings. It may be used as a means of defining and
presenting longitudinal (x-axis) coordinates. In order to avoid confusion, it is strongly recommended that the origin and frame 0 should coincide. If
needed, the coordinate system can be changed in the transformation task (command MOVE).
Whether trim by head is considered negative or positive is defined in the installation parameters.
6. Dates
Internally, dates are recorded as seconds from 1.1 1964. In commands dates are represented by integers yymmdd (day) and hhmmss (time), for
example
!SELECT DATE>970101
!SELECT DATE>(970101,160000)
For output, the so-called formatted date is used. UntilRelease 97.1, the only alternative was
Since Release 97.1, there is the opportunity to select between different formats as follows:
YYYY-MM-DD HH.MM
DD.MM.YYYY HH:MM
MM/DD/YY HH:MMd
In addition, one can rely on the date representation installed under the operating system.
The date convention can be set permanently with the DATE command under task INST/ADM or temporarily with the command !DATE.
Error handling
Using the system normally involves various kind of errors. The types of errors are as numerous as there are different types of tasks in the system,
and the handling of errors is therefore highly dependent on the context. However, a few general principles are used, and these are presented
here.
Some errors are due to programming errors or hardware failures. These errors are difficult to foresee and usually lead to confusing results or even
a crash. The texts 'INCORRECT REFNR' and 'ARIT$' are always associated with program errors, although they need not have any serious effect
on the run.
Most errors, however, are the result of errors in the input data. In order to inform the user about the errors, the facilities described below are
available.
Table of Contents:
1. Classification of messages
2. Error messages
3. Catching errors in macros
4. Operating system level errors
1. Classification of messages
The error messages are classified into four categories as follows:
SYSTEM This error is signalled when an error prevents further running or makes further running dangerous. Examples are data base
ERROR errors or overflow of the run time storage. In these cases the run is interrupted, unless the test mode is on (command !TEST).
ORDINARY An error message is given when a function cannot be carried out. The function in question may be the entire current task (e.g.
ERROR calculation of hydrostatic tables) or some part of it (e.g. drawing one curve or interpreting one data record).
WARNING A warning is often associated with an error, but the current task is not interrupted. However, the result may be incorrect or
incomplete in some respect.
NOTICE A notice is given when the system wants the user to be aware of some circumstance or event, that usually is not an error.
2. Error messages
The error messages are given in the form of short sentences like
The number in parentheses is the error number, and the E tells that it is an error, in contrast to warnings (W) and notices (N).
The printing of error messages can be controlled so that repeated occurrences of the same error message gives only the error number.
In connection with many errors, there is a more complete explanation stored, which gives a more detailed description of the error and possibly
some advice on how to correct the error:
!EXPLAIN errornumber
In addition to the error messages, the run log usually contains data to help localize the errors. Many error messages, such as the one in the
example, directly concern the last given data record.
In other cases, possible additional information may be printed preceding the error message, for example:
@ONERR label
can be added. 'label' is a label defined with the @LABEL command or END=stop execution. In case of an error (visible as an error message), the
execution of the macro continues at the given address. Especially when testing a new macro, the command
@ONERR STEPMODE
The last two digits of the error code (i.e. numer 19 in the example) contain the operating system error code, and the actual explanation can be
checked from the operating system vendor's documentation. In this particular example case, The documentation for system error code 19 for
Microsft Windows is as follows (taken from https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381%28v=vs.85%29.aspx) :
ERROR_WRITE_PROTECT
19 (0x13)
The media is write protected.
Such an error would indicate that some critical file used for storing e.g. intermediary results or similar cannot be accessed because of incorrectly
configured write access rights on the operating system level.
Calculation methods
Most calculations done in the system rely in the last resort on quantities derived from objects representing volumes - either the object as such or
the object as delimited from above by a plane, normally expressed by draught, trim and heel.
The quantities belong either to the volume or to the section at which the volume is delimited ('waterline') e.g. for waterplane area. These quantities
will be referred to as volume oriented quantities.
Presently with much smaller frequency, there are quantities derived from objects representing areas (surfaces, surface objects). Finally, there are
quantities derived from the bottom areas of compartments.
Table of Contents:
Calculation sections are described in more detail in the Geometry Manual. Here only the most important principles are presented.
In the selection of calculation sections, a suitable (local) spacing must be selected, and the locations must be selected so that discontinuities are
included.
The discontinuities may be knuckles or jumps in the frame area curve. In the former case, it is enough that a section is placed at the discontinuity,
in the latter case, the section must be doubled - one section before and one after it. Many discontinuities can be inferred from the geometric
definitions, others must be defined by the user (CSECT command). In the example above, the section at the start of the bulb is defined by the
user.
When generating the sections, an estimate of the accuracy achieved is made, and on the basis of this, the spacing between the sections is
determined. If this process does not converge, a message appears. The reason may be an undetected discontinuity or an error in the geometry.
When calculation sections have been made for an object, they are stored in the auxiliary database and used until made obsolete by some
geometric change. Calculation of new sections is done automatically if the sections are missing or obsolete.
Definition of geometric objects and making the intersections are the phases most likely to cause errors. Therefore, the best security against errors
caused by incorrect geometry is to draw the calculation sections.
The main shortcoming with calculations based on calculation sections concerns the ends of the object at the given waterline. This effect is usually
significant in waterline quantities only. At the expense of (much) higher run times, these effects can be compensated by end corrections
(command !ECO) or by calculating the waterline quantities from sections with the object (command !SECWL). Both alternatives involve making
more sections from the object, which increases the risk of failed sections.
After these options were introduced, a new method for handling end corrections has been taken into use which is done automatically and which
should by default replace the other methods.
In different calculations, different aspects of the hull are taken into account, and different defaults can be specified for different purposes. The
most common alternatives are:
naked hull without appendages, usually represented directly by the hull surface.
the hull delimited upwards by the main deck or other structures considered watertight, possibly with appendages. This object is used in
stability oriented calculations, and it is normally obtained by combining the bare hull surface with the deck surface and appendages.
the hull delimited by the bulkhead deck, representing the buoyancy allowed to be taken into account by the damage stability rules.
Appendages are usually most conveniently taken into account by separate objects, which can be combined with the hull to form the total object
providing the buoyancy.
The shell thickness is included in most calculations. There is a name rule in the reference system (parameter HLID), by which an object can be
automatically classified as one to which the shell thickness is added (as recorded in the reference system). For any object, the application of the
shell thickness can be specified explicitly. It is also possible to use a shell factor.
The wall area refers to the outer surface of an object. Presently, no direct 3D model is made from rooms, and there is therefore no explicit outer
surface. The wall area is calculated from the calculation sections, using a heuristic method for taking into account the longitudinal behavior.
Note that this is not the same quantity as the wetted surface, calculated the traditional way by integrating the lengths of the frames.
Bottom areas of compartments are not used in the standard naval architectural calculations, but they play an important role as the basis for weight
and other estimates. Bottom areas are generated from the z-projection of the section between the compartment and its bottom surface. This
section can be specified explicitly in the definition of the compartment; otherwise, the surface occurring as the lower z-limit in the room definition is
used (from the LIMITS command). If no such surface is included in the definition, or if it is a general surface, the bottom area is considered
undefined.
If the bottom is formed by a facet surface, a certain caution is necessary: the intersection of a room with a facet surface is not very reliably
implemented. The result should be checked graphically, and if needed, a different section specified in the definition.
In the same way as calculation sections, the section on which the bottom area is based is saved and re-calculated when needed. See also the
Geometry Manual.
4. Areas of surfaces
Areas and related quantities can be calculated directly from facet surfaces (surfaces formed by combinations of planes). For general surfaces,
areas are calculated by treating the surface as a facet surface. For a grid surface, the facets are formed from the surface elements, and the result
may be fairly crude. From patch surfaces, the facets are generated by subdividing patches to the desired accuracy. Presently, the accuracy is
controlled by taking 10 times the polygonization tolerance (GMTOL in the reference system).
The information provided here is not needed in the normal use of the system, but the person responsible for the local system maintenance and
persons making sophisticated use of NAPA BASIC may find this information useful.
Table of Contents:
1. Basic concepts
2. Storing in the database
3. Tools related to descriptions
4. Calculator functions related to data management
5. Some name rules
6. Examples of description specifications
6.1. Text
6.2. Curve
1. Basic concepts
The data in NAPA is organized into packets called descriptions. From the data management point of view, a description is simply a collection of
numbers and strings organized in a certain way, and having a name by which one can refer to it. Each subsystem has specifications telling what
the various numbers and strings stand for in the descriptions belonging to it.
Each description contains data that form some entity, for example, a curve, a figure, a loading condition, a text, etc.
A description is formed by records. A record can be of three types, depending on whether it contains integers, reals or strings. In many cases, the
order between the records is significant. The record itself is identified by a number. The number does not need to be unique in the description.
Within the record, elements are identified by their index.
The record number, sometimes in connection with the position in the description, tells what information a record contains. In many cases, the
record is associated with a certain quantity, for example, x-coordinate in a curve or mass of load in a loading condition. The record number of
such records is usually the one specified by the quantity standard. See the task FORM or the command !FORM.
A database file contains a directory, giving the name (incl. version), date, type and location of each description. When given the name of a
description, there is a fast algorithm for determining the place in the directory. Finding a description on the basis of other data requires a search. If
the search criterion involves the version, name, type and date only, the search can be restricted to the directory. This is the background for the
distinction between 'db-criterion' and 'quantity-criterion' in the !SELECT command.
Up to seven database files may be open simultaneously. These are distinguished by the unit number, which is normally assigned as follows:
UNIT 1 The main project database. Assigned automatically when a project is active.
This leaves units 5 and 6 for other use. Unit 6 is used when reading a description from another project.
Note that the unit number is not a property of the file itself - only a short way of referring to the file after it has been opened for the run.
Command !OPEN can be used for connecting other database files than those normally opened, for example, in the task TOC for copying. With
option NEW, the OPEN command will create a new file and give it the format of a NAPA database file.
Command PREP in task TOC can also be used for formatting a database file.
The subsystem DB handles the storing of descriptions in the database, while the subsystem DM handles operations on descriptions in the free
storage.
Task TOC contains two subtasks. The first one contains functions for operating on a database file as a whole. Such functions are tables of
contents, copying and mending. The other subtask contains facilities for editing data and listing data in terms of description components. Under
this task, individual record components can be changed, records added or deleted and much more.
Anywhere in NAPA, the commands !CAT and !SELECT can be used for selecting from a database. Command !DML gives a listing of a
description.
Command ASG in the table calculation module and commands ARG and FUN of diagram drawing allow, among other things, components of
descriptions to be designated directly.
In the run time memory, routines operating on records and descriptions use the so-called reference number to designate these. This number is
also used in calculator functions, and this is the meaning of the function values of the DB and REC functions. If A is the name of an array, the
value of A itself is this reference number.
A more comprehensive set of functions is available in the service functions of the series DM and DB:
Geometric objects are stored under the names used in the commands, for example, the description containing the object 'HULL' is also named
'HULL'. These names are not supposed to contain the special characters used in other names.
Most other descriptions have some prefix, usually separated by an asterisk. Examples of name rules are
ARR* arrangements
6.1. Text
A text (as recognized by the editor, the !ADD function and others) is stored as records of type 3 (strings) where the record number represents the
line number. The lines are preceded by an empty integer record with the record number 3333333. This is a typical example of a flag record, and
its purpose in this case is to allow any other information to be associated with the text, by storing it before the flag record.
6.2. Curve
A space curve is represented by a set of three records, numbered 1001 (x-coordinates), 1002 (y-coordinates), and 1003 (z-coordinates). If the
curve contains many branches, this set of records is repeated.
Any other records may be added, provided that they are not placed in the middle of a set.
Common Data
This chapter describes the use of the sources used for common data, i.e. data that may be shared by more than one project/version. These
sources are
In addition, some items may be stored in the current version of the current project.
Table of Contents:
EXPL*...: explanations of commands (translated ones are read from DB2, SH uses also DB2 and project db)
TRAN*.../ver: translations
USER*QUANTITIES_SH*
: local modifications to the SH quantity standard
DRAG(...) ''
BBOX(...) ''
TEXT*... source for special text output function (e.g. TEXT*NEWS..., TEXT*ERR...)
Regarding figures, the prefix FIG* is used for common figures, and when given explicitly, implies the system database or NAPA database.
Similarly, the explicit prefix DRAW* implies the project database.
Note that all the following categories are tables and read according to the rules for tables:
The user organisation specific definitions are written into the system database (DB2), and project specific definitions into projects. The use of the
COMMON version is supported in all respects.
macros
figures
LQs
project specific quantities
CINIT and data item macros in SH
Regarding other categories, there ought to be no reason for making any changes in the system database.
Part of the data described here has been placed in the system database, rather than being fixed in the program code, for the specific purpose of
allowing the user organizations to adapt the system to differences in file names, conventions, hardware and other circumstances. The next
section gives a summary of this data. Some of the related definition functions are part of the application in question, and a reference is made to
the relevant document - the rest are presented in this chapter.
Data delivered by Napa Ltd is stored in a separate database, the so-called NAPA database, NAPADB. For some items e.g. explanation texts, this
is the sole source, while other items are delivered as defaults which can be overridden by own definitions in the system database.
An important part of the data delivered in the NAPA database is the widgets that implement the graphical user interface. This subject is not
treated here. The NAPADB is recorded as belonging to a specific release, because information such as command explanations depend (to some
degree) on the release. This is especially true of the widgets.
Table of Contents:
This group of parameters is partly connected with the hardware, and it specifies file names, terminal types and similar information. The user
register and conventions such as the trim sign rule are also handled here. The group is handled in the subtask INST under ADM, and it is
presented in more detail below.
The quantity standard contains a list of standard quantities (volume, mass, speed, etc) and information related to their output. The quantity
standard can be listed and modified under task FORM.
The way the initial reference system of a new project or version is generated can be tailored by storing a model reference system. The model
reference system sets defaults for ship independent parameters such as standard names, a set of user-defined parameters. The model reference
system is created and maintained in the task REF.
Commands to be executed when starting the system, when starting a project, when changing version or when entering a task can be stored as
macros, using the following name rules:
When starting the system, INIT*SYSTEM is run before the user-specific macro.
For listing tasks using the general table output module, the default for the quantity selection and layout control is read from the database under
the name LQ*id*STD, where 'id' is the task-specific identification. Similarly, the defaults for plotting with command PLD are stored under the name
PQ*id*STD. The project database, the system database and NAPA database are tested in this order. For the handling of these, see sections
Standard table output module and Standard diagram output module.
1.6. Macros
Generally useful macros can be stored in the system database. When running a macro, it is automatically fetched from the system database or
NAPA database unless it is found under the project.
1.7. Figures
Drawings can be stored in the system database for various purposes. Some of these are used in standard system functions while others are used
at the user's initiative only.
For creating new tables for arrangements and other purposes, the table structure is read from model tables read from the system database:
ARR*MODEL, PAR*MODEL, STR*MODEL, STT*MODEL, EQP*MODEL and EQT*MODEL.
The system database also contains standard data for purpose symbols (PAR*STD), structure types (STT*STD), equipment types (EQT*STD) and
colouring standards for various purposes (COLOUR*..., PEN*...). Colouring standards in the old format are stored as CONT*... .
The rules presented above for the ship model are valid for tables in general: model tables are fetched from the system data and for other tables, a
table not found in the project database is fetched from the system database. Thus, any generally useful set of data having the form of a table can
be stored in the system database.
The software generated fonts are stored in descriptions named FONT*id. For the creation of these, see below.
Colour maps are stored in descriptions named CMAP*id. The special cases CMAP*DEVi are used as default for device type i. Colour map WHITE
is used if a device is declared with OPT=W. Line type and colour conversion tables are stored under name GR*CONV*id.
The device codes corresponding to logical fill, pen and font codes are stored in tables named TAB*FILLCODES, TAB*PENCODES and
TAB*FONTCODES respectively.
Control commands for printers are be stored as macros named id.FMT. The use of these is presented below.
The standard page headers are stored under the name HEADER*STD, and others can be stored as it serves the purpose. These are handled
with command !HEADER.
1.12. Translations
The translation facility relies on tables named TRANSL*id (several languages) or TRANSL*id-l (specific language).
Before Release 98.1, this function was handled by texts named ENGL*id (keywords) and TRAN*id/lang for the translations.
The default for the heel arguments in tasks STAB, LD, and DA are stored in descriptions named STAB*HEELS, LD*HEELS, and DAM*HEELS
respectively. They are listed or changed in the respective tasks.
The command explanations are stored named as EXPL&xxx, where 'xxx' is the identifier that can be listed with !EXPL G/GEN.
The usage of NAPA BASIC functions is presented in text name EXPL.B and of events of subsystem ss in texts name EXPL.ss.E.
All groups listed above obey the same storage conventions (presented below).
Error messages are stored named ERnnn, where nnn stands for the first three digits in the error number. An extract of this (the first text line of
each error) is stored in ESnnn.
The !DOC command relies on descriptions named TOC*id, created by the documentation system, where id is the document name. TOC*DIR
contains a list of documents.
The !NEWS and !ERR commands rely on texts named TEXT*NEWS-yy-i and TEXT*ERR-yy-i, where yy=year, and i=the release number.
2. Installation parameters
Installation parameters are data specific for different installations, by which various differences in file names, conventions and hardware can be
taken into account. These parameters are handled under subtask INST under task ADM. In a few cases, the description editor (DED/TOC) must
be used.
The current values of the parameters can be listed with the LIST command, or (for some parameters) entering the definition command without
parameters. In all cases, the data is displayed in the form used for input. For those parameters not presented here, use the !EXPLAIN command
under INST.
In order to get changes saved in the database, exit from the subtask must be done with command OK or END, not !END.
The parameters describing input and output devices are stored in the description TERMINALS, while all others are stored in the description
INSTALLATION*PARAMETERS.
From Release 95.1 on, the information in TERMINALS can be stored in tables as described below. The use of these tables is optional (see
command FORMAT in task INST). For actual use at run time, the information is copied from the tables to the TERMINALS description.
If there is an administrator defined, only the administrator has access to the INST task; otherwise, full professional status is sufficient.
In the following, a few notes are given regarding some parameters; for the rest, see the explanation texts.
'Device' refers here to devices used for input or output. The hardware accessed by a given connection is treated as one device, and it may have
one, two or all of the following capabilities:
This division of capabilities is still maintained, although it is not so clear on modern hardware as it used to be. A minus sign is written for a missing
capability; otherwise, the symbol, representing the type is given. The type symbols are defined with command ANDEV (alphanumeric device) for
terminals and printers and GRDEV for graphic devices. When tables are used, these commands enter table calculation as presented below.
For use in commands referring to the device, each device has the so-called external identifier. The way the operating system knows the device is
stored as the internal identifier.
For terminals, the internal id is the line number or other symbol designating the connection (file name under UNIX). For spooled devices, the
same name as used by the spool command is stored.
The parameter CONFIG is a relict from earlier versions of the PRIMOS operating system, where it provided the line configuration parameter.
Presently, its only use is the following:
For each graphic type symbol, the main type and the subtype are declared.
The main type decides the driver to be used, i.e. what subroutines are called for doing the output operations, while the subtype takes into account
various differences between devices of the same main type.
From Release 95.1 on, the following tables can be used for replacing the information in TERMINALS:
The use of these tables is optional. The main advantage is that additional information can be added and access to the information is possible with
standard functions outside the INST task. Taking this format into use is done with the command FORMAT:
FORMAT NEW
This command only creates the tables and changes the operating mode, but it does not store the result. This command can be used for testing
the function without actually taking the new format into use. The command
makes the new format permanent. Subsequently, the use of the new format follows from the existence of the tables in the system database. The
old method can be taken back by deleting the tables.
The tables created with the FORMAT command contain the minimum needed for the function of the system, i.e. the same information as in the
TERMINALS description.
New information can be added by adding columns, for example, descriptive texts.
Note: the present system assumes all tables to be in the system database (DB2). A warning is obtained if this rule is violated. Storing of
tables with the MN* prefix requires administrator's rights.
The commands TERM (devices), GRD (graphic types), AND (terminal types) and PRD (printer types) enter table calculation and load the relevant
table into the work area. These are the same commands that define the corresponding properties directly, when using the old format. They can be
used as listing commands when given without parameters. The output corresponds to the old format, and it cannot be used for input. Note: for
listing PRD must be replaced by AND.
The tables should not be saved under table calculation. Saving is done when the INST task is exited with command OK or END.
Below, the tables are presented in more detail. All columns are defined as general integer, real or character columns (defined as I, R or C) in
order not to burden the quantity standard with a number of quantities of marginal importance.
The DEVICES table describes devices (terminals, workstations, plotters, printers). It may define formal devices that do not represent a physical
one, but a set of properties.
The explanation of these parameters can be obtained at run time with the command !EXP TER/M75. The table generated automatically contains
the columns listed above. In the example below, a column DES has been added manually:
----------------------------------------------------------------------
C1 Canon, hall c1 CA CAIII
S
C2 Canon, secretary c2 CA CAIII
S
CC1 Colour Canon cc1 CA CAIV
S
CUS Canon, US char. set c1 CA CAIII
S
P1 Postscript, hall p1 PS PS
S
PC1 Postscript, colour pc1 PSC PSC
S
TDV Tandberg 999 TDV TDV
F
TEK Tektronix, colour 999 TEK TX
F
XTERM Generic xterm VT200-A WIN
F
WINA4 Xwindows, A4 999 WINA4
F
WINB Xwindows, big 999 WINB
F
The ANTYPES table defines the properties of keyboard devices. The command AND enters table calculation and activates this table. The columns
are:
In the standard table generated automatically, the column AMTYPE is added. It gives an interpretation of the type code in text form. It is handled
as a dependent column with MN as calculation rule:
COLUMN AMTYPE=C MN
Listing example:
This table is in all respects analogous with the ANTYPES table, with the column PRTYPE for the printer type and PMTYPE for the description. It
is entered with command PRD. The separation of printers and terminals was not made in the old format; therefore, command AND (alphanumeric
devices) is used for printers also in the old format or when using the short listing command.
Listing example:
The GRTYPES table defines properties of graphic devices. It contains the following compulsory columns:
In the old format, there are two additional parameters, graphic input capability and scaling default for the PLOT task. These have been omitted,
and selected automatically on the basis of the type. The explanation of these parameters can be obtained at run time with the command !EXP
GRD/M75. The table generated automatically also contains the column GMTYPE and GSTYPE, providing a type definition in text form.
Listing example:
Note: for workstations under VMS the following special interpretations of the main type are made for historical reasons:
When defining logical codes (see below), the converted types are used for designating devices.
The following example shows how information can be extracted from the main tables, by using the standard functions of table calculation. The
purpose of this table is to give a summary of the printers available. The selection criterion therefore excludes devices not having printer capability
and also those that do not have a descriptive text (assumed to be irrelevant).
Table definition:
NEW TAB*PRINTERS
COL, EXTID=C KEY
COL, PRTYPE=C
COL, DES
COL, PMTYPE=C <MN*PRTYPES
ALOAD MN*DEVICES NOT PRTYPE='' OR DES='' L
Listing example
The fonts to be used under Xwindows are declared as environmental parameters NWM.FONTi, used as hardware fonts 1,2 .... The heights of the
fonts must be declared in the installation parameters with command FNTH, which also tells the number of fonts available.
A number of entry points have been reserved for applications that a specific user organization can link to NAPA. The corresponding commands
are stored in the installation parameters, and defined with command TASKS. This feature is presently not supported by the way NAPA programs
are linked.
A list of registered users is maintained. Normally, only a registered user is allowed access to the system. In addition, the user register provides
information about the users as presented below.
The properties of the registered users are recorded in a string composed by a combination of the following characters:
G: use translations
In addition, a user may have a password. In the INST task, it is only recorded whether a user has one or not, while the actual password is set by
command PSW under ADM. When a password is set to a user who originally did not have one, the initial password selected is PSW.
If one wants to allow access to the system by unregistered users, the formal user 'any' (in lower case) can be added.
The following properties can be changed under the description editor only. All parameters are located in the description
'INSTALLATION*PARAMETERS'.
Standard-names
The defaults for the names of key objects, used when creating the initial reference system are stored in record 5. For the details, see chapter Refe
rence system. This feature can be compensated by using a model reference system.
Default-page-size
When no page size has been specified for a list, the parameters valid for the current printer are used. A different size can be installed in record.
151 of the installation parameter, This record is an integer record, containing the page width at index 1 and the number of lines at index 2.
(Considered obsolete - the normal way to get the page size is from the default printer).
The !DATE command uses the latitude, longitude and time difference with respect to meridian 0, for calculating sunrise and sunset. This
information is stored in record 401, in the order given.
If translated explanations are available, their use can be specified for the whole installation by storing the symbol in record 510 (=the version
under which explanations are stored).
As an example of using the description editor for changing an installation parameter, assigning a different wildcard character is presented:
TOC
DED
UNIT 2
GET INSTALLATION*PARAMETERS !
SELECT 502
ADD 502 3 ;** only if none was found
ELEMENT 1 ^
The option ! in the GET command forces the system to read a new copy from the database, even if a copy was found in the run time storage. The
option is not strictly necessary, but it is recommended as a precaution.
The SELECT command finds the record if it already exists, and if it exists, the ADD command must be omitted. The ADD command adds a record
with record number 502 and type 3 (strings). The ELEMENT command assigns the value ^ to the first element. The DES R; command is only a
verification that the record is what it was intended to be.
3. Quantity standard
The quantity standard contains data regarding the quantities used within the system. The concept of 'quantity' is interpreted in a wide sense,
covering not only physical quantities such as volume and weight, but also various others, for instance, date, compartment name, purpose, etc.
The information in the quantity standard is the basis for some general system functions such as the table output module and the diagram output
module, it provides a link between the symbols used in commands and the internal storage in SH and some other functions and it offers a way of
controlling the output formats.
The following information is stored for every quantity, and it is handled with the main definition commands Q and R in task FORM:
The following information is stored for selected quantities only, using the commands indicated:
explanation
This is a text describing the quantity, intended for use where there is more space available than the 24 characters specified for the long
header. It is defined for those quantities only, for which there is need for such a longer explanation, using command LT in task FORM.
summing-rule
For those quantities where it is applicable, the summing rule defines how totals shall be calculated. The alternatives are direct sum (e.g.
volume), normal average, weighted average over some other quantity (e.g. volume for the center of gravity for volume, CGX), the
minimum and maximum. This information is used by the general table output module (with options TOTAL or SUBTOTAL).
translatability
This is a list of string quantities such as a description text (e.g. PDES) which can be translated, in contrast to quantities such as 'NAME'.
The information is used by the general table output module, when a different output language has been specified with command !LANG.
The means by which quantities are internally designated is the record number, which must not be changed. In the FORM task, the symbol or the
record number can both be used for designating quantities, using commands Q or R respectively.
Different sets of quantities are used in main NAPA and in SH. The set is changed automatically when switching context. See the SH
documentation for details of SH units and quantities.
The quantity standard used at run time in NAPA is created by collecting the definitions from three sources:
quantities defined by the developer of the NAPA system (i.e. Napa Ltd)
new and/or updated quantities defined by the user organisation to be common to all projects
new and/or updated quantities defined by the user organisation for a specific project and version.
The NAPA defined quantities will be delivered in the description called NAPA*QUANTITIES*, which is stored in the NAPA database. This is the
main part of the run time set.
The user-specific definitions will be stored in a description called USER*QUANTITIES*, which is stored in the system database.
The project dependent definitions are stored into the project database in the description called PROJ*QUANTITIES*.
Whenever you change project or version, the new set of quantities is formed according to information defined in the three basic sources. Thus,
the place where a change is made determines its scope of influence.
In case a quantity is defined in several places, the project defined changes override both the NAPA and USER specific changes, and the USER
specific changes will override the NAPA definitions.
As the quantity set used at run time is a union of three possible sources, all additions made to any of the three sources will be included in the run
time set.
The old NAPA program versions use the quantity standard named *QUANTITIES*, which is not changed in the new method.
The run time set in the new NAPA versions is still called *QUANTITIES*, but it is not the same as the old *QUANTITIES* stored in the system
database. Therefore, you cannot save *QUANTITIES* under the FORM task, and you should not write it into the system database with special
commands offered by the NAPA user interface!
NAPA will keep record from where a definition of a quantity is coming from. Therefore, it is possible to list the quantities coming from a specific
source, what data has been changed and what data should be stored into a specific place under the proper name.
Definitions to all standard quantities are made in the FORM task, which you start with the command:
FORM
The FORM task will reset the definitions made earlier with a transparent !FORM command, unless you start the FORM task with the option FORM
NR; (No Reset).
All quantities defined in the current environment (user organisation and project/version) are available.
The definitions of quantities are printed with the command DES, which has options to select what quantities are listed and in what format.
For example, to list all quantities defined in the project database, give the command:
DES
ALL PROJ
To list all quantities with the identification where a quantity definition is coming from give the command:
To list all quantities modified in the current run, give the command:
See the explanation of the command DES to see all options and the definition of the selection criteria.
The changes to quantities are made by replacing the old values with the new, or by entering totally new data. The quantity symbols and record
numbers should be unique. You should never change the record number of an old quantity nor the symbol.
Also, when you add new quantities, please be sure that the name and record numbers are unique.
Note that when you enter a new quantity into the system, you can put the mark '*' in place of the record number, so the system will select the next
free number for you. The user-specific record numbers should be from the series 9500 - 9999.
The command CHECK enters a subtask for listing, checking and viewing all quantities in use anywhere in NAPA.
Use this environment if you do not know what names or record numbers are used and where they are in use.
In case you want to use the changes done, only at run time, you should leave the FORM task with the command OK. This will keep the changes
valid until you go to a SH based subsystem, to another project or version, or leave NAPA.
To store changes permanently into the project database, give the command:
SAVE PROJ
This will write in the database the quantities that come from the project and the modifications you have made.
Accordingly, to store the changes into the user organisation specific standard USER*QUANTITIES*, give the command:
SAVE USER
The storing of project or user organisation specific quantities will also copy all units, translation lists and summation rules with the
modified data.
The project dependent quantities are related to the version you are in at the moment, so they are not used under other versions of the
same project.
In case the project-specific quantity standard contains modifications to existing quantities, it is not possible to write user organisation
specific quantities into the system database. If this is the case, the user organisation specific quantities should be defined with no project
made active, or in a version without a project-specific quantity standard.
3.3. Units
The units (m, cm, degrees, etc) are defined by a separate set of definitions, giving the symbol, coefficient for unit conversion and dimension. The
dimension is optional and it is used for checking that a given unit is valid for a given quantity. The dimension is coded as 1000*a+100*m+10*t+l,
where
a: 'angle' dimension, e.g. degrees=1000 (added to distinguish meters from radians*meters, etc)
For example, tonm=101, radians*m=1001. Negative exponents are coded by adding 10 to the negative exponent value (e.g. e=-2 -> 10-2=8), for
example, m/s=91 ton/cm=109. If dimension=0, no checks are made.
In addition to the symbol used in commands, a different symbol to be used in output can be defined. This symbol can be changed temporarily with
command !FORM UNIT unit symbol.
DES UNIT KW
DES UNIT KW *
There are a number of units that cannot be applied by simply using a coefficient. These are referred to as special units and they are available in
certain output functions only (standard table and diagram output). They are recorded in the quantity standard with a negative coefficient according
to the following table:
Unit Coefficient
LONG, longitudinal -3
VERT, vertical -4
The transparent command !FORM can be used to make temporary changes to the formats, unit and header information of the quantities and to
define summation rules.
You can use the transparent !FORM command also under the FORM task except for resetting the quantities.
In case you want to replace some unit with another for all quantities under one project, you can make it as follows:
!FORM (M) FEET ;** change the unit and format for
You can list and modify the user and project dependent quantity definitions with the FORM task by entering the subgroup name in the FORM com
mand on the TASK level.
FORM USER*QUANTITIES*
When you want to store the changes you can simply give the command SAVE in the form task.
The handling of project dependent quantities is started with the command FORM PROJ*QUANTITIES*.
These drawings are in all respects treated like any other drawings, regarding initial creation, storing and output. The name rule is FIG*id, where
the prefix FIG* is needed in some commands where it is not specified. In most commands (FIG under DRAW, FIG command for adding figures to
a list, SEND command in the scanner, .OVL command under DOC), the system database is first checked, and the FIG* prefix need not be given.
For checking or editing drawings with dynamic texts or free text fields, note the command DTC (dynamic text control) under task PLOT. It changes
the handling of dynamic texts so that the &... texts are visible as initially entered. The same effect is obtained by the command LOCATE &&..
under the Drawing Editor.
The definitions of logical codes are stored in tables named TAB* PENCODES, TAB*FILLCODES and TAB* terms=
FONTCODES/>FONTCODES. These may be available in the project database (current version), in the COMMON version of the project
database, in the system database and in the NAPA database. These sources are all checked, and the set of codes used is the union of those
found in the various sources. If the same code is defined in many places, the sources have precedence in the order listed.
The first column of these tables is a character column containing the codes to be defined.
The remaining columns contain codes for different devices. The column name connects the column to the given devices, using the following name
rules, attempted in the order given below:
* the name of the specific device type, the same as used the GRDEV command under task INST
* the type and subtype in the form Ttype.subtype, for example, T1.20 for the main type 1, subtype 20.
1000000*pen+1000*colour+10*dash+thickness
Note: a zero value for a given aspect means that this aspect is not affected by the pen code.
Examples:
The possibility to specify a pen is intended for pen plotters, where both colour and thickness must be obtained this way.
Positive values for the fill codes are interpreted as pattern codes, while negative values are interpreted as pure colours. Zero means that no filling
shall be made.
97: white
98: background
99: black
The fonts are expressed by the names of software fonts (LC, EL) or by hardware fonts designated by HW1, HW2.... The special case HWO
(hardware optional) is available for Xwindows. A colour, thickness or background can be added using the notation described under Graphics.
If no definition can be found for a given pen or fill code and the code contains a number, that number is used; otherwise, the code is ignored. A
message is given, unless the first letter is one of the follows:
CMAP*DEVi: applied when graphics opened with the main type =i, if such a colour map exists.
CMAP*WHITE: applied when graphics opened if the option W (=white background) has been given for the device.
The colour maps must be created under the description editor, according to the following specification.
The colour map contains four records, with as many values as there are colour indices defined. The purpose of the records are
record hue: a value in the range (0 360), defining the main colour: 0=blue, 120=red, 240=green.
2:
record lightness: a value in the range (0 100), defining the lightness: 100=white, 0=black
3:
record saturation: a value in the range (0 100), defining the proportion of the current colour and white: saturation 100 gives the pure
4: colour, 0=white.
For example, the standard colour map is defined as follows, expressed in the form obtained by DES D under the description editor:
REC, 1, 1, 16;
- *1 0 1 2 3 4 5 6 7 8;
- *10 9 10 11 12 13 14 15;
REC, 2, 1, 16;
- *1 0 55 120 240 0 300 60 180 150;
- *10 210 270 330 30 90 0 0;
REC, 3, 1, 16;
- *1 0 100 50 50 50 50 50 50 50;
- *10 50 50 50 50 50 33 66;
REC, 4, 1, 16;
- *1 5 5 100 100 100 100 100 100 100;
- *10 100 100 100 100 100 5 5;
---;
Alternatively, the colour map can be defined in terms of RGB (red, green, blue). The records 2,3 and 4 are replaced by records 12, 13 and 14,
containing the intensity of red, green and blue respectively, by values in the range 0...1. This alternative is not implemented for TEKTRONIX.
Colour index 0 is reserved for the background colour and 1 for the default line colour. If the former is black, the latter should be white or vice
versa. A colour map changes only those colour indices that are defined in it. By omitting indices 0 and 1, the background is not affected, and
conversely, if the only purpose is to change the background, only indices 0 and 1 need to be defined.
One such description can provide the conversion codes for one or several aspects. For each aspect, an integer record is added, such that the i:th
element contains the new value for the old code i. The record number tells the aspect as follows:
1: pen
2: dash pattern
4:
thickness
5: line colour
6: fill colour
7: fill pattern
A negative value substituted for a fill colour gives a pattern and vice versa.
Example:
DSC, 'GR*CONV*THI1' 0;
REC, 4, 1, 5;
- *1 1 1 2 2 3;
The thicknesses are converted so that 1 and 2 give 1, 3 and 4 give 2 and 5 gives 3. Other thickness codes are not converted.
id.FMT
where 'id' is the external identifier of the device or Pnm, where n=the main type and m subtype, where the types are the graphic type, if any, else
the printer type. For Postscript, the main type=6, for CapSL=8 and for HPGL2/PCL 4. The macros can be stored in the system database or in the
NAPA database. For example, a printer referred to as P1 and declared as CaPSL, level 1 (type 8, subtype 0) can have a separate format file
named P1.FMT or rely on the type-specific one named P80.FMT.
The contents of the macros are formed by either commands to be sent as such to the printer. There may be commands to be added before or
after the main output or instructions interpreted by NAPA.
The following instructions are interpreted by NAPA. They must be given in the beginning at column 1 and using capital letters:
The defaults for PH and PW are taken from the installation parameters. Instead of the number n, option C can be given, meaning that it shall be
calculated from the other parameters. The relative location of these instructions with respect to the second category is free. All these parameters
are valid for the CaPSL, Postscript and HPGL2/PCL drivers only.
Where relevant, for example, for PW, PH, a separate value can be given to be applied in landscape format, separated by a slash, for example:
All lines that do not have a special interpretation are assumed to be device commands and they are added to the output. The following
modifications are made to the original codes:
A backslash followed by a three digit ASCII code (e.g. \027) will be replaced by the corresponding ASCII character (escape in the example). A
slash followed by * is interpreted as starting a comment, e.g.
The comment must be entered in column 16 or higher or in column 1. A backslash to be used as such must be entered as \092. A line beginning
with three minus signs separates commands to be added before the main output from those to be added at the end.
For most of the existence of NAPA, achieving a specific list layout has been dependent on the use of non-proportional fonts, i.e. fonts where each
character takes the same space, and the placement on a line is dependent on the number of preceding characters only. Since the Release 97.1,
proportional fonts can be used with the CaPSL, Postscript and HPGL2/PCL drivers when given the control presented here.
Within a line of output, independent items are identified. These are output in the form direct application of the font gives, but the placement of the
items on the line is controlled so that the desired layout is obtained. The layout is controlled as for non-proportional fonts, but since proportional
fonts take less space (by a factor of about 0.65), the width is reduced. The following figure illustrates this principle:
The first line shows the result with the non-proportional font. The second line has a proportional font with the spacing factor 1, i.e. the items are
placed as with the non-proportion al font. In the third line, the spacing factor is set to 0.65.
The option TAB in the format file activates the support for proportional fonts and sets the spacing factor. The option LCORR can be added for
more accurate calculation of text lengths. The calculation uses a breadth for each character that is independent on the font, and the LCORR
factor can correct an average breadth difference. If right-aligned items tend to extend past the correct right end, a smaller factor may be needed
and vice versa.
For questions related to the identification of items and their alignment, see the chapter on listing.
Devices obeying the CaPSL control format are declared with graphic type 8, printer type 3. The built-in initialization commands, used when no
.FMT file is available, corresponds to the following file:
The last command is treated specially: it is not sent directly to the device, but it is recorded and sent at the proper place (belongs to the VDM
mode).
The ordinary printer commands are made in the so-called ISO-mode, while commands related to graphics are entered in VDM mode. The initial
state is assumed to be ISO. If VDM commands are given, they must be surrounded by commands
The two last commands require a printer supporting proportional fonts. The item 4y selects the font. Other possibly useful alternatives can be
found out by experiment.
Note: the option TH=th only informs NAPA about the text height and the actual setting must be done with the command shown.
The Postscript driver (graphic type 6, printer type 2) uses macros that must be defined in the initialization. The need for possibilities to tailor output
by using the initialization routine has not presently been fully investigated. The following listing gives the standard initialization.
%!PS-Adobe-2.0 EPSF-2.0
%%BoundingBox:
%%Creator:
%%CreationDate:
%%Title:
%%Pages: (atend)
%%EndComments
%------------------ New drawing ------------------------
0.2 setlinewidth 0.0 setgray /LINSIZ 10.1 def [] 0 setdash
% default line width and type do not modify
/cc { /Courier-ISOLatin1 findfont
LINSIZ scalefont setfont } def
% default graphics font 1
/cb { /Courier-Bold-ISOLatin1 findfont
LINSIZ scalefont setfont } def
% default graphics font 2
/ci { /Courier-Oblique-ISOLatin1 findfont
LINSIZ scalefont setfont } def
% default graphics font 3
/tt { /Times-Roman-ISOLatin1 findfont
LINSIZ scalefont setfont } def
% default graphics font 4
/ti { /Times-Italic-ISOLatin1 findfont
end
/Helvetica-Oblique-ISOLatin1 exch definefont pop
%-----------------------------------------------------
The fonts lc, li and lb are used when making lists. li is assumed to be italics and lb boldface. The font can be changed by redefining these
symbols. For example, taking the Swiss font (proportional) as list font is done by
In contrast to other drivers, the TH=th option decides the text height actually used.
The initial lines contain the information needed for use as an encapsulated Postscript file, which can be used by most modern systems to import a
figure. When the drawing is output, the following information is added to the initial lines, provided that the places are not already filled:
\027(s4T
For other fonts, test by changing the 4. In addition, the s0P command must be changed to s1P.
In order to make it easier to manage the options regarding the formatting of printer output, a test print function is available, started by
In the task DFN/DEF, the curves are collected into a font definition by telling the curves(s) forming each symbol and possibly the distance to be
reserved to the next character.
A font created this way is used instead of the hardware font of the current device, when commanded with the FONT command of the drawing task
or with !GR FONT.
For each symbol, one or more curves are needed. The main complication is formed by symbols containing holes. If the font has thickness, and
one wants to be able to draw the text with filling, two sets of curves must be defined. The first one contains the contours as drawn without filling,
where the holes are stored as such. In the second set, a number of hole free contours are defined such that their union forms the character in
question.
The curves must be defined with location surface=x. The example below shows the definition of font EL.
DEF
!VAR &
&D=0.14 ** spacing
DFN
EL
HEI 1
SPA 1
SYM A (A,A0) (A1,A2) &(1.56+D)
SYM B (B,B0,B00) (B1,B2) &(1.35+1.1*D)
SYM C C &(1.27+1.1*D)
SYM D (D,D0) (D1,D2) &(1.34+1.2*D)
SYM E E &(1.12+1.4*D)
SYM F F &(1.06+1.2*D)
SYM G G &(1.28+1.2*D)
SYM H H &(1.26+1.4*D)
SYM I I &(0.30+1.4*D)
SYM J J &(1.00+1.2*D)
SYM L L &(1.02+D)
SYM M M &(1.68+1.4*D)
SYM N N &(1.40+1.4*D)
SYM O (O,O0) (O1,O2) &(1.36+1.4*D)
SYM P (P,P0) (P1,P2) &(1.21+1.2*D)
SYM Q (Q,Q0) (Q1,Q2) &(1.47+D)
SYM R (R,R0) (R1,R2) &(1.20+1.2*D)
SYM K K &(1.27+D)
SYM S S &(1.22+1.2*D)
SYM T T &(1.20+D)
SYM U U &(1.23+1.4*D)
SYM V V &(1.44+D)
SYM W W &(2.10+D)
SYM X X &(1.48+D)
SYM Y Y &(1.44+D)
SYM Z Z &(1.20+D)
SYM ] (A,A0,]0,]00) (A1,A2,]1,]2) &(1.56+D)
SYM [ (A,A0,[1,[2) (A1,A2,[1,[2) &(1.56+D)
SYM \ (\,\3,\1,\2) (\4,\5,\1,\2) &(1.76+D)
sym 'a' (LA,LA0) (LA1,LA2) &(0.93+1.2*D)
sym 'b' (LB,LB0) (LB1,LB2) &(1.00+1.2*D)
sym 'c' LC &(0.93+1.2*D)
sym 'd' (LD1,LD2) (LD1,LD2) &(1.00+1.2*D)
sym 'e' (LE,LE0) (LE1,LE2) &(0.93+1.2*D)
sym 'f' LF &(0.65+D)
sym 'g' (LG,LG0) (LG1,LG2) &(1.00+1.2*D)
sym 'h' LH &(0.93+1.2*D)
sym 'i' (LI,LI0) &(0.25+1.2*D)
sym 'j' (LJ,LJ0) &(0.37+1.2*D)
sym 'k' LK &(0.93+D)
sym 'l' LL &(0.25+1.2*D)
sym 'm' LM &(1.55+1.2*D)
sym 'n' LN &(0.93+1.2*D)
sym 'o' (LO,LO0) (LO1,LO2) &(1.00+1.2*D)
sym 'p' (LP,LP0) (LP1,LP2) &(1.00+1.2*D)
sym 'q' (LQ,LQ0) (LQ1,LQ2) &(1.00+1.2*D)
sym 'r' LR &(0.85+D)
sym 's' LS &(0.88+1.2*D)
sym 't' LT &(0.84+D)
sym 'u' LU &(1.00+1.2*D)
sym 'v' LV &(1.12+D)
sym 'w' LW &(1.54+D)
sym 'x' LX LX &(1.00+D)
sym 'y' LY LY &(1.00+D)
sym 'z' LZ LZ &(0.85+D)
sym '{' (LA,LA0,L[1,L[2) (LA1,LA2,L[1,L[2) &(0.93+1.2*D)
sym '}' (LA,LA0,L]1,L]2) (LA1,LA2,L]1,L]2) &(0.93+1.2*D)
sym '|' (LO,LO0,L\1,L\2) (LO1,LO2,L\1,L\2) &(1.00+D)
SYM '1' N1 &(0.75+D)
SYM '2' N2 &(1.10+D)
SYM '3' N3 &(1.10+D)
By using the same naming system, this definition can be used for other fonts almost as such.
Error messages are stored in descriptions named ERssn, where ss=subsystem number (two digits) and n=the first digit of the error number. The
messages are stored beginning at the line 100*mm, where mm=the two last digits of the error number. At storing, the description ESssn is
created, containing the extract used when printing short error messages.
Command explanations are created as texts named EXPLxxxx, where xxxx is the identifier stored in the list of command identifiers in the program
(the first character=&). The purpose of lines in the text is indicated by letters in column 1 as specified separately (C for the start of a new
command, P for the description of call format, etc). Explanations for functions are stored in the same format. The name component xxxx is then
.ss where ss=subsystem, e.g. EXPL.GM.
It is possible to have translated versions of the explanations, by storing them under a different version in the system database. The use of
translated explanations can be controlled for the whole installation (rec. 510) or separately for different users, as presented above and they can
be temporarily changed with the command !LANG ... D. If the explanation of a specific command is not found among the translations, the
English version is used.
This command defines the properties associated with the symbols used for types of
alphanumeric terminals and printers. With the typeid as the only parameter, the values for the
given type are displayed. In the new format, this command enters table calculation, the
following syntaxes are for the old one.
s: subtype, alternatives depending on the main type: TEKTRONIX: Controls block mode: 1=use
joydisc, 2=use numeric pad for cursor movements. 3=as 2, but used when no local echo. 6...8:
as 1...3, but implies automatic !BLOCK ON.
t: (terminals only) type of tablet connected on the same line, 0=none. The value corresponds to
various input formats as follows (UU=u-coord, VV=v-coord, n=key number,D a letter): 2:
+UUUUU,+VVVVV,nn,0 (0.1 mm) 3: @n+UUUUU+VVVVV (0.1 mm) 4: UUUU,VVVV,n (0.1
mm) 5: @n+UUUUUUU+VVVVVVV (0.001 mm) 6: l UUUUU VVVVV (0.0001 inch) 7:
%%n.UUUUU.VVVVV (VAXSTATION, 0.1 mm) 8: n +UUUUU. +VVVVV. (0.1 mm) 9:
DSUUUUUSVVVVV (0.1 mm) 10: +UUUUUUU,+VVVVVVV,nn,0 (0.01 mm) 11:
@n+UUUU.UUU,+VVVV.VVV (mm) 12: nUUUUU VVVVV (0.25 mm) 13: lUUU.UU VVV.VV
(mm) See also command !TERM.
This parameter provides a pathname component added in front of the directory when file
names are collected. It influences relative path names only, i.e. path names not beginning at
the top level. By giving an attach beginning at the top level, relative file names are fixed to a
given directory rather than the current one.
ATTACH name
name: name component including all delimiters. This means that the last character is a slash, e.g.
/napa/.
Example:
If the directory set by ATTACH is /napa/, command GET TEMP>XXX in the text editor gives
/napa/temp/xxx, regardless of what is the current directory.
Note: the system data base is assigned with the name PR>SYSDB, unless given by the
environment variable NAPASYSDB. The attach specified by the command can be applied only
after the system data base is assigned.
Defines what batch queues are available for starting batch runs. Entered as one string, with
different names separated by commas.
Defines larger context of the yard. Assigned empty if not relevant. The change will take effect
only after re-starting NAPA.
This parameter controls the way dates are represented in output functions. See also !EXPL
!DATE.
DATES type
UNSP: unspecified, apply the convention used before date options where introduced in rel.
97.1: same as OLD if date before 1.1 2000, else as N.
N: date as YYYY-MM-DD, times as hh.mm. Same as before 97.1 except for four-digit year.
The command deletes a terminal in the old format. In the new format, use command TERM; +
DELETE under table calculation.
DELETE, extid
ANDEV.
This parameter modifies the extension marking NAPA data base files, which by default is 'db'.
The given extension is applied when creating new projects. Setting this parameter also has the
effect that in those cases when a file name given directly, no other check for the extension is
made except that it is included (2 or 3 characters). For a modified extension, that of the
auxiliary data base is obtained by replacing the first character with a, e.g. dir/p1234.ndb gives
dir/p1234.adb. If it is already a, 'b' is used.
EXT ext
This feature has so far not been taken into active use and may not be supported in all
functions.
EXT OFF
This parameter has values YES or NO and tells whether the spooler forces the last page of a
list out by adding a formfeed.
This parameter controls the place where drawings are stored, either auxiliary data base (DB4)
or the main project data base (DB1). If this parameter is undefined, the auxiliary project data
base is used (the only alternative before release 2003). NOTE: this parameter provides a
default for new projects, existing ones are not affected.
FIG dbunit
This command concerns the heights of the hardware fonts registered for use under Xwindows.
hi: height of the i:th font. The number of heights given imply the number of fonts available.
This command is mainly intended to the used once, when switching from the old to the new
format. However, it is possible to enter the new format temporarily for testing.
If table of the new format do not exist, they are created. With the option PERM, the tables are
also written into the data base.
FORMAT OLD
This option is mainly intended for testing. It makes the system obey the old format, but changes
made will be overwritten when the new format is used next time. For permanent change to the
old format, the tables MN*DEVICES, MN*ANTYPES,MN*PRTYPES,MN*GRTYPES must be
deleted.
This command defines the properties associated with the symbols used for types of graphic
devices. See also commands LIST and TERM. With the typeid as the only parameter, the
values for the given type are displayed. In the new format, this command enters table
calculation, the following syntaxes are for the old one.
GRDEV, typeid, type, subtype, usize, vsize, gintyp, scpr, margin, opt
typeid: symbol used for designating the type in the TERM command
1: TEKTRONIX
2: CALCOMP or device using a CALCOMP type driver, depending on library linked, y-axis
horizontal.
4: HPGL plotter
5: Xwindows graphics
6: PostScript
8: CANON
9: MS Windows printer
11: SB
SUBT subtype
subtype: the subtype defines variations to the basic type. The following subtypes are defined for different
main types:
1...9: TEKTRONIX 4010 type devices, 2=basic type, 4=TANDBERG 6=WYSE, 7=LN03 laser printer
The subtype is primarily dependent on the type of CALCOMP library linked into the program
(fixed in a given program):
>6: FTN based library. 11=drum plotter 6,8,11=device with input unit 1 cm,(others 0.25 cm)
6,16,26: set paper size to be the same as u and v size (long plots)
>10000 old HP-GL plotters that have negative absolute values for P1
example: the subtype for HP7580B is 273705 for A1 paper 27 is move in u-direction and 37 in
v-direction (cm)
On VMS: subtype<5 means UIS graphics. NOTE: releases older than 95.1 will always interpret 5
as UIS)
6: SVG format
5...9: colour (implies level 4) Subtypes 0...3 and 5 use the internally defined line widths.
41: VAXSTATION
1000+i: (i as above): do not delete the window at exit from the task.
O other parameters
2: tablet
1: each drawing drawn separately, scaled to the available size (usually defined for graphic
screens)
2: automatic positioning using predefined scale (typically drum plotter or other paper device
with large drawing area)
margin: default for the margin applied under PLOT, in operations involving the extension of the drawing
(e.g. scale according to drawing size)
opt: string parameter for recording various options. Presently only W=white background, O=use font
HWO as default (workstations), R=use old raster codes (main type=8)
This command produces a list of the main installation parameters in the same form as in the
commands by which they are changed. For a closer description of the parameters see the corr.
commands.
LIST sel;
T: terminals
This parameter controls the place where lists are stored, either auxiliary data base (DB4) or the
main project data base (DB1). If this parameter is undefined, the auxiliary project data base is
used (the only alternative before release 2003). NOTE: this parameter provides a default for
new projects, existing ones are not affected.
LST dbunit
If this parameter has value ON, references to longitudinals and webs can be written with L or W
instead of LONG and WEB, for example #L2, #W4. Default=OFF. NOTE: in this mode, a syntax
like #L1 will always mean the same as #LONG1, even if there is an object L1.
LW ON/OFF
OK finish
Exit from this function. If changes have been made, the changed parameters are written back
into the system data base.
This command defines the default for the orientation of the coordinate system.
ORIENTATION ornt
This command is available in the new format only and enters table calculation. In the old
format, printers and keyboard devices share the same command ANDEV.
The command defines the directory where project file are placed when new projects are
created. It can be overridden by the environmental parameter NAPAPR.
In installations not having a system administrator defined, full professional status is sufficient
for certain operations. The possibility to assign full professional status dynamically (!PRF F)
can be restricted by the password set by this command. If this password is set, !PRF F is
replaced by !PRF psw.
This command gives the name of the NAPA program file. This name is used when batch runs
are started.
This command defines the default for printer to be used for paper output. It can be changed at
run time with the !PRINTER command.
This parameter controls whether a register of current runs is maintained. From this register,
information about currently active runs can be obtained with command !LR and with the
function MN.RUNS. This parameter is relevant only when there is no management of the
number of users, otherwise the register is automatically activated.
RREG ON/OFF
The command has the same effect as OK, but possible changes made are ignored.
The command enters data for terminals (including printers). When the terminal identifier is the
only parameter, the properties of the given terminal are listed.
extid: identifier used in communication with the user (for instance, in commands !GR, !PRINTER).
intid: identifier used in communication with the operating system. For user terminals and assignable
lines, the line number (decimal!) or id, is used, for spooled devices, the name used by the
operating system.
aitype: type of alphanumeric terminal, using the types identifier defined by command ANTYPE (listed
by LIST, P) For a terminal without possibility for user input, a minus sign is given.
grtype: as above, but for usage as graphic device The graphic type identifiers are defined using
command GRTYPE and listed by LIST, G
config: original purpose=line configuration parameter. Presently only: '1111'= device to be run using
the spooler, '9999'= formal device, used for designating a device type.
The tilde (~) character is used as wildcard in the editor and for special purposes in the TYPE
command. The possibility to replace it has been added because of keyboards not having this
character and is presently considered obsolete.
TILDE char
This parameter relates to the management of the number of simultaneous users. If a run has
not reported to the run management within this time, is assumed to have exited, and its license
may be taken over by another run.
TIMEOUT time
This command tells whether translated explanations should be checked for and if so, in what
language. The parameter is either OFF (no check) or the symbol of language. Presently only G
(German) is possible.
TRIMSIGN sign
This command tells the device type to be assumed for the terminal, in case the automatic
decision cannot be done. It is given by the name a device of the type in question.
This command adds/modifies a user in the user register. Without parameters, the currently
defined users are listed.
P: full professional
A: system administrator
PSW: defines that the user shall have a password. If the user presently has none, the
password PSW is assigned, else the current one is not changed (can be changed with
command PSW/ADM).
-: remove password
USER EDIT
USER id DEL
Delete user.
USER SORT
This command sets the character by which variables, expressions and NAPA BASIC
commands are flagged in commands. The alternatives are @ (at sign) and & (et sign). In order
not to be interpreted when entering the command, the symbols AT and ET are used.
This command gives the yard name (used in list headers). The change will take effect only
after re-starting NAPA.
Enter the quantity check functions, where all quantity standard groups can be verified and
examined. More commands available in the subtask.
DELETE, symb
This form deletes a unit. The unit must not be in use (see LOC UNIT).
Data for given quantities are displayed in the form used for input.
qnt: either symbol of quantity, record number, record number range or ALL
SEL: (opt) List the source of the quantities with the identification according to the criteria given
below:
*: opt: add the dimension, repeat for all units with the same dimension.
LIST UNITS
This command displays all quantities with the long header containing a given string. It is
intended to help locating a a quantity when the symbol is not known. A special option is locate
according to the unit.
LOCATE string
This command defines a text describing the quantity in question. This text is intended for cases
where there is both the need for and space to print a longer text than the so-called long header
defined with command QUANT, e.g. LQ EXPL. Without parameters, all texts defined are listed.
LT quant text
LT quant DEL
unit: output unit. For integers, the symbol INT is used, for texts CHAR. For nondimensional
quantities (e.g. BLOCK COEFFICIENT) an empty string ' ' is given as unit.
The command is otherwise equivalent with QUANT, except that the quantity is given by the
record number.
With this command, it is possible to change the symbol used. However care should be taken
that the symbols are uniquely defined.
Without any parameters, the named quantity group is stored in the system data base. If the
FORM task is started without arguments the saving criterion must be specified.
SAVE cri
USER store user defined quantities and modified quantities into the system data base in
USER*QUANTITIES* (common for all projects).
PROJ store project defined quantities and modified quantities into the project data base in
PROJ*QUANTITIES*
This command sorts the quantities in alphabetic order. Sorting makes it faster to identify a
quantity.
SORT UNIT
This command defines how to make a sum or similar value to provide the total of a given
quantity. Without parameters, all summing rules defines are listed.
A: average
quant: weighted sum over the given quantity (for instance, volume to get center of gravity of
total volume)
This command is otherwise analogous with command TRQ, but concerns non-translating
quantities that shall be rendered in sound-equivalent kyrillic characters rather than latin
characters, when the language is Russian.
TRL q1 q2 ...
This command defines (string) quantities that shall be translated when translating has been
requested with command *LANG. The definitions are taken into account in output created by
the general table output routine. Without parameters, a list of presently defined quantities is
produced.
TRQ q1 q2 ...
q1,q2...: symbols of quantities concerned. The given ones are added to the preceding ones. A quantity
can be removed by preceding the symbol with a minus sign.
EXAMPLE:
This command defines/redefines a unit (such as M, MM). The current definition is displayed by
command DES UNIT symbol;
coeff: coefficient by which the value in internal units is multiplied in order to give a value in the given
unit.
EXAMPLE
UNIT MM 1000.0 'mm' 1
UNIT RAD*M 1.0 'rad*m' 1001
This command must be given before any SYMBOL commands, and specifies the nominal
height of the symbols, as stored in the space curves. The command can be repeated if there
are characters stored in different scales.
HEIGTH h
h: nominal height
This command specifies the spacing between the symbols. The spacing may be overridden for
individual characters by a spacing defined in the SYMBOL command. The command may be
repeated.
SYMBOL id c1 c2 sp
c1: name of curve providing the shape. If more than one curve is needed, the names must be
given in parentheses.
c2: (opt) name of curves providing the shape to be used for filling. If c2 is given, c1 is interpreted
as the curve to be used without filling. If c2 is omitted, the curves c1 are used for both
purposes.
sp: (opt) defines spacing to be used (from the start of this symbol to the start of the next one). If
omitted, the value given in the last SPACING command is used. The symbol named A is
represented by curves A and A0 (for drawing of contours) and A1,A2 (for drawing with filling).
The value must be given in the scale used when defining the curves.
EXAMPLE
SYMBOL A (A,A0) (A1,A2)
This command defines whether the symbols are defined with thickness or not.
TYPE type
type: either
Double Precision
Table of Contents:
1. Double Precision
1.1. Why double precision
1.2. Requirements for running the 64bit version of NAPA
1.3. Handling project databases with 32/64bit program versions
1.3.1. Requirement for mixed use
1.3.2. Macro to find projects which are not in UTF-8 format
1.3.3. Opening a 32bit project with the 64bit version
1.3.4. Copying descriptions between 32 and 64bit project databases
1.4. Installation
1. Double Precision
For a long time the normal precision for representing floating point numbers in computers has been 32 bits and this has also been used in NAPA.
Higher accuracy has been possible but at the expense of increased volumes of data and processing times, both of which were earlier relevant
constraints.
Part of the bits are used for recording the magnitude of the number and the remaining (23) bits for (binary) decimals. The relative accuracy by
which numbers can be expressed in single precision is roughly one part in 10000000.
This is sufficient for expressing about anything knowable in a ship. Sometimes the limitation is close to being relevant. For example, the
x-coordinates in the front end of a supertanker can be recorded with only 0.05 mm accuracy and the volume with an accuracy of some 100 liters.
Some funny effects can also be experienced, for example, when entering a round number and getting back a slightly modified one.
However, this is not the whole story. The accuracy also affects intermediate results and errors tend to accumulate in calculations. Even up to now,
some critical calculations have been done in double precision. There is an upper limit on the accuracy obtainable, for example, in balancing
calculations and tightening the tolerances may not always have the desired effect.
At the same time, in modern processors, calculations are actually faster in double precision and the problems with volumes of data are no longer
relevant. For these reasons, NAPA has now been updated to both do calculations and store data in double precision. For a transition period, the
double precision version is maintained in parallel with the single precision one.
The double precision version of NAPA is also needed in order to take full advantage of the memory of modern computers.
The following computer requirements should be noted before taking the 64bit version into use:
There is a distinction between 32bit project databases and 64bit project databases. To avoid any confusion a 64bit database can be identified
from having a suffix .db64 instead of .db and similarly the secondary database having .sd64 instead of .sd. Additionally there is an internal stamp
in the database containing the information on the type of database. The function DB.PRECISION may be used to check the format of the
database. The function is executed with the database number as a parameter, e.g !CAL DB.PRECISION(1) for db1. The function returns the
result *4 for 32bit database and *8 for 64bit databases. If a NAPA version that is older than 2010.1 is used to open a 64bit project database, a
database error will occur and the execution must be stopped.
When creating a new project database, the 64bit version creates a 64bit database and the 32bit version a 32bit database. The 64bit version offers
a tool to convert existing 32bit databases to 64bit.
Since the release 2011.2 it is also possible to work in a 32bit project database with the 64bit program version without converting the project first.
This is referred to as "mixed use". The benefit is that a project can be treated with both the 32bit and the 64bit program versions. It should be
noted though that the full benefit of the precision in the 64bit program cannot be utilized this way. The reason is that although the calculations take
place with 64bit precision, all data is stored with 32bit precision in the database.
The requirement for mixed use to work is that the project database has the format Windows and the encoding is UTF-8. All project databases
created after 2005 automatically have the UTF-8 encoding. However some older databases might still have the Unix format or the Latin1
encoding. If such a project is opened with the 64bit program there will be a message that the project cannot be opened unless it is first converted
to Windows + UTF-8. The conversion may be done with a macro called DB.TO_WIN_UTF8. This macro is available in the Napadb and it has to
be executed in the 32bit program version. The project database and the secondary database (db1 + db4) are converted and a backup copy of the
databases are stored just in case. The encoding of a database may be checked with the function db.encoding e.g !CAL DB.ENCODING(1) or
with the command UNIT in task TOC.
Also the system database must have the format Windows + UTF-8 when working with the 64bit version. If the sysdb has the wrong format, the
user will be notified. The conversion of the sysdb may be done with the same macro i.e DB.TO_WIN_UTF8 including the parameter 'sysdb', i.e !A
DD db.to_win_utf8('sysdb'). In case the sysdb is converted the old sysdb has to be replaced with the new converted sysdb manually.
Shut down NAPA and replace the sysdb in Windows. Further instructions are given when the conversion macro is executed.
There is a macro called DATA*DB.PROJECT_ENCODING (!ADD DB.PROJECT_ENCODING) in the NAPA database for finding out projects which
character coding is not yet UTF8. These projects have to be converted to UTF8 using a 32bit NAPA before using them in the 64bit NAPA. The
conversion can be done using macro DATA*DB.TO_WIN_UTF8 as explained above. All the project databases and the system database which
are not yet 64bit compatible should be converted although the 64bit NAPA has not yet been taken into use. The macro loops through all the
projects registered in the NAPA system database.
There are a few different ways of opening a project in NAPA. These are the different scenarios when a 32bit project database is opened with the
64bit program:
Command PRO in the main window e.g PRO project1: If the project is already registered in the system database it will be opened as
such without any notifications. The project is kept as 32bit. If the project is not registered in the sysdb there will be an error message that
the project is not found. The alternatives are to open the project from the menu; File -> Open project from file or to use the entire path to
the project in the PRO command e.g PRO 'c:/napa/pr/project1.db'
Open project dialogue: By default only 64bit projects are visible in the dialogue. By pressing down the button “Show 32bit projects” in
the dialogue, all 32bit projects will be visible. If a 32bit project is selected it will be opened as such (32bit) without converting it.
Open project from file dialogue: By default only 64bit projects are visible in the dialogue. By pressing down the button “Open a 32bit
database” in the dialogue, all 32bit projects will be visible. When choosing a 32bit project, there will be a popup offering two alternatives.
The database can either be opened as a 32bit project or it can be converted to 64bit automatically.
Steps when Opening and converting an old 32bit project database with the 64bit version:
The dialogue "Open project from file" is used and a 32bit project is selected. The following dialogue pops up:
If this is accepted by answering YES, the program copies and converts the contents of the 32bit project database (.db) into a new database
having the suffix .db64. The secondary database is created from scratch and it gets the suffix .sd64. In addition the original 32bit project
databases are still kept as backup files and renamed by adding .backup in the end of the name to avoid confusion of having two projects with the
same name. Thus, nothing is lost in the conversion process. By answering NO, the project is opened as 32bit and no conversion is done.
The new converted project database will still be registered in the system database. By clicking OK the registration is accepted and after this the
64bit project will appear in the Open project dialogs in the 64bit version. The backup file of the 32bit project is not registered in the system
database.
The copy functionality in task TOC automatically takes care of converting the data when objects are copied from a 32bit database to a 64bit
database using the 64bit program version.
1.4. Installation
The installation program automatically installs the 64bit version on the computer if the requirements (see above) for running the 64bit NAPA
version are met. The installation program will always install the 32bit version and optionally also the 64bit version in parallel.
Both program versions are installed in the same main directory e.g. C:\Napa. The directory where the project database are stored (normally PR) is
common for both program versions.
The System database as well as the NAPA database are in 32bit format. Both program versions can treat (read and write) the same system
database.
1. Cairo
2. Libpng
3. Zlib
4. Docbook-xsl
4.1. Copyright
4.2. Warranty
4.3. Contacting the author
5. Saxon
6. Docbook-psmi
7. EPPlus
8. Json.NET
8.1. The MIT License (MIT)
9. ANTLR
10. StringTemplate v3, v4 License
11. XMLmind XSL-FO Converter
12. Xerces-C++
13. IronRuby
14. Pratt algorithm for circle fitting
15. Math.NET Numerics
1. Cairo
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
2. Libpng
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
This copy of the libpng notices is provided for your convenience. In case of any discrepancy between this copy and the notices in the file png.h
that is included in the libpng distribution, the latter shall prevail.
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: If you modify libpng you may insert additional notices immediately following this sentence.
libpng versions 1.2.6, August 15, 2004, through 1.2.29, May 8, 2008, are Copyright © 2004, 2006-2008 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors
Cosmin Truta libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are Copyright © 2000-2002 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors
Simon-Pierre Cadieux Eric S. Raymond Gilles Vollant and with the following additions to the disclaimer: There is no warranty against interference
with your enjoyment of the library or against infringement. There is no warranty that our efforts or the library will fulfill any of your particular
purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the
user. libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are Copyright © 1998, 1999 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-0.96, with the following individuals added to the list of Contributing Authors:
Tom Lane Glenn Randers-Pehrson Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are Copyright © 1996, 1997
Andreas Dilger Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of
Contributing Authors: John Bowler Kevin Bracey Sam Bushell Magnus Holmgren Greg Roelofs Tom Tanner libpng versions 0.5, May 1995,
through 0.88, January 1996, are Copyright © 1995, 1996 Guy Eric Schalnat, Group 42, Inc. For the purposes of this copyright and license,
"Contributing Authors" is defined as the following set of individuals: Andreas Dilger Dave Martindale Guy Eric Schalnat Paul Schmidt Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors and Group 42, Inc. disclaim all warranties, expressed or implied,
including, without limitation, the warranties of merchantability and of fitness for any purpose. The Contributing Authors and Group 42, Inc. assume
no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of the PNG Reference
Library, even if advised of the possibility of such damage. Permission is hereby granted to use, copy, modify, and distribute this source code, or
portions hereof, for any purpose, without fee, subject to the following restrictions:
The Contributing Authors and Group 42, Inc. specifically permit, without fee, and encourage the use of this source code as a component to
supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be
appreciated. A "png_get_copyright" function is available, for convenient use in "about" boxes and the like: printf("%s",png_get_copyright(NULL));
Also, the PNG logo (in PNG format, of course) is supplied in the files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). Libpng is
OSI Certified Open Source Software. OSI Certified Open Source is a certification mark of the Open Source Initiative. Glenn Randers-Pehrson
glennrp at users.sourceforge.net May 8, 2008
3. Zlib
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from
the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in
a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.
4. Docbook-xsl
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
4.1. Copyright
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub
license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Except as contained in this notice, the names of individuals credited with contribution to this software shall not be used in advertising or otherwise
to promote the sale, use or other dealings in this Software without prior written authorization from the individuals in question.
Any style sheet derived from this Software that is publically distributed will be identified with a different name and the version strings in any
derived Software will be changed so that no possibility of confusion between the derived package and this Software will exist.
4.2. Warranty
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
NORMAN WALSH OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
The DocBook XSL style sheets are maintained by Norman Walsh, <[email protected]>, and members of the DocBook Project, docbook-develop
[email protected].
5. Saxon
This software may be included ín the distribution media of the product. Any use of this software is governed by the terms of the license below:
6. Docbook-psmi
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
7. EPPlus
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
8. Json.NET
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
9. ANTLR
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary
form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution. Neither the name of the author nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary
form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution. Neither the name of the author nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
12. Xerces-C++
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
13. IronRuby
This software may be included in the distribution media of the product. Any use of this software is governed by the terms of the license below:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Project Administration
Project Administration
Project administration general
Reference system (REF)
Legacy Text Editor
Database functions (TOC)
Server Database (ServerDB)
How to start using ServerDB
Uninstall ServerDB
1. General
2. Current project and version
3. Creating a project
4. Storing of project data
5. Information stored about a project
6. Reference system
7. Project status
8. Automatically started macros
9. Functions related to project administration
9.1. Functions under task ADM
9.2. Functions under task TOC
10. Entering a project with existing files
11. User register
1. General
The storage of data in NAPA is organized into projects each of which may contain several versions.
The main property of a project in NAPA is that it has own files for the database. Some administrative data is maintained for projects and the
project name appears as identification on lists and drawings. The main property of a version is that within one, all data names must be unique. In
practice, this means that one version can contain one design, including a single reference system. Projects and versions have names (e.g.
P1234, A) by which they are referred to.
The division of a project into versions is intended to make it easier to work with several alternative designs. However, from the system's point of
view versions are wholly independent of each other.
Creating new projects and versions, as well as switching from one project or version to another, is done by the monitor as described in the
Monitor Manual.
The project must always be given when entering the system. Within a project there is one version defined as the permanent current version,
which will be automatically selected when entering the project, unless a different version is explicitly selected.
3. Creating a project
A new project created by
With the PROJECT command on the task level, an already existing project can be opened.
In the weight calculation task, one has the option to use a separate file for weight data, the so-called protected database.
Description Text (one line) displayed when the project is made active, providing a short presentation of the project
Current version The default version selected when making the project active, unless another version is explicitly specified
List of versions
Date of creation
Date of last access The date takes into account only accesses made the normal way in the monitor, and not, for example, use of the
project for the parent ship in a transformation.
Status The alternatives are private or public (see below) and active (=project file is on the disk) or inactive (=project file
available on tape only)
For each version, there is a descriptive text stored (entered when the version is created).
6. Reference system
For each version, the reference system is maintained, providing background data and control of various functions. Items of central importance
are the reference dimensions and the frame system.
7. Project status
A project may be assigned a public or a private status.
Private status means that only the user who created the project has access to it.
There is no facility implemented for preventing deliberate access to private projects by non-owners.
If the project files have been removed, the status should be assigned inactive. This is done automatically if the command RELEASE/ADM has
been used.
DELETE Delete a project. The projects files are deleted, and the information about it is removed from the system database.
RELEASE Release a project. The project files are deleted, but information about the project is saved in the system database: The project
can be made active again by copying the files from an archive or back-up storage.
LIST List information. The registered projects or various subsets therefore can be listed. For a given project, a list of versions can be
obtained (LIST V) and to help the system administrator, there are listings of project activity (LIST U).
TIDY Remove obsolete data. Data no longer needed, usually whole versions can be deleted.
UPDATE List and update administrative data. This function concerns the information about the project in the system database such as
name of project files.
Listing and changing installation parameters are also implemented under task ADM.
The following functions are available under task TOC, containing functions regarding databases in general.
CAT Tables of contents. Tables of contents can be made from the project database or other sources, sorted or restricted to a
specified subset. Each application provides a catalog of its own data.
MEND, Delete damaged data. This function may occasionally be needed when a hardware or software malfunction has damaged the
RESCUE database. Usually, by deleting single damaged components, most of the file can be rescued.
COPY Data can be copied between database files or between versions in the file.
DUMP,LOAD Transfer between machines of different type. Data is stored in binary form in the database, and cannot be used as such in
another machine with a different internal format. For transfer between machines, data can be converted to and from ASCII
format.
As a subtask, there is the so-called description editor. The word 'description' refers to a packet of data, as handled by the data management
facilities of NAPA. This function is primarily intended to serve system development, but it may be needed in special cases.
A project file can be treated without being registered as a project by giving the name of the file instead of that of the project.
In the installation parameters, there is a list of users and their rights. Unless differently specified in the user register, only registered users are
allowed access to the system. One or several users can be given the status of NAPA system administrator. For the rights reserved to the system
administrator, see the Monitor Manual.
The information stored in the reference system is composed of parts of varying type, and all parts are not necessary to define. The common
property is that the data provided is fairly fixed within a given project and version, and it should be consistent in all calculations.
When a new version is created, an initial reference system is generated, which can be modified under the REF task. As the basis for this, a model
reference system can be stored in the database.
Table of Contents:
necessary definition of properties such as reference point for draught, frame numbering
control of various functions, such as polygonisation of curves
providing reasonable defaults for purposes such as calculation draughts, scaling of drawings, stability criteria
providing flexibility with regard to various conventions, such as name rules, orientation of the coordinate system
for information, either in output from the system or for documentation when archiving the project
2. Overview of parameters
The parameters stored in the reference system are divided into the following groups:
reference dimensions
frame system
names of key objects
control and conventions
background and identification
various parameters
In addition to the difference in the meaning of the parameters in the different groups, there are differences in their handling, as presented
separately for each group.
The reference system contains parameters that are not used in any present system function. Some parameters have been added in order to
support planned functions, in which case an 'anticipated use' is mentioned, while others are available for use in macros or formulas.
The reference parameters can be roughly divided into the following groups:
The parameter GMTOL, controlling the polygonisation of curves, is necessary, but the default value is usually suitable for project stage
calculations.
Of the standard names, the hull names for the moulded hull (MOUL), hydrostatic hull (HYDR), stability hull (STAB) and damage hull (DAMA) are
important.
4. Reference dimensions
The common property of the reference dimensions is that they are connected to the geometry of the ship, and have an important role in many
calculations. For practical reasons, the shell thickness and sea-water density are listed in this group, so that all parameters affecting calculations
are treated under the same heading.
Because of the connection to the geometry, some parameters can be calculated automatically. For this group of parameters there is the
administration described below for handling updates of calculated values.
The most frequent use of the reference dimensions is for giving an idea of the size of the ship, to be used when reserving size for drawings,
estimating suitable values for tolerances, spacing of calculation sections and similar.
A special case is forming sections of 'unlimited' planes, which are placed into a box with three times the dimensions of corresponding reference
dimensions. For special cases, these dimensions can be defined directly by using the command RANGE.
Usually, the parameters LREF, BREF and TDWL are used for the size information. When also the location is needed, AP and FP are used. The
intention is that for these purposes, they should be replaced by the newer parameters LOA, BMAX, HMAX, XMIN and XMAX, but when this is
written, these changes have been made only partially (e.g. SETUP).
AP, aft and fore These define the ends of the nominal design water line in the x-direction. They are often placed at the ends of the
FP perpendiculars actual design waterline, i.e. the intersection between the moulded hull at z=height of design waterline, which is the
default applied by the system.
When a new version is created, AP is assigned zero.
The reference length is defined by the difference between AP and FP. The difference between the draughts at AP
and FP defines the trim.
LREF reference The reference length is defined by the difference between AP and FP, and it cannot be set directly.
length The reference length is used when calculating the fullness coefficients of the hull and the waterline. The internal
representation of trim (in radians) is converted to the external one (meters) using the reference length.
XREF midship XREF is normally placed at the midpoint between AP and FP. Its central importance is that this is the point where the
draught is defined (relevant when the ship has a trim).
XMID location of the XMID is defined to be the place where the largest frame area occurs, and it is used in calculating areas of the
largest frame midframe and consequently, also the prismatic coefficient. The lines drawing function uses XMID for deciding what
x-range belongs to the after body and drawn reflected in the body plan.
XMIN, extreme These parameters define the total extent of the ship in the x-direction. The anticipated use is for scaling of drawings
XMAX x-coordinates and providing LOA. The default values are calculated from the moulded hull.
of the ship
LOA total length This parameter is obtained from the difference between XMIN and XMAX. Its anticipated use is for scaling of
drawings and as part of the main characteristics of the ship.
BREF reference The reference breadth is defined as the largest breadth of the design water line. It is used in calculating the fullness
breadth coefficients and for scaling of drawings.
BMAX maximum Anticipated use: information, scaling of drawings. The default value is calculated from the moulded hull or from the
breadth midship section.
TDWL design The design draught implies a number of reference dimensions as presented above. It is used as default argument in
draught a number of calculations. It defines the volume of a hull given by an open surface.
TMAX maximum
draught
HSD subdivision
height
HMAX total height Total height of the ship. There is presently no standard for the geometric object that would provide a value, and
5*TDWL is assigned as default value.
The following parameters are included in this group for practical reasons because of their role in the central functions of the system.
KEEL keelplate Defines the difference between 'draught' and 'draught below keel'.
thickness
RHO seawater Provides the default by which volumes of displacement are converted to weight. When creating a new version, the
density initial value 1.025 (t/m3) is assigned.
SHELL shell Shell thickness of the hull. Unless otherwise specified, all volume oriented calculations related to the hull are done
thickness with the shell thickness added.
Note: in listings where the shell thickness is mentioned, it is fetched from the reference system, and this value should therefore be kept
up-to-date. If there is a single shell thickness used in the objects(s) forming the hull, this thickness should be taken from the reference
system, and if not, there is no logic available for selecting a value for the listing.
For an object not having an explicit instruction regarding the shell thickness (from the command CSECT), the decision to use the shell
thickness from the reference system is made by checking the name of the object: if it contains the hull label (see standard names), the
thickness is added.
For the reference dimensions, the following states are recorded and shown in the listings:
The reference length and breadth given when a version is created are treated as estimates comparable with those made by the system for other
values, while a value given under the reference system is considered fixed.
For those parameters that can be calculated, other states than 'given' allow the system to recalculate new values when the UPDATE command is
given or when changes are made in the reference system. For other parameters, the states are recorded for information only.
A value given explicitly under the reference system is kept until it is manually changed. With the command CALC, the state 'calculated' can be
restored.
This section presents how the reference values are calculated from the geometry. As the source of information, the object with the name
registered for the moulded hull is used in the first place. If this object is missing or faulty, the stem, stern and midship curves are used, if existing.
The following parameters are calculated from the hull geometry directly:
AP and FP are found by taking the end points of the hull section at z=tdwl. If this section cannot be obtained, the stem and stern curves are
intersected.
BREF is found by taking the largest breadth of the design water line, or if this is not available, from the midship curve.
XMIN, XMAX and BMAX are taken from the extreme coordinates of the moulded hull, if available; otherwise, they are taken from the stem, stern
and midship curves.
XMID is calculated as the location of the largest breadth of the design waterline, or the location of the midship curve. If the ship has a parallel
midbody and XREF is located within it, XMID is set to XREF; otherwise, it is at the center of the midship.
XREF is placed at the midpoint between AP and FP, LREF is the difference between FP and AP, while LOA is the difference between XMAX and
XMIN.
When listing the reference dimensions, their value and explanations are listed as for other groups. In addition, the definition state is listed and the
source of calculated values. For example, HULL/TDWL means that the value is obtained from the section of object HULL at the design waterline.
If the parameter could not be calculated, 'error' is printed instead the source, and the value is the one valid before the attempt to calculate.
If a parameter that can be calculated has the state 'given', the calculated value is shown for comparison.
Listing example:
Since sections from unlimited planes are handled as normal curves, they have to have a finite extension. This is normally derived from reference
dimensions as follows:
xmin=app-lref
xmax=app+2*lref
ymin=-2.0*bdwl
ymax=2.0*bdwl
zmin=-0.5*h
zmax=h
If there should be the need for larger sections, the range can be modified explicitly defined with the command RANGE.
5. Frame system
Within NAPA, the role of the frame system is solely to provide an alternative way of expressing locations in the x-direction, both in input and
output.
The frame system defines a set of locations referred to by frame numbers, usually marked by the frame number symbol #. The locations are
defined by the location of frame 0 and the frame spacing, which may be different at different frame numbers.
The initial frame system stored when a version is created has frame 0 at x=0 and a fixed spacing, the value of which is inquired. Experience has
shown that placing frame zero elsewhere than at x=0 tends to be a source of confusion. Therefore, if frame 0 is not at x=0, a warning is given
when entering a project or a version.
where
Example:
The frame spacing is 0.6 m for all frames below frame 10, 0.8 m between 10 and 117 and from then on 0.65 m.
In addition to this 'ordinary' frame system, a web spacing can be defined. X-locations defined in this system are designated by the symbols #WEB
or #W, e.g. #WEB2, W1.4
An analogous system of locations in the transversal and vertical directions can also be defined: longitudinals, referred to by the symbol #LONG
(short form #L.) and verticals, #VERT (#V).
Note: for reducing the risk of ambiguity, the short forms W, L and V are available only if activated by the command LW in the reference
system or in the installation parameters (as default for the whole installation).
The most important ones are those representing different aspects of the hull. In the calculation tasks where the buoyancy of the hull is involved,
there is a default for the name of the object representing it, provided by the reference system.
A set of installation-wide defaults is stored in the installation parameters, which can be modified in the reference system of a given project.
HLID hull label String used as part of hull names. It is used for testing whether an object represents an aspect of the hull, presently only
when deciding whether to add the default shell thickness.
MOUL moulded Name of the surface defining the moulded hull. This object is used within the REF task as described below. It is used as
hull default in tasks FRA (frame areas), BJ (Bon-Jean data), LOFT (lofting tables) and DRAW (in lines drawing, for B/5 lines
and for deck contours). In damage stability, it is used when testing whether a compartment is delimited by the hull.
HYD hydrostatic This is the object representing the hull in hydrostatic calculations where the upper limit of the hull is not important. It is
hull used as default in task HYD (hydrostatics).
STAB stability The is the object representing the hull in calculations where heelings are involved, and where the shape must be
hull correctly represented even after the deck is immersed. It is used as default in tasks STAB (stability), CR (stability
criteria), LD (loading conditions) and GS (grain stability).
The hull forms above need not be different objects. In the initial project stages it may be sufficient to have the moulded hull (=bare hull surface) in
all the functions. Later, an object with deck and appendages may serve as both hydrostatic hull and stability hull.
DAM damage This hull object represents the buoyancy allowed by the damage rules, i.e. the hull delimited by the bulkhead deck.
hull It is used as default in task DA (damage stability).
STEM,STRN stem and Name of curves describing the stem and stern form. Used when calculating reference dimensions as presented
stern above, when the information needed cannot be obtained from the hull. The end curves used in floodable length
calculation are selected according to these names.
FRM midframe Curve defining the shape of the midship section. Usage as for stem and stern.
BHDECK bulkhead Surface or surface object representing the bulkhead deck. Anticipated use: the generation of the margin line.
deck
MARGIN margin Name of object representing the margin line. Anticipated use open.
line
PROFILE lateral Name of curve representing the lateral profile of the ship. Anticipated use: stability criteria.
profile
When creating a new version, the values for the names are fetched from record 5 in the installation parameters, giving the values in the following
order:
1 hull (moulded)
2 stern
3 stem
4 frm
5 stabhull
6 damhull
7 tonhull
8 hydrostatic hull
9 hlid
10 bhdeck
11 mdeck
12 profile
13 margin line
There is no special function for changing these - changing the naming standard must be done with the description editor (subtask DED under
TOC).
The values for index 8 and upwards are missing in old installation parameters (<rel. 89.1), and will be treated as empty, except for HLID, which is
assigned value 'HULL' and the hydrostatic hull, which is assigned the same value as the moulded hull.
When listing the names, the text 'missing' is added if an object with the given name is not present in the database. If the name has been changed,
the name stored as installation standard is listed in parentheses.
GMTO polygonisation Curves are mostly represented as polygons. This parameter defines the accuracy by which the theoretical curve is
tolerance replaced by a polygon, by placing an upper limit on the difference allowed between the polygon and the theoretical
curve. The default for this parameter is 0.0005*BREF, set when the version is created. For a ship of average size,
tolerance in the order of 0.01 m is suitable for project stage calculations, while a value 0.001...0.002 is suitable for
fairing.
GMMX maximum This parameter specifies an upper limit for the segment length in definition curves.
segment
length
GMTP curve This parameter controls curve definition. The alternatives are STD, SPLINE and M2. STD and SPLINE use the
generation original curve placement method. In the alternative SPLINE, all operations with definition curves including surface
method preparation are done with the exact spline representation, with STD, the curves are stored as polygons. SPLINE is
default for new versions, unless overridden by a model reference system. M2 means an alternative curve
interpolation method, influencing the shape of the curves also. M2 has the same effect as SPLINE regarding the
curve representation.
For a transition period (release 99.1), the alternatives O-STD, O-SPLINE and O-M2 are available. These make the
system use the old implementation of the definition routines (before 99.1), and it is provided as a safeguard against
errors or unexpected differences.
GMST surface type This parameter sets the default for the surface type to be used for general surfaces. The parameter overrides the
(GRID/PATCH) installation default stored in the installation parameters (rec. 104, 1=grid, 2=patch, missing=grid). This option is
considered (no reason to use grid)
RACC, relative and These parameters guide the volume oriented calculations, by specifying the largest relative and absolute error
AACC absolute allowed. The parameter giving the smaller error is used for a given object.
accuracy
COOR orientation of The coordinate system always has the x-axis in the longitudinal direction of the ship, going from aft to forward and
coordinate the z-axis upwards. The options remaining are whether the positive y-axis represents the port side (right-handed
system coordinate system) or starboard side (left-handed).
TRIM trim sign This parameter tells whether trim by head (stem lower) is considered positive or negative.
BAYN bay numbering The parameter belongs to container loading, and specifies whether the bay numbering goes from aft forward (+1) or
from fore aft (-1). The installation default is stored in rec. 420 in the installation parameters. General default=1. This
parameter is considered obsolete and replaced by the control provided in subtask ADM/CL.
LW usage of short The value of this parameter is ON or OFF. Value ON means that references #WEB, #LONG and #VERT can be
forms of WEB, written abbreviated in the form #W, #L and #V. For example, #L1 means the location of longitudinal 1, regardless of
LONG and the possible existence of an object L1.
VERT
FIG storage of This parameter can have values DB1 or DB4 and it specifies whether drawings are stored in the main project
drawings database (DB1) or the auxiliary project database (DB4). If not specified, DB4 is used. DB1 is supported in Release
2003.1 or later.
LST storage of lists Analogically with the preceding one for lists.
When listing values with option +, .i.e. listing also undefined values, the value of a possible general default, used instead of the value missing from
the reference system, is listed in parentheses.
For each parameter in this group, it is possible (not necessary) to store a table in the system database, listing valid alternatives and parameters
associated with these. The tables are handled under the table calculation task, and stored in the system database under the following names:
parameter table
SNAME SHIPS
YARDNO NEWBUILDINGS
OWNER OWNERS
FLAG COUNTRIES
CLASS AUTHORITIES
NAVAREA NAVAREAS
SHTYPE SHIPTYPES
PRTYPE PROPTYPES
The minimum contents of these tables is a column named ID, containing the list of valid alternatives. If such a table exists, a warning is given if a
parameter is assigned a value that is not registered in the table.
Other columns may be added as desired. Apart from listing the tables under task TAB, the only way this information is used in the present system
is by using the calculator function REF, as presented later.
Example: assuming that the value of CLASS for the current project is LR, and the table AUTHORITIES contains the following
ID EXPL
LR 'Lloyds register'
GL 'Germanischer LLoyd'
These tables form mini databases for the subjects concerned. It is presently open what information is useful to store, but the solution adopted is
completely flexible in this respect. Examples of possible uses are explanation texts as above, or weight calculation rules for ship types.
8.3. Standardization
With the system, there are tables delivered for the definition of 'PRTY' and 'CLASS'. The symbols used in these form a suggestion for a standard,
the usefulness of which should be checked. Since no system function, with the exception presented above, use these parameters, their
standardization is not presently important, but in anticipation of later developments, a standard should be adopted.
9. Various parameters
This group contains any other parameters, not covered by those above. The distinctive property of this group is that the selection of parameters
can be extended by user commands (command ADD). The only restriction is that the symbols used must be distinct from those of the parameters
in the other groups and from the commands of the reference system. There is also an upper limit on the number of parameters (presently 30).
When adding a parameter that is not registered in the quantity standard, an explanation text must be given in the command, and the type
(numeric or string) is decided on the basis of the value given. By default, new parameters are added at the end of the list, but the possibility is
provided to control the order, so that parameters belonging together can be grouped.
The initial values assigned are zero. The purpose of registering these parameters is to encourage a certain amount of consistency, so that at least
these parameters should be available.
The value of a parameter is assigned by a command having the symbols presented above as identifier. For quantities that can be calculated from
the geometry, values can be automatically updated, as presented above. With the command UPDATE, the recalculation of these can be started.
New parameters can be added to the group 'various' with the command ADD, and parameters (of this group) can be deleted with the command DE
LETE.
With the command COPY, the reference system of another version can be copied to the current one.
The changes made are stored in the database when finishing the task, unless the command SKIP or CANCEL is used.
The frame and longitudinal systems are defined with the commands FRAMES, WEBS and LONGS. The result is stored directly.
The LIST command lists values of parameters. The values are listed by groups, the default being the reference dimensions. Other selections are
obtained by adding a group name as a parameter:
VAR various
ALL all
Note: as a large number of parameters is of no or minor importance and may be undefined, such parameters are omitted in the listing.
The complete set of parameters is listed by adding option +, e.g. LIST DIM +.
In the listings, each parameter is listed on a separate line, beginning with the symbol used in the definition, the value and the explanation text.
Other items may be added in some groups, as described above. In the definition command, additional items are ignored, so that the listed lines
can be used as input commands.
A special command is provided for frames: FRTABLE produces a table of frame numbers and distances to frame 0.
Normal exit from the task is done with END or !END. With these commands, the changes made are stored permanently. Exit can also be done
with SKIP, in which case any changes done are discarded.
With the command CANCEL, the changes can be cancelled without leaving the task.
When the value of a quantity in the reference system is needed in a formula or in a macro, it can be obtained by the calculator function REF. The
symbol of the quantity is given as a parameter. For example,
!CAL REF('LOA')
The reference length and breadth and the design draught are available directly using the symbols LREF, BDWL and ZDWL.
For parameters of the group 'identification and background', properties associated with specific values of the parameters can be obtained by
adding the corresponding symbol as the second parameter. For example, the explanation text for the current ship type is obtained by
!CAL REF('SHTY','EXPL')
In this example, it is assumed that the table 'SHIPTYPES' is stored in the system database, and it contains the column EXPL.
In the administration of the effect of changes on stored data such as calculation sections, changes in the reference system are not taken into
account. Most parameters do not affect stored results, but the following ones should be noted:
- Frame system
Since Release 2003.1, changes in the frame system are taken into account in the object administration, so that objects are considered changed if
dependent of the frame system and the frame system has changed. Objects defined with earlier releases must be updated manually. For rooms, it
is enough to force new calculation sections with GEN CSE ... F, for others EDIT ... + ADD is needed. The objects currently in memory are
removed at exit from REF if reference dimensions have been changed.
shell thickness
The shell thickness defined in the reference system affects objects identified as hull objects on the basis of the hull label, and having no
object specific instruction about the shell thickness. In order to get updated calculation sections, the same commands as above are
needed (!GM RESET if the object is already in memory, then GEN CSECT ... F).
When AP, FP, XREF, SHELL or RHO are changed, the date of STABHULL and DAMHULL is changed to the current date in order to force new
calculations in LD and DA.
When a new version is created, an initial reference system is created. Most parameters get default values, but the following ones are inquired:
If the version is not the first one, there is the opportunity to copy the reference system from an existing version. There are the options to take only
the main dimensions (as above) or copy the whole reference system.
the answer C (or COPY) copies the whole reference system and CD the main dimensions only. The version from which to copy can be given in
the answer. Copying from another version can also be done in task REF. e.g. COPY B; otherwise, the copy is done from the current version.
Unless the reference system is copied completely, a new one is generated. As the basis for the new reference system, there may be a model
reference system in the system database, stored in a description named COM*MODEL. The model reference system can provide all data except
for ship-specific values. For the definition of model reference systems, see below. If there is no model reference system, the initial one is
generated on the basis of the installation parameters.
The command MODEL controls the functions related to the model reference system: create a new, get the existing one, store the result. Since
there is some overlap between the information in the installation parameters and that in the model reference system, there is the command UI (up
date installation parameters), by which the following installation parameters are updated according to the model reference system:
standard names
orientation of the coordinate system
trim sign
bay numbering direction (container loading)
default for grid/patch surface
13.1. General
A few improvements related to calculation accuracy have been made in NAPA for the Release 2010.1. Because of these changes it is likely that
calculation results will differ slightly from earlier versions of NAPA.
Calculations related to volumes of compartments are based on calculation sections. NAPA will automatically generate these calculation sections
whenever a new object has been created. In the Release 2010.1 the logic for distributing the calculation sections has been improved. In order to
calculate the volume more accurately more calculation sections are now added in locations where the shape of the compartment changes
substantially e.g where discontinuities are found. The number of sections is controlled with the REF system parameter RACC and the new
parameter Accuracy Class (ACCL). The calculation of the area of individual calculation sections is also made more accurately in the new version.
Another change related to calculation accuracy is that there are new default values for the tolerances that are used to control calculations. The
tolerances are controlled with the new parameter ACCL.
A new parameter called Accuracy Class (ACCL) has been introduced in the REF system. The intention with ACCL is to control a few different
tolerances used in NAPA with one switch in a more user-friendly way. There are three different Accuracy Classes to choose from:
1. Fast – Good performance and adequate accuracy (Default). Intended for use when the design still changes frequently. Suitable for initial and
normal design work. Provides an accuracy comparable to older releases.
2. Accurate – Improved accuracy and average performance. Intended for more accurate calculations, for example, when delivery documents
need to be created. Can be slower compared to the FAST mode.
3. Offshore – Best possible accuracy, possibly slower. Intended for offshore type structures.
GMTOL – Geometry tolerance. Sets the maximum deviation from the geometry that a section or definition polygon can extend to.
RACC – Relative accuracy. Governs the number of calculation sections and their density locally.
INTOL – Iteration tolerance. Rules when a volume iteration (e.g. floating position) is accurate enough.
BTOL – Gap detection tolerance. Used for gap detection between patches or facets in surfaces.
LTOL – Limit tolerance. A forced offset when intersecting an object at the extreme coordinate plane.
In addition the following two parameters are changed in REF when the accuracy class Offshore is selected:
The tolerances may be controlled individually after the Accuracy Class has been applied. Changing the accuracy class will though set all
mentioned tolerances according to the class and overwrite any individual tolerance settings.
The following tolerances have new default values in Release 2010.1. The Accuracy Class Fast (F) is applied by default in new projects. Some of
the tolerances depend on the ship main dimensions. In the new Release both the ship length and beam are used for calculating the tolerance
value. In earlier releases only the beam was used.
Tolerance F A O 2009.2
Comparison of the new default tolerances in a ship with the main dimensions L=300m and B=40m.
Tolerance F A O 2009.2
This command adds a parameter to the group 'various'. The group can contain max. 140
parameters.
id: identifier of the parameter. It must not coincide with the name of a command. Lenght max. 4
characters (!NOTE) If the parameter already exists, its value is updated.
expl: explanation text. This text is optional if the parameter is registered as a quantity in the quantity
standard.
This command concerns those reference dimensions that can be calculated from the ship
geometry. The state of such a quantity is changed to 'calculated', and the value resulting from
the calculation is assigned.
CALC id
COPY ver
This command can only be applied to the group 'various', the content of which can be extended
or reduced.
DELETE id
Without parameters, the text editor is entered, with parameters, the command is equivalent
with LIST except that the result is stored in the editor work area.
This command leaves the REF task and the changes made are written to the data base.
END opt
opt: options
T: do not clear tables from the run. By default, tables are removed if changes have been made.
G: do not clear geometry from the run time memory. If the frame systems have been changed,
a dynamic update of objetcs is made. The default is to remove all geometry from the run time
memory if changes have been made.
This command prints a table showing the FRN (frame number), DFR (frame step) and X0
(distance to frame 0) or X (x-coordinate). See also LIST FRT.
The LIST command lists data from the reference system. Unless option ALL is given, the listing
concerns a given group of parameters only. Without option +, only defined parameters are
listed. As a special case, a frame table is made (LIST FRT).
This form prints a table showing the quantities selected by the current LQ command. The
alternatives quantities FRN (frame number), DFR (frame step)
As above, but the set of arguments is expressed as web numbers, and the table will show the
web system. Similarly (#Lmin #Lmax dl). The same quantities are used in the LQ as for frames,
and the headers must be adapted manually.
This is the standard LQ command (subject=FRT), controlling the output of command FRT.
This command controls the function of defining a model reference system, to be used when
creating new versions. This command requires administrator's rights. See also command UI.
MODEL NEW
Create a new model reference system. It is created by stripping the current one from ship
specific data. This will then be the object of definitions. Those functions that do ship specific
definitions are not available when a model system is current.
MODEL GET
Otherwise as NEW, but the model system is fetched from the system data base.
MODEL SAVE
Save the current model system. The reference system of the project is restored as the object of
definitions.
MODEL CANCEL
MODEL UNSAVE
This command opens a new result list, see !EXPL NL/GEN. Default for the list name is 'FRAME
TABLE'. Concerns the output from FRT.
The changes made are written to the data base. Same as END.
This command sets the coordinate limits giving the actual extension of 'unrestricted' planes.
The standard values are dependent on the reference dimensions and need normally not be
modified. The range defines the length of the sections from the planes. The values should be
much greater than the reference dimensions and rather too large than too small. The
dimensions used for representing the plane graphically are decided separately.
RANGE;
RANGE OFF;
This is the standard TOO command (subject=FRT), controlling the output of command FRT.
This command requires that the model reference system is current. The purpose is to update
the installation parameters so that as far as there are overlaps with the model reference
system. The properties concerned are standard names, trim sign, orientation, end corrections,
bay numbering, grid/patch default.
This command concerns those reference dimensions that can be calculated from the ship
geometry, and do not have the state 'given'.
The modifications are done 'off line' to a description obtained with AD.REFSYSTEM and after doing the changes, the result is taken into use with
AD.ASGREFSYSTEM. Similarly, frame systems are handled by AD.FRAMESYSTEMS and AD.ASGFRSYSTEMS.
The function returns the reference number of a description containing a copy of the reference
system, either from the current or given version. The description returned is unnamed. It is
intended for use with the other functions of this group: changes are done with
AD.ASGREFVALUE and the result is taken into use by AD.ASGREFSYSTEM.
descr=AD.REFSYSTEM(vers)
vers: version, default=current. Special case MODEL: get model reference system.
The function replaces the current reference system with the one provided as parameter.
AD.ASGREFSYSTEM(descr)
This function differs from the REF function in that the source may be different from the current
reference system.
AD.REFVALUE(id,source)
id: symbol of the reference system parameter. With suffix E, the explanation text is returned, e.g.
LREFE.
AD.REFVALUE('ALL',source,receiver)
receiver: description for receiving the result. Previous contents are removed. The following records are
created:
4: value as string
The function assigns a new value to parameter in the given reference system.
AD.ASGREFVALUE(id,source,value,expl)
id: symbol of the reference system parameter. A new reference symbol 'id' may be undefined
provided that the parameter 'expl' is given: in that case the parameter is added to the group
'various'.
value: new value as string or real, special case *: make the parameter calculated.
The function updates those parameters of the reference system that are defined by calculation
from geometry or other parameters.
AD.UPDREFSYSTEM(descr,opt)
opt: options
G: update also parameters derived from the geometry, default=update only those dependent
on other parameters
This functions gets or changes the values of RANGE in the reference system, i.e. the
parameters the control the extension of unlimited planes. Thera are six values: xmin, xmax,
ymin, ymax, zmin, zmax.
arr=AD.REFRANGE()
This form returns the value of range as currently in use, regardless of whether they are defined
explicitly in the reference system.
arr=AD.REFRANGE(descr)
This form returns the record defining the range in the given description. If it is not defined, 0 is
returned.
AD.REFRANGE(descr,arr)
This form assign the range using the valued provided in the given array. NOTE: the values take
effect after calling AD.ASGREFSYSTEM.
The funtion returns the value of a reference system parameter and optionally adds if originally
undefined.
value=AD.REF(id,default,expl)
default: (opt) value to be returned if not defined. Entered as a string regardless of the actual type.
expl: (opt) explanatory text for the given paramater. If the symbol 'id' is undefined and this parameter
is given a reference system parameter with the given value is added to the reference system
with the given explanatory text. If 'id' is a standard quantity, its type is decided from the quantity
standard, else it is recorded as a string. The event AD*ADDREFPAR (200001) is raised.
EXAMPLES
@l=ad.ref('LREF')
@type=ad.ref('TYPE','unspecified')
Return the value of the parameter 'TYPE'. If not defined, return 'unspecified'. The reference
system is not changed.
@type=ad.ref('TYPE','unspecified','Type of ship')
Frame systems
The function gets the description #SYSTEM, containing the definition of the frame system(s).
The desription returned is unnamed and intended for the other functions in this group: changes
are done to this description and taken into use by AD.ASGFRSYSTEMS.
descr=AD.FRAMESYSTEMS(vers)
The function stores the given frame system description for use by the current version and
makes the definitions active at run time.
AD.ASGFRSYSTEMS(descr)
The functions gets the definition of the given frame system in the form used in the definition
(same number as given in the FRAMES command under REF). The function value is -1=error,
0=normal case, 1=webs defined by frames (receiver contains frame numbers).
AD.GETFRSYSTEM(descr,type,rec)
rec: record (real) for receiving the result. An empty record is returned if failure.
ref=AD.GETFRSYSTEM(type)
This form refers the currently used frame systems and is mainly intended for testing availability.
type: as above
The functions does the reverse of AD.GETFRAMESYSTEM, i.e. stores a frame system given
in the definition format.
AD.REPFRSYSTEM(descr,type,rec,c)
rec: record (real) containing the definition, a set of reals as in the FRAMES command under REF).
1. General
This documentation concerns the use of the old text editor, which is a command line tool. Most users want to use the new Text Editor which you
can find in the Tools menu in Napa Main Window.
The main purpose of the Editor is to create and manipulate texts. The texts can be macros stored in the NAPA database or text stored in text files.
The documentation system is accessed from the Editor. In addition, the Editor handles some functions related to system development.
2. Work area
The text being treated is always in the so called work area of the Editor. The text may be initially created in the work area or it may be copied into
the work area from the database. The result remains in the work area until a saving command is given.
Unless a SAVE or REPLACE command is given before, any changes made in the work area are lost in the these cases. Note that exit from the
Editor does not as such cause the work area to be erased.
If changes have been made in a text without the text being stored, a confirmation will be asked from the user, before carrying out a command that
will delete the work area.
If the text in the work area has been changed but not stored when changing the project or the version, the old text is saved and can be restored
with GET *.
There is an 'auxiliary work area', the contents of which can be listed or inserted into the main work area, but not edited. It is also used for storing
back up copies of deleted lines.
The basic way of adding or changing a line in the text is to enter a line beginning with a number. The number is interpreted as the line number,
and the rest of the line, excluding the delimiting space, is interpreted as the contents of the line. For example, the following input will create two
lines:
This is exactly the same form as produced when listing the text with command PRINT. Therefore, the normal way of modifying lines is to use the
output of PRINT, do the modifications to the output and press RETURN. For this to work, block mode is needed.
When entering new lines, writing of the line numbers can be avoided by placing the Editor in number mode. In number mode, any text not
containing an asterisk in column 1 will be treated as a new line, added at the line number displayed by the Editor. In this mode, existing lines are
never overwritten - if necessary, the Editor performs a resequence of the lines. If column 1 contains an asterisk, number mode is finished and the
rest of the line is interpreted as a normal Editor command.
Note: since the asterisk has the function described above, the transparent commands of NAPA must be entered with an exclamation
mark.
There are many commands referring a set of lines, for example PRINT, LOCATE, CHANGE.
The basic way of referring to lines in a text is by using the line numbers. There is a general syntax for this purpose, presented in connection with
command PRINT. The following example shows some alternatives:
P 10 print line 10
When texts are stored in the NAPA files, the line numbering used in the work area is retained. In normal text files, the line numbering is lost, and a
numbering 1,2,... is assumed when reading a text.
Command RESEQUENCE changes the line numbering so that lines are numbered from a given start number with a given increment. The default
is to number the lines 100,110,120,...
This will be used if the formal directory DB2 (see below) is given. For example, DB2>INIT*NN refers to the text INIT*NN in the system
database.
the NAPADB
Analogically with the system database but designated as DB7>.... The NAPA database contains macros and other data delivered with the
system and is intended to be read-only. At special need, this restriction can be lifted with command !USER SUPER.
other data in NAPA database
These are designated by the formal directories DB3,...DB6, corresponding to the usual NAPA units. Unit 4 is the project auxiliary
database, while units 3, 5 and 6 can be opened with command !OPEN.
text files
Text files are used if the name of a directory is given explicitly with the file name or in advance by using command ATTACH. The name of
a directory is separated from the file name by the character '>'., for example
GET TEMP>TEXT1
When doing a replace without explicitly naming the text, the text originally read will be replaced, except when the text was from another project.
The same syntaxes as in GET are used when creating a new text with command NEW. When using SAVE without parameters, the storing place
implied by the name is used.
directory>file
This principle is used in other contexts also, e.g. !OPEN, DUMP, LOAD. If the file name contains components on several levels, the upper levels
must be collected into a single item by apostrophes. For example:
/n/napa/temp/file
is expressed as
'/n/napa/temp'>file
GET RESULTS1
gets the macro DA. RESULTS1 (complete database name DATA*DA.RESULTS1) and
CATALOG
CATALOG NAME>RES
lists only macros named DA.RESxxxx. The effect is to make macros belonging to other groups than the current one invisible.
Note that this a tool only, and it is up to the user organizations to apply it. The most obvious way of using it is to divide macros into groups
according to the task they belong to, for which the support presented below is available. A user can use this tool to separate his own macros.
Note: the prefixes concern macros in NAPA databases only, not text files in directories.
As a shortcut for accessing other macros, the following rule is applied: a name already containing a point will be used as given, e.g.
GET LISTDA.STD
If the point is the last character, it is skipped. This allows a shortcut for names not containing a point, for example
LIST OPENINGS
In the catalog, option NP (no prefix) removes temporarily the prefix criterion.
The prefix is handled by the PREFIX command of the Editor. The command is also available as !PREFIX, so that it can be used in INIT*SYSTEM
and similar macros.
The prefix can be set explicitly with PREFIX. It is valid until replaced or cancelled by PREFIX OFF.
An automatic mode is provided, in which the prefix is set every time the Editor is entered, using the name of the task as prefix. The name of the
task can be seen from list of tasks in the output from !WHERE, where the current task is mentioned last. The automatic mode is set with PREFIX
AUTO and cancelled by PREFIX AUTO OFF. PREFIX STD sets the prefix according to the rule used in the automatic mode.
The current prefix is displayed every time the Editor is entered and it can be inquired with the PREFIX or WHERE command.
6. Editing notes
Objects stored in the database can have notes, i.e. descriptive texts added by the user for documenting the object in some way. The first line of
the notes is visible in the catalog. In most cases, these texts can be added by the NOTES command (or equivalent) in the respective tasks.
Alternatively, they can be added or changed under the Editor.
Editing of notes starts with the GET NOTES command, for example
GET NOTES/TAB*TEST
Because this function is not restricted to a particular type of object, the full database name must be given. For geometric objects, this is the same
as the command name. The IP (include prefix) option in the general catalog command shows the database names.
The success of the GET command is dependent on the existence of the object - not the notes. If the object has no notes, the work area will be
empty.
The notes are then treated as any other text. When finished, the result is stored with REPLACE (no parameters).
New objects other than texts cannot be created under the Editor, therefore NEW or RENAME cannot be used in connection with notes.
CAUTION: do not treat notes with the Editor at the same time as the object is being used in its normal environment (e.g. loading condition under
LD).
When editing a text normally, notes can be added to it by the NOTES command.
7. Special functions
The Editor offers a number of functions of more general nature than mere text editing. One important group is formed by functions related to
programming.
TRANSLATE translate
CAT catalog
CMP compile
Various functions
9. Editor commands
This command runs the lines in the editor as a macro. Before the commands are run, the editor
is exited.
S: (opt) run the macro in step mode. Alternatives SS, SSS as in the !ADD command
EXAMPLE
ADD ('HULL')
A text or part of it is inserted into the work area after the current contents.
The command has the effect that if a directory is not explicitly given in the name of a text, the
given directory or data base unit is assumed. Without this command, the project data base
(DB1) is assumed.
ATTACH directory
directory: name of directory. If directory=OFF, a previous ATTACH is cancelled. If the name is omitted,
the name of the current directory is displayed.
ATTACH DBn
The data base unit n is made the assumed text storage place. DB1=main project data base,
DB2=system data base, DB4=auxiliary project data base. DB3, DB5 and DB6 are available as
separately defined in a !OPEN command.
A napa run is started as a batch process using the current work area or a given text element as
input.
dir>file: special case; run the specified command file instead of a napa run
dir>prog: napa program to use (optional, default is the one defined in installation parameters)
options: batch options (optional, see the BATCH command on the TASK level for details)
CAT catalog
The command gives list of texts in the project data base or in the current directory. Two forms
are available, depending on the options.
This syntax starts the simple catalog function (only one before rel. 95.1). One page at a time is
listed in the order implied by the sort option. This catalog obeys the current ATTACH,
default=project data base.
Any other syntax than the preceding one starts the general catalog function as explained by
!EXPL CAT/GEN. NOTE: does not obey ATTACH, the data base selection must be given in the
command, default= DB1.
GEN: (opt) explicit selection of the general catalog, for special cases when the syntax cannot be
distinguished from the one above.
NP: (opt) (no prefix): do not apply the prefix (see command PREFIX), default=restrict the catalog
according to the prefix.
nnn$: character with ASCII code nnn (note: always three digits) The character ~ (tilde) serves
as fill character (matches any character). It may be redefined in your installation.
~: will be replaced by the characters in original line, mathed by corresponding fill characters in
'string1'.
L$: stands for the string matched in the original line, converted to lower case
U$: as L$, but converts to upper case NOTE: L$ and U$ imply option R.
nnn$: as in 'string1'
lines: (opt) selection of lines among which to do the change (see command PRINT). In addition,
#=lines found by preceding locate. Default=current line.
R: (opt) repeat the change if there are several occurrences of string1 within the same line
(otherwise, change the first one only) Line selection ALL implies R.
(col1,col2): (opt) restrict the change to the characters in columns col1...col2. The column range may
include the assumed spaces after the actual contents.
NOTE: any character can be used instead of the slash, provided that it does not occur in
string1 or string2.
EXAMPLES:
C /FR1/FR1A/A
C /FR1/FR1A/1,9999
C / /*/# (73,73)
C -/~, --A
C /~/L$/A
C /E$/;/1,999
The result of the SCAN dir CALLS operation is listed with command LIST. The dummy
command CLIST is used for separating the explanation. The result is written into listclass 1.
mod: module from which to start list of references. Further references from listed modules are listed
up to a specified level. Alternative=ALL, meaning all top level modules in the sense that no
other module in the directory references it.
level: (opt) number of levels to be included, default=no limit. If the level is given negative, references
are listed in the reverse direction, i.e. modules which reference the given one.
S: (opt) 'short' list only the modules occurring at end of the reference chains (or at the specified
level)
EXAMPLES
LIST CALLS LOAD LDA
List all 'top level' modules. Some modules may appear on top level because they are not used.
If many lines are deleted by another form than D A, a confirmation is asked for, otherwise the
deleted lines will be appended to the alternate text, allowing rescue of accidentally deleted
lines (see command MOVE).
DELETE, lines Q !
lines: selection of lines, as in command PRINT, in addition #=delete the lines selected by the
preceding LOCATE command.
Q: (opt) ask permission to delete for each line separately. Does not concern D A (delete all).
DELETE, *
A given text line is split into two lines. This function is intended for making space for text to be
inserted. The following lines are resequenced if necessary.
div: place where to divide, given by the last characters to remain on the first line. Unless specially
designated, the division takes place at a word limit. The following variations are possible:
div!: allows division in the middle of a word. The exclamation point is not part of the matching
string.
EXAMPLES:
Given text line:
The update is made up of parts from the following sources:
DIV up
Result:
The update is made up
of parts from the following sources:
DIV up!
The up
date is made up of parts from the following sources:
This command starts the document formatter, using either the work area or a stored text as the
source text. To get access to explanations of the commands of the documentation system, use
!COM DOA or !EXPL xxx/DOA where xxx is a doc. command such as .C, .SET.
name: name of text in the project data base (no ATTACH given) or in the directory given by
ATTACH.
printer: (opt) name of printer. If the printer is given, the result is sent to it, otherwise it is displayed on
the screen.
options: (opt)
NF: (no figures) omit figures, but reserve the space. In HTML output, the effect is not generate
the picture files.
FTOC: (fast table of contents) as TOC, but omit all text processing (page numbers will be
incorrect)
TOCF: write the table of contents before the text. The text will be processed twice (error
mesages may come twice)
FILE='file': store the result in the given file, default=reserve a file from TEMP. Implies N (=no
spool). For a Windows printer, the file name can also be 'preview:' to show a preview of the
print job, 'clipboard:' to copy the first page of the print job to the clipboard, or 'file:' to send the
print job to a system specific file. For HTML output, this option is compulsory. NOTE!: figures
are stored in the same directory, as if created by !SEND TO BMP commands. The figures are
named as in the .fig commands. See options NF, IF.
This form is used when the source text is in the work area.
F: add formatting specifications at the start of the text. All lines (max 9) preceding a line
beginning with . .. are added in addition to those specified by 'lines'.
PN=(p1,p2): restrict the output to pages p1...p2. If the chapter number is included in the page
number, it must be included in the selection, for example PN=(2-1,2-100). The table of contents
is not included, if needed use DOC ... TOC.
Output the document on the screen, but formatted as for the given printer. Because the printer
(usually) has more characters on the line than the terminal, part of the left margin is moved to
the right. Too long lines are truncated.
DOC I
Enter the documentation formatter interactively (without stored source text). Useful mainly for
running !EXPLAIN, !COM for doc. commands. Finish with .OK.
EXAMPLES:
DOC (no parameters)
The work area is processed and the result displayed on the screen.
DOC TOC IND
As above, but show only table of contents and keyword index.
DOC TO PR1
The work area is processed and the result is sent to the printer PR1.
DOC SYSDOC>USE TO PR1
The file SYSDOC>USE is processed and the result is sent to PR1.
DOC 100+21
Lines 100...121 of the work area are processed and displayed on the screen.
The command is otherwise equivalent with MOVE, but the given lines will not be erased.
If the current text is new or is modified after reading, and it has not been saved or replaced, a
warning is given. If the text was intended to be saved, it is possible to re-enter the editor and do
the saving.
The translations belonging to a given translation list are entered/updated in this task. The
keyword list (ENGL*name) is maintained with normal editor commands. The translation list
(TRAN*name/lang) must be created with command NEW if not existing.
Within the lines designated, variable references are replaced by the current values. Variable
references have the form *a or *(expression) where 'expression' is an expression as specified
in the !CALC command and 'a' a variable. Assignment of variables can be done with the !CALC
command or by lines of the form *a=value or *a=expression.
EVALUATE lines *
*: (opt) save the initial lines as comments. In this case it is possible to repeat the evaluation with
new values of the variables.
The command reads a text into the work area. The previous contents of the work area will be
destroyed.
GET textname
textname: name of the text, possibly including the source. The following syntaxes are possible for the
name. Except for the project name, the same syntax is used in all commands that refer to texts.
name: the name is the name of a data element in the current version of the current project,
unless otherwise specified by command ATTACH. If the name does not contain an asterisk,
prefix DATA* is added to give the name used internally in the data base. If the prefix is on (see
command PREFIX), the prefix is added, unless the name already contains a point. If the name
begins with LIST*, the auxiliary data base (DB4) is implied.
name/version/project: data element in the given version of the given project. NOTE: after
reading, the text is treated as if read from the current project and version.
DBn>name/ver: text in the given data base unit (n=1...6). An asterisk in 'name' is treated as
presented above. /ver is the optional version. See ATTACH command for presentation of db
units.
GET NOTES/object/db
The notes of the given object are fetched to the editor work area, can be restored with
REPLACE.
object: object, the notes of which are to be treated. It must be expressed by its full data base name.
e.g. DRAW*PLAN1 for a drawing, TAB*MYTABLE for a table, 'LD*CON(L1)' for a loading
condition, LQ*HYD*SPECIAL for an LQ.
/db: (opt) data base, either DB1...DB7 or SYSDB, NAPADB, default= DB1 except for DRAW*, LIST*
(4).
EXAMPLES
GET HULLF
The text HULLF is read from the project data base (no ATTACH assumed.
GET HULLF/X
GET SYSDOC>STEXT
GET DB2>INIT*NN
GET NOTES/TAB*PENCODES/SYSDB
GET *
GET ROOMS
GET PLOTGM.BODYPLAN
The name PLOTGM.BODYPLAN is used as given (contains a point). entering the editor with
EDIT <curve> or similar.
This command can be used to inform the editor of the way kyrillics are currently entered.
Conversion between the forms can be done with command TRANSLATE. Without parameters,
the current (assumed) coding system is displayed, using the numbers shown below. Presently,
this function is taken out of use.
KRM mode
EXAMPLES:
LIST LD-DATA
List module text DM10 from the start to the line containing asterisks.
string: string to be located. If it contains spaces, it must be enclosed within apostrophes. The
apostrophes also cause upper case and lower case to be distinguished. The character ~ (tilde)
serves as wild card (matches any character). It may be redefined in your installation.
lines: (opt) selection of lines among which to search the string (see command PRINT). If omitted, the
lines following the current line are searched until the first match.
The command runs a list showing the macros referenced from a given one and the line counts.
After giving the MAP command, the macro to be checked is entered by an !ADD command as
when running it. Should not be used with macros containing !DO or !VAR ON. Note: an !add as
the last line is ignored.
The command is otherwise the same as APPEND, but the the text will be inserted after the
current line.
This command is obsolete and not supported any more. To avoid errors in napabasic
interpretation, semicolons (;) are always interpreteted as Napabasic statement separators in
macros started with !ADD, ai.add() and ai.run() and always interpreted as plain text in
reporting-macros started with mn.doc()
MODE mode
MOVE n1 TO n3
MOVE n1,n2 TO n3
Lines n1 or n1...n2 are moved so that line n1 will obtain number n3 and the following lines
numbers n3+1, n3+2 etc. If any of the new line numbers coincide with existing lines, automatic
resequence is done so that no lines are overwritten.
Delimiter TO is optional.
Restriction: the move must be a genuine move, i.e. the lines must be moved past some other
lines.
MOVE ... *
This command creates a new, initially empty text in the work area. Previous contents of the
work area will be erased.
NEW name
This commad add comments to the text, using the standard NOTES command (see !EXPL
NOTES/GEN). NOTE: notes cannot be stored with text files, only with texts stored in the NAPA
form.
In number mode, all lines entered, which do not begin with an asterisk, are treated as a new
line of text and added to text as such, at the line number displayed. Exit from the number mode
is done by preceding the next editor command with an asterisk (e.g. *P). A single asterisk can
also be used.
NUMBER n1,dn
dn: (opt) increment. Default 10 if the initial line is after the current text, otherwise 1
NOTE: In number mode, existing lines are never overwritten. If necessary, the editor performs
a resequence.
Same as command END, except that no warning about missing SAVE or REPLACE is given.
See command END.
A napa run is started as a background process using the current work area or a given text
element as input.
dir>file: special case; run the specified command file instead of a napa run
dir>prog: napa program to use (optional, default is the one defined in installation parameters)
The task specific prefix is provided as a tool for organizing macros. The prefix is added in front
of the name entered in GET, NEW ao commands when forming the total data base name. It is
also used as criterion in the CAT command. Thus, when the prefix is active, other macros than
those of the current group are made invisible. Note: a name containing a point will be used as
given. Without parameters, the current prefix is displayed.
PREFIX prefix
PREFIX OFF
Sets/cancels the automatic mode. In the automatic mode, the prefix is set according to the
current task when entering the editor. The !WHERE command tells the current task.
PREFIX STD
EXAMPLES
PREFIX DR.
The prefix is set to DR. For example, NEW PLAN will create a macro named DATA*DR.PLAN,
same as NEW DR.PLAN; without the prefix.
PRINT, lines
n1 and n2 in the syntaxes above can be replaced by a text in apostrophes, designating the first
line encountered containing the given text. The fill character ~ (tilde) is obeyed as in command
LOCATE.
options:
(col1,col2): restricts the columns for text matching to the given ones (concerns lines designated
by contents).
LIST: do the output to listclass 1 (=as a result list). This implies the N option. With LISTN, the
numbers are obtained. Note: if the result list is not already opened, an unnamed list is opened.
PRINT P
Special case, print the lines surrounding the current one (+-5), Keep the initial current line
(default=last line listed).
PRINT lines *
EXAMPLES:
P 12,30
Print lines 12 to 30
P +12
P TO '***'
Print from the current line to the first line containing three asterisks.
Print from the first line containing .C2 in columns 1...3 to the next one identified similarly.
The name of the current text in the work area will be renamed. Note that the name of the text
also specifies where to store it.
RENAME, newname
This command is otherwise equivalent with SAVE, but it must be used when an existing text is
overwritten.
REPLACE *
This command replaces the current text if any changes have been done, otherwise the
message REPLACE NOT NEEDED is given.
RESEQUENCE, n1,dn,*
n1: (opt) new line number of the first line, default 100
*: (opt) correct line numbers in @GOTO and @IF statements. This is done automatically if the
text begins with a comment line ** PROG.
The text in the work area will be stored. If a text with the given name already exists, the
command REPLACE must be used.
textname: (opt) defines where to store the text. The alternatives are the same as in command GET. If the
name is omitted, the name of the work area is used (as defined by command NEW, GET or
RENAME). NOTE: the name of the text in the work area will NOT be changed.
lines: (opt) line selection as in command PRINT, default=the whole text. Alt. # as in command
DELETE.
Files are selected from a directory and some action is performed on each one of them.
function: function, see below. There may be parameters associated with the function, which come before
the the following parameters.
subset: (opt) restricts files to be treated. Any combination of the following can be used:
dir>modlist: select only files listed in the module list The criteria above can be reversed by
adding a minus sign, e.g. ->xxx
maxnr: (opt) max.nr of files to be scanned (the number of actually selected files may be smaller)
sort: (opt) *=sort alphabetically, +=sort by date, youngest first, -=sort by date, oldest first. The default
depends on the function
The main parameters must be given in the order specified but the options (subset etc) can be
given mutually in any order.
EXAMPLES
SCAN TEMP CAT >T
Select files in temp, the name beginning with T and ending with DXF
G1 CAT,LOC,SEL
CAT
Print name and date of the files.
Sorting default: alphabetic.
LOCATE string1, string2 ... S
List all lines containing the given strings. Lines containing
one of the given strings are listed with the line number.
Option S stores a list of files containing a match in array NLIST.
A string beginning with * is treated as a wildcard.
Sorting default: alphabetic
SEL
A list of selected texts is stored in array NLIST and the
corresponding dates in array DT.
The names are stored without directory.
Sorting default: alphabetic
G2 DEL,SEND,CHG
DEL
delete selected files older than 24h. No verification asked if
directory=TEMP
SEND
Send the selected files to the current printer.
CHG old1 new1 old2 new2 ... REP NQ
Replace strings 'old' in the files selected by 'new'.
With the optional parameter REP, all occurrences of a string
on one line are replaced, otherwise the first one only.
Option NQ (no query) does the change without asking for
verification.
Sorting default: ascending date.
G2 SPEC
SPEC sel
List the procedure specifications (NAPA conventions assumed).
The optional parameter determines the result as follows:
S: only short descriptions + form of call (default)
L: all type declarations included
F: all lines up to the asterisk line
other: keyword: short form, only texts containing the keyword
Sorting default: alphabetic
The text in the work area or in a given file will be printed on paper.
options:
K: surround output with control codes for sel. alt. char. system
K=type: convert the coding system from the system given by 'type' to that of the printer. For
alternatives, see command TRANSLATE.
If the text in the work area corresponds to a stored text, the date of that text is written in the
header. If the text is initially created in the work area or modified after reading, only the current
date is printed.
This command sorts a set of lines into alphabetic order. The mutual location with respect to
other lines is not changed. A command with no parameters is not accepted (precaution against
accidental use).
options:
C: case insensitive
TRANSLATE translate
This command translates text in the work area or performs conversions between different
kyrillic representations.
TRANSLATE lines *
This form performs translation from English to the language given in a previous *LANG
command. When needed, the translation list to be used can be assigned using the command
*TRL.
TRANSLATE lines r1 r2
This form changes the representation of kyrillics between different coding systems or between
kyrillics and the sound-equivalent latin representation.
L: latin translitteration
UNSAVE name
name: name of text to be deleted. The same alternatives as in the GET command can be used.
The name of the text currently treated is given. If the storage place of the text is other than the
project data base, it is also displayed. The version is printed if it is other than the default one.
The default source (from ATTACH) and prefix (from PREFIX) are listed if given. The prefix is
given in parentheses if not active because the attach is to a text directory.
1. General
2. Overview of functions
2.1. Preparing files
2.2. Table of contents
2.3. Copying between files
2.4. Reading and writing descriptions in ASCII format
2.5. Mending files
2.6. Removing obsolete data
2.7. Description editor
2.8. Inspecting and changing files on word level
2.9. Progress indicator
3. Selecting the database unit
4. Selection of subsets
5. Making catalogs
6. Copying descriptions
6.1. Copying between files
6.2. Copying inside the current project
7. Reading and writing the ASCII format
8. Common options in COPY and LOAD
9. Rescuing damaged files
10. Deleting descriptions
11. Description editor
12. Specification of commands
1. General
This chapter describes the facilities available for manipulating database files. A NAPA database contains packets of data called descriptions.
The section Short introduction to data management in the System document presents this concept more closely.
The task contains two subtasks. The first one is the one initially entered, and it contains functions regarding files as a whole or sets of descriptions
in the file. These functions include:
The second set of functions is formed by the description editor, by which individual descriptions can edited in terms records and elements.
Command DED leads to this subtask, while command DB or OK lead back to the main subtask. An additional subtask DBI (database inspection) is
merely system maintenance purposes.
2. Overview of functions
The files intended to be used as database files or intermediate output files must be prepared, i.e. given the required internal structure. When
needed, this can be done in this task. When preparation is applied to files already in use, the current contents are erased. Preparation is
analogous with formatting a disk.
Preparation is automatically done if the file is created with the command !OPEN, using option NEW.
The contents of a file can be listed giving name, version, date and type of descriptions. Subsets can be selected and sorting can be done in
various ways.
Subsets of one file can be copied into another. Descriptions in the receiving file with identical identification as copied descriptions will be
overwritten, other descriptions in the receiving file will not be affected. Copied descriptions keep their date but the user registered is changed.
Copying entire files is more efficiently done with the commands of the operating system.
Descriptions can be written in text form or read from that form. This facility is intended for transfer between machines using different binary
representations.
When this is written, NAPA is used on machines having two types of binary representations:
PCs
UNIX work stations (SUN, HP)
These representations can be converted to each other dynamically when reading or writing, and the ASCII format is presently needed for special
cases. Older versions of NAPA are still being used on VMS, and transfer between these is one case where this service may be needed.
If the internal structure of a file has been damaged because of a hardware error or some malfunction in a program, it is often possible to rescue
most of the file by deleting damaged descriptions. A function is provided for detecting and/or deleting such descriptions.
A more powerful operation (RSC) is available for repairing a file more thoroughly damaged. In this operation, the directory is not used, but the file
is scanned for any readable contents and from these, a valid file structure, is created. Descriptions marked as deleted, but not already overwritten
will be restored (the deleting is made by making a note in the directory). A subset selection is obeyed.
Data which is no longer needed can be removed with the DELETE command or by using TIDY. The DELETE command is suitable for deleting
smaller sets, while TIDY is a larger operation, where a tight structure is generated for the remaining data. For removing versions, the subtask
TIDY in ADM is recommended, because then the project administration is also updated.
With the so-called description editor one can list and modify database objects, descriptions, in terms of their own structural elements, i.e. records
and record elements. This function was originally added as a tool for system development, but it is occasionally needed for doing changes not
supported by the standard functions. It is described briefly in this document.
The contents of single database records can be listed and changed. This function was created primarily to assist the development of the database
subsystem and it requires knowledge of the storing conventions. It is not described in this document.
Functions involving operations on the whole database may take a noticeable time. To keep the user informed, there is the possibility to use the
graphic progress indicator, provided that NAPA is not run in the TTY mode. The progress indicator is controlled by the function DB.INDICATOR. It
has three options:
@DB.INDICATOR('OFF') no indicator
An operation is considered long if the estimated time is over 10 seconds. The time is estimated by checking the duration of the first (estimated) 5
%.
If one wants to treat a file not initially assigned, the command !OPEN can be used. Note that !OPEN does not imply selecting it.
When given without parameters, the UNIT command gives a list of units currently open and the file names of the corresponding files. If a file has
another binary format than the one used on the current machine, it is marked in the list.
WS signals that units 2 and 7 have workstation format (SUN,HP). The format of the others is the standard one for the current machine (PC).
When opening a file with !OPEN, unit 5 or 6 should be used, as these are not used for the standard purposes. However, note that the system uses
unit 6 for temporary purposes such as getting an object from another project. Thus, if one enters the editor while in TOC and does GET
name/vers/project, the currently open unit 6 will be closed.
4. Selection of subsets
Many of the functions available concern sets of descriptions. Unless otherwise specified, all descriptions in the current unit will be treated. With
the SELECT command, subsets can be specified in various ways. It is also possible to specify an upper limit for the number of descriptions to be
treated.
The order in which descriptions are treated can be specified by the SORT command. Only the CATALOG function obeys the specified sorting.
The selection criterion is expressed with the database attributes name, version, type, date and user. It is given with the standard syntax, for
example:
SELECT VER=A
SELECT VER=A TYPE=G
SELECT DATE>950101 DATE<960101
SELECT -USER=JVH
5. Making catalogs
The CATALOG command lists contents of the current unit. Without parameters, the 'old' catalog function is used, listing names of descriptions
obeying the SELECT and SORT commands.
With parameters, the general catalog function is used. Compared with the simple catalog function, it offers more options for selection descriptions
and more alternatives for output. It obeys SELECT unless a different criterion is given among the parameters. For instructions, see chapter
Various services in document MN.2 and !EXPL CAT/GEN.
Note: the general catalog function normally has the implicit criterion VER=current which is not applied in TOC.
(Descriptions written with earlier releases than 95.1 do not have the user registered).
6. Copying descriptions
open the source and receiver files with !OPEN unless already open
assign the selection criterion if needed (SELECT)
if it seems useful, check the selection by temporarily changing the unit and doing CATALOG
make the receiver the current unit (UNIT)
do the copying with the command COPY FROM
close any files opened (!CLOSE)
Descriptions are copied to the same version as in the source file unless the VER option is given. Before carrying out the copying, opportunity is
given to check that the source and receivers are the intended ones.
A general principle is that data can be read from another project than the current one but not written to it. In the TOC task, there is no such
restriction, but it is considered good practice to apply it there, too.
Example:
The version B in project P1234 shall be copied to the current project, under version X.
!OPEN P1234 6 (the main database of project P1234 is made available as unit 6)
SELECT VER=B
COPY FROM 6 VER=X
!CLOSE 6
If one should want to check the contents of version B before copying, the following commands can be added after the SELECT command:
UNIT 6
CAT
If the source file does not belong to a project, the only difference is that the file name is given in the !OPEN command instead of the project, for
example:
!OPEN TEMP>BACKUP.DB 6
A typical use of the TOC task is to transfer a whole version to another file, keeping all data identical, including dates and registering of the user.
A different case is when only the selected items are transferred to a receiver already in use. Then, it is usually desired that the dates of the
transferred items and the user recorded reflect the operation done.
The choice can be made explicitly using option K (keep) in the first case and in the latter case, option D. If none of the options has been given, the
effect is the same as D when overwriting an existing object, else K.
Note: this logic is new in Release 2003.1: previously no date changes were made in TOC.
Data can be copied from one version to another within a given file. This is done in the following steps:
UNIT 1
COPY TO B
The options D and K have the same meaning as in the preceding case.
DUMP temp>p1234.dump
The option CONT must be given in order to add more contents with subsequent DUMP command. Use only an asterisk (*) in the place of file name
in the subsequent commands. When there is nothing more to add, the file should be closed with !CLOSE 11 (an instruction to this effect is given).
LOAD temp>p1234.dump
The data will be read to the same version as recorded in the dump file unless the option VER=version is added to the LOAD command. It is also
possible to give the VER option in the DUMP command. In both cases, the data should be restricted to a single version.
Note: a selection criterion given with SELECT is obeyed by default in DUMP. In LOAD, the criterion is obeyed if option S is given.
If one wants to see what descriptions are omitted because of these restrictions, option A can be given to the LOAD/COPY commands.
With the option CHECK, the operation is not done, only the associated listing, giving a preview possibility.
The options K and D, presented under COPY, are also available for LOAD.
Overwriting the project administration description (PROJECT) will normally cause confusion; therefore, it can be done only by giving the option
PA.
In most cases, the damage is local and the file can be rescued by deleting damaged descriptions. This is done with command MEND:
select unit
add selection criterion if useful. The operation is faster if it can be restricted, for example, to a given version
enter command MEND
The system will ask for confirmation before deleting a damaged description although in practice, there is little choice.
MEND requires that the directory of the database is intact, which is usually the case. However, if it is not, large parts of the database may be
inaccessible or the MEND operation may crash. Command CHECK D should in most cases tell whether the directory is correct. In case the
directory is damaged, there is the RSC command, starting a search through the database where intact descriptions are identified and reorganized
into a valid database file. It may be useful to simplify the operation by omitting obsolete versions. For this reason, the SELECT command is
obeyed in this operation.
Deleting in large scale for the purpose of saving space in the database can be done in task TIDY, where the normal case is to remove whole
versions. In this case, the project administration is updated automatically.
in subtask DED, the description editor, there is the UNSAVE command for deleting single descriptions
deleting groups of descriptions based on the selection criterion, done with the commands SELECT and DELETE
reorganizing the database with TIDY. This is otherwise the same operation as done in TIDY/ADM, but there is no updating of the project
administration.
The object to be treated is managed with the standard commands NEW, GET, SAVE, REPLACE, UNSAVE, WHERE. The GET command uses a
description already in memory if one exists. To be sure that the reading is done from the database, the option ! must be added. To transfer a
description from one file to another, one must change unit (the command UNIT) after reading and then use RENAME. Note: on other file units than
2 (system database) and 7 (NAPADB), the current version is applied as default and it may be necessary to give an explicit version (empty for data
belonging to DB2 or DB7).
Many of the functions concern the current description or current record. All functions which create, select or otherwise introduce a description
or record also make the component concerned current.
The command LIST gives a summary of the current description by listing the numbers, types and sizes of the records. DES D gives a complete
listing of the description while DES R gives a list of the current record. The format is available for input.
The command SELECT makes a record current by giving the record number of the record. Command NEXT selects the next record after the
current one.
In order to change the values of record elements, the command ELEMENT can be used, by which values are assigned from a given index on. One
can also use the format produced by DES in much the same way as lines are changed under the Text Editor. Note: string records must be entered
to the end when using this command.
Without other parameters than the options listed below U, the simple catalog function is used,
(the only one before rel. 96.1). Otherwise, the general catalog function is used, having the
options presented in !EXPL CAT/GEN.
CATALOG options
Start the simple catalog function. The sorting and selection given by the SORT and SELECT
commands are obeyed.
options: (separate items). Note: unknown option causes the general catalog function to be used.
A: show access rights (of the current user): r=read, w=write, e=execute. Capital letter=from
explicit restriction.
LIST: record the names in an array named LIST. The array will be reused at the next call with
this option or at exit from the TOC task. The corresponding versions are recorded in the array
VLIST.
Starts the general catalog function. The selection given by SELECT is used unless a
db-criterion is given in the command. Sorting options must be given in the command. This form
works as catalogs in other places but does not any of the functions specific for the TOC task.
prefix: (opt) restrict the catalog to names beginning with the given prefix. The effect is otherwise the
same as NAME>prefix, but in other criteria involving the name, the prefix is removed before
applying the criterion. The prefix must end with * or (.
EXAMPLES
CATALOG
Use the general catalog function. Record the size in bytes and store the result in a table.
The data base is checked for internal errors, either in the directory or in the descriptions, i.e.
the actual data. In the latter case, the function can be restricted to descriptions selected by
SELECT. Errors found are reported but no corrective action is taken (see MEND, RSC).
CHECK D
CHECK *
The descriptions selected by the SELECT command will be compared with the corresponding
reference descriptions. The reference descriptions have the same name as those to be tested
and read using data class 5000 (see !EXP !IOC).
The tolerance for reals is 0.01% of the abs. extreme in the record.
Abs. differences between 0.01% and 0.1% are printed with no mark
Abs. differences between 0.1% and 1.0% are marked with a '$'
Abs. differences between 1.0% and 10.0% are marked with a '$ $'
Abs. differences greater than 10.0% are marked with a '$ $ $'
This command starts copying of data from another file or between versions in the current file. In
both cases, the receiver is the current unit (see command UNIT), and the descriptions to be
moved can be restricted by the SELECT command. Before the copying starts, it is verified that
the copying is between the desired units and with the intended options.
unit: unit from which to copy. If the unit is not already open, it must be opened with the !OPEN
command.
VER=version: (opt) store the result under the given version instead of using the original version.
options: options, one or several from the alternatives below, entered as separate items:
CHECK: do not copy, but make a listing as if copied with the options given
Y: omit if a description with the same name exists that has the same or younger date.
K: keep date and user as recorded in the origin. Default except when overwriting an existing
table or geometric object.
PA: allow overwriting the description containing the project administration (named PROJECT,
version empty).
CRYPT=ON: encrypt the copied data. Similarly OFF=decrypt. Default=keep encryption state of
possible.
This command copies data within the current unit to a given version.
options: as above NOTE: In this case, SELECT VER=v ... ; must usually be specified in order to make a
meaningful operation (not checked).
For all the selected description, the encryption state is changed to encrypted or not encrypted.
The encryption method must be defined for the file (DB.ENCRYPTION)
CRYPT ON/OFF
The command gives access to the functions allowing the file contents to be inspected and
modified on word level. This function is added for testing, checking problems in the file and
similar, and requires knowledge of the internal file format.
This command gives access to the functions by which individual descriptions are handled. This
function is mainly intended for system development and for special cases.
The command starts deleting of the descriptions selected by SELECT. Unless otherwise
specified, permission to delete is asked for each description. The program will first check that
the DELETE command was entered intentionally.
For removing large sets of data, the TIDY command is recommended, leaving a better file
structure. NOTE!!: TIDY SAVES the selected descriptions.
DELETE NOQUERY
NOQUERY: (opt) when given, the deleting takes place without asking for verification of each description
separately.
This function is intended for transfer between machines of different type. All descriptions or
those specified in a SELECT command are converted to the card format and written as ASCII
text to the given file. The reverse operation is done with command LOAD.
file: file name given in notation of the operating system. May be entered as FILE=file.
dir>file: directory and file name separated by >. Converted to lower case.
*: the receiver is already open, (by !OPEN + !LINK 7 ... or because of a preceding dump with
the CONT option)
default=the version recorded in the dump. NOTE: normally this option is reasonable only if a
single version has been dumped (SEL VER=...).
CONT: (continue): leave the file open so that more items can be dumped by subsequent
DUMP commands. NOTE: use receiver=* in the subsequent commands.
O: use old format (pre 92.2, no special treatment of drawings). By default, drawings are stored
in the drawing dump format, otherwise the drawing dumps are machine dependent.
EXAMPLES
DUMP TEMP>T.DUMP
DUMP 'temp/t.dump'
As above, but change version to A and do not list the transferred descriptions.
This function changes the encoding of strings in the data base from Latin1 to UTF 8 or vice
versa. The type of coding registered for the data base is changed accordingly even if a subset
selection has been set. See service function DB.ENCODING for asking or changing the type
registered. Latin1 is used in all data bases created before rel. 2005.1. Unless Asian characters
need to be stored, both codings are useful, provided that the registered coding is consistent.
ENCODING type
type: new coding, either LAT1 or UTF8. No action if the current coding is the given one.
A new maximum size is defined for the current unit. Since release 96.1 the file size is allowed
to increase regardless of the registered size, however not more than 50000 records (unit 4) or
10000 records (other units) with respect to the size registered at the last opening.
ENLARGE, factor
the items given by the parameters are written into the file header
The command formats the file available as unit 8 to the format of a NAPA intermediate output
file. Any previous contents are removed.
IOF SIZE=n
n: Default 2097152(size in records).The larger the size, the longer an item will remain. Setting
512000=small(250MB), 2097152=default(1GB), 10000000=maximum(5GB)
Descriptions stored as card images in a file (command DUMP) are read and written into the
current DB unit.
file: file name given in notation of the operating system. May be entered as FILE=file.
dir>file: directory and file name separated by >. Converted to lower case.
*: the file must be opened in advance on FORTRAN file unit 11 (command !OPEN ... 11).
VERS=ver: (opt) store all descriptions under the given version, default=as recorded in the dump file. This
option should not be used unless the dump file contains a single version.
options: options, one or several from the alternatives below, entered as separate items:
Y: omit if a description with the same name exists that has the same or younger date.
CHECK: do not load, but make a listing as if loaded with the options given
S: omit descriptions not satisfying the criterion set by the SELECT command, default=ignore
SELECT.
K: keep date and user as recorded in the origin. Default except when overwriting an existing
table or geometric object.
PA: allow overwriting the description containing the project administration (named PROJECT,
version empty).
EXAMPLES
LOAD TEMP>TTT.DUMP
LOAD FILE='temp/ttt.dump'
Load the contents of the given file to the current data base unit, keeping the original version(s)
As above, but store the result under version A, omit if a description with same or younger date
exist.
This command restricts the number of descriptions treated in connection with functions
controlled by SELECT (CATALOG, CHECK, MEND, etc.)
MAX, n;
The command functions as CHECK, but errors found are corrected by deleting damaged parts
(after asking permission).
MEND D NQ
This commands concerns the directory, Option NQ (no query) makes any corrections without
asking. It is recommended to do CHECK D first. This function has been tested on the most
common case of data base errors, where part of the file is lost, and with it, parts of the
directory. In other cases, it should be used with care.
MEND, * NQ
This command concerns the descriptions in the file, i.e. the actual contents. Descriptions found
faulty are deleted. This descriptions treated can be restricted by command SELECT.
The command formats the given file to the form of an empty NAPA data base Before the
function is carried out, a confirmation is requested.
size: (opt) size of the directory, e.g. 25=small, 250=normal, 1000=large, default=250. The size of the
directory affects the performance of the file.
The command modifies the access rights of the currently selected set of descriptions.
READ=rgroups: (opt) groups having read rights. If more than one group, the names are enclosed in
parentheses. OFF=remove read restrictions, omitted=no change. Instead of groups, one can
give ALL=all have the rights or NONE=no one has the rights. NOTE: in order to remove an
access restriction, the user must have both read and writing rights. Presently, only alternatives
ALL and NONE are implemented for the user groups (others handled with dummy solution).
EXAMPLE
SELECT TYPE=G
RIGHTS READ=NONE EXECUTE=ALL WRITE=NONE
This command can be used when a file has been damaged so that the directory cannot be
used. A search is made through the file and a valid file structure is generated for all intact
descriptions found. Descriptions marked as deleted but not yet overwritten will be restored. The
descriptions to be saved can be restricted by SELECT. Note: subcriterion USER in SELECT is
not supported.
RSC ! L NQ
!: (opt) dummy option: must be given if no other option is given. (Precaution against unintentional
use).
NQ: (opt) (no query): without this option, permission to continue is asked after the descriptions to be
saved have been selected.
The subset defined by the SELECT command will be used to control the CATALOG, COPY,
CHECK, MEND, DUMP, DELETE, TIDY, RSC, COMP and RDE functions.
criterion: selection criterion in the usual syntax (see !EXPL SEL/GEN). The selection can be based on
NAME=description name, VER=version, TYPE=type, DATE=date and USER=user. For TYPE,
the special symbols C=curves, S=surfaces, R=rooms, SO=surface objects, G=geometry and
TAB=tables are available.
R: select only descr. to which the current user has read access. -R: exclude these. Similarly
E=execute rights, W=write rights. Similarly E=execute rights, W=write rights.
D: include descriptions marked as deleted (but not yet overwritten). -D: select ONLY deleted
descriptions.
EXAMPLES:
SELECT, VER=A, NAME>DATA options
Select descriptions with version=A,B or C, the name of which begin with HULL. Show only
those to which the current user has no read access.
Select descriptions newer than the given date and with type in the given range (1001=curves,
1003=surface,1004=rooms).
The command specifies the order in which the descriptions are to be listed by the CATALOG
command. Default is no sorting.
SORT, sel
OFF: no sorting
This command starts a similar as under subtask TIDY/ADM for the current data base unit, but
without any connection to the project administration. The contents of the current file are
reorganized SAVING the subset selected by SELECT. Without a selection criterion, the effect
is only to remove any possible fragmentation. NOTE! It is recommended to always make a
backup copy of the project file before running TIDY.
For Server Type Projects the command will only compress and repair the database and the
options will be ingored. To execute other operations to the descriptions of the database you
must use TIDY/ADM
TIDY ! NQ L
!: (opt) dummy option: must be given if no other option is given. (Precaution against unintentional
use).
NQ: (opt) (no query): without this option, permission to continue is asked after the descriptions to be
saved are selected.
When descriptions are deleted from the data base, they are only flagged as being deleted but
not removed. The space occupied may be later reused, but until then, the deleting can be
canceled with this command. It will affect all descriptions covered by the current SELECT. Se
options D, +D in CAT.
UNDELETE
This command defines the current unit, which will be used in all functions where another unit is
not separately specified. If the unit is not already open, it can be opened by the *OPEN
command. Without parameters, the current unit and the file names of all currently open units
are displayed.
UNIT, unit;
unit: unit number (1 ... 7), default is lowest unit available when entering the task.
The TOC task handles data base files without taking notice of the purpose of these files, and
the unit number is simply a way of designating different files. Note however the standard
assignments done by the monitor:
When listing the open units, a file created in a foreign environment is marked: PC (INTEL), WS
(SUN. HP ao), VMS.
1. Preface
This release introduces a new database solution for NAPA. The new server database is amending the NAPA database solution: both
database types are available to be used in NAPA. The database formats are also interchangeable meaning that, for example, a ship
project stored in the server database can at any point be easily converted to be stored as traditional NAPA binary database file and vice
versa.
Albeit being robust and performant as such, the traditional file system based NAPA database solution has certain well-known drawbacks,
especially when working in multi-user setup. Sharing the database files via network filesystem, with all the necessary locking for
modifications and downloading the whole modified files to each user, easily introduces performance problems. This is the case especially
if the corporate network is crowded or contains low bandwidth parts. Obviously, the scalability of this kind of setup can become an issue
when the number of simultaneous users increases.
ServerDB concepts attempts to avoid the networking related problems by keeping a master database in the corporate network and a
local copy of the database for each user. All the read and write happens to the local copy; however, in the background, NAPA
synchronizes all the content of local databases and the master database as presented in the figure below.
The main differences when compared to the NAPA traditional database setup thus are:
Database server, comparable to network file server, has to be installed and configured in e.g. the company intranet in such a
way that all the local servers can connect to it.
Client database (server) has to be installed and configured in each individual workstation that needs to be able to access the
data stored in the master database.
The subsequent chapters describe how to install and configure the database servers.
When a project is stored in the database servers it is called a “server project” simply to distinguish it from the traditional binary .db and
.sd files. A typical server project setup would be such that each project user has a local copy of the project, stored in a locally running
database, a “Local Server”. Napa then keeps the local copies of the project data synchronized between the end users by having one “M
aster Server”; owning the primary copy of the project data,
Once the local server is connected with the master server, NAPA can automatically synchronize the local project content by copying the
project descriptions from the master server to the local servers and vice versa. Note that users can fully control (start/stop)
synchronization but they will never modify the data in the Master Server directly. Master Server will be accessed and modified only by
NAPA, via synchronization. That is, modifications will be first done in the project data inside the local server, and NAPA will then
asynchronously replicate the modified data to the master server, and via the master server to the local servers of the other concurrent
users of the project.
Management of the server projects and the traditional NAPA projects is in many respects similar. For example a Server Type Project can
be Registered/Unregistered as any other project and opened and used as any other project. However, currently the biggest differences is
that server projects still do have certain limitation in terms of NAPA functionality described in chapter “New/Modified Service Functions
and Limitations." These limitations will be addressed in the future NAPA releases as well.
One of the most important differences when compared to a conventional project is that a server project must have a unique name (per
server.) This rule is valid for “Local Server” and “Master Server”. The reason for this is that NAPA uses the name of the project to identify
the (synchronized) copies of the project.
An important limitation is worth mentioning: NAPA will synchronize the content of the local databases (copies of the master
database) but it will not automatically synchronize or update the (local) states of the NAPA applications. Consider the following trivial
example: user A has plotted an object from a shared ship project. User B then modified the geometry and stores the changes in
database, and the modifications are then automatically synchronized in A's local database. However, whatever was plotted is not
automatically updated on A's display but must be explicitly refreshed by plotting the object again.
Note that it is possible to create a project that is neither replicated to, nor shared via a Master Server. It is called “Local Only (server)
Project”. Later such a project can be changed to a shared/replicated project by having a Master Server (URI.)
this service automatically the first time it needs the local database.
Note:the installer requires internet connection to run correctly. Also network connections between Master database and local client
databases must be available and working; this may for example require touching the corporate firewall settings.
iv. Write the name of the Master server in the rectangle reserved for this purpose and click 'Add' button.
Note: that the same user interface can be used for removing servers from the locally known master servers.
b. Creating a new server project
i. Select Project/New Project from NAPA main window. This will open 'Creating a New Project' selection UI.
ii. Check “Server” from “Location” group. This will show a list of the currently known Master Servers. Note that a new
servers can be added by writing its URI in the text box.
Note that it is not mandatory to configure a master server. In that case the project will be local only.
c. Opening a server project
NAPA operates always on local (copy) server project. If you open a project from a master server, NAPA will create a local copy
of it unless one exists already.
Whenever you open server project that exists in a master server, NAPA will inform you whether or not your local copy of the
project data is up-to-date. Once a local copy exists, you may open the project from the local server.
In order to open an existing project from a master server (for the first time):
i. Select 'Project/Open Project...' from NAPA main window. This will open the 'Open Project' dialog.
ii. In the dialog, expand the 'Remote Servers' folder and click the folder icon of the (master) server from which he project is
to be opened.
iii. Select the project to be opened and click 'Copy to Local Server then open'
Note: In order to download the latest version of the project data from the Master Server you will need to start the synchronization
- meaning that NAPA will automatically keep the project data consistent between Master Server (i.e. master copy of the project
data) - and Local Server (local copy of the data). Synchronization is started from “Project/Synchronization/Start Syncing From
Master”.
d. Deleting a project
Deleting a Server project can be done from the same user interface as opening a project. In order to delete a (local copy of a)
project from 'Open Project' dialog:
i. Right click the project you wish to delete
ii. Select 'Delete Project'
Note:
i. Deleting a project from Local Server will not delete the project from the Master Server.
ii. Also, to delete a project from the Master Server the User Status needs to be “Administrator” or so-called “full
professional user”.
e. Create a server project from existing binary project
In order to open an existing NAPA binary project as server type of project, you need to convert it. Note that this will create a copy
of the project, the original binary project remains unmodified.
i. Make sure you have opened the binary project you wish to convert.
ii. From NAPA main window, select 'Project/Convert Project...' This will open a 'Convert Project' dialog
iii. Fill in the (new) name for the server project.
iv. Select the master server for the project.
v. Select convert.
Changing the Master Server for a project can be done from the same user interface as Open Project.
This operation shows the log file, listing all synchronization operations done.
Service function MN.GETSYNCSTATUS allows the user to see the synchronization differences without modifying either master
or slave: descriptions that were modified in his local only, in master or descriptions that are in conflict (modified in both locations).
Please check the explanation text for more details.
h. Closing a Server Project
Server project, like any other project, can be closed by selecting “Project/Close Project”. When a Server Project is closed the all
synchronization is stopped automatically
i. Availability of Master Server
If the Master Server is not available, or becomes unavailable, NAPA will inform about this once. If any synchronization is started
the system will continue to retry that operation until the Master Server will be available again. When the Master Server is
available again, NAPA will inform about whether or not the currently open project is Up-To-Date or not.
The information messages are visible as notification from Windows System Tray.
Here are the service functions available to start working with server type SYSDB.
a. DB.COPYSYSDBTOSERVER()
This service function can be used to copy the binary sysdb to the remote master server. This operation you would have do it only
once when you want to move the sysdb to the master server.
b. DB.USESERVERSYSDB()
This service function can be used to copy the server type SYSDB from Master to the local server. It has to be done only for the
first time in all the local machines. It copies master copy of server sysdb to local server and start synchronization.
c. DB.SETDEFAULTSYSDB()
By default when you open NAPA it uses the binary sysdb from the path mentioned in your floating license. Now to use server
type SYSDB you should run this command to set the default sysdb to be server type. From then whenever you open NAPA it will
use the server type SYSDB.
d. DB.COPYSYSDBFROMSERVER()
This service function can be used to copy the server sysdb to the binary. This operation you would have do it only once when
you want to move the server sysdb to a binary NAPA Database format.
In order to convert your existing binary SYSDB to server type and start using it, you would need to do the following steps.
Convert and copy the shared binary sysdb to server type using service function DB.COPYSYSDBTOSERVER().
Start using the server type sysdb using DB.USESERVERSYSDB()
If you would want NAPA to use server type sysdb everytime it starts then use DB.SETDEFAULTSYSDB(); you can make NAPA
to start using binary sysdb using the same service function.
a. NAPA does not sync between the binary sysdb and server type sysdb; this means that when you want to use your
binary sysdb then you would have to convert your server sysdb to binary using DB.COPYSYSDBFROMSERVER().
b. Your current binary sysdb should be located at the same location mentioned in the floating license, but the server type
sysdb can be in any master server.
Functions that are not valid for Server Project Types* Modified Functions New Functions**
MN.GETSYNCSTATUS
* The Server Database Type doesn’t need these functions any more
Release Note
This tutorial will give you step step by instructions on how to start using ServerDB.
1. ServerDB installation
a. Get the installer from Napa Net
b. Run the installer ServerDbSetup.exe in the master server; meaning you would have to log in to the server and install the
software on it. Note: Setup requires working internet connection.
c. Select a folder where you would want ServerDB to be installed by selecting the Installed Path or else leave the default as it is.
d. Select the Project Files Path where you want the project files to reside.
e. Click Next.
f. This should now setup ServerDB on the selected folder and start the service.
g. After installation close the window.
1. ServerDB installation
a. Get the installer from Napa Net
b. Run the installer ServerDbSetup.exe in the local system; meaning you would have to log in to the server and install the software
on it. Note: Setup requires working internet connection.
c. Select a folder where you would want ServerDB to be installed by selecting the Installed Path or else leave the default as it is.
d. Select the Project Files Path where you want the project files to reside.
e. Click Next.
f. This should now setup ServerDB on the selected folder and start the service.
g. After installation close the window.
2. Convert existing Binary project to ServerDB project
a. Open an existing Binary project
b. Click Project -> Convert Project
c. Select the project which you have created for the Local Server
d. Press Open
4. Open a ServerDb project from Remote Server
a. Project -> Project Administration
b. Add the Master server name you want the project be opened from. Example
f. Click on Copy to Local Server then open. This will create only few NAPA descriptions to open the project, not the
complete project.
g. Now to download the full project from the Master Server you need to start "Synching From Master". Please follow the below
steps.
5. Synchronization
a. When you want to get changes from the master server
i. Click Project -> Synchronization -> Start Synching from Master
You will get notification from your operating system system tray about different status of your on going synchronization.
Example:
You can also check the log by right click on NAPA icon in the system tray and click Synchronization Log
Related articles
Content by label
There is no content with the specified labels
Uninstall ServerDB
Its very simple to uninstall ServerDB
Table of Contents:
1. Functions of group MN
1.1. Information related to the current run
1.2. Project administration
1.3. Run-time error functions
1.4. Various
1.5. Program and user information
1.6. Printing. macros, lists
1.7. Licenses
2. Events of group MN
3. Functions of group AD
3.1. Functions related to quantities and units
3.2. Standard syntaxes
3.3. Functions treating LQ,PQ,TOO,POO
3.4. Check and information of data items
3.5. Arguments, report control
3.6. Various
3.7. String functions
3.8. Database
3.9. Functions related to the reference system
3.10. Functions related to process tables
4. Functions of group DB
4.1. Function related to objects in the data base
4.2. Functions related to file management
4.3. Functions related to files in general
4.4. Functions related to data access and security
4.5. Various
5. Functions of group DM
5.1. Operations with descriptions
5.2. Operations with arrays
5.3. Various
6. Functions of group AI
7. Events of group AI
8. Functions of group AP
9. Events of group AP
10. Functions of the group OS
10.1. Dynamic memory functions
10.2. File I/O functions
10.3. Other functions
1. Functions of group MN
These functions cover the same subject as the MN subsystem: project administration, run environment.
The function value is the name of the current task, e.g. DEF, LD.
The function value is an array containing all active tasks, the current one at the highest index.
The output of the function is the commands needed to transfer control from the current task to
a given one, attempting to do it as economically possible and without entering the main task
level. The output can be done as a listing, to a given macro or by directly executing the
commands.
MN.CHGTASK(task,macro,opt)
task: new task, using the identifiers seen in the output from MN.TASK or MN.TASKSTACK.
macro: (opt) macro to which the commands are added (at the start). If omitted or zero, the macro is
created internally an run directly.
opt: options:
R: store the commands an an array returned as the function value. The array is reused at the
next call.
EXAMPLES
@MN.CHGTASK('DR')
@CMNDS=MN.CHGTASK('DEF',0,'R')
MN.ENV(name,opt)
The value is the db/directory set with the editor command ATTACH.
The file/element name of the current editor area is returned as in the output from WHERE.
The function concerns the current directory, i.e. the implied path when relative file names are
given.
dir=MN.CD()
stat=MN.CD(dir)
The function value is an array containing the versions of the current project or properties of the
versions. When given an array as receiver, the same information is returned in this array, and
the function value is the number of versions.
MN.VERSIONS(sel,project,array)
OWNER: owners
DES: description
project: (opt) return the result for the given project, default=current project. 'array' must then be given.
array: (opt) receiving array, see above. Compulsory if project specified. NOTE: the arrays returned
when this parameter is missing contain data for the project as the first item.
The function returns the current version, properties of the current version or properties of a
given version (in the current project).
MN.VERSION()
MN.VERSION(aspect)
aspect:
ID: identification
OWNER: owner
MN.VERSION(aspect,version)
As above, but for a given version rather than the current one.
EXAMPLES:
MN.VERSION('DES') description of the current version
MN.VERSION('OWNER','B') owner of version B
The function returns the current project, properties of the current project or properties of a
given project. With the exception of aspects 'path' and id', all results are fetched as stored in
the project administration. If the request concerns a named project (in contrast to the current
one or a project given by a file name) the administration data are fetched from the system data
base.
MN.PROJECT()
Return the name of the current project. If the project was originally specified by a file name
which could not be identified in the project administration, the last part of the pathname
excluding the suffix .db is returned in parentheses.
MN.PROJECT(aspect,project)
aspect:
DES: description
OWNER: owner
FILE: file name (of the main db) as recorded in the project administration
PATH: as FILE with the following differences: if the project is identified by a file name, this
name is returned as such. If the request concerns the current project, the actually used path
name is returned. In the other cases the result is fetched from the project administration, but if
needed, the path name is modified to suit the conventions of the current operating system.
project: (opt) name of project, default=current. May also be a file name (ending in .db).
EXAMPLES
!type Current project @mn.project() [email protected]('FILE')
@if NOT(mn.project('ACTIVE','P1234')) !Type P1234 not available
MN.PROJECTS(options,projects)
U: owner (1710)
T: description (1616)
B: precision (3264)
projects: description containing the names of projects of interest in record 1610. The properties are
returned in records listed above.
EXAMPLE
@d=dm.create('PROJECTS')
@nrec=dm.newrec(d,1610,3)
!sel 2 project* name>L
@dm.copy(list,nrec)
@mn.projects('VYHOT',d)
Store version, date, time, owner and description for all projects named L....
@test=mn.projectexists(project,version)
where
MN.NEWPROJECT(name,descr,status,dir,version,dim)
dim: array, dimensions for the initial version: lref, bdwl, tdwl, dx.
The function creates a project matching a given data base file. The file name must conform to
the normal rule (project.db), and the file must contain the PROJECT description.
MN.PROJECTFROMFILE(file,project,opt)
opt: options
MN.PROJECTFROMFILE('CURRENT',project,opt)
As above, but recording the current project. This alternative is intended for the case that the
current project has been started by giving a file name.
MN.CHANGEPROJECT(name,version)
name: name of project or name of project file. The latter case is distinguished by the occurrence of file
name delimiters (slash or backslash).
EXAMPLES
@MN.CHANGEPROJECT('P1234','B')
@MN.CHANGEPROJECT('/napa/projects/p1234.db')
Open the project, the main project data base of which is the given file,
The current project is closed without opening a new one. The function can only be run on the
task level.
A given project is deleted. The effect concerns the registration in the system data base and the
project files.
ok=MN.DELETEPROJECT(name,opt)
opt: options
F: force: delete even if there are problems with opening data base
The function selects projects according to various criteria and optionally fetches their attributes.
MN.SELECT(criterion,directory,list,darr)
criterion: string providing the selection criterion using the quantities NAME, USER, DATE, STAT, LA,
DES, FILE, DIR, SHTYPE, EXISTS. See !EXP SEL/MN7 for more details. Empty=select all.
directory: directory from which to select projects, empty=from those registered in the system data base
darr: (opt) integer array for receiving the reference numbers of the corresponding administration
descriptions. With this parameter, these remain in the run time memory and should be removed
when no longer needed (DM.DELETE).
MN.SELECT(criterion,directory,table,opt)
In this form, the result is written into a table containing also properties of the projects.
criterion: as above
directory: as above
table: name of table. A table with the given name is created and added to the run time table
administration but not written to the data base. By default the main properties from the project
administration are stored. See option R for more quantities. If the name does not begin with
TAB*, TAB* is added.
opt: options
R: include also reference dimensions from the reference systems (current version if not V
option). (current version if not V option). Stronger options are RR=add also group 'identification
and background', RRR=add group 'various', RRRR=all parameters
D: return complete path names (directory included). Relevant when 'directory' given.
MN.SELECT(list,directory,table,opt)
EXAMPLES
@list=arr(3)
@mn.select('USER=NN','',list)
@mn.select('LA<060101','temp',list)
Select all projects in the directory 'temp' that have not been used since 060101.
@mn.select('NAME>P USER=NN','','TAB*PROJECTS')
Select all projects, the name beginning with P and created by NN. Make a table names
TAB*PROJECTS containing the main properties.
MN.NEWVERSION(name,descr,dim)
dim: (opt) array, dimensions for the version: lref, bdwl, tdwl, dx. May be omitted if there is already a
reference system.
MN.NEWVERSION(name,descr,rvers)
rvers: version (in the current project) from which the the reference system and frame system are
copied.
MN.CHANGEVERSION(name)
MN.DEFAULTVERSION()
MN.DEFAULTVERSION(vers)
The functions returns the directory into which new projects are created by default.
The function returns an integer that is increased by one each time the project is changed or the
project is closed.
This function supports project administration in special cases like preparing of onboard data
bases. It creates or modifies the contents of the project administration description, stored with
the name PROJECT in the project data base or with the name PROJECT*name in the system
data base. The result is not written to the data base.
MN.ADMDES(admdes,'P',project,description,version,status)
admdes: pointer to description for receiving the result. Previous contents erased.
MN.ADMDES(admdes,'V',version,description,status)
F: force, accept even if there is no reference system as checked in the current unit 1 (NOTE!).
MN.ADMDES(admdes,'FILE',file)
file: name of the file containing the main project data base.
EXAMPLE
@d=dm.create('PROJECT')
@mn.admdes(d,'P','S1234','My Ship','A')
@db.write(d,'','',6)
@dm.delete(d)
The operations create and store a project administration description in the file currently open as
unit 6.
The function returns the category of the last error message after the previous
MN.CLEARERR() call.
@category=mn.err()
where
0: no error
1: notification
2: warning
3: error
4: fatal.
The function returns the category of the most serious error message after the prvious
MN.CLEARERR() call.
@category=mn.xerr()
where
The function returns the code of the last error message after the previous MN.CLEARERR()
call.
@code=mn.errcode()
where
The function returns the code of the most serious error message after the previous
MN.CLEARERR() call.
@code=mn.xerrcode()
where
The function clears the current error and/or releases the events related to error messages
(100021...100025).
@mn.clearerr()
MN.CLEARERR(level)
This form only releases the error events (100020+level). Before this, new events of the same
level are not raised.
level: error level, 1...5. With level<0, the corresponding event is locked.
@mn.seterr(category,code,string,end)
where
@mn.newerr(wid,category,code,string,end)
where
@mn.poperr(wid,category,string,end)
where
This function assigns a text that will precede subsequent error messages for the purpose of
providing information about the context in which the error occurred. NOTE: several such
additional texts may be nested. The function ADDS a new level and care must be taken to
cancel the setting.
MN.SETCONTEXT(text)
MN.SETCONTEXT('-')
MN.SETCONTEXT('--')
list=MN.SETCONTEXT()
The function value is a record containing the currently active messages or 0=none.
EXAMPLE
@mn.setcontext('Calculating speed')
...
@v=vol(hull)
...
@mn.setcontext('-')
The function returns the macro stack of the most serious error message after the previous
MN.CLEARERR() call.
MN.XERRMACROSTACK(receiver)
receiver: (opt) string record that will be populated with stack trace's lines.
The function returns the macro stack of the most serious error message after the previous
MN.CLEARERR() call.
MN.XERRNATIVESTACK(receiver)
receiver: (opt) string record that will be populated with stack trace's lines.
1.4. Various
This runs the transparent command given by the parameters. It cannot be used for !CALC,
!TYPE and !OUT.
MN.COMMAND(command)
command: string representing the command to be run. Double apostrophes are converted to single ones
and upper case conversion done as in normal commands. The command identifier must not be
abbrieved below 3 characters.
MN.COMMAND(id,parameters)
MN.COMMAND(id,arr)
EXAMPLES
@MN.COMMAND('!VIEW 3')
@TP.COMMAND('VIEW','3')
@S=ARR(3)
@S(1)='3'
@S(2)='11'
@S(3)='-1'
@MN.COMMAND('LINK',S)
Same as !LINK 3 11 -1
This function has been added for the purpose of getting the result of an EDIT command for an
object (e.g. EDIT HULL) into a description for further internal processing instead of entering the
editor. The result is named OBJECT*DEFINITION and reused if the EDIT command is
repeated. See also MN.FETCHEDIT().
MN.CONTROLEDIT(c)
This function returns the reference number of the description created by an EDIT command
after setting MN.CONTROLEDIT(1).
MN.FETCHEDIT()
MN.FILES(directory,filter,receiver,opt)
filter: filter for selecting a subset. Empty=not used. Case insensitive (before 2006.1 case sensitive).
receiver: either
description: the result will be stored in table format so that names are stored as record 1610
(NAME), file types as record 1506 (TYPE) and dates (NAPA internal form) as record 430
(DAT). See also option T.
array: string array for receiving the names. It may be followed by an integer array for receiving
dates and a string array for file types. The types are FILE (file), DIR (directory), DEV (device),
U (other).
opt: options:
S: sort by name. If a receiver is given for types, the sorting is first by type, then by name
T: the receiver is a table, just update the values. Default=remove original contents.
EXAMPLES
@nlist=ARR(3)
@n=MN.FILES('temp','*.dxf',nlist)
Return all files from 'temp' the name ending with .dxf.
@tlist=ARR(3)
@dlist=ARR(1)
@n=MN.FILES('temp','',nlist,dlist.tlist,'S')
Return the names, dates and types of all files in 'temp', sorted by type and name.
@d=dm.create('FILES')
@n=MN.FILES('/n/napa/gm','',d)
@filnam=rec(d,1610)
@fildat=rec(d,430)
Events are normally triggered by the main system functions at specified conditions. This
function is intended for special cases, allowing an event to be triggered from macro, for
example when the normal events have been suppressed. See also TP.GENEVENT.
MN.GENEVENT(id,par1,par2,...)
EXAMPLE
MN.GENEVENT('TP.CHANGE',0,4,3)
This triggers possible actions defined for changing a table element by input from the user.
oldm=MN.EVENTMASK(newm)
MN.COMMANDS(group,receiver,options,len)
len: (opt) line length, default=as currently defined (listclass 5 if receiver given)
MN.EXPLAIN(group.id,receiver,options,len)
com/task: command of the specified task, e.g. LIST/HYD. Relies on table TAB*TASKEXPL in
the NAPADB for connverting task names to explanation sources.
options:
C: the item should be a calculator function or NAPA BASIC command, C. or B. implied if 'group'
omitted.
len: (opt) line length, default=as currently defined (listclass 5 if receiver given)
MN.PARAMETERS(group.id,receiver,options,len)
options:
C: the item should be a calculator function or NAPA BASIC command, C. or B. implied if 'group'
omitted.
len: (opt) line length, default=as currently defined (listclass 5 if receiver given)
text=MN.ERRTEXT(nr)
This form returns the short error text as the function value.
MN.ERRTEXT(nr,rec)
This function performs the same function as !CDE for controlling the data echo of macros. The
function value is the state at the call.
old=MN.ECHO(c)
c: (opt) 0=echo off, 1=echo on. Without this parameter, no change is made.
MN.PAUSE() pause
MN.PAUSE(time)
This function is for internal use when preparing explanations for errors, commands and
functions. It creates the type of line numbering specified for the type of text. For error
explanations it also stores the extract named ESnnn, otherwise no writing is done.
errcode=MN.PREPARETEXT(name,text,unit)
The functions value is the comment text attached to the program when linking and as the last
character a letter telling the status, normally P=official production program, X=released for test
purposes, T=internal test program.
The function returns the build number of the program. Internal test programs have the
buildnumber -1, released test versions (xnapa) and releases have numbers greater than 1.
Example:
!cal mn.buildnr()
-> 458
The function value is the linking date of the current program (internal representation).
Example
!TYPE Program date @fdate(mn.progdt())
The function value is the run id formed by R (normal run) or B (batch) followed by the run
number and user id, e.g. R3421*NN.
MN.CUSTID() customer id
The function value is the customer id or customer name from the license file.
MN.CUSTID()
MN.CUSTID(1)
The function value is the machine identification as used in the license file.
MN.MACHID(address)
This function produces the same output as !LR but to table, i.e. data about currently registered
runs.
MN.RUNS(descr,options)
descr: receiving description. For use as a table, its name and type must conform to table conventions,
see example.
O: omit sorting: output as stored rather than sorted according to start date.
EXAMPLE
@D=DM.CREATE('TAB*RUNS',1970)
@MN,RUNS(D)
TAB; GET RUNS
The function value is the date (in the internal form) of the last time NAPA was started. This
information is fetched when the current run was started.
user=MN.USERID(opt)
This function gets data concerning users stored in the system data base and optionally
modifies it. Another data base unit may also used as source. Administrator's rights are needed
for changes in the system data base (unit 2).
MN.USERS(idarr,statarr,pswarr,desarr,opt)
statarr: (opt) array for receiving/inputting the user status: U=normally registered user, P=so-called full
professional user, A=system administrator. Default=U.
pswarr: (opt) array for receiving/inputting the check number corresponding to the password, default=0
desarr: (opt) array for receiving/inputting the descriptive texts of the users.
opt: options:
A: add users, properties as given by the input arrays. Operation canceled if a user already
exists.
M: merge: add missing users. Users listed in 'idarr' and already existing are ignored unless U
option is also given.
EXAMPLES
@idarr=arr(3)
@mn.users(idarr)
@idarr=arr(3)
@statarr=arr(3)
@pswarr=arr(1)
@desarr=arr(3)
@mn.users(idarr,statarr,pswarr,desarr,'5')
@mn.users(idarr,statarr,pswarr,desarr,'M2')
status=MN.USERSTATUS()
status:
MN.USERSTATUS(status)
This form changes the user status for the current run. The user status controls access to
certain functions. See also command !PRF.
The function checks whether the given printer is a supported Windows printer.
@test=MN.WPR(prn)
The function opens a result list (listclass 1). The effect is the same as with the NL command. A
list currently open is closed.
MN.NEWLIST(name,options)
options: (opt) other options, same as parameters to the NL command (see !EXP NL/GEN). The
parameters are entered as one string with possible apostrophes (') replaced by quotation
marks (").
MN.SEND(source,printer,options,spfile)
source: text to be sent, either name of macro (as in the !ADD command) or reference number of a
description.
options: combination of
M: add margin
spfile: (opt) name of spool file (in operating system syntax), default=reserve file from temp. For a
Windows printer, the file name can also be 'preview:' to show a preview of the print job,
'clipboard:' to copy the first page of the print job to the clipboard, or 'file:' to send the print job to
a system specific file.
Examples:
@MN.SEND('MYMACRO','','N')
The macro MYMACRO is sent to the current printer with line numbers.
@MN.SEND('temp>test')
@D=DB.READ('DATA*HULL')
@MN.SEND(D,'P2','MN')
The macro DATA*HULL is sent to the printer P2 with margin and line numbers.
This function does the same function as the DOC command of the editor.
MN.DOC(source,printer,options,spfile)
source: source text, either name of macro (as in the !ADD command), name of file directly or reference
number of a description.
spfile: (opt) name of spool file (in operating system syntax), default=reserve file from temp. Implies
option N (no spool). For a Windows printer, the file name can also be 'preview:' to show a
preview of the print job, 'clipboard:' to copy the first page of the print job to the clipboard, or
'file:' to send the print job to a system specific file.
Examples:
@MN.DOC('docs/nn/report')
@MN.DOC('LOADMANUAL','',TOC')
Run the source text LOADMANUAL (from the current project) to the current printer, making the
table of contents only.
This function gets a list from the IOF to a description in the form created by the SAVE AS
command in SCAN. NOTE: this function should not be used in the SCAN or PLOT tasks (not
checked). The function value is the reference number of the description created. It is named
LIST*name, where name=the list name. It should be removed from the free storage after use.
d=MN.GETLIST(selection,options)
lc: listclass (integer 1...8), last list saved in the IOF during the current run and from the given
listclass. The list must be closed.
d=MN.GETLIST(name,options)
This form gets the list with the given name from the data base.
options:
NODOC: omit page breaks and other DOC commands. Old synonym NPB still valid.
NOTAB: remove the tabulation flags (control-A, control-B) that support output with proportional
fonts.
EXAMPLES
@D=MN.GETLIST(1,'NH')
@D=MN.GETLIST('NAME=HYD')
Use the selected list in the .AL command of DOC. (!VAR ON needed). to the current printer,
making the table of contents only.
@D=MN.GETLIST('LIST*HYD','NPB')
This function does the same function as SEND or SAVE in SCAN. NOTE: this function should
not be used in the SCAN or PLOT tasks (not checked).
MN.SENDLIST(selection,options)
lc: listclass (integer 1...8), last list opened in the IOF during the current run and from the given
listclass. If not already closed, the list will be closed.
EXAMPLES
@MN.SENDLIST(1)
@MN.SENDLIST('NAME=HYD','TO P1 OVL=OVL-NAPA')
Send the last list named HYD... to the given printer and with an overlay.
A list selected from the intermediate output file (IOF) is saved in the data base. Same function
as SAVE AS under SCAN. The result is saved with the prefix LIST* for a normal list and
DBXML* for the DocBook version. Both are saved if associated with the selection.
lc: listclass (integer 1...8), last list opened in the IOF during the current run and from the given
listclass. If not already closed, the list will be closed.
name: (opt) name of the result (without prefix). Default=the list name as recorded in the IOF.
Example
@OK=MN.SAVELIST(1,'HYD-RESULTS')
Save the last result list in the auxiliary data dase under the name HYD-RESULTS (complete
data base name LIST*HYD-RESULTS).
1.7. Licenses
stat=MN.LICENSE()
stat=MN.LICENSE(task)
Tests access to the given task. 0=not available, 1=ok. NOTE inconsistency with the preceding
case. The value is 0 if the function is not available at all (as specified on the F-line) or the
number of users exceeded.
n=MN.LICENSE('N')
n=MN.LICENSE('NI')
Return number of runs that have been idle for the time specified by parameter TIMEOUT in the
installation parameters.
date=MN.LICENSE('DATE')
Return the expiring date (seconds). 0=no date limit in the license.
release=MN.LICENSE('REL')
Return the release to which the license is tied (2006, 2007 etc). 0=no release specified.
This function is intended for the case that there is no current license either at all or for a given
task. It tries to obtain one and reports the result by the function value: 0=ok, 1=main license
only ok, not task license, 2=no license at all.
stat=MN.GETLICENSE(task)
task: (opt), get license for the given task, default=only main license checked.
This function is primarily intended for the case that a license is hanging because of a run that
has crashed. It removes a license from a run with a given run id or an unspecified run
belonging to the current user. Return value: 0=no result, 1=license released and taken over,
2=license released only.
ok=MN.UNREG(runid,user)
runid: run id of the given run. empty=first one encountered belonging to the current user.
user: (opt) user to which the run belongs. Must be given if the user is a another than the current one
and in that case, administrator's rights are needed.
Function returns either availability (1=available, 0=not available) or license expiration date of
given feature (seconds). Note that function returns future expiration dates only; return value is
0 in case of already expired license. Note also that you should not assume anything about
current availability of a feature even if it has an expiration date in the future.
incl=MN.FEATURE(nr,option)
option: (opt) 'DATE' function returns license expiration date instead of availability
EXAMPLES:
MN.FEATURE(1) returns current availability of feature number 1
MN.FEATURE(1,'DATE') returns license expiration date of feature number
1
This function returns which version of the software is used. E.g. if you are using NAPA release
2009.1, the function will return the number 2009.1
2. Events of group MN
This event is raised when a new subtask is entered. The action is run immediately (NAPA
BASIC commands only). (100001). See also MN.TASKRETURN.
MN*TASKENTER(task)
This event is raised at exit from a subtask. The action is run immediately (NAPA BASIC
commands only). (100002).
MN*TASKEXIT(task)
This event is raised at when re-entering a task from a subtask. The action is run immediately
(NAPA BASIC commands only). (100003).
MN*TASKRETURN(task)
This event is raised when the prompt is changed. The action is run immediately (NAPA BASIC
commands only). (100004).
MN*NEWPROMPT(prompt)
This event is raised at exit to the main task level (100014). No parameters.
The event is raised before a version or project is removed from the run time memory (in
contrast to MN.OPENPROJECT, MN.OPENVERSION which are raised when the new project
or version is already active). (100015). No parameters.
The event is raised before a project is removed from the run time memory. It is raised after a
possible MN_EXITVERSION but before the project is actually removed. (100016). No
parameters.
MN*OPENPROJECT(project, version)
MN*OPENVERSION(version, project)
This event is raised when resetting the system (100007). Its actions are executed immediately.
MN*RESET()
This event is raised when exiting the system (100008). Its actions are executed immediately.
MN*EXIT()
MN*LOSELICENSE(task)
MN*LOSELICENSE(task)
This event gives progress information about the current task (100012).
MN*PROGRESS(info)
MN*READY()
This event is raised if a notice is given (error message of level 1). (100021). NOTE: new events
100021 are not raised until MN.CLEARERR() called. With MN.CLEARERR(1), the events are
released but not the error state.
MN*NOTICE(level,number,info,date)
level: fixed=1
info: text, additional info added to the message (not the text from db7)
This event is raised if a warning is given (error message of level 2). (100022). NOTE: new
events 100022 are not raised until MN.CLEARERR() called. With MN.CLEARERR(2), the
events are released but not the error state.
MN*WARNING(level,number,info,date)
level: fixed=2
This event is raised if an error message of level 3 is given. (100023). NOTE: new events
100023 are not raised until MN.CLEARERR() called. With MN.CLEARERR(3), the events are
released but not the error state.
MN*ERROR(level,number,info,date)
level: fixed=3
This event is raised if a system error given (error message of level 4). (100024). NOTE: new
events 100024 are not raised until MN.CLEARERR() called. With MN.CLEARERR(4), the
events are released but not the error state. Normally, the run is terminated before this event is
raised.
MN*FATAL(level,number,info,date)
level: fixed=4
This event is raised if an alarm is given (error message of level 5). (100025). NOTE: new
events 100025 are not raised until MN.CLEARERR() called. With MN.CLEARERR(5), the
events are released but not the error state.
MN*ALARM(level,number,info,date)
level: fixed=5
3. Functions of group AD
This group contains various functions related to quantity standard, LQ, PQ, date handling, reference system.
The function returns various properties of a quantity fetched from the quantity standard.
AD.FORMAT(qnt,property)
U: unit
C: unit conversion factor, -1=frame number For integers, unit=INT and for strings CHAR.
Dimension and conversion factor are 0.
S: symbol
arr=AD.FORMAT('','?')
Return an array giving set of available properties. If needed permanently, make a copy of the
array.
EXAMPLE
@f=FORMAT('VOLM','FORM')
The function returns a given number formatted according to the quantity standard.
s=AD.FMT(value,qnt,opt)
qnt: quantity
S: return a string formatted as done by !CALC (obeys !VAR NSD..). Unit conversion is applied.
L: remove leading spaces, default=return as many characters as specified by the field length.
EXAMPLES:
Assuming !FORM X 9.1 MM
AD.FMT(12.5,'X') -> " 12500.0"
AD.FMT(12.5,'X','L') -> "12500.0"
The function returns the reference number of a record in the quantity standard. The records are
those used internally and must not be changed.
arr=AD.FORM(property)
S: symbol
U: unit, index in records US,UC and UD (see below), -1=integer, -2=string quantity
SUMQ: key record for sum rules, quantity repr. by record number
SUMR: sum rules for quantities given by SUMQ: 1=D, 2=A, 3=MIn, 4=MAX, other=record
number of weight quantity
The function stores a list of units in an array provided by the caller or as a reference. If a
receiver is given, the function value is the number of values stored, else a reference number to
a the internal record.
arr=AD.UNITS(type)
type: (opt) 0=use the command form, 1=use the printing form (default)
n=AD.UNITS(arr,model,type)
arr: (opt) receiving array (string array), default=return the array as the function value.
model: (opt) unit or quantity, restricts the output to units having the same dimension as the given unit
or the one defined for the quantity. 'arr' must be given.
type: (opt) 0=use the command form (default), 1=use the printing form
EXAMPLES
@A=AD.UNITS(1)
@A=ARR(3)
@N=AD.UNITS(A)
Return all defined units in the array A, command form.
@N=AD.UNITS(A,'VOLM')
Return all units useful for quantity VOLM.
AD.VALUES(s,arr)
arr: array for receiving the result. The array may be of type real, integer or string. In the last case,
the values are returned as closely as possible to their original form, e.g. frame number.
EXAMPLE
@n=AD.VALUES('(0 100 10)',XARR)
The function returns data in an array reserved by the caller, concerning the current quantity
selection or the available alternatives. The function value is the number of items returned.
NOTE: the LQ must be active, usually it is enough that the task in question is active.
AD.LQ(subject,array,aspect)
array: array for receiving the result. The array must be a string array except where separately
indicated. Previous contents are ignored. The output of ALT and ALTE is indexed according to
available alternatives, others according to the current selection.
F: formulas
U: units
FORM.A, U.A, S.A, SH.A, LH.A: as FORM etc, but showing also values not given, but obtained
from the quantity standard.
FORM.U, U.U, S.U, SH.U, LH.U: as FORM.A etc, but showing derived values in parentheses.
EXAMPLE
@N=AD.LQ('HYD',A,'Q')
Get list of selected quantities into array A
@N=AD.LQ('HYD',A,'ALT')
Get list of available quantities
AD.LQ(subject,descr,sel)
This case differs from the preceding one in that the receiver is a description to which all
aspects of the LQ are loaded into records as follows:
sel: (opt) treatment of undefined values: A=all, U=all, but show derived values in parentheses, S=as
A, but add status records. Default=only given values. The status records obtained with option S
contain 1 for a given value and 0 for a standard one. The record numbers are 100+the record
number of the data record. e.g. 113 for symbol (for rec. 13...17 only).
AD.LQ(subject,arr,'DES')
The input command corresponding to the given LQ is returned in the given string array.
AD.LQ(subject,'BACKUP')
This call creates a backup copy of the current LQ for the purpose of allowing a restoring after
CANCEL, in case changes are done directly to the LQ. After a successful update, the backup
should be removed by AD.LQ(subject,'REMOVE') or if the changes are cancelled, by calling
AD.LQ(subject,'RESTORE'). This operation also removes the backup copy.
arr=AD.LQ('?')
Return the list of symbols available for 'aspect', as far as related to the current LQ (Q,P, ...)
As AD.LQ, but for plot quantities. It is also possible to use AD.LQ with 'PQ' as the first
parameter, e.g. AD.LQ('PQ','HYD',...).
The function returns the value of a given table output option. The value may be returned in an
array, in which case the function value tells whether the option has been given (1) or not (0). If
no array has been given, the function value is the value of the option. In that case, the value '-'
is returned for an option not given.
AD.TOO(subject,option,array)
subject: subject, as given in the TOO command, e.g. TOO HYD, ...
option: identifier of the option as in the TOO command (e.g. GROUP, SPACE). For options HD, LBG,
LNP, the result can be obtained for the groups before and after - by adding .B or .A, e.g. HD.B
for headers before the text (should be used with array only). The special case Hi gets the
components of the i:th header. This header must be a a directly defined one and the receiver
must be an array.
array: (opt) string array for receiving the result. If not given, the value of the option is given as the
function value (one string). Options with many values (HD, LBG, LNP) are returned as separate
elements in the array.
EXAMPLE
@TOO=AD.TOO('SM','GROUP')
@A=ARR(3)
@TOO=AD.TOO('SM','LBG',A)
AD.TOO(subject','BACKUP')
AD.TOO(subject','DES',array)
As above, but, the whole input command is returned. For a long command, an array is needed
as receiver.
AD.LOADLQ() create LQ
The given LQ is modified according to the contents of a given description. Table output options
are not affected. The function value=0 if no error, else error code.
AD.LOADLQ(subject,source)
source: description containing at least record 2 (list of quantities). Other records can be given as in the
output from AD.LQ(subject,descr).
AD.LOADPQ() create PQ
There is no need for this function because AD.LOADLQ can be used with 'PQ' as the first
parameter, e.g. AD.LOADLQ('PQ','HYD',...).
AD.LOADTOO(subject,option,value,value2)
option: name of option, e.g. HD, GROUP. The special case Hi loads the components of the i:th
header. This header will be a directly defined one and the source must be an array.
value: new value, given either as a string or an array. For options with several values such as LBG,
each value is supposed to be given in an own array element. OFF removes an option.
value2: (opt) valid for HD, LBG and LNP only and when given by arrays. In this case, 'value' gives the
options before and value2 the options after.
Example:
@STAT=AD.LOADTOO('SM','GROUP','PURP')
@STAT=AD.LOADTOO('CP',''RC','')
The function returns the value of given plot output options. The result can be returned as the
function value, in a string array or in a descripition. In the two latter cases, the function value is
empty.
AD.POO(subject,option,quantity,array,array2)
string=AD.POO(subject,option,quantity)
This description concerns the case that the result is returned in an array or as the function
value. A description as the receiver is presented separately.
M: main: options (for whole diagram,.e.g. FRAME). Suffix -O and -V as in ALL. With MA, the
output covers also options not in use in the current POO.
S: symbols of quantities: list of quantities defined in the POO, using the original symbols. The
common o
SI: symbols interpreted: list of quantities defined in the POO, using the actual quantity symbols,
omitting quantities not in the PQ.
quantity: (opt) name of quantity or ARG. Needed for options specific for a given quantity or option=ALL.
Can also be given as F1, F2, ....
array: (opt) receiving array. Without this, the result is returned as the function value. It is necessary
when using option=ALL or option=C.
array2: (opt) giving both 'array' and 'array2', the result is divided as if separately fetching 'ALL-O' and
'ALL-V': option names in 'array', option values in 'array2'.
AD.POO(subject,set,list,descr)
This form returns the result in a description. The main options and the quantitiy specific ones
form two groups which are assigned independently.
subject: as above
ALL+M: ALL and MAIN together, similarly ALL-A+M. With MA instead of M, also options not
currently in use are included.
list: (opt) list of option identifiers, making the output contain the options listed. Options not assigned
have value=empty.
descr: receiving description. The following records are returned for quantities: 100: list of option
names in the order stored 101: quantity symbols, one for each item in the following records,
beginning with COMMON=option not designated for specific quantity 1,2,3,...: value of the
options in the order listed in rec. 100. The following records are returned for main options: 201:
symbols of options 202: values of options
AD.POO(subject','BACKUP')
AD.LOADPOO(subject,option,quantity,value-spec,opt)
name of quantity or ARG. The option concerns the specified quantity. May be given as F1, F2
(maintained in this form).
M: main options (for whole diagram, e.g. SIZE, FRAME). Relevant if the source is a
description.
value: string representing the value of the specified option (must be a specified option)
array1,array2: two arrays: the first one with option symbols, the latter with option values (corr.
to the alternatives ALL-O and ALL-V in AD.POO).
R: replace, remove all existing options for the quantity in question. Default if OPTION=ALL.
This function is intended to support correctness checks of input data. The acceptance criterion
is expressed by a syntax given as a parameter, which is applied to a given value. For the
syntax of the criterion, see below. The function value is 0 (ok) or error number. -1 is returned if
there are errors in the criterion.
AD.CHECK(criterion,value)
criterion: criterion, see below. It may contain calculator expressions flagged by % (aspostrophes repl. by
").
type: main data type: I=integer, R=real, S=string, ST=text string, T=time, D=date
/qual: qualifier:
T: a table
prefix*xxx: data base object with prefix separated by *. The optional xxx restricts the effect
further.
F: a file
:dir: a file from the given directory (first colon belongs to the syntax). This form supports
AD.ALTERNATIVES.
(v1,v2,...): listed values. NOTE: commas as delimiters. Double quotes can be used for
enclosing items with commans.
DATA*id: macro named 'id'. The macro is run in the immediate mode (NAPA BASIC
commands only), and should assign the variable $RESULT 0 if the check is ok ,else >0. The
given value is passed as a string parameter to the macro. Special case: error numbers
19901...19919 are reserved for the case that the macro provides a corrected value in variable
$CORRECTED. (presently used in TP.ASSIGN only).
LIST*id: macro named 'id', returning a list of allowable values. The macro is run in immediate
mode and should return the local (note!) variable $RESULT giving a string array. A string
parameter can be passed to the macro in the form LIST*id(param). If the parameter is __, its is
replaced by the test value. (The macro itself is stored normally as DATA*...)
ss.id(parameters): set of values given by service function, returning the array into one reserved
by the caller. This parameter is indicated by an asterisk, e.g. AD.ARGS(*,"ID"). For more
generalk alt., see L= criterion. the array as the function value
column/table: set of values obtained from given table column. This component may be
repeated (separated by space). The first table must exist, the others may be missing.
C=ss.id(parameters): check done by service function, returning the value according to the
same specification as AD.CHECK.
%var: var=name of variable, may return one of the syntaxes listed or the reference number of
an array (equivalent with id() or the reference number of a macro (equivalent with macro).
E=expression: calculator expression returning 1=ok or 0=not ok. If the criterion is a check
criterion for a table, it may use table column names as variables but this should be indicated by
using using ET instead of E (i.e. ET=expression). The expression should contain __ (a double
underscore) in the place where the test value is to be inserted. If the value is a string constant,
quotes must be provided in the expression. No guarantee is given that an arbitrary expression
works in the context where the criterion is evaluated.
L=expression: as the case A but the expression returns a string array. Similarly LT=expression
if table symbols are referenced.
/filter/: filter for string values. See !EXPL WILD/GEN for the format of a filter.
opt: options, may be one or several of the following, separated by one space:
O: the item is optional, i.e. an empty string is accepted regardless of other criteria.
I: for information only: for use with AD.ALTERNATIVES, AD.CHECK always returns 0.
G: general source, data base object may also be found in sysdb or napadb (default for tables,
macros).
A: (for AD.ALTERNATIVES): check also units 2 (sysdb) and 7 (napadb), mark the source by
adding //SYSDB, //NAPADB. NOTE: the flag is not included when applying additional checks.
S: (for AD.ALTERNATIVES): sort the result. Default if result of search from the data base.
M: for criteria where a list of alternatives is checked: if the original test value is not in the list, try
a modified value. Presently only: remove trailing + or - (for brackets).
ERRNR=nr: specifies the error number to be used in case of errors. Makes it possible to use more specific
messages than the built-in one.
Components can be replaced by the syntax %name, where 'name' is the name of a variable
(NOTE!).
EXAMPLES
AD.CHECK('R','12')
AD.CHECK('R ...%MAX','12')
The value must be a real with upper limit given by the variable MAX.
AD.CHECK('I (1,2,3,10)','1')
AD.CHECK('S (LREF,BDWL,ZDWL,HMAX,XMIN,XMAX)','BDWL')
AD.CHECK('S %LIST','A')
The value must be a string contained in the array LIST.
AD.CHECK('S/R *(R*,T*)','R02001')
The given value R02001 must be an existing room which name begins with
R or T.
AD.CHECK('S AD.UNITS(*,M)','mm')
The value must be a unit with the same dimension as M.
AD.CHECK('S AD.UNITS(*,%UNIT)','mm')
The value must be a unit with the same dimension as the one given
by the variable UNIT.
AD.CHECK('S A=AD.FORM(S)','VOLM')
The value must be a registered quantity.
AD.CHECK('S C=ST.CHECK(PROFILE,*)','B*100*10')
The value must be a valid profile specification.
AD.CHECK('S/G','STEM')
The value must be an existing geometric object.
AD.CHECK('S/C /FR*/','FR1')
The value must be an existing curve, named FR...
AD.CHECK('S/ARR*','A')
The value must be an existing arrangement table.
AD.CHECK('S/ARR*D','DECK1')
As above, but the name beginning with D.
AD.CHECK('S LIST*TEST(A)','XX')
The macro TEST, to which the parameter A is passed, returns an
array containing the allowable values.
AD.CHECK('S/:/napa/pr' 'p1234.db')
The given name must be a file in the directory /napa/pr.
AD.CHECK('S E=VOL("__")<1000','R1234')
The test carried out is VOL('R1234')<1000.
This function uses a check criterion in the format specified for AD.CHECK and returns a list of
allowable values. The function values is the number of values returned in the array. Special
cases: -1=the criterion is a range, two values are returned, -9: error in the criterion, -8: the
criterion does not specify allowable values.
AD.ALTERNATIVES(criterion,array)
array: receiving array. It can be of type string or the same numeric type as specified in the criterion.
arr=AD.ALTERNATIVES(criterion)
As above, but the result is returned in an internally reserved string array, which will be reused
at the next call.
check=AD.ALTERNATIVES(criterion,'I')
Special case: test whether the criterion can be used providing a list of alternatives. The
criterion is checked for its formal properties only.
check: 0=cannot, 1=can. The function may later be geenarlized so the different types can be
separated, test for 0 and >0 only.
The function returns a list of arguments in the current task or properties of the arguments. This
is presently supported for tasks HYD, STAB, FRA, LD, DA, CR and CP. The function value is
the number of arguments.
AD.ARGS(arr,aspect,source)
arr: array for receiving the result, string array on other cases than aspect=status
EXPL: description
UNIT: unit
The function returns the value of a argument of the current task, either as a string in the input
format, in an array in the internal format or in an array in the input format.
AD.ARG(id,array)
array: (opt) receiving array. Without this parameter, the result is returned as the function value, a
string in the input format. When given, the result is returned so that every item is returned as a
separate item in the array. If the array is numeric, the values are returned in the internal form,
else as strings in the input form.
The function assign value(s) to a given argument. This is done without notifying the application,
and required updates may not take place without explicit command (CALC, UPDATE).
AD.SETARG(id,value)
value: value(s) of the argument, string (NOTE!) in the form used in a command.
EXAMPLES
@ad.setarg('TR',1)
@ad.setarg('HEEL','0,5,10,15,30')
The function assigns the variables defined in a table used for controlling reports and other
macros (prefix VARDEF*). The table must contain at least the columns ID, TYPE and VALUE.
Items with I as the first character in TYPE are disregarded.
AD.VARFROMTABLE(table,opt)
opt: options:
A: take all variables regardless of value in the select column, default: take only selected
variables.
The function assigns values to items in a table used for controlling reports and other macros
(prefix VARDEF*). The table must contain at least the columns ID, TYPE and VALUE. Only
items with I (input) or E (exchange) as the first character in TYPE are assigned. The source is
the variable with the name given in the ID column. If the table is changed, the event 19008 is
raised.
AD.VARTOTABLE(table,opt)
opt: options:
N: raise no events
The function selects sets of objects and selected properties of the objects. The result is
returned in an array (names only), in a description or in a table. The function value is the
number of objects returned.
AD.SELECT(source,prefix,receiver,filter,options,criteria,rec2)
0: use default source for the data type in question (decided from prefix), if no identifiable prefix,
DB1
project: name of project. The main project data base is taken unless the options or the prefix
imply other data bases. NOTE: db-criterion VER=... is usually needed.
recdb: description as returned by this function. The objects are selected from the set defined in
it. It may be the same as 'receiver'. The typical use is to make a further restriction on an original
selection. Options Q and D are recommended in the original search in order to guarantee
sufficient information.
prefix: data base prefix specifying type of data. A list of standard prefixes is obtained by
AD.SUBJECT. Geometric objects are designated by dummy prefixes: G=generally, P=points,
C=curves, T=tangent functions, S=surfaces, R=rooms, SO=surface objects. May be empty or
NONE. NOTE: by default, the prefix is omitted from the name returned and when applying
name criteria. With option P, the full data base names are used.
empty: (empty string), return the result in a string array returned as the function value. The
array is reserved by this function and reused at the next call.
descr: description (reference number). Allows other attributes than the names to be returned.
The possible quantities are listed below, giving quantity name, record number and option used
for selecting the quantity. See also option K below.
Texts are available for some object types only, as defined by the prefix.
table: (name) create a table with this name in the run time memory, containing the name and
quantities implied by the options.
A: check all versions (default=current only for DB1, DB3 and DB4)
P: include prefixes. Default: treat names without the prefix given as second parameter.
Concerns names returned and application of criteria.
V,U,D,Y,H,Q,R,B,E,T: control data to be added to the result as in the list above (description or
table needed as receiver). For the quantity E, see below.
Sx: sort by the quantity x, where x is from the list above. The quantity will be included in the
result. (description needed as receiver).
E: note existence in the current project/version (meaningful only if the source is different) The
result is returned as record 472 containing the date if the description exists, else 0.
criteria: (opt) selection criteria, either one criterion given as a string or several criteria given as strings
in an array. The criteria are expressed in the normal input form. The partial criteria can be:
rec2: (opt) additional receiver, description. Records in this description are loaded from the
description selected as far as common record numbers are found (first element).
EXAMPLES
@LIST=ARR(3)
@N=AD.SELECT(1,'',LIST)
Returns a complete list of objects in the current version of the main project data base (DB1).
@N=AD.SELECT(1,'C',LIST)
@N=AD.SELECT(1,'C',LIST,'FR*','S','REF=STEM')
As above, but apply filter FR*, take only those referring to STEM and sort the result.
@D=DB('SELECTION',0)
@N=AD.SELECT(1,'TAB*',D,'*TEST*','DRB')
Return in the description D a list of all tables containing TEST in the name. Record date (D),
size in records (R) and size in bytes (B). For example, to get the total size in bytes:
@sb=rec(d,'NR') @count=sum(sb)
@N=AD.SELECT(1,'LD*CON(',LDCOND,'','YH','-NAME>T, DATE>960101')
Create a table TAB*LDCOND containing columns NAME (always incl.), DATE (form yy-mm-dd,
option Y), TIME (hh.mm, option H). Loading conditions named Txxx and those older than
960101 are omitted. NOTE: the table is available in the run time memory but not stored in the
data base or loaded into any work area (use command GET).
@N=AD.SELECT(1,'DATA*',LIST,'','','LOC>''Plan12''')
List all macros containing a line starting with 'Plan12'. (Note the double apostrophes).
@d=db('DEMO',0) @xr=rec(D,'X',-2)
@n=AD.SELECT(1,'C',LIST,'FR*','','',D)
The function does various interpretations regarding name rules, either for the rule as such or
for a data base name.
AD.SUBJECT(dbname,type,aspect)
type: type (integer) relevant for geometric objects only, otherwise assign 0.
aspect: (opt) aspect returned as function value, P=data base prefix (default), T=explanatory text,
TL=same as T in lowercase, I=name of item (prefix removed). If the name does not contain a
prefix, the geometric type (C,S...) is returned if implied by 'type', '?' if other type (>0) and empty
if the type is 0.
AD.SUBJECT(aspect,id)
id: prefix to be interpreted, text if aspect=P, else text. A text can be given with wildcards.
AD.SUBJECT(aspect,array)
This for loads all registered symbols in an array. The function is the number of items returned.
aspect: as above.
EXAMPLES
@AD.SUBJECT('LD*CON(L100)',0,'P') -> LD*CON()
@AD.SUBJECT('LD*CON(L100)',0,'TL') -> loading condition
@AD.SUBJECT('LD*CON(L100)',0,'I') -> L100
@AD.SUBJECT('TL','ARR*') -> arrangement
@AD.SUBJECT('P','load*con*') -> LD*CON()
@PLIST=ARR(3) @TLIST=ARR(3)
@AD.SUBJECT('P',PLIST) -> list of prefixes
@AD.SUBJECT('T',PLIST) -> list of descriptions
The function returns the dbname of the description. See AD.NAME for the reverse function.
dbname=AD.DBNAME(prefix,name)
prefix: prefix
arr=AD.DBNAME(prefix,list)
This form differs in that the names are given by a string array and the result is returned in a
string array. NOTE: the result array is reused at the next call of AD.DBNAME or AD.NAME.
prefix: as above
EXAMPLES
!CAL AD.DBNAME('DAMCASE(','C1') -> DAMCASE(C1)
!CAL AD.DBNAME('ARR*','DECK1') -> ARR*DECK1
The function returns the name of an object when given its data base name with prefix. See
AD.DBNAME for the reverse function.
name=AD.NAME(dbname)
prefix: prefix
arr=AD.NAME(list)
This form differs in that the names are given by a string array and the result is returned in a
string array. NOTE: the result array is reused at the next call of AD.DBNAME or AD.NAME.
EXAMPLES
!CAL AD.NAME('LD*CON(L100)') -> L100
3.6. Various
AD.WEEKDAY(idate)
EXAMPLE
@IF AD.WEEKDAY(IDATE)>5 !TYPE This is not a working day
AD.WEEK(idate)
AD.DATE(idate,opt)
idate: given date in the internal form, can be given in a string to preserve accuracy (optional):
2: yyyy-mm-dd
3: yy-mm-dd
4: dd.mm yyyy
5: mm/dd/yy
AD.TIME(idate,opt,sign)
3: same as 2?
AD.IDATE(date,opt)
date: given date in a string format specified with opt (optional, default is the current date)
4: dd.mm yyyy
5: mm/dd/yy
The function returns the internal date in seconds stored into a string to preserve accuracy (see
AD.IDATE).
AD.SDATE(date,opt)
AD.ITIME(time,opt)
time: given time in a string format specified with opt (optional, default is the current time)
The function returns the time difference in seconds between the local time and the unversal
time. The universal time is (optionally) used for recording times in data bases, see DB.UTC.
The value is taken from the current operating system settings.
diff=AD.UTC()
The function waits for the specified number of milliseconds or until an interrupt signal. Events
are processed during the wait.
AD.PAUSE(msecs)
The function fetches notes from an object. The result is returned in an array or as the function
value. If a separate receiver has been given, the function value is an empty string, else the
designated text.
AD.GETNOTES(descr,line,arr,id,type)
0: all
arr: receiving array. May be omitted if line>0, in which case the result is returned as the function
value.
id (opt) description name or prefix. This parameter and 'type' are intended for cases where the
description is stripped of its normal identification (name, type) in the free storage (usually
because it is unnamed). Either this parameter or 'type' can be used.
type: (opt): type of description. Only values 1000...1010 (geometry) or 1970 (tables) are taken into
account.
EXAMPLES
@D=DB('FRF')
AD.GETNOTES(D,1)
AD.SETNOTES(descr,line,arr,id,type)
0: all
arr: array containing the input. A single line can be given as string parameter.
AD.PROPS() properties
@n=AD.PROPS(name,vers,uni,proj,sarr)
sarr[2]: notes
sarr[3]: user
sarr[4]: version
sarr[5]: date
sarr[6]: time
sarr[8]: db type
This function concerns variables created by the application, e.g. by ASG in DA, LD. The
options are to make them global (default) or to obey the scope restrictions caused by given or
implied @GLOBAL The function value is the state at the call.
old=AD.CSCOPE(c)
c: (opt) 0=make global (initial default), 1=apply scope restrictions Without this parameter, no
change is made
result=AD.STRREP(string,s1,s2)
All occurrences of 's1' in 'string' are replaced. Wildcards are applied as in the CHANGE
command of the editor.
EXAMPLES
@AD.STRREP(COMMAND,'HULL','@NAME')
@S=INPUT(11)
@S=AD.STRREP(S,',','.')
Strings are read from a file where the decimal point is expressed by commas, which are
converted to points.
Two strings are compared, with the possibility to use wildcards. The function value is 1 (match)
or 0 (no match).
AD.STRCOMP(s1,s2)
s2: second string to compare. It may contain wildcards (* or ?), see !EXPL WILD/GEN.
EXAMPLES:
AD.COMPARE('ABC','A?C') -> 1
AD.COMPARE('ABBC','A?C') -> 0
AD.COMPARE('ABBC','A*C') -> 1
The typical use for this function is modify a string that is intended to be used as the name of an
object and where certain characters are not allowed. Invalid characters are either removed or
replaced. Optionally, it can be prevented that the string can be interpreted as a number.
string=AD.STRCLEAN(string,check1,repl12,check2,repl2,options)
repl1: (opt) characters by which matches from 'check1' are replaced. x=omit. Compulsory if 'check1'
is given.
repl2: (opt) characters by which matches from 'check2' are replaced. x=omit. Compulsory if 'check2'
is given. See example for the default rule. If only one of 'check1', check2' is given, it is
interpreted as 'check2'
options: options:
N: in addition to other checks, check that the string cannot be interpreted as a number. If so,
the character following N is added at the start (NOTE!).
A: if any of the modifications apply, add apostrophes around the string instead of doing the
changes
EXAMPLES:
@s=ad.strclean('*ABC/D') ->ABC_D
Modify according to the default rules, which are adapted to the NAPA command syntax. The
following example is equivalent with the default rule.
@s=ad.strclean('LD*CON(A)',' +-*#','xxxxx','=<>()/','______')
->LD*CON_A_
This specification is equivalent with the default rule: at the start, the characters space, +, -, *
and # are removed, anywhere in the string the characters =, <, >, (, ) and / are replaced by _.
@s=ad.strclean('*ABC(D)/X','=<>()/','xxxxx_') ->*ABCD_X
@s=ad.strclean('123','NB') ->B123
As the default rule, in addition, a string that could be interpreted as a number is modified by
adding B.
@s1='123'
@s2=ad.strclean(s1,'NB') ->B123
@if ad.strcomp(s1,s2)<1 @s2=ad.strclean(s2,'B','A')
'A' cannot be used as the intended addition character with option N because it is interpreted as
option A, adding apostrophes. Therefore two subsequent ad.strclean calls must be used if 'A' is
to be added in the beginning of a string that could be interpreted as a number. The call on the
first line adds character 'B' (if needed) and the call on the second line replaces 'B' with 'A'
(because the original string was changed.)
3.8. Database
A description belonging to a specific subsystem is read from the data base to the free storage.
Internally, the function calls the corresponding subsystem specific read function. The reference
number of the description, or 0 if not found, is returned.
DESCR=AD.READ(subsys,name,version,unit,project,...)
...: the rest of the parameters, specifying the description, are passed to the subsystem specific
read function (see their documentation for more details)
A description belonging to a specific subsystem is written to the data base from the free
storage. Internally, the function calls the corresponding subsystem specific write function.
AD.WRITE(subsys,descr,name,version,unit,project,...)
...: the rest of the parameters, specifying the description, are passed to the subsystem specific
write function (see their documentation for more details)
The function returns the reference number of a description containing a copy of the reference
system, either from the current or given version. The description returned is unnamed. It is
intended for use with the other functions of this group: changes are done with
AD.ASGREFVALUE and the result is taken into use by AD.ASGREFSYSTEM.
descr=AD.REFSYSTEM(vers)
vers: version, default=current. Special case MODEL: get model reference system.
The function replaces the current reference system with the one provided as parameter.
AD.ASGREFSYSTEM(descr)
This function differs from the REF function in that the source may be different from the current
reference system.
AD.REFVALUE(id,source)
id: symbol of the reference system parameter. With suffix E, the explanation text is returned, e.g.
LREFE.
AD.REFVALUE('ALL',source,receiver)
receiver: description for receiving the result. Previous contents are removed. The following records are
created:
4: value as string
The function assigns a new value to parameter in the given reference system.
AD.ASGREFVALUE(id,source,value,expl)
id: symbol of the reference system parameter. A new reference symbol 'id' may be undefined
provided that the parameter 'expl' is given: in that case the parameter is added to the group
'various'.
value: new value as string or real, special case *: make the parameter calculated.
The function updates those parameters of the reference system that are defined by calculation
from geometry or other parameters.
AD.UPDREFSYSTEM(descr,opt)
opt: options
G: update also parameters derived from the geometry, default=update only those dependent
on other parameters
The function gets the description #SYSTEM, containing the definition of the frame system(s).
The desription returned is unnamed and intended for the other functions in this group: changes
are done to this description and taken into use by AD.ASGFRSYSTEMS.
descr=AD.FRAMESYSTEMS(vers)
This functions gets or changes the values of RANGE in the reference system, i.e. the
parameters the control the extension of unlimited planes. Thera are six values: xmin, xmax,
ymin, ymax, zmin, zmax.
arr=AD.REFRANGE()
This form returns the value of range as currently in use, regardless of whether they are defined
explicitly in the reference system.
arr=AD.REFRANGE(descr)
This form returns the record defining the range in the given description. If it is not defined, 0 is
returned.
AD.REFRANGE(descr,arr)
This form assign the range using the valued provided in the given array. NOTE: the values take
effect after calling AD.ASGREFSYSTEM.
The function stores the given frame system description for use by the current version and
makes the definitions active at run time.
AD.ASGFRSYSTEMS(descr)
The functions gets the definition of the given frame system in the form used in the definition
(same number as given in the FRAMES command under REF). The function value is -1=error,
0=normal case, 1=webs defined by frames (receiver contains frame numbers).
AD.GETFRSYSTEM(descr,type,rec)
rec: record (real) for receiving the result. An empty record is returned if failure.
ref=AD.GETFRSYSTEM(type)
This form refers the currently used frame systems and is mainly intended for testing availability.
type: as above
The functions does the reverse of AD.GETFRAMESYSTEM, i.e. stores a frame system given
in the definition format.
AD.REPFRSYSTEM(descr,type,rec,c)
rec: record (real) containing the definition, a set of reals as in the FRAMES command under REF).
The funtion returns the value of a reference system parameter and optionally adds if originally
undefined.
value=AD.REF(id,default,expl)
default: (opt) value to be returned if not defined. Entered as a string regardless of the actual type.
expl: (opt) explanatory text for the given paramater. If the symbol 'id' is undefined and this parameter
is given a reference system parameter with the given value is added to the reference system
with the given explanatory text. If 'id' is a standard quantity, its type is decided from the quantity
standard, else it is recorded as a string. The event AD*ADDREFPAR (200001) is raised.
EXAMPLES
@l=ad.ref('LREF')
@type=ad.ref('TYPE','unspecified')
Return the value of the parameter 'TYPE'. If not defined, return 'unspecified'. The reference
system is not changed.
@type=ad.ref('TYPE','unspecified','Type of ship')
The function updates derived times and quantities in process table i.e. a table containing
events at specified times. The functions using the table will check that the table is updated -
this function allows the update to be done at request or with special options.
AD.UPDPROCESS(table,selection,opt)
selection: (opt) integer or real array defining a subset of lines to be taken into account. An integer array
gives a list of selected lines while a real array should contain 1 for selected lines and 0 for
others. Instead of using this parameter, it is recommended to control the subset by a column
INCL.
opt: options:
C: check: update only of the table has been changed since last update
T: if there is a column TIME (quantity TIME), assign the time in external format
S: sort the table in time order NOTE: sorting is presently implemented for the currently active
table only (=table in the work area).
D: before calculating quantities, sort according to dates. Dates dependent on quantities may
not be correctly ordered.
A: take all lines regardless of the column INCL (the columns must be formally dependent, use
formula DUMMY).
The function extracts a given quantity as a function of time from the given process table.
AD.PFUNCTION(table,qnt,name,arec,frec,irec,opt)
This form gets the argument and function into the given arrays (for real valued functions only).
name: additional argument (in column NAME), assign empty if not needed.
arec: array for receiving the time argument, may be real or integer
irec: (opt) integer array for receiving the indices (line numbers) of the table lines causing changes in
the function. Zero is recorded for an argument added because of a step or because of the E
option.
opt: options
E: extend the function to cover the same time range as the table, default=only between first
and last related event
I: 'arec' is input: calculate 'frec' at the arguments in arec. arec is supposed to be sorted in
ascending order ('irec' is ignored).
C: include C and T events in the arguments (normally not needed because they do not
influence on the function).
value=AD.PFUNCTION(table,qnt,name,time,opt)
t; time in seconds
opt: options
U: if the value is undefined, return -99999 if numeric value, 'undefined' if string value. Default in
this case 0, ''.
X: if the function value is not defined in the table (not at all or argument too early), do not try to
use the INIT event. (relevant when handling loading conditions and the table refers to an initial
condition).
Example
@arec=arr(2) @frec=arr(2)
@ad.pfunction(0,'VLOAD','T10',arec,frec)
@vload=ad.pfunction(0,'VLOAD','T10','11:30')
The function returns a list of functions in the given process table and optionally gives their
values at a specified time.
AD.PFUNCTIONS(table,qnt,qrec,nrec,vrec,arg,opt)
qrec: (opt) string array for receiving the names of quantities, assign 0 if not used.
time in seconds
Example
@nrec=arr(3) @vrec=arr(2)
@ad.pfunctions(0,'VLOAD',0,nrec,vrec,'12:30')
The function returns events of a process table related to a given function (given quantity and
optionally name).
list=AD.PFEVENTS(table,qnt,name,opt)
The result is an array containing the line numbers or identifiers of all events related to the given
quantity.
qnt: quantity
opt: options
list=AD.PFEVENTS(table,line,'!',opt)
line=AD.PFEVENTS(table,line,'+',opt)
Return the next event (line number or ID) belonging to the same quantity as the one set by the
given line.
opt: options
EXAMPLES
@list=AD.PFEVENTS(0,'VLOAD','R123')
@list=AD.PFEVENTS(0,'E1','!')
Return a list of all events controlling the same function as the event named E1.
@next=AD.PFEVENTS(0,lnr,'-','I')
Return the identifier of the preceding event related to the one at line number lnr.
The function prepares data supporting a graphic display of the alternative scenarios included in
a process table. The result are records as precented below.
AD.SUBPROCMAP(table,rdescr,opt)
table: source table, either a normal process table or part of it, see option N. Only columns ID, DAT
and LEVEL are compulsory. The column LEVEL expresses the relation between events.
713: (quantity FRACTION): a value between 0 and for use as coordinate in the graphic display
opt: options:
L: store logical time: incremented by 100 between each event, default=real time as recorded in
the source table
N: do not attempt to update times in the source table. Default=make sure the source table is up
to date regarding times. Must be given if the source is not a complete process table.
AD.SUBPROCMAP(table,opt)
table: source table, as above. The columns PREC, FRACTION and RTIME are assigned if existing.
RTIME is always assigned logical times (the real time is supposed to be available as column
DAT).
The function is intended for a table containing alternative processes controlled by the LEVEL
and INCL columns. It assigns 1 to INCL to the items belonging to a subprocess specified by
giving the last item.
AD.SUBPROCESS(table,item,opt)
opt: options:
N: do not attempt to update times in the source table. Default=make sure the source table is up
to date regarding times. Must be given if the source is not a complete process table.
P: assign the PREC column pointers to the following item in the subprocess.
The function has been designed to support manager applications based on process tables
having a structure expressed by the LEVEL column or by events with type NODE. The LEVEL
column controls branching subprocesses while NODE groups related events. The function
returns a list of process items selected in a way related to this structure. When the level is
used, the INCL record must also be present to decide what sequence is the active one.
list=AD.PTABLEITEMS(table,task,id)
The function value is a string record containing the identifiers of the selected items. The array
is reused at the next call.
B: branching points
M: list of main items. With MN, the basis for this selection is node events, else the level is used
(level>0)
S: list of subevents below the given node. With SN, the event type is checked for NODE, else
the level is used (level=0).
N: main events (nodes) between the given event and the next branch.
4. Functions of group DB
This group contains functions concerning data in the database.
A description is read from the data base to the free storage. The function value is the reference
number of the description, 0=not found, -1=other error.
DB.READ(name,version,unit,project,options)
version: (opt) version, default=current version on DB1, DB3, DB4, empty on others. Assign - for default
version if other options follow.
unit: (opt) data base unit (1...7), default=1 if version is given, otherwise 0
0: 'standard sequence' -> try first the current version in the current project, then version
COMMON, if any, then the system data base and finally the NAPADB
project: (opt) name of the project, will be opened as unit 6. The project may also be represented by the
name of the project file. (note that if unit=3 or unit=4 then the protected data base or the
auxiliary data base will be used instead of the standard data base)
options (opt), one or several of the following letters. With an asterisk as the first character, the options
can be entered in the place of the above parameters, except name.
B: if unit=0 search database units in reverse order instead of the standard sequence. If unit is
not 0 this option has no effect.
E: replace an existing description with the same name, default: cancel the operation if the
description exists in the free storage (return 0)
O: (old) if a description with the given name exists in the free storage take it instead of reading
from the data base
U: return an unnamed description. Options E, O irrelevant. This way there is no risk for
interaction with existing descriptions. NOTE: the type will also be undefined. With UU the result
is not returned as the function value (for internal use).
R: set permanence same as run, i.e. not deleted at change of project or version
EXAMPLES
@D=DB.READ('STEM')
Read the description STEM from the current version in the current project. Refuse if already
exists in the free storage.
@D=DB.READ('STEM','*O')
@D=DB.READ('STEM','-',1,'','O')
As above, but if one already exists in the free storage, take it.
@D=DB.READ('STEM','B')
@D=DB.READ('STEM','A',1,'NAPASHIP','U')
The function value is 1 if the description exists, else 0. I the unit is not case unit=0, the value is
the data base unit where the description was found.
DB.EXISTS(name,version,unit,project,options)
Parameters as in DB.READ.
The function value is the date (internal) of the given description. 0=does not exist. Because the
value is passed via a floating point number, the seconds will be inaccurate.
DB.DATE(name,version,unit,project,options)
Parameters as in DB.READ.
The function value is the type of the given description. -1=does not exist.
DB.TYPE(name,version,unit,project,options)
Parameters as in DB.READ.
The given description is written to the data base. The function value is an empty string.
DB.WRITE(descr,name,version,unit,project,options)
project: (opt) name of the project, will be opened as unit 6 (note that if unit=3 or unit=4 then the
protected data base or the auxiliary data base will be used instead of the standard data base)
options (opt), one or several of the following letters. With an asterisk as the first character, the options
can be entered in the place of the above parameters, except name.
number: defined the type of description. Ignored unless the name is also given.
EXAMPLES
@D=DM.GET('OWNDESCRIPTION')
@DB.WRITE(D,'','*S')
Write the description to the project data base, current version, unless exists already.
!OPEN TEMP>TEST.DB 6
@DB.WRITE(D,'DUMP','A',6)
Write the given description with name TEMP to the file temp.db in directory temp, under
version A, regardless of earlier existence.
@DB.WRITE(D,'CURVE1','*1001')
Write the given description with name CURVE1 and type 1001.
The given description is removed from the data base. The function value is an empty string.
DB.UNSAVE(name,version,unit,project,options)
The function returns the date (internal form) when the directory of the given file unit was last
updated so that a description was added or deleted.
LASTDU(unit,c)
0: return the complete internal date in seconds. The last 2...3 digits are irrevelant because of
the internal accuracy.
The function returns 0 if writing is allowed to the given data base unit, else error number.
DB.ACCESS(unit,version)
unit: data base unit, 0...7. The unit is supposed to be open under the normal conventions. Units 5
and 6 are only checked for write restrictions set on the operation system level.
version: (opt) version. If not given, read-only specified versions are not checked for (units 1, 3 and 4
only).
This function controls the appearance of the indicator, showing the progress of functions
concerning whole files or sets of descriptions: catalogs, selections,
RSQ,TIDY,COPY,LOAD,DUMP under TOC, preparing of project files. (GUI mode only).
DB.INDICATOR(sel)
EXAMPLE
DB.INDICATOR('OPT')
The function value is the name (complete path) of the file opened as a given data base unit.
See DB.OPENED for testing whether the unit is open.
name=DB.FILENAME(unit)
The function returns the first name that matches a given template and does not exist in the
given data base unit (with the default version).
name=DB.FREENAME(unit,template,stind)
template: template for the name. An question mark in the template is replaced by a number. If there is no
question mark, the index is appended.
stind: (opt) start index, default 1. The names are checked from this index and increasing it until an
unused name is found.
EXAMPLES
@name=db.freename(1,'P')
Find the first name of the form P1, P2 .. that is not in use in the data base unit 1 (project data
base).
@name=db.freename(1,'WL?A',10)
This is a service that was added to support preparation of ships for the Onboard NAPA,
allowing data base unit 5 to be used as additional source of general data, applied with less
priority than DB1 (the project data base) but higher than DB2 (the system data base). The
default version is empty (as in the sysdb).
oldmode=DB.DB5MODE(mode)
mode: (opt) new mode, 0=off, 1=on. To set mode=1, the DB5 must be open.
The function opens a file and makes it available as a data base unit.
DB.OPEN(name,unit,opt)
opt: options:
!: do the operation even there is already a file open as the given unit.
DB.CLOSE(unit)
The function returns 1 if the given file unit is open, else 0. See DB.FILENAME for inquiring the
file name.
DB.OPENED(unit)
The function changes or returns the type of character coding used in the data base (Latin1 or
UTF8). The coding registered affects reading and writing of character data. For standard ASCII
characters (code <128) the coding systems are equivalent. UTF8 must be registered in order to
store Asian characters.
coding=DB.ENCODING(unit)
The function value is either LAT1 (latin1), UTF8 or empty. Empty means that the coding has
not been specified explicitly defined which in practice means the same as LAT1.
DB.ENCODING(unit,coding)
This form changes the coding registered in the data base but does NOT convert any data. If
needed, see command ENCODING in the TOC task.
This function modifies the action taken when a data base error is encountered by defining the
error level set.
DB.ERRORLEVEL(newlevel)
newlevel: set this as the error level. A different setting can be for reading and writing in the form wr, e.g.
43: level 4 for writing, 3 for reading.
3: normal error
level=DB.ERRORLEVEL()
The function reads a text file into a description provided in the call.
DB.READFILE(filename,descr,options)
filename: name of the file, in the form used by the operating system
options:
EXAMPLE
@d=dm.create('DATA*MYMACRO')
@db.readfile('temp/test',d)
@db.write(d)
The given text is read from a file and saved as a macro in the project data base.
The function writes a text file from a description provided in the call. For sotring in the NAPA
data base, use DB.WRITE.
DB.WRITEFILE(filename,descr,options)
filename: name of the file, in the form used by the operating system
options:
R: replace, the file must exist, default=write only if the file does not exist.
EXAMPLE:
@d=db.read('DATA*MYMACRO')
@db.writefile('temp/mymacro.txt',d,'!')
The given macro is copied to a text file. (See also the !expl C.MACRO for another way of
reading the macro).
The function returns the date of a file in the standard form (seconds). 0=file missing.
date=DB.FILEDATE(file)
date=DB.FILESIZE(file)
The function protects a macro so that it cannot be modified by the user. This is a separately
licensed feature of Napa. By special arrangement with Napa it is possible to create protected
macros that can be run but not read by the user. To remove the protection, run the function
again with the same arguments.
DB.PROTECT(descr,ver,unit,project,keyname,key)
EXAMPLE:
@key=arr(1) @key(1)=7634;@key(2)=1249,...,@key(8)=31749
@n=DB.PROTECT('DATA*SOMEMACRO','A',1,'','TEST',key)
The above example protects the macro named DATA*SOMEMACRO located in version A of
unit 1 (the project database).
The functions defines how to encrypt data in the given data base unit. It does NOT actually
encrypt any data, which can be done with the function DB.ENCRYPT or with command
CRYPT/TOC. However, any data already encrypted is updated to match the changes.
DB.ENCRYPTION(unit,sel,keyspec,options)
LM,LC: encryption connected to the current license: LM: machine id, LC: customer id.
G: testing mode
F: name of file
G: not used
setting=DB.ENCRYPTION(unit,sel)
Inquires the current encryption properties. The output will tell the lowest release (e.g. 7 for
2007) by which the
sel: opt:
K: key specification.
O: additional options.
The function makes a given description encrypted or not encrypted. The file must have an
encryption definition as set by DB.ENCRYPTION.
DB.ENCRYPT(unit,name,version,newstate)
newstate: ON or OFF
state=DB.ENCRYPT(unit,name,version,'I')
state:
The function assigns or modifies read, execute and write rights for a given description.
DB.SETRIGHTS(unit,name,version,read,execute,write)
read: defines read access. Read access means right to use the object normally, execute rights not
relevant.
string: name of user groups separated by commas, empty=no change. OFF=remove possible
existing restriction
string array: names of user groups as an array. 0=no change, empty=remove. The user group
can be specified as NONE and ALL. Other cases presently implemented with dummy solution.
execute: similarly for execute rights. Implies removal of normal reading rights.
rights=DB.GETRIGHTS(unit,name,version)
This form tells the rights of the current user in the same form as in the !CAT command. The
value is a combination of the following characters: r, R: read access (r=because no restriction,
R=the user has the rights specified). E=execute rights, W, w=write access.
ok=DB.GETRIGHTS(unit,name,version,'R')
The function value is 1 (=yes) or 0 (=no) depending on whether the user has read access to the
given description. -1 is returned if the description is missing. Similarly E=execute, W=write.
DB.GETRIGHTS(unit,name,version,rread,rexecute,rwrite)
In contrast to the preceding forms, this form returns the definition of the rights, i.e. the names of
the groups.
rread: string record for receiving groups having read rights. 0=not used
The function sets a lock that prevents the object from being changed. The lock can either be a
permanent one or one intended for the duration of an editing session. In the latter case, the
user who put the lock can write even if the lock is valid and the lock can be equipped with a
time-out.
DB.LOCK(unit,name,version,opt,timeout)
function:
lock=DB.LOCK(unit,name,version)
In this form, the function value tells the current lock: empty=none, L=permanent, E=locked for
editing
time=DB.LOCK(unit,name,version,'U')
This form returns the user that has placed the lock, if any. The result is returned even if the lock
has expired. With option T This form returns the timeout as the absolute time in the internal
form. -1=no editing lock, 0=no timeout
Examples
DB.LOCK(1,'DATA*TTTT','','E',3600)
The macro TTTT in the current version is locked for editing. The lock expires automatically
after 1 hour.
@l=DB.LOCK(1,'DATA*TTTT','')
@if l='L' then
@ap.type('the object is locked against changes')
@elseif l='E' then
@user=DB.LOCK(1,'DATA*TTTT','','U')
@timout=DB.LOCK(1,'DATA*TTTT','','T')
@ap.type('the object is locked for editing by ',user)
@if timout>0 @ap.type('the lock expires at ',ftime(timout))
@endif
The function creates or fetches water marks. A water mark is a piece of text for the purpose of
documenting the origin of a data base. Once written, a water mark cannot be deleted or
changed.
DB.WATERMARK(unit,text)
d=DB.WATERMARK(unit,opt)
This form returns information. By default, it creates a text named WATERMARK containing the
watermark(s). If there are no watermarks, it returns -1. The function value is the pointer
(reference number) by which the text can be accessed.
EXAMPLES
@db.WATERMARK(1,EDTEXT)
Add the contents currently in the (old) text editor as a new watermark part
@db.WATERMARK(1,'L')
@d=db.WATERMARK(1)
4.5. Various
This function has been added to support performance monitoring and may be changed when
the object of interest changes. Presently it keeps a record of all read or inquire accesses to
DB2. The result is a table named TAB*DBACCESS and can be used with the table editor.
NOTE: manual refresh is needed (view->refresh). The column NAME contains the name of the
description and NR the number of accesses. NOTE: the service must be switched off in case of
!TAB RESET.
DB.STATISTICS(op)
op: operation:
ON: turn the statistics on. If it has been discontinued with OFF but RESET not done, old data
are not removed.
When data is transferred between the file and the run time memory, the amount of data
read/written at a time can be controlled. The data is stored as blocks of the size 512 bytes and
the unit is the number of blocks and can be 1...10.
DB.DBUFFER(blocks)
b=DB.DBUFFER()
The long name of a description to be used in titles etc. is returned by the function
@lname=db.makelongname(name,vers,unit,proj)
where
The name components of the long name of a description is returned by the function
@unit=db.getnamecomps(lname,sarr)
where
5. Functions of group DM
This group contains functions concerning data in the run time memory.
DM.INFO(object,info)
object: reference number of the object (as returned by the REC, ARR, DB and similar functions) or
name of description
TYPE: type of object: 1=integer array, 2=real array, 3=string array, 10=description, 0=error The
meaning of the following items depends on the type.
LAST: last record in a description. The second parameter can also be given as an integer
(1...5) in the order listed.
INMEM: 1=given description (given by name) is in the run time memory, 0=not
INDB: 1=given description (given by name) is in the project data base, 0=not
arr=DM.INFO('?')
Deprecated: DM.what() will be removed in the future. The developer should know what he has
a reference number to.
The function tells whether a given variable is a valid reference number and if so, what type.
type=DM.WHAT(refnr)
The function value is either 0=invalid reference number, e.g. because deleted, 1=integer
record, 2=real record, 3=string record, 10=description.
DM.CREATE(name,type,options)
EXAMPLES
@D=DM.CREATE('TEST')
Create a description named TEST, provided that one with this name did not already exist.
@D=DM.CREATE('','R')
DM.GET(name,opt)
opt: options
DM.EXISTS(name)
DM.DELETE(descr)
DM.DELETE(name)
DM.REC(descr,recnr,n)
recnr: record number, name of quantiy or name of table column. A string is interpreted as the name of
a table column if if the type of description is table (1970). Special cases:
n: (opt) get n:th record with the given record number, default=first. If recnr=0, give n:th record.
EXAMPLES
@D=DM.GET('TEST')
@R=DM.REC(D,1001)
@R=DM.REC(D,1001,2)
@R=DM.REC(D,0,2)
DM.NEWREC(descr,recnr,rtype,options)
options:
E: take existing rather than make new, default=add new. The record will be empty in both
cases.
F: put the new record first, default=last. If 'descr' is a record, the record is placed after the given
one.
DM.NEWREC(descr,qnt,options)
The record number and type are replaced by the name of a quantity.
EXAMPLES
@D=DM.CREATE('TEST','E')
@R=DM.NEWREC(D,100,1)
@R=DM.NEWREC(D,10,3,'F')
DM.DELREC(descr,rec)
DM.EMPTY(descr)
DM.RECORDS(descr,recnr)
recnr: (opt) record number. If this parameter is given, the result concerns only records with the given
record number, else all records.
DM.RECORDS(descr,arr)
arr: integer array, into which the record numbers of the records are stored.
EXAMPLES
@D=DB.READ('CURVE')
@N=DM.RECORDS(D,1001)
Find out how many records 1001 there are in description CURVE (number of curve branches in
this example).
@D=DB('DATA*TEST')
@LIST=ARR(1)
@N=DM.RECORDS(D,LIST)
Store a list of records in the macro TEST into the array LIST.
DM.RENAME(descr,name,type,options)
options:
E: DEPRECATED (= this option should not be used anymore) allow the operation even if there
is already a description with the given name. The current one should then be renamed or
deleted, otherwise a name conflict will remain in the free storage.
This function returns an integer derived from the contents of a description or part of it. The
purpose of this function is to serve as an additional check when deciding whether a given
description has changed. The result is result is returned as a string.
str=DM.FINGERPRINT(start,end)
end: (opt) record where to end, located after the start record. Default='start' alone if it is a record,
else the whole description.
The given description is output in the same format as done by DUMP in the TOC task. The
optional parameters can be omitted beginning from the end.
DM.DUMP(descr,name,file,opt)
name: (opt) name of description. Can be an empty string or omitted if the given description is named
and output with this name.
file: (opt) receiving file in the format used by the operating system. If not given, the result is output
as listclass 3.
The function is the same as with command LOAD under TOC: a description stored in the form
created by DUMP is read into the run time memory. Without option X, the result is returned with
the name DM.LOAD. The function value is the reference number of the description or 0 if
failure. The optional parameters can be omitted beginning from the end.
descr=DM.LOAD(file,name,opt)
file: (opt) source file in the format used by the operating system. Default: continue with the file given
in an earlier DM.LOAD or opeed with !OPEN as unit 11.
name: (opt) string variable (NOTE!) for receiving the name of the the description.
opt: options:
X: save the description with its real name. If one with this name exists. replace it. Default:
return the description with the name DM.LOAD.
The function adds elements to an array or to a set of arrays, starting at a given index. The
function value is the array size after the insert. The new elements are 0 (numbers) or empty
(strings).
DM.INSERT(array,index,n,value)
array: array to be modified. It may also be the reference number to a description, in which case it
must contain records with equal size, all of which are modified. However, a record 99 and any
records before it are disregarded.
index: index of the first inserted element. It must be >0 and at most current size+1.
value: (opt) value assigned to the new element. Not available for a whole description.
The function removes elements from an array or from a set of arrays, starting at a given index.
The function value is the array size after the removal.
DM.REMOVE(array,index,n)
As in DM.INSERT.
The function changes the index of an element in an array. Intermediate values are moved to up
or down one index. The function value is the array size.
DM.MOVE(array,index1,index2)
array: array to be modified. It may also be the reference number to a description, in which case it
must contain records with equal size, all of which are modified. Records before a flag record 99
will not be affected.
@n=DM.REMOVEDUPL(arr,arr2)
arr2: (opt) receiving array. If not given, the result is returned by modifying 'arr'
tol: (opt) tolerance for real arrays, default=0.0001. Values within the tolerance are treated as equal.
@n=DM.REMOVEDUPL(arr,arr2,'I')
Special case: returns a list of indices giving the items saved in the normal case (=first
occurrence of each value).
EXAMPLES
@s=arr(3) @n=parse('A B B B C A B D',s)
@s2=arr(3)
@n=dm.removedupl(s,s2)
S2 contains A B C D
@n=dm.removedupl(s)
@ia=arr(1)
@n=dm.removedupl(s,ia,'I')
ia contains 1,2,5,8.
The function changes the order of the elements in an array or set of arrays.
n=DM.SORT(array,dir)
n=DM.SORT(key,array1,array2,...,dir)
This form allows the basis for sorting be another array than the one actually changed.
key: array controlling the sorting. The same change is made to the target array(s) as needed to sort
the given one. The key array itself is not changed unless part of the target. The key array must
have the same size as the target.
array1: array to be modified. It may also be the reference number to a description, in which case it
must contain records with equal size, all of which are sorted.
EXAMPLES
Before the operation: S=A,C,B, N=1,2,3
DM.SORT(S,N)
N is changed to 1,3,2.
DM.SORT(S)
S is changed to A,B,C.
An arithmetic or other operation is done on all elements on an array, using either a constant or
other array as the other operand. The operande records must have the same size, which is
returned as the function value.
DM.OPERATE(operand1,arithop,operand2,par,result)
+: addition
-: subtraction (operand1-operand2)
*: multiplication
DM.OPERATE(operand1,'CNC',operand2,nc,result)
nc: fix size of the first operand (truncate or add spaces). 0=normal concatenation, <0: take largest
component +given nr
EXAMPLES
DM.OPERATE(10,'*',R1,R2)
DM.OPERATE(R1,'/',R2,R3)
Divide all elements in R1 with the corresponding one in R2 and store the result in R3.
DM.OPERATE(1,'/',R)
DM.OPERATE(S1,'CNC',S2,-1,S)
The elements of S are formed so that the n first characters are taken from S1 and the rest from
S2. n=longest size in S1 +1.
arr=DM.OPERATE('?')
DM.COPY(arr1,arr2)
With arrays, the array elements are appended, with descriptions, the records.
DM.APPEND(arr1,arr2,opt)
arr2: first part, to which the second one is appended. It must be of the same type as arr1.
opt: option available for string records: D=remove duplicates: do not add strings already in 'arr2'.
EXAMPLE
@parse('A,B,C',X) @PARSE('D E',Y)
@DM.APPEND(X,Y)
result: Y=(D E A B C)
@parse('A,B,C',X) @PARSE('A B E',Y)
@DM.APPEND(X,Y,'D')
result: Y=(A B E C)
The functions returns false (0) if the given arrays have equal size and equal elements, else the
index of the first differing element.
DM.DIFF(arr1,ind1,arr2,ind2,n,tol)
The function returns the index of the first matching item from the array, or zero if no matching
items found.
DM.LOCATE(arr,data,ind,opt)
0: (reals) return also intermediate values, the function value can contain a fraction.
3: match strings when wildcards interpreted in 'data' (string arrays). 'ind' not used.
4: special case: find an index i such that the string <data>i does not exist in the record.
The function gets part of a numeric array (type 2 in the ARR function) and stores it in another.
The function value is the number of elements returned.
DM.RPART(arr1,arr2,i1,i2)
i1: start index, may be a fraction, e.g. 2.5=average between elements 2 and 3.
i2: end index. May be fraction. i1 and i2 may be outside the range. If i1>i2 the result is stored in
the reverse order.
Generate the sum of two functions that need not have common arguments. The functions are
represented a polygons described by two arrays.
DM.SUM(x1,f1,x2,f2,x3,f3,tol)
x3,f3: similarly for the result. The arrays x3,f3 may be same as either x1,f1 or x2,f2
tol: (opt) tolerance for distinguishing coinciding arguments, default=0.0001. Discontinuities are
represented as double points where the arguments coincide within the tolerance.
The function finds all matching items in the array and outputs the indices of these items into a
given integer array. Note that the receiving array is emptied first. The function returns the index
of the first matching item from the array, or zero if no matching items found.
DM.SUBSEL(arr,data,res,ind,opt,tol)
3: match strings when wildcards interpreted in DATA (string arrays). 'ind' not used.
The function returns a subset of elements in an array, when given a list of indices, for example,
from TP.SUBSEL.
DM.SUBSET(source,subset,receiver,opt)
subset: the subset, integer array with indices in 'source'. The items are taken from 'source' in the order
the indices occur in subset. Indices out of range are ignored. The value may be zero=take all,
meaningful with the D option.
receiver: array for receiving the result. It must be of same type as 'source'. Previous contents are
removed.
opt: options:
Example
@subset=arr(1)
@n=tp.subsel(0,'TYPE=L',subset)
@S=arr(3)
@prec=tp.column(0,'PURP')
@dm.subset(prec,subset,s,'D')
The array will contain all values of PURP corrensponding to a liquid from the current table
(which could be an arrangement). Only one occurrence of each purpose is stored.
The function returns a set of items that is a combination of the items in two arrays, see
parameter OP for the alternatives. The given arrays are not supposed to contain duplicates.
DM.SETOP(arr1,arr2,result,op)
result: record for receiving the result. May be same as 'arr1' but not 'arr2. All records must be of the
same type.
op: operation:
T: union-intersection: take all items occurring in arr1 or arr2 but not in both of them. Can also
be interpreted as toggle: modify arr1 so that for all items in arr2, add if missing in arr1, else
remove.
EXAMPLES:
@arr1=arr(1) @n=parse('1 2 3 4',arr1)
@arr2=arr(1) @n=parse('3 4 5',arr2)
@arr3=arr(1)
@dm.setop(arr1,arr2,arr3,'U') -> 1,2,3,4,5
@dm.setop(arr1,arr2,arr3,'I') -> 3,4
@dm.setop(arr1,arr2,arr3,'D') -> 1,2
@dm.setop(arr1,arr2,arr3,'T') -> 1,2,5
DM.ADDSUBSET(arr1,arr2,result,sel)
A subset of elements of arr2 are placed after those of arr1 and stored in array result. The
subset to add is specified by array sel.
result: receiving array May be same as 'arr1' but not 'arr2. arr1, arr2 and result must be of same type.
sel: integer array specifying subset to add, such that elements from arr2 will not be added if sel at
the same index has value 0. Must be the same size as arr2.
DM.COPYSUBSET(arr1,arr2,sel,opt)
sel: integer array specifying selection. Must have the same size as arr1.
opt(opt): options
'R': Values of arr1 will be stored in arr2 at the indeces given by sel. Items arr1(i) with sel(i)=0
are added to arr2 at the end or omitted if option 'E' is also specified. Items arr1(i) with sel(i) < 0
are not copied. Items in arr2 not covered by sel will be unchanged.
'RI': If arr(i)=0, add after the last item rather than at end the i option requires that indeces in sel
(other than zero) are in ascending order. Otherwise the result will be incorrect.
DM.COPYSUBSET(arr1,arr2,sel)
If no options are given or option R is not specified the function empties arr2 and copies items
arr1(i) with sel(i)>0 in the order they appear to arr2.
DM.INSREC(rec1,ind,rec2,result)
ind: index of first element in rec2 after the operation. May be size(rec1)+1
result: record receiving the result, may be result=rec1. records must be of the same type.
5.3. Various
The function returns a list of descriptions currently in the free storage. The function value gives
the number of descriptions returned. Only named descriptions without access restrictions are
returned.
n=DM.LIST(arr,filter)
arr: receiving array. If the array is an integer array, reference numbers are returned, while names
are returned if it is a string array.
filter: (opt) string containing wildcards for selecting only those that that match the wildcard.
EXAMPLES
@S=ARR(3)
@n=DM.LIST(S)
@n=DM.LIST(S,'TAB***')
Return only items named TAB*. Note that the * that is part of the name is entered doubled in
order to distinguish it from the wildcard *.
This function prevents a description from being removed from the free storage at task exit or
change of version. Relevant for named descriptions only.
DM.SECURE(descr,opt)
opt: options
V: set scope=current version, i.e.allow delete at change of version or project, default=save over
version changes also.
The function returns information concerning unnamed descriptions in memory. The service
includes a register where a list of these is maintained in chronological order (must be activated
separately). This is the default source. Alternatively the descriptions can be found by searching
the memory (option G). With option GG, the result is restricted to the group 'unnamed' in !STAT
G.
result=DM.UDM(action)
action: selecting the action. The option G or GG (as presented above) is given last.
A: activate the register. The effect is that any time an unnamed description is created or
deleted, a list of these is updated. The register will contain the descriptions in order of creation.
(Does not concern those in memory when the register was activated).
S: return a record containing the size of the individual descriptions (indexed as the result of R)
F: return a record containing the record number of the first record in each description (may help
identification)
Examples:
@n=DM.UDM('N') total number of unnamed descr.
@list=DM.UDM('R') record containing the list of descriptions
@words=DM.UDM('T') total size in words
@srec=DM.UDM('S') record containing the individual sizes
@n=DM.UDM('NGG')
@list=DM.UDM('RGG')
@words=DM.UDM('TGG')
@srec=DM.UDM('SGG')
As above, but selecting the descriptions by searching the memory and excluding those
belonging to one of the categories taken into account in !STAT G.
6. Functions of group AI
AI.VERIFY(string,type)
10...19: integer
20...29: real
A given string is analyzed in terms of the NAPA command syntax. The function value is the
number of items as returned by AI3 (nr of values+structures).
AI.SYNTAX(string,carr,varr,opt)
carr: (opt) integer array for storing the syntax codes. -1 is assigned as the n+1:value.
varr: (opt) string array for returning values corresponding to the codes in CARR. At indices in CARR
referring to a structure, a pointer to the next item after the structure is stored. If varr is given,
carr must also be given.
This function starts a macro. It performs essentiallay the same task as the !ADD command.
The function value is an empty string. NOTE: the macro is removed from the run time memory
after execution.
AI.ADD(macro,par1,par2,...,'L!')
macro: name of macro or reference number (e.g. from DB.READ, MACRO). A name is interpreted
according to the normal reading order (proj. db ... NAPADB).
AI.ADD(macro,plist,'()','L!')
AI.ADD(macro,'TASK=task',...,'L!')
Otherwise as in the other forms, but run the macro immediately. under the given task. The
macro can contain commands valid in the given task. This option is presently available for
tasks DEF, DR, TAB, LD, ST, CL, TRA, TOC, HYD, STA, FRA, CP, DA, GS. It is
recommended to define "@global none" in the called macro so that if internal variables
generated by the task are not overwriting variables of same name in the calling macro.
AI.ADD(macro,'STEP=1',...)
EXAMPLES
@AI.ADD('MACRO1')
@D=DB.READ('MACRO2','A','P1234')
@AI.ADD(D,'test')
Run the macro MACRO2 from version A in project P1234, with one parameter.
This function runs a macro containing NAPA BASIC statements only. It differs from AI.ADD in
that it is executed immediately and not when NAPA reads the next command, and that it can
return a value. If the macro assigns a value to a LOCAL variable $RESULT, this value is
returned as the function value, otherwise an empty string. NOTE: the macro is removed from
the run time memory after execution.
AI.RUN(macro,par1,par2,...,'L!')
macro: name of macro or reference number (e.g. from DB.READ). A name is interpreted according to
the normal reading order (proj. db ... NAPADB).
Examples:
@AI.RUN('UPDATEEVERYTHING')
This command simply runs the given macro, assumed to be relevant because of its indirect
effects.
@V=AI.RUN('VOLUMEOF','HULL')
function as RESULTOF. When macros query values in GUI mode, a modal dialog is popped up
by default. This function can be used to change this behaviour. Note, that when popups are
disabled, GUI mode does not work properly during query operations.
@POP=AI.POPUP(NEW)
The function does the similar function as !L, i.e return executed commands. The result is stored
in the form of a normal macro with line numbers 1,2,3...
descr=AI.LASTOMMANDS()
A macro named DATA*COMMANDS is created which is left in the free storage. The function
value is the reference number of the macro.
AI.LASTCOMMANDS(descr)
descr: (opt) description, receiver for the result. Old contents are removed.
This function suppresses the checking for events normally done between processing of lines in
a macro. It is intended for special cases when there is risk for disturbing the current macro. It
should be used with restriction, since the user interface is disabled while the lock is on. The
effect concerns also called macros. The lock is automatically released when the macro exits.
The lock does not concern internally generated events. Note: other functions than AI may
trigger actions.
AI.EVENTLOCK(state)
state=AI.EVENTLOCK()
value=AI.MACRO(property,level)
property: (opt)
NAME: name of the macro (default). May be empty, depending on how the macro was started.
LEVEL: (opt) nesting level, default=current (=highest). AI.LEVEL() tells the current level.
This function is valid for a macro containing the @parameters statement. It returns the list of
parameters in a given array and optionally, the type and explanation. The explanation requires
that the parameters are presented by comments as follows:
@@ name: explanation or
@@ name= explanation
The @parameters statement must not be separated from the start of the macro by other lines
than empty lines or comments and the explanations must follow it on the similar condition.
AI.PARAMETERS(macro,idarr,typearr,exparr,statarr)
macro: reference number of the description containing the macro (can be fetched with the function
MACRO).
typearr: (opt) string array for receiving the parameter types, same symbols as in the @parameters
statement. Assign 0 if not used and other parameters follow.
statarr: (opt) integer array for recording whether the parameter is compulsory (1) or optional (0).
EXAMPLE
@idarr=arr(3) @exparr=arr(3)
@parameters(macro('p-corrbh'),idarr,0,exparr)
Return the parameters of the macro 'p-corrbh' (read according to the normal rules) and return
the names in 'idarr' and explanations in 'exparr'.
The effect is to insert calls to AD.VARFROMTABLE at the start of the macro, after possible
@PARAMETERS, @GLOBAL or @LOCAL commands. and to AD.VARTOTABLE at the end.
This service has been added to support the manager, so that variables can be provided to
macros with local variables and that do not have own commands to this effect.
AI.VARDEF(macro,vardef)
EXAMPLE
@m=macro('test')
@ai.vardef(m,'VDEF)
@ai.add(m)
The macro 'test' is equipped with variables from the table VDEF and started.
The function returns the value of a coordinate expression in the form available in commands
(bare coordinate or #...). Optionally, it returns the components of the expression.
value=AI.COORD(expr,arr)
arr: (opt) string array for receiving the result. The result is stored in the record elements as follows:
4: axis implied by the expression, frame, web ->X, long ->Y, vert -> Z. In the case of an object,
the axis of reference coordinate.
EXAMPLE
@r=arr(3)
@q=AI.COORD('#L12+0.4',r)
The function returns the line number the next @return statement will jump to. This way it is
possible to find out which line in a macro caused a jump, useful information especially with
'@ONERR label R'.
@line=AI.RETURNADDRESS()
EXAMPLE
@ONERR handler R
@@ lots of macro, where error could occur
...
@end
@label handler
@line=ai.returnaddress()-10
@e=mn.err()
@ec=mn.errcode()
@@ Now we know which line caused the error, e.g. for logging purposes
@@ or to take some corrective action.
@return
Reading macros from database every time they are executed would have bad performance.
Therefore Napa is normally saving in macro cache memory the compiled version of a macro
after first execution, so subsequent calls will be fast. This function controls the use of the macro
cache and provides some auxiliary functions. Without parameters, the function returns the
current state, expressed as presented for the parameter 'op'.
AI.CACHE(op)
op: operation:
L1: as ON, but only for macros used by the calculator and similar (e.g. function RESULTOF)
L3: also macro run by AI.ADD, AI.RUN, excluding only macros run with !ADD.
AI.CACHE(op,macro)
Functions concerning individual macros. Both functions have the effect that if the macro is
changed, the new version will take effect.
op: operation
ADD: add the macro. A previous copy is replaced. Done regardless of the level selected with
L1...L3. With ADDE (i.e. AI.CACHE('ADDE',..) the macro is stored with block structures (IF
...THEN ao) opened.
REMOVE: remove a macro. At the next call, a fresh copy is read. No message is given if this
call is redundant (the macro is not recorded).
AI.RUNINTASK() (OBSOLETE) run subsequent part of the macro in the given task
(OBSOLETE, please avoid using) This function is similar with AI.ADD(.. 'TASK=task') but the
macro to be run is the remainder of the current one. This service has primarily been added in
order to simplify running of commands in callbacks.
AI.RUNINTASK(task)
task: task to be run, same as in AI.ADD: DEF, DR, TAB, LD, ST, CL, TRA, TOC. See also AI.ADD.
AI.ABORT()
AI.MACROLINES('LINE1','LINE2',...)
AI.MACROLINES('MACRO_NAME=macro_name','LINE1','LINE2',...)
AI.MACROLINES(LINES)
AI.MACROLINES('macro_name',LINES)
AI.MACROSTRING('MACRO_AS_STRING')
AI.MACROSTRING('MACRO_NAME','MACRO_AS_STRING')
AI.MACROSTACKTRACE(receiver)
receiver: (opt) string record that will be populated with stack trace'slines.
7. Events of group AI
AI*INTERRUPT()
This event is raised when a button on the mouse of the currently active digitizer is pressed
(150002).
AI*DIGINPUT(arr,str)
2: similarly v-coordinate
3: u-coordinate interpreted according to the current coordinate system (as set with !GIN
command or function GR.DIGCOORD). If no such coordinate system is defined, same as
element 1.
5: button number
str: equivalent command component, as would otherwise be added to the current command
This event is raised when a macro is ended. For technical reasons, the event is raised before
the last line is treated. The event concerns only macros run in the normal mode and the event
can only be handled in immediate mode. (150003).
AI*ENDMACRO(level,name)
name: name of macro. Depending on how the macro was started, the name may not be available
(=empty).
This event is raised when the macro execution is terminated abnormally, for example with Quit
command in stepmode.
AI*TERMINATE(name)
name: name of macro. Depending on how the macro was started, the name may not be available
(=empty).
8. Functions of group AP
The function does the same as command !LINK. The listclasses and destinations are coded as
integers (!see EXPL !LINK).
AP.LINK(lc,d,dest)
AP.LINK(lc,0,dest1,dest2)
EXAMPLE
@old1=AP.LINK(1,1,11)
@old2=AP.LINK(1,2,-1)
@AP.LINK(1,0,old1,old2)
The function returns the page width (characters/line) applied for the given listclass and
optionally changes it.
oldpw=AP.PAGEW(lc,pw)
The function returns the page height (number of lines) applied for the given listclass and
optionally changes it.
oldph=AP.PAGEH(lc,ph)
This function outputs a text. Its main purpose is to make it possible to do output in macros that
must not contain NAPA commands. See also AP.TYPECONTROL.
AP.TYPE(text1,text2,...,lc)
text1,text2,...: texts to be output, strings or numbers. One line is formed by concatenating the elements.
lc: (opt) listclass, expressed as the string ->n, default ->4 (log). With ->Gn, the result is graphic
text n on listclass 1. Note: if the given listclass is not already opened, an unnamed list if
opened.
AP.TYPE(macro,lc)
This form repeats the operation for all lines in the given macro.
macro: macro given a the reference number of a description (from the function MACRO, for example).
May also be a string array.
This function controls generation of tables for transfer to other systems using the DUMP
command under table calculation or the TAB option in TOO.
AP.DUMPOPT(del,opt)
del: delimiter between items, default =; (semicolon). Special cases: T=tabulator, D=built in default.
L: use LATIN1 encoding. Default UTF8 unless otherwise set with AP.ENCODING.
EXAMPLES:
@AP.DUMPOPT('T')
@AP.DUMPOPT('D','CD')
Keep the built-in delimiter, set options C=comma as decimal point, D=DOS format.
Internally, character data is coded as UTF8, allowing among other things the use of Asian
characters. Presently (rel. 2006.1), the encoding system LATIN1 is more widely used and the
encoding may need conversion when exchanging data with another program. For Asian
characters, the coding system must be UTF8. For western characters this choice is relevant
only for characters outside the basic ASCII set. Since most functions do not have any local
possibility for controlling the encoding, this function has been provided as a general solution.
For tables, see also AP.DUMPOPT.
AP.ENCODING(encoding)
encoding: UTF8 (default) or LAT1. May also be expressed as ON or OFF: ON=do conversion from
LATIN1 to UTF8 and vv when reading/writing OFF=no conversion.
encoding=AP.ENCODING()
This function modifies the effect of subsequent output with the function AP.TYPE or the TYPE
command. In case of AP.TYPE, it concerns only listclass 1 (i.e. AP.TYPE(...'->1'). This function
has been added primarily to support output with DocBook in order to allow using the normal
font. By default, a monospaced font (usually Courier) is used in order to maintain the given
layout. The keywords correspond to those used in DOC. The settings below are mutually
exclusive and cancel each other.
AP.TYPECONTROL('FIX',sel)
NF: normal font: given line division is maintained but the normal font is used
OFF: use paragraph-type layout where the division between lines is also free
AP.TYPECONTROL('TAB',template)
This form initiates a table. The items in subsequent TYPE command will be output as in own
column in the table. The function obeys the same logic as in DOC, see !EXPL .TAB/DOA for
more information.
AP.TYPECONTROL('TAB','OFF')
9. Events of group AP
This event is raised when a listclass is opened. (160001). See alse AP.OPENRLIST.
AP*OPENLIST(lc,name)
lc: listclass
This event is raised when a listclass is closed. (160002) See alse AP.CLOSERLIST.
AP*CLOSELIST(lc)
lc: listclass
AP*OPENRLIST(lc,name)
lc: listclass
AP*CLOSELIST(lc)
lc: listclass
This event is raised when the end of a page is reached, but before it has been marked in the
list. (160005)
AP*ENDOFPAGE(lc,pagenr,lnr)
lc: listclass
AP*TOPOFPAGE(lc,pagenr)
lc: listclass
The operating system interface of NAPA provides a set of service functions with which to
communicate with the local environment.
The service functions provide access to dynamic memory allocation, file system operations and
terminal I/O.
Parameters of any type can be collected into an array with the function
@os.arr(pari,...,arr)
where
At first, the function concatenates the parameters to one string. Then each line in the string is
stored as a separate item to the array or data element. If the type of the array is not compatible
with the data types of the lines in the string, an error message will be invoked and the operation
will fail.
Parameters of any type can be collected into a string handle with the function
@res=os.ref(pari,...)
where
The function concatenates the parameters to one string and returns that string in a string
handle. The handle must be explicitly freed with the os.free() function.
Parameters of any type can be collected into a number with the function
@num=os.num(pari,...)
where
The function concatenates the parameters to one string and converts that string into a number.
A data type error will cancel the operation.
Parameters of any type can be collected into a string with the function
@str=os.str(pari,...)
where
The function concatenates the parameters to one string and returns that string.
A data item of any type can be appended after a string handle with the function
@os.append(ref,item,delim)
where
A data item of any type can be inserted into a string handle with the function
@os.insert(ref,item,ind,delim)
where
@os.replace(ref,item,ind,delim)
where
A data item can be deleted from a string handle with the function
@os.delete(ref,ind,delim,count)
where
The number of data items in a string handle can be calculated with the function
@num=os.items(ref,delim)
where
A data item can be picked from a string handle as an array or data element with the function
@os.getarr(ref,ind,delim,arr)
where
A data item can be picked from a string handle as a string handle with the function
@res=os.getref(ref,ind,delim)
where
A data item can be picked from a string handle as a number with the function
@num=os.getnum(ref,ind,delim)
where
A data item can be picked from a string handle as a string with the functions
@str=os.getstr(ref,ind,delim)
@str=os.get(ref,ind,delim)
where
@os.free(ref)
where
@os.freeall()
Be careful!
A string item can be searched from a string handle with the function
@ind=os.search(ref,str,delim,case)
where
A parameter of any type can be converted to uppercase letters with the function
@res=os.upper(par)
where
Note that array and string handle parameters are converted themselves and a result value is
not returned.
A parameter of any type can be converted to lowercase letters with the function
@res=os.lower(par)
where
Note that array and string handle parameters are converted themselves and a result value is
not returned.
A parameter of any type can be converted to a string without evaluating it with the function
@str=os.tostr(par)
where
This function is used to convert array and string handle parameters themselves to strings, not
their contents.
A string parameter representing a string handle or a reference number can be converted to its
original representation with the function
@ref=os.toref(par)
where
This function is used to convert strings representing references, not their contents.
A string parameter can be tested before converting it to a number with the function
@test=os.isnum(par)
where
0: not a number
1: is a number
OS.IS() test
@test=os.is(par,test)
where
0: alphabetic (default)
1: alphanumeric
4: digit
5: hexadecimal digit
8: control
9: lower case
The total amount of available virtual memory is checked with the function
@total=os.memtotal()
where
The used amount of available virtual memory is checked with the function
@used=os.memused()
where
@n=os.memload()
where
@fnr=os.opendevice(name)
where
@fnr=os.openfile(name,mode,encoding)
where
2: append file.
@fnr=os.createfile(name,trunc,encoding)
where
@os.closefile(fnr)
where
@os.deletefile(name)
where
@test=os.fileexists(name)
where
1: file exists
-1: file's existence can't be determined (e.g. due to insufficient access rights or inaccessible
network drive)
@os.readarr(fnr,count,delim,timer,arr)
@ref=os.readref(fnr,count,delim,timer)
@num=os.readnum(fnr,count,delim,timer)
@str=os.readstr(fnr,count,delim,timer)
@str=os.read(fnr,count,delim,timer)
where
arr: is a reference number of a result array or data element given as the last parameter
count: is the number of characters to read (optional, default is one line, is ignored if a special delimiter
is given)
delim: is a delimiter character until which to read or one of special delimiters (optional):
EOT: until end of text (line breaks are converted to single line feeds)
@os.write(fnr,data,delim)
where
delim: is the delimiter character to append after data or one of special delimiters (optional):
EOT: end of text (line feeds are converted to local line breaks).
The current position of the file can be moved with the function
@pos=os.seekfile(fnr,offset,base)
where
1: end of file
2: current position.
@os.truncfile(fnr,size)
where
size: is the number of characters to leave to the file (optional, default is 0).
@info=os.filetype(name)
where
1: file
2: directory
3: device
4: pipe
@info=os.filesize(name)
where
@info=os.filecdate(name)
where
@info=os.filemdate(name)
where
@os.copyfile(source,target)
where
@os.movefile(source,target)
where
@path=os.makepath(file,direc)
where
@file=os.filename(path)
where
@direc=os.direcpath(path,delim)
where
The communication device can be set to line i/o mode with the function
@os.setlineio(dnr,timeout)
where
timeout: is the timeout to wait for the device during read operations (optional, default is forever (-1))
@os.mkdir(path)
The id of the current operating system and hardware can be obtained with the function
@osid=os.id()
where
OS.MSECS() milliseconds
@msecs=os.msecs()
where
@ptrn=os.pattern(str)
where
The string can contain circumflexes (^) followed by uppercase letters. These pairs are then
interpreted to corresponding control characters. F.ex. ^I=tabulator, ^J=line feed, ^M=carriage
return, etc. To include a circumflex itself in the pattern, it must be preceded by a backslash (\).
@msg=os.message(str,par)
where
The string can contain one ambersand (&) which is replaced by the parameter, if given.
@os.signal(onOff)
where
Table of Contents:
1. General
2. Widgets
3. Subsystems involved
4. Functions of the group UI
4.1. Widget definition descriptions
4.2. Widget manipulation
4.3. Miscellaneous
4.4. Internal
5. Events of the group UI
6. Functions of the group MTF
1. General
The components of the graphical user interface are implemented using Motif, which in turn is based on the Xwindows system. In the PC world,
where Xwindows is not part of the standard operating system, an emulator such as EXCEED is needed.
The graphical user interface forms a layer of control on the main NAPA. In most cases, commands and control from graphical user interface can
be mixed.
The NAPA macro language forms the common tool by which all functions are controlled: both the actions within the graphical user interface and
the actions by the main NAPA.
The main form of communication between the macros and the functions being controlled is the service functions. These handle communication
both ways: asking for information and executing control. The control may also be achieved by normal commands.
Communication from the main NAPA to the graphical user interface is also handled by NAPA events: an event is a specified change of state, for
example, table value changed, to which an action can be attached. The action is implemented by a macro.
2. Widgets
The graphical user interface is based on a set of objects called widgets. These may or may not have components visible on the screen. The
widgets receive the user actions as events which may trigger callback for carrying out some action. For creating widgets, the widget editor is
provided.
3. Subsystems involved
The functions specifically related to the user interface are handled by the UI subsystem. The underlying Motif functions are available on the macro
level as a separate set of service functions.
The NAPA/Motif interface provides three basic mechanisms for interacting with widgets:
creating and manipulating widgets and widget resources, retrieving values of widget resources
and calling actions of widget instances.
The interface has three different implementation levels. The lowest level provides direct access
to widget actions and functions. It is implemented as a set of service functions having a 'Mtf.'
prefix. The names of these service functions are case sensitive and they are not supported by
the !CALCULATE command.
All Mtf functions can return their result in different data types. The desired data type is selected
during the call by appending a type suffix to the name of the function:
Arr return the result as a calculator array given as the last parameter to the function
The Str data type is used when the function is called without a suffix.
The Mtf level of the interface is used for implementing NAPA's standard database widgets. The
list of the Mtf functions can be displayed with the command
!COMMANDS Mtf.F
The second level of the interface provides a set of service functions having a 'UI.' prefix. These
functions provide basic tools for interacting with NAPA/Motif widgets within macros. The list of
the UI functions can be displayed with the command
!COMMANDS UI.F
Both Mtf and UI functions accept several types of parameters. The basic types include strings
and numeric types. In addition, arrays and data elements can be given when applicable. String
handles, provided by the OS service functions, are also supported.
!COMMANDS GUI
@wid=ui.build(des,pid,name,resi,vali,...,state)
where
name: is an optional instance name of the new widget (if not given, the name specified in the
description will be used; '*' will automatically generate a unique name for the widget
resi,vali: are an optional set of resource/value pairs overriding the corresponding resource specifications
in the description (note that '/' for resi passes the value of the following vali to the initializer of
the first widget definition in the description)
state: is opening state option overriding the corresponding option specified in the description.
When the name of the description is given, the description is searched from NAPA's databases
and is freed automatically from the memory after the widgets have been built. If the reference
number of the description is given, the description will be filled with run-time information about
the built widgets and has to be freed explicitly with the ui.free() function after it is not needed
any more.
By default, other than shell widgets are automatically opened (managed and realized) after
creation. Shell widgets must be explicitly opened with a separate command. However, widgets,
which are opened by default, can be created closed by including the state option 'CLO(SED)' in
the command. Correspondingly, state option 'OPE(N)' opens all types of created widgets
automatically.
EXAMPLES
The macro
@des='MYTEST'
@wid=ui.build('UI_WED',0,'*','/','des')
Builds NAPA's widget editor with a unique name and opens it for editing the widget definition
description named 'MYTEST'.
@wid=ui.rebuild(des,pid,name,resi,vali,...,state)
@ui.destroy(des)
where
The function deletes the widgets, built by the ui.build() function, in the given widget definition
description. It also removes the run-time information from the description, but does not free it
from the memory.
@ui.release(des)
where
The function removes the run-time information from the built widget definition description, but
does not delete the built widgets or free the description from the memory.
@ui.update(des,opt)
where
X: all resources
A: attributes
C: callbacks
S: strings
N: numbers
B: Booleans
K: constants
W: widgets
The function replaces the resource values of the built widgets with the resource values in the
widget definition description.
@ui.retrieve(des,opt)
where
X: all resources
A: attributes
C: callbacks
S: strings
N: numbers
B: Booleans
K: constants
W: widgets
The function replaces the resource values in the widget definition description with the resource
values of the built widgets.
@wid=ui.create(pid,name,class,resi,vali,...,state)
where
By default, other than shell widgets are automatically opened (managed and realized) after
creation. Shell widgets must be explicitly opened with a separate command. However, widgets,
which are opened by default, can be created closed by including the state option 'CLO(SED)' in
the command. Correspondingly, state option 'OPE(N)' opens all types of created widgets
automatically.
EXAMPLES
The macro
@pid=ui.create(0,'MyShell','TopLevelShell')
@wid=ui.create(pid,'MyRC','RowColumn')
@tid=ui.create(wid,'MyButton','PushButton')
@ui.open(pid)
creates and opens a small window containing one button belonging to the XmPushButton
class.
@ui.delete(wid)
where
Values for widget resources can be given in application resource files, user resource files,
custom resource files, within widget creation commands and with the function
@ui.set(wid,resi,vali,...)
where
EXAMPLES
The command
@ui.set('MyButton','labelString[tiny]','My Button',
'foreground','rgb:ff/ff/00')
replaces the label of the 'MyButton' widget with a text string 'My Button' displayed in a yellow
tiny font.
Values for widget resources can be queried from the resource files with the function
@ui.query(wid,sblng,resi, ...)
where
sblng: is the name of the sibling widget which resources are queried (can be empty)
The general resource specification functions and command replace all existing callbacks with
the specified name with the new one. However, more than one callback for the same event can
be given by repeating callback specifications with the same name. Another way of specifying
several callbacks for the same event is the function
@ui.addcb(wid,callback,value)
where
@ui.removecb(wid,callback,value)
where
value: is the command/macro to remove (if not given, all callbacks with the specified name are
removed).
@ui.open(wid,mode)
where
0 = modeless (default)
1 = modal (exclusive)
2 = modal (non-exclusive)
The command
@ui.close(wid,mode)
where
0 = modeless (default)
1 = modal (exclusive)
2 = modal (non-exclusive)
closes a widget or, if the mode parameter is not 0, restores its mode.
@ui.show(wid)
where
The function
@ui.hide(wid)
where
To assign resource values to NAPA's calculator variables and arrays, the following functions
can be used
@ui.getarr(wid,res,arr)
@ref=ui.getref(wid,res)
@num=ui.getnum(wid,res)
@str=ui.getstr(wid,res)
@str=ui.get(wid,res)
where
arr: is a ref.nr. of a calculator array into which to store the resource value
EXAMPLES
The command
@w=ui.getnum(0,'width')
The macro
@ref=ui.getref('WEdit*DefList','browseSelectionCallback')
@ui.set('WEdit*ResEdit*Text','stringValue',ref)
@os.free(ref)
copies the browseSelectionCallback macro of the 'DefList' widget to the 'Text' widget for
editing.
@test=ui.is(wid,prop)
where
UI.WID() id of a widget
@wid=ui.wid(path,pid)
where
@pid=ui.pid(wid)
where
@name=ui.name(wid)
where
@path=ui.path(wid)
where
@ui.settitle(wid,title,spec)
where
By default, the specifier contains the current version, project and run identification.
@title=ui.gettitle(wid)
where
The function
@ui.activate(wid,sel,'\f','parj',...)
where
can be used for calling the activate action of widgets belonging to ArrowButton,
CascadeButton, DrawnButton, PushButton, ToggleButton, Text, TextField or List classes.
The function
@ui.invoke(wid,'\f','parj',...)
where
can be used for invoking user callbacks of widgets of any class (except shells). The selector
specifies the callback to invoke. If not given, all user callbacks are invoked. If the
corresponding callback is not found from the target widget, it will be searched from its parent
widgets until the first shell.
NAPA's standard dialogs can be opened as modal with the following functions
@ui.askarr(wid,def,...,arr)
@ref=ui.askref(wid,def,...)
@num=ui.asknum(wid,def,...)
@str=ui.askstr(wid,def,...)
@str=ui.ask(wid,def,...)
where
arr: is a ref.nr. of a calculator array into which to store the result value from the widget
To build a modal dialog directly from a description, the following functions can be used
@ui.answerarr(des,pid,name,def,...,arr)
@ref=ui.answerref(des,pid,name,def,...)
@num=ui.answernum(des,pid,name,def,...)
@str=ui.answerstr(des,pid,name,def,...)
@str=ui.answer(des,pid,name,def,...)
where
name: is an optional instance name of the new widget (if not given, the name specified in the
description will be used; '*' will automatically generate a unique name for the widget
arr: is a ref.nr. of a calculator array into which to store the result value from the widget
To open modal widgets with embedded callbacks, the following function can be called.
@ui.request(wid,'\f','pari',...)
where
The widget must have been built as closed before calling this function. The given parameters
are passed to all callbacks of the widget and they can be used both for input and output of
data.
To open modal widgets with full callback capability, the following function can be called.
@ui.modal(wid,'\f','pari',...)
where
The widget must have been built as closed before calling this function. The given parameters
are passed to all callbacks of the widget and they can be used both for input and output of
data.
4.3. Miscellaneous
In addition to the standard application and user resource files, the NAPA/Motif interface
supports dynamic loading of custom resource files and resource specifications. Custom
resources can be merged to the application resource database with the function
@ui.merge(spec,overr)
where
spec: is the pathname of the resource file or a resource specification with a 'RES*' prefix or a set of
resources in separate lines
The NAPA/Motif interface buffers all alphanumeric and graphic output and flushes it at certain
intervals. These intervals are specified by the flushInterval and exposeInterval application
resources. To cause an immediate flush, the function
@ui.flush()
can be used.
Status messages can be displayed in the status bar with the function
@ui.msg(wid,message)
where
@ui.openmsg(wid,message)
where
@ui.closemsg(wid,message)
where
@ui.setcursor(wid,cursor)
where
cursor: is the name of the cursor (if not given, the default cursor is used).
UI.BEEP() beep
@ui.beep()
To find a named widget description, either a collection or a definition, the following function can
be called.
@des=ui.find(name)
where
@ui.exit()
The current command log widget can be changed with the following function can be called.
@ui.switchlog(wid)
where
Auxialiary input devices, like tablets, can be controlled with the function
@ui.aux(function,id,param1,param2,...)
where
function: can be
DIS(ABLE): for disabling input from the port (events are sent)
'NAME',inputportname
'STOP',stopbits (1 - 2)
'BITS',bitsperbyte (5 - 8)
'TIME',timeouttowait (milliseconds).
4.4. Internal
@des=ui.new()
@ui.free(des)
@des=ui.read(name,vers,unit)
@ui.write(des,name,vers,unit)
@test=ui.exists(name,vers,unit)
@ui.remove(name,vers,unit)
@def=ui.newdef(des,pos,class,name,st,f)
@def=ui.readdef(des,pos)
@ui.writedef(def,class,name,st,f)
@ui.removedef(def)
@def=ui.copydef(def,ind,des)
@def=ui.movedef(def,ind,des)
@rec=ui.newres(def,res,typ)
@rec=ui.readres(def,res,ind)
@ui.writeres(rec,val)
@ui.removeres(rec)
@rec=ui.moveres(rec,ind)
@rec=ui.newsel(rec)
@rec=ui.readsel(rec)
@ui.writesel(rec,sel,name)
@ui.removesel(rec)
@ref=ui.deflist(des,typ)
UI.DEFID() definition id
@id=ui.defid(def)
@ind=ui.defind(def)
@ref=ui.reslist(def,typ)
UI.RESID() resource id
@rid=ui.resid(res)
@rnr=ui.resnr(res)
@typ=ui.restype(res,spec)
@rec=ui.readpos(def,pos)
@des=ui.collect(des,type)
@ui.load(des,name,unit)
@ui.unload(name,unit)
This event is raised when a new top level shell window to be registered in the window menu is
created (280001).
UI*WINDOWCREATED(wid)
This event is raised when a top level shell window registered in the window menu is deleted
(280002).
UI*WINDOWCREATED(wid)
This event is raised when a top level shell window registered in the window menu is updated
(280003).
UI*WINDOWUPDATED(wid)
This event is raised when the updated setup is applied in the setup definition widget (282120).
UI*DRSETUPAPPLIED(vnr,drw)
This event is raised when a new setup is opened in the setup definition widget (282121).
UI*DRSETUPOPENED(wa,stp)
This event is raised when the setup is closed in the setup definition widget (282122).
UI*DRSETUPCLOSED(wa)
This event is raised when the setup is updated in the setup definition widget (282123).
UI*DRSETUPUPDATED(wa)
This event is raised when a part of the setup is selected in the setup definition widget (282124).
UI*DRSETUPSELECTED(vnr,ind)
This event is raised when the drawing properties dialog is opened (282128).
UI*DRPROPERTIESOPENED(wid)
wid: widget id
This event is raised when the drawing properties dialog is closed (282128).
UI*DRPROPERTIESCLOSED(wid)
wid: widget id
This event is raised when the contents of a table in the table widget is changed (281907).
UI*TPCHANGE(twa,ref)
This event is raised when the definition of a table in the table widget is changed (281915).
UI*TPCHGDEF(twa,ref,c)
This event is raised when a table in the table widget is closed (281927).
UI*TPUNLOADWA(twa)
This event is raised by GUI (impl. in Steel) when current object is changed (281930).
UI*CUROBJECTCHANGED(wid,object,subobject)
This event is raised by GUI (impl. in Steel) when drawing is created by the 2d plot macro
(281931).
UI*STDRAWINGCREATED(mode,axis,sec)
This event is raised by GUI (impl. in Steel) when edit of parametric object is started (281932).
UI*STSKETCHEDIT(rid,name)
This event is raised by GUI (impl. in Steel) when copy of parametric object is started (281933).
UI*STSKETCHCOPY(rid,name)
This event is raised by GUI (impl. in Steel) when copy of parametric object is started (281934).
UI*STSKETCHDELETE(rid,name)
The NAPA/Motif interface provides three basic mechanisms for interacting with widgets:
creating and manipulating widgets and widget resources, retrieving values of widget resources
and calling actions of widget instances.
The interface has three different implementation levels. The lowest level provides direct access
to widget actions and functions. It is implemented as a set of service functions having a 'Mtf.'
prefix. The names of these service functions are case sensitive and they are not supported by
the !CALCULATE command.
All Mtf functions can return their result in different data types. The desired data type is selected
during the call by appending a type suffix to the name of the function:
Arr return the result as a calculator array given as the last parameter to the function
The Str data type is used when the function is called without a suffix.
The Mtf level of the interface is used for implementing NAPA's standard database widgets. The
list of the Mtf functions can be displayed with the command
!COMMANDS Mtf.F
The second level of the interface provides a set of service functions having a 'UI.' prefix. These
functions provide basic tools for interacting with NAPA/Motif widgets within macros. The list of
the UI functions can be displayed with the command
!COMMANDS UI.F
Both Mtf and UI functions accept several types of parameters. The basic types include strings
and numeric types. In addition, arrays and data elements can be given when applicable. String
handles, provided by the OS service functions, are also supported.
!COMMANDS GUI
@res=Mtf.PromptDelimiter(wid{, val})
val: string resource value used as a delimiter between the prompt and user input (optional)
@res=Mtf.CallbackEcho(wid{, val})
val: Boolean resource value specifying whether to echo names of callback functions during
run-time (optional)
@res=Mtf.FlushInterval(wid{, val})
val: numeric resource value specifying in milliseconds the interval between flushings of
alphanumeric output buffers (optional)
@res=Mtf.ExposeInterval(wid{, val})
val: numeric resource value specifying in milliseconds the interval between flushings of graphic
output buffers (optional)
@res=Mtf.UnitOfWidgets(wid{, val})
val: numeric resource value specifying the database search order of widget descriptions (optional):
2: sysdb, napadb
7: napadb
@res=Mtf.ShowTips(wid{, val})
val: Boolean resource value specifying whether to show tip windows (optional)
@Mtf.EnableTip(wid)
@Mtf.DisableTip(wid)
@Mtf.ShowTip(wid)
@Mtf.HideTip(wid)
@Mtf.SwitchLog(wid)
@Mtf.LockEvents(wid)
@Mtf.UnlockEvents(wid)
@Mtf.CloseImages(wid)
@id=Mtf.GetImage(wid)
@rgb=Mtf.GetRGB(wid,ind)
@str=Mtf.GetImageBuffer(wid, spec)
This resource specifies how long popup error windows invoked by commands are kept open.
Timeout 0 disables opening of such windows. The value parameter is optional. The function
returns the previous value of the resource. The scope of the function is global and independent
on the widget parameter.
@res=Mtf.ErrorMessageTimeout(wid{, val})
This resource specifies the minimum error severity level for popup error windows invoked
either by commands or by widgets. The value parameter is optional. The function returns the
previous value of the resource. The scope of the function is global and independent on the
widget parameter.
@res=Mtf.ErrorReportLevel(wid{, val})
This resource specifies error codes, which do not invoke popup error windows either by
commands or by widgets. The value parameter is optional. The function returns the previous
value of the resource. The string representation of the resource is a LF separated list. The
scope of the function is global and independent on the widget parameter.
@res=Mtf.DiscardedErrorCodes(wid{, val})
@res=Mtf.AutoUpdateTables(wid{, val})
@Mtf.DeleteWidget(wid)
@str=Mtf.GetResource(wid, res)
@Mtf.SetTitle(wid, title)
@title=Mtf.GetTitle(wid)
@Mtf.OpenWidget(wid{, mode})
@Mtf.CloseWidget(wid{, mode})
@Mtf.ShowWidget(wid)
@Mtf.HideWidget(wid)
@Mtf.EnableHelp(wid)
@Mtf.DisableHelp(wid)
@Mtf.ShowHelp(wid{, text})
@Mtf.HideHelp(wid{, text})
@Mtf.WaitForWidget(wid)
@Mtf.Iconify(wid)
@Mtf.ToTop(wid)
@Mtf.ToBottom(wid)
@Mtf.PopupMenu(wid)
@Mtf.SetCursor(wid{, cursor})
@Mtf.Interrupt(wid)
@Mtf.NextEvent(wid)
@parent=Mtf.ParentWidget(wid)
@shell=Mtf.ShellWidget(wid)
@class=Mtf.WidgetClass(wid)
@name=Mtf.WidgetName(wid)
@path=Mtf.WidgetPath(wid)
MTF.Id() widget id
@id=Mtf.Id(wid{, name})
@quark=Mtf.Quark(wid{, string})
@test=Mtf.Is(wid{, prop})
MTF.ResourceId() id of a resource
@name=Mtf.ResourceId(wid, rnr)
@w=Mtf.WidthOfScreen(wid{, unit})
@h=Mtf.HeightOfScreen(wid{, unit})
@list=Mtf.NamesOf(wid{, group})
@Mtf.CallCallbacks(wid, res)
@test=Mtf.HasCallbacks(wid, res)
@Mtf.AugmentTranslations(wid,translations)
@Mtf.OverrideTranslations(wid, translations)
@test=Mtf.IsTraversable(wid)
@Mtf.ProcessTraversal(wid{, direction})
@focus=Mtf.GetFocusWidget(wid)
@visibility=Mtf.GetVisibility(wid)
@Mtf.UpdateDisplay(wid)
@width=Mtf.StringExtent(wid, string)
@Mtf.TextClearSelection(wid)
@test=Mtf.TextCopy(wid)
@test=Mtf.TextCut(wid)
@Mtf.TextDisableRedisplay(wid)
@Mtf.TextEnableRedisplay(wid)
@pos=Mtf.TextFindString(wid, start, string, direction)
@pos=Mtf.TextGetBaseline(wid)
@pos=Mtf.TextGetCursorPosition(wid)
@editable=Mtf.TextGetEditable(wid)
@pos=Mtf.TextGetLastPosition(wid)
@len=Mtf.TextGetMaxLength(wid)
@str=Mtf.TextGetSelection(wid)
@bounds=Mtf.TextGetSelectionPosition(wid)
@source=Mtf.TextGetSource(wid)
@value=Mtf.TextGetString(wid)
@value=Mtf.TextGetSubstring(wid, start, count)
@top=Mtf.TextGetTopCharacter(wid)
@Mtf.TextInsert(wid, pos, value)
@test=Mtf.TextPaste(wid)
@bounds=Mtf.TextPosToXY(wid, pos)
@test=Mtf.TextRemove(wid)
@Mtf.TextReplace(wid, from, to, value)
@Mtf.TextScroll(wid, lines)
@Mtf.TextSetAddMode(wid, state)
@Mtf.TextSetCursorPosition(wid, pos)
@Mtf.TextSetEditable(wid, editable)
@Mtf.TextSetHighlight(wid, left, right, mode)
@Mtf.TextSetMaxLength(wid, len)
@Mtf.TextSetSelection(wid, first, last)
@Mtf.TextSetSource(wid, source, top, pos)
@Mtf.TextSetString(wid, value)
@Mtf.TextSetTopCharacter(wid, top)
@Mtf.TextShowPosition(wid, pos)
@pos=Mtf.TextXYToPos(wid, x, y)
@depth=Mtf.TextEnableUndo(wid{, depth})
@Mtf.TextEnableSlaveUndo(wid, master, onoff)
@stack=Mtf.TextUndoStack(wid)
@stack=Mtf.TextRedoStack(wid)
@Mtf.TextUndo(wid)
@Mtf.TextRedo(wid)
@value=Mtf.ScrollBarGetValue(wid)
@Mtf.ScrollBarSetValue(wid, value{, slidersize{, increment{,
pageincrement}}}, notify)
@state=Mtf.ToggleButtonGetState(wid)
@Mtf.ToggleButtonSetState(wid, state, notify)
@Mtf.UndoError(wid)
@Mtf.CancelInput(wid)
@Mtf.VerifyInput(wid)
@Mtf.ForceError(wid{, string})
@string=Mtf.InputFieldGetString(wid)
@Mtf.InputFieldSetString(wid, string{, notify})
@Mtf.InputFieldVerifyString(wid, string{, check})
@sel=Mtf.KnvasGetSelection(wid{, ind})
@tag=Mtf.KnvasGetDefaultTag(wid)
@Mtf.KnvasSetDefaultTag(wid, tag)
@itr=Mtf.KnvasGetDefaultInteractor(wid)
@Mtf.KnvasSetDefaultInteractor(wid, itr)
@Mtf.KnvasShareLayer(wid, layer)
@Mtf.KnvasUpdateDisplay(wid)
@Mtf.KnvasUpdateLayers(wid)
@Mtf.KnvasZoom(wid, scalex, scaley)
@kno=Mtf.KnCreateLayer(wid{, name})
@kno=Mtf.KnCreateGroup(wid, parent, name, x0, y0)
@kno=Mtf.KnCreateAnchor(wid, parent, name, x0, y0, mobile)
@kno=Mtf.KnCreateArc(wid, parent, name, x0, y0, w, h, start, angle)
@kno=Mtf.KnCreateFArc(wid, parent, name, x0, y0, w, h, start, angle)
@kno=Mtf.KnCreateCircle(wid, parent, name, x0, y0, w, h)
@kno=Mtf.KnCreateFCircle(wid, parent, name, x0, y0, w, h)
@kno=Mtf.KnCreateIcon(wid, parent, name, x0, y0, pixmap)
@kno=Mtf.KnCreateLabel(wid, parent, name, x0, y0, text)
@kno=Mtf.KnCreateLine(wid, parent, name, x0, y0, x1, y1)
@kno=Mtf.KnCreateLink(wid, parent, name, start, end)
@kno=Mtf.KnCreatePolygon(wid, parent, name, xi, yi)
@kno=Mtf.KnCreatePolyline(wid, parent, name, xi, yi)
@kno=Mtf.KnCreateRect(wid, parent, name, x0, y0, w, h)
@kno=Mtf.KnCreateFRect(wid, parent, name, x0, y0, w, h)
@kno=Mtf.KnCreateBRect(wid, parent, name, x0, y0, w, h)
@kno=Mtf.KnCreateImage(wid, parent, name, x0, y0, w, h)
@kno=Mtf.KnCreateWImage(wid, parent, name)
@tag=Mtf.KnGetTag(wid, kno)
@itr=Mtf.KnGetInteractor(wid, kno)
@Mtf.KnSetTag(wid, kno, tag)
@Mtf.KnSetChildTag(wid, kno, tag)
@Mtf.KnSetInteractor(wid, kno, itr)
@Mtf.KnSetChildInteractor(wid, kno, itr)
@Mtf.KnSetSensitive(wid, kno, flag)
@Mtf.KnSetActive(wid, kno, flag)
@pos=Mtf.KnGetPosition(wid, kno)
@box=Mtf.KnGetBox(wid, kno, opt)
@Mtf.KnRemove(wid, kno)
@Mtf.KnRemoveChildren(wid, kno)
@Mtf.KnReparent(wid, kno, parent)
@Mtf.KnPop(wid, kno)
@Mtf.KnMove(wid, kno, x0, y0)
@Mtf.KnResize(wid, kno, scalex, scaley)
@Mtf.KnRotate(wid, kno, angle)
@Mtf.KnTranslate(wid, kno, dx ,dy)
@Mtf.KnOpen(wid, kno)
@Mtf.KnClose(wid, kno)
@Mtf.KnShow(wid, kno)
@Mtf.KnHide(wid, kno)
@Mtf.KnSelect(wid, kno, visible)
@Mtf.KnUnselect(wid, kno)
@Mtf.KnUnselectAll(wid)
@kno=Mtf.KnId(wid, name)
@name=Mtf.KnName(wid, kno)
@class=Mtf.KnClass(wid, kno)
@test=Mtf.KnIs(wid, kno, property)
@Mtf.ClipboardCopy(wid, str)
@str=Mtf.ClipboardRetrieve(wid)
@Mtf.ClipboardUndoCopy(wid)
User Profile
When NAPA is started, the user has the option of specifying a User Profile. This document describes what the User Profile is and it explains more
about the graphical user interface (GUI) in NAPA. The intention is to provide enough information for the average user, as opposed to the NAPA
system administrator, to exploit the capabilities of the tools for customizing the GUI.
Please note that the construction of a user interface using the Widget Editor or user interface commands (i.e. those that begin with two
exclamation marks) is outside of the scope of this chapter. The focus herein is on the User Profile only. However, some discussion about widgets
and resources is necessary in order to understand what the User Profile really is.
Deprecated feature
Please note that customizing the GUI with resource files will only work for Motif GUI which Napa is working to replace. It means that if
you now do any customization, it will stop working within a few releases time. Therefore we do not recommend to spend very much time
customizing Napa with the techniques described below.
Table of Contents:
A widget is any identifiable part of the windows which form the GUI. For example, the buttons in a menu bar are widgets, the menu bar itself is a
widget, the entire window which uses the menu bar is a widget, the text fields in the NAPA logon screen are widgets, etc.
Every widget in the GUI has characteristics or associated settings called resources. Resources control such things as the appearance of the
widget, the position of the widget, what happens when the widget is "activated" (e.g. what happens when a button is pushed) or anything about
the widget. The list of possible resources for a widget is extensive and depends on the type of the widget. For example, a push button will have
different resources than a graphic drawing area, although some resources will be used by both types of widgets.
The specification of resources in a User Profile requires the name of the widget, the name of the resource and a value for the resource.
A window in a software application is a composite widget, i.e. it is composed of many smaller widgets, which have been grouped together in some
particular way to form the window you see on the screen. This is not just the case for so called "main windows" like the NAPA main Task Window,
the Geometry Window, or the Loading Conditions window, but also for dialogs (e.g. the Document Formatter in the Test Editor Window).
The grouping of widgets can also be implemented in several stages, so that a more complicated widget formed of many smaller widgets is used to
make many different larger widgets or windows and dialogs. A prime example of this is the table widgets used in NAPA. This widget, which is
composed of many smaller widgets (e.g. text fields and other components), is used as a part in other windows, like the Table Editor tool, the Ship
Model window, and the Subdivision Definitions window.
The basic principle, however, is that windows in a software application are composed of many smaller widgets. The formation of these windows
depends on the relations of the smaller widgets to the whole as well as to each other, for example, is the widget a part of a larger widget, is it on
the "same level" as another widget, as is the case for a series of push buttons in a toolbar, etc. Composite widgets are formed based on a
hierarchical structure which specifies the relations of the component widgets to each other. When a widget is part of a composite widget, we say
the widget is a child of the widget. The composite widget (e.g. a window or dialog) is referred to as the parent of the smaller widget. For example,
the items in a menu are children of the menu widget, which is itself a child of the menu bar, which is a child of some work area widget, which is a
child of the larger composite widget, i.e. the entire window. There are often invisible widgets as well which do not show up on the screen, but they
are used to specify the inter-relationships of the widgets in the window.
The reason for this rather technical sideline discussion has to do with widget names. Every single widget has a name. The names of the
widgets in NAPA cannot be controlled by the user. They are set whenever the widget is created, for example, when you open the Steel Window,
every button has a name. The name of a widget is formed by a string, preceded by the names of ALL the other widgets which are parents
of the widget.
For example, the actual complete name of the Draw button in the first Geometry window we open is:
napa.Main.GR_GeomWindow_#1.GR_PltWn.WA.Toolbar.GR_DrawTools.Draw
Note that the name components are separated by periods '.' This is called a hard binding and it refers to one direct "step" in the widget hierarchy,
for example, the widget after the period is on the next lower level. This complete specification can be rather tedious to use, so wildcard characters
(asterisks *) can be used to substitute any parts of the name which are unnecessary or which we can generalized:
napa*ToolBar*Draw
In this case, we will now be referring to ALL widgets which have the components napa, Toolbar and Draw in their names, in this order. This
wildcard * replaces all the other name components. In the case given above, the name napa*ToolBar*Draw will also refer to, among others:
The hard bindings (specified with a period in the name) are used to avoid this effect.
As mentioned above, every widget has resources, or characteristics which determine its appearance or behavior. Examples of resources could
be:
In broader terms, the resources of a widget could also refer to data stored with a widget and the macros, i.e. call backs, associated with events or
actions involving the widget.
A User Profile is a text in NAPA which contains resource settings for the widgets in NAPA. User profiles do not involve any call backs, but rather
they control simpler things about the widgets, like color, size, appearance, whether or not they are visible, etc. In the section Useful resources the
types of resources which the user can control via a User Profile are indicated. The possible values for a resource are also indicated in the section
below.
Save the User Profile in the System database by specifying the 'Objects of Type' to be Resource Specs
and then name it your default username
As seen in the example, the specification of a resource setting is done using the name of the widget, followed by a period or an asterisk, the name
of the resource, a colon and then the value of the resource.
The user profile can be saved in the SYSDB with whatever name the user desires. When you want the resource specifications stored in the
particular user profile to be used in NAPA, you type the name of the profile (without the RES* prefix) into the User Profile field in the login screen.
To automatically load your default user profile, save it with your username in the System database. NAPA by default looks for the user profile
saved with the login name given if no other user profile is specified.
In addition to specifying individual resource settings in the user profile, other resource files can be referred to by using the !ADD command. This
can be seen in the example above where the resource file SMALLLAYOUT in the NAPADB is added at the end of the user profile.
Comments can be included in a resource specification file by using an exclamation mark (!) in the first column of a line, followed by a space.
Note that the spacing included between the end of the resource name and the setting is for stylistic purposes only. Also note that a more specific
resource specification always has precedent over a less specific one. For instance, in the example above, while the background in NAPA for ALL
windows has been set to Beige, the more specific setting of the Loading Conditions window's background to Light Blue takes precedence. The
same is true for the showing of the command area. In all windows in NAPA, the command area will be visible when the window is opened, except
for the Loading Conditions window where it will be closed (as the setting is "false").
When starting NAPA, the resources are controlled by the resource specification file RES*SYSTEM in the NAPADB. This controls the layouts,
fonts, colors, key bindings, etc. It is not recommended to copy this resource specification into the SYSDB as such if you wish to modify it.
Write a new one with only the changed resources and an !ADD statement referring to the one in the NAPADB. This way also new releases
of NAPA will have a chance to work.
3. Useful resources
It has become evident that the most difficult thing in making your own User Profile is determining the names of widgets and useful resources to
set. In this section some useful resource settings are discussed.
Resource specifications and user profiles have some use, mostly as visual aids and to modify settings in particular windows in order to eliminate
routine settings whenever a window is opened. Some possible uses for user profile settings are:
setting of different background colours for different runs of NAPA on the same computer. This helps to identify which run or project you
are using if you have a lot of windows open on your screen
using different backgrounds for different windows in the same run of NAPA, as a visual aid
using larger layouts and fonts for presentations
using smaller layouts for more complicated windows in NAPA, for example, Ship Model window, NAPA Steel window
automatic opening of the command area in a window when it is open
automatic setting of totals for tables opened in various windows
Colours used in resource specifications can be viewed using the standard Select Colour dialog. It can be seen, for example, by opening the
Geometry Window, choosing Background from the View menu. Then select
and the Select Colour dialog will appear. The names of the colours that can be used in resource specifications can be seen by selecting a colour.
napa*background Background colour of all windows in NAPA See colours above Grey
napa*Main.title Title in title bar of the Main Window Any string NAPA
napa*XmText.background Background colour for ALL text fields See colours above White
napa*MainW*CA.maxLength Command Log Size (characters) of the text area of the Main Window Up to 2 147 483 650 64000
(2**31-1)
napa*MainW*CA.rows Number of text rows in the command area in the Main Window Depends on monitor size 24
napa*MainW*CA.columns Number of columns in the command area in the Main Window Depends on monitor size 72
napa*MainW*DA.height Height of the drawing area in the Main Window (pixels) Depends on monitor size 1
napa*MainW*MB*DrawBox.set Activate drawing toolbox in the Main Window (requires drawing area to 0,1 0
be opened)
napa*GR_Zoom3DDlg*SzCurrentObj.set Specification of 3D size and zoom settings in all drawing windows 0,1
napa*GR_Zoom3DDlg*NoChange.set Specification of 3D size and zoom settings in all drawing windows 0,1
Note: widget and resource names are case sensitive. Values for resources are not.
Colors, margin settings and fonts are not listed in detail here, as the appropriate names and possible settings can be seen from the files listed in
the next sub-section below.
The settings for other windows for some of the resources above (when they occur) can be specified separately using the following widget names
(not the Widget Collection name) immediately after the component "napa*" or in place of the component "MainW", depending on what is given
above.
Note: the Widget Collection name is usable as the SOURCE TOOL in the Manager. See the chapterManager in the NAPA Monitor
Manual.
There are several resource specification files stored in the NAPADB which are intended to be used in user profiles. These are:
FUNCTIONKEYS Define function keys' bindings (F1 - F12). See the section below.
TINYLAYOUT Specifies layouts. This is a combination of the corresponding RES*TINYFONTS, RES*TINYFONTS2 and
RES*TINYMARGINS resource specifications
MEDIUMLAYOUT The same for MEDIUMFONTS, MEDIUMFONTS2 and MEDIUMMARGINS. This is the default NAPA layout.
Note: a lot of the resources used in various windows in NAPA are stored in resource specification files in the NAPADB. IT IS VERY
STRONGLY DISCOURAGED TO MODIFY ANY FILES OTHER THAN THOSE LISTED IMMEDIATELY ABOVE! The reason is that
there are a lot of widgets used in NAPA and there are a lot of resource settings. More importantly, a lot of these resource settings are
inherited. Without a full knowledge of what resource settings take effect in what windows, there is no way you can tell what will
happen when you modify a resource setting in the NAPA database. Modification of resource settings in the resource specification
files in the NAPADB can have undesirable consequences and some NAPA GUI elements may cease to function until the files have
been restored to their original state. However, some of these resource files are useful for reference purposes in creating your own user
profiles. Those dealing with fonts (RES*sizeFONTS) are particularly helpful when you wish to modify font settings in your own user
profile file.
It is recommended that you modify only those resources given in the list of useful resources above and the resource files mentioned in this
chapter. It is anticipated that this list will be expanded in the future as more examples of useful resource settings become apparent and the GUI is
expanded.
Default values for colours are set in the resource specification file RES*COLOURS in the NAPADB. If you wish to modify the colours, use your
own resource file rather than modify this one. Fonts are controlled by the resource files RES*sizeFONTS and RES*sizeFONTS2 listed in the table
above and follow standard syntaxes for font control in Motif.
The key bindings of the function keys can be set up in NAPA using resource specification files. Default key bindings are set in the resource
specification RES*SYSTEM.
The function keys are F1, F2 ,... F12 offering 12 functions with a single key press. By combining these with the Shift, Control and Alt keys,
additional key combinations can be defined offering together more than 100 possible combinations. By default keys F1 and F10 have pre-defined
functions. F1 opens the Help Viewer and F10 activates the first item in the menubar of a window.
Shift <Shift>
Control <Ctrl>
Alt <Mod1>
Alt Gr <Mod3>
The format of key bindings is as in the following example; here the F7 key will print the key combinations to the NAPA Main Window Command
area:
Key combinations must be defined in the order where the simplest is the last.
The actual function is realised by Motif functions (please refer to Motif manuals for valid functions). Note that the "insert-string" function
above is used to add NAPA commands to the command prompt and the "\n" insertion works as a hard return.
These key bindings are available only in the command area of the NAPA Main Window, but definitions can also be effective for one
widget class in all widgets, as in the RES*SYSTEM definition in the NAPADB.
4. Example
The two resource files below illustrate some of the things that happen when using resource settings and user profiles. These user profiles are
available in the NAPADB.
Note: the example illustrates the following point: resources which have been set beforehand are maintained unless they are changed.
In this case, for example, the background colour and the size of the command area in the EXAMPLE2 login have been maintained from
the setting in the EXAMPLE user profile.
Calculator
Table of Contents:
1. Introduction
2. Run time information
3. Purpose
4. Basic concepts
5. Variables and arrays
6. Logical expressions
7. Handling of functions
8. Subsystem service functions
9. Summary of functions
9.1. Mathematical functions
9.2. Logical functions
9.3. Date functions
9.4. String handling
9.5. Data management
9.6. Volume oriented functions
9.7. Functions for curves and surfaces
9.8. Functions related to the arrangement
9.9. Various functions
9.10. Support functions for the calculator
9.11. Functions operating on arrays
9.12. Functions available under table calculation
9.13. For container loading
10. Parameterless functions and constants
11. Multiply defined symbols
12. Detailed presentation of functions
12.1. Mathematical functions
12.2. Logical functions
12.3. Date functions
12.4. String handling
12.5. Various functions
12.6. Data management
12.7. Functions related to objects with a volume
12.8. Functions for surfaces and surface objects
12.9. Functions related to arrangements
12.10. Intersecting an object
12.11. Functions operating on curves
12.12. Functions operating on arrays
13. Handling of upper case and lower case
14. Current source description
1. Introduction
It has become more and more important to be able to do things not programmed in the compiled system code. Conventional programming is too
inefficient for covering the wide range of local needs encountered, the cycle from identifying a new need to implementing is too long and end
users have no possibilities to do their own things this way.
The graphical user interface has created a new area where flexible programming of system functions is needed.
Implementing new functions without touching the FORTRAN or C code is possible by the following two main services:
the calculator, which provides not only various calculations in the conventional sense, but also the possibility to make decisions, access
data in the system and start system functions
the so-called NAPA BASIC, providing a control structure by which the pieces can be combined into larger functions
A concept closely related to these is the event, which is a way of starting macros, as presented in the chapter Handling input.
This chapter presents the calculator. The calculator is a tool for doing calculations according to user-defined expressions and formulas. The
possibilities range from ordinary mathematical calculations to calculations involving geometric and other objects as illustrated by the following
examples (the length, the area of a section, the volume from a gauge reading):
!CALC
L=SQRT(DX*DX+DY*DY+DZ*DZ)
!CALC A=AREA(SECT('HULL',1,XREF))
!CALC V=CP.GVOL('R123','MS',2.25)
The calculator can be used as such in command !CALC, in order to evaluate expressions and assign variables, it provides the basic mechanism
for expressing calculation logic in the table calculation module, it can generate derived data in list output and above all, it provides the power to
add intelligence and flexibility to macros.
An important part of the functions is formed by the so-called subsystem service functions. These functions are treated as part of the user interface
to the subsystem concerned and provide ways of accessing data in macros and new ways of starting functions. Compared with the command
interface, the service functions provide a two-way communication with macros and they are not restricted to be used in a specific command
environment (subtask). The value returned by many service functions is an empty string: the main result is formed by actions started or data
returned some other way.
A macro where the possibilities offered by the calculator are used is often referred to as a NAPA BASIC program, because of many similarities
with real BASIC. In addition to ordinary NAPA commands, such a macro can contain components replaced by variables or expressions, and
program statements for handling decisions and jumps. A macro containing nothing but NAPA BASIC commands can be run in the so-called
immediate mode.
For sophisticated use of the calculator, involving direct access to data items in the database, read the section Short introduction to data
management in the System document.
Most of the information presented here is not needed in the daily work, only when preparing macros and other tools. However, even for direct use
in the routine work there are many useful functions available.
Examples:
3. Purpose
The calculator is a tool by which a variety of tasks involving fetching and combining of data can be done with user commands.
The basic function of the calculator is to evaluate an expression containing arithmetic and logical operations on operands that can be constants,
variables or function values. In addition to the usual mathematical functions (SQRT,SIN, etc), the functions of the calculator cover a wide range of
other operations, including pure NAPA operations such as finding coordinates on curves, parameters of a compartment or fetching data from the
database.
The basic function of a calculator function is to return a value. However, in an increasing number of functions, mainly among the service functions,
the main result is not the function value, which is often empty, but the actions started.
4. Basic concepts
The basic capability of the calculator is to evaluate an expression. Shortly defined, an expression has the form of a normal arithmetic expression,
in which some operands may be function calls. More precisely, an expression is formed by the following components:
variables
A variable is represented by a name, and stands for a numeric value or a string value.
arrays
Arrays are collections of elements of the same type (numbers or strings). An array-element is designated by the array name and an index
within parentheses, e.g. X(3), HEIGHT(I)
built-in constants, e.g. PI
A built-in constant resembles otherwise a variable, but its value is provided directly by the calculator.
quantity
The symbol of a quantity, as defined in the quantity standard, designates the value of the given quantity. This is possible only in contexts
where there is source of such values defined (table output module, SH based subsystems).
Note: in case of name conflicts, a symbol is interpreted as a variable in the first place.
Examples of expressions:
2+5
(10-8)*5
SQRT(2)
SIN(FI*RO)
ATAN((10-8)/(7-2))
VOL(HULL)/(LREF*ZDWL*BREF)
In the same way as in NAPA commands, the calculator makes a distinction between numbers and strings. The type of a constant, variable or
expression must be correct in the context where used. The functions FMT and VALUE can be used for converting between the types. In the same
way as many parameters of commands, there are function parameters that can be either a number or a string, but with different meaning.
Note also carefully the difference between a string constant (entered within apostrophes) and a variable name.
A variable obtains its value in an assignment, for example, @A=1 or by using the !CALC command. Variables do not need to be created
separately - this is done when the first assignment is encountered. Note, however, that if a variable is used as an output parameter in a function
call (e.g. BEND), it must exist at the call. The type of the variable is numeric or character depending on the type of value last assigned.
An array differs from a variable in that it may stand for many values (of the same type). The individual values in the array are designated by the
index which is 1 for the first element. The index is written in parentheses after the array name, and its value may be represented by any numeric
expression.
An array can either be fetched with function REC or created by using the ARR function. The first parameter of the ARR function tells whether the
array shall contain integer values (1), decimal values (2) or character values (3). An optional number (>1000) may be added, giving the array an
internal name. This has the effect that a possible repeated call of the ARR function with the same number returns the same array, instead of
creating a new one.
An array is identical with a record in the sense of the data management system of NAPA. Any record can therefore be used as an array by storing
the reference-number (as given by function REC) in a variable, and using that variable as the name of the array. Many of the service functions
return an array as the function value.
Examples:
NAME=ARR(3,1111) an array named NAME is created for character values and with the internal identifier=1111
D=DB('HULLF')
NAME=REC(D,1510) array NAME is defined to be record 1510 (list of curves) of description 'HULLF'
Each call of the ARR function without an identifier creates a new array in the run time memory and it is possible that a significant amount of
garbage is collected. This can be avoided by using the identifier or by having a local variable receive the result (see commands @LOCAL, @GLOBA
L of NAPA BASIC).
An array can be listed with command !VAR LIST name. There are formatting options by which the layout can be controlled.
The value of an array element is obtained by the adding an index in parentheses after the array name, for example:
A(2), X(I)
If the array contains reals, a non-integer index can be given, giving an interpolated value. For example, if A(1)=4, A(2)=5, then A(1.25)=4.25.
A calculator symbol may also refer to a description, i.e. a packet of data as handled by the data management. Variables referring to arrays or
descriptions are so-called reference numbers and marked as being of a different type with respect to ordinary numbers, and this type is checked
when interpreting array references. If for some reason the array property is lost, the calculator can be restored by using the ARR function, for
example
@A=ARR(A)
One case when this is needed is when a list of arrays has been created, for example
@ARRLIST=ARR(1)
@ARRLIST(1)=... some array
...
@A1=ARR(ARRLIST(1))
Reference numbers are not meaningful in arithmetic expressions or logical expressions except when testing for existence (>0):
@C=DB.READ('STEM')
@IF C=0 !TYPE STEM not found
6. Logical expressions
In order to control decisions, the calculator also handles logical expressions. The basic functions are provided by the comparison operators:
More complicated decisions are handled by the logical functions AND, OR and NOT.
The result of the logical operations is the numbers 0=false or 1=true. This result is in all respects treated like any other numbers, and it can be
used in arithmetic operations. Conversely, any number can be used as a logical value, where >0 means true and <=0 means false.
Variables representing reference numbers (arrays, descriptions) behave like numbers in comparisons, but the only meaningful tests are 'equal' or
'not equal'. The only meaningful numeric constant is 0 which means that the component in question is missing.
Examples. It is supposed that the values of the variables are A=3, B=4 and S='HULLF'
7. Handling of functions
Functions are used for expressing all operations that are not covered by the operators. A function always returns a value, but this need not
necessarily be the essential result (as in functions BEND, SECT).
The result of a function is normally provided by the function-value, but it is also possible to use output parameters.
The calculator is capable of handling functions with an arbitrary number of parameters, or functions that may be called with different number of
parameters in different contexts. It is further possible that a parameter can be either a number or a string, with different interpretations (see
parameter 'curve' of function AREA, for example).
The parameters themselves may be formed by any expression handled by the calculator.
Note: an expression of the form x(y) may stand for a function, an array reference or the value of a quantity in the current source
description (see below), and these possibilities are tested in this order. A common source of confusion is name ambiguities between
these categories. Command !VAR CHECK tells whether there are multiply defined symbols. !VAR CHECK ON sets a check mode when
all possible ambiguities are tested every time a symbol is referenced.
!COM C.F
!EXPL C.id
The explanations obtained under !EXPL !CALC are not maintained since 97.1.
The names of the subsystem service functions have the following form:
ss.funct(parameters)
where ss is the subsystem name, e.g. GM, SM, MN, 'funct' is the name of the function in question. This part is always followed by a pair of
parentheses even if the parameter list is empty. The only way to create a synonym is to name an array according to the form above. Then a
reference to an array element looks like a subsystem service function. A warning is given when the array is created but otherwise this possibility is
ignored in checks related to multiply defined symbols.
The availability of service functions varies between subsystems, partly depending on the order in which the graphical user interface has been
developed.
!COM ss.F
!EXPL ss.id
for example
!EXPL GR.COLOUR
Within some subsystems, it has been found practical to separate certain functions as own groups, for example, the functions of the Hull Editor and
those of the panel task in GM. The following is a summary of the groups:
AD various functions (lq, pq, quantities, arguments, dates, reference system, selection ao)
LD functions related to loading conditions (defining, getting information, plotting, ObN related)
MN various functions of the Monitor (project adm., run control, printing, licenses)
SP SECPRO functions
The service functions are newer additions and there is some overlap between them and some of the standard calculator functions, and many
standard calculator functions should logically belong to a subsystem such as GM.
9. Summary of functions
This section contains a summary of the standard functions implemented. The next section gives a more detailed presentation. For service
functions, see the online explanations or the manual.
SQRT(a)
EXAMPLE
SQRT(2) -> 1.4142
EXP exponentiation
EXP(a)
EXAMPLES
EXP(1) -> 2.71828
EXP(LN(5)) -> 5
EXP(base,a)
LN natural logarithm
LN(a)
EXAMPLE
LN(2.71828) -> 1
EXAMPLES
LOG(2) -> 0.30103
LOG(EXP(10,1.5)) ->1.5
LOG(a)
SIN(a)
a=angle in radians
EXAMPLES
SIN(0.1) -> 0.099833
SIN(45*RO) -> 0.70711
COS(a)
a=angle in radians
EXAMPLES
COS(0.1) -> 0.995
COS(45*RO) -> 0.70711
TAN(a)
a=angle in radians
EXAMPLES
TAN(0.1) -> 0.1003
ATAN(a)
ATAN(a,b)
EXAMPLES
ATAN(1) -> 0.7854
ATAN/1)/RO -> 45
ATAN(-1,1) -> -0.7854
ATAN(1,0)/RO -> 90
ACOS(c)
ASIN(s)
MIN(a,b,c,...)
MIN(arr)
MIN(arr,'D')
EXAMPLE
@MIN(21.4,17.5,12.1) -> 12.1
@N=PARSE('21.4 17.5 12.1',A)
@MIN(A) -> 12.1
MAX(a,b,c,...)
MAX(arr)
MAX(arr,'D')
EXAMPLE
@MAX(11.4,17.5,12.1) -> 17.1
@N=PARSE('11.4 17.5 12.1',A)
@MAX(A) -> 17.1
ABS(a)
EXAMPLE
ABS(-1.5) -> 1.5
INT(a)
EXAMPLES
INT(10) -> 10
INT(10.78) -> 10
INT(-2.45) -> -2
ROUND(value,fact)
EXAMPLES
ROUND(12.2) ->12
ROUND(12.6) ->13
ROUND(12.654,0.1) ->12.7
ROUND(-12.654,0.5) ->-12.5
ROUND(12345,10) ->12350
The function returns the division remainder: MOD(a,b)=c means that a=n*b+c where n is an
integer, c<b
MOD(a,b)
a: number divided
b: divisor
EXAMPLES
MOD(17,2)=1 MOD(18,2)=0
MOD(133,10)=3
MOD(133,20)=13
RND(range)
RND(range,key)
Random value from the range 0...range, fixed for given value of a given key.
EXAMPLE
RND(100) -> 78
RND(100) -> 14
RND(100) -> 45
...
RND(100,'R601') -> 58
RND(100,'R601') -> 58
RND(100,'R40') -> 93
The function value is 1 if the argument is not true, 0 if the value is true.
NOT(l)
EXAMPLES
A=77, L=0
NOT(L) -> 1
NOT(A>100) -> 1
NOT(A=77) -> 0
OR logical OR
OR(l1,l2,...)
EXAMPLE
A=77, B=50
OR(A>100,B>100) -> 0
OR(A>100,B>100,A>B) -> 1
AND(l1,l2,...)
EXAMPLES
A=77, B=50
AND(A>10,B>10) -> 1
AND(A>100,B>10) -> 0
L1=1, L2=0, L3=1
AND(L1,L2,L3) -> 0
This function differs from the equality operator (=) in that the equality test is done with a
tolerance specified in the call. The function value is 1=equal or 0=not equal.
EQUAL(a,b,tol)
tol: tolerance
EXAMPLES
EQUAL(12.12,12.13,0.001) ->0
EQUAL(12.12,12.13,0.02) ->1
The function value is the given date as integer YYMMDD. Note: Dates from year 2000 have
extra 1 preceding the integer value.
DATE(idate)
EXAMPLES
DATE(IDATE)
DATE(1513375200)
TIME(idate)
EXAMPLE
TIME((IDATE+3600))
The functions returns the current date (no parameters) or the given date converted to the
internal form.
IDATE(date)
IDATE(date,time)
Internal date from date in the form YYMMDD and time in the form HHMMSS.
IDATE(0,0)
Special case: returns the 00:00 the day the current run was started. Intended for providing a
reference date by which dates can be reduced to more convenient numbers.
EXAMPLES
(IDATE(961224)-IDATE)/SPD
Time in days from current time to 24.12 1996. SPD=seconds per day, built in constant.
@T1=IDATE-IDATE(960101)
...
@T2=IDATE-IDATE(960101)
@T2-T1 -> seconds between measurements
(reduction of IDATE(960101) needed for numeric accuracy).
The function otherwise similar with DATE, but the result is the date the printing format (string).
The result obeys the installation standard unless specified differently. See command DATE in
task INST.
FDATE(idate)
FDATE(idate,repr)
repr: representation
2: yyyy-mm-dd
4: dd.mm yyyy
5: mm/dd/yy
The function otherwise similar with TIME, but the result is a string formatted for output.
FTIME(idate)
FTIME(idate,repr)
repr: representation
2: hh.mm
3: hh.mm
4: hh:mm
FMT(value,dec,field)
dec: (opt) number of decimals, effect depending on 'field'. Special case: GIN: as valid for graphic
input. With dec<0, apply fixed number even if 'field is not given.
field: (opt) field length. Without this parameter, 'dynamic format' is applied, i.e field length and
decimals as needed and the parameter 'dec' only gives the upper limit. With this parameter,
both field length and number of decimals are fixed.
EXAMPLES
FMT(12.314) -> '12.314'
FMT(12.314,2) -> '12.31'
FMT(12.314,2,8) -> ' 12.31'
FMT(value,dec,field,',')
FMT(value,unit)
FMT(value,unit,quantity)
Do the formatting according to the given quantity. The form FMT(value,quantity) works also but
is not safe because the quantity may be mistaken for a unit.
unit: apply the given unit, disregard the quantity standard in this respect
-: apply the unit associated with the quantity but do not show its symbol (only form where the
unit is applied but not shown).
quantity: name of quantity registered in quantity standard. Preceded by + the symbol is added to the
result, e.g. +gauge.
EXAMPLES
FMT(12.5,'mm') -> '12500 mm'
FMT(0.793,'gauge') -> 79
FMT(0.793,'-','gauge') safer form of the preceding
FMT(0.793,'+','gauge') -> 79 cm
FMT(0.793,'+','+gauge') -> 'gauge = 79 cm'
FMT(idate,'MM.DD') -> 26.1
FMT(100 'FRD') -> #166+0.4
FMT(value,'GIN')
Convert the value applying the precision for graphic input (see !GIN DEC or the service funtion
GR.GINDEC).
The function value is the string interpreted as a number. The string may contain additional
characters. See also VALUEOF.
VALUE(string)
EXAMPLES
VALUE('12.5') -> 12.5
VALUE('R601') -> 601
@S='12'
S+1 -> error 19033
VALUE(S)+1 -> 13
SBS substring
SBS(string,start,end)
start: start index of the substring, <0: counted from the end
end: end index of the substring, <0: counted from the end.
If end index equals 0 then the string will be right aligned. End index will be start index and start
index will be 1.
EXAMPLES
SBS('ABCDEF',2,3) -> 'BC'
SBS('/pr/p1234.db',1,-4) -> '/pr/p1234'
SBS('Length',10) -> 'Length '
SBS('Length',8,0) -> ' Length'
SBS('Length',5,0) -> 'Lengt'
LEN(string)
Return the number of bytes in the given string. If the string contains non-ASCII characters, the
length in terms of characters is smaller.
LEN(string,substring)
Return the index of the start of the given substring, 0=not found.
EXAMPLES
LEN('ABC') ->3
LEN('ABCDEFGHI','BC') -> 2
LEN('ABCDEFGHI','CC') -> 0
CNC(s1,s2,...)
EXAMPLE
CNC('AA','B','CCC') -> 'AABCCC'
CNC('FRAME',FMT(2)) -> 'FRAME2'
The function converts decimal Unicode codes to characters, for example, for obtaining
nonprinting characters. In addition to this function can be used for converting characters to
corresponding UTF-8 codes (an integer) adn vice versa. Note that for ASCII characters UTF-8
code is the same as the ASCII code.
Avoid using this function in document generation (documentation macros); in most cases it is
obsolete as documentation macros may contain Unicode characters directly. Please refer to
chapter Symbols, Signs and Special Characters in Napa for Design Manual.
char=CHAR(code)
code: Unicode (decimal representation of Unicode as a string '&#nnn'), ASCII code (integer, 0-127) or
Napa representation of UTF-8 encoding (integer)
code=CHAR(char)
Returns the UTF-8 code of a character as an integer. The value is formed by concatenating the
bytes representing the character in UTF-8 encoding. As mentioned above, for ASCII characters
this value is the same as the ASCII code.
char: (the first character of a) string or decimal representation of Unicode code as a string, '&#nnn;'.
EXAMPLES
@euro=char('€') @@ get Euro character from Unicode
@esc=char(27) @@ get the escape character (from ASCII or UTF-8 code)
@codeofa=char('A') @@ get UTF-8 (ASCII) code (=65) of character A
s=LCASE(string,c)
c: (opt) 0=to lower case (default), 1=to lower case except first character, 2=to upper case
Example:
@lcase('NAME') -> name
@lcase('NAME',1) -> Name
@lcase('name',2) -> NAME
A given string is split into parts separated by spaces and the result is stored as separate
elements in an array IN ADDITION to the preceding contents. The function value is the number
of array elements added.
array: receiving array. If the array is a numeric array, only numeric elements are returns, else all
elements.
A: obey apostrophes so that commas and spaces inside are not treated as delimiters (the
apostrophes are kept).
EXAMPLES
@S=ARR(3)
@N=PARSE('10 M: 10.2 23.5 (estimated)',S)
@A=ARR(2)
@N=PARSE('10 M: 10.2 23.5 (estimated)',A)
@N=PARSE('THR, C1,C2,C3',S,'C')
@P=ARR(2)
@N=PARSE('T*200*8*100*15',P,'D*')
This function removes blank (space) characters from the beginning or/and end of the given
string.
TRIM(string, options)
EXAMPLES
@S=' ABCABC '
@S=TRIM(S)
--> S='ABCABC'
This function replaces occurences of the string1 with string2 within the given string.
EXAMPLES
@S='ABC ABC'
@S=REPLACE(S 'A' 'XXX')
This function reads a description from the data base or performs other operations with
descriptions. This function allows access to data which are intended for internal use only, and
use of this function can have unintended effects. Napa Oy reserves the right to change the
specification of descriptions.
DB(name,unit,version)
Read the given description from the data base. The function value is the so-called reference
number, using in the REC and other functions. NOTE: if there is a description with this name in
the free storage, it is used.
version: (opt) version, default current version except for unit=2 and unit=7 (empty).
DB(name,0)
Get a description from the free storage, and if not existing, create one.
DB(refnr,'WRITE')
refnr: reference number as returned by the DB function. This may place because of some system
action or exit from the task.
DB(-refnr)
A record is a list of numbers or strings that can be used as a calculator array. NOTE: the array
continues to be part of the description, and any changes will affect the description. The function
value is the so-called reference number, used when referencing the record in other functions.
refnr=REC(descr,recnr,nr)
nr: (opt) selects record when there are several with the same number. Default=1.
n=REC(descr,recnr,0)
Special case: return the number of records with the given record number or if recnr=0, total
number of records.
EXAMPLE
@D=DB('FRF') get the description FRF
@ZR=REC(D,'Z') get record with z-values
!CAL ZR(1) print the first value
!VAR LIST ZR list all values
size=RSIZE(rec)
size=RSIZE(rec,n)
Returns the number of values in the given record and changes the size to the given number.
EXAMPLE:
@RSIZE(A,0) make the array A empty
The function returns the value at a given index in a record. In most cases, the same cane be
done as an array reference, provided that the reference number of the record is in a variable.
RVAL(rec,index)
The function locates a given string or number in a record. A fraction is returned if a numeric
value is found between two record values. See also DM.LOCATE.
LOCS(rec,value)
EXAMPLES:
S=('FRA','FRF','FR1','FR2')
LOCS(S,'FR1') -> 3
LOCS(S,'FR3') -> 0
R=(10,20,30,40)
LOCS(R,20) -> 2
LOCS(R,25) -> 2.5
The function creates an array as used in the calculator. It also converts the numeric value of an
array (or description) reference to an actual array reference.
ARR(type)
ARR(refnr)
This form converts an integer value to an array reference. The calculator treats references to
arrays as an own type to which an integer value is associated. A numeric value introduced by
nonstandard means (e.g. by typing) needs this conversion to be recognized as an array.
refnr: the numeric value of the array reference, may also be given as a string.
EXAMPLES
@S=ARR(3) create a string array S
The value of the variable is the so-called reference number of the array. The actual array is
created in the free storage. If the receiving variable is local to a subroutine, the memory used
by the array is released when the macro exits. It is also released if the variable is deleted.
VOL(name,t,trim,heel,x)
In all cases, trim and heel arguments to calculator functions are entered in the command form
(m, degrees).
EXAMPLES
@VOL('R601') -> total volume of R601
@VOL('R601',5,1) -> volume of R601 at draught 5m, trim 1m.
The function returns the moment of the volume of a room or surface around a given axis.
MOM(name,axis,t,trim,heel)
The function returns the center of gravity of the volume enclosed by a room or surface. See
function CGA for the center of a surface.
CG(name,axis,t,trim,heel,x)
EXAMPLES
@CG('R601',1) -> xcg of the whole volume of R601
@CG('R601',2,5,0,5) -> ycg of R601 under t=5, trim=0, heel=5 deg.
The function returns the upper limit of an object in a given coordinate direction (also for
curves).
UL(name,axis)
axis: axis for which the extension is given, 1=x, 2=y, 3=z.
EXAMPLE
UL('HULL',1) upper x limit of 'HULL'
UL('STEM',3) upper z limit of 'STEM'
The function returns the lower limit of an object in a given coordinate direction (also for curves).
LL(name,axis)
axis: axis for which the extension is given, 1=x, 2=y, 3=z.
The function returns the value of a given quantity for a object. NOTE that if the function is
called from a subtask, where deflection has been defined (LD, HYD, INC) the deflection is
taken into account in the calculation.
INQNT(name,quantity,t,trim,heel)
quantity: name of quantity as registered in the quantity standard, e.g. WLA, KMT. The available
quantities are:
AREA wall area, calculated (approximatively) from the calculation sections. See AREA for the
area calculated using the boundary surface.
EXAMPLE
@INQNT('HULL','KMT',5) -> KMT of HULL at t=5
area=BJDATA(name,x,t,trim,heel)
This form returns the cross section area at the given x and restricted to the given draught, trim
and heel.
x: x-coordinate
t: draught
BJDATA(name,x,t,trim,heel,arr)
This form returns the result in an array containing area, moment of area with respect to y=0,
moment of area with respect to z=0.
EXAMPLE
@res=arr(2)
@BJDATA('STABHULL',50,5,0,0,res)
!type area=@res(1) my=@res(2) mz=@res(3)
The function returns the trim factor of a given object, i.e. the (approximative) change of trim
caused by 1 m shift of the cg.
TRF(name,t,ta,tf)
t: draught
ta: (opt) variable (NOTE), to which the draught change at the aft perpendicular is stored.
The function returns the draught when given volume or draught, trim and heel when given
volume and center of gravity. NOTE that if deflection is defined (e.g. in tasks LD, HYD and
INC), it is taken into account in the calculation.
WLPOS(name,vol,trim,heel,x)
The function value is the draught giving the given volume at the given trim and heel.
vol: volume
WLPOS(name,vol,x,y,z,res)
The result is the floating position returned in an array, when given volume and position of
center of gravity.
vol: volume
res: array for receiving the result. The values in 'res' are assigned as follows:
res(1): draught
res(2): trim, m
res(3): heel, degrees
As a by-product, res(4...5) are assigned the x-, y- and z-moments of volume corresponding to
the equilibrium.
EXAMPLES
@WLPOS('HULL',5000)
@R=ARR(3)
@V=VOL('HULL',5,10)
@X=CG('HULL',1,5,10)
@WLPOS('HULL',V,X,0,0,R)
The function returns the area of objects. Curves must be either closed plane curves or open
plane curves, in which case the area will be the one enclosed by the curve and a user given
axis. The default axis is Z. For a room, the area is calculated from the generated boundary
surface. See INQNT(room,area) for a calculation using the calculation sections.
AREA(object)
object: name of object or (for curves) reference number (e.g. from SECT).
AREA(object,laxis,lim1,lim2)
EXAMPLES
@AREA('FRA') total area between centerline and FRA
@AREA('FRA',3,-1,5) area of FRA under z=5
CGA(curve,axis,laxis,lim1,lim2)
Center of gravity of area enclosed by curve. For open curves, the result is defined for frames,
which are closed against the z-laxis. The curve must be a principal plane curve. See CG for the
center of gravity of volumes.
CGA(surface,axis,laxis,lim1,lim2)
mi=MOM2(object,i,sel,point)
i: selection of quantity from the list ix,iy,iz,ixy,iyz,izx. ix=moment of inertia around x-axis etc.
point: (opt) explicit reference point, needed if C=2, either array with three element or three numbers
x,y,z.
MOM2(object,arr,sel,x,y,z)
Otherwise as above, but all six quantities are returned in the given array. The function value is
an empty string.
EXAMPLES
GEN TEST STABHULL/Z=5
@iy=mom2('test',1,1)
The result should be equivalent with IY from HYD except for the plate thickness.
@mi=arr(2)
@mom2('DECK1',MI)
The function value is either the so-called point parameter, used by functions LENGTH,
COORD, INCL or a coordinate.
POINT(curve,axis,q,n,qaxis)
qaxis: (opt) axis on which to return a coordinate, otherwise the result is the point parameter (1 for first
point, n for the n:th polygon point, decimal values between).
POINT(curve,plane,q,n,qaxis)
Otherwise as above, but the point is found by intersection with a general plane.
plane: real array containing four values, vx,vy,vz,q such that the equation of the plane is
vx*x+vy*y+vz*z=q, as, for example, obtained from GM.WPLANE.
EXAMPLES
@P=POINT('FRF',3,4) get point at z=4
@Y=COORD('FRF',2,P) y-coordinate at P
@Y=POINT('FRF',3,4,1,2) shortcut for the same y
COORD(curve,axis,point)
axis: axis for which the point is required (1=x, 2=y, 3=z)
point: point number, 1=start point, 2=second point, 1.5=midpoint between 1 and 2 etc. -1=end point.
The point may be obtained by the POINT or PLENGTH functions. This parameter is not
needed (ignored) if the object is a point object.
EXAMPLES
@x=coord('STEM',1,-1)
@p=plength('FR1',3)
@y=coord(FR1,2,p)
LENGTH(curve,point)
point: (opt) return the length to this point, default=whole length. 'point' is the point parameter returned
by POINT.
EXAMPLES
@LENGTH('STEM') total length of STEM
@P=POINT('STEM',3,5) point at z=5
@LENGTH('STEM',P) length from startpoint to z=5.
The function returns the point on a curve at a given distance, measured along the curve from
the startpoint. The result is the point parameter as defined for POINT.
PLENGTH(curve,l,qaxis)
INCL(curve,point,vector,method)
vector: (opt) array for returning the result. Without this parameter, the function can only be used for
principal plane curves, and the function value is the inclination in plane of the curve (radians).
With this parameter, the direction is returned as a vector.
1: inclination is calculated using the interpolation between three nearest polygone points.
(default)
2: no interpolation
EXAMPLES
@P=POINT('WL1',1,12) point at x=12
@A=INCL('WL1',P)/RO inclination at x=12 in degrees
@INCL('WL1',P,V) same result as vector, e.g. (0.8.0.6,0)
The function returns the intersection between two curves. The function value is the point
parameter on the first curve of the intersection.
IBC(curve1,curve2)
EXAMPLE
@C1=DB('FR1')
@C2=DB('D1')
@P=IBC(C1,C2)
@Y=COORD(C1,2,P) y-coordinate of the point
@A=COORD(C1,P) inclination of FR1 (first curve)
The function returns part of a curve, either a separate branch or a part obtained by cutting the
curve. The function value is the reference number of the partial curve. 0=none obtained.
CPART(curve,n,name)
name: (opt) name of the result, default PART. NOTE: a curve with the same name in the run time
memory is replaced.
CPART(curve,axis,lim1,lim2,name)
CPART(curve,0)
Special case: return a curve with one branch only. If the original curve contains several
branches, these are connected.
EXAMPLES
@C1=SECT('HULL',1,101)
@P1=CPART(C1,1) -> first branch of the section
@LENGTH(P1) -> lenght of this branch
@C2=CPART('STEM',3,-1,5) -> part of stem lower than z=5
PLOT PART plot the part
A room or surface is intersected at a given coordinate. The function value is the reference
number to the resulting description which can be used in all functions accpting the reference
number of a curve as argument.
SECT(object,axis,coord,name)
name: (opt) name of the result default=SECTION*. A curve with the same name is replaced if existing
in the run time memory.
SECT(object,plane,coord,name)
plane: real array containing four values, vx,vy,vz,q such that the equation of the plane is
vx*x+vy*y+vz*z=q, as, for example, obtained from GM.WPLANE.
EXAMPLE
@C=SECT('HULL',1,60) -> section of HULL at x=60
@A=AREA(C) -> area of the section
@Y=POINT(C,3,4.5,1,2) -> y-coordinate at z=4.5
@V=GM.WPLANE(t,tr,heel)
@C=SECT('HULL',V,0.0)
The waterline at the given draught, trim and heel is intersected from HULL
The function returns the shortest distance between two objects that can be surfaces, curves or
points. Optionally, it returns the coordinates of the nearest points.
DIST(object1,object2,p1,p2)
object1: name of object or point expressed by (x,y,z) (as one string). With one coordinate free (-), the
syntax designates a line.
p1: (opt) array for receiving the nearest point on object1. For curves p1 contains
x,y,z,branch,parameter For surfaces p1 contains x,y,z,patch,u-parameter,v-parameter
EXAMPLES
@DIST('HULL','CURVE1') distance between the given objects
@DIST('HULL','(40 0 0)') distance from (40 0 0) to HULL
@P=ARR(2)
@DIST('HULL','(20 4 -)',P)
This gives the distance from HULL to the line x=20, y=4. If it intersects the hull, the distance is
0 and P contains the coordinates of the intersection point.
This function gives the intersection point between two curves available as polygons stored in
arrays.
INTERS(u1,v1,u2,v2,u,v)
EXAMPLE
@U1=ARR(2) @V1=...
@PARSE('0 0 10 10 0' U1)
@PARSE('0 10 10 0 0' V1)
@PARSE('0 10' U2)
@PARSE('-1 11' V2)
@N=INTERS(U1,V1,U2,V2,U,V)
-> N=2, U=(0.83,9.17), V=(0,10)
The function finds a point on a given curve, such that together with a given point on another
curve it gives a generator line for a developable surface, containing the two curves. The
function value is a point number, that can be used as input for COORD, INCL.
p2=DVSG(c1,p1,c2)
c1: curve containing the given point. NOTE: reference number, see example.
p1: point on c1, counted from the start, 1=start point, <0: from the end, -1=endpoint. The output
from POINT or PLENGTH can be used.
EXAMPLE
@c1=db('WL1')
@c2=db('WL2')
@p1=point(c1,1,3.5)
@p2=dvsg(c1,p1,c2)
@x=coord(c2,1,p2)
A point with x=3.5 on WL1 is connected with WL2. The x-coordinate of the point on WL2 is
assigned to x. See also macro DVSGEN in the NAPADB.
The function returns the value of a compartment parameter as obtained from the current
arrangement (ARR*...).'
CPP(name,par)
par: parameter, quantity defined in the ARR* tables, e.g. PURP, DES, RHO. The quantity need not
be explicitly defined in the table if it is one that can be declared with the formula SM, e.g.
VOLM.
EXAMPLE
@CPP('R40','PURP') -> BW
PP purpose parameter
The function returns the value of a parameter defined for a substance or compartment purpose.
PP(id,par)
par: parameter, quantity defined in the PAR* table, e.g. PDES, RHO.
EXAMPLE
@PP('BW','RHO') -> 1.025
The function returns the value given by the current filling standard for the given purpose or
substance. The default filling standard is loaded if none is current at the call.
FCODE(purp)
EXAMPLE
@FCODE('BW') -> 3
REF(id)
id: identifier of parameter, as used in the REF task, e.g. LREF, BDWL, LOA, STABHULL, GMTOL.
EXAMPLE
@REF('LOA') -> 110 (length all over)
@REF('SNAME') -> 'm/s Demo'
DTX(id)
EXAMPLE
@DTX('PRV') -> NAPASHIP/A (project/version)
FR(x)
x: x-coordinate
EXAMPLE
@FR(12) -> 20
FR(q,s)
EXAMPLE
@FR(12.5,2)
XFR(frame)
@XFR(20) -> 12
XFR(frame,s)
EXAMPLE
@XFR(5.5,3)
The function returns the next line from a text file. The file must be opened by !OPEN. EOF is
rturned when the end of the file is reached.
INPUT(unit)
EXAMPLE
!OPEN temp>test 11
@S=INPUT(11) (first line)
@S=INPUT(11) (next line)
This function makes it possible to access a variable defined on the main level (=not local to any
macro) in cases when the symbol is not available because of visibility restrictions in the running
macros.
value=GLOBAL(name)
EXAMPLE
!TYPE @A
!TYPE @global('A')
If the symbol A is available, the result is the same in both cases, else only the latter alternative
works.
This function returns a reference to quantity. It is primarily intended for cases when the quantity
is not accessible the normal way because of visibility restrictions in the running macros.
ref=QUANTITY(name)
EXAMPLE:
@RH=QUANTITY('HEEL')
!type @rh(1)
TRAN(text,lang)
lang: (opt) language, default=as assigned with !LANG. Special case: TEST: apply the current
language and list the source used for the translation.
EXAMPLE
TYPE @TRAN('Attained GM')_=@GM
1=numeric variable
2=string variable
11=numeric quantity (SH)
12=string quantity (SH)
21=numeric array
22=string array
26=description
VTYP(name)
EXAMPLES
@A=12
@VTYP('A') -> 1
@S=ARR(3)
@VTYP('S') -> 22
VTYP(name,1)
As above, but 'name' is intepreted as a global variable. The function allows access to a top
level variable even if prevented by the visibility restrictions. For example, this may be needed in
order to access variables created by the application (e.g. LDNAME in LD).
GLOBAL(name)
EXAMPLE
!SEL TYPE=R
@A=GLOBAL('LIST')
!VAR LIST A
This function is mainly intended for cases when the name of the variable is given by a variable,
otherwise the normal assignment statement can be used. The function value is an empty
string.
ASSIGN(name,value)
EXAMPLES
@assign(varlist(i),q(i))
@assign(caseid,'This case')
This function calculates the value of an expression. It is in most cases redundant, i.e. the
parameter could be used as such, but it makes it possible that the expression itself is a
variable.
VALUEOF(expr)
EXAMPLE
@A='B'
@B=100
@S='SQRT(B)'
@VALUEOF('A'): 'B' (same as @a)
@VALUEOF(A): 100
@VALUEOF(S): 10 (same as !calc @s)
This function allows a value calculated by a macro to be used as a calculator function. The
macro can only use NAPA BASIC functions and it must return the result in variable named
$RESULT.
RESULTOF(macro,par1,par2...)
macro: name of macro. The macor is read the normal way from the data base (project/system/NAPA
data base in this order). See AI.CACHE for improving efficiency when the macro is needed
repeatedly. The name is interpreted as a file name if the first or second character is :. If the
colon is first, it is removed.
EXAMPLE
Macro named DUMMY
@@ suppress values outside a range
@PARAMETERS(VALUE=N,LL=N,UL=N)
@IF OR(VALUEUL) THEN
@$RESULT=''
@ELSE
@$RESULT=FMT(VALUE)
@ENDIF
!CAL RESULTOF('DUMMY',12.5,0,100) -> '12.5'
!CAL RESULTOF('DUMMY',999,0,100) -> ''
!CAL RESULTOF('C:/macros/dummy.txt')
!CAL RESULTOF(':/macros/dummy.txt')
Note: the interpretation of symbols used in the macro depends on the context where it is used.
For example, if RESULTOF is used as a calculation rule in a table column, the macro is called
when the table symbols are active and have precedence over variables.
This function gets a macro to the free storage, either as a description or an array.
MACRO(name,receiver)
name: name in the same syntax as in !ADD. A path name can be also be given as one string
preceded by :.
receiver: (opt) string array. If given, the result is returned as elements in this array, else as a description
given by the function value.
EXAMPLES
@d=macro('mymacro')
Gets the given macro from the NAPA data base using the normal search rules.
@d=macro(':/n/napa/temp/mymacro.txt')
IIF inline if
The function selects between two alternatives and allows a selection to be made for example
within an expression.
alt=IIF(crit,alt1,alt2)
crit: criterion, logical value (0 or >0). If true (>0), the function value is alt1 else alt2.
alt1: result to be returned if the criterion is true. Any data type can be used.
alt2: result to be returned if the criterion is false. Would normally be the same data type as 'alt1' but
this is not checked.
Example
!type @iif(L>300,'long','short')
arr=IIF(crit,alt1,alt2,'A')
DEPRECATED FORM: 'A'-option not needed for any purpose since 2008 ( This form was
supported for the case that alt1 and alt2 are strings and returns the result as a string array. If
the selected alternative is empty, an empty array is returned. )
SUM(arr)
SUM(arr,'D')
EXAMPLE
@A=ARR(2)
@PARSE('1 2 3 4 5',A)
@SUM(A) -> 15
ARR(arr)
AVR(arr,'D')
EXAMPLE
@A=ARR(2)
@PARSE('1 2 3 4 5',A)
@AVR(A) -> 3
PSUM(arr1,arr2)
EXAMPLE
@V=.... (array with volumes)
@X=.... (array with corr. xcg)
@XCG=PSUM(V,X)/SUM(V)
The function returns the integral when given two arrays, one representing the argument, the
other a function.
INTEGR(arg,funct,d1,d2)
d1: (opt) derivative at the start. Causes smooth interpolation to be done between the given points.
-99: dummy value for getting smooth interpolation only.
EXAMPLE
@D=DB('FRF')
@Y=ARR(D,'Y')
@Z=ARR(D,'Z')
@AREA=INTEGR(Z,Y)
A function represented by two arrays is evaluated at a given argument. Between the given
points, the function is interpolated linearly or by a smooth interpolator.
INTERP(argarr,funct,arg,d)
arg: argument: value on 'argarr', for which the corresponding value of 'funct' is returned.
EXAMPLE
@D=DB('FRF')
@Y=ARR(D,'Y')
@Z=ARR(D,'Z')
@Y0=INTERP(Z,Y,4.5) -> value of y when z=4.5
SORT(array)
SORT(array,order)
The given array is not changed, but the order between its elements is returned in the integer
array 'order'. See also DM.SORT.
EXAMPLE
@S=ARR(S) @ORDER=ARR(1)
@PARSE('B C D A',S)
@SORT(S,ORDER)
-> ORDER=(4,1,2,3)
@SORT(S)
-> S=(A,B,C,D)
The function value is the total of the given table column, calculated as required by the sum rule
defined for the quantity or column in question. If a subset is defined, the total covers the subset
only.
CTOT(column)
column: column name. Can be entered as calculator symbol (apostrophes not needed).
EXAMPLE
COLUMN VOL
!CAL CTOT(VOL)
This function differs from CTOT in that the summing rule is specified by the function. It differs
from the general function SUM in that a subset is taken into account if defined. Similarly CMIN,
CMAX, CPSUM.
CSUM(column)
COLR(column)
EXAMPLE
COLUMN X
@X(2) -> the value of x two lines after the current line
@XR=COLR(X)
@XR(2) -> value of column x at line 2
The purpose of this function is to give access to container data in macros. This function is
considered obsolete and replaced by CL.INFO.
CLINFO(name,quantity,arr,arr2)
name: name of load or arrangement. Prefix CNTA* designates an arrangement and CNTL* a load. A
name without prefix is interpreted as a load.
NI: extension in terms of bay/row/tier numbers: returns in 'arr' the values B1,BN,R1,RN,T1,TN
BAYS: returns in 'arr' a list of all bays. The function value gives the total number
X: x-coordinates of bays. When 'arr2' is given, the upper and lower coordinates are returned
separately, with only 'arr', the midpoints.
Y: similarly
Z: similarly
LIST: list of all containers, returned in 'arr' (strings) expressed as the container id of the form
Cbbrrtt.
CLINFO(id,quantity)
This form returns a value related to a single container. The value refers to the current container
load.
id: container id, having the form Cbbrrtt, e.g. C020482, i.e. the same as the values of the quantity
ID in LIST CLC.
quantity: the desired quantity, e.g. CTP=container type. The alternatives are the same as in LQ CLC
ALT.
EXAMPLES
@mass=CLINFO('LOAD1','MASS')
@N=CLINFO('CNTA*B1','NR')
@limits=arr(2)
@CLINFO('ARR1','LIM',LIMITS) Return the extension of ARR1 in the array 'limits' (note: type
2).
@range=arr(1)
@TYPE=CLINFO('C120204','CTP')
Return the type of container loaded in the position bay=12, row=2, tier=4 in the current
container load.
The functions gets a value defined provided by a table where one column corresponds to the
argument and another provides the result quantity. For string arguments, the same effect can
be obtained with the (newer) function TP.VALUE.
EVAL(qnt,arg,table)
arg: value of the argument. If the value is a string, the table is supposed to have a key column
containing 'arg'. If the value is numeric, the first (note!) column is used as argument and linear
interpolation is used to get the function value.
table: name of the source table NOTE: the table must be present in the run time memory, if needed
use !TAB GET or TP.READ.
EXAMPLE
@des=EVAL('PDES','HFO','PAR*PRO')
Get the value of the purpose description PDES for the purpose HFO, as defined the table
PAR*PRO.
PI pi (=3.14159)
RO pi/180, 0.0174533
For converting internal date differences (in seconds) to days or vice versa.
The release is expressed as a number in the form 2001. (Before rel. 99.1, the output was 98.1
etc).
A drawing must be open. Does not include effect of !ZOOM or window resize.
Intended for decisions regarding page feed. Header lines not included. A list must be open.
Considered obsolete - use the GR.INPUT function in macros reading graphic input.
See UINPUT.
The function value is a string (u,v) representing the point last input.
-1,-2 and -3 mean buttons 1...3 on the mouse, >0 ASCII code of keyboard key. >1000 special
key.
Allows access to the current text with calculator functions, for example REC(EDTEXT,200)
gives the reference number of line 200.
CI current index
Intended for formulas in LQ:s, if there is the need to know the index in the current records
(same as line number if no subset defined).
EXAMPLE
LQ ... ID/'LIST(CI)'
Values from the string array LIST are added to the output as quantity ID. The array must be
indexed in the same way as the listed items.
Some of the above mentioned functions are valid in the proper context only: CLINE when a result list is open, SCL when a drawing is open, CLN,
NLN in task TAB, UINPUT, VINPUT, PINPUT when graphic input has been done. EDTEXT and EDLINE require that there is a text in the editor
work area. EDLINE could be used after doing a LOCATE or similar operation. When the current line is at the start of a text, the reference number
points at a flag record preceding the text.
A name without a parenthesis directly following can have one of the following meanings:
a table element
a variable
a parameterless function (e.g. RO, SCL)
the name of a quantity
A name with a parenthesis directly following can have one of the following meanings:
The interpretation as a table value requires that there is an active table (current task is table calculation). The interpretation as a quantity is
possible under SH and in some functions of the main NAPA, for example, when listing an LQ-controlled table.
As a check against ambiguities, command !VAR CHECK is provided. For example, after doing
!CALC LREF=105
!CALC VOL=ARR(2)
With option
!VAR CHECK ON
the check mode is set, where all possible interpretations are done whenever a symbol is interpreted, and if ambiguities are found, a warning is
given. Otherwise, the interpretation is finished as soon as a valid interpretation is found.
In order to reduce the possibilities for ambiguities, variables no longer used can be deleted with command !VAR DELETE (one variable), !VAR
RESET (all variables) or !VAR RESET T (all variables added in the task just finished). The last possibility is provided especially for those
variables that some tasks automatically create.
NOT(x)
Returns 1 (true) if x is false (zero or negative), 0 if x is true.
OR(x1,x2,...)
Returns 1 if at least one of the xs is true (=positive) otherwise 0.
AND(x1,x2,...)
Returns 0 if at least one of the xs is false (=zero or negative), otherwise 1.
EQUAL(x1,x2,tol)
Performs equality test with explicit tolerance, for example, EQUAL(12.121,12.123,0.001)=0 (false), EQUAL(12.121,12.123,0.01)=1. The
operator = uses a fixed tolerance 0.000001.
DATE(idate): returns the date as integer YYMMDD when given the internal date.
The parameterless function IDATE returns the current date (and time) in the internal form, the unit of which is seconds. The built in
constant SPD (seconds per day) can be used for converting seconds to days or vice versa.
(The NAPA internal date is expressed as seconds from 00.00/1.1 1964)
TIME(idate): returns time as integer HHMMSS when given the internal date
IDATE(date) or IDATE(date,time): returns internal date, when given date (and optionally time) in the form above. For example
IDATE>IDATE(900916,214500)
is true if the current date is later than 21.45 on 16. sept, 1990.
FDATE(idate): (formatted date) returns date in output form YY-MM-DD or the form defined in the installation parameters
FDATE(idate,form): date in the specified form: 1=from operating system, 2=yyy-mm-dd, 3=yy-mm-dd, 4=dd.mm yyyy, 5=mm/dd/yy
FTIME(idate,form): (formatted time) returns time in the form HH.MM. Form parameter analogically with FDATE.
FMT(value,d,f): convert number to string. f=field length, default=min nr. of characters required. d=number of decimals, default=as needed
to represent the value. With the additional parameters unit and quantity, unit conversions and labels can be added, as presented below.
VALUE(string): convert string to number. The value of 'string' must contain a valid number as part. For example, VALUE('FR2')=2.
SBS(string,i1,i2): returns the substring formed by characters i1 to i2 of 'string', for example, SBS('WL10',3,4)='10'. If i1=1, it may be
omitted. A negative index means counted from the end of the string.
When applying SBS, the given string is treated as if extended with spaces. For example, SBS(S,12) returns a string of length 12
regardless of the number of characters in S, which may be useful in formatting output.
CNC(string1,string2,... ): concatenate strings, for example, CNC('A','B','C') is 'ABC'
LEN(string): length of string, for example, LEN('ABC') is 3
LEN(string,ss): position of substring, for example, LEN('STABHULL','HULL') is 5. If the substring is missing, 0 is returned.
CHAR(i): character with ASCII code i. The most frequent need for this function is to represent nonprinting characters such as
CHAR(27)=<esc>. It performs also the reverse functions, e.g. CHAR('A')=65
LCASE(string): convert string to lower case. With 1 as the second parameter (e.g. LCASE(NAME,1)) the first character is returned in
upper case. With 2 as the second parameter, the whole string is converted to upper case.
PARSE(string,arr): the parts of the given string (separated by spaces) are added to the array 'arr'. The function value tells the number of
values added. If the array is a numeric one, only those items that can be converted to numbers are returned.
This function has been added in order to simplify fetching of data from text files (after reading into the editor work area or into a variable).
It can also be used as a convenient way of initializing an array, for example:
@A=ARR(2)
@PARSE('1 1.2 3.35 4.1 5 6.7 9.2 11',A)
The FMT function needs a closer presentation. Regarding the main parameters of the FMT function, note the following:
If f (=the field length) is not given, the so-called dynamic format is used, where the result is as long as required by the given value, and d (=the
number of decimals) is only the upper limit, trailing zeros are omitted. If the field length is given, the result is as long as specified by f, and the
number of decimals is the given one.
If both f and d are omitted, a useful format is estimated, unless a quantity has been given.
The options 'unit' and 'qnt' have been added in order to help macros print data in a simple way, still being less ascetic than just printing bare
numbers:
FMT(value,d,f,unit,qnt)
'unit' causes the symbol to be added and the unit conversion to be done, for example,
'qnt' tells the quantity and it is used as a label. A format or unit not given separately is fetched from the quantity standard. Example:
FMT(DISP,2,8,'DISP') ->
DISP = 4557.81 ton
With an asterisk added, the long header is fetched from the quantity standard:
The unit can be omitted before 'qnt', if the quantity cannot be mistaken for a unit; otherwise, the unit must be entered as '-' (no unit) or '+' (use
standard unit).
For more string handling functions, see service functions of groups AD and OS.
RESULTOF(macro,parameters): value calculated by the given macro. The remaining parameters are passed to the macro. The macro is
run in the so-called immediate mode and it can contain NAPA BASIC commands only.
VALUEOF(expression): this function gives another round of evaluation. For example, if S='2+2', VALUEOF(S)=4.
ASSIGN(var,expression): this function is the reverse of the preceding one and makes it possible to assign a variable when the name of
the variable itself is given by a variable or expression.
GLOBAL(name): get value of global variable regardless of visibility.
QUANTITY(id): fetches a quantity in the SH sense. The value is a reference to the record containing the quantity: @R=QUANTITY('PB')
@R(1)=the first value.
FR(x),XFR(frn): frame number from x-coordinate and vice versa
DTX(string): return dynamic text. Use command !DTX for list of valid alternatives. For example, DTX('PRO')=current project.
REF(id, qnt): value from the reference system. 'id'=symbol used under task REF for the item, for example, REF('LOA') gives the total
length. With the optional parameter 'qnt', a value associated with the item can be found, see chapter Reference system (REF).
TRAN(text,lang): applies the language translation function on the given text. Parameter 'lang' designates the language. It can be omitted
if the language is set with the command !LANG.
RND(range,name): returns a random number (integer) from the given range. Parameter 'name' is optional, and it has the effect that with
the given name and range, the same number is always returned.
VTYP(name): tells the type of a character constant (note!). The function value can be
0 not defined
1 numeric variable
2 string variable
11 numeric quantity
12 string quantity
21 numeric array
22 string array
26 description (e.g from DB)
@A=ARRLIST(I)
@A=ARR(A)
EVAL(qnt,arg,table): returns the value of the quantity'qnt' (column name) for the given argument 'arg' (value in the key column), as
obtained from the given table. For a closer description, see Table calculation.
INPUT(f unit): read the next line from a text file. f-unit is the file unit used when opening the file by command !OPEN and should be
11...13. The function value is the contents of the line. If the file is ended, 'EOF' is returned and in case of a read error, 'ERR' is returned.
Example:
!OPEN TEMP>DEMO 11
!TYPE @INPUT(11)
For manipulating data objects, a more complete set of functions is available as service functions in the groups DM and DB.
VOL(name,t,tr,heel): volume. Like the other volume oriented quantities, a shell thickness is included if defined.
MOM(name,axis,t,tr,heel): moment
CG(name,axis,t,tr,heel): center of gravity of volume
LL(name,axis): lower limit
UL(name,axis): upper limit
AA(name): approximate area, bottom area approximated as the volume divided by the height (vol/(zmax-zmin).
BA(name,a): bottom area, calculated as described is S.2. The optional parameter a is an array, into which the area, the center of gravity
and the length of the section are stored.
INQNT(name,qnt,t,tr,heel): quantity selected from the set presented below.
INQNT(obj,x,t,trim,heel,arr): alternative form: the function value is the area of the section at x, delimited as implied by the given water
plane. The parameter 'arr' is optional, and gives the name of an array into which the area, y- and z-coord. of center of gravity are stored
(in this order).
AREA(name): 'wall area' (when applied to a room), i.e. the area of the limiting surface. This area is calculated from the calculation
sections according to a heuristic method that may be inaccurate in some cases.
WLPOS(name,volume,tri m,heel): 'waterline position', see below.
The following parameters are optional, and may be omitted beginning from the end:
Note that the parameters trim and heel are entered in the normal input form, which has been considered practical in most cases. However, when
fetching the values from the database, heelings and trims are in radians. The conversion of trim in radians (tr) to trim in meters (tm) and vice versa
is done by
tm=lref*tan(tr)*trsign
tr=atan(tm/lref)*trsign
Examples:
@vtot=vol('stabhull')
@v1=vol('stabhull',5,1) (t=5, trim=1 (m), heel=0)
@zcg=cg('R123',3)
@lz=ul('r123',3)-ll(r123',3)
@t=wlpos('hull',1000) (draught when given volume)
The functions VOL and CG can return the results for a partial object, by giving an array containing limiting coordinates as the second parameter.
Example:
@limits=arr(2)
** @parse('-999 50 -999 999 -999 999',LIMITS)
@volaft=vol('STABHULL',LIMITS)
The limits are given by an array containing xmin, xmax, ymin, ymax, zmin and zmax. All limits must be given, although the upper x limit only is
relevant in the example. This function is not implemented for objects containing other transformations than reflection around y=0.
The function INQNT returns the basic volume oriented quantities (volume,moments), quantities related to the waterline area (area, moments) and
various derived quantities. The quantity is designated by the symbol stored in the quantity standard. Available quantities are:
Quantity Explanation
TCP immersion/cm
The function WLPOS returns the waterline position, when given volume or center of gravity. The following form returns the draught, when given
volume, trim and heel:
WLPOS(name,volume,trim,heel)
The following form returns the floating position, when given the volume and center of gravity:
WLPOS(name,volume,cgx,cgy,cgz,res)
'res' is an array receiving the result (draught, trim, heel). The draught is also returned as the function value. Example:
@flpos=arr(2)
@t=wlpos('hull',1000,53,0,5,flpos)
The array FLPOS contains draught, trim and heel as the three first elements.
@A=area('BH1')
@A2=AREA('BH1',3,-1,3.5)
@Z=CGA('BH1',3)
DIST(name1,name2,p1,p2): the smallest distance between the given objects. The optional output parameters (arrays) are the points
corresponding to the smallest distance. One or both of the objects can be a curve, point object or a point represented by the syntax
'(x,y,z)'. If one of the coordinates x,y or z is replaced by the character '-', the object is a line that is parallel to the corresponding
coordinate.
@D=DIST('HULL','POINT1')
@D=DIST('POINT1','POINT2')
@D=DIST('HULL','(33.4,4.6,12)')
@P1=ARR(2)
@D=DIST('HULL',(33.4,5,0)',P1)
-> P1=nearest point in HULL
@D=DIST('HULL',(33.4,5,-)',P1)
...-> P1=intersection with x=33.4,Y=5
The parameters laxis, l1 and l2 are optional, and restrict the area to be calculated to the part between limit l1 and l2, measured on 'laxis' (1=x, 2=y
and 3=z).
FCODE(id): filling code (device code or logical fill code) corresponding to the given contents symbol. The current filling standard is
applied (can be checked with !SM FST). If none is active, the default standard for compartment purposes is used.
FILL @FCODE('BW')
CPP(name,par): gives any parameter handled by SM, 'par' gives the parameter by the standard symbol, e.g. PERM, VOLM.
@CPP('R123','PURP')
PP(id,par): gives the value of a parameters associated with the purpose identifier 'id'. 'par' gives the parameter as above. Possible values
are PDES, TYPE, CLASS, RHO, STRD, CAP or others added to the current PAR* table.
@PP('BW','RHO')
Since data related to arrangements is treated as tables, the service functions of the group TP are available.
The function SECT(name,axis,q,cname) intersects an object with a coordinate plane defined by axis (1=x, 2=y, 3=z) and the coordinate q. The
function value is the reference number of the resulting curve. 'cname' is optional, and gives the name of the curve, default 'SECTION*'. The curve
is not stored, but the name can be used in command PLOT, for example. The function value is useful as the parameter 'curve' in the functions
presented below. Example:
@c=sect('HULL',1,75)
@a=area(c)
The parameter 'curve' stands for the curve name or the reference number returned by SECT or DB functions. The parameters designated by c or
c1,c2 can be reference numbers only.
In the functions above, the optional parameters laxis, l1 and l2 limit the curve as presented for surfaces. For open curves, laxis also provides the
'argument' axis, which together with the curve defines the area. Default=z for x- and z-sections, x for z-sections.
POINT(curve,axis,q,n,q axis): identifies a point on a curve where a given coordinate ('axis'=1,2 or 3) has a given value ('q'). If several
points correspond to the criterion, the optional parameter 'n' can be used for selecting between these.
If the last parameter 'qaxis' is given, the function value will be the coordinate value on this axis. Otherwise, the function value is the
so-called point parameter, by which the point is designated in other functions (CCORD, LENGTH,INCL).
@P=POINT('STEM',3,3)
@A=INCL('STEM',P)/RO
@X=POINT('STEM',3,3,1,1)
COORD(curve,axis,point): returns the coordinate of a point on a curve, when given the axis (1,2 or 3) and the point parameter (as
returned by POINT, PLENGTH, IBC or DVSG). The point parameter for the startpoint is 1. Negative values mean values counted from
the endpoint; therefore, -1=endpoint.
The function can also be applied on a point object, but then the parameter 'point' is omitted.
@X=COORD('STEM',1,1) (startpoint)
@z=COORD('POINT1',3)
LENGTH(curve,point): returns the curve length from the startpoint to the point given by the point parameter, or if the parameter is omitted,
the whole length.
@L=LENGTH('STEM')
@C=SECT('HULL',1,X)
@L=LENGTH(C)
@P=POINT(C,3,ZDWL)
@LZ=L-LENGTH(C,P) (startpoint upper end)
PLENGTH(curve,l,qaxis): returns the point on the given curve that has the given distance from the startpoint, measured along the curve.
The result is returned in the same way as in POINT.
@P=PLENGTH('STEM',5)
@Z=COORD('STEM',P,3)
height of point at 5 m from startpoint
INCL(curve,point ,vect): returns the inclination of a curve. Without the parameter 'vect', the curve must be a principal plane curve, and the
result is returned as the inclination (in radians) in the plane of the curve. The parameter 'vect' is optional and it must be the name of an
array, into which the curve direction is stored as a vector.
@T=INCL('STEM',POINT('STEM',3,5))/RO
-> inclination of stem at z=5
@P=POINT('KNF',1,46)
@V=ARR(2)
** @INCL('KNF',P,V)
-> V=direction vector of KNF at x=46
BEND(u1,v1,a1,u2,v2,a2,r,us,vs,ue,ve): endpoints of circular bend. This function calculates the endpoints of a circular bend, when given
the radius (r) and the tangents (u1,v1,a1), (u2,v2,a2) (point+angle). The result is delivered in output parameters (us,vs)=startpoint,
(ue,ve)=endpoint. The function value is irrelevant (assigned 1).
DVSG(c1,p1,c2): 'developable surface generator'. This function helps defining a developable surface between two curves. c1 and c2
stand for the reference numbers (note) of two curves. p1 is a point on the first curve, as returned by functions POINT (short form) or
PLENGTH. The function value is the point p2 on c2, such that the straight from p1 tp p2 can be used as generator for the surface (the
curves and the straight have a common tangent plane). The following examples show how to get a point P2 on the other curve after
selecting a point P1 on the first one. For more information, see macro DVSGEN in the NAPADB.
@C1=DB('CURVE1')
@C2=DB('CURVE2')
@P1=POINT(C1,1,X)
@P2=DVSG(C1,P1,C2)
CPART(c,axis,l1,l2,name): creates (in the run time memory) a curve named PART, formed by the given curve, restricted to the part
between the given limits l1 and l2, measured along 'axis'. The function value is the reference number of the part. 'name' is optional and it
gives the name of the result, default=PART.
@C=CPART('STEM',3,-1,5,'STEML')
-> part of stem below z=5, named STEML
CPART(c,nr,name): as above, but the part is selected as the given curve branch. nr=0 is a special case: the branches of the curve are
connected in order to give a single branch. The need for the latter function typically occurs with a section near the bulb, and the result is
needed in a context where multiple branches do not work.
@C=SECT('HULL',1,82.5)
@B1=CPART(C,1) first branch
@B2=CPART(C,2) second branch
@B0=CPART(C,0) both branches connected to one
IBC(c1,c2): intersection between curves. The function value is the point parameter (as in function POINT) of the point on curve c1 where
the curve is intersected by C2. Note: c1 and c2 must be reference numbers (from the SECT or DB function).
@C1=DB('FR8')
@C2=DB('WL6F')
@P1=IBC(C1,C2) (P1=point on FR8)
@P2=IBC(C2,C1) (P2=point on WL6F)
@Y=COORD(C1,P1,2)
In the following functions, parameters x and y stand for arrays, as obtained from the ARR or REC functions.
SORT(array,order): sort array. For the optional parameter order, see below.
SUM(x): sum of values in the array.
AVR(x): average of values in the array
MIN(x): the minimum value in the array
MAX(x): the maximum value in the array
PSUM(x,y): sum of products between two arrays: x(1)*y(1)+x(2)*y(2)...
SOLVE(op,A,B,x): solve system of linear equations, presented more closely below.
INTERS(x1,y1,x2,y2,x,y): intersection between two curves, represented as polygons, stored in the array pairs x1,y1 and x2,y2. x and y
are arrays for receiving the result. The number of points obtained is returned as the function value. function)
INTEGR(x,y, t1,t2): integral of y over x. For the optional parameters t1 and t2, see below.
INTERP(x,y,x0, t1,t2): value of the function y at argument x0.
The arrays x and y must be numeric, and in the last three functions, the values must be real (not integer). The arrays x and y must have the same
size.
In the two last functions, x and y are supposed to describe y as a function of x, meaning that y must be single valued with respect to x. The
optional parameters t1,t2 cause a smoothed function to be placed through the given values, where t1 and t2 are the end derivatives. The dummy
value -99 can be used for the derivative, if smoothing only is desired.
The result of the smoothing can be checked by drawing the function under the diagram drawing task with the SMOOTH option. The following
figure shows the difference when using smoothing, applied on a function defined by three values. When smoothing is used, the result returned by
INTEGR and INTERP is derived from the curve shown in thin lines; otherwise, it is the thick one.
!CAL SORT(A)
With an integer array (note) as the second parameter, the main array is not changed, but the order is stored in the integer array. Example
@A=ARR(3) @A(1)='B'
@A(2)='C' @A(3)='A'
@IO=ARR(1)
** @SORT(A,IO)
!VAR LIST A
B C A
!VAR LIST IO
3 1 2
A x = b
where x and b are vectors of size n and A a matrix of size n*n. The function call is
SOLVE(op,a,b,x)
where op is an integer code as presented below, a, b and x calculator arrays. The matrix A can be given either as a single array or as a set of
arrays, each representing a row or column in the matrix. In the latter case, the array a is an integer array, containing the reference numbers of the
rows or columns.
The parameter op tells whether the matrix is given by rows (op=1) or by columns (op=2), as illustrated by the following figure:
@b(1)=12 @b(2)=6
@a(1)=2 @a(2)=5 @a(3)=4 @a(4)=1
@a(1)=2 @a(2)=4 @a(3)=5 @a(4)=1
@a1=arr(2) @aa(1)=a1
@a2=arr(2) @aa(2)=a2
@a1(1)=2 @a1(2)=5 @a2(1)=4 @a2(2)=1
@a1(1)=2 @a1(2)=4 @a2(1)=5 @a2(2)=1
It is necessary that the arrays are of the correct type (real arrays except for the array aa). The array sizes must be consistent: if n is the number of
variables, arrays aa,a1,a2,... and b must have size n and array a size n*n in the example above. The size of the output array x is adjusted to be n.
Use the function RSIZE to truncate the arrays if needed (e.g. @RSIZE(A,N*N)).
The function value is zero if the operation has been carried out successfully. Otherwise, the following codes are returned:
upper case.
The same concerns such string constants that are known to represent data handled in upper case (e.g. names of objects).
When there is such a source active, containing some quantities, the symbols of the quantities designate their values, as stored in the source. The
symbol can be used as an array, if there are many values stored. The symbols can also be used in assignments.
Supposing that the source description contains quantities RHO, VOLM and CGX, the following are valid operations:
Note: if the source is a table in the sense of the table calculation module, the quantities are designated by the column names.
Most of the functions described here are available as so-called transparent commands. It is characteristic for these commands that
The latter property means that the application programs cannot check or take into account the effect of commands that influence the function of
the program, and therefore, the use of some commands is allowed only if the full professional mode is on.
Transparent commands are identified by an asterisk (*) or an exclamation mark (!) as the first character (e.g. *REF or !REF). These two
characters are interchangeable, except in the Editor and the documentation system, where only the exclamation mark is recognized.
This chapter gives an overview of the functions and their purpose without attempting to present all the details of their use, which can be obtained
from the command explanations. A short summary is given over functions presented in more detail in separate documents.
help functions
information of various kind
input, running macros (summary)
listing (summary)
graphics (summary)
catalogs and selections
the calculator (summary)
calculation control
file i/o
system development support
various
The command explanations are collected into a separate section, organized as the main part.
The services that are not available as transparent commands must be made available separately in every task. In most application tasks, the
general services considered useful are installed. For the case that a function for some reason is not available this way, there is the subtask SRV
(services) containing a number of useful functions. In addition to the functions presented here, it contains functions such as output of lists (SCAN),
output of plots (PLOT), the Text Editor (EDIT) and the general drawing task (DR).
Table of Contents:
1. Help functions
2. Functions producing information
3. Commands related to input and running macros
3.1. !ADD, run macro
3.2. !DO, repeat commands
3.3. !L, list or run previous commands
4. Commands related to list output
4.1. !PRINTER, default printer
4.2. !PAGE, select page size
4.3. !Header, control page headers
4.4. !FORM, formatting of numbers
4.5. !LINK, redirect list output
5. Functions related to graphics
5.1. !GR, various control functions
5.2. !E, screen erase
5.3. !GIN, control of graphic input
5.4. !VIEW, management of views
5.5. !LAYER create/change layer
5.6. !ZOOM, !PAN
5.7. !SEND output of current graphics
5.8. !GRPAGE, drawing area
6. Doing catalogs and selections
6.1. !SELECT command
6.1.1. Database criterion
6.1.2. LOC criterion
6.1.3. REF criterion
6.1.4. USER criterion
6.1.5. Quantity criterion
6.1.6. Options telling how to return the result
6.2. General CATALOG function
6.3. Copying data from other projects and versions
6.4. !CATALOG command
1. Help functions
A list of commands available in the current subtask is obtained by command
!COMMANDS
In order to find a command for a specific purpose, it may be useful to look for a command, the explanation of which contains a given keyword:
!COMMANDS keyword
!COMMANDS !
!EXPLAIN command
where 'command' is the name of a command. Some command explanations are so long that they have been divided into parts that can be listed
separately. A + in the output from !COMMANDS signals the presence of parts and !EXPL COMMAND + gives a list of the parts and the name by
which it is designated in !EXPL.
!PARAMETERS command
!EXPLAIN nr
This gives the full explanation, while the text associated with an error message only contains the first line.
The command !DOC was introduced in order to help find information in the documentation. After the documentation method has been changed,
this command is no longer available, except for finding information in documents produced before Release 96.1.
With the special conventions listed below, !COMMANDS and !EXPLAIN also give information on the following subjects:
Examples:
!WHERE
gives information about the current run, as illustrated by the following example:
When needed, information on special circumstances is added, for example, if the version is read-only.
This command should be distinguished from the local WHERE commands (without exclamation point), available in many tasks and giving
task-specific information.
!DATE
tells the current date, time, day of week and time of sunrise, sunset:
!REF
!NEWS, !ERR
list information about new features and known bugs. The commands are context sensitive and give information related to the current task.
!FRN
!DTX
lists the values of the so-called dynamic texts. This is a facility introduced before there was the calculator, for providing flexibility in various
contexts (TEXT command of the drawing task, !HEADER ao). The texts are represented by a symbol that is replaced at output by a value (e.g.
PRO -> current project). They can be accessed in macros by the calculator function DTX. The following is a sample of output from !DTX:
!CATALOG
!VERSION LIST
The main function of the !VERSION command is to change version. This should normally be done by the VERSION command on the TASK level,
using !VER for this purpose requires full professional mode.
!OPEN LIST
The main function of this command is to open files for various special purposes, as presented below. With parameter LIST, it gives a list of open
database units, including the intermediate output file (IOF):
!FORM quantity
gives the formatting parameters and explanation (the so-called long header) of a quantity, for example
!form vnet
*FORM VNET 8.1 M3 LH='net volume' SUM=D; ** 2209
The number displayed at the end is a service for the system developers.
!VIEW
Without parameters, the !VIEW command lists information about current views:
Other commands that produce information when given without parameters are
!ADD macro
The main variations are use of other sources than the default, running in step mode (option S).
There is also the command !RUN, which runs the macro in immediate mode. This is mainly useful for testing the macro; otherwise, there is no
difference to using !ADD.
The !DO command runs a macro or given commands repeatedly. The main variations are
A number of previous commands (default=max 500) is maintained in the run time memory and they can be listed or repeated with command !L.
Examples of calls:
!L +n
!L PLOT 5
!L 5 *
!L SIZE *
!PRINTER name
!PRINT ON/OFF
!PAGE sets the page height and width, according to which output is formatted:
The !HEADER command selects the page headers to be output on every page.
The !FORM command lists or changes the formatting of quantities: field length, number of decimals, unit, for example:
!FORM X 7.0 MM
Sum rules and standard headers can also be changed with !FORM.
The way to output a given listclass can be changed with command !LINK:
'dest1' and 'dest2' designate the two possible destinations, for example:
!LINK R W F
output the result list to a separate text window and to the intermediate file.
The primary purpose of the command !GR is to select the output device and control the use of the IOF:
In addition, it provides various other service functions, of which those most likely to be needed are
The !VIEW command handles functions related to the creating, deleting, visibility and properties of views, i.e. independent parts of graphic output.
Other aspects that can be controlled are storing of result, way of reacting to changed window size, and the selection of the window.
A layer is part of a drawing that can be made visible independently of the others. The !LAYER command creates new layers, changes the current
layer (the one receiving the graphic output) and changes the visibility of the layers.
The !ZOOM command shows part of a view enlarged so that it fills the window. The area to be zoomed can be defined in the projection (2D zoom)
or in the ship coordinate system (3D zoom). The 3D zoom can be maintained even if the projection is changed. The 2D zoom can be given by
dragging with the cursor after entering !ZOOM I.
!PAN moves the zoomed area without changing the enlargement. There is an interactive version of !PAN, started by !PAN I.
Command !SEND sends the contents of the current view to the printer. It can also be used for storing the view in the database, in the intermediate
output file or in a file for use by another system:
!SEN TO printer
!SEND TO DB
!SEND TO IOF
!SEND TO system (e.g. DXF)
When sending to the printer, the default is to make an image of the window as it presently looks like, for instance, after setting a zoom. With
option D (drawing), the current drawing is sent regardless of how it is presented on the screen.
When scaling graphics according to the available area (SIZE, SETUP), the area used is normally the whole window or screen. Occasionally it can
be useful to force a drawing into a smaller area, which can be set with !GRPAGE. This command also tells the size of the current drawing area
when given without parameters.
Note: the CATALOG command can be used as an alternative to !SELECT. With CATALOG, the selection is automatically restricted to the
current type of objects.
The purpose of the !SELECT command is to select a set of database objects and return a list of them that can be used for controlling other
functions. The following is a simple example, where all curves in the current version are plotted:
!SELECT TYPE=C
!DO 'PLOT %NAME' NAME=LIST
LIST is the default name of the array produced by !SELECT. In most cases, the !SELECT command is as simple as in the example above,
although its presentation is quite long because of the many options available.
The database used is by default the project database. Other databases can be selected as the first item, either PROJDB (main project database,
the default), AUXDB (the auxiliary project database), SYSDB (system database), NAPADB (NAPA database) or DB1...DB7 giving the database
unit directly.
The other options in !SELECT are either part of the selection criterion or control the way the result is delivered. The selection criterion can contain
three types of criteria:
The last alternative is consistently available in SH only. This so-called quantity criterion is entered after the others separated by a minus sign.
The database criterion is expressed by the general selection syntax presented below, using the quantities NAME, VER, TYPE and DATE exactly
as in the !CATALOG command. Examples:
Note: unless overridden by a VER criterion, the criterion VER=current is assigned automatically. One can also add the option ALL, in
order to include all versions.
The description type is expressed by an integer. However, it is most frequently needed for geometric objects, for which the following symbols can
be used
G geometry in general
P points
C curves
S surfaces
SO surface objects
R rooms
TAB tables
The database criterion uses information in the catalog of the database, and description contents do not need to be fetched. It is therefore much
faster to apply than the others. A strong database criterion makes the searches more efficient when there are other criteria also.
Except when searching for geometric objects, it is necessary to know the database prefix for different types of objects. For this, see below.
Occurrence of given strings can be tested for with the LOC criterion.
LOC=string equality
LOC<string contains
The criterion <, 'contains', is typically useful for searching for strings in macros and it is applied case insensitively (upper case and lower case
equivalent), while the others are intended for isolated string items such as names of compartments in a load case. The following examples search
for macros containing PLOT and arrangements containing R112 or R113:
Objects dependent on given ones can be selected with the REF criterion:
REF=name
REF=(name1,name2,..)
The REF criterion implies TYPE=G, i.e. geometric objects only. The following example selects all rooms referring to HULL or its parts:
Objects can be selected on the basis of the user who wrote it by the USER criterion:
USER=sign
In all these criteria, multiple alternatives can be given as a list in parentheses, as shown in the examples above. A list of strings can be given by a
calculator array using the syntax name(). The reference example could be made this way (under the DEF task):
SELECT *HULL
!SELECT TYPE=R REF=LIST()
The criteria can be negated by adding a minus sign in front of the identifier, for example
The so-called quantity criterion uses values of quantities, as stored within the descriptions. This requires that they are stored each in its own
record, having the standard record number. This principle is applied consistently in SH and IS but not in other parts of NAPA. This criterion is
therefore available under SH and IS only. The criterion is expressed by the general selection syntax, for example
Note the minus sign that separates this criterion from the database criterion.
The following options influence the way the result of the selection is returned.
Option L gives a list of objects at the execution of !SELECT; otherwise, it can be obtained by !VAR LIST LIST.
->array
This option gives the name of the array by which the list of objects is returned, the default of which is LIST. The following example stores a list of
rooms in an array named ROOMS:
If the selection involves multiple versions, another array is created containing the versions, named by adding V in front of the name of the main
array, for example
Sorting is obtained by options SORT (by name) SORTD (by date) and SORTV (by version).
The result of the selection can also be available in a table that can be further processed under table calculation. The option for this is
TABLE=name, where 'name' is the name of the table created. The name can be omitted, then a table named TABLE is created. The options U, D
and T affect the table also. Example:
The date is here in the internal form. The calculator functions DATE, TIME and FDATE, FTIME convert the internal form to more readable forms.
In most applications there is a CATALOG command for listing objects stored in the database and belonging to the application, for example, loading
conditions. Most of these use the general catalog function presented here. There are a few cases where it has not been installed because of
some special service produced by the original catalog function.
This function is in most respects identical with !SELECT, except for the following differences:
the application assigns the database prefix corresponding to the current subject as part of the selection criterion. In the output, the prefix
is not shown and selection criteria are expressed without it.
the output is a listing of objects
if there is a descriptive text available for the object type, it is included
the size of the descriptions can be included in the output
the list of objects is available in an array also, in this case the array is named CATALOG
the catalog can be done from a different project or version
there is a COPY option by which selected objects can be copied to the current project and version
The special logic related to the database prefix is available in !SELECT also, and presented below.
The general catalog function was introduced in Release 94.1. In most cases, it has replaced the old catalog function but in some cases, the
functionality of the old function has been maintained in parallel, most important in the Editor and in task TOC. Usually, the correct function can be
selected on the basis of the options, but in the Editor, the option GEN may be needed to force the use of the new function. The following example
illustrates this and at the same time, listing description sizes:
SB stands for size in bytes. There is the alternative SR, size in records, referring to the number of records needed in the database.
The following example shows the same objects, but the catalog is made under another project.
The option REX stands for 'record existence', and gives the rightmost column where an asterisk shows that an object with the same name exists
in the current project also. This is a useful check before doing copying with option COPY.
A completely general service for copying data is provided by command COPY under TOC. Copying can also be done with the general CATALOG co
mmand. Compared to TOC, the CAT command offers more possibilities to control the result. Copying is bundled with CATALOG because
CATALOG provides exactly the service needed for managing the copying and the CAT function is already installed in a large number of contexts.
Copying is done by adding option COPY. The operation is done in two steps: first a catalog similar to the one listed above is displayed. Before
continuing with the actual copying, permission is asked. This question can be suppressed with option NQ. Example:
The VER criterion is compulsory. By default, only objects not existing before are copied. In this example, the macro BJTAB would not be copied.
With COPY! instead of COPY, objects are copied without regard to previous existence.
Note: for copying geometric objects, the command COPY in DEF is recommended. It provides the service related to referenced objects.
The transparent catalog command has the same functionality as the simple CATALOG command in the TOC task: listing database objects using a
criterion involving name, version, type and date, exactly as in the corresponding part of !SELECT. There is no predefined restriction to the current
version. Example:
Geometric objects are stored in the database under the name used in the definitions. All other objects are identified by a database prefix. The
following list gives some of the most important ones:
DATA* macro
DRAW* drawing
ARR* arrangement
If the prefix ends with (, the name rule includes a ) at the end.
In CATALOG, the prefix is automatically assigned according to the type of objects treated. In NAME criteria, the tests are applied without the prefix
and the output is shown without the prefix (unless option IP, include prefix is given).
In !SELECT, the prefix must be included in the selection criterion if one wants to restrict it to a given type of objects. However, it can be given as a
separate item for giving the same effect as in CATALOG on the selection criteria and the resulting arrays. Example:
!SELECT NAME>DATA*T
!SELECT DATA* NAME>T
These examples are equivalent as far as the set selected is concerned, but if the array LIST contains DATA*T1 and DATA*T2 in the first case, it
will contain T1 and T2 in the latter case.
The service function AD.SUBJECT gives information about database prefixes in various ways, for example
Identify prefix:
The database and quantity criteria in !SELECT are expressed using the so-called standard selection syntax. The same syntax is used in a large
number of other places in NAPA, for example, in TOO, SUBSET in TAB, SELECT in CP, SM, and LD. The criterion is composed of subcriteria,
each comparing the value of a quantity to a given value, range or list of values. For numbers, the normal operators are used, for example:
ZMIN=0 equality
ZMIN=2.5...4 range
NAME=HULL equality
NAME<HULL contains
NAME=(HULL,HULLA,HULLM,HULLF)
NAME=LIST()
In the case of a string equality, the given string may form a filter. A filter is expressed by a string containing wildcards. The wildcard characters
are
Examples:
If a set of strings, for example, names like R11;R20,.., contains a number, the number can be used rather than the string by adding prefix +, for
example
+NAME>10
Several subcriteria can be combined. Criteria written after each other imply AND between them, i.e. all criteria must be satisfied:
NAME>HULL VER=A
In the example, both 'name begins with HULL' and 'version=A' must be satisfied. One can also combine subcriteria with OR:
NAME>HULL OR TYPE=R
!CALC TAN(10.5/LREF)
!CALC VOL('HULL',2.5)
!CALC CB=VOL('HULL',5)/(LREF*BDWL*5)
The calculation can be repeated for all elements in an array, for example
!CALC MOM()=MASS()*X()
where MOM, MASS and X are arrays. A bare copying of an array can be done in the form:
!CALC B()=A()
The explanation of !CALC contains a short presentation of the NAPA specific calculator functions.
If one has interrupted a macro having local variables, their values are no longer available the normal way, but can be examined by adding option *
to !CALC, for example
!CALC I *
Command !VAR provides various services related to the calculator. The following commands set control related to variables:
!VAR ON/OFF do/ do not react to the variable flag (@) in commands
!VAR OFF is the default in the Editor and when running DOC, otherwise !VAR ON.
!VAR DEC=dec number of decimals when replacing numerical expressions with their values
Because of the global effect of !VAR DEC, !VAR NSD, one should normally use the FMT function when a specific accuracy is desired. The
default is NSD=6.
!VAR LIST
Elementary variables are presented as their values, while arrays and descriptions are given a short presentation. The output can look like:
A= 12
B= 77
CATALOG= array, size=15 strings NAME (2875)
I= 12
MATREC= array, size=3 strings MAT (5305)
MT= description TAB*MATERIALS (3937)
NAME= 'DECK1'
RHOREC= array, size=3 reals RHO (5320)
V= 1205.3
Here, A, B, I, NAME and V are ordinary variables. CATALOG is the array created by the general catalog function and MATREC, RHOREC are
records fetched from the description MT. If the record number of an array matches that of a standard quantity, the name of the quantity is added,
but this interpretation is not necessarily correct. The numbers in parentheses are the so-called reference numbers by which arrays and
descriptions are referred to internally.
The option * has the same function as in the !CALC command for accessing variables in an interrupted macro.
An array can be listed with !VAR LIST array. There are options with which the layout and format of the result can be controlled. The following
example gives the same array in two ways:
0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.03 0.06 0.10 0.16
0.22 0.30 0.38 0.48 0.58 0.69 0.81 0.93 1.07 1.20
1.35
1.49 1.64 1.80 2.77 3.74 4.71 5.68 6.65 7.62 8.59
9.56
10.53 11.50
Single variables can be deleted with !VAR DELETE and all variables with !VAR RESET.
Synonyms can be created between, for example, names or arrays and name of functions or names of variables and names of table columns. This
problem is addressed by the !VAR CHECK option. The output of !VAR CHECK can be
The first problem is possible in the table calculation task: if there is a column NAME, the symbol NAME would normally refer to it, but now there is
a variable NAME that has precedence. The latter problem is the result of creating an array named VOL. When entered with an index, it will
formally look like the function VOL.
!VAR CHECK ON
This means that every time a symbol is interpreted, all possible interpretations should be tested and a warning given if there are synonyms.
The command !OUTPUT is provided specifically to be used as output function for macros. It is otherwise equivalent with !TYPE, but while !TYPE
writes to the log (list class 4), !OUTPUT uses list class 3. The output can therefore be controlled independently of the log with command !LINK 3
...;.
There is also the command !INPUT, but this has been replaced with the calculator function INPUT, which is more convenient.
This command sets the tolerance controlling how many points are used for representing curves. Typical values are 0.001...0.01. When making
curves in a specially large scale, one may need a tighter tolerance.
NAPA normally opens and closes automatically the files or databases needed. For special cases, the opening and optionally creating of a file can
be done at a user command. This is possible for both NAPA databases and for ordinary ASCII files. These cases are distinguished by the unit
number occurring in the opening command:
In the first case, the file is designated directly by its name under the operating system. 'directory' means all parts of the pathname except the file
name. In the latter case, 'project' is the name of a NAPA project and the file name is found from the project administration.
'unit' is 1...7 for NAPA databases and larger than 10 for ASCII files. 11, 12 and 13 should be used normally (the same as allowed by !LINK).
AUX: (with a project only): take the auxiliary database, default=the main project database.
The following examples show the use of the !OPEN command in typical connections.
TOC
!OPEN TEMP>P1234.DB 5 NEW
SELECT VER=A
UNIT 5
COPY TO 5
!CLOSE 5
TOC
!OPEN P1234 5 AUX
SELECT NAME>DRAW* VER=A
UNIT 4
COPY FROM 5
!CLOSE 5
Line 1
Line
...
Line 10
The following macro reads the file created in the preceding example.
!OPEN TEMP>TEST 11
@label next
@text=input(11)
@if text<'EOF' then
!TYPE @text
@goto next
@endif
@@ file closed automatically when end fo file reached
The PARSE function has been provided for accessing parts of a text string, and it may be useful when interpreting file contents.
Example
!ENV DISPLAY
ns4:0
!ENV DISPLAY='ns3:0'
The value of an environmental variable can be accessed in a macro by the function MN.ENV(name).
The following commands are less likely to be needed, but they are listed here for information.
This refers to a feature in the database management that is analogical with the list class in alphanumeric output. In the same way as lists are
divided into list classes, data is divided into data classes. The !IOC command allows the association between data classes and databases to
differ from the normal one.
This command makes a temporary modification to the parameter ATTACH in the installation parameters. The use of this parameter allows relative
file names to be fixed to a given directory rather than being dependent on the default directory assigned outside NAPA.
The !VERSION command changes version as far as database i/o is concerned. This can have unpredictable effects and it is allowed only if the
full professional mode is on. Command !VER LIST is available without restriction.
This command was added to allow the enlargement of the database without interrupting the current task. As the restriction imposed on the
database size has been lifted in practice, this command is not needed.
!PREFIX
This is the same function as handled by command PREFIX in the Editor, controlling reading of macros. It is provided as a transparent command
so that the control of the prefix can be done in INIT* and TINIT* macros.
The trace parameter provides a way for the system developer to switch on and off various output functions or alternative operating modes.
This command lists a description, i.e. a database object in terms of its own structural components.
The free storage is the place where descriptions are held at run time. !MAP gives a short summary of its named contents.
In the test mode, the internal error messages between subroutines are visible and a system error does not interrupt the run.
Command !TYPE writes text to the log (listclass 4). The input is printed exactly as given in the TYPE command. There is also the !OUTPUT comm
and which is otherwise similar, but it uses listclass 3, and it can therefore be controlled independently of the log (command !LINK).
11.2. Pause
Command !BELL produces a beep from the terminal or workstation and writes asterisks to the screen. The typical use of this function is to call
attention when a long calculation is finished.
With command !PRF F, you can get access to functions needing full professional mode even if you are not registered this way. This can be
prevented by defining a password (see system maintenance functions).
Note: full professional mode implies administrator rights only when no administrator has been declared in the installation parameters.
With command !PRL, you can make subsequent lists and plots private, i.e. not accessible in SCAN or PLOT by other users. The output is private
by default if the version is private.
The command !ACTIONS was released with pilot status in Release 96.1. It defines actions to be done in given connections called events. The
actions are defined by commands to be carried out, given either directly or via a macro.
Events are not yet consistently available - the implementation has mainly followed that of the graphical user interface. Some examples are:
GM.CHANGE: a room or surface object has been defined, two parameters, name and type (R/SO)
TP.DEF: the DEF command of table calculation has been given, one parameter=key value
The INQ option in the !ACTION command gives a list of registered events, all of which are not implemented.
The primary function of command !TERM is to define the type of terminal used, in case the original decision taken by the monitor was not correct.
This type is defined by the name of a device declared in the installation parameters.
The !TERM command can also be used for instructing the system how to interpret input from a table, either by assigning a predefined type or by
providing a template for the table output. This function is usually not needed in present configurations.
!GM INFO name Gives the same output as the INFO command of DEF. The LQ can be changed by !GM LQ ...; for example, !GM
LQ EC; for extreme coordinates.
!GM GET Makes an object from a different project or version available for graphic output or other output functions.
name/vers/project
!TAB GET name Gets a table into memory and optionally stores a reference into a given variable.
variable
!TAB LIST Lists tables in memory, including a flag on tables changed but not stored.
The commands belonging to the current context are listed. Commands belonging to other
contexts but available via shortcuts will not appear. The command also lists service functions
belonging to a given group.
!COMMANDS !
!COMMANDS id
List the commands of another task than the one currently active, e.g. !COM DOA for listing the
commands of the documentation system. The identifiers of various tasks are obtained by
!EXPL G/GEN.
!COMMANDS keyword
This form lists those commands only that contain the given keyword. With an exclamation mark
added, e.g. !COM PURP!, occurrences in upper case only are checked. Note: if the keyword
has three letters, it may be mistaken for the preceding form, unless an L is added: !COM L
keyword.
!COMMANDS ss.F
List all service functions provided by the given subsystem ss, e.g. !COM LD.F. (Refers to
calculator functions of the form ss.id()). Special cases: !COM C.F: standard calculator
functions, !COM B.F: list of NAPA BASIC commands.
!COMMANDS ss.Q
List all quantities used by the subsystem ss. This service is available for the main application
subsystems (HD,CP,LD,CR,DA and some others). In the release 97.1, the explanations are
only partially written.
!COMMANDS ss*E
!EXPLAIN nr lang
ident: (opt) identification of a command. This must be one of the commands belonging to the current
context.
part: (opt) restrict the explanation to the given part. Available for some commands only. !EXP ident ?
gives a list of parts.
!EXPLAIN ident/group
group: designates the group, either by the task name, by the subsystem name or by name of source
text. The alternatives are listed in the given order. or by the internal name. Command !EXPL
G/GEN will provide a list of internal group identifiers. group=* can be used for designating the
set of alternatives provided by the application (for SH). The source mentioned in the output can
be used as argument in !COMMANDS. The special alternative ? lists all sources where the
given command is found. There may be occasional irrelevant alternatives because all
abbreviation rules are not taken into account.
EXAMPLES
!EXPLAIN THR/GM
!EXPLAIN THR/SUR
Explain the command THR under SURFACE.
!EXPL THR/?
List all groups containing the command THR (or beginning with THR).
!EXPLAIN ss.function
List syntax of the given service function, e.g. !EXPL CP.GAUGE. See also !COM ss.f. Special
cases: !EXPL C.function: explanation for a standard calculator function, e.g. !EXPL C.WLPOS.
!EXPL B.command: explanation of NAPA BASIC command, e.g. !EXPL B.ONERR.
!EXPLAIN ss*name
!EXPLAIN *id
!EXPLAIN Q.id/ss
Explanation for the quantity 'id' of subsystem 'ss'. '/ss' is optional: without it, all subsystems are
checked. This command is new in 97.1, and the explanations behind it are only partially written.
The parameters of a command are displayed. (Subset of the output from the EXPLAIN
command).
!PARAM, command;
Without parameters, this command displays the current date and time. Alternatively, it can be
used for temporary changes to the representation of dates (permanent changes in the INST
task).
UNSP: unspecified, apply the convention used before date options where introduced in rel.
97.1: same as OLD if date before 1.1 2000, else as N.
N: date as YYYY-MM-DD, times as hh.mm. Same as before 97.1 except for four-digit year.
The frame number of a given x-coordinate or the x-coordinate of a given frame number is
returned.
!FRN x;
!FRN #fr;
The so-called dynamic texts are texts represented by a symbol, which will be replaced by the
corresponding actual text at output. This command gives a list of all dynamic texts available
and their current values.
This command lists information about known errors in the current release. The information is
restricted to the current task. Information on general functions is obtained on task level. The
text TEXT*ERR-yy-r must be available in the system data base.
This command lists information about new functions in the current release. The information is
restricted to the current task. Information on general functions is obtained on task level. The
text TEXT*NEWS-yy-r must be available in the system data base.
This command selects objects in the data base according to a given selection criterion, for the
purpose of performing operations on the objects, for instance with the !DO command. The
result is a list of names in a calculator array and optionally descriptions read into memory.
P Main parameters
This is the complete basic form, presented first as a short overview. The parts are described
more closely below.
unit: data base unit given as number or symbol: PROJDB (1), SYSDB (2), AUXDB (4),
NAPADB (7). Default=PROJDB.
DIR=directory: text directory, the result is a list of files in the directory. Only selection criteria
LOC, NAME and DATE relevant. Suffix can also be used.
db-criterion: (opt) selection criterion based on data base attributes (name,version,date,type). A suffix can be
given as the first item, in the form <xxx.
quantity-criterion: (opt) selection criterion based on data in the descriptions (SH-based subsystems only)
prefix: (opt) data base prefix e.g. LD*CON(, TAB*. The effect is to restrict the selection to names
beginning with the given prefix, while the prefix is removed from the names before applying
other name criteria and returning the name in the result. The prefix must end with * or (.
db-criterion: (opt) selection criterion based on data base attributes (name, version, date and type), same as
in !CAT command. If no version criterion is given 'VER=curr.version' is implied for units 1, 3
and 4 (project data base). The version(s) from which the selected descriptions are read are
stored in an array. Note: a strong db-criterion speeds up the search considerably, the other
criteria require whole descriptions to be read from the data base.
quantity-criterion: (opt) criterion based on values in the descriptions. This can be used in SH-based subsystems
only, and the quantities that can be used depend on the context. The form of the criterion is the
standard one (see !EXPL SEL/GEN).
Otherwise as above, but three optional criteria added. Note the order.
ref-crit: REF=(name,name,...): selects geometric objects referencing any one of the given names. The
names can also be given by a calculator array in the form REF=LIST(). DB-criterion TYPE=G
implied. -REF...: reversed criterion. name='#SYSTEM' gives objects depending on a frame
system (incl. WEB, LONG, VERT).
LOC<(str,str,...): locate a string CONTAINING a given one (case insensitive match) The strings
can be given by a calculator array in the form LOC=LIST(). -LOC...: reverse criterion.
user-crit: USER=(name,...): selection according to user who last wrote (not recorded by releases earlier
than 95.1). -USER=...: select other users.
O Options
->array: (opt) name of array into which the list of names selected is stored, default is LIST. This name is
also used for later referring to the selection, see below. The array where the list of versions is
stored is obtained by adding V in front, e.g. VLIST.
options:
SORT=qnt: sort the result according to the given quantity as found in the descriptions
(SH-based subsystems only).
LL: when using the LOC criterion, list also strings matched. When a match is found, the name
of the description is also listed (note: AFTER the strings).
ALL: cancel default that version=current (also canceled by criterion of the form VER=ver or
VER=ALL).
U: make the user who wrote the selected objects available as array Uxxxx, where xxxx is the
name of the name list.
TEXT: similarly for descriptive texts, array Txxxx. If 'prefix' is not given, the source record
number must usually be given in the form TEXT=nr, e.g. TEXT=1640 for geometric objects.
This form is in all respects similar with the preceding one, except that a subset is selected
within a set found in a preceding select.
array1: gives the name of the array containing the given list of objects, corresponding to the parameter
'array' in the preceding SELECT command. array' and 'array1' must be different.
options: as above
E Examples
EXAMPLES:
!SELECT NAME>FR ->CLIST
!SELECT FROM CLIST X>50 ->CLIST2
A subset from the preceding search is selected and the list is stored in array CLIST2. Select
descriptions, the name of which begin with FR. Store the result in array CLIST.
Select descriptions named LD*CON... (loading conditions), containing one of the given texts as
part of some string (case insensitive). The latter alternative returns names without the data
base prefix as in LD commands.
Both forms select figures from the system data base, but in the latter one the prefix is explicit
and the NAME criterion selects only names containing FIG in remainder (e.g. FIG*FIGURE),
while in the first form, the NAME criterion is redundant.
!SELECT NAME>SHS*STRIP_SP5_
Selection of SHS sublevel directories with ship speed equal to 5 knots. Name of the main level
directory is STRIP.
Selection of SHS sublevel directories including calculation results in head waves, i.e.
HEADING = 3.14159 radians = 180 degrees. Name of the main level directory is STRIP.
The subset defined by the SELECT command will be used to control the CATALOG, COPY,
CHECK, MEND, DUMP, DELETE, TIDY, RSC, COMP and RDE functions.
criterion: selection criterion in the usual syntax (see !EXPL SEL/GEN). The selection can be based on
NAME=description name, VER=version, TYPE=type, DATE=date and USER=user. For TYPE,
the special symbols C=curves, S=surfaces, R=rooms, SO=surface objects, G=geometry and
TAB=tables are available.
R: select only descr. to which the current user has read access. -R: exclude these. Similarly
E=execute rights, W=write rights. Similarly E=execute rights, W=write rights.
D: include descriptions marked as deleted (but not yet overwritten). -D: select ONLY deleted
descriptions.
EXAMPLES:
SELECT, VER=A, NAME>DATA options
Select descriptions with version=A,B or C, the name of which begin with HULL. Show only
those to which the current user has no read access.
Select descriptions newer than the given date and with type in the given range (1001=curves,
1003=surface,1004=rooms).
unit: (opt) data base unit, numder or id: PROJDB (1), SYSDB (2), AUXDB (4), NABAPDB (7).
prefix: (opt) data base prefix (e.g. TAB*). Works as selection criterion NAME>prefix, but other name
criteria are applied without the prefix. The prefix must end with ., * or (.
selection: (opt) selection criterion as in task TOC, using NAME, TYPE, VER, DATE and USER. For
TYPE, the special symbols P (points), C (curves), S (surfaces), R (rooms) or SO (surface
objects), G (geometry) and TAB (tables) are available. ALL=no restriction.
U: (opt) list name of user who last wrote (not recorded by releases <95.1).
A: (opt) show current access rights: R=read, E=execute, W=write. r,w=read, write access because
no restrictions defined.
EXAMPLES
!CAT NAME>DATA* VER=A macros in version A
!CAT DATA* VER=A equivalent with the preceding
!CAT TYPE=R VER=A SORT rooms in version A, sorted
!CAT DATA* NAME>DA macros named DA... (e.g. DATUM)
!CAT AUXDB DRAW* NAME>DECK drawings named DECK...
Without other parameters than the options listed below U, the simple catalog function is used,
(the only one before rel. 96.1). Otherwise, the general catalog function is used, having the
options presented in !EXPL CAT/GEN.
CATALOG options
Start the simple catalog function. The sorting and selection given by the SORT and SELECT
commands are obeyed.
options: (separate items). Note: unknown option causes the general catalog function to be used.
A: show access rights (of the current user): r=read, w=write, e=execute. Capital letter=from
explicit restriction.
LIST: record the names in an array named LIST. The array will be reused at the next call with
this option or at exit from the TOC task. The corresponding versions are recorded in the array
VLIST.
Starts the general catalog function. The selection given by SELECT is used unless a
db-criterion is given in the command. Sorting options must be given in the command. This form
works as catalogs in other places but does not any of the functions specific for the TOC task.
prefix: (opt) restrict the catalog to names beginning with the given prefix. The effect is otherwise the
same as NAME>prefix, but in other criteria involving the name, the prefix is removed before
applying the criterion. The prefix must end with * or (.
EXAMPLES
CATALOG
Use the general catalog function. Record the size in bytes and store the result in a table.
!CALC var=expression - *
var=: (opt) the result is stored in the given variable. The variable can then be used in later !CALC
commands. Command !VAR CHECK can be used for checking whether there are conflicts with
symbols used for other purposes.
expression: any valid calculator expression. As far as it contains mathematics only, remember the following
rules: - the multiplication operator must not be omitted: a*b instead of ab - powers are
expressed as functions: EXP(a,b) instead of a**b. a must be >=0 unless b integer.
*: (opt) apply temporarily the variable environment of the macro interrupted (after using command
Q in step mode). The expression can contain variables, functions and special symbols as
described below.
!CALC array()=expression
array: name of array. Be careful with adding the syntax (); otherwise the array name becomes
redefined to be an ordinary variable.
!CALC A()=B()
!CALC *quant=expression
The effect is otherwise analogous with the preceding case, but the result is stored as a
standard SH quantity in the current source description. Any preceding values of the quantity
are overwritten. (See also command *VAR SH ...)
Examples:
!CALC ATAN((10-8)/(5-3))/RO -> 45
!CALC Q=16
!CALC MIN(Q,SQRT(Q),10) -> 4
!CALC FMT(Q,2) -> '16.00'
!CALC CNC('FR',FMT(4.5)) -> 'FR4.5'
!CALC VOL('HULL')
!CALC VOL('HULL',ZDWL,0,-2)
!CALC L=LL(R101,3)-UL(R101,3)
!CALC A=L*L
!CALC (IDATE(951224)-IDATE)/SPD days until Christmas
!CALC CPP('R100','PERM') permeability of R100
!CALC PP('HFO','RHO') density of substance 'HFO'
!CALC D=DB('TAB*DEMO') get table 'DEMO'
!CALC R=REC(D,'COL1') get column 'COL1'
!CALC R(1) get first value of the record
!CALC DIST('HULL','(0,0,0)') distance to point
This command is otherwise equivalent with *TYPE, but the the result is written into listclass 3,
allowing it to be output independently of the log (as used in *TYPE)
!OUT line
line: line to be output. It is output exactly as given, except for variable replacement.
This command controls the function of the calculator and handles some related services.
!VAR control
ON/OFF set variable handling on/off This option specifies whether the system will react to the
@-character in commands. Initial default=ON, except in the editor and document system,
where variable handling is switched off.
DEC=ndec: controls the accuracy of numeric values in variable substitutions by specifying the
number of decimals. If ndec is given with minus sign, it will be treated as an upper limit rather
than a fixed value. For the initial value, see next alternative (NSD). NOTE: in most cases,
formatting of output should be done with the FMT function.
NSD=nsd: alternative to DEC, giving the number of significant digits. The initial formatting set is
equivalent with NSD=6. Example: the number 1234.56 output with different settings:
DEC=3: 1234.560
DEC=-3: 1234.56
DEC=-1: 1234.6
NSD=3: 1230
SH,sel: controls interpretation of assignments in *CALC command: OFF=result always normal variable,
R=result SH quantity if name of a standard quantity, ON=assign an SH quantity if one with that
name already existed, otherwise normal variable (default=ON).
TILDE,c: Make c the replacement for tilde (=the character used as wildcard in the editor and as
special character in the TYPE command)
STD: Set both the variable flag and tilde to their initial defaults.
!VAR RESET T
Delete variables.
T: (opt) delete only those variables ADDED after last task entry, default=delete all.
Delete the given variable. With name=COMMON*id, the common area 'id' is deleted. NOTE: if
the variable refers to an array created by the ARR function, the array itself is also deleted.
Without the parameter ON or OFF, this command lists symbols with multiple definitions,
according to their interpretation in a calculator expression. Since the meaning of a symbol may
be different if it is entered with parameters (or index), the list is made for both cases separately.
With parameter ON or OFF, a permanent chekc mode is enabled or disable. With !VAR
CHECK ON, every time a symbol is interpreted, all possible interpretations are checked, and in
case of ambiguities, a warning is given.
name: (opt) name of array. If omitted, the values of all variables are listed.
FORM=form: specify format in the form f.d. Default=7.2, i.e. field=7, number of decimals=2.
RES: write into the result list (listclass 1), default=log (4)
+: (opt) list also variables not accessible because of @LOCAL or @GLOBAL specifications. The
names of these are listed in parentheses.
*: (opt) apply temporarily the variable environment of the macro interrupted by command Q in
step mode. This option is intended as a help when testing a macro using local variables.
Special functions.
This command assigns or lists the tolerance used when making sections of surfaces defining
curves. The tolerance defines the maximum difference between the polygones created the
ideal curve.
!TOL, tol;
tol: (opt) new value of the tolerance. If omitted, the current value is listed.
NOTE: the tolerance used when making calculation sections is five times greater.
The command sets the end correction mode of integration on/off. The default mode is assigned
in the reference system.
!ECO ON
!ECO OFF
The command is used for temporary changes of the curve generation method permanently
stored in the reference system.
!GMTP sel
M2: use newer interpolation method, (same is in XYZ curves), implies SPLINE
O-STD: as STD, but use old implementation (before 99.1), similarly SPLINE, M2
The command changes the tolerance used in searching the equilibrium floating position of the
ship and the height of the liquid level in a room. The default value is 0.001 unless changed in
the reference system. The greatest accepted value is 0.02 and the least accepted value is
0.00005. Normally, sufficient accuracy is achieved with the value 0.001. The maximum relative
error in volume is equal to the tolerance and the greatest absolute difference between the
center of gravity and the center of buoyancy is equal to 0.05*tolerance*length.
TRACE: (opt) set tracing on/off. The symbols shown by tracing mean: dDISP = (DSP-DSP0)/DSP0,
relative difference in displacement where DSP is the current displacement and DSP0 is the
wanted displacement; dCG = CG-CB, absolute difference between the center of gravity CG
and the center of buoyancy CB measured horizontally in the direction of the stability axis;
dMOM = MOMW-MOMB, difference between the moment of weight MOMW and moment of
buoyancy MOMB (grounding); T, current draught; TRA, current rotation angle in the direction of
the stability axis (trim).
!INTOL
This command concerns quantities involving the waterline area (e.g. WLA, LCA, KMT), which
will be calculated by actually making the waterline sections, instead of using the normal
calculation sections. This gives accurate results, but it places greater demand on the
correctness of the calculated object, and is slightly slower, but not so much as when using
ECO. This option has no effect if the hull is represented by a surface and the heel is not zero.
The selected method is valid in the task it is given, exit from the task restores the default value
(=OFF).
!SECWL ON/OFF
The command closes a given file The file names are shown as primarily entered. To relative file
name, the corresponding absolute one is shown in parentheses by adding the current directory
!CLOSE unit
This command opens a file, either a text file or a data base file. It allows access to data in other
ways than provided by the standard system functions. The special case !OPEN LIST lists the
names of the open data base units.
directory>filnam: designates a file in the given directory. Note: if the file is designated by a path
name with many components, apostrophes must be used in order to give this syntax, for
example '/napa/work'>file1
'path': path name directly. The apostrophes distinguish this alternative from a project name.
1...7: unit number in the DB sense. The file will be made available as data base file
options:
NEW: create a new file. There must not be an existing file with the given name. If unit=1...6, the
file will be formatted as a NAPA data base file.
DIR=size: size of directory for new data base file (e.g. 20...500, default=100), relevant when a
new data base file is created.
AUX: open the auxiliary file of a project (in connection with a project name only)
Examples:
!OPEN P1234 5
!OPEN TEMP>T$0001 11
!OPEN PROG>STSYSDB 5
!OPEN 'c:/napa/pr/projectx.db' 6
!OPEN LIST
Special case: list currently open data base files. The IOF appears as unit 8.
!ENV name
!ENV name=value
This command changes the association between dataclasses and files, and the versions used
(not for normal use).
dc: dataclass. If dc<1000, it concerns ranges of dataclasses, as for instance dc=22 concerns
dataclasses 2200...2299
This command changes/displays the file name components added in front of the directory
when file names are collected. For a closer description see !EXPL ATT/M75.
!ATTACH name
The version used when reading and writing from the data base is changed. This command is
provided for test purposes and for special cases and requires full professional mode. Normally,
the VERSION command at TASK-level should be used, the transparent command changes the
version 'behind the back' of the current application, and may have unpredictable effects.
!VERSION, ver;
!VERSION LIST
List the versions in the current project. The default version is flagged with an asterisk.
A given description or record is listed in the general format for description listing.
!DML, descr/vers/unit
/vers: (opt) version. If the version is given, the description listed is always one from the data base,
otherwise the description is taken from the free storage, if it is already there.
!DML refnr
A list is produced, giving the descriptions and records currently in the free storage.
!MAP options
options:
Data telling the extent of the free storage usage are displayed.
!STAT sel
sel: (opt)
GS: as G but without listing. Useful if there is an integer array named DMSTAT, which will
receive the result.
U: list unnamed descriptions not accounted for separately, grouped according to the first record
number. If there are integer arrays named DMID and DMSTAT, the result is returned in them.
Option N suppresses the listing (!STA UN).
The command controls various aspects related to testing. The basic function is control display
of internal error messages.
!TEST, trace;
Switch display of internal error messages. on. !TEST OFF cancels this setting.
!TEST DM ON/OFF
This function controls testing of pointers (reference numbers) used by the memory
management. ON=complete test, OFF=test only that >0. Default=ON.
This command concerns services related to system development and should not be used in
normal work. The basic function is to assign a value to the TRACE variable which may trigger
debugging or other functions. In addition it controls some other special functions.
!TRACE, trace;
!TRACE FS
Special case: check the state of the free storage after every command. Canceled by !TRA FS
OFF.
!TRACE OBJ
Stronger version of the former: also check the state of the object administration.
!TRACE OFF
This command simply writes the input record in the log. The only processing done is variable
replacement. It is intended as output command for NAPA BASIC programs. See also command
!OUTPUT.
TYPE text
The command activates the 'bell' of the terminal, if any. It can be used for drawing attention
when a time consuming operation has been finished.
!PAUSE pause
PAUSE time
PAUSE ONERR W
This command makes the system ring the bell and pause at errors. The optional parameter W
makes the system wait for permission to continue. !PAUSE ONWARNING extends the effect to
warnings. The command is canceled with !PAUSE OFF.
The so-called full professional mode is required in some functions, where the user should be
aware that he is doing something out of ordinary use (e.g. writing into the system data base).
Command is meaningful in the context of non-adminstrator users only.
!PRF sel
sel: ON,OFF or F:
F: full professional mode, allows access to restricted commands. If desired, the use of this
option can be restricted by replacing the symbol F with a password stored in the system data
base. Note: full professional mode implies administrators rights only when no adminstrator has
been declared in the installation parameters.
This command controls whether list and plots are marked as private in the intermediate file, i.e.
accessible for the owner only. Without parameters, the current state is given. The private mode
is checked when a list or plot is started.
!PRL ON/OFF
The commands starts a subprocess for running a command under the operating system.
command: command with optional arguments (one string). Special case: !: exit and enter commands
manually.
option: (opt)
B: store the command in script, run the script, default: present the given command directly.
EXAMPLES
!SPAWN 'fgrep abc temp/*'
!SPAWN !
Exit to the operating system for manual entering of commands. Return by typing 'exit'.
Installed for test purposes. Starts a process and establishes communication channels
connecting its standard input and output. Output to the process takes place by directing output
to destination 15 (e.g. !LINK 3 15). Input is done with the calculator function INPUT(15).
The following functions are provided for test purposes and to give access to some auxiliary
functions in connections where the corresponding ordinary GM-functions are not available.
OPER operation
------------------------
operation:
RESET: clear all objects from memory. Allowed on monitor level only. When needed again, the
objects will be read from the data base. Note: objects referenced from tables in memory will be
re-read, can be avoided by doing !TAB RESET first.
REMOVE: remove the given object from the run time memory
parameters: name of object(s) for GET, DES, INFO, normal LQ parameters for LQ; none for other
alternatives.
TOL tolerances
---------------
ATOL, BTOL and CTOL have an effect on all intersections of patch and facet surfaces. ATOL
and CTOL are used in detection of knuckles to define if a point is duplicated or not. The point is
duplicated if the two values connected to a single point differ more than tol.
LTOL: tolerance controlling how close to the limit a surface is intersected. A coordinate closer
to the limit than 'tol' is changed to be at the distance 'tol' from the limit inside.
RTOL: curve combination tolerance in room sections The value DEFAULT can be used to reset
the program default 0.05*MAX(0.0025*BDWL,0.002).
val: (opt) value of the tolerance. If this is not given, the current value is displayed.
DEC,n: Sets maximum number of decimals used for the projection in DES <curve>. n=number
of decimals, default=3.
GMTP,method: Define/inquire the curve generation mode. The changes are valid for current
run only or until task REF has been used.
UNDO,n: Sets the size of the UNDO buffer, i.e. how many definitions back the UNDO command can be
used. n=0 disables the UNDO function. Default=20.
OVR,mode: Sets options controlling what objects may be overwritten by geometric definitions.
Alternatives: OFF: no restriction, STD: overwrite objects of the same type (default), MAC: allow
overwriting by macros, NONE: no overwriting allowed. These rules can be overridden by option
! in the definition command.
AU: controls the automatic updating of surfaces when curves or points have been changed.
!GM AU ON; enable (default), !GM AU OFF; disable. Restoring AU ON may not affect objects
already in use.
----------------
Define method of room sections. As a default all new features are in use. For safety, access to
some methods of the previous releases is available.
N: new method for intersecting and defining the orientation of two polygons (default)
NL: new method for defining the location of a polygon with respect to another polygon (default
since REL951)
NA: new method for defining the orientation between two polygons if the intersection angle is
very small (default since REL951)
ND: new method for handling the tolerance in curve intersections (default since REL971)
O: old method for intersecting and defining the orientation of two polygons
OL: old method for defining the location of a polygon with respect to another polygon
OA: old method for defining the orientation between two polygons if the intersection angle is
very small.
OD: old method for handling the tolerance in curve intersections. The intersection can be an
approximation even if an exact intersection point is available. The accuracy is within the value
shown by the command !GM RTOL.
D: dump the operands related to the cases shown by C or C2 into the listclass 3
M2: (default) eliminate self overlaps in the case of the MERGE function in the definition of
surface objects
M3: eliminate self overlaps always when parts are added or reducted
----------------------------
Define options for the wireframe sections. An option that has been defined by the !GM WSEC
command overrules the corresponding option of the surface (defined by the WO command).
alternatives: (opt) parameters of the option see !exp WO/G40; or WO/G40 LIMIT; etc.
Examples:
!GM WSEC LIMIT Y>0
!GM WSEC SCOPE G ;** intersect all general surfaces
(patch, grid, wireframe) by the
wireframe routines.
!GM WSEC SORT OFF ;** do not use any ordering data
!GM WSEC SORT RESET ;** set program default of !GM WSEC SORT.
Note: WO SORT definitions of the surface
are used
!GM WSEC RESET ;** set program defaults of all options
!GM WSEC LIST ;** show current values of the options
!GM WSEC ;** show options defined by !GM WSEC
--------------------
The feature is used in the direct links to SB and TRIBON to reduce the number of linked points.
By using '!gm arctol ...' and 'id spline' the feature can be tested in the standard Napa also.
All sections from patch surfaces are converted into the circle representation with the given
tolerance tol1. If tol2 is given the circle representation is converted back into the polygon
representation with the tolerance tol2. Otherwise only endpoints of the circle segments are
stored to the polygon records of the curve.
tol1: the distance between the circle representation and the surface is less than tol (0= default i.e.
the feature is not used).
tol2: (opt) tolerance between the circle representation and the resulting polygon representation.
(default: only endpoints of the circle segments are stored)
------------------
method:
M1: overlapping branches are not expected, but a a check and a possible elimination is asked
by the intersection routines e.g. when the intersection goes along an edge of a patch.
M2: check of overlapping brances is always done. The check is based on the endpoints of the
branches
---------------------------
Pilot level. Fetch object from a separate source. The object is available as name*version or
name*project. Any referenced objects will also be fetched. The preparation of a general surface
must be up to date. The function should be fairly safe with simple objects like the hull but there
is no guarantee that it works for objects depending on their environment in a more complex
way. The names resulting from the name rule above must not exceed 24 characters.
name: name of object. In the form name*flag, the object 'name' will be available with the given name
rather than using the rule given above.
vers: version
List x-coordinates of calculation sections. Step discontinuities are returned as two sections 4
mm apart. Similarly !GM DISC: list discontinuities.
array: (opt) if given, the list is returned as a calculator array with the given name. NOTE!: the array is
reused at the next call (regardless of the name).
EXAMPLES
!GM DES HULL list definition of 'HULL'
!GM LQ ALT list alternatives for output quantities
!GM LQ VOL select volume oriented quantities
!GM INFO *ARR*DECK1 info for all rooms in 'DECK1'
!GM GET HULL/A/P1234 get the hull from A/P1234, available as
HULL*P1234.
This command is made in order to provide certain functions that may be needed in special
cases, when the required function is not available the normal way. It is not intended to be used
normally, and the effect on the application is not guaranteed to be the desired one in all cases.
Makes given arrangement current. Normally, the ARR command of the current task should be
used.
Defines the colour filling standard for use in automatic colouring of objects (see also FILL/DR).
Without further parameters it tells the one currently assigned, including the control quantity.
table: name of control table, default prefix=COLOUR*. Special case: CONT*id: use filling standard in
old format (<89.1). !SM FST CAT gives a catalog.
/column: (opt) column containing the fill codes, default first applicable.
source: (opt) source for data, full table name. Default=from current arrangement.
To force using the system data base, for a table that also exists in the project data base do first
!TAB GET COLOUR*id/SYSDB.
table: name of control table, default prefix=PEN*. !SM PST CAT gives a catalog.
/column: (opt) column containing the fill codes, default first applicable.
source: (opt) source for data, full table name. Default=from current arrangement.
!SM PAR id
This command sets the table PAR*id as the source of properties of substances (e.g. loads).
Default=the table referenced in the current arrangement. This possibility has been added for
special cases, and its use may cause contradictions.
Make the given reference surface arrangement current. The reference surface arrangement is
a new concept in rel 2006.
!SM RESET
Make structure arrangement current. The only function presently using this information is
selecting filling or pen code according to structure properties.
Read a table into the run time memory. The main purposes for the function is to get access to a
table in a macro or to read a table from a nonstandard source.
/vers: (opt) version, default=current version. It is the user's responsibility to take into account that any
results obtained do not originate from the normal source.
/DBn: (opt) data base unit or name of project. DB2=system data base. Same comment as above.
var: (opt) name of variable for storing the reference number. With this variable, access to table
columns can be made with the REC function. As a special case, var=S makes the table the
default source of the EVAL function.
O: (own) if the table is read from a foreign source, option O makes it treated as an 'own' table of
the project (see document)
!: (opt) force reading from the data base - do not use a copy existing in the run time memory.
When given version and project, the reading always takes place from the data base.
This command initiates the update of tables. It is intended to be used in cases when the
automatic update for some reason does not work.
name,name...: (opt) names of tables to be updated (tables originally affected by some change, the dependent
ones will be automatically updated). Without the names, the tables will be updated according to
the automatically recognized changes.
!TAB RESET
Delete all tables in the run time memory. Without option !, the command can be used on task
level only - in other cases one must be sure that there is no active task using any table. Note
that arrangements, among other things, are tables.
Geometry (GM)
Geometry (GM)
Purpose (GM)
General about geometric objects (GM)
Definition of curves (GM)
Definition of general surfaces (hull definition) (GM)
Hull Surface Editor (GM)
Hull Surface Editor technical details (GM)
Transformations (GM)
Special surfaces (GM)
Definition of rooms (GM)
Geometry Editor (GM)
Definition of surface objects (GM)
Special definition functions (GM)
Parametrization of geometric definitions (GM)
Commands related to definitions (GM)
Service functions and events (GM)
Lofting tables (GM)
Link functions (GM)
Panel models for CFD calculations (GM)
Panel generation (GM)
Auxiliary functions (GM)
Vocabulary (GM)
Purpose (GM)
The geometry subsystem (GM) handles definition, modification, drawing and other operations on geometric objects. Most of the geometric objects
relevant in the NAPA context are those describing the shape of steel structures in the ship (hull, decks, bulkheads) and the volumes formed
between them (tanks, compartments).
The division of work between the subsystems of NAPA is based on the idea that the geometry subsystem handles geometric objects as such,
without being concerned with their role as part of the ship or with non-geometric properties. Combining the geometric components into a
description of the ship and adding non-geometric properties is done under the ship model subsystem (SM). For NAPA Steel, the geometry
subsystem provides the moulded surfaces which are the basis for the steel definitions.
The data created under the GM and SM subsystems form the basis for the application subsystems of NAPA, where various analyses are done.
Link functions allow transfer of the result to other systems.
See also NAPA User Meeting workshop papers about geometry and hull form.
Table of Contents:
1. Types of objects
1.1. Surface objects
1.2. Rooms
1.3. Surfaces
1.4. Curves
1.5. Points
2. Functions
2.1. Direct definition
2.2. Modification of existing objects
2.3. Drawing functions
2.4. Listing functions
2.5. Link functions
2.6. Generating FEM models
2.7. Generating panel models for CFD calculations
3. Organization into tasks
4. Overview of the user's instructions
4.1. Hull definition
4.2. Special surfaces
4.3. Rooms
4.4. Surface objects
4.5. Commands and service functions
4.6. Functions for exporting geometry
5. Separately priced functions
1. Types of objects
The geometry subsystem knows five types of geometric objects. The simplest one is the later introduced point object, the others are presented by
the figure below:
The steel constructions such as hull, decks, bulkheads are in the NAPA context modelled without thickness, and can therefore be represented as
surfaces. The hull is normally directly defined as a surface, but for the others, the so-called surface object is the facility provided for modelling
their shape. A surface object is formed by delimiting a bare surface, as presented below, by other surfaces. The steel constructions can also be
defined by directly constructing surfaces with the correct extension, but it is usually much easier done by using a surface object.
1.2. Rooms
From the functional point of view, the ship has to be described as a set of spaces. For this purpose, the room object is provided, defined as a
closed volume delimited by surfaces, and is used to represent the shape of tanks, compartments etc. (The word 'room' is used for lack of a better
one).
1.3. Surfaces
'Surface' refers here to the direct result of surface definitions, based on curves, points and similar data, in contrast to surface objects obtained by
operations with surfaces. The hull form is usually described directly as a surface in this sense, otherwise surfaces can be considered the
geometric raw material, by which rooms and surface objects are created.
The surfaces are divided into general (or free form) surfaces and special surfaces. In principle, these differ only in the way they are defined, but in
most cases, general surfaces are used for the hull form, while the special surfaces are sufficient for other purposes.
1.4. Curves
Curves can be used to represent independent objects such as profile, margin line, masts, sounding tubes etc. Most curves, however, are used as
part of the definition of surfaces such as the hull form.
1.5. Points
Point objects can be used for representing named places in the ship, that can be defined with respect to other objects. Their most important role is
for helping curve and surface definitions.
2. Functions
The central function of the geometry subsystem is creating geometric objects. The result is made available for human use in the form of drawings
and listings, for internal use within NAPA by subroutines and for use in other systems by link functions. More specifically, the following functions
are provided:
ROOM BOX
LIMITS 0 10 0 5 0 8
This means that an object is changed by some operation. The main functions in this category are
transformation of general surfaces (hull forms), allowing change of main dimension, displacement and lcb.
editing of surfaces, changing of general surfaces by commands for moving points etc.
There are drawing functions for supporting the definition process and producing graphic representations of the result. There are drawing functions
for drawing objects stored in the data base, drawing of intersection curves and drawing of various graphic elements (texts, scales, coordinate
grid).
The listing functions provide information about geometric objects in various forms (dimensions, coordinates, catalogs etc). A special case is the
lofting tables.
The link functions produce descriptions of geometric objects that can be transferred to other systems.
This is in a sense a link function, since the task is to transfer geometry for use outside NAPA, but it includes definitions and processing of its own.
This function may also include data from NAPA Steel.
This function is analogical with the preceding one, but the models generated and the target systems are different.
DEF all definition functions, auxiliary functions related todefinition and link functions
DR general drawing functions. It also serves many other tasks. It is presented more closely in the chapter 'Graphics and drawing'
The definition functions (DEF), the drawing functions (DRAW) and the definition functions of the ship model (SM) belong to the same task, so that
one can switch between these without losing the working context.
More strictly, this subject concerns definition of surfaces of free form, and these may be needed for other purposes than the hull form. This subject
is further divided as follows:
definition of curves
Curves may be needed for many purposes, but mostly, curves are defined for use in surface definition. Point objects are included in this
part.
definition of general surfaces
This subject covers definition of surfaces of arbitrary form, defined from a grid of curves.
the hull editor
The hull editor is an interactive tool for handling the tasks presented in the two preceding chapters.
transformations
Transformations mean modifying a surface by some general instructions, for example, increase the volume, rather than acting directly on
the components of the definition.
parametrization
A parametric hull definition means that a possibility for systematic changes is built into the definition in the form of adjustable parameters.
'Special surfaces' means surfaces with some special property that simplifies its definition compared to general surfaces. In practice, these
surfaces are mostly used for the inner surfaces in the ship.
4.3. Rooms
A 'room' is the object type by which the geometry of compartments is represented. Rooms are defined by their bounding surfaces.
A 'surface object' is a surface obtained by topological relationships between surfaces. Surface objects are used for representing the geometry of
structures.
The explanations to the commands of all the preceding functions are collected into an own chapter.
The geometry subsystem is presently not consistently provided with service functions. Those that exist represent functions of varying type, and
presented in an own chapter.
The following subjects include various forms of producing data for use outside NAPA.
Within the geometry subsystem, the objects are handled as pure geometric entities, while their purpose and other properties are handled
elsewhere, mainly in the ship model (SM) system.
Table of Contents:
1. Naming
2. Storing objects in the database
3. General about definition functions
4. UNDO function
5. Dependence between objects
6. Dates of objects
6.1. Definition date
6.2. Logical date
6.3. Database date
7. Combined objects
8. Connections to the calculator and NAPA BASIC
9. Orientation and sides
10. Reference coordinate
11. Transformations
12. Handling objects at run time
13. Command !GM
14. Pilot level functions
15. Fetching objects from other projects and versions
1. Naming
Every object has a name by which it can be referred to.
The characters forming the name should contain only letters, numbers, decimal point, underscore, plus and minus. In most cases, other
characters will work, but there is the risk of confusion with name rules used for other purposes. Only the asterisk strictly forbidden and refused by
the definition procedures. In the names of surfaces, plus and minus should be used with caution, because using the reference coordinate (see
below) in the form #name, #name+d or #name-d will cause ambiguity.
Otherwise, the system imposes no rules regarding the names, and it is the responsibility of the user organization to adopt name rules that will help
to manage the objects stored in the database.
For certain objects such as the hull form used in various contexts, there are defaults that the system will apply unless otherwise specified. These
standard names are stored in the reference system, where they can be changed if needed. When creating a new version, defaults for these
names are loaded from the installation parameters. The parameters of the reference system are described in more detail in the Monitor document.
!CAT NAME>HULL
When making selections, it may be useful to know that the description types assigned to the descriptions of geometric objects are
1001 curves C
1003 surfaces S
1004 rooms R
The symbols P, C, etc are the values accepted for TYPE in database selection, instead of the integers.
CURVE STEM
Then follow the commands providing the actual definition. The prompt is changed to indicate that a new command environment is entered.
Usually, there is a varying number of commands possible, and there is the problem of knowing when the definition is finished. If desired, one can
finish the definition explicitly with the command OK; otherwise, the definition is considered finished when a command not belonging to the context
is encountered. With the command SKIP, an ongoing definition can be cancelled. As long as the prompt has not changed back to 'DEF', the
definition is not finished, and it can be cancelled with SKIP.
When running a macro, the end of the macro implies the end of the definition. This also concerns running the text in the Text Editor.
Note: transparent commands are carried out 'behind the back' of the application, and they do not finish a definition. Therefore, do not
use !CALC with a function (e.g. VOL) concerning the current object until the definition is finished.
The result of the definition is automatically stored in the database. If there is already an object with the same name, the standard rule is to allow
overwriting it provided that it is of the same type as the new object, for example, both are surfaces. Other rules can be set with the command !GM
OVR, the alternatives being
The alternative MAC means that objects can be changed with the combination EDIT + ADD but not by a directly entered definition.
The option ! in the definition command forces overwriting, for example, CURVE C1 !:.
4. UNDO function
An object overwritten by a new definition can be restored with the command UNDO. Without parameters, UNDO cancels the last definition, but
optionally it can restore earlier versions of the object, however, not older than the last entry to the GM task. There are auxiliary functions by which
objects in the UNDO buffer can be listed or brought to the Editor:
The UNDO function is based on saving the external definition of the objects overwritten. By default the 20 last overwritten objects are maintained
in the UNDO buffer, but the number can be increased by the command !GM UNDO n; For a permanent change, this command can be installed in
the INIT*SYSTEM (or INIT*UI.SYSTEM) macro.
Note that the UNDO function covers only overwriting: to cancel the definition of a new object, use UNSAVE.
Objects can be created by other functions than those of task DEF, for example, under MC or in NAPA Steel. These cannot be restored by the UND
O command, but their definitions can be accessed by the auxiliary functions listed above.
Curves and non-combined surfaces are stored in the database as self-contained descriptions. This means that any dependence on other curves
or surfaces is taken into account in the definition process, and subsequent changes in the referenced objects will affect the result only by
redefining the object or doing some updating. It also means that the object remains useful, even if a subsequent change makes the references
form a loop, i.e. an object indirectly references itself. However, this will prevent the set of objects to be ordered according to dependencies,
making updating difficult.
Since the release 99.1, updating of surfaces is done automatically when the curves or points they depend on are changed. This update takes into
account changes in indirectly referenced objects also, which may cause updating of curves. For example, if a surface depends on a curve which
in turn depends on point object, both the surface and curve will be updated if the point object changes. For general surfaces, the automatic update
must be selected with the preparation option AU. Since release 2003.1, also curves will be updated automatically.
Rooms and surface objects on the other hand are stored in the database as initially defined, i.e. a referenced object is represented by its name
only. Only when such an object is read into memory to be used for some purpose, the definition of the referenced objects is applied. Thus,
whenever these objects are used, they will use the currently valid definition of referenced objects, and no separate updating is needed. The
so-called object administration, as presented below, handles the task of managing these changes. No cross references are allowed, i.e. no object
may directly or indirectly refer to itself.
Since release 2003.1, Automatic update of objects dependent on the frame systems has been added. 'Frame systems' refer to normal frames,
webs, longitudinals and verticals. The update is dependent on objects being defined with this release and later, which adds a flag to mark the
dependence. Naturally, the update has effect only on objects governed by the Object Administration. The update is automatic when the frame
systems are defined in the normal place in task REF. If the frame systems are defined by using service functions (AD.FRAMESYSTEM etc), the
update of the objects already in use must be triggered separately, either by removing them (!GM RESET or GM.UPDATE('E')) or dynamically by
GM.UPDATE('FRS'). When leaving the task REF, objects in memory are removed by default (as before). With the option G, this is replaced by the
dynamic update as in GM.UPDATE('FRS').
There is one exception to the rule that an object must not indirectly refer to itself. If a surface object is used as a limit for a room, it is taken into
account that what is actually used is the owner surface, and the room is therefore not dependent on the rest of the definition.
In a number of commands (for example, DES), the name of an object may be prefixed by one or more asterisks. This has the effect that the
command will affect not only the given object, but also the objects it depends on. One asterisk means the set of objects the given one directly
depends on. Depending on the command, adding more asterisks will make the command affect more objects in the chain of references.
There may be the need to find all objects in the database that reference a given one. This service is available as the suboption REF in the
selection criterion of !SELECT, for example:
SELECT REF='CYL12'
6. Dates of objects
The fact that objects can depend on each other is reflected by the following date concepts.
This is the date when the definition of the object as such was last made or updated. This date is shown by the CAT command under task DEF.
This date takes into account the date of the referenced objects, and it is the youngest one of these unless the object itself is younger. This date is
visible in the output of INFO under DEF. The logical date is used when deciding whether derived results, for example, calculation sections, are
up-to-date. The distinction between the definition date and logical date is relevant for rooms, surface objects and combined objects. For the other
objects, the final shape is generated at the same time as the definition.
This is the date when the description of the object was last written to the database. For example, this takes place after making calculation sections
for a room, without causing the dates above to be changed.
7. Combined objects
Sets of surfaces, rooms or surface objects can be collected together as so-called combined objects. This type of object has two purposes. It can
be used when an object actually is formed by separate parts and it can be used as an administrative aid allowing whole sets of objects to be
accessed under one name.
More functions can be found among the later introduced, so-called service functions belonging to GM. For a list of these, use !COM GM.F.
The calculator functions also allow the introduction of new object types or making the definition of repeatedly needed objects easier, by storing
so-called parametric definitions, in the form of macros. A trivial example is provided by the following macro for a cube-shaped room:
@X=... lower x
@Y=... lower y
@Z=... lower z
ROOM @NAME
See also the object type PMO, parametric macro object, presented under special definitions.
A surface also has an inside and an outside. These names are primarily just labels by which the two sides are distinguished, but as far as
possible, the division should coincide with the intuitive concepts.
If a surface has an orientation defined, the outside can be expressed by telling whether it is in the positive or negative direction of that axis. For
example, for 'upper' and 'lower' side to be considered defined, the orientation should be Z.
The way the orientation and the sides are determined is described in connection with the definition of surfaces.
The side and orientation of surface objects and combined surfaces follows from that of the parts.
The orientation concept is important when surfaces are used in room definitions or in NAPA Steel.
With the reference coordinate, it is possible to designate locations with respect to surfaces (or surface objects) in one of the following ways:
This syntax represents a coordinate where #name stands for the reference coordinate of the given surface, and d an optional displacement. In
the last form, the displacement is expressed as a number of frame spacings.
Such coordinates can be used in any commands in the same way as frame numbers. In the definition of rooms and surface objects, the usage of
such coordinates is recorded, and the dependence created taken into account.
The symbols WEB, LONG and VERT are reserved for references to the special coordinate systems and a syntax such as #WEB1 will be given
this interpretation, regardless of the existence of the object WEB1, provided that the coordinate system in question has been defined. At a
separate request (command LW in task REF or INST), the symbols W, L and V will be given the same role.
11. Transformations
In various contexts, a reference to an object may contain a transformation, i.e. a change of location or orientation. Presently, the following
operations are supported, which are expressed by the following syntaxes:
axis/q: reflection about the plane axis=q, for example, Y/0 (=about the center plane)
The transformations are attached to the object by adding this syntax in parentheses directly after the name, for example:
DECK1(Z+2.5)
Transformations can presently be used in the definition of combined objects, elementary rooms, the owner surface of surface objects and in the G
ENERATE and PLOT commands.
Since there are relations involving references by name only, using an object means that the geometry behind that name is needed, and if an
object is redefined, the effect on referencing objects must be taken into account.
Therefore, at run time the so-called object administration is maintained for these purposes. Every object of the types mentioned is added to the
object administration the first time it is encountered, either in a command or when referenced from another object. When moving between tasks,
the object administration is saved and the definitions of the objects are kept in memory. Only when changing project or version, the object
administration is emptied.
The INFO command in task GM gives information about objects, either those named in the command or a subset selected from those currently in
memory.
Under task DEF, the objects in memory can be removed with the command CLEAR and at task level with the command !GM-RESET.
Note: an object keeps the definition valid when reading it, regardless of possible later changes in another run. Changes made in the
current run are taken into account immediately. To make changes made in another run available, the CLEAR or !GM RESET commands
must be used. A single object can be updated with the FETCH command. Note also that the DES and EDIT commands fetch the
definition from the database.
If an object is faulty when reading it, either as such or because of some referenced object, the reading is cancelled and no incorrect object will be
added to the run time set. However, the possibility to change an object after reading it may create an error, which can affect referencing objects
also. For this reason, the object management must take into account the possibility that the run time set contains faulty objects. Although efforts
have been made to handle this, and to recover when the error is corrected, it is possible that CLEAR may be needed.
As an exception to the principle that faulty objects are rejected when reading, a combined object is accepted even if a fraction of its components
are missing or incorrect.
The experienced NAPA user may notice that these features have pilot level for a long time, which is because there has been no demand for them.
When copying objects in the TOC task, there are two possibilities:
the version or part of it is simply transferred to a new place and the result should in all respects, including the dates, be identical with the
source (option K).
the objects are transferred to an existing environment where they should be treated as new or modified ones. The date and user are
recorded as if normal definitions had been made (option D).
If neither option K or D is given, the result corresponds to D if overwriting takes place, otherwise, it is K.
For just plotting a curve from another version, there is the option VER in the PLOT command.
Rooms and surfaces that are used through the object administration and may depend on other objects can be accessed so that they are first read
with the !GM GET command. The result will be available under a name to which the project or version is added.
1. General
1.1. Curve types
1.2. Parts of the curve definition
1.3. Location surface
1.4. Definition of the shape
1.5. Knuckles
1.6. Roundings
1.7. Interpolation between given points
1.8. Curve through space points
2. Syntaxes
2.1. General format
2.2. Definition of the location surface
2.2.1. Principal plane
2.2.2. General plane
2.2.3. Cylinder
2.3. Definition of the curve shape
2.4. Definition of points
2.5. Handling multiple intersection points
2.6. Referencing definition points
2.7. Sorting the definition points
2.8. Referencing a curve grid
2.9. Removing dependencies
2.10. Angle conditions
2.10.1. Explicit angle in the projection
2.10.2. Explicit angle in the surface
2.10.3. Plane
2.10.4. Midship
2.10.5. Free angle
2.10.6. Tangent function
2.10.7. No angle condition
2.10.8. Free angle at all points
2.11. Creating roundings
2.11.1. Example of the rounding function
2.12. Controlling the curve shape between the given points
2.13. Specifying the curvature
3. Curve through space points
4. Side conditions
5. Tangent functions
5.1. Purpose
5.2. Defining a tangent function
5.3. Storing a tangent function
6. Curve editing
7. Automatic fairing of a curve
8. Auxiliary functions
8.1. Listing functions
8.2. Drawing
8.3. Digitizing
8.4. Finding errors
8.5. Controlling the internal accuracy
8.6. Spline representation
8.7. Reconstructed curve definitions
9. Point objects
9.1. Definition of point objects
9.2. Use of point objects
9.3. Plotting point objects
9.4. Managing dependencies
1. General
As follows from the way general surfaces are defined, the most frequent use of curve definitions is in connection with hull definition or the
definition of other surfaces of general form. There are therefore functions such as definition of so-called side conditions, which relate to this task,
the purpose of which are treated in more detail in connection with hull definition.
In addition, curve definitions may be needed for various other components, such as the lateral profile curve. Some of the definition curves of the
hull are useful as such, for example, the stem and stern curves.
'Space curve' refers to a curve with a specified location in the three dimensional ship coordinate system (x,y,z), in contrast to plane curves in a
two dimensional coordinate system (u,v), (which is not the same as a space curve that happens to be in a plane). While many inner functions
operate with two-dimensional curves, all curves of interest on the user level are space curves, which is the subject of this chapter.
This chapter also presents the definition of point objects, the most important use of which is in connection with curve definition.
The definitions are presented here in the form used when entered alphanumerically. The so-called Hull Surface Editor contains functions by which
curves and point objects are manipulated by interactive actions (see the following chapter).
In most cases, there is no difference regarding the use of the different curve types. There are a few functions of marginal importance restricted to
plane curves, and some functions by their nature require plane curves.
The three first types differ by the way the so-called location surface is defined, while the fourth type (so-called XYZ-curves) has no location
surface. In the following, the types based on a location surface will be presented first.
With the exception of the so-called XYZ-curves, the shape of a curve is defined by the projection in a coordinate plane, much the same way as
when drawing manually. This plane is referred to as the projection plane of the curve. The curve is then placed where it belongs in the three
dimensional ship coordinate system by 'lifting' it up to the so-called location surface. Therefore, the definition contains two main parts: the
location surface and the projection. These components will be described in more detail below. An optional command SC may follow for adding
side conditions. The following figure illustrates the parts of the definition:
Corresponding to the different curve types, the different types of location surfaces are:
Principal plane: a plane parallel with a coordinate plane. It is defined by giving the constant coordinate of the plane.
General plane: a general plane has an arbitrary orientation, and it is most frequently defined by giving points on it.
Cylinder with the axis parallel with a coordinate axis: such a surface is defined by the base curve in one of the coordinate planes,
which is equivalent with giving a projection of the curve.
The types of location surface are illustrated by the following figure, showing a section, an inclined flat of bottom curve and a rising knuckle.
For each of the points in the projection curve, the location surface gives the third coordinate of the corresponding point in the final space curve.
Consequently, the location surface must be defined and singe valued at each point in the projection.
The process of forming the actual space curve can be imagined so that the curve in the projection plane is represented by a slide, and the
location surface a (possibly curved) sheet in space, onto which the slide is projected. (The similarity is not complete - the system uses a parallel
projection, while a slide projector uses a central projection).
When defining, say, a waterline, the location surface has a fairly obvious meaning. When defining an arbitrary space curve, this may not be the
case. It helps to think that the function of the location surface is the same in both cases, even if it is curved in the latter one. As a rule of thumb,
the geometrically simpler projection should be used for the location surface. If the curve is actually a plane curve, it should be defined as such.
The shape of the curve is obtained by defining the projection of the curve into one of the coordinate planes. The projection is defined by a set of
points, to which it is possible to add instructions concerning the inclination of the curve.
An explicit point is represented by two coordinates within parentheses, which is the standard way of presenting points in two dimensions.
Depending on the projection, the coordinates stand for (x,y), (x,z) or (y,z).
A point located on another curve is usually defined simply by giving the name of that curve. More specifically, the point represented by a curve
name stands for the point obtained when the given curve is intersected by the location surface. If the intersecting implied in a curve reference
does not give a uniquely defined result, there are special syntaxes for selecting between multiple intersection points.
The following figure shows a curve containing both explicit points and points obtained from other curves.
An intersection point defined this way by referring to the other curve is called an explicit intersection point in contrast to intersection points
created simply because the curves happen to have a common point.
The points may be directly given in the order they appear along the curve, or they may be given in an arbitrary order, and sorted automatically in a
specified way, for example, according to ascending coordinates on one axis. The order in which the points are used defines the direction of the
curve.
The inclination of the curve can be defined at the points given, by adding so-called angle conditions, which may be of the following types:
A free angle always belongs to a given side of a point, and it specifies that the curve shall behave on that side as if the point were an end point.
Unless another angle condition is given for the other side, the angle formed at the free angle will be used at that side also. The following figure
illustrates the effect of a free angle on one or both sides of a point:
by giving the inclination of a principal section (x-, y- or z-section), where the referenced curve provides an additional direction, allowing
the tangent plane to be decided
by referring to the plane of the referenced curve
by using a tangent function.
When giving directions, a direction and its opposite direction are equivalent, and the one is chosen that gives the more reasonable result. For
example, +90 and -90 degrees are equivalent, as shown in the following example:
1.5. Knuckles
The inclination of the curve will always be continuous, unless otherwise specified by angles on both sides of a point (fixed or free angle). The
simplest way to create a knuckle is to use two free angles.
A double point given by repeating a pair of coordinates is also interpreted as a knuckle, thus
...(u,v)(u,v)...
equivalent with
The double point syntax has been added in order to make digitizing easier: by pressing the P-button twice, a knuckle is obtained.
1.6. Roundings
Arbitrary roundings can be defined by applying suitable angle conditions. Creating a rounding formed by a circular arc can be obtained in one of
the following ways:
defining a knuckle and equipping it with an instruction for rounding it with a specified radius or with such a radius that it connects to the
next point
by defining an end rounding. The curve will start or end with a 90 degree angle and a specified radius.
With the end rounding, there is the option that the radius is measured at right angles to the stem or stern. In the other cases, the radius is
obtained in the projection concerned.
Since Release 99.1, there are two alternative algorithms for placing the curve between the given points. First, the original one is described.
The curve shape is generated by first calculating the inclination at the given points, after which curve segments are placed between the points,
obeying the given angles. The curve form used is a parametric, third degree polynomial, referred to as a spline segment. If the curve definition
mode is SPLINE, the result is stored this way; otherwise, it is approximated by a polygon.
If the angles at the ends of the curve segment are symmetric with respect to the connecting chord, the result is the best possible approximation of
an arc of a circle. For a circle segment of less than 45 degrees, the approximation is for all practical purposes exact. With larger angles the error
increases, and for 90 degrees it is about 1 % of the radius.
The new interpolation type is obtained by the option M2 in the CURVE command or permanently by assigning the parameter GMTP in the
reference system. This curve type is otherwise equivalent with the old type, except for some differences in the curve shape. The difference is
easiest to find out by practical tests, but shortly, the main features are: the old method attempts to avoid unnecessary inflections, while the new
one tends to give a smoother behaviour of the curvature. The following figure is not a fair demonstration of the M2 type, but it is designed to show
clearly the difference mentioned.
Example of interpolation
Example of interpolation with the original method (M1, left) and the new method (M2, right). The curvature is shown in the porcupine
representation.
The M2 type curve is always treated in spline mode. A three-dimensional form of the M2 type interpolation is used in the XYZ curve.
As an alternative to the curve types described above, there is the so-called XYZ-curve, defined directly by a set of points in space. The decision to
The advantages of the XYZ-curve are that complex curve forms can be more easily defined and changes can be done more flexibly. On the other
hand, there is no support for maintaining a specific curve type, for example, coordinate plane. References to other curves always have to be
specified by a coordinate or other syntax as there is no location surface to decide the point where to attach the curve.
2. Syntaxes
The CURVE record starts the curve definition, and contains the name of the curve to be defined. 'description' is an optional descriptive text that
does not affect any geometric properties. It is visible in the output of DES and CATALOG.
The next part of the definition consists of one record, and gives the location surface. The alternatives will be presented in the next section. Then
follows the definition of the shape in the form of the projection of the curve into one of the coordinate planes.
The record SC is optional; it gives side conditions for the curve as presented below.
The coordinate can also be given by a point object, from which the relevant coordinate is taken.
These records define planes where the coordinate indicated by the identifier has the constant value q. In the form
axis curve1/curve2
the explicit coordinate is replaced by reference to the intersection between two given curves. 'axis' stands for X, Y or Z.
Examples:
CURVE FR10
X 100
CURVE FR1
X P1
CURVE WL2
Z 2
CURVE FR6
X FSF/WL2F
A general plane is defined by the THROUGH record, the basic form of which is
THROUGH, (x1, y1, z1), (x2, y2, z2), (x3, y3, z3);
defining a plane through three points. In the chapter about definition of planes, there are other alternatives presented that can also be used.
Examples:
or
2.2.3. Cylinder
The most general location surface is a cylinder with the axis parallel with a coordinate axis. This type of a location surface is defined by the
cylinder base curve in the coordinate plane perpendicular to the cylinder axis, which is equivalent with defining the projection of the curve in this
plane.
The definition of this curve is in form and contents equivalent with the definition of the shape, as presented in the next section. As an example, the
location surface of a rising knuckle could look like this:
None of the alternatives that require that the location surface is already defined can be used. This means that:
points must be given with explicit coordinates or by a curve reference with an explicit intersection plane
angle conditions must be either free angles or explicit angles in the projection.
The location surface must be unambiguous with respect to the axis the two projections have in common. It is therefore always possible to have
the points automatically ordered, and the syntax for preventing the sorting (*, see below) is not allowed.
The shape of a curve is defined by the projection into one of the coordinate planes. The coordinate plane in question is implied by the record
identifier, which may be one of the following:
XY YX
XZ ZX
YZ ZY
These pairs of identifiers are mutually equivalent, except for the effect on the sorting, as presented below.
The contents of the projection record is formed by points, possibly equipped with angle conditions:
Each 'p' stands for a point only or a point equipped with angle conditions. An angle condition is identified by a slash. The general form of a point
equipped with an angle conditions is:
ac/, p, /ac
where 'p' stands for one of the alternatives for defining a point and 'ac' for one of the angle conditions presented later. An angle condition written
before/after a point concerns the curve part before/after it. An omitted angle condition on one side of a point means that the same angle shall be
used as on the other side. Thus, knuckles are created only by adding an angle condition on both sides of a point. The location of the slash defines
which point the angle condition belongs to.
XY COPY name
XY AS name
This form copies the definition of the projection from the given curve. The difference with respect to COPY is that curve references are interpreted
with the current location surface while COPY takes the points as such.
Points can be given either explicitly or by reference to already defined curves. An explicit point is given by two coordinates in parentheses:
(u, v)
Depending on the plane in question, these coordinates stand for (x, y), (x, z) or (y, z).
Note carefully: this rule is not dependent on the record identifier, for example, whether it is XY or YX.
A point obtained by intersecting another curve is defined by giving the curve name. This stands for the point(s) obtained when the curve is
intersected with the location surface. If several points are obtained, all are used. The problem of selecting between multiple intersection points or
handling an ill defined intersection result is handled in the next section.
Points of different types can be mixed arbitrarily in a curve definition. Thus, the definition of the curve shape can look like the following examples:
A intermediate form between an explicit point and a point obtained from a curve is provided by the syntax
(name)
The point is calculated as in the case of a normal curve reference, but in the resulting curve, the curve reference is ignored and the point is
treated as if given explicitly, as can be seen by using the command DES.
When intersecting a curve with the location surface, the result may be many points, all of which may not be desired, or the reference may not give
a well defined result at all. The following syntaxes are intended for these cases:
name/axis>q
name/axis<q
name/axis=#q
name/axis=q
where 'name' is the name of the referenced curve, 'axis' is either X, Y or Z and 'q' is a coordinate on the given axis.
The first three forms allow selection between multiple intersection points. The first two of these restrict the choice of points to those, where one
coordinate satisfies the given inequality, while the last one selects the point where the given coordinate comes closest to the given value.
The following figure illustrates different cases of selection between multiple intersection points.
The selection is also available with the curve/curve syntax, for example
STEM/FR10/Z<3
There may be cases when none of these possibilities can be used. The simplest solution is to define the point in question by a point object.
Another possibility is to divide curves so that ambiguities are avoided. The following is a typical case:
CURVE TRANS, X -2
ZY STERN/Z=4.4 ... DECKA/P1
The form name/axis=q differs in an essential way from the others: the given coordinate plane is used for intersection instead of the location
surface. This form must be used when intersection with the location surface is not possible, either because it gives an ill defined result or because
there is no location surface, as in the definition of the location surface itself.
An important consequence of this form is that the result does not necessarily lie in the location surface. This is checked by the program in case of
plane location surfaces only. A point not located in the location surface is treated as if given by coordinates.
When the location surface is a principal plane (note!), and the referenced curve is partially located in that plane, the first and the last point of the
curve part in the plane are returned. The following figure gives a typical example of this: the flat side curve is defined through the midship section
(FRM), which is vertical at the maximum breadth.
Example of reference curve partly coinciding with the location surface. Points P1 and P2 are obtained as
the result of a bare curve reference
To get a single point in the example above, the reference must be specified by either
(3.2=height of P1). The latter alternative has the advantage that the curve reference works even if the height is changed (but remains below 6). By
defining FRM with point objects, these problems can be avoided.
When a curve reference is used in the location surface, a consistent result is guaranteed if the same reference is used in the projection also, i.e.
with the explicit plane. Alternatively, the projection must be defined with a bare curve reference.
name/KN/n a knuckle
The parameter n is optional (default=1) and selects between several points of the same type, by giving the number counted from the start of the
curve or the negative number counted from the end.
This syntax has been added primarily in order to give access to the points resulting from the ROUND syntax (see below).
The points defining the projection of a curve will be sorted according to increasing values of the coordinate given as the first symbol in the
command identifier. For example, in the command
XY ...
points will be sorted according to increasing x-values. In case of equal values, the initial order is kept.
In cases where the points cannot be sorted according to this principle (for example, the curve is closed), the points must be directly given in the
order they appear in the final curve, and automatic sorting inhibited by an asterisk as the first data item:
XY, *, ...
YX, *, ... (equivalent)
There is a newer option (rel. 96.1) for a more general automatic sorting that attempts to sort points in order to generate a reasonable curve from
the given point set. This sorting is requested by option ** at the start of the projection record. The following example illustrates a case when the
standard sorting cannot be used:
The following figure illustrates the control of sorting and the meaning of the curve direction.
XZ (10 0) -/ (6 6) (0 9)
where the points are sorted according to ascending x. The dashed line results from the definition
XZ * (10 0) -/ (6 6) (0 9)
meaning that points shall be taken in the order given, which happens to be reversed with respect to the previous case. Therefore, the free angle
placed before the point (6 6) has different effect in two cases.
As a general rule, one should use the automatic sorting whenever possible. If a totally distorted curve is obtained, the most frequent reason is
incorrect sorting, either because the sorting instruction is wrong, or a point has an error that places it at the wrong place in the sequence.
When a new curve is added to a grid, the existing curves can be taken into account by a reference to the surface, instead of writing references to
the curves separately. The surface is referenced by giving the name of the surface preceded by an asterisk, for example:
The resulting curve is stored as if the references had been given directly. The record can also contain points given otherwise.
Making a curve this way requires that automatic sorting is used. The curves should be equipped with essential side conditions for creating
knuckles, zero angle at flat side and similar.
A point defined by intersecting another curve makes the curve dependent on the referenced curve. This means that the curves must be defined in
the correct order, and that changes in the referenced curve require that the referencing curve must be updated. While this is normally what is
wanted, there are cases when one wants to get a point from an existing curve without creating a permanent dependence. This is obtained by
writing the curve reference in parentheses. For example:
A typical occasion when this need arises is when an intersection curve or a test curve is used for the definition of grid curves, or when an auxiliary
curve is taken out of use, but information derived from it is retained.
When the curve reference is given this way, the coordinates calculated are treated exactly as if they had been given directly, which is best seen
when using the DESCRIPTION command. The result from the example above may look like this:
Multiple intersection points are not allowed as the result of this type of curve references.
Note: if a curve reference gives several points, one should make sure that the angle conditions given are applicable on all the points. If
this is not the case, the curve reference must either be divided into several references with a unique result, or the explicit angle
conditions replaced by a side condition stored with the curve.
The inclination of the curve to be defined is given via the inclination of the surface, given by the inclination of one of the principal sections. The
form of this specification is:
*axis=t
where axis=X, Y or Z, giving the section in question, and t=the given angle. This angle condition can only be given in connection with a point
obtained by intersection.
Example:
The start angle of a waterline is to be such that the inclination of the frame at the start point is 12.5:
2.10.3. Plane
The specification
P/
defines that the tangent plane of the surface coincides with the plane of the referenced curve.
2.10.4. Midship
The symbol
M/
defines that the surface is parallel with the x-axis, as is the case at a normal midship section.
The curve part on the side of the point where the free angle is given will be defined as if the point were an end point.
Example:
If a tangent function defined on an intersection curve is to be taken into account, this must be indicated by an angle condition in the form of an
asterisk:
This alternative may occasionally be needed in order to prevent side conditions to be applied. Two minus signs stand for 'no angle condition':
The special case when a free angle is to be applied at all points resulting in the curve being a polygon, can be given in an abbreviated form as
follows:
Example:
Angle conditions at the points override the '<>' specification (before Rel. 2001 these were ignored).
With the ROUND option, a knuckle is replaced by a rounding, as shown in the following figure:
Example of rounding
The ROUND option has the same form as an angle condition and it may be given in addition to an angle condition at the same point:
ROUND=r/
'r' specifies the radius. If the point has no angle condition, a knuckle is implied. The curve is otherwise the same as would be generated without
the ROUND option, but between the tangent points, an arc of circle is placed. This case is special in that the original point is not part of the result;
instead, two other definition points are added.
By omitting the radius, the effect is to select a radius so that one of the tangent points coincides with the nearest definition point:
You can refer to the implicit definition points with syntax name/RP/n, name being the name of the curve and n a number, usually 1 or 2. For
example a point can defined using rounding point:
The case above is most likely to be used for an end rounding. The auxiliary point can be obtained from a curve (C3 in the example below) which
is referred to as a halfsiding curve. It has the same xz-projection as the stem, but a different y.
In the cases presented, the radius is created in the projection being defined. If the curve ends at another curve, one can specify RN instead of
ROUND, and then the radius is measured in the normal plane of the referenced curve. The projection will then be an ellipse. The following figure
illustrates the difference between ROUND and RN:
Difference between ROUND (left) and RN (right), corresponding to the definitions shown below
CURVE TT1
Z 4
XY C1,C2, C3, /ROUND -90/ C4
CURVE TT2
Z 4
XY C1,C2,C3 /RN -90/ C4
CURVE TT1
Z 4
XY C1, C2 ROUND=2/ C4
CURVE TT2
Z 4
XY C1 C2 RN=2/ C4
These options are available for start or end points only, and the end angle will be 90 degrees.
CURVE TT3
Z 4
XY P1 P2 /RS P3
In the example above elliptic end rounding with continuous curvature works as /RN, but the new point P2n is shifted along the imaginary form so
that a continuous curvature is obtained at this point. The shift is calculated so that the maximum of the curvature distribution is obtained near
enough to the point P3. Those definition points of the imaginary form that fall within the rounded region are deleted.
In the following figures, the definition of a fore body hull form is shown as an example of the use of the rounding functions. In this case, the fore
body is defined with two different surface parts: the main surface HULLF and the end rounding surface HULLF_R.
The grid of HULLF (left) and the prepared surface HULLF (right)
The waterlines are defined without any end rounding through the imaginary stem (red line) with a knuckle. The touching line (green line) is defined
through all the curves of the grid between the ends of the surface from CLF to DECKF.
CUR FTCH M1
ZX FBF/Y=0.12, /2, WLF0.11/X=178.63, WLF1/X=181.2,
WLF3/X=183.3, WLF5/X=183.7, WLF7/X=183.3,
WLF7.5/X=181.3, /-, WLF2/X=179.7, WLF10/X=179.5, /-,
DECKF/X=179.5
ZY CLF, FBF, FR1, WLF0.11, WLF1, WLF1.5, -/, WLF3, WLF5,
WLF7, /-, WLF7.2, WLF7.5, -/, WLF4, WLF2, WLF10, /-,
WLF11, -/, WLF12, WLF6, WLF14.5, WLF171, WLF19.5,
DECKF
SC , E//-
The touching line should be defined so that there will be corresponding points in the location surface with the nodes in the projection. This is the
method that should be used to achieve the continuities of the tangent and curvature in the end rounding surface. The side condition SC E//- sets
the curve to the surface end curve. HULLF is prepared so that the surface will be trimmed to the touching line.
CUR WLF7.2_R
XZ FTCH/WLF7.2, (183.7083,8.8419)
XY FTCH/WLF7.2, RN=RADIUS*ANGLE/, STEM
FTCH/WLF11, /*R defines a curve in the node with the same tangent and curvature continuity. When space curves have been used instead of
waterlines, the curvature, got with /*R option, might be strange or unexpected; therefore, the option should not be used at all.
RN=RADIUS*ANGLE/, STEM adds the end rounding into the curve. The radius and the circle arc opening angle are obtained from the curve
RADIUS and ANGLE at the z level of the intersection point with STEM.
The surface is supplied with the rounding curve (pink line). The curve has been defined through all the rounding points that are the end points of
the ellipse in the roundings. The curve is a modelling of the edge of the area where the rounding is a circle arc perpendicular to the stem.
CUR STEM_ROUND
XYZ ** CLF/FTCH, FBF_R/Y=0.01, /-, WLF0.11_R/RP,
WLF1_R/RP, WLF1.5_R/RP, WLF3_R/RP, WLF5_R/RP, /-, -/,
WLF7_R/RP, WLF7.2_R/RP, WLF7.5_R/RP, WLF4_R/RP,
WLF2_R/RP, WLF10_R/RP, /-, WLF11_R/RP, -/,
WLF12_R/RP, WLF6_R/RP, WLF14.5_R/RP, WLF171_R/RP,
WLF19.5_R/RP, DECKF_R/RP
The curve form generated between two points can be controlled by the following syntaxes. In contrast to the roundings presented above, effect is
partly or wholly equivalent with assigning certain angles, without creating or modifying definition points.
The following syntaxes generate arcs of circles, as exactly as the spline representation allows:
... p1 /C p2 ...
where p1 and p2 designate points. In both cases, the result is an arc of circle between the given points. In the first case, the arc is wholly
determined by the points and the given radius r. Thus, the angles at both points are defined, and the effect on the rest of the curve is exactly the
same as if these angles had been given directly. Giving an angle at the other end of the interval is redundant and an error. The sign of the radius
is significant, as shown by the following figure:
Effect of /C specification
CUR DEMO
X, 0
ZY (0, 0), /C, (1, 2.2), /-, (3.9, 4.5), (7, 6)
The following syntax generates a parabola with the top at the given point:
... p1 PB=a/ p2 ..
where a is the curve inclination at p2. The curve shape between p1 and
Example of parabola
CURVE PARABOLA
X 0
ZY (0 0) /PB=0 (2 4)
C Z1
Z 0
XY (0, 6) (5 5) R=2.5/ -90/, (9, 0.6) (solid line)
C Z2
Z 0
XY (0, 6) (5 5) R=1.5/ -90/, (9, 0.6) (dashed line)
The alternative (u,v) has been added mainly in order to allow graphic input. The missing coordinate must be provided in the form X=x, Y=y or Z=z.
The result is recorded in the standard form with three coordinates.
CURVE C1
XYZ P1,P2,P3,P4
By default, the points are taken in the order given in the command. Sorting can be specified with the SORT option, for example
The option above specifies sorting according to increasing values of x. Similarly, Y and Z can be given. SORT=XY means sorting using the
general sorting method, applied to the XY projection or similarly XY, YZ.
The main reason for introducing this type of a curve is to avoid difficulties encountered when selecting the location surface in some cases. There
is also more freedom to modify the curve later. On the other hand, by selecting a certain location surface, a specific property, for example, a
waterline, can be achieved more easily.
The definition of this type of a curve is simple and straightforward, except for the definition of angle conditions. Note also that simple curve
references cannot be used, as these refer to the point where the curve is intersected by the location surface.
When given a location surface, there is only one degree of freedom for the direction at a given point and an angle can be interpreted as that
measured in the projection. The inclination of the general space curve has two degrees of freedom, and consequently, one can give two angle
conditions. Alternatively, one can give one condition in the form of a vector. All angles must be given for a specified plane.
Angle conditions are given with the same syntaxes as for a standard curve. In addition, there are syntaxes specific for this type. The following
angle conditions can be given for any point:
- free angle
*(vx,vy,vz) a vector giving the direction of the curve. Only the relative lengths of components are relevant. An
unspecified component can be designated by -.
(vx,vy,vz) derivative of the curve with respect to the parameter. The effect is otherwise the same as above,
but now the absolute values are relevant.
The following angle conditions must be given with a point obtained from a curve or in combination with another one:
*axis=angle select the direction so that intersections from the surface have the given direction in the given section plane, e.g. *X=90
CURVE SPC11
XYZ (0, 0, 0), /X=30, (2, 4, 5), X=-60/, (4, 8, 0)
XYZ (0, 0, 0), /*(0, 1, 2), *(0, 2, -1)/, (0, 10, 0) (red one)
XYZ (0, 0, 0), /(0, 1, 2), (0, 2, -1)/, (0, 10, 0) ...
XYZ (0, 0, 0), /(0,20,40), (0,20,-20)/, (0, 10, 0)
The thick/red curve is defined by specifying the direction only (prefix * before the vector). The other curves show the effect of a vector influencing
the curve length. The direction of the vectors is the same in all cases, but the length varies as indicated.
CUR SPC1
XYZ (0, 0, 7), *Z=0/, FRA/Z=1.8
CUR SPC2
XYZ (0, 0, 7), Y=0/, *Z=0/, FRA/Z=1.8
In the first curve, it is specified that waterline sections shall have inclination 0 leaving the curve with free direction in xz-plane. In the second curve,
the second degree of freedom is fixed also.
4. Side conditions
The definition of curves may also contain data concerning the behaviour of the surface in the neighbourhood of the curve. Unless specifically
inhibited, the data will be used when defining intersecting curves and at surface preparation. The data may be side conditions, concerning directly
or indirectly the inclination of the surface, or they may concern the selection of outside of the surface.
SC, sc
The second form is used when it is necessary to distinguish the sides of the curve. It is also possible to add information about inside/outside as
will be presented below.
'sc', 'sc1' and 'sc2' represent side conditions, expressed with the same syntax as presented for angles directly given in a curve definition, except
that alternatives 'angle' (=angle in the projection) and * (tangent function) cannot be used.
The side selection defines the principle by which the sides of the curves are distinguished. The alternatives are:
axis (X,Y or Z) the sides are identified as +x/-x etc. Example: SC, -/Z/*X=90
If there is need to define the inside/outside of the surface locally, this can be done in the SC command:
where ... stands for an (optional) side condition. The alternatives for 'outside' are:
+axis or -axis (axis=X,Y or Z): the outside is in the direction of the given half axis.
R, L the outside is to the right/left of the curve, as seen in the projection plane.
where 'name' is the name of the curve concerned and 'sidecond' is a specification identical with that of the SC record.
The form
SCC, name;
5. Tangent functions
5.1. Purpose
The tangent function is a facility for controlling the inclination of the surface at a given curve, called the owner curve of the tangent function.
While constant angles can be given as side conditions, the tangent function is capable of defining a varying angle. At each point on the curve, the
tangent function gives an angle that combined with the inclination of the curve itself, gives the inclination of the tangent plane of the surface.
Both the purpose of a tangent function and the way it is stored make it closely connected with the owner curve, and it has no independent
meaning separated from that curve. However, the definition of it may rely on curves defined after the owner curve, and creation and updating of it
must be done as separate tasks. Therefore, in some respects a tangent function is formally treated as an independent object. The same types of
dependencies and questions of updating order that occur between space curves, occur also in the combined system of space curves and tangent
functions.
provide additional information about the surface, in the form of inclination data
ensure a regular behaviour of the inclination.
The need to use tangent functions this way typically occurs when one wants to use a finer grid locally. In this case, there will be curves ending or
starting in the middle of the surface. Unless the end angles are controlled, unfairness is likely to be the result, and tangent functions offer a
convenient way of taking the inclination of the surrounding curves into account.
As a general rule, the definition of surfaces for project work seldom needs the usage of tangent functions, but in high quality fairing, tangent
functions often prove to be useful.
In the same way as space curves, tangent functions can be defined by explicitly given data, or by data obtained from already defined geometry.
The explicit inclinations are expressed by angles measured in one of the principal planes. At intersections between already defined curves, the
inclination is obtained by simply referring to the curves.
Normally, tangent functions are defined so that inclinations are defined along the whole curve. It is, however, possible to define a tangent function
to cover only part of a curve. In this case, one should avoid referring to the tangent function outside that part, and at surface preparation, partial
tangent functions are ignored.
Values of the tangent function are stored at the polygon points of the curve. It can happen that the point spacing is too sparse for the tangent
function, and for this purpose, option LMAX can be used in the curve definition in order to force a finer spacing.
TGF, name
'name' is the name of the owner curve. Instead of XT, YT or ZT may be given. These alternatives are otherwise equivalent, but the first character
of the identifier defines the axis used as default instead of an explicit axis in the data specified below.
If the tangent function is valid on one side of the curve only, the side must be indicated by adding
TGF, name/side
+axis, -axis: the side is identified by the given coordinate half-axis e.g. KNA/-Z: valid below the curve
If the type of side selection has not been defined previously, it becomes defined as indicated; otherwise, the type of side selection must be the
same as the one already defined.
The contents of the XT (or YT, ZT) record is formed by inclination data for different points on the curve. Explicitly given inclinations are given in a
form resembling that of a coordinate pair:
(axis=q, *axis=t)
where the first part defines a point on the curve and the second one an angle valid at that point. In both cases 'axis' is X, Y or Z. It may be omitted
(along with the equals sign), if the axis given by the record identifier is used. Different axes may be given in the two parts.
The notation 'axis=q' specifies the point on the curve where the given coordinate has the given value 'q'. This point is supposed to be determined
uniquely.
The notation '*axis=t' defines an angle 't' in the principal plane specified by 'axis'. This angle represents the inclination of the intersection curve of
the surface. The angle may also be given in the form *T=t, defining the value of the standard angle.
The following example contains valid alternatives for explicitly given inclinations:
Inclination data may be derived from curves intersecting the owner curve in the same way as coordinate data are obtained for space curves. The
form of the curve references are also identical with those used in connection with space curves:
name
name/axis<q
name/axis>q
name/axis=#q
If the curve reference gives multiple intersection points, all points are used. The form containing an explicit intersecting plane is not included,
because it needs not (and cannot) be used.
A tangent function defined on the basis of existing data only can look like the following example:
TGF FR2
In order to take it into account in the definition of a new curve, the angle condition '*' is needed, for example
CURVE WL1.5
Z 1.5
XY ... */ FR2 ...
The derivative of the tangent function can be defined in the same way as angle conditions are given for curves, but only a constant angle (in
practice zero) or a free angle can be used.
The essential part of the tangent function, i.e. the inclinations of the surface are stored as part of the owner curve. If the curve is redefined, the
data is removed. Redefinition or updating of the tangent function restores the inclinations. This is done automatically in 'UPDATE surface'.
'UPDATE curve' is the shortest way to remove a tangent function.
The definition of the tangent function is stored formally as an independent object, named by adding a prefix to the curve name. Depending on
whether the tangent function is valid on both sides or one side only, the prefix is T*, T+ and T- respectively, for example:
6. Curve editing
In some cases, a curve is most conveniently changed by using the curve editing facility. Curve editing means manipulating a curve with
commands that directly affect the shape, in contrast to writing a changed alphanumeric description and feeding it to the definition program.
Using editing, the set of definition points for the curve shape can be modified. The location surface is not affected by the editing commands.
EC, curve
Unless specially indicated (command REPEAT), it is assumed that one change only will be done, and exit from the EC subtask is done directly.
EC WL10; MOVE :
after which the point to be moved and its new position is pointed at by the cursor.
There is further the possibility to do the MOVE operation so that the curve continuously follows the cursor. This operation is started by
MOVE I
after which a definition point is selected by placing the cursor at it and pressing the left button down. Keeping the button down, the point can be
moved. After releasing the button, a new point can be selected or the operation finished by clicking the right button. The result is stored
permanently after giving OK.
Unless separately specified, the given curve is not changed, but the result is saved (in the run time memory) as a separate curve named by
adding -F after the curve name. The FAIR command should preferably be used with the automatic drawing on (command AUTO), so that you can
see the result immediately. If the result is satisfactory, you can use the EDIT command on the fairing result, and rename it to give the original
curve, or repeat the FAIR command with the SAVE option.
The following figure shows a (somewhat exaggerated) example of the effect of fairing:
8. Auxiliary functions
The most frequently needed auxiliary functions are the standard commands DES and EDIT, for showing the currently valid definition of an object
or a set of objects. Note specially that the name of a surface, preceded by two asterisks gives the definition of the surface and all the curves it
directly or indirectly depends on, sorted according to the order of dependence. For example
EDIT **HULLF
stores the complete definition of the surface HULLF in the Editor work area. Saving this as a data element gives the possibility to later restore this
version or move it to another project.
When applying DES to a curve, the definition of the location surface is obtained from a saved copy of the original definition. The shape, on the
other hand, is obtained from the internal storage format, and it may differ from the original one in that the points are listed in the order they appear
in the curve. This also has the effect that if frame numbers have been used for x-coordinates, they are retained in the location surface but not in
the shape. This will cause inconsistencies if the frame system is changed later, and it is recommended not to use frame numbers in curve
definitions.
While DES gives the definition of a curve, command LIST presents the result in terms of definition points given by coordinates, sorted as they
appear in the curve and with the inclination shown. At points obtained from referenced curves, the curve name is given. Data in parentheses
means data not contained explicitly in the definition. If a curve reference has resulted in several points, the additional ones are shown in
parentheses. If an angle condition is shown in parentheses, it means that it was not included in the curve definition but obtained from a side
condition.
The following example shows the definition of a curve and the result of the LIST command:
8.2. Drawing
The command AUTO has the effect that curves defined or changed are drawn automatically. The drawing caused by AUTO is done as soon as
the shape is defined. At that stage, the curve definition can still be cancelled by command SKIP.
When drawing curves, command ID D; or ID P has the effect that the definition points are marked, either primary points only (D) or all points (P).
On a colour terminal, ID L can be used to make the definition order visible, by drawing a small segment along the referencing curve at an
intersection point. Normally, one is interested in the primary definition points only (ID D). A typical case where ID P is useful is checking that all
curve references are present.
8.3. Digitizing
Creating a curve by digitizing from a drawing needs no special commands other than establishing the coordinate system on the drawing
(command !GIN). The curve definition is otherwise the same, but instead of entering coordinates from the keyboard, the coordinates are entered
by showing on the drawing, and pressing the button that will cause the coordinates of the points to be added to the input. Usually, it pays to
reduce the number of decimals used for representing digitized numbers from the default value 3 (command !GIN DEC=n).
For example, defining a frame by digitizing is started by the usual commands, for instance
CURVE FR6; X 60
ZY,
Note the comma after ZY, that prevents the command from being finished. After this, the points are shown on the drawing.
While it is possible to insert angle conditions or curve references directly when digitizing, it is usually easier to do it separately, using command
EDIT or EC. A knuckle can be created by entering a double point, i.e. pressing the P button twice.
In most cases, drawing the curve defined will tell what it looks like and what is the cause of possible errors. Probably the most frequent cause for
totally distorted curves is wrong sorting. Typical reasons are wrong projection symbol (e.g. YZ, when sorting must be done by Z) or a small error
on a point which should have equal or near equal coordinate with another.
If the drawing does not tell the result, command LIST gives a detailed description of the definition points from which the curve was created.
For general space curves, the errors 'location surface too small' or 'location surface not unambiguous' causes the problem that no curve is
generated, the shape of which can be studied. Adding option ! to the CURVE or UPDATE command has the effect that the two projections that
could not be combined will be drawn separately. What is drawn is the plane curves available at that stage of the process, and the projection is not
obeyed. If the end points of the projections seem to match, but one of the errors above is still signalled, the usual reason is that one of the curves
shoots over at the end.
This section concerns the definition of curves in the standard mode, in contrast to the spline mode presented in the next section. Note, however,
that section curves are always polygons, and obey the polygonisation tolerance.
The curve shapes are internally stored as polygons. The number of points used for polygons is determined by a tolerance that can beset
permanently under the reference system (GMTOL) or temporarily by the transparent command !TOL. When creating a new version, a tolerance is
selected on the basis of the reference breadth, suitable for project work, typically in the order of 0.01 m. When doing production level fairing, a
smaller value should be set, e.g. 0.001. The polygon spacing is also influenced by a criterion which sets an upper limit on the knuckle between
two segments and on the segment length (fixed).
There is also a criterion that sets an upper limit on the length of polygon segments which can be adjusted by parameter terms=
GMMXS/>GMMXS in the reference system
When attaching a tangent function to a curve, the inclination of the surface is stored at the polygon points. Occasionally, there may be too few of
them to give accurate values between, and for these cases, the options LMAX=l or TOL=tol can be added to the curve definition. They specify a
local change of GMMXS or GMTOL respectively.
For instance, in order to force a maximum segment length of 0.5 m on a waterline, the XY record can start with
XY LMAX=0.5 ...
Curves are handled as polygons in most functions of NAPA. For the purpose of hull definition, the so-called spline mode is provided. This is a
newer development but is now the default, while the old way (referred to as the standard way below) can be considered obsolete XYZ curves and
M2 type curves are always handled in spline mode.
In the spline mode the interval between two consecutive definition points is represented as a parametric, third degree polynomial, the same that is
converted to a polygon in standard case. The purpose of this option is to avoid the small inaccuracy caused by polygonisation. These errors are in
the order of magnitude of the polygonisation tolerance, and are normally without any significance. However, in connection with high demands on
accuracy, the uncertainty associated with the polygon representation can be avoided by using the splines. The spline representation makes the
generation of patch surfaces more reliable, since in a patch surface, the grid curves are represented as splines.
The spline representation is implemented so far as to cover the functions needed in hull definition, including preparation. If the spline mode is on
and the spline curves are available, the following features take use of the spline representation:
Whether to use the spline representation is decided under the reference system by assigning the value SPLINE to the parameter GMTP
the spline mode is set unless there is a model reference system with a different value. For temporal settings, the transparent commands !GMTP
SPLINE and !GMTP STD can be used.
If the spline mode is on, the polygonised spline representation of the definition curves is drawn by the commands PLOT curve or GRID surface.
As a default, the polygonisation is done with the tolerance GMTOL. This can be changed by the option TOL=tol. In spline mode, the polygon
representation is drawn by the commands PLOT <>curve or GRID <>surface.
As a default, the LQ-controlled listing function LIST curve N; describes the spline representation in the SPLINE mode and the polygon
representation in the STD mode. This is changed by the LQ-qualifiers SPLINE or STD, e.g. by the definition LQ CUR NP/STD X Y Z the
coordinates are calculated from the polygon also in the spline mode.
In the spline mode the spline curves are used in the preparation if they are available. This is changed by the preparation option NOSPLINES. The
use of spline curves provides the following advantages:
Patch boundaries are exactly equal to the definition curves, in case there are no definition points between the corner points of the
patches. In the polygon mode small deviations between the patch boundary and the definition curve are possible as a result of small
inaccuracies in the calculation of polygon directions and an approximative method used with space curves.
The number of subdivided patches is reduced, because patch edges that are part of the same polynomial are combined. The need of
subdivision is illustrated in the following example. In the surface S1 no subdivision is done, because the boundary between patches 1,2
and 3 is a single spline segment. In the case of S2, this is violated by the primary definition point in the edge.
The DES command returns the definition by which the curve was made, in most cases one of those described here. However, a curve can be
created by various other means, for example, as a section, by various modifications or it can be imported from another system.
In such cases a curve has no definition that can be modified the normal way, nor can curve editing be used, since this is just another way of
modifying the original definition. However, it is possible to generate an equivalent definition, which within a given accuracy will give the same
curve, and by modifying that definition, the curve can be changed.
This function is handled with the DES or EDIT commands. The equivalent definition is generated automatically if there is no other way of creating
the result, and with option ! it can be applied on any curve. Note specially the result of a GENERATE command, for which DES normally gives the
original definition (with GENERATE), but with option !, it is presented as a direct curve definition beginning with CURVE. The following options can
be used for controlling the result:
!: Generate the curve definition regardless of possible other ways producing the result. This option must be the last one.
BRC=brc: Number of branches to be converted. As the default, all branches of the curve are handled. If the curve has many branches,
the suffix 'I', where I is the number of the branch, is added to the name of the generated curve.
AC=END: Add angle conditions to endpoints. In the default case this is only done when special angles are detected.
KTOL=val: Tolerance for knuckle detection. When the direction of the curve before and after a point differs more than 'val', the point is
considered a knuckle (not only result of polygonisation).
Note: the result is the displayed definition only, and the original curve is not affected. Only when running the definition (with or without
change of name), a new curve is created.
9. Point objects
A point object defines a point in space, i.e. a place defined by an x-, y- and z-coordinate. Obviously, the geometric properties of a point object are
trivial and the importance of point objects is from the point of view of data management:
the dependence between several objects can often be handled most efficiently by having them dependent on common point objects
in the definition of the point object itself, relations to other objects can be created (presently curves and other points)
Other alternatives will be described below. 'description' is an optional text as in other types of objects.
In the definition of points, references to other objects can be made the following ways:
(p,y,z): as the standard form, but x is taken from the point 'p', for example (P,0,5). Similarly y and z.
(p+d,y,z): as above form, but a translation d is added to the x-coordinate obtained from P, for example (P-0.1,0,5). Similarly y and z.
p(axis+q): point 'p' translated the distance q along 'axis', for example P1(X+12)
curve/axis=q: the given point on the given curve, for example STEM/Z=4
curve1/curve2: the intersection point between the two curves, for example KNF/FR6
curve/RP/n: a rounding point on the given curve, similarly other definition points
Point objects can be used in a number of contexts, where syntax (x,y,z) is available and in some places where only two coordinates are given,
e.g. (x,y) or one, e.g. X x.
In curves defined by space points (command XYZ), a point has its obvious meaning. In projections (commands XY ... YZ), the two coordinates of
the point, corresponding to the projection, are taken, while the third one is ignored. Thus, in order to make the curve actually go through the point,
it must be mentioned in both projections. In references to curves, the syntax name/point can be used for selecting between multiple points. In the
definition of the location surface or in the definition of planes in general, a point represents the relevant coordinate(s), for example
In other contexts than curve definition, there are the following places where point objects can be used:
TOP P1 pyramids
In the calculator functions COORD, DIST, GM.INSIDE, locations can be given by point objects. In the quantity LOCTN used by SM and WG,
positions can be represented by point objects, giving one or all coordinates:
P location=point P
Point objects can be plotted with the same commands as curves. In the storage format of the point object, there is a cross formed by three lines,
one in each coordinate direction, which is used when plotting the point. Points can also be plotted by using markers if so specified by command ID
POINT.
The size of the cross is by default 0.01*lref, but it can be changed by adding it in the POINT command. The plotting obeys the same control as
plotting of curves, including ID NAME.
Another way of plotting a point is using the TEXT command for plotting a marker at the location of the point. The TEXT command can also mark
the name of the point, and the text reference point can be selected to give the desired relative location between the marker and the name.
PLOT P1
TEXT #15 P2; TEXT P2 P2 (20)
TEXT #12 P3; TEXT P3 P3 (24)
The dependence of points on each other or the mutual dependence of curves and points is handled exactly as for curves: the dependence is
recorded and taken into account by commands such as DES *name and the recalculation is executed automatically.
1. Introduction
2. Main principle
3. Patch, NURBS, grid and wireframe surfaces
4. Surface preparation
5. Combined surface
6. Deciding inside and outside
7. Side conditions
8. Special questions
8.1. Special considerations for patch surfaces
8.1.1. Subdivision to obtain four sided patches
8.1.2. Triangular patches
8.2. Determining the surface border
8.3. Missing intersection points
8.4. Surfaces with common curves
8.5. Parallel curves
8.6. Cones
8.7. Defining a partial surface
8.8. Wireframe surfaces
9. Restrictions
9.1. Number of curve elements in a surface element
9.2. Restriction on topology
9.3. Convex surface elements
9.4. Restrictions on the shape of a surface element
9.5. Closed curves
9.6. Coinciding curves
10. Syntaxes
10.1. Simple general surface
10.2. Combined surface
10.3. Preparation
11. Common definition commands
12. Updating a surface
13. 'Description' command
14. Drawing functions
15. Using surfaces in volume calculations
16. Asymmetric hull forms
17. Hints for fairing
17.1. Purpose of the hull definition
17.2. Selecting the curves of the grid
17.3. Selecting well behaving areas
17.4. Location of definition points
17.5. Selecting the order of definition
17.6. Usage of tangent functions
17.7. Intersections between curves
17.8. Curves to check fairness
18. Best practices for NURBS surfaces
18.1. How to choose boundary curves
18.2. Role of primary and secondary curves
18.3. Selected preparation options
18.4. Hull surface to one with the Text Editor
19. Modified surfaces
20. Exporting surfaces
20.1. Patch topology
20.2. Preparing patch surface to be used in general CAD systems
20.3. Tolerances
21. Check list
1. Introduction
This chapter presents the definition and modification of so called general surfaces, that is, surfaces of arbitrary form, in contrast to elementary
surfaces such as planes, spheres, etc.
In most cases, this subject is the same as hull definition, since that is by far the most frequent case where this type of a surface is needed.
However, the definition of a general surface does not imply that the surface represents a hull surface, and any surface occurring in the ship, which
cannot be defined as an elementary surface, can and must be defined as a general one. Conversely, if the hull form is simple, an elementary
surface may be useful to represent it. The floating object representing the hull in a calculation may be the result of a room definition, where the
bare hull surface is combined with other objects such as the main deck.
This chapter describes the direct definition of non-combined general surfaces and combining such parts. The definition of the curves on which
such surfaces depend is presented in the preceding chapter. Other relevant subjects related to definition are presented in the following separate
chapters: transformations, the Hull Surface Editor and importing surfaces from external sources (link functions).
This document contains mainly the theory, while examples and exercises of a patch surface can be found in the Introduction to NAPA book.
2. Main principle
A general surface is defined by giving a set of curves in the surface forming a grid. Some of the curves have special functions, forming the outer
limit of the surface, knuckles, limits of plane areas, etc. Other curves simply fill the spaces between these curves.
Usually, the curves are restricted to the surface being described, but the curves are allowed to extend over the surface border, and a curve may
be part of more than one surface.
This is illustrated by the following example, giving a complete, although trivial surface definition:
Patch surface
Patch surface is the default. In general, there is no reason why a grid surface should be used. Occasionally, it may be used because it is less
sensitive for errors in the grid. A NURBS surface can be used if more accurate level of fairing is needed, for example, a continuous curvature of
the surface. In surface definition it is the option 'P' for a patch surface.
In a patch surface, surface equations are generated for the surface elements formed between the curves. There is therefore a uniquely defined
surface.
Therefore, the patch surface has the advantage that regardless of the grid spacing, all sections will be consistent, while there may be differences
between sections in different directions inside a surface element in a grid surface. From the fairness point of view, the surface generated in the
patch representation usually gives a better result than the curve interpolation associated with the grid surface. Both these aspects mean that a
patch surface can be made with fewer grid curves and it will still give a better result than the grid surface.
NURBS surface
A NURBS surface is mainly defined the same way as a patch surface, but the curves have to be categorized. The hierarchy of the curves consists
of three classes: boundary (BND), primary (PRI) and secondary (SND) curves. While in patch surface all the curves are taken as a patch
boundary, in NURBS surface the boundary curves are the edge curves. The primary and secondary curves support the surface creation, but they
do not affect the actual patch boundaries. This helps to reduce the number of patches compared to a patch surface. The type in the definition is
also 'P'. It is the use of boundary curves that triggers that the NURBS preparation options are used.
It is recommendable to use a NURBS surface if there is a need to export the surface e.g. to IGES format. NURBS surface is continuous with
boundaries whereas with the patch surface there can easily be gaps. Also, if there are requirements about accuracy or angle conditions with the
receiving program, it is recommended to use a NURBS surface as the preparation options can be controlled better.
In the NURBS surface the boundary curves define the edges of the patches. Basically, the definition for patch and NURBS surfaces is the same
but with NURBS surfaces at least the boundary curves are defined separately. These patches should always be four sided or less. Intersection
points of boundary curves are considered as node points i.e. corner points of a patch. If there are more than four sides, the preparation of that
part of the surface fails. The patches should be just about parallel to ensure the best possible quality of the resulting surface. Twisted elements
and sharp corners should be avoided in elements.
The surface generation also needs support from primary curves. Therefore, it is a good idea to define a primary curve close to the boundary
curve. This helps in the generation of the surface shape when it leaves the boundary.
In the patch surface all the curves are primary. When boundary curves will be selected, NAPA automatically creates a NURBS surface. With the
patch surface 'less is more' with the grid definition and it creates a better result but with the NURBS surface as many curves can be added as
needed.
Grid surface
The grid surface is a general surface in lower level than the patch and NURBS surfaces in NAPA. In a grid surface, the surface inclination is
calculated at the grid curves, and with the aid of this, interpolation is made between the curves. Grid surface can be changed to patch surface by
changing the type from 'G' to 'P' and checking that all the connections between curves are working.
Wireframe definition
The wireframe surface is a general surface in a lower level than the grid, the patch and the NURBS surfaces of NAPA. There are less
requirements for the grid. A wireframe surface can even be defined by totally disconnected curves at the cost of lower quality of some
intersections. More information about working with wireframe surfaces can be found under chapter Special questions, Wireframe surfaces.
In the figure below, NURBS and patch grids and surfaces are compared. In a patch surface all the curves limit the generated patches but in a
NURBS surface only the boundary curves act as patch edge curves. Therefore, a NURBS surface consists of a smaller number of patches. In a
NURBS surface the control points are administered with preparation options where as in a patch surface definition curves are followed more
strictly. As the patch generation in a NURBS surface is controlled with boundary curves, it is possible to add as many other types of curves like
waterlines, buttocks and diagonals.
4. Surface preparation
Before sections can be made from a general surface, it must undergo an operation called preparation, where the actual surface definition is
created from its components (definitions points, angle and tangency information mainly from curves).
The central tasks in this process are to find the individual surface elements and (for grid surfaces) to calculate the surface inclination or (for patch
The result of the surface preparation is stored independently of the curves. It will therefore not be affected by later changes in the curves, unless
the preparation is repeated. When using the surface, a warning is obtained if the surface has been updated by the explicit updating command, but
otherwise it is not checked whether the preparation is up-to-date.
The result of surface preparation is stored in descriptions named S*name for grid or P*name for patch or NURBS surface respectively, where
'name' is the name of the surface.
5. Combined surface
It is usually more convenient to define a hull in parts and the whole hull as the combination of the parts. A combined surface is defined as
combined objects in general, by listing the parts, to which optionally transformations can be added.
In contrast to combined rooms, a combined surface is treated as one surface if possible, that is, the sections of the parts are concatenated if there
are end points coinciding with the start point of another part.
Typical dividing places are the midship on a conventional hull or the centerline of the half ship of a catamaran, where there are easily handled
continuity conditions.
To ensure a continuous, combined surface, the curves should also continue through the surface edges, e.g. the flatside curve of the fore part
should continue from the flatside curve of the middle part. Curves ending to surface border without continuation can easily cause gaps in the total,
combined surface.
In contrast to the elementary surfaces, where the orientation is decided on the basis of the geometry, that of a general surface is provided in the
definition. If none is defined, the surface is assumed to have the outside in the direction of the positive y-axis and the orientation y (i.e. oriented
as a plane with y=constant). This default has been found useful for conventional hull forms, which is by far the most common purpose of general
surfaces. For an unconventional hull form or for a surface that is not a hull form at all, the default may have to be changed by using the OUTSIDE
command in the surface definition.
The preparation starts by searching for a grid opening having the orientation specified for the surface, so that one can reliably tell what is the
inside and outside. For the rest of the surface, the inside/outside of the elements follows from that of their neighbours. If there is a curve with an
own definition of outside, this process starts with it; otherwise, the curves are used in the order they are listed in the surface definition.
It is necessary to redefine the assumed orientation +y if the surface is such that no elements are oriented that way (a deck, for example),
because no starting element will be found. It is wise to do so any time the surface has another orientation or the process above gives the wrong
result; otherwise, there may be problems in room definitions. For example, a surface representing a deck should be equipped with the following
additional definition:
OUTSIDE Z
The outside of the surface can be interpreted incorrectly if the surface contains parts where the orientation is right but inside/outside is reversed,
as can happen near a tunnel or twin skeg, and the starting element happens to be found at such a place, as in the example.
If no direction is suitable as orientation, or if the surface is closed, the outside can be controlled by defining it locally for a curve, as will be
presented later.
In order for the inside and outside to be well-defined on a combined surface, the sides must be defined in a consistent way on the parts of it. The
inside/outside decides the direction of the section curves, and if it is not consistent, the sections of the parts of the combined surface will have
different directions and they will not be concatenated.
7. Side conditions
The term 'side condition' is used for information associated with a curve, concerning the behavior of the surface in the neighborhood of the curve
and consequently, also the behavior of intersecting curves.
The side conditions are taken into account when defining intersecting curves and at surface preparation. For intersecting curves, a side condition
replaces information that otherwise would have to be provided in the definition of that curve, and at surface preparation, some side conditions
provide information about the surface tangent, replacing calculation of it.
Usually, side conditions are given as part of curve definitions, but exceptionally, side conditions can also be given with the surface definition.
It may be necessary to define the inside/outside of the surface locally at a curve, which is formally done in the same way as a side condition.
Usually, a reliable alternative is to say O=R or O=L for a frame. O=R (right) would be used for a conventional hull surface when the frame is
defined so that its direction is up.
Side conditions are supposed to provide more accurate or reliable data than the grid, if there are conflicts. It is therefore better to omit a side
condition than to give an even partially misleading one. Some side conditions (e.g. constant inclination of the surface) directly give the direction of
the surface normal at a given point on a curve. In such cases, this direction is compared with the normal obtained from the grid. If there is a
difference, a warning is given, and the direction given by the side condition is used.
Since side conditions in practice concern the curve definitions, they are presented in more detail in connection with this subject.
8. Special questions
The surface patches are always four sided, although one side may be reduced to zero. Therefore, if the grid contains openings with more than
four sides, these will be divided. In a well-defined grid, these divisions should not affect the quality of the surface. However, one should avoid
having three curves almost coincide, because this results is a narrow element in the subdivision, where any inaccuracy is magnified. In general,
three curves should either intersect in clearly different points or in exactly the same one.
Example of a grid violating the principle above, showing the narrow patch created by subdivision
If two curves intersect with bad angles so that the tangent plane is incorrect, this will cause incorrect subdivision.
If a grid opening has only three sides, the standard solution is to represent it as a four sided patch, where one side has zero length. As an
alternative, there is the option to use genuine three sided patches. The difference between the two solutions is illustrated by the following figure:
Three sided surface elements represented by degenerated four sided patches (left) and genuine three
sided patches (right)
Experience has shown that in a fairly flat area, as in the neighborhood of the flatside, the genuine three sided patch gives better fairness, while
the other method is better in highly curved places. The usage of triangle patches is therefore controlled by a flatness criterion. This criterion is
expressed by the change of the normal inside the patch, and it is given by the TP option in the PREP command, for example:
This criterion means that triangle patches shall be used in patches where the normal changes less than 5 degrees.
In some cases, it may be difficult to determine whether a set of curve elements form a surface element or whether they form the border of an open
surface. The problem is illustrated in its most plain form by the following, perfectly admissible grid, representing a cube:
From the grid only, there is no way of knowing whether the cube is intended to be closed, and if not, what side shall not be included.
There are a number of criteria by which this question is decided, and in practically all cases, these are sufficient to solve the border curve problem
correctly. For additional reliability in connection with conventional ship hulls, curves in planes y=0 are assumed to be border curves. Any side
condition, also an empty one, overrides this assumption, and it must be given if the assumption is false. The message 'assumed border curves' in
the preparation diagnostics is added in order to remind about this.
The most frequent error in the structure of definition grids is formed by missing intersection points, i.e. two grid curves that should intersect but do
not. Occasionally, in connection with a so-called implicit intersection point, the reason may be that the program has not been able to find it. In
such a case, the point must be made explicit, i.e. by a reference in the curve definition. You should pay attention while using syntaxes =#, < and >
as in many cases they result in multiple possible intersection points.
The effect of a missing intersection point may be that a surface element will be omitted or that surface elements are combined. The following
figure shows the basic cases:
Effect of missing intersection points in a corner and in the middle of the patch surface
A missing intersection point at a triangular surface element often has the effect that a larger number of surface elements are lost.
In all cases, curve elements will be omitted. The list of omitted curve elements obtained at preparation will therefore tell where to search for
missing intersection points. In order to add convenience, the list of omitted curve elements can be obtained graphically.
Another way of verifying the result of preparation is drawing the surface with random filling (FILL RND; PLOT surface), causing each surface
element to be drawn with a different filling.
Drawing the grid with option ID P; can be used in order to verify that all curve references are present.
In a NURBS surface the references are not necessarily needed between primary and/or secondary curves. But intersections with boundary curves
are as critical as with a patch surface.
A curve may be used in several surfaces simultaneously. The most frequent case is the common border between two connected surfaces.
If such a curve has a side condition, it must be valid for all surfaces the curve belongs to, or it must be overridden by side conditions given
separately with each surface.
If the common curve is dependent on curves in one of the surfaces, the other surface will also be dependent on these. It is therefore usually more
convenient to make such curves independent. The most frequent case of a common curve is the section where the afterbody and forebody meet.
If this curve is, for example, placed through the flat of bottom curve of the forebody, a number of curves in the afterbody become formally
dependent on the flat of bottom curve in the forebody, causing unnecessary recalculations.
If two grid curves are parallel at an intersection point, no inclination can be calculated the normal way. Instead, it is attempted to find the surface
inclination by inspecting the curves at some distance from the point. However, this is only possible for curve branches going in the same (=not
opposite) direction from the point, and in any case, the result may be inexact. If parallel intersections cannot be avoided, one should add a third
curve, giving a well defined tangent plane. Side conditions providing the inclinations can also be used.
If the inclination cannot be determined, the error 'bad curve combination' is signalled and the corresponding surface element is omitted.
Example of a curve (dashed) placed at a point where two curves are (almost) parallel
8.6. Cones
When two curves intersect, the inclination of the surface tangent is calculated on the basis of the associated curve tangents. There is, however,
the possibility that the point in question forms a 'singularity', where this principle is not valid. This is the case at the top of a cone, where a bend
vanishes so that the radius approaches zero. If this type of behavior is necessary, the top of the cone must be isolated by a nearby curve.
Normally, this type of a surface should be avoided by having the radius vanish by becoming straight. The following figure shows a common case -
finishing the softnose.
A partial surface means here a surface that does not cover the whole grid.
Regardless of any additional information, a surface can only be created where there are closed surface elements formed by the grid curves.
Therefore, it is often possible to restrict a surface simply by omitting suitable curves from the surface definition. If, however, the remaining curves
do intersect outside the part desired, the surface can be restricted by adding side condition E to the border curve. If the surface ends at the right
side of the curve, the E should be placed after it or vice versa. In case of doubt, the question can be decided by experiment. For example,
supposing that the surface HULLF2 is to be restricted so that the part to the right of curve FR12 is omitted, the definition will look like
SURFACE HULLF2
THROUGH STEM FBF WL1F, .... FR12 /E, ....
Filled: surface restricted by omitting curves FR6 and FRM. Darker filling: side condition E added to FR9.
The restricting function may go wrong if the starting element (see section Deciding inside and outside) happens to be found on the wrong side of
the dividing curve. This can only be corrected by rearranging the curves in the definition so that it starts with curves on the correct side.
If changes are to be made outside the part in question, and one wants to be sure that this part will not change, the simplest solution is not to
repeat the preparation. However, it is normally not satisfactory to have a surface without the curves it depends on, so that the curves must be
fixed also. This, again, is most easily done by not touching them at all. If it is necessary to modify the curves outside the surface part in question,
one must fix the inclination at the surface borders (before preparing the partial surface).
SUR name W
THR curves
optional commands OUT, CSECT, SYM, WO
The wireframe surface is a general surface in a lower level than the grid and the patch surfaces of NAPA. No preparation is needed, and there are
less requirements for the grid of the surface. The connections between the grid curves are not so important because the surface elements (facets,
patches) are not supposed to be implicitly defined by the grid. A wireframe surface can even be defined by totally disconnected curves at the cost
of a lower quality of some intersections. For example, a surface defined by waterlines can be well working for the purpose of making x-sections,
but useless for the z-sections.
Plane sections from a wireframe surface are internally done by the curve definition functions. For example, the intersection SEC HULL; X 10; is
implemented as CUR X10; X 10; YZ ** *HULL; i.e. the grid curves are intersected with the plane and the intersection points are ordered by the
general sorting method. After the curve definitions are done, the definition data is removed, the correct direction is calculated, the different
branches are separated, and some optional modifications (see WO EC ON) are done.
If the DR commands STORE and NAME have been given, the definition curves that are created while intersecting are stored into the database.
By using STORE +; these curves are added to the wireframe surface also. Both kinds of storing are cancelled by STORE -. Note that an
intersection created by the GEN command e.g. GEN X10 HULL/X=10 is not a definition curve in contrast to the curve created by SEC HULL;
NAME X 10; STORE; X 10;.
Because the surface elements are not implicitly defined, the identification of the boundary and the outside of the surface is more difficult. Some
assumptions are made by NAPA, but still there is likely to be more need for the side conditions E and O=outside of the grid curves, or perhaps a
need to modify the assumptions of the program (by options WO EX, etc).
An example about the vague boundaries is shown below. The grid is defined by the waterlines and the centerline. As a general guide you should
define the side condition E for the centerline. Here the correct result is obtained by the assumptions of the program, but different interpretations
are also possible.
As a default, the direction of the intersection is calculated from the defined outside of the surface (that is defaulted to OUT Y). This data is applied
to each intersection separately without knowing the global behavior of the surface. Local exceptions to the outside must be defined by the side
conditions O=outside attached to the relevant curves. If there are curves with conflicting O=outside definitions, the OUT definition of the surface is
used. If neither of these can be used, the direction is selected so that it corresponds to the normal hull form.
Options for the wireframe sections are defined either directly in the surface definition by the command
WO option alternatives
The parameters 'option, alternatives' of the WO and the !GM WSEC commands are the same. An option that has been defined by the !GM WSEC
overrules the corresponding option of the surface. The user-defined options are shown by the commands WO; and !GM WSEC; without any
parameters. All options (including the defaulted ones) are listed by the commands
S> WO LIST
DEF> WO surface
LIST
!GM WSEC EX
SYM UMIN VMAX ;** default
!GM
WSEC GRID ON ;** default
The command WO LIMIT limits; defines a limiting box for the intersection curves. Intersection points with the grid that are outside the limiting box
are omitted. The curve is defined only through those points that are within the box. The limits are given with the syntaxes X>xmin, X<xmax, ...; or
by xmin, xmax, ymin, ymax, zmin, zmax, where the - character can be used for a redundant limit.
The commands WO EX ...; WO EY ...; WO EZ ...; control the selection of endpoints of the x, y and z-sections. An intersection point is always
classified as an endpoint if the intersected curve has the side condition E; or if such a classification be inferred from the structure of the grid (with
the default WO GRID ON). Additional endpoints are defined by the commands WO EX endpoints; etc. If no endpoints are obtained, the program
does not create a closed curve, but it eliminates the worst looking segment.
The following alternatives are available for the additional endpoints. The coordinates u and v, are the local coordinates of the intersection plane.
For x-sections u=y, v=z; for y-sections u=x, v=z; and for z-sections u=x, v=y.
etc.
WO EY VMAX US/VMAX
The defaulted definition WO EC ON; is used to force all intersections within the box of extreme coordinates of the surface. The definition curve
can go outside the box, but in this case the result of the intersection is modified. If you want to store the definition curve, it is probably better to
add the correct side conditions to the relevant grid curves (e.g. the flat bottom) so that the modifications of WO EC ON; are no more needed. The
modifications can be turned off by WO EC OFF;.
The command WO SORT ...; can be used to give instructions to the ordering of the points. The default is WO SORT OFF;. A user-defined order is
given by WO SORT axis qmin qmax rule;. The parameter axis defines the type of the plane section where the rule is valid (=X,Y or Z). The rule is
applied only between the limiting coordinates qmin and qmax. These are optional, and the character - can be used for a dummy limit. The
following rules have been implemented:
but there can be other grid curves between the given ones.
The defaulted command WO GRID ON; implies that the ordering of the intersection points is not only dependent on the coordinates of the
intersection points, but also on the geometry of the intersected curves in the neighbourhood. Because the method is not totally general, it can also
be turned off by WO GRID OFF;. Difficult cases are those where the orientation of the surface varies greatly (so that nearly opposite directions
are found) within the set of the intersection points.
The command WO RESET; sets all options back to the default values of the program. The same can also be done for each option separately e.g.
by WO HULL EX RESET;.
The command !GM WSEC SCOPE G; defines that plane sections from all general surfaces (patch; grid, wireframe) are done by the wireframe
routines. The default is !GM WSEC SCOPE W; i.e. wireframe routines are used only for the wireframe surfaces.
The command !GM WSEC DEBUG ON; activates a debugging of the intersections. A number of check commands are available and explained
within the debugger.
9. Restrictions
Some of the following restrictions are deliberately added in order to make it easier to detect definition errors such as missing intersection points,
and to make it easier for the system to recover from them.
A surface element must not contain more than 15 curve elements. A curve element is the part of a curve between two node points. This limit may
occasionally be exceeded in places such as the flatside, when formed as one piece. The problem is simply corrected by extending some curve
through the flatside.
The surface must be such that the inside and outside form two undivided and mutually unconnected areas.
A once twisted Mbius ribbon violates the latter restriction. The first restriction is violated by a surface such as the one below.
The surface elements must be convex in the sense that when moving round the surface element, the angle at the node points always changes in
the same direction. There must be no 'inner corners'.
Within a surface element, the normal to the surface must not change more than about 120 degrees. Larger changes are supposed to be the result
definition errors. If this case arises, the surface element must be divided.
While it is possible to define a closed surface, closed curves may not be treated correctly at surface preparation. A closed curve must therefore be
divided.
It is not allowed to have curve elements doubly defined in the grid, i.e. two grid curves at least partly coinciding. A violation of this restriction is
rare, but when it happens, there are usually strange effects. Locating the error may be difficult, because the grid is likely to look normal.
10. Syntaxes
The following sections provide the details about the commands by which the definitions are made.
A simple general surface is one that is defined directly by the grid, as opposed to a surface defined as a combination of surfaces.
The general format of the definition of a simple, general surface is the following:
The SURFACE record initiates the surface definition. Option P makes the surface a patch surface.
'type' is optional and defines the type: G=grid, P=patch or NURBS, W=wireframe. The default type is the one stored in the installation parameters
or given by the parameter GMST in the reference system, usually type 'P'.
The THROUGH record gives the list of grid curves. Normally, it contains simply a list of names, but if needed, the curves can be equipped with
side conditions as follows
where sc1 and sc2 stand for side conditions valid on the left or right side respectively, both of which need not be given. The syntax is as
presented for curves. Example:
The OUTSIDE record is optional and defines the outside and orientation as presented above. 'axis' stands for X, Y or Z. The half-axis concerned
is expressed by + (default) or -, e.g. OUTSIDE -X. If no direction is useful as orientation, OUTSIDE -; can be given to avoid that a misleading
orientation is assigned. A local definition of outside on one of the grid curves is then needed, e.g.
telling that the outside of the surface is to the right of this curve, when looking at it in the projection plane.
The PO record gives preparation options. The parameters of this command are preparation options, in the same form as in the PREP command.
Please notice that patch and NURBS surfaces have different preparation options. If the preparation options are not defined, default ones are
used. You can also return the default values by removing PO line from the surface definition.
Example:
PO U TP=5
The effect is the same as doing the preparation with the command
(Do first an update of the curves and set the triangle patch option.)
The option AU, automatic update, is relevant only when stored permanently with the PO command. It has the effect that updating of curves and
preparation is automatically started when needed.
In the case of a conventional hull surface, the definition usually contains only the SURFACE and THROUGH record, for example:
SURFACE, HULLF
THROUGH, STEM, CLF, FRF, FBF, FSF, KN1F, DECKF,
WL1F, WL2F, WL3F, WL4F, WL5F, FR6, FR7,
FR8, FR9, FR10
With the NURBS surface there are additional lines defining boundary and secondary curve classes. By default the curves are primary if nothing
else has been defined. So all the curves in the NURBS surface are mentioned in THR line and again in BND or SND line. If the curve is only in
THR group, the class is primary.
SUR, HULLF, P
THR FRF, STEM, FBF, FSF, DECKF, WLF1, WLF2, KNF, FRF2,
FRF3, FRF4, FRF5, FRF6, FRF1, TF1, TF2, TF3, TF4,
TF5, FRF7, FRF8, FRF9, FRF10, FRF11, FRF12, WLF3,
WLF4, WLF5, WLF6, WLF7, WLF8, FRF13, WLF9
BND DECKF, STEM, FBF, FSF, FRF, KNF, FRF4, WLF2, WLF1, FRF1
SND WLF3, WLF4, WLF5, WLF6, WLF7, WLF8, TF3, TF1, TF5, WLF9
Transformations can be attached to the partial surfaces, but they are not taken into account in all functions (e.g. GRID command). The optional
records OUTSIDE and DMAX can be added.
Example: the surface HULL is defined as the combination of the parts HULLA and HULLF:
SURFACE HULL
COMBINE HULLA HULLF
It is required that the outside is defined consistently for the parts; otherwise, the partial sections will not be combined. The orientation is
automatically defined if all parts have the same orientation. It can also be defined by the optional record OUTSIDE as for simple surfaces.
When intersecting a combined surface, the contributions from the partial surfaces are connected as far as there are matching combinations of
endpoint+start point. The gap accepted is quite large (0.1m) and it can be changed either by the !GM GTOL or by the optional record DMAX.
When combining the parts, a modification formed by a translation, reflection or rotation can be added. The alternatives are
For a closer description see !EXPL TRA/GEN. Rotations are considered a test feature. The transformation is added in parentheses after the name
of the surface. The following example creates a catamaran, when given a surface defined at the center plane:
SURFACE CATAMARAN
COMBINE HULL(Y+10) HULL(Y/5) HULL(Y-10) HULL(Y/-5)
10.3. Preparation
A simple general surface (grid, patch or NURBS) must be prepared before sections can be made from it, by using the command
PREP, name
where 'name' is the name of the surface to be prepared. If the surface is a combined one, all partial surfaces are prepared. Options for grid and
patch surfaces are
* U: (update)
Before preparing, update the curves of the grid.
* KD: (keep date)
If the preparation is done without a significant change in the form, this option can be given by which it is avoided that the date of the
surface is changed and consequently, calculation sections and similar dependent data become obsolete.
* SI: (smooth interpolation)
This option concerns grid surfaces only, and affects the interpolation of tangent functions. In a well-defined grid, this option may improve
the result; otherwise, it is safer not to use it.
TP: (triangle patches)
Sets the angle limit of which triangle type patch is used
TEST
For temporary testing of different features
TOL: (Tolerance of curve/curve intersection)
Two curves intersect if the distance is less than the tolerance
ATOL: (Angle tolerance of curve/curve intersection)
small, the number of the points cannot be reduced. 20-30 is a good starting value.
ETOL: (Internal curve fitting tolerance)
Controls how precisely the surface fits to the definition curves inside the area limited by the boundary curves. Larger tolerance will result
in smoother surfaces in general but a larger offset from the definition curves also.
G: (Grouping)
G=1 for uniform parametrisation i.e. the same distribution of control points at both sides of boundary curve. Creates a structured grid.
G=2 to keep linear areas also i.e. the resulting surface element is of first degree and there are less control points.
NTOL: (Maximum angle of inaccuracy at boundaries)
Controls how much the surface normal distributions are allowed to differ from the normal information that is collected from the grid curves.
IMAX: (Number of iterations in surface fitting)
Is used to improve the surface fitting at the final stage of the preparation.
SOPT: Additional options for NURBS fitting.
GTOL: Gap elimination tolerance for plane sections of the surface.
Command PREP LD; lists the diagnosis from the preceding preparation. Command PREP DD (draw diagnosis) causes omitted curve parts to be
drawn.
The warning message 1041, 'reference curve younger', means that a grid curve has not been updated after one it depends on has been
redefined. This message should be taken seriously, unless it is certain that the redefinition did not cause any change, even in the polygon
spacing.
CSECT
Gives instructions about the number and placement of the calculation sections. It is also possible to add instructions regarding the plate thickness.
This command is treated in more detail under room definition.
SYM
In contrast to rooms, this command does not influence the form, but controls calculations involving the area, so that the symmetric part is added.
See below for the analogical question regarding volumes.
RC
This command defines a reference coordinate, i.e. the coordinate used when a position is expressed in the form #name or #name+d. Without this
command, the reference coordinate is undefined. It should not be defined unless there is a natural interpretation for it, for example, an almost
horizontal deck.
UPDATE surface
This command has the effect that all curve dependencies are checked, and where there are curves dependent on a changed one, they are
recalculated. Usage of the UPDATE command is recorded, so that a warning can be given, if the surface is used without repeated preparation.
With option F (force), all curves are recalculated, regardless of dependence on a changed one. One example of a case when this can be useful is
updating the surface after changing the polygonization tolerance.
The UPDATE command can also be given for individually selected curves.
If there are cross referencing curves, the curves cannot be sorted so that all references are backward, and the update is likely to be incomplete.
The system will tell a set of curves where the references form a loop. The fastest way to avoid the problem is to place one of the references in the
loop into parentheses. This causes no change in the geometry, but a new primary point is introduced.
Updating the curves does not imply preparation, which must be started separately with the command PREP. If the preparation option AU
(automatic update) has been set with the command PO AU, both updating of the curves and preparation will be started automatically when the
surface is needed in a context requiring preparation and a component it depends on has been changed.
DES **HULL
produces the complete definition of the surface. So two stars show the definition with two levels back. With fours stars
One star option can be used also e.g. in curve definitions: YZ *HULLF returns a list of references from the surface HULLF on the specified
location plane.
For setting up the drawing environment, the commands PROJECTION and SIZE are usually sufficient. Grid curves can be drawn using the PLOT
command or all at a time with the GRID command. For a NURBS surface, the boundary curves can be drawn with the GRID command and option
BND. The surface can be also drawn with the PLOT command. Command AUTO is normally useful for automatic drawing of changed curves. For
drawing section curves, the command SECT is needed for selecting the surface to intersect and command X, Y, Z and H for doing the sections.
Important control commands are ID D; for showing primary definition points and (less often) ID P; for marking all definition points. Possibly, one
needs to have the names of the curves shown using ID NAME.
COLOUR *; is useful for showing the curvature by using colouring, which is a very efficient way of detecting small errors in the fairness.
A complete graphic feedback requires that the curves are viewed in all projections. The most convenient way is to set !VIEW 3D, making it
possible to change the projection without redrawing or to use PROJECTION I.
Option DMAP (dependence map) in the GRID command gives a fast overview over the definition order by drawing the curves in that order and
using brighter colours for more primary ones.
The typical hull surface is normally an open surface representing only the half with y>0. In order to obtain volumes, the logical thing to do is to
create a closed object by a suitable room definition. However, in this case it has been considered practical to allow volumes to be calculated
directly from this type of surface. It is implicitly closed by its symmetric counterpart and the upper limit. The nominal volume, obtained when no
For this principle to be applied, the name of the surface must contain the hull identifier defined in the reference system (parameter HLID under
REF), or the option H must be given in the CSECT command.
The main principle is that all parts of the ship must be defined directly (not port side only), usually as several parts, and a combined surface is
made from the parts.
the normal assumption that the outside at +Y is not valid for parts on the starboard side (add command OUT -Y).
using a bare hull surface for volume calculations is possible only if the surface represents the positive half of a symmetric surface.
Otherwise, a room must be defined as in the example below.
The task is slightly more complicated, if the surface is only partially asymmetric, and one wants to exploit this by defining only part of the hull on
the starboard side. The following example shows how this can be done.
SURFACE HULL
COMBINE HULLAS HULLAP HULLF HULLF(Y/0)
The reflection involved here represents a seldom used feature and it is not supported in some commands (e.g. GRID). (If HULLF is combined, it
may be safer to add the parts directly).
ROOM STABHULL
LIMITS <HULL Z<DECK
One can also define a room by adding the longitudinal parts separately. The following example uses the surfaces above:
ROOM STABHULL
LIMITS - 40 HULLAS HULLAP - DECK
ADD 40 - <+HULLF Z<DECK
(Assuming that the midship is at x=40). As a general rule, the combination of partial surfaces is more reliable than adding partial rooms, provided
that the parts meet correctly.
The optimal way of defining a hull depends on the purpose for which it is made. If the hull is created for project work, the demands on fairness are
moderate, while it is likely that the surface will undergo many changes. It is therefore useful to have a grid formed by easily handled curves
(usually frames and waterlines) and a minimum number of primary points.
The higher the demands on fairness are, the more important it is that the grid is geometrically correct. The number of primary points can be
higher, because changes are less frequent and there is more need to fix parts of the surface against influence from changes elsewhere.
A special case is formed when there is a given form (on paper) simply to be reproduced. This is usually done most easily by feeding enough
points, normally by digitizing, without the need to pay much attention to an optimal grid structure or definition order.
In deciding how to define a surface, there are two questions that can be called strategic: the selection of grid curves and the order in which they
are defined.
Some curves must be included in the grid: the borders of the surface, knuckles and essential discontinuities of the curvature. These are referred
to as special curves, and they are usually defined before the other curves. Normally, it is obvious what these curves are - at most one can discuss
whether the border curves of the flat of side, flat of bottom, softnose or similar need to be considered essential discontinuities of the curvature. In
high quality fairing it can pay to add other special curves such as inflexion curves of curves or turning points (such as the top of a tunnel or the
maximum breadth of a bulb).
The rest of the curves have as the only function to span the surface between the special curves, and there is some freedom regarding their
selection.
The essential criterion concerns the surface elements, i.e. grid openings formed between the curves, which should be regular enough so that the
surface between can be interpolated reliably, either by the section curves (grid surface) or by the surface patches. The ideal surface element has
more or less right angled corners and a more or less constant curvature.
From this it follows that the ideal grid is formed by two sets of mutually non-intersecting curves, which are placed at roughly right angles to each
other. Because the special curves do not usually conform to such a pattern, it is normally not easy to stick to this principle entirely. Still, the higher
the demands on fairness are, the more important it is to select a geometrically suitable grid.
Example of a grid where general space curves are used for creating near-orthogonal surface elements
Note that even if the grid contains general space curves, they need not be the ones primarily manipulated - they may be secondary with respect to
the other curves or one can use auxiliary curves.
The special curves (e.g. flat of side) are usually the ones that break the general pattern of two essentially orthogonal curve sets, and one has to
accept that there are places where three curve sets intersect. The most economical and reliable grid is obtained if the grid curves of the three sets
intersect in common points, so that the number of surface elements is minimized and five-sided elements avoided. In any case, one must not
have three curves intersect at almost the same point.
The surface areas that are either very flat or have a uniform character should have a patch structure following the shape. Quite often one can
select a zone of uniform structure. Some examples:
The bilge area of a pram type stern has a very constant shape, which is easily defined with two primary curves: flat of side and one
buttock curve.
Also the hollow area connecting the gondola to the hull forms another well behaving area, and the third one will be between the two
previous areas.
The three curves define a large part of the surface with a minimum of input data.
In a curve, the part placed between two definition points is always continuous regarding both inclination and curvature. It is therefore only at the
definition points that the curve can change character.
Similarly, the grid curves are the places where the surface can change character. Since it is possible to have definition points on a curve between
node points, there is the possibility for conflicts between the curve and the surface. For maximum accuracy, one should therefore have the
definition points in nodes. This aspect has little importance if the point is not a discontinuity, more if there is a discontinuity in the curvature, and
most in the case of knuckles.
The following figure shows an example where a curve (the stem) has a discontinuity in the curvature, not matched by a grid curve, causing a
small but visible conflict:
This conflict has a different effect on grid and patch surfaces. In a grid surface, it causes conflict between sections in different directions, while the
patch surface is internally consistent, but it may differ from the grid curves.
The order in which the curves are defined influences very much the definition effort. The difference between a primary curve, i.e. one that
depends on few or no other curves and a secondary curve can be summarized as follows:
one has more freedom to control the shape of a primary curve than that of one that depends on many others
a curve that depends on others only needs no own definition effort
The first principle means that if a curve has known properties, for instance, a section that shall be straight, these are more easily realized if the
curve is a primary one. It also means that it is easier to make a primary curve fair.
The curves added last in the process have usually no additional points and therefore require little additional definition effort. On the other hand,
one cannot directly influence their form. These curves however are useful for checking the fairness of the surface at this location and they have
influence on the shape of the patches.
Sometimes, it may be useful to define a curve with a certain property, e.g. a straight vertical, although it is not intended to be a part of the grid.
Such a curve can be used as an auxiliary curve, from which points are fetched to the actual grid curves.
A well chosen set of curves and order of definition can in many cases almost automatically generate a fair hull, and it is also easier to change.
However, finding and managing such a curve set offers complication with respect to a more straightforward order of definition. What choice is
done depends on how the person doing the fairing prefers to work and whether the hull form is likely to change or not.
Simple example of curves supporting each other. The primary points are shown and the numbers show
the definition order.
In production level fairing, it is often essential to have control over inclinations, usually at the start of curves, but also at various discontinuities or
when the grid is for some reason divided into parts. For these purposes, tangent functions often provide a useful tool. While tangent functions are
less easily understood than space curves, their handling is in many ways analogical, and there is no reason to avoid their use because of
difficulty, and any person making production fairing should make sure that he masters these.
Note specially that tangent functions can be defined on the basis of inclinations provided in any direction, and conversely, they are capable of
controlling the inclination of any intersecting curve. They can therefore provide a consistent inclination to curves ending at another one in different
directions and to transfer demands on the inclination from one curve set to another.
Note also the possibility to draw tangent functions (PLOT TGF ...). Even if tangent functions are not used for definition, drawing those generated
at surface preparation (of grid surface) may give valuable hints about the source of some unfairness. In order to draw a tangent function, one
must select the angle to represent it and the argument. For instance, the combination XX (angles in x-plane as function of x) is usually suitable for
longitudinal curves. For more information, please see the chapter about Tangent functions under chapter Definition of curves.
The intersections between the grid curves, the so-called node-points of the grid, are of central importance for the quality of the surface. Most
errors in a surface can be traced to bad intersection points.
The most obvious error is a missing node point, i.e. two curves that should intersect but do not, which mostly is the result of missing curve
references.
As was pointed out above, the curves should preferably intersect at roughly right angles. Conversely, a point where the curves have more or less
the same direction is likely to cause problems. Sometimes, a very small angle cannot be avoided. If needed, the trouble caused by it can be
minimized by isolating it with a curve nearby. In a grid surface, side conditions can be used to compensate the ill defined tangent planes created.
If, on the contrary, the angle is very large (approaching 180 degrees), it should be divided by adding a curve.
The node points have the special property that at these points, the tangent of the surface is determined. If several curves intersect at the same
point, and there is not supposed to be a knuckle, the directions of the curves must be consistent with each other. Assistance in handling this
problem is provided by angle conditions of the form *Z=12, tangent functions and the syntax curve/curve. If three curves do not intersect in a
common point, but near each other, this constraint is removed, but only gradually, so that node points close to each other must still have their
inclinations coordinated.
Example of a place where the inclination of three curves needs coordinating. Supposing that FR9 is the last one defined, and the end angle of the
waterline is -32.1, the following alternatives can be used in the definition of the frame:
ZY STEM/WL2F, ....
Rather than having three curves intersect near each other, one should have them intersect exactly in one point. This gives fewer and better
shaped surface elements, and the angle constraints presented above are more easily handled because they are exact. Especially in the patch
representation, the five sided elements with one small side that tend to be created are a potential source of trouble.
Sometimes all the curves, e.g. frames and waterlines are faired but it does not necessarily mean the surface is. Some buttock curves added as
secondary curves e.g. in stem and stern area help to check the situation but it does not bring new points to the fairing puzzle. If the surface is a
patch surface, the secondary curve can be removed again after the points have been faired. With the NURBS surface the secondary curves can
be added freely.
Also a space can be created to 'scan' the surface. This can be created by first selecting two points in 2D view outside the surface and then by
adding references to shape curve:
CUR Faircheck
YZ (-1.6, 10), (17, 2.8)
XY *Hullf
Syntax * and the surface name picks up all the curve references automatically. Now you can drag or modify one of the end points on the location
surface and scan the surface studying at the same time different projections.
Selecting the boundary curves plays an important role in the final quality of the surface. This means that some time spent on thinking of the
structure in advance will pay back in the end due to faster fairing time. Badly selected boundaries may result in a surface that is difficult to get
smooth and faired. The boundary curves should be faired in the first place, but also all other curves should be faired for reaching a faired surface.
The maximum number of nodes is four for a surface limited by boundary curves. If there are five or more, the surface generation fails for this area.
The edges of the hull surface i.e. the center line, stem and stern curves and deck line
Curves limiting flat areas such as flat of bottom and flat of side curves
All knuckle curves, such as transom, but also all disappearing knuckle curves must be selected as boundaries
The rest of the boundaries should be selected so that the shape of the resulting surface is as rectangular as possible. If there is a big change in
curvature in the boundary curve, it should be further divided by another boundary curve. Sharp and long corners should be avoided.
Please see the pictures below about recommendable patch shapes and shapes that might cause problems.
Example of a good patch shape on the left and a bad one on the right
Adjacent surfaces should have more or less the same direction. However, the direction should follow the shape of the hull i.e. the direction of
surfaces should follow the stream lines of the hull shape. See the figure below.
Three and two sided surfaces are acceptable but they may cause problems. These degenerated surfaces are presented as four node surfaces
with one or two sides with zero length i.e. in a triangle surface one node is considered as double, see the figure from bulb. In plane areas they can
be used freely especially with the option ‘keep linear areas’ which lowers the degree from three to one if possible. Sometimes triangle surfaces
can be avoided by cutting the boundary curves, see the figure below and the figure from the hub.
The waterline boundary curve has been cut to avoid a triangle patch but the curvature at the node point is
still continuous. Also notice the change in direction: the adjacent surface follows the direction of the flat
side.
Waterline curves taken to the deck line instead of the main frame
If the flat of side has straight parts and it is not possible to take the endings directly upwards, the waterlines can be taken to one point on the deck
line, see the figure below. The resulting triangle surfaces are not a problem as they are on the plane area.
Waterline curves taken to one point on the deck line when flat side curve has straight part
It is possible to create a NURBS surface using only boundary curves, but then the shape inside each NURBS is derived only based on the edges
and this does not result in the best possible surface. The primary and secondary curves are needed to strive the surface to the desired shape.
The importance of the definition curves for the fairing purpose varies. For better visualisation the curves can be classified into primary and
secondary curves. This classification can also be used when adding new curves so that a new curve takes references only from the primary
curves if this option is selected.
The importance of primary and secondary curves is equal in surface generation. The selection is there to give you a possibility to classify the
curves to make the order of the curves in fairing process visual. The default colour for primary curves is white/black and pink for secondary
curves.
It is recommendable that primary and secondary curves are connected to boundary curves in all places but it is not necessary that secondary
curves refer to each other.
It is recommendable to create primary or secondary curves close to flat surfaces to support the surface shape near the edge where the flat
surface starts to deform to a curved one.
The preparation options control the patch distribution of the surfaces. For a NURBS surface there are many options available but only the most
important ones that make the biggest difference are presented here.
Tolerance for edge curves, BTOL, controls the approximation of the boundary curves. If the value is given as an integer, it is the number of
node points i.e. the number of resulting patches in one direction is minus one. Then the accuracy of the surface depends on the number of control
points available for surface fitting. If the tolerance is given as less than one, it is the acceptable difference and a smaller value creates more
patches. The generated surface then follows the boundary curves within the tolerance BTOL . You can start e.g. with values 0.02-0.002.
Uniform parameterization, G=1. To make sure that the same parameterization is sustained on both sides of the edges. To ensure uniform
parameterization through the whole hull surface it might be necessary in some cases to create the total hull surface, fore, middle and aft parts
under one definition and not to use a combined surface. This can be done manually by taking the definitions to the Text Editor.
Keep linear areas, G=2. If the surface is plane, the result is modelled with degree one NURBS surface instead of degree three. In many receiving
programs this will ensure flat areas to be handled as plane.
Internal curve fitting tolerance, ETOL, defines the maximum offset of a surface from the primary and secondary curves in surface generation. It
controls how precisely the resulting surface should follow these curves at the position of equiparameter lines. A smaller tolerance will result in a
surface that follows more accurately the primary and secondary curves but the quality of the result depends more on the quality of the curves.
This means that there can be a difference between the surface and the curves but this depends greatly on the fairness of the curves. A bigger
tolerance will give a smoother surface as a result but the offset to curves might be greater. The value of ETOL should be at least as big as a
typical offset of curves from each other if the definition curves do not refer to each other at all places. Usually, 0.005 is enough but for production
fairing, a value of 0.001 can be used.
A new feature is gap tolerance, GTOL . It is the gap elimination tolerance for the plane sections of surfaces. When the surface is intersected and
if the generated section curve contains discontinuities (gaps) that are smaller than the tolerance value, the curve branches will be merged
together. The default value is from the global GTOL (!GM GTOL) and for new projects it is 0.1.
Topological tolerance, TTOL, defines when two points are close enough to be considered as one. The value should be close to polygonization
tolerance, !TOL but not smaller.
As mentioned before, to avoid gaps sometimes it might be necessary to define the total hull surface under one definition and not to use combined
surface. This can be done easiest with the Text Editor.
Append definitions of different surface parts, e.g. hullf, hullm and hulla to text area.
Change the name of the first surface to be the name of the total surface.
Copy and paste all the curves under the same THR, BND and SND.
Check that there are no duplicate curves as usually e.g. the main frames are involved both in the ends and the middle part. Remove the
duplicates.
Remove unnecessary text left from other surface definitions.
Check and add commas (,) to correct locations to continue definition. This is needed especially with curve listings.
Add OK to finish the surface definition.
Please see the figures below of separate definitions on the left and one surface on the right.
___
A trimmed surface is one where parts are removed with the aid of other surfaces. An offset surface is obtained when the points on a surface are
moved a specified distance along the normal of the surface. These alternatives have originally been implemented using the GENERATE
command, described in the section of special definitions, where trimmed surfaces and offset surfaces are described in more detail.
SURFACE name
TRIM parent limitation
The limitation is defined as described for GENERATE. The difference between these two alternatives is that the definition with the SURFACE
command is subject to the normal update management while all objects defined with GENERATE are fixed and change only when the definition is
repeated.
In many cases NAPA Nurbs surface is recmmended to be used, please see above section Nurbs surface for benefits and detailed description of
Nurbs surface.
Patches are internally composed of four corners. Try to avoid three corner patches, as either one side must be made to zero length or half of the
patch must be trimmed away. Some receiving programs do not accept the triangle patches at all or at least they need to be re-build within the
program.
Grid holes with more than four corners are also difficult, as those must be split automatically to reach four corners. This may introduce slight
unfairness, because usually the form is not uniquely defined, leading to unfairness. Automatic split is done only with patch surface, with nurbs
surface the user needs to divide the patches with boundary curves.
The patch surface figure below of a bow form contains several patches with three corners and also several automatically split holes.
The next surface is after rearranging the grid by removing extra curves and changing the frame positions, and after adding some additional
frames. This produces a few three-corner patches at the centre line. As the curvature of the surface is large there, the resulting patch structure is
not very good.
Slightly better grid is gained when the triangle patches are arranged into a more flat area with the aid of an auxiliary space curve.
The following picture shows an example of a well defined patch structure at the bow:
Curves ending in the middle of a curve instead of a node point should be avoided as this will generate a discontinuity. So to avoid gaps, the
curves should continue througout the surface. This can happen easily especially between the fore, the middle and the aft part, please see the
figure below showing common surface definition causing small gaps:
The general-purpose CAD systems usually expect very precise accuracy in geometry. For example, Intergraph, Catia, Pro/Engineer, Vertex, etc.
systems use ACIS geometry kernel, which is fixed to 10-6 m absolute accuracy, which is much too accurate for a ship with a length of about 300
m. The NAPA patch surface is composed of a large number of 3rd order polynomial surface elements, which are equivalent to 3rd order B-spline
surfaces or NURBS elements. In order to have the patch boundaries defined with exact accuracy, the following two simple rules must be followed:
In all cases, the two attached patch edges must be equal in length with the same coordinates
The IGES or IDF data files must be prepared with the option forcing merging of control points within a given tolerance. In IGES data
transfer, use the following options when writing a file out from NAPA: TOIGES surface TYPE=128 K=D PTOL=-.001 This will merge
any control point within 1 mm tolerance and will also inform where the maximum inaccuracy was found and how much it was.
For more options for TOIGES command please see the chapter Link functions.
The following two pictures show an example of a properly defined patch structure for data exchange with nearly any CAD system importing IGES
files and requiring very precise tolerance. The thick lines shows the definition curves, and the thin lines presents the iso-parameter lines. The
control points in the IGES file are located at the crossing of iso-parameter lines, i.e. one patch has 16 control points, and the control points at the
edges should match exactly in the patches nearby.
20.3. Tolerances
All the different tolerances in NAPA should be checked to be compatible with the receiving program. Some tolerances can be controlled directly
with the exporting command, like TOIGES. Most of the default tolerances can be found in Reference task for example the default geometric
(polygonization) tolerance. Some special tolerances can be controlled with !GM tolname, like the gap tolerances GTOL and BTOL. Please check
!EXP !GM for all the available options.
If none of the measures above helps, the reason is shortcomings in the algorithm that finds the surface elements. First, check that none of the
special cases mentioned in this main chapter has occurred. The reason may be that the process has started at an unfavorable place, in which
case an explicit outside specification on a suitable curve in the middle of the surface may help.
The potential problems are minimized by using a grid formed by two, mutually non-intersecting curve sets, intersecting at angles not too near 0 or
180 degrees. When more than two curve sets intersect, the number of intersections increase markedly, and there tends to be nearly coinciding
points, the quality of which are difficult to assure.
1. Introduction
2. Opening a surface in the Hull Surface Editor
2.1. Starting the Hull Surface Editor
2.2. Hull definition using templates
2.3. Opening an existing surface in the Hull Surface Editor
2.4. Supported curve format
2.5. Administration of the work area
2.5.1. Saving changes
2.5.2. Working with backups
2.5.3. Undoing changes
3. Main concepts of the Hull Surface Editor
3.1. Hull Surface Editor Window
3.2. Toolbar rows
3.3. Active surface, object and point
3.4. Nodes
3.5. Keyboard focus
3.6. Locator
3.7. Menus
4. Setting options
4.1. Curvature tab
4.2. Visuals tab
4.3. Edit tab
4.4. Mouse tab
4.5. Keys tab
4.6. Tools tab
4.7. Fixing tab
4.8. File tab
5. Working with the grid in Hull Surface Editor
5.1. Using the mouse to select multiple curves
5.2. Using the mouse for selecting and moving points
5.3. Using the keyboard for changing the active curve and moving points
5.4. Using the text based representation
5.5. Working with the dialogs
5.6. Modifying curve with the mouse clicks
5.7. Creating new points and deleting existing points
5.8. Fixing and changing angles and angle conditions
5.9. Adding new curves to the surface
5.10. Re-Attaching curves to a target surface
5.11. Removing a curve from a surface
5.12. Adding references to a curve
5.13. Viewing curves
5.14. Fairing of points
5.14.1. Fairing with the arrow keys
5.14.2. Fairing by clicking
5.14.3. Using the Fairing Window
5.15. Using the clipboard for graphical input
5.16. Cleaning nodes and references
5.17. Locking objects
6. Checking the surface in the Hull Surface Editor
6.1. Updating and preparing the surface
6.2. Preparation options for a NURBS surface
6.3. Plotting and intersecting the surface
6.4. Debug tool
6.5. Surface Offset Table
6.6. Accuracy Check Between Surfaces
6.7. Using the Object Information window
6.8. Viewing the standard body plan drawing
6.9. Automatic Fairing of Surface
7. Exporting a surface from the Hull Surface Editor
7.1. Export to IGES
7.2. Export to DXF
8. Menus
8.1. File
8.1.1. New
8.1.2. New from template
8.1.3. Open...
8.1.4. Open from backup...
8.1.5. Close
8.1.6. Save
8.1.7. Copy from...
8.1.8. Backup...
8.1.9. Restore
8.1.10. Export to IGES format...
8.1.11. Export to DXF format...
8.1.12. Printer...
8.1.13. Quit
8.2. Edit
8.2.1. Undo
8.2.2. Redo
8.2.3. Update and Prepare
8.2.4. Previous Object
8.2.5. Next Object
8.2.6. Next Node
8.2.7. Previous Node
8.2.8. Lock/Unlock...
8.2.9. Notes...
8.3. Curve
8.3.1. Add Existing Curve...
8.3.2. Create New Curve...
8.3.3. Re-Attaching Curve
8.3.4. Remove Curve...
8.3.5. Rename...
8.3.6. Add References...
8.3.7. Connect Grid...
8.3.8. Clean References
8.3.9. Clean All References
8.3.10. Automatic Fairing...
8.3.11. Move Plane
8.3.12. Move Plane & Nodes
8.3.13. To General Plane...
8.3.14. To Location Surface...
8.3.15. To XYZ Curve
8.3.16. To Primary Curve
8.3.17. To Secondary Curve
8.3.18. Clean Locations Surface
8.3.19. Curve Interpolation Method
8.4. Node
8.4.1. Fix Node
8.4.2. Free Node
8.4.3. Clean Node...
8.4.4. Reverse Order
8.4.5. Remove Reference
8.4.6. Relax Node
8.5. Point
8.5.1. Move Interactively
8.5.2. Round Points...
8.5.3. Fair Point
8.5.4. Delete Point
8.5.5. Delete Primary Point
8.5.6. Delete Location Point
8.5.7. Delete Any
8.5.8. Convert to Point Object...
8.5.9. Convert to Primary Point
8.6. Angle
8.6.1. Rotate
8.6.2. Rotate After
8.6.3. Delete Angle
8.6.4. Fix Angle Before
8.6.5. Fix Angle After
8.6.6. Fix Angle in Project
8.6.7. Free Angle Before
8.6.8. Free Angle After
8.6.9. Knuckle
8.6.10. Angles Default...
8.6.11. Angles After...
8.7. View
8.7.1. Toolbar
8.7.2. Status Bar
8.7.3. Drawing Mode
8.7.4. Areas
8.7.5. Clipping Planes
8.7.6. Select Lighting
8.7.7. Edit Lighting
8.7.8. Show Command Area
8.7.9. Immediate Update
8.7.10. Erase View
8.7.11. ReDraw
8.7.12. Background
8.7.13. Line numbers
8.7.14. Titles
8.7.15. Totals
8.8. Window
8.8.1. Text
8.8.2. Fair
8.8.3. Table
8.8.4. Info
8.9. Zoom
8.9.1. Interactive Zoom...
8.9.2. Realtime Zoom...
8.9.3. Zoom On/Off
8.9.4. Panorama...
8.9.5. Fit to Window
8.9.6. 3D Size and Zoom...
8.10. Projection
8.10.1. Interactive...
8.10.2. Walkthrough...
8.10.3. 3D Perspective
8.10.4. X (Forward)
8.10.5. Y (Side view)
8.10.6. Z (Waterlines)
8.10.7. A (Aft end)
8.10.8. F (Fore end)
8.10.9. Parallel
8.10.10. Special
8.11. Print
8.11.1. Printer...
8.11.2. Print
8.11.3. Print Turned
8.11.4. Send view to IOF
8.11.5. Print with Options...
8.12. Tools
8.12.1. Text Editor...
8.12.2. Table Editor...
8.12.3. Geometry Window...
8.12.4. Body Plan Window...
8.12.5. Panel Task Window...
8.12.6. Surface Offset Table...
8.12.7. Accuracy Check Between Surfaces...
8.12.8. Surface Automatic Fairing...
8.12.9. End Rounding Window...
8.12.10. Plot End Rounding Along Profile...
8.13. Options
8.13.1. Preparation Options...
8.13.2. View and Behaviour...
8.13.3. Hide Boundary Curves
8.13.4. Hide Primary Curves
8.13.5. Hide Secondary Curves
8.13.6. Hide Referred Curves
8.14. Help
8.14.1. Show Tips
8.14.2. Help About...
8.14.3. Online Manuals
8.14.4. Help Viewer
8.14.5. About NAPA...
9. Keyboard input and shortcuts
10. Creating a NURBS surface with the Hull Surface Editor
11. Parametric hull surfaces in the Hull Surface Editor
12. Hints & Tricks of the Hull Surface Editor
12.1. Adjusting the Hull Surface Editor
12.2. Viewing the active curve
12.3. Checking the equiparameter curves
1. Introduction
The Hull Surface Editor is intended for the modification of NAPA hull surfaces or any arbitrary surface based on a curve grid.
The Hull Surface Editor acts directly on the geometric components as shown on the graphic display, and the effect of each change can be seen
immediately. Several alternative methods are available to do changes, including direct manipulation with the mouse or the keyboard, text-based
definition, and menu-driven actions.
Parallel to the graphic views in several projections, the geometric components can be viewed and changed in alphanumeric format definition,
each component in a special field in the toolbar and table format with inclinations etc. The changes in graphical mode can be mixed freely with
changes made in alphanumeric input.
The surface and the definition curves created or modified with the Hull Surface Editor are stored in the NAPA databases as standard descriptions.
This enables the user to use any traditional means of manipulating these. In addition to the traditional command mode, options are available to
store backup copies, do multilevel undoes, etc.
In addition to the basic actions on individual points and angles, the Hull Surface Editor has other editing functions for executing more complex
actions like e.g. fairing or group actions on all curves in the surface. Since Release 2002.2, the definition of panel models for CFD calculations
has been integrated into the Hull Surface Editor. As of Release 2003.1, tools for handling parametrically defined surfaces have been implemented
within the Hull Surface Editor as well. From the Release 2008.1 it is possible to work with NURBS surface and from Release 2009.1 there are
more functions added to improve fairing and to create new NAPA hull form (NURBS surface). For Release 2010.1 further improvements mainly in
form of new tools have been done. Please check NAPA Update Info (UDI) for precise details.
The functionality of the Hull Surface Editor is implemented primarily as a set of service functions of the group GME, forming tools for the graphical
user interface. Further technical details can be found in the following chapter, Hull Surface Editor technical details.
The creation of a surface using templates is activated from the File menu by selecting New from template.
Note: the creation of a new surface from a template will overwrite any earlier definitions in the active version. A warning is given
before any old definitions are overwritten.
A few example hull templates are stored in the NAPA database. These serve as examples of how the template definitions can be made. More
surface templates can be freely stored into the NAPA System Database (SYSDB.DB, DB2) or into individual project databases.
NAMING RULE: these definitions must have a name starting with prefix DATA*SURF_.
The list of available alternatives is created on the fly and all templates will appear in the list automatically, provided that the naming rule is applied.
The following templates are available in the NAPADB using this naming rule:
Template Description
For example, the simple fore body definition under the name DATA*SURF_HULLF in the NAPADB is a short definition macro as follows:
CUR FBF ; Z 0
XY frf/y>1 /0 (@.9*x,0)
SC , P
CUR CLF ; Y 0
XZ FRF, FBF
CUR STEM ; Y 0
ZX fBF /0 DECKF
@@SUR, HULLF, P
@@THR FRF FBF CLF FSF DECKF STEM
The first part of the macro asks the user for values for the variables. The curves are then defined using these values. Thus, in fact, template
definition is a form of parametric hull definition.
Note: the surface definition commands are not actually needed in the template macro. The surface is created according to the name
given by the user in the beginning of the definition process. The curves created by the template macro are automatically used in the
surface. The surface definition is shown here just for information.
The normal order of defining the surfaces is to create ends first, then the parallel mid body and finally the complete hull with the template definition
available as DATA*SURF_HULL.
An existing surface is opened for editing by selecting Open from the File menu or by clicking the Open
button. The surface name can also be typed into the Current Surface combo box:
A list of previously treated surfaces is maintained in the history list of the Current Surface combo box.
It is also possible to start a new surface from an existing surface using File -> Copy from. The copied surface can be from any version or project
which has been opened with NAPA before. A new, preferably empty version or project is recommended to be created before copying as the
descriptions with the same name will be overwritten without a warning.
Please note that the curves of the surface to be edited need to be at least in Release 99.1 format. When an editing session is started on an old
hull surface, the program will offer the option of converting the surface to Release 99.1 format. This sets the parameter GMTP in the Reference
System according to the selected option.
Note: even if the surface is not saved, the change of mode might change the surface, i.e. do not test the Hull Surface Editor on a
surface in production.
The default format for new surfaces is 'Spline'. 'Spline with continuous curvature' refers to the 'M2' method of curve fitting algorithm available since
Release 99.1. If you do not know what to choose, choose 'Spline with Continuous Curvature'.
Both “Polygon representation” and “Spline representation” options have a polygon representation. However, in the SPLINE curve, the 3rd degree
polynomial representation is also stored.
It is possible to have a different interpolation mode for specific curves, by defining the mode in the curve definition (CURVE, name 'text' type).
In the curve description, the interpolation mode is shown if that one differs from the current interpolation mode i.e. M1 or M2 is added as an option
of the CUR command. If the curve is redefined with the option M1 and GMTP-mode is M2, the result corresponds to the GMTP-mode SPLINE.
The Hull Surface Editor maintains a separate work area where the changes to the surface are made. Because there is no separate administration
of dependent objects, NAPA will change the date of the edited object even if you do not save the changes. This way fresh calculation sections will
be created for all dependent objects. By setting options it is possible to save all changes automatically to the database.
buttons it is possible to save a backup copy of the actual work area as a text file. The text file can be opened with NAPA Text Editor normally. The
prefix of the backup file is HSE*. It is also possible to set options so that a backup is created automatically after a predefined number of changes
in the Options dialog. Currently the automatic backups will be saved as a surface to the auxiliary database.
The Hull Surface Editor keeps an undo buffer allowing changes to be undone. By default the undo buffer contains the last 30 changes, activated
by clicking the Undo
button. The number of steps kept in the undo buffer can be set in the Options dialog. The feasible number of undo steps depends on the available
memory. For a typical workstation, at least 20 steps is recommended. The undo buffer is emptied while saving so after 'SAVE' undo is not
possible. The undo can be reversed by clicking the Redo
button.
Note: for the Redo button to work the undo buffer has to be larger than 1. Only one redo step is available.
The Old
button will draw the situation before the last change in the graphic area. This way it is possible to check what will happen if the Undo button is
clicked.
Title Bar
Menu Bar
Tool Bars
Graphical Views Areas
Status Bar
The Title Bar shows the main information about the current status of the Hull Surface Editor.
Note: the current surface name is marked with an asterisk "*" at the end of its name if the surface has been changed after the last save
into the database.
The Menu Bar offers access to all functions available in the Hull Surface Editor in logical groups.
The Tool Bars offer direct access to the central information regarding the current surface, curve and point. The Tool Bar can also be used to
display some other windows, and also to select what tools are available in the bottom row of the Tool Bar.
The Graphical View Areas show the surface in different projections. The number of visible views, size, projection and other visual properties of
these views can be controlled individually for each of the four views from the Zoom, View, Projection and Print menus in the Menu bar.
The Status Bar consists of two main areas: a message area and the current co-ordinates.
The message area shows a help message related to the current menu item, button or input field.
The current co-ordinates during an interactive move are shown in the co-ordinate area at the right side of the Status bar.
Toolbar functions are organized according to the hierarchy of the surface components.
The top row includes input fields and command buttons regarding the current surface in general and a main selection of visible tools.
The middle row includes tools needed to manipulate the current curve or point object.
The third toolbar row shows the current node of the current curve. The third row can also show different sets of buttons. These can be selected by
clicking one of the following three buttons
located in the first toolbar. By default, the third row includes the tools to manipulate each node of the active curve as well as tools for working with
the Locator. This is selected with the first (leftmost) button, the Point Tools button.
The second button, the Click Tools, shows the tools regarding individual points, but specially adapted for fairing the surface.
The third button, the Draw Tools, shows the drawing tools for controlling and generating sections and plots of the prepared surface. This set of
tools will appear as yet another toolbar. These are the same buttons that are available in the NAPA Geometry Window. The only addition is the
automatic redraw tool, please see the chapter about updating the surface.
The current surface in the Hull Surface Editor is shown in the left part of the top row of the toolbar. The Open button opens the standard dialog to
open a previously defined surface from the database. The Save button saves the current surface definitions to the project database.
Only one surface at a time can be active in the Hull Surface Editor. It can be combined from several individual surfaces.
The name of the active surface in the editor (HULL) is shown in the Current Surface drop-down list and in the title bar. The next drop-down list
shows the active partial surface of a combined surface (HULLA). Adding new curves and removing curves is done to this surface.
The third drop-down list shown above can be used to add existing curves to the surface description. The list shown by clicking the button on the
right shows the curves presently in the surface.
An object (a curve or a point object) can be active in the surface. The name of the active curve (FSA) is visible in the Name drop-down list on the
second line of objects, directly under the name of the surface. A different colour is used to highlight the active object in the graphic area. To select
an object, you can:
If the selected object is a curve, the following input fields (see the figure above) show the main attributes related to the curve:
The type of the curve (here Primary). The default is primary, other possibilities are boundary and secondary. If any boundary curves are
selected, NAPA will use NURBS surface preparation options instead of patch surface preparation options.
The Side Condition drop-down list shows the side condition as defined (here P). The list shown with the button contains the most
common side conditions.
The drop-down list Interpolation Method shows the two alternatives available for curve interpolation (here M2). The default can be set in
the REF task item GMTP.
The point sorting criteria is selected from the Sort Criterion drop-down list (here Z).
The last two drop-down lists show and change the definition of the Location Surface (Y 16) and the Notes text (Flat Side).
The active definition point or node is shown in the third toolbar area.
using the shortcut keys > and < to cycle through the nodes
The active point/node is highlighted when activated. The definition of the active point or node is shown under the Active Curve drop-down list.
It is also possible to move with the V-key to the next node and with the B-key to the previous node along the current curve even if the node is not
defined in the curve itself. The result is that the active curve is changed to the one having the reference to the previous curve and the node is
activated. Note that the active curve will be changed accordingly.
Note: the graphic representations for a point and a node (i.e. a reference point) are different. If a position represents both a point and a
node, multiple clicking will alternatively activate the node or the definition point.
The Definition drop-down list shows and changes the definition of the current point on the curve (70.849,2).
The next info fields show the index of the point (1) and the actual x, y and z coordinates of the current curve or node.
The last two fields show the angle conditions before and after the current point. The lists opened with the popup buttons show the most common
angle definition alternatives.
3.4. Nodes
A node is formed when a curve refers to another curve, i.e. a node represents the crossing of two definition curves. A node can be either free or
fixed, i.e. if there is no coordinate defined, only the reference, the node is free to move according to other definitions.
A definition point at a node has restricted degrees of freedom, as the Hull Surface Editor by default follows the restrictions of the node. If a point is
moved, this will be done in a way that does not violate the location surface of the other curve.
If the node has no definition point, one can be created by fixing the node.
If the definition point should be removed, the node can be set free.
If there are definition points near the node, but not exactly on it, the node can be cleaned in order to place the definition points exactly at the node.
The allowable change for points at nodes (degrees of freedom) can be controlled in detail by using the different options available in the Options
dialog. See the section Mouse Tab below.
The keyboard focus defines where the keyboard input will be directed. The focus can be in any part of the Hull Surface Editor. The area that has
the keyboard focus is highlighted with a border. The focus area can be changed with the Tab key or by selecting it with the mouse. When a
surface is active, the focus can be directed also to a graphic area by clicking on the area with the mouse.
3.6. Locator
A graphic object called the Locator (the 3D cursor) is available as a tool for designating locations and pointing at objects. It has a location in the
ship coordinate system and it is displayed in all views by a symbol, the properties of which can be assigned by options.
By default, the Locator is represented by a big plus sign and it is located at the intersection of the centerline, baseline and the mid x coordinate of
the object. Information about the Locator is available in the third toolbar if the Point tools button is clicked.
The Locator can be moved by dragging in any of the available views, or by typing a location into its coordinate boxes. Moving the Locator as such
never affects the surface, but it may be relevant for a subsequent editing function.
Button Function
Fix Create a new point on the active curve at the position of the Locator without changing the form of the curve.
Add Add a new point to the active curve at the position of the Locator, so the curve shape may change.
Pick Move the Locator (X, Y, Z) so that it is positioned on the curve at the point closest to the locator, in the current view.
3.7. Menus
All functions of the Hull Surface Editor are available in the drop-down menus.
Menus are available for manipulating different object types, such as curves, nodes, points, and angles, and they affect only the current
component. The correct type of object needs to be active for the menu to be useful. Most of these drop-down menus are tear-off type and they
can be placed anywhere on the desktop. Right clicking in the graphic areas can also access the relevant menus.
Note: the components of the popup menu depend on the actual curve, node, point and the properties thereof. For example, a different
menu is shown depending on what angle commands are relevant.
For a detailed explanation about each command please see the chapter about Menus.
4. Setting options
The options of the Hull Surface Editor can be set by selecting View and Behaviour ... from the Options menu or by using the
button.
Note: saving the settings will save the options into the system database according to the NAPA username, thus allowing each user to
have their own specific settings.
Under the Curvature tab you can set different options related to the display of the curvature in the graphic screens.
The display of curvature distribution in the Hull Surface Editor is handled as per the Weighted Average from NAPA Release 2014.1.
Under the Visuals tab you can set the visual aspects of the different line types and markers. The colour is controlled by the screen colour index.
The symbols are also controlled by a symbol index. The symbol size is given in ship scale if it is positive and in screen size if it is negative. The
default background colour is set here as well as the number and projections of graphic areas. Definition points can be set to all curves or only to
active and selected curves. Node points i.e. curve references can be set on or off; on is recommended.
Under the Edit tab you can control several aspects of the editing actions of the Hull Surface Editor. The control of special indicators is also set
under this tab. The result of a change on dependent curves can also be set under this tab.
Under the Mouse tab you can set different options regarding moving and identifying points with the mouse. The default degrees of freedom
applied when moving points with the mouse can also be set. The mouse accuracy is a quantity representing the ratio between the mouse
movement and the point movement. The default value is Direct.
Under the Keys tab you can set different options regarding moving points with the keyboard arrow keys. The default degrees of freedom applied
when moving points with the keyboard arrow keys together with the default change step, the default fairing step, and the default angle step are to
be set under this tab.
Under the Tools tab you can set different options regarding the deleting of points and fairing.
Under the Fixing tab you can set different options regarding fixing and adding points and angle conditions.
Under the File tab you can set different options regarding automatic saving and backup. The number of possible undo steps is also set under this
tab. The Automatic Add of Curves options control the use of text definitions. The default prefixes in Create new curve dialog can be controlled
here.
Activating one curve is done with the left click of the mouse. In many cases, for example, while fairing the surface it is sometimes good to see
multiple curves and their curvatures at the same time. It is possible to select many curves with CTRL + left click. Clicking the selected curve again
will deselect it. The selection is lost if one curve is selected without control button. It is also possible to change the curve class (boundary, primary
or secondary) for all the selected curves with just one click.
Points and point objects can be selected and dragged to a new location by holding down mouse button 1 (left button by default) while pointing at
the point and dragging.
The behaviour that occurs depends on the current Options settings and how the mouse is used. The following alternative actions are available:
Selection is made by a fast single click with the mouse at the location of interest.
When button 1 is pressed at a location, the most primary curve or point object at that position is selected. Further clicks at the same location will
select the following curve in the order of dependency until all curves at that location have been cycled through. Then the search will start again
from the first curve. In case the mouse moves to a new location, the search is started from the most primary object.
The pure Move is started when a co-ordinate point or point object is current and mouse button 1 is pressed down on the highlighted point and
kept down. A change in the shape and colour of the cursor indicates the beginning of moving. The point is moved with the mouse until the mouse
button is released.
The combined Selection and Move is started by pointing at a new location with mouse button 1 and, while keeping it down, starting to drag the
point to a new location with the mouse. The point is first made current and highlighted and then the actual move will start.
Depending on the computer and the complexity of the surface grid, the combined selection and move may take a fraction of a second or even a
few seconds to start! Please be patient to see the final outcome.
Pressing the Shift key during the drag operation restricts the change to only one co-ordinate at a time.
If the Ctrl key is pressed during the drag operation, no node constraints are applied.
Many parameters controlling the moving of points using a mouse can also be controlled by means of options in the Options dialog.
The middle mouse button can also be used to identify coordinates and objects in the graphics area. Pressing the middle mouse button will identify
the coordinates of a point clicked on the screen, or return the names of curves clicked on at a node. This information will be copied to the
clipboard.
Holding the Alt key down and then pressing the middle mouse button will always return the coordinates of the point clicked on, regardless of
whether there are any identifiable objects at that point.
Holding the Ctrl key down and clicking with the middle mouse button will select the point or node clicked on and copy the information to the
clipboard. If a point object or node is identified, NAPA will also make the object and node active and center the projection on the selected object or
node.
5.3. Using the keyboard for changing the active curve and moving points
The active curve for editing is selected from the surface with the keyboard as follows:
Button Function
Ctrl+X,x Select the next curve passing through the current node
The active point or point object can be moved by using a combination of Alt plus the arrow keys. Please note that the movement action is valid for
the active point on the active curve in the graphic area that has the keyboard focus. The default step for changes can be set in the Options dialog
(see below).
The direction of change depends on the active projection. Look at the active view and decide the key for moving based on this view. Arbitrary 3D
views may be used for moving the points as well, but the direction of motion is predefined as follows:
Pressing the Shift key together with the arrow keys creates a smaller movement.
Pressing the Ctrl key together with the arrow keys creates a larger movement.
Many parameters controlling the moving of points with the help of the keyboard can also be controlled by means of options in the Options dialog.
The text definition can be displayed for the active curve by clicking the Text button
Text Window
The changes can be typed in and then made by clicking the Apply button. The changes will be sent to the Hull Surface Editor. By clicking the Rev
ert button the actual curve definition will be fetched from the Hull Surface Editor to the Definition editor box.
By default only one curve definition is in the Text Window at a time, but when the Keep button is clicked, the previous contents are maintained
and new definitions are added at the bottom of the text.
The curve class (boundary, primary or secondary) can be changed also here. These should be used only for NURBS surfaces.
Note: when the definition is applied, the previous definition is replaced by the valid definition. In case there is a formal error in the
definition, or the definition cannot be applied for some reason, the entered definition is replaced with the last proper definition of the
current curve.
Please note that more commands are available in a popup menu (shown below) when the mouse button 3 (right button by default) is pressed.
It is also possible to create a totally new curve by writing the definition and pressing Apply. Please note that in this case if the curve with the same
name already exists, it will be overwritten without a warning. If the definition is not correct, the previous definition will be returned even if it is a
different curve.
Most of the dialogs in the Hull Surface Editor can be kept open as long as they are needed. The dialogs normally have three buttons labelled OK,
Apply and Cancel.
As an example, the Rename dialog is opened from the Curve menu. In case you want to rename several curves, select the first curve and open
the dialog. Select and type a new name and click the Apply button. Then select the next curve by pointing at the graphical area with the left
mouse button, change the selected name and click the Apply button again.
Rename dialog
The difference between the OK, Apply and Cancel buttons is that:
It is possible to modify a curve by pointing with the mouse to the point that should move to the direction where it should move.
When the Click Tools are in use and the option Move Nearest is selected, the curve can easily be changed simply by clicking to the direction
where the curve should move close to the point where the change should be made. This requires that the Click Tools are in the following settings:
New points can be created on the active curve by pressing and holding the Alt key and then clicking on or close to the active curve with mouse
button 1. The projection should be in 2D (x-, y- or z- plane); in 3D view this is not possible. It is also possible to add points by manually adding the
coordinates to the definition of a curve.
Pressing the Alt key and clicking on an existing definition point deletes the point.
Alternatively, the Locator can be used to add or fix a new point to the current curve.
Deleting the current point can also be done by pressing the Delete button, pressing Ctrl+D, or by selecting Delete from the Point menu.
The angle conditions can be visualised in the graphic areas as vectors connected to a point or a node. The visibility can be controlled in the
Options dialog.
An angle condition for a node or a point can be fixed by selecting Fix angle from the Angle menu.
Any angle condition can also be set by typing the appropriate angle into the angle combo boxes in the point toolbar.
The most common angle conditions can be found in the angle drop-down list. It is possible to change an angle by:
Dragging the angle indicator in the graphic area. Dragging can be activated from the menubar: Angle -> Rotate.
Typing the angle into the combo box
Typing the keyboard shortcuts '+' or '-' to rotate the current curve at the current point. By using the Ctrl and Shift keys the change can be
made larger or smaller, respectively.
Note: pressing the space bar or slash (/) key will remove an existing angle condition.
Existing curves can be added to the surface by selecting Add Existing Curve… from the Curve menu.
Please note that this dialog can also be used to fetch any curve from the backup or from the database.
The Hull Surface Editor supports the creation of new curves located in the main planes in x-, y- or z-direction. This is done by selecting Create
New Curve… from the Curve menu.
Based on the location plane NAPA automatically suggests a prefix for the curve name. By default the prefixes are FR for frames, BT for buttocks
and WL for waterlines. The third letter is the same as the last character of the active surface name. These prefixes and using of the third letter can
be modified from View & Behaviour, File tab.
The location plane value can be given as node i.e. reference to other curve or curves and as a coordinate value given or from the locator. It is
possible to indicate the node by clicking on it in the graphics area while this dialog is active. It is also possible to create multiple curves at once
using the Range option. Then a minimum value, maximum value and step should be given. Notice that when using the Range option either find
first free index or append coordinate value to the curve name is forced to be selected.
In the curve name there are two fields: the edit field and the resulting name field. Note that the suggested name in the edit field is only a
suggestion and it can be modified freely before creating the curve. If the Find first free index for the name option is selected, new curves will be
created with a growing index. If the name does not exist yet, the first free index is 1 which will be added to the name. Append coordinate value will
add the location plane value with one decimal if the value is integer and with the exact value if there are decimals to the curve name. Description
and side condition are optional and can be easily added later on also.
If the given curve name already exists in the database, a warning is given and you can select whether to redefine the name or override the
existing curve.
The Re-attachment of curves can be used to modify the grid of the current surface so that it better fits to a target surface. The target surface is a
modified version of the current surface. The re-attachment is done by selecting the Re-Attaching Curve from the Curve menu as shown below.
Blending factor: It is a real number in the range [0,1]. It defines how large shift towards the target is made: 0 means no shift, 1 gives a shift all
the way to the target, and e.g. 0.5 halfway to the target.
Fixing Nodes: All primary points whose distance to the target is larger than the given tolerance are moved. After adjusting the primary points, it
is checked if there are non-primary points whose distance to the target is larger than the tolerance. The scope of the search is selected by the
options All Curves / Current curve /None. If such points are found, they are fixed by adding a primary point to the first curve of the node.
Note: For the "Current Curve" option in fixing nodes, a curve must be selected in the graphics such that it is highlighted & made as the
current selected curve.
A curve can be removed from the active surface with Remove Curve dialog.
Some options cannot be used at the same time (e.g. keep the curve and remove the curve from the database). All the possible controversial
combinations have not been blocked so you should pay attention to which options to select. Especially be careful with the option 'Remove curve
from database' as this action is irreversible.
References can be added to a curve by selecting Add References from the Curve Menu.
Of course references can also be added manually to a curve definition with the text window.
There is also a shortcut key e or E, which can be used. While a curve is active, you can add references to the active curve by pointing another
curve with the mouse (not clicking!) and pressing e key at the same time.
It is possible to add references also the other way around i.e. to add the reference of an active curve to other curves. This is practical e.g. if the
frames are the definition curves but one frame has to be added later on, when the rest of the grid is already defined. Now with Connect Grid dialo
g you can define the tolerance, which is the distance in meters within the curves will get a reference of an active curve i.e. the other curves will be
connected to the active curve.
You can select which curves are visible under the Options menu. This works only with NURBS surfaces where the hierarchy of the curves is in
use. The menu can also be torn off to be open while working.
Of course fairing can be done manually by viewing the curvature and moving the points manually with arrow keys. The step of one key press can
be set in View & Behaviour, Keys tab; please see chapter about options, Keys tab. Other possibilities and tools are presented below.
In case the node is free, i.e. there is no definition point at the node, the cleaning of a node is tried first by moving a definition point close to the
node exactly to the node. If no point is obtained this way, a node is fixed by adding a definition point on the primary curve.
Finally, the curve is moved to the direction indicated by the arrow keys the distance defined in the Options / Keys / Step of change input field.
is selected, fairing tools using the mouse will become visible in the active point toolbar:
Fairing by showing the point and direction with a single mouse click
sets a mode in which the nearest point on the current curve is moved a step towards the direction indicated by the actual location of the point.
When the new position is shown by a mouse click, the system will select the closest point and move it a predefined step towards the cursor
according to the allowed degrees of freedom.
If the Shift key is kept down, the motion is smaller than the default, and the Control key accordingly provides a larger step. The actual movement
step is defined in the Options menu under the Keys tab.
If the indicated location is not close enough to the current curve, the closest curve is selected. The pointing accuracy is also controlled in the
Options dialog under the Mouse tab.
By default, only primary definition points are moved. In case the toggle button Fix node is selected (third from the left), a free node is first fixed
and then the fixed position is moved accordingly.
When a point on the current curve is selected with mouse button 1, the point is moved automatically to the direction providing better fairness of
the curve. The maximum change is defined in the Options dialog under the Keys tab.
Note: the fairing is calculated from the starting point. Each time a point is changed, a new optimum is available. Therefore, subsequent
clicks at the same point will result in a slightly different final coordinate.
By default, only the current curve is considered, so the fairing of one curve may result in less fairness for the other curves passing through the
node.
is clicked. Now the optimum location is calculated according to the fairness of all curves passing through the node.
A weighting factor controls the weighting between the current curve and the other curves passing through the node. The weight is controlled with
the slide bar in the middle of the fairing tool.
When the slide is to the left, the fairing considers the current curve more, and accordingly when the weight is to the right, the other curves are
considered more. The automatic fairing is also updated every time the weight is changed, which can also be used to find a better fairing.
By default, only primary definition points are faired, but in case the toggle button Fix node if needed
is set, a free node is first fixed and then the faired position is calculated.
The Fairing Window can be opened by selecting Fair from the Window menu or the Fair toggle
button.
This will open a table representation of curve definitions with optional controls to manage the fairing of the current curve. Each time the current
curve is changed, the definition of the current curve is shown in this Window.
Fairing Window
By clicking the Fair button the curve will be faired according to the options set in the Fairing options dialog.
Note: the options available in the fairing dialog are used only for the active fairing session.
Note: if several points are to be faired at the same time, the respective lines should be selected from the grey line number column by
keeping the Ctrl key down and selecting the desired lines with the left mouse button. Clicking the start and end point while keeping the
Shift key down will select the whole range between those two points.
If required, some coordinate directions can be fixed with the options available in the top left corner of the dialog. The maximum change is
controlled in the top row of the dialog.
The possibility to fair considering all related curves at the same time is also available in this tool by selecting the option Fair considering all curves
at nodes. The weighting of the current curve and the other curves passing through the node is controlled with the slide at the top right corner of
the dialog.
The coordinate to be faired does not need to be on the current curve if the option Allow the primary curve to change is selected.
In case the selected line is a node without a primary point, a new point can be added before fairing by setting the option Fix free nodes.
The keyboard shortcut Ctrl+F can also be used to fair a current point. Please note that if only a curve is selected, all the points except the end
points are the objects for the fairing action. If a point is selected, then only this point is subject to the fairing action.
With the Relax button it is possible to check the shape of the curve without the chosen points. The curve references are kept intact but new
primary definition points are added to the referenced curve in such a way that the shape of the relaxed curve is not affected. In other words, the
Relax function means that a secondary curve referring to a primary curve is first let free from the reference to allow the secondary curve to go
smoother. Then the primary curve is attached to the secondary one but the definition point is kept in the primary curve. So, the sequence is that
first the reference is deleted, then the definition point is taken to this new, relaxed location and finally the reference is added again. If there is only
a reference point and no definition point, one will be added.
Note: for Release 2008.1-2009.2: changing the input columns manually by clicking the Apply button is not possible (due to problems
related to the function). From Release 2010.1 the Apply button is removed as unnecessary.
The middle mouse button click picks up coordinates, nodes and curve names from the graphical area and copies them to the clipboard.
By default, nodes and curve names are selected if found at the cursor location, but in case the Alt key is down when the mouse button is pressed,
coordinates are selected regardless of the cursor position.
The graphic input buffer is maintained in a special combobox reserved for this purpose in the top row of toolbars
. Every time graphic input is done the current contents of the buffer are extended by the new input and the new contents are copied to the
clipboard.
The contents of the clipboard buffer can also be edited manually by directing the focus into the combobox and editing text in a normal manner.
Once the focus leaves the field, the new value is copied into the clipboard.
The clipboard's contents can be copied to any field that accepts text input by moving the cursor to the starting point and pressing Ctrl+V keys. In
most cases, the Paste operation is also available in the text popup menu.
Example: let's suppose an auxiliary waterline curve was originally located at a given z coordinate. Its location surface is now to be changed to
pass through several nodes. This can be done with the following procedure:
Primary coordinate points should preferably be located at nodes. There is a convenient tool, Clean Node or Nodes dialog to clean the nodes
either of the current curve or of all of the curves of the surface. Note that the shortcut key C will only perform the action without opening the dialog.
The primary coordinates located within the defined range from a free node are moved to the nearest node. When working interactively with the
curves, it is easy to make unnoticed changes so that some curve references are not valid any more.
Note: the Hull Surface Editor does not give any warning of this. The unused references are still stored in the curve reference. However,
when the surface is finalised, it is a good practice to clean the unused curve references with the Clean All References from the Curves
menu.
It is possible to lock points, curves and even the entire surface so that changes to the object cannot be made directly. This means that the effect
of references will still be enforced, but direct changes will not be allowed. For example, if a curve is locked, its definition cannot be changed, but if
it refers to another curve and the other curve is changed, the change will also affect the locked curve.
Locking is done via the Lock/Unlock dialog, opened from the Edit menu. It is possible to lock and unlock the current curve or point, or all curves in
the surface. Also, it is possible to protect the actual surface itself from changes with the option Lock/Unlock the current patch surface. This will
prevent the preparation of the surface when the Prepare button is clicked in the Hull Surface Editor. Locked curves are shown with red colour in
the Hull Surface Editor.
When the surface is saved, the locked objects are also locked outside of the Hull Surface Editor. Note that these are locked with the function
DB.LOCK and they will not be shown e.g. with the LOCK command in the DEF task.
To unlock a single curve or a point you must first select it from the drop-down list of the curves and points in the surface as the locking prevents it
from being selected with the mouse. Alternatively, you can select a curve with left click + CTRL. Unlocking of all curves or the patch surface is
done just by selecting the appropriate options in the Lock/Unlock dialog.
To implement the changes made to the surface, the surface needs to be prepared. This can be accomplished by clicking the Update
button. This performs both of the manual commands, UPD and PRE.
Note: this update and preparation is done only for the object in the Hull Surface Editor work area. This means that if the surface is not
saved, the original surface will be restored.
button. This button can be found from the Draw Tools toolbar. This automatic redraw updates and prepares the surface and draws the surface
according to the draw options selected. Preparation window information is not shown and the focus and zoom are kept the same.
Special preparation options can be used for a NURBS surface. Preparation Options Window can be opened from the Options menu or by using
button.
The options are explained in more detail in chapter Definition of General Surfaces, Preparation and with the command !EXP PRE . Please notice
that changing the default options can help improve the quality of the surface but also it is easy to make the surface worse if you are not familiar
with these options.
The surface can be plot and intersected using the drawing tools available in the Draw Tools toolbar, shown by clicking the Draw Tools
After selecting the drawing options from the drawing tools, and setting the drawing properties by clicking the Drawing Properties
button, the drawing can be created in the active drawing area by clicking the Draw
button.
in the first tool bar and the Draw Tools: the upper one draws the grid and the lower one the selected surface features.
The default colours and methods used for plotting can be controlled with the Drawing properties.
Note: the drawing properties are stored in the system database for each user. The stored properties are also applied when working with
the NAPA Geometry Window.
The input field available in the right end of the Draw Tools toolbar can be used to enter any drawing commands.
The actual drawing is made in the active view, which is selected with the mouse. The drawing mode is selected from the View menu. It is by
default 3D mode, but it can be set to the OpenGL with Lighting mode in order to view a rendering of the hull. OpenGL view is available only with
Exceed3D.
button.
The Show surface topology option plots the boundaries of the generated patches with different colours depending on the number of sides:
Show node points helps to see the actual points being used in surface generation and detect the problem points.
The option Show normals along boundary curves plots the generated normal vectors along the boundary curves.
As the NURBS surface follows smoothly the primary and secondary curves, it means that there might be some gap between the surface and
definition curves. This table shows the difference between the grid and the generated surface. It is useful mainly with the NURBS surface. The
values are collected under a table and when the tool is opened, all the values are also plotted. If one row is selected from the table, only this node
and related curves are drawn. There is a button to replot all the values again. In the table DNS means the mean distance between nodes and the
surface and DNC means the distance between the curves. If curves refer to each other, DNC is zero. The values are arranged in descending
order of DNS.
Note: if the surface is modified, the offset table should be reopened to regenerate the offset values.
This tool is intended to show the difference and check the accuracy between two similar surfaces. The values are collected under a table when
the Target Surface is being selected(Which can be from any project or version). It can be opened from Tools -> Accuracy Check Between
Surfaces
Note:This Tool is Mainly used for checking the difference between two similar NURBS Surfaces.
The Minimum tolerance between Surfaces is set in Options--> View and Behaviour -->File tab as shown in figure below:
New calculation sections will be created for the object in question if the surface has been changed and prepared.
The info list is plot with macro UI.HYD.QUICK so the output can be controlled by modifying this macro
Note: these calculation sections will be not be saved if the surface is not saved when exiting the Hull Surface Editor.
There is a special window available for viewing the standard body plan view, which holds profile, sectional area curve and standard sections in a
fixed size. The window is opened from the Tools menu by selecting Body Plan Window.
Fairing explained in the previous sections involves the fairing of the actual definition curves. There is also a tool to fair only the surface. Please
notice that fairing is not taken to definition curves, those are kept the same. The tool can be opened from Tools -> Surface Automatic Fairing...
The bounding box of the part of the surface to be faired can be selected interactively by clicking the graphics in 2D view. The box should be
defined in two 2D views to get all the dimensions. The fairing results can be checked right away and the process can be repeated several times.
The result of the fairing operation is a new NURBS surface. Because the resulting surface does not contain any definition curves, it cannot be
opened in the Hull Surface Editor. Geometry Window is recommended instead. The resulting surface can be exported from NAPA e.g. to IGES or
DXF file.
There are also macros to plot or to check the surface. E.g. macro SURFACE_OFFSET shows the difference in distance between the surface and
definition grid. In future development it is studied how to automatically take the corrections to definition grid but at the moment it has to be done
manually.
The current surface can be exported to IGES with File -> Export to IGES dialog, please see the following figure.
The current surface can be exported to DXF with File -> Export to DXF dialog, please see the following figure.
The dialog contains all the same default options as the manual command TODXF. For more information please see the chapter about Link to DXF
or manual command !EXP TODXF.
8. Menus
All the menus of the Hull Surface Editor are explained here. Most of them are already explained elsewhere and in this case only a link is given.
Some of the menus are generally used elsewhere in NAPA so some commands have been deactivated (in grey colour) and some may not be
applicable in the Hull Surface Editor.
8.1. File
8.1.1. New
Automatic creation of a new surface. The information about maximum and minimum values of X, Y and Z coordinates should be given and a
plane defined with four curves within these limits is then formed. You can add more points and curves to achieve the desired shape.
8.1.3. Open...
A surface from backup can be opened. This is still related to old back up method and currently it is not possible to open a backup created with
backup button this way. Only backups created with automatic save can be opened currently with this function.
8.1.5. Close
8.1.6. Save
8.1.8. Backup...
8.1.9. Restore
8.1.12. Printer...
This is the default printer dialog used generally in NAPA. For direct printing and printing with options, please see the menu item Print.
8.1.13. Quit
Closes the Hull Surface Editor and all the related windows. If recent modifications are not saved, you are prompted about saving the changes.
8.2. Edit
8.2.1. Undo
8.2.2. Redo
Activates the previous object. The same function as pushing the Previous Object button in object toolbar or the keyboard shortcut Page Down.
Activates the next object. The same function as pushing the Next Object button in object toolbar of the keyboard shortcut Page Up.
Activates the next node. The same function as pushing the Next Node button in node toolbar of the keyboard shortcut v or V.
Activates the next node. The same function as pushing the Next Node button in node toolbar of the keyboard shortcut b or B.
8.2.8. Lock/Unlock...
8.2.9. Notes...
8.3. Curve
8.3.5. Rename...
A currently active curve can be renamed with this dialog. If changes are not saved, the old name of the curve is returned.
This cleans all the unnecessary references from the current curve i.e. references, where the node or point is not obtained.
This cleans all the unnecessary references from all the curves in the active surface.
A location plane of the current curve can be moved interactively with a mouse. Select a curve, choose the projection accordingly (e.g. if you have
a frame curve, projection should be Z or Y).
The same as moving the plane but also nodes are included.
With this function a location plane curve can be automatically changed to general plane curve using THR command. The plane can be selected
as with three points from the current location plane. The second option creates the general plane with two points and it is based on the original
location surface and the user defined (third option) is based on the plane selection of the user.
With this function a normal location plane curve can be automatically changed to a space curve with location surface in a space. The location
surface shape can be created as a new projection with two points or to take the form from the shape curve projection. You can select the principal
planes or let NAPA select the plane automatically. After modifying the curve automatically with this dialog it is easy to add and modify the location
surface points manually.
Instead of transforming the curve to a space curve with a location surface this modifies the curve to XYZ curve without a location plane. With this
type of curve e.g. angle conditions (/angle) are not applicable.
This function does NOT affect the curve class (boundary, primary, secondary) but the real definition (description) of the curve. If none of the
available options is selected, all the references from the curve are removed and replaced with the coordinate value. Manually this can be done by
adding parenthesis to the curve name reference and the coordinate value is fetched instead. With the options you can control if the end point
references are kept, if references to boundary curves are kept and if the references are reversed.
In some cases with multiple references between the curves NAPA may fail to reverse the referencing order. In such cases the curve
definitions should be modified prior to using this function or the reverse references option should be cleared.
This function changes the nature of the curve definition to a secondary curve i.e. to a reference curve. All the definition points are removed and
references added. There is also an option that instead of removing the definition points, they can be fixed before reversing the reference.
The function is valid for curves having a general location surface and it is intended for modifying the definition so that as far as possible, points in
the location definition correspond to points in the shape. The default action is to move isolated primary points to a nearby point in the shape
definition if possible within a given tolerance.
This affects the default interpolation method for the curves. It is defined in the REF task with parameter GMTP and by default it is M2. The other
possibility is M1. M1 is a spline curve without continuous curvature and M2 is a curve with the continuous curvature.
8.4. Node
Fixes a node i.e. adds a definition point to a plain reference point. This can be found also under mouse 2nd button (right by default) menu if a
node is selected. The third alternative is to use shortcut key n.
Removes the definition point (the coordinate value) from the definition and only the reference is left.
Changes the definition point and reference between the curves. This is not possible if cross referencing happens because of this.
8.5. Point
Removes unnecessary decimals of coordinates, normally caused by graphic input. Normal constraints are applied at nodes. Coordinates near
special values are adjusted to these values with five times the tolerance otherwise used.
The same function as Fair in the Fairing window, please see the chapter about fairing.
Deletes the active definition point. This can be done also with keyboard keys d, D and Delete. If a node with a definition point is selected, the point
is deleted even if the reference is the active one.
This makes difference only if there is a location point and a definition point defined at the same location. In this situation the definition point in the
shape curve is deleted.
This makes difference only if there is a location point and a definition point defined at the same location. In this situation the point in the location
plane is deleted.
Converts a definition point to a real point object as with the command POI. Note that option Find first free index adds a number 1 to the name if
that name does not exist yet.
An opposite to the function above. Converts a real point object to a definition point on a curve.
8.6. Angle
8.6.1. Rotate
Interactive rotation of an angle. There has to be an angle condition to the point or node predefined. If angle is defined to both directions, you can
choose which one rotate.
Interactive rotation of an angle. There has to be an angle condition to the point or node predefined. If angle is defined to both directions, only the
angle after can be rotated. Shortcut key to this is + or -.
Deletes all the angle conditions defined to active point or node. The same operation can be performed with the keyboard space key.
If the angle is defined on both sides of the point or node, only the angle before is removed.
If the angle is defined on both sides of the point or node, only the angle after is removed.
8.6.9. Knuckle
Free angle conditions ( /- ) are added to both sides of an active point or node.
A shortcut to perpendicular angles and rotations for ±1 and ±5 can be found here.
A shortcut to perpendicular angles and rotations for ±1 and ±5 can be found here.
8.7. View
This is a general NAPA menu, so some of the items in here are not applicable in the Hull Surface Editor and therefore they are inactivated (in grey
colour).
8.7.1. Toolbar
This affects the Draw Tools mainly. It is recommended to use the Draw Tools buttons instead of changing the drawing mode. The mode is
changed automatically.
8.7.4. Areas
The number of drawing areas from 1 to 4 in different projections can be changed here. The change is only for the current session though. The
permanent setting is done in View & Behaviour, under the Visuals tab.
Applicable only in the openGL mode. The drawing can be limited according to different coordinates.
The surface can be viewed on different lightings. This works only with openGL.
The lighting schemes can be modified here. This has only effect on openGL.
Not applicable. The Hull Surface Editor updates the drawing area automatically.
Erases the active view. If there are several views, only the active view is cleaned. The same as command !E.
8.7.11. ReDraw
Not applicable. Use the draw buttons in the toolbars instead. The Redraw button in the first toolbar draws the grid and the Draw button in the
Draw Tools draws the surface with options selected in the Draw toolbar.
8.7.12. Background
The background colour can be changed here. The change is only for the current session though. The permanent setting is done in View &
Behaviour, under the Visuals tab.
8.7.14. Titles
8.7.15. Totals
8.8. Window
8.8.1. Text
8.8.2. Fair
Opens the Fairing window. Please see the chapter about fairing.
8.8.3. Table
Opens the curve definition in table representation. The curve can be modified also with this window. The limit coordinates, minimum and
maximum values are shown for the active curve.
8.8.4. Info
Opens the object information window. Please see the chapter about object info.
8.9. Zoom
Activates the zooming window. Click first the lower left corner of the zoom window and drag to the upper right corner. Shortcut key for the same
action is key 2.
Activates the realtime zoom. Keeping the mouse button 1 (by default left) pressed and moving it, you can zoom in and out. Shortcut key for this
action is key 4.
By default zoom is on and using zooming tools, turns the zoom automatically on. There is no reason why this should be turned of.
8.9.4. Panorama...
Activates the pan tool. The surface can be moved in the graphics area. This is only to view the surface; real transformation of coordinates does
NOT happen.
Sizes the current surface to fit the graphics area. The same as the shortcut key 1.
With this window you can control the limits of the drawing area by defining the size of the active object. Sometimes e.g. the bounding box can be
useful if you wish to clip of the part of the surface on concentrate only on small area.
8.10. Projection
This is a general NAPA menu, so some of the items are not applicable in the Hull Surface Editor and therefore they are inactivated (in grey
colour).
8.10.1. Interactive...
Activates the interactive projection. The surface can be rotated and viewed from different projections. The focus point in rotating can be set by
clicking the control button and the middle button of the mouse simultaneously, the mouse pointing on the focus point. This function can be
activated also with shortcut key 3.
8.10.2. Walkthrough...
8.10.3. 3D Perspective
8.10.4. X (Forward)
Sets the side view projection in y-direction. The same as shortcut key y.
8.10.6. Z (Waterlines)
8.10.9. Parallel
8.10.10. Special
8.11. Print
8.11.1. Printer...
8.11.2. Print
Control the printing options, size, type and location. All the formats available elsewhere NAPA are not supported in the Hull Surface Editor.
8.12. Tools
Opens NAPA Geometry Window. In practice the same tools are available in the Hull Surface Editor Draw Tools.
Opens Body Plan Window. See the chapter about body plan.
Opens Panel Task Window. This window uses NPN task (New panel task) to create a panel model. For more information, please see the chapter
about panel models.
The End Rounding Window is a dialog to manage different rounding options in curve definitions. It is assumed that rounding points are defined in
one curve definition, the box curve. The rounding is generated to one curve at the time, in the figure below to WLF7.
The system automatically chooses default for the end curve and the box curve. However, you can change these names if the selected ones are
not correct. The possible rounding methods are:
In this method, the selected rounding method is applied as leaving angle to the box curve. The following options are available to specify the
rounding:
This is similar to the previous method, except that the rounding is applied on the end curve and box curve reference is removed.
No constant radius sector, definition RN with the given radius is applied to the end curve
Constant radius sector angle specified, definition RN with the given radius and angle is applied to the end curve
Specify curve names for deriving radius and sector angle, definition RN with the given curve names for RA and AN is applied to the end
curve
With this method a touching curve name should be specified. After selecting the touching line and end rounding method and executing the
command with OK or Apply, the following happens:
Please note that either the touching curve must refer to the current curve or the other way around. If the current curve is referenced to the
touching line, the node in the current curve is first fixed before fixing the angle.
No constant radius sector, definition RN with given radius is applied to the end curve
Constant radius sector angle specified, definition RN with given radius and angle is applied to the end curve
Specify curve names for deriving radius and sector angle, definition RN with given curve names for RA and AN is applied to the end
curve
If the chosen end curve appears as both the first and the last definition point, an extra toggle button selection appears in the dialog window and
you have to specify the end where rounding is applied.
Here you can specify the name of the profile curve on which end rounding should be plotted, e.g. stem curve. The number of intervals along the
curve can be specified and the maximum width to draw the sections. If touching curve name is given, that is also included to the plot. The plot
uses a macro named GME.ENDROUNDING which can be further modified if needed e.g. to change the colours and it can be used also
independently.
8.13. Options
Hides the curves that are referred in the surface definition but are not included in the surface.
8.14. Help
When Show tips is selected, the button names/descriptions are shown while the mouse cursor is moved on the button.
Opens a general help text about the Hull Surface Editor. This information window is quite limited though.
Opens NAPA Help Viewer where all the windows, commands, quantities, functions and events are collected.
Key Action
Delete Deletes the current point with the options defined in the Options dialog
Ctrl+f,F Fairs the current curve with the options defined in the Options dialog. If a primary point is selected, only that point is
changed; otherwise, all free points on the curve will be faired at the same time. The maximum fairing step is defined
in the Options dialog under the KEYS tab.
e,E Adds a reference from mouse pointer to the currently active curve
+ Rotates the angle counter clockwise by a step defined in the Options dialog. In case the angle is not fixed before,
the angle condition is added.
Space or Slash (/) Removes all angle conditions at the current node
Alt+Arrow In X, Y or Z projections, the keys will move the current point in the direction defined by the arrow by a step specified
in the Options dialog. When the control (Ctrl) key is also pressed, by default the step will be ten times larger and
when the shift key is also pressed, the step will be ten times smaller. In an arbitrary projection Alt+up/down
changes the Z coordinate, Alt+left/right changes the Y coordinate and left/right arrow changes the X coordinate.
b,B Selects the previous node on the active curve and makes the intersecting curve at the node active
v,V Selects the next node on the active curve and makes the intersecting curve at the node active
1 Zooms window
2 Zooms interactive
3 Interactive projection
4 Realtime zoom
If there is already an existing patch surface, with some of the curves the class should be changed to boundary.
The boundary curves should form a maximum of four nodes patches. This can be checked with the Debug window.
When the boundary grid is defined, the preparation options should be checked. In design phase the default settings are enough but if production
level quality is required, you should be more familiar with all the preparation options.
The generated surface can be viewed with similar methods as the patch surface, checking the different possibilities of draw tools. Please check
also the hint about checking equiparameter curves.
The surface can be exported to IGES using the Export to IGES window.
Table view window showing the current parameter tables (PDEF*) and parameters of the selected curve
The parameter definitions can be changed and new parameters defined in the table view window similarly to the normal Table Editor. As an
addition to the normal Table Editor, the table view in the Hull Surface Editor shows the parameters of a curve selected with the mouse. The
parameter definitions can be changed and varied directly alphanumerically in the table view. But the parameters are also changed interactively
when moving a curve definition point in the Hull Surface Editor's main window with the mouse. In this case an extra term is added to the definition
of the parameter formula. The first figure below shows the Hull Surface Editor's main window, where the side view is enlarged and zoomed to the
bow area. In the second figure below, the bulb was interactively modified by selecting the STEM curve's point object P1STEM at the bow tip and
dragging it forwards and upwards.
Hull Surface Editor's main window with the original hull form
Interactively modified definition of the point object 'P1STEM' with automatically added extra terms (2.835
and 1.765)
A new function in the parametric hull form GUI is to graphically show in the Hull Surface Editor's main window the objects that are related to a
selected parameter in the parameter table. This is done by highlighting the curves that depend on a parameter selected in the table view (the
figure below). This helps you become familiar more rapidly with a parametric ship hull which was created by another user.
Curves defined with the selected parameter 'Y1.BLB' in the table view are automatically highlighted
There are many possibilities to adjust the Hull Surface Editor to fit to different ways of working. It is a good idea to go through all the options and
modify it according to one's purposes instead of settling for the default settings. Most of the settings are in View and Behaviour and in Draw Tools,
Edit drawing properties.
Sometimes it is difficult to see the active curve especially if there are many curves in the grid. You can erase an active view with the !E button in
the Draw Tools. After that only the selected, active curve is visible, see below.
Especially with the NURBS surface it is a good idea to check the equiparameter curves and control points distribution. By default in the Draw
Tools the curves and the surface are plotted with the same colour so the distribution is not visible. By changing the colours of pen code and fill
code to be different the curves become visible. This is done in Draw Tools, Drawing properties
A space curve can be used to 'scan' the surface as explained in Hints for fairing chapter. In the Hull Surface Editor the three other views can be
erased first to see the quality better. Notice that the syntax *HULLF has been changed to all the references.
The end user will see the functions as they appear when installed in the graphical user interface, which is not presented here - this chapter is
mainly intended for the person programming the graphical user interface. However, the first section presenting general principles should be useful
for end users also. There is also a short presentation of the HLE subtask under DEF, where most of these functions can be used by commands.
Details of the functions are found in the explanation texts (!COM GME.F, !EXPL GME.xxx).
Table of Contents:
1. General description
1.1. Purpose
1.2. Object of the Hull Surface Editor
1.3. Implementation
1.4. Management
1.5. Graphic display
1.6. Current curve and point
1.7. Degrees of freedom
1.8. Geometric principles
1.9. Interactive changing of points
1.10. Handling angles
1.11. Dependence order
1.12. Editing functions
1.13. Creating a new surface or curve
1.14. Restrictions
2. Working environment
2.1. Work area
2.2. Graphic display
2.3. Management
2.4. 3D cursor
2.5. Current curve and point
2.6. UNDO
3. Editing functions
3.1. Some principles
3.2. Adding, removing and changing primary points
3.3. Changing the location of a point
3.4. Changing the location surface
3.5. Changing general location surfaces
3.6. Special functions for point objects
3.7. Functions related to curve references
3.8. Changing angles
3.9. Automatic fairing function
3.10. Relaxing curve points
3.11. Creating a new surface
3.12. Creating a new curve
3.13. Adding/removing curves
3.14. Renaming a curve
3.15. Changing the curve role
3.16. Locking curves and surfaces
3.17. Rounding points
3.18. Updating, preparing
3.19. Input in alphanumeric form
4. Options
4.1. Options related to management
4.2. Options related to the graphic display
4.3. Showing the curvature
4.4. Other options
5. Preparation options
5.1. Edge control parameters
5.2. Detail options
5.3. Smoothing options
5.4. Preparation diagnostics
6. Subtask HLE
1. General description
1.1. Purpose
The Hull Surface Editor is intended for the modification of hull surfaces or any surface defined by a curve grid. The surface and curves are defined
by the normal alphanumeric descriptions, but instead of working with these, actions are applied directly to the geometric components as visible in
the graphic display and the effect of each change is shown immediately.
In addition to the basic actions on individual points and angles, there are various other editing functions for more complex effects.
In parallel with the graphic actions, geometric components can be shown in alphanumeric form and modified in this way. The graphic changes can
be mixed freely with alphanumeric changes.
The object of this function is the components of a general surface. The surface may be combined, although one normally treats the parts
independently. Arbitrary sets of curves not forming a surface can be handled, but they have to be collected into a formal surface.
The components treated are curves of the surface and the objects they depend on, including point objects. Tangent functions are not
implemented. The curves must defined with the CURVE command by Release 99.1 or later. Old definition curves are automatically converted to
this form.
The curve definition mode, as set by parameter GMTP of the reference system or temporarily by !GMTP must not specify the old definition format.
1.3. Implementation
The functionality of the Hull Surface Editor is primarily implemented as a set of service functions of the group GME, forming tools for the graphical
user interface.
Most of the functionality is also available as commands in the subtask HLE under DEF. However, this task has presently been developed only as
far as needed for testing of the basic functions.
1.4. Management
The functions cannot be used without first establishing a work area to which a surface is loaded by reading from the database or creating a new
one.
During editing, the components are kept in the run time memory. The system can be directed to store every change immediately or do the storing
at separate request (option SAVE).
A back-up copy can be maintained in the auxiliary database, which can be automatically updated at specified intervals.
There is an UNDO function for cancelling as many steps backwards as specified in the task setup.
For handling the graphic interaction, one or several views are maintained, which are automatically kept up-to-date. In addition to the curves, the
display shows the available points and angles by symbols and designates the currently selected curve and point by highlighting.
A graphic symbol, called the locator, is maintained for marking locations. The locator represents a point in space, although in some operations,
only its position in the current view is relevant.
The display can also contain a representation of the curvature of the current curve or both curves meeting at the current node.
The target of editing functions is the selected and highlighted curve. Many functions also require that there is a selected point on the curve. The
selection can be done by pointing in the display. If there are several alternatives at a given point, repeated selection will take one at a time.
In a node, it is often relevant which one of the participating curves/points is the current one.
All geometric changes are made using the degrees of freedom already available, formed by the coordinates and angles contained in the
definitions. This includes the coordinates occurring in qualified references (e.g. STEM/Z=6).
Adding or removing free points and angles are done as separate operations, for example, adding a primary point by fixing a point on a curve.
The degrees of freedom are marked in the graphic display by symbols. The aspects shown and the symbols used can be controlled by the user.
Normally, a definition point obtained by a curve reference is not marked unless it is the current point.
The application of changes is guided by two principles: points are kept in the location surfaces and nodes are kept clean.
The first aspect is not relevant for XYZ curves. Location surfaces are changed as separate operations. Keeping nodes clean means that as far as
possible, primary points are kept in the nodes and when moving points, constraints are added for this purpose.
There is special service available for correcting nodes where a primary point is near it but not in it.
Points can be moved graphically in all projections where the desired movement is visible. In general projections an additional constraint is needed
for interpreting the effect as a movement in space. This constraint can usually be derived from the principles above; otherwise, the coordinate on
the axis closest to the projection direction is kept fixed.
Additional constraints on the movements can be placed at separate request. For better accuracy, the resulting movement can be specified to be a
fraction of the actual cursor movement.
By default, points are not allowed to move in a way that would change their location with respect to other definition points.
Angles specified in the curve definitions can be marked by lines in the display. If the angle is expressed by a vector, the length of which is
relevant, this is reflected by the length of these lines. Changing angles graphically is possible in the projection corresponding to the one where the
angle is defined.
The Editor handles only explicit angles, not angles specified indirectly, for example, *X=10.
It is a necessary requirement that the set of curves does not involve cross referencing. If this should be the case when the surface is read, an
attempt is made to break the reference loops, but the solutions for this are at a tentative stage. The same reservation applies to the effect of
changing dependence order at a node.
If you have defined some curves as boundaries, it is a good practice to refer them only to the other boundaries and not to secondary and primary
curves to avoid confusion.
geometric changes
- moving a point
- changing an angle
- applying the fairing algorithm
- relaxing some of the curve points
- changing the curve position (of a principal plane curve)
adding/removing degrees of freedom
- fix a point on a curve, add a new point
- fix an angle
- remove a point or an angle
changing references
- adding/removing references
- change order of dependence at a node
- remove unsatisfied curve references
creating new curves
- create a plane curve at a specified place
- convert a curve to more general forms
changing the curve role
- change a primary curve to a boundary or a secondary curve or vice versa
various functions
- clean node: adjust a primary point to be in the node
- round coordinates: clean unnecessary decimals from coordinates
- match points in the location surface with those in the shape
When creating a new surface, a preliminary size must be specified, for example, by using the reference dimensions. Four dummy curves are
added representing the extension defined.
When creating a new curve, its location surface must first be given as fixed. An initial set of points is added which can be modified by the normal
editing functions. Alternatively, the curve can be placed through the existing curves. Curves with more general location surfaces or xyz-curves are
created by converting a plane curve to this form.
1.14. Restrictions
In most cases, these restrictions do not mean that the surface cannot have these features, only that they cannot be handled graphically.
2. Working environment
The editing routines are implemented as a set of service functions with the subsystem id GME. They are designed to work within an environment
called work area, recording the state of the process. Several work areas may be active at the same time, but they should treat different surfaces
with different curves. Functions related to the work area are GME.OPEN, GME.CLOSE, GME.WORKAREA and GME.STATUS. GME.GET
creates a work area if none is already open.
The objects being treated are maintained as named descriptions in the free storage. It is not possible that a curve is different in different work
areas.
The graphic display is central to the Hull Surface Editor. It is formed by one or several views, created by the normal functions. The view must be in
the 3D mode.
The Hull Surface Editor handles the following properties of the display:
by default GME.GET sets the size of the current object as basis for scaling
when drawing curves, the colour of the curves and the marking of points and curvature indicators are handled by the Hull Surface Editor
(see options)
Curves are plotted in the so-called super 3D mode: the drawing is recorded as references to the curves and points. !VIEW R or the equivalent is
enough to update the display after changes of the geometry. Outside the Hull Surface Editor, the super 3D mode is not officially available, but it
can be requested with option S3D in the PLOT and GRID commands.
Updating the display and highlighting the selected object is done automatically for the views assigned (GME.VIEW).
Redrawing the screen is done with GME.REDRAW. The display is updated automatically after changing of curves.
The curvature can be expressed by colouring or using the porcupine representation. For the latter, there are the options to have it on all curves,
on the current one only or at the curves meeting at the current node.
With the function GME.CURVATURE can be used to specify a list of curves for which the curvature is always displayed.
2.3. Management
GME.GET gets the surface and its parts to the work area. The set of objects treated always contains all objects used in the surface directly or
indirectly. Objects not valid in the editing process (e.g. a curve not created by CURVE) are omitted. Additional curves can be treated by calling
GME.ADDCURVE.
It is necessary that there is no cross referencing, and if needed, an attempt to correct the curves is done when reading. The solution for this
function is preliminary.
Changes may be written directly to the database or at request only (GME.SAVE). See option SAVE.
A safety copy can be maintained in DB4 (GME.BACKUP, GME.RESTORE). By default, GME.RESTORE will only accept a copy made during the
current session - a back-up from an earlier session may be completely irrelevant. Retrieving a back-up copy later (e.g. after a crash) can be done
with the option B in GME.GET. There is the option to have a back-up updated automatically after every n:th change.
The state of the surface before the last change can be restored with GME.UNDO. For special options related to UNDO, see below.
By default, the whole grid is always updated after a change. In case of changes done by other means, GME.CHANGED can be called for handling
the effects.
Note: changes done by running a macro using GME.RUN are subject to the rules presented here (storing in the database, undo).
For actions not handled automatically, the events GME.CURRENT and GME.CHANGE are available. See also GM.CHANGE for changes not
done by the Hull Surface Editor.
If the current surface is a combined one, a part can be made current with the function GME.PART. This is presently relevant for adding or
removing curves only.
When finishing the treatment of a surface that has not been saved, the GME.TIDY function should be called for removing data remaining in the
free storage.
2.4. 3D cursor
A graphic object referred to as the locator is available as a tool for designating locations and pointing at objects. It has a location in the ship
coordinate system and it is displayed in all views by a symbol, the properties of which can be assigned by the options.
The functions GME.SETLOCATOR, GME.GETLOCATOR and GME.MOVELOCATOR relate to this. GME.MOVELOCATOR (interactive change
of the locator) triggers events GME.CHANGE3D. Note the option GME.SETLOCATOR('F'): place the locator at the curve at which it appears to be
when seen in the current view.
Changing the locator as such never affects the surface, but it may be relevant for a subsequent editing function.
In many functions, the position of the locator is only relevant as far as seen in the current view, for example, for designating a curve. Option F in
the GME.SETLOCATOR function changes the position in space to match the position of the curve pointed at.
Most editing functions relate to the current curve or point object. On the curve, a definition point can be selected as current.
Note: points defining the location surface are not available as definition points in this sense.
The selections can be done by pointing in the display (GME.IDENTIFY) or by direct assignment (GME.SELC, GME.SELP). In GME.SELC, the
curve can be designated by its name or by taking next/preceding in the dependence order.
The current curve and point are indicated by highlight in the display (see options).
The functions GME.CURVE, GME.POINT, GME.DEF, GME.DES and GME.COORD return information about the current curve and point.
When selecting an object graphically using GME.IDENTIFY, there may be several interpretations. By giving the last result as parameter, the
function checks for other interpretations.
The tolerance applied when identifying points graphically can be set with option ITOL (unit 0.1 mm screen scale).
2.6. UNDO
The GME.UNDO function allows changes to be cancelled. By default, the simple version of the back-up management is used, allowing one step
backward. With the parameter UNDO, the number of steps can be increased. The cost for increasing this number is mainly the memory occupied
in the free storage.
In the simple version, back-up copies are made of all curves changed in a given operation. When multiple undo is selected, only those objects are
stored the definition of which has been changed, while the others are recalculated at restoring. This affects the use of GME.PLOTOLD, which
uses the back-up curves. With multiple undo, the possibility is provided to cancel the last undo, provided that it is done before the next change.
The GME.UNDO function also handles auxiliary functions related to undo. Among other things, the name of the function doing a change is
recorded and available for information.
By setting option B (=bundle), all consecutive changes done with the same function are treated as one change, as far as undo is concerned.
With option FIX, all subsequent changes are treated as one change until option FREE is given. This is intended for a series of changes handled
by a macro and visible to the user as one operation.
3. Editing functions
As the rule, the editing functions act on the current curve (or point object) and where relevant, on the current definition point. Note that in a node
with a primary point, there are two (or possibly more) definition points: the primary point on one curve and the referenced points on the others.
These are different points, but in some functions (e.g. GME.MOVE), an automatic change may be requested (option C). The similar distinction
concerns a point object in the node.
In an operation where another object is involved (e.g. add reference), this object is indicated by the locator, placing it on the object as visible in the
current view (it does not need to coincide in space).
Changes can be applied to existing degrees of freedom only (primary points, angles). Adding degrees of freedom is done as a separate action. In
a reference of the form name/axis=q, the coordinate q represents a degree of freedom.
The location surface is kept in all operations not explicitly changing it.
By default, attempts are made to keep primary points in nodes. This means that changes of primary points are constrained by the curves meeting
at the node and if needed, qualifiers involved in curve references are modified.
As a rule, the default action of editing routines is the most restricted (=safest) version, while more powerful forms can be obtained by options. For
example, GME.MOVE and GME.MOVEI do no implicit change of the target point unless option C is given.
As the primary points should normally be at a node, the most important function for adding a primary point is GME.FIXNODE: add a primary point
to the curve that is first in the definition order at the current node.
An arbitrary point on a curve can be made primary by GME.FIX. The curve must be current and the point indicated by the locator or given in the
function call.
When none of the functions above is useful, for example, for extending a curve, GME.ADD is available.
GME.DELETE deletes the currently selected definition point, normally a primary point. At a node, the primary point may belong to another curve
than the current one. Option F is needed in order to remove a non-primary point.
With options L and LL, the effect on general location surfaces can be controlled.
The function GME.MOVE assigns a new position to the current point. The function GME.MOVEI has a similar function, but the move is done by a
real time cursor action.
The current point must include a point object, a primary point or a qualified reference. If the option C has been given, this point does not need to
be the current one at the call. If the degree of freedom is provided by a point object, the change is primarily done to the point object. A qualified
reference means that in a reference of the form name/axis=q, the coordinate q will be changed.
By default, the location surfaces involved are unchanged. With option L, the location surface is allowed to change if there is a primary point at the
moved point. With option LL, the purpose is to change the location surface only.
Unless the location surface is also affected by the change, constraints are applied for keeping the moved point in the location surface(s). In
addition, there is the constraint that the moved point must not cause the points to be reordered (lifted with option O). The implementation of this
constraint is approximate except in the case that sorting is done according to a coordinate. Furthermore, it is only applied to the most primary
curve involved.
In MOVE, the new position must be within a distance given by the options MXDX, MXDY and MXDZ. This limitation is primarily added for
preventing mistakes when the intended curve or point is not current.
Additional constraints may be added by options. The option R has the effect that only the coordinate obtaining the largest change is modified. The
R option is valid in general projections also: all three coordinates are taken into account when deciding the effect.
The option K (keep) has the effect that the new position of the moved point is corrected to be at the original curve. The effect is (approximately) to
move the point along the curve. See also GME.CLEANNODE.
With option CC, the point moved can be changed after starting the operation. Points not available for modification are ignored without message.
If the operation is started with the button 1 down or if option F is given, the operation is finished automatically after the first change; otherwise,
several moves can be done with a single function call and finished by pressing the rightmost button.
Changes can be done graphically in non-orthogonal projections. The condition needed to fix the point in space is derived from the constraints on
the move, if any; otherwise, the coordinate on the axis closest to the projection axis is kept fixed.
By default, the moved point follows the cursor directly. Since small changes can be difficult to control this way, there is the option S, by which only
a fraction (0.25) of the cursor movement is applied to the point. Option SS does a stronger reduction of the movement (0.1).
After each recorded step in the movement, the event GME.CHANGE3D is raised, giving access to the coordinates of the current point. The point
is returned after applying all interpretations, including movement constraints.
In case of timing problems in the resulting update processes, a pause can be inserted using the option DPAU.
The extent to which the grid is updated during the interactive operation, as well as the application of curvature indication can be controlled by the
options UPDI and CRVI.
Changing a general location surface is done similarly as the shape projection, as presented below. For changing the fixed coordinate of a
principal plane curve, the following functions are available:
GME.MOVELS changes the location of the location surface. If there are intersecting curves having primary points at the current coordinate, there
is the option to have the points corrected for maintaining the nodes.
Only definition points in the shape can be made current, consequently location points can be changed at these places only. By default, changes
are applied to the shape only.
Changing the location definition is controlled by the options L or LL. Option L is implied if the permanent option ILS has been set to 1.
With LL, the intention is specifically to change the location definition. The current curve and point must match this requirement. If the location is
defined by a point object, the change is implemented by changing the point object.
With option L, the operation is allowed to concern the location definition. Changes requested are carried out in the location surface and/or shape
depending on the available degrees of freedom.
Changing the degrees of freedom in the location surface can be done with the following functions:
Option L can be replaced by LL for applying the effect to the location surface only.
The function GME.CLEANLOC is intended for keeping the points in the two projections matched. As the minimum, it adjusts location points to be
near shape points. Optionally, location points without match are deleted or location points added to match points in the shape.
With option A in GME.MOVE or GME.MOVEI, moving points in the shape projection will change corresponding points in the location surface also
so that their argument coordinate is kept the same as in the shape. Note that this is not the same effect as obtained by option L, allowing the
location points to change freely.
A missing curve reference can be added with the function GME.ADDREF. The reference can be specified explicitly in the call; otherwise, the
target of the reference is designated by the locator.
For xyz-curves, the place where the locator is placed on the curve is relevant, giving the qualifier needed.
With the G option, the whole grid is the target. All curves intersected by the location surface not already having a reference to the current curve
and not referenced by it are selected.
For removing a reference, GME.DELETE with option F is used. References can be removed from a node also with the function
GME.REMOVEREF.
The function GME.REVERSE reverses the referencing order of two curves at a node. This is likely to cause cross referencing, which is handled
by additional reversals or removals of references. The solutions for this are considered pilot level.
The function GME.CLEANNODE does in one operation the equivalent to GME.FIXNODE and GME.DELETE. It is intended for cleaning up a node
where there is a primary point near but not exactly at the node.
GME.CLEANREF can be called for removing inactive curve references, i.e. curve references not resulting in a definition point.
Adding or deleting degrees of freedom for angle can be done with the functions GME.FIXANGLE and GME.FREEANGLE. For just
creating/removing a knuckle, options K and D in GME.FREEANGLE are available.
Explicit changes can be done with the function GME.NEWDEF. Angles are designated by aspect A1 (angle before), A2 (angle after) and A (either
both sides or unspecified). An angle condition is removed by giving an empty value. With aspect A, both sides can be assigned in one operation,
by separating the values with //, for example, '-//-' gives a knuckle.
Non-interactive changes can be done with the function GME.CHANGEANGLE. The main difference compared with using NEWDEF is that
directions can be given by angles or vectors and as rotations, regardless of the way the original definition is made.
The function GME.ANGLEI does an interactive change of angle. The current point must have a fixed angle, either as an angle or a vector. For
curves with a location surface, the shape projection must be current. For XYZ curves, the change is interpreted as concerning the components
nearest corresponding to the current projection.
The angle is designated by the direction from the point to the cursor. If the angle is given by a vector and its length is relevant, the distance to the
point is also relevant. In this case, the vector showing the current angle is plotted to the cursor; otherwise, it is plotted with the same length as
given by option IAH. The variable length vectors are plotted with a length IAH*SQRT(actual length).
The function GME.FAIR applies the automatic fairing function to the current curve. The allowed movement is a compulsory parameter.
By default, all primary points except end points are used as degrees of freedom. This can be changed by providing a list of fixed or movable
points or by options C and K:
By default, the points are set to move at right angles to the curve as seen in the shape projection. This may be modified by the normal constraint
options (X, FX, etc) and by the automatically placed constraints. For an xyz-curve, the operation is done in the projection where the curve has the
smallest extension.
The result obeys the same conventions as GME.MOVE. The primary degrees of freedom may be located at other curves or point objects and the
normal constraints are applied. Options L and N can be used for modifying the effect.
Note: the fairing is applied to the shape projection. The L option means only that the location surface of intersecting curves is allowed to
change.
The function GME.RELAXNODE can be best described by decreasing the tension of the current curve. The shape of the curve after the operation
is the same as it would be without the reference to the other curve. Referencing order is kept unchanged, but a new primary point is added to the
curve being referenced.
In many cases it is desirable to modify more than one reference at the same time. This can be done by using the function GME.RELAXCURVE.
The use of the function is similar to GME.FAIR and the target of the operation is always the current curve.
In order to manage the graphic display, the extension of the new surface must be specified. It can be done directly or by using the reference
dimensions. A=afterbody, F=forebody.
The Hull Surface Editor is not prepared to handle an empty surface. Therefore, a new surface is equipped with two curves named ssss-LOWER,
ssss-UPPER, ssss-AFT and ssss-FORE, where ssss is the surface name. These are placed so that they span the defined size of the surface.
When real curves have been added to the surface, the auxiliary curves can be removed (GME.REMOVECURVE).
Creating a new curve is implemented so that the initial operation has only a few options, while the actual curve is constructed with the normal
editing functions. The original curve is a plane curve in a specified plane and created by GME.NEWCURVE.
The coordinate of the curve can be given at the call or taken from the locator.
The extent of the curve is 1 m at the place indicated by the locator (default) or according to the current extension of the surface (option E).
Alternatively, the curve is placed through the current curves (option G).
The role of the curve in the surface can be specified either at the time of creation or later by using the function GME.CURVETYPE.
Creating a curve with a general location surface is done so that in the first step, a plane curve is created as above. The function GME.GENLOCS
converts this to a curve with the same shape by formally as a general space curve. Alternatively, the original plane curve can represent the
location projection.
An xyz-curve is created by beginning with any one of the operations above and then calling GME.CONVERTXYZ.
The function GME.ADDCURVE adds a curve to the surface or to the editing process only. The role of the curve can be also set to be a boundary
or a secondary curve.
The function GME.REMOVECURVE removes a curve from the surface or from the editing process only. The latter is allowed only if the curve is
not directly or indirectly referenced by any remaining object.
By default, all references to a removed curve are deleted. This function alone can be used with option R. Optionally, the removed references are
replaced by fixed points.
If the current surface is a combined one, one can rely on GME.PART for making a specified part current. This part is used as the target in the
functions above. If no part is current (=the combination is current), REMOVECURVE takes the first part containing the curve while ADDCURVE
gives an error.
GME.RENAME assigns a new name to the current curve. References to the curve are corrected in the surface and other curves.
In the releases prior to 2009.1 all the curves have been equal. In releases after 2009.1 the curves can have different roles in the surface. These
roles can be inquired and modified by using the function GME.CURVETYPE.
You can lock curves or surface parts, so that they are not edited unintentionally. Locking and unlocking is handled with the function GME.LOCK
and the current locking status can be inquired by using the function GME.LOCKED.
The GME.ROUNDPOINT function addresses the problem that coordinates resulting from graphic input tend to have unnecessary decimals
making the reading of the curve definition difficult. There is also the problem of accurately assigning points that should have special values, for
example, zero. The latter question is presently treated only as far as to concern zero (all axes) and the reference breadth (y-axis).
The resolution to which points are rounded can be specified in the function call, separately for the different axes. The default is 10 times the
resolution implied by the option DEC. Five times this tolerance is used as tolerance for the special values. For example, if the rounding tolerance
is 0.01, coordinates within 0.05 from zero are assigned exactly zero.
GME.UPDATE starts updating the curves with various options, including options regarding the handling of cross referencing. Normally, this
function is not needed, as the updates are done automatically.
With option P, the function also does the preparation of the surface. This is done obeying the SAVE option: if direct saving is not on, the
preparation result is not written to the database.
Components of a curve or the whole curve can be defined/changed with the normal syntaxes. In contrast to using the normal curve definition
functions, the following functions include the services of the Hull Surface Editor: handling updates, redrawings, UNDO, obeying the SAVE option.
The function GME.NEWDEF replaces specified components of a curve definition by one given in text form.
4. Options
Options are assigned with GME.SETOPTION and inquired with GME.GETOPTION.
UPDI: ½/3 update extent during real time operation (MOVEI, etc)
1=current operand only
2=immediately affected operands (default)
3=whole grid
BKI back-up interval. If >0, an implied GME.BACKUP is done after every BKI:th change
CC curve colour
LC locator colour
The two last cases are line segments, where 'symbol' is the line thickness and size length; for the others the symbols are expressed as marker
numbers and the size is the marker height. Sizes given positive are in ship scale; otherwise, in drawing scale. When zooming markers are given
in drawing scale, the size is increased, but only in proportion to the square root of the enlargement.
The on/off options are designed to have alternatives 0=off, 1=for current curve only, 2=curves at the current node, 3=all curves. Presently, only
alternatives 0 and 3 are supported. For LPO, there is the alternative 4 with the same effect as 3, but in addition implying option L in move
operations.
ITOL tolerance for identifying objects in the display unit 0.1 mm, drawing
scale
MXDY: similarly Y
MXDZ: similarly Z
5. Preparation options
These options are available since Release 2009.1 and they are meaningful only if some of the curves are defined as boundaries. Changing
preparation options is done in the same way as changing other options, but for the sake of clarity they are modified with other functions. The
preparation options are assigned with GME.SETPOPT and inquired with GME.GETPOPT.
G: type of grouping
TTOL: topology tolerance. If the distance between two points is less than
this, they are treated as being one single point.
Visual preparation diagnostics are available with the function GME.PREPDIAG. The available options include checking the boundaries of the
generated surface elements and plotting the normal vector distributions along the boundaries.
6. Subtask HLE
Although the editing functions are primarily intended to be used with the graphical user interface, they can also be used independently. The
minimum needed is that a surface is made current by !CAL GME.GET(name). The !CALC command, rather than @GME.GET..., has the
advantage that !L can be used. GME.GET creates a work area if one has not already been created.
However, the use of the functions manually requires quite a lot of typing. Therefore, most of the functionality of the Hull Surface Editor is available
as commands in the subtask HLE of the DEF task. Most of the commands correspond directly to functions, including the parameters, and the
command explanations contain only brief versions of the corresponding function explanations. Commands and function calls can be mixed freely.
In addition to the editing functions, the subtask contains various auxiliary functions. It also contains the direct definition functions (CURVE,
POINT). When used under the HLE task, these functions work as the editing commands, regarding update of the display, storing in the database,
availability of UNDO.
The present version has been developed primarily for supporting the development of the service functions, while its use for actual definition work
has not presently been considered seriously.
Transformations (GM)
Table of Contents:
1. Purpose
2. Function
2.1. General
2.2. Affine transformation
2.3. Displacement transformation
2.4. Combined affine and displacement transformation
2.5. Translation
2.6. Piecewise linear transformation
2.7. Transformation of frame area curve
2.8. Copy of parent objects
3. Input data
3.1. Change of dimensions
3.2. Translation
3.3. Piecewise linear transformation
3.4. Piecewise linear displacement transformation
3.5. Transformation of frame area distributions
3.6. Copy of parent objects
3.7. Keeping stem and stern constant
3.8. Definition of the parent version
3.9. Definition of the parent objects
3.10. Definition of the parent hull for integration
3.11. Definition of the result version
3.12. Overwriting an existing result version
3.13. Transformation of the frame system
3.14. Transformation of the reference system
3.15. Transformation of the preparation results
3.16. Transformation of the data element
3.17. Canceling a command
3.18. Accuracy of a displacement transformation
3.19. Check of input data
3.20. Information about transformation
4. Examples
4.1. Affine transformation
4.2. Piecewise linear transformation
4.3. Piecewise linear displacement transformation
4.4. Transformation of frame area curves
4.5. Creating a hull from several parts
4.6. Keeping stem and stern constant
4.7. Moving a curve
5. Free Form Deformation (FFD)
1. Purpose
The purpose of transformations is to produce modified hull forms of a given parent hull. Quick changes of main dimensions, displacement and
longitudinal center of buoyancy are possible. The result of the transformation should be checked and possibly modified to ensure that the result is
acceptable.
2. Function
2.1. General
The object of a transformation can be a general surface or a curve of any version of any project. The surface must be a general grid surface, or a
defined or generated patch surface, or any combination of these. Rooms, surface objects and facet surfaces are not transferable.
The result may be stored in any version of the current project. If the version is a new one, it is created by the transformation task (but not
registered in the system database until access to the new version is made via the monitor). In order to allow overwriting the parent version or
another already existing version, a special command (DESTROY) must be given.
The transformed internal geometry is not exactly equivalent to the transformed definition data (=geometry after EDI **HULL; ADD). To make these
consistent, the commands EDI **HULL; ADD; PREPARE HULL are recommended after each transformation. This is automatically done if the
optional command DATA ON has been given. The command can be stored in the setup macro TINIT*TRA in the system database.
The general characteristics and reference dimensions in the project database are also transformed and updated by the program. If the result is a
new version, they are created. Transformation of the reference dimensions may be rejected by the command REFERENCE OFF.
As a default the frame system is not transformed. It can also be transformed or copied as such. The options are set by the command FRAMES.
If the coordinates are only scaled, the transformation is affine. An affine transformation is defined by specifying the change of the length (L), the
breadth (B) and the draught (T) corresponding to the dimensions LREF, BREF and TDWL of the reference system.
In a displacement transformation the moulded volume (D), the block coefficient (CB) and the longitudinal center of buoyancy (LCB) can be
changed. There are also options (PA and PF) to control the extension of the midship region. In a normal case the transformation is done as a
single cycle calculation. If more accuracy has been required by the command ACC, an iterative method is used.
There are no changes in the section y=0, if an optional command CONST is used in a displacement transformation. In this case only D,CB and
LCB can be changed. Several options, corresponding to different transformation functions, are available in the command CONST.
In general, the transformation of the reference dimensions (L,B,T) and the displacement quantities (D,CB,LCB) can be done simultaneously.
However, the affine part is not possible with the command CONST.
2.5. Translation
By a translation an object is moved along a coordinate axis. For example, the location of the origin can be changed for convenience. It is also
possible to change the length of the parallel region of the ship by translating only a part of the hull. As an example, the hull is translated 10 meters
along the x-axis by the command MOVE X 10. Only the part whose x>50 is translated by the command MOVE X>50 10. When the length of the
parallel part is reduced, an update of the surface is probably needed, because of an overlap in the internal representation of the definition curves.
A piecewise linear transformation is defined by a set of original coordinates and their transformed values. The transformation function is linear
between adjacent coordinates, and equal to a translation beyond the given coordinates. Three functions, one for each coordinate, may be
simultaneously active. The set of transformed coordinates may contain one or two unknown coordinates marked by x. They are calculated so that
the required volume and/or the required longitudinal center of buoyancy is obtained.
A transformation that is defined by a modified frame area is a special case of the piecewise linear transformation.
The objects are copied to another version. No calculations, for example, no rounding of coordinates, and no phase changes of 360 degrees of
angle conditions are done, as the case may be with dummy transformations such as DIM L=+0
3. Input data
Information about the parent and the result version, transformed objects, and the type of the transformation must be given. A list of the given or
default variables is shown by the command ARGS. The additional commands that are available are also listed with a description 'not given'. The
command ARGS is executed automatically, when a non-professional user enters the transformation task. Otherwise, the use of ARGS is highly
recommended.
Note that the use of ARGS effects the way the actual calculation is started. If the command ARGS has been given, the definition of the task can be
done in any order including redefinitions, or even resetting the task by the command SKIP. When the transformation is completely defined, the
process is started by the command OK.
To obtain compatibility with the old program versions, there is another way to start the transformation. If the command ARGS has not been given,
the transformation starts (without the command OK) as soon as the commands TRA, and either DIM or MOVE has been given. You can first specify
the type of the transformation with the commands DIM or MOVE. Curves and surfaces can then be transformed by giving one or more TRA comma
nds. The type of the transformation can be changed by a new DIM or MOVE command. Another way to do a transformation is to first give objects
to be transformed by a TRA command, followed by a DIM or MOVE command.
where
If a quantity is missing, the corresponding value is not changed. However, in an affine transformation the displacement quantities D and LCB will
change too, CB remains unchanged, and PA and PF have no effect. D and CB describe the same quantity. If both D and CB are given, CB has
the effect. LCB is given with respect to the origin.
Examples:
3.2. Translation
where
Examples:
MOVE X -1.25 Moves the whole ship 1.25 meters along the negative x-axis.
MOVE X<50 5 Moves part of the ship (x<50) along the positive x-axis.
If a restriction has been applied, the transformation function is not continuous, and as a result the internal geometry of the transformed object may
be in contradiction with the definition data. In such a case the command UPDATE object F; should be used.
A piecewise linear transformation function for the coordinate x,y or z is defined by the command PL. Three functions, one for each coordinate,
may be simultaneously active. The command PLX is equivalent to PL X etc.
PL coord function;
where
function transformation function (q1,q2,...,qn) -> (q1t,q2t,...,qnt) ,where the original coordinates are given before the arrow, and the
transformed coordinates after that. Parts of the hull with coord<q1 and coord>qn are moved without scaling so that q1 -> q1t and
qn -> qnt.
A pure displacement transformation (D, CB or LCB is changed) can be combined with a PLX transformation. One of two unknown coordinates
marked by X may be included in the set of the transformed x-coordinates.
Syntax:
The unknown variables are solved to obtain the required moulded volume D and/or the longitudinal center of buoyancy LCB given by the DIM com
mand. Parts of the hull with x<x1 and x>xn are translated without scaling so that x1 -> x1t and xn -> xnt.
Before carrying out the transformation, the unknown variables can be calculated and shown by the command PLX; (without any parameters).
where fad1 and fad2 are the frame area distributions along the x-axis before and after the transformation. They are principal plane curves in a
constant y-plane, and their z-coordinate corresponds to the area of the frame. When the curves are not in the current version, the syntax
curve/version must be used. Frame area curves of an existing hull are generated by the command GEN in the task FRA.
If the amplitudes of fad1 and fad2 are different, the options ! and !! can be used to control the result. As a default, the coordinate representation of
the PLX-transformation is calculated from the given fad1 and fad2. With the option !, fad2 is scaled to the amplitude of fad1. The volume of the
result differs from that of fad2 by this scaling factor. With the option !!, the coordinates y and z are scaled so that even the volumes are equal.
Internally the transformation is a piecewise linear transformation. As a default the original x-coordinates of the PLX-transformation are equal to the
x-coordinates of fad1. If the optional set (x1,...,xn) is used, the transformation is exact only at the given points.
In the defaulted output of the command ARGS, the PL command is the string given by the user. For example, PLX c1 -> c2 is reproduced as such.
The same transformation in coordinate representation PLX (x1,...,xn) -> (xt1,...,xtn) is shown by the command ARGS !.
Area distributions of y- and z-sections are analogously transferable by the command PLY and PLZ.
If the command COPY has been given, the transferred objects are copied to the result version. Only the dates of these objects are changed. No
calculations, for example, no rounding and no phase changes of 360 degrees are done, as the case can be with dummy transformations, such as
DIM L=+0.
In a pure displacement transformation (only D,CB or LCB is changed) section y=0 may be defined to be constant by the command CONST. The
generated transformation function is such that certain plane curves are converted into general space curves. Of the three types of principal plane
curves, only two can simultaneously be invariant and preserve their type.
where
location (opt) With option FW a region can be given, where the change is required to be small. The following options are available:
Val is a real number, given by the user. A,M,F and AF have their own AMF-values. After a transformation, information about these
can be asked with the command INFO AMF. With the help of these you can interpolate the required hull form from those forms that
are already transformed, for example, so that the transformation is somewhere between the options A and M.
When the command CONST has been given, transformation above the design water level can be controlled by the command ABOVE:
where
CDA (opt) A characteristic dimension of afterbody, which determines how fast transformed waterlines become similar to the corresponding
waterlines of the parent hull. CDA is always positive. If CDA=0, both waterlines become equal immediately above the design waterline.
If the command ABOVE is not given, CDA and CDF are defaulted to a very large number. If this option is needed, values around the
height of the ship should be tried.
The parent version is given by the command PARENT. It is defaulted to the current version.
PARENT project/version;
where
The special command PARENT RUNTIME; means that the parent data is fetched from the free storage and not from the database.
Objets of the transformation can be curves and general surfaces of the parent version. They are defined by the command TRANSFORM:
where
objects the names of the surfaces and/or curves of the parent version to be transformed. If only one object is given, it is interpreted to be the
hull surface for the integrals also (see the command HULL). The parent version may optionally be defined here also by the syntax
hull/version or hull/version/project (see also the command PARENT).
version , +DATA/element
where
version (opt) result version, default: current version. The result is always in the current project.
+DATA/element (opt) the internal representation of the objects is produced and the definition data stored to 'element'.
For an alternative definition of the result, see the commands RESULT and DATA.
The surface from which the integrals and the resulting transformation function is calculated is defined by the command HULL. This is needed only
when D, CB or LCB is changed.
HULL hull;
where
Note: the hull for integrations may also be given in the command TRANSFORM. If it has been given in neither way before the
transformation begins, the name of the parent form is defaulted to be HULL in the current version and project.
The destination of the transformation in the current project is given by the command RESULT:
RESULT version;
The defaulted version is the current one. In this case or if the version is another already existing one, the command DESTROY is needed in order
to allow an overwriting.
The special command PARENT RUNTIME; means that the result is not stored in the database, but left in the free storage.
Transformation to the parent version or to another already existing version cannot be done without the command DESTROY. This is a precaution
against accidental overwriting of the previous content.
FRAMES option;
where
REFERENCE option;
PREPARE option;
A text form definition of transformed objects can be stored to the result version. As a default the data element is not created. This is equivalent
with the command DATA OFF. The name of the data element is given by the command DATA name. If only the text form definition, but no internal
geometry were transformed, the option ONLY should be used in the command DATA.
After a transformation the internal geometry of curves and surfaces is not always equivalent to the corresponding definition data shown by the DE
S command. This has been the reason for the missed calculation sections, and for the gaps that have been sometimes obtained. Usually errors of
this kind are removed when the transformed surface is redefined and prepared by EDI **HULL; ADD; PREPARE HULL.
The redefinition can now be automated by the command DATA ON. In this case, the definition macro is the primary result of the transformation. It
is internally run by the program and the definitions are carried out. If the PREPARE ON command has been given, the surfaces are also prepared.
As a result, the internal geometry is equivalent to the definition data.
The DATA ON option can be added to the setup description TINIT*TRA in the system database.
The main principle is that any command can always be given at any state of the task definition. If a new command does not fit to this environment,
the previous contradicting commands are cancelled. The whole task is reset by the command SKIP. A single command is cancelled by the option
OFF (e.g. transformation of the data element is cancelled by the command DATA OFF).
The required accuracy of a displacement transformation (D,CB or LCB changed) is set by the command ACCURACY.
where
If the command ACCURACY has been given, the transformation is done iteratively. After each step, the transformed hull is integrated. Calculated
displacement and longitudinal center of buoyancy are displayed and compared with the required ones. If the difference is too large, iteration is
continued.
Only the surface from which the integrals are calculated is transferable, when the command ACCURACY has been given.
Accuracy command does not work with the piecewise linear displacement transformation.
As a default some checks of the input data are done. If it seems that the task is not feasible, the transformation is not carried out. The reason may
be, for example, an incorrect reference system, or an error in the definition of the task. In a displacement transformation (not PL), there is an
upper limit for the possible deviation of the task from the pure affine one. If this is exceeded, there is some kind of overlapping in the result. As a
default such a transformation is not done. In the case of piecewise linear displacement transformations it is quite easy to define tasks that have no
solution at all.
All checks of the input data are ignored if the command FORCE has been given, and (if possible) the transformation is done even if it seems
probable that the result is not correct.
A list of the given or defaulted variables of the current transformation is shown by the command ARGS. Additional commands that are needed or at
least feasible at the current state of the definition are also shown. By the command ARGS A, a list of all commands is included. If a given
command is not consistent with the current definition, some of the previous commands are cancelled. When the transformation has been correctly
defined, the command OK is needed to start the process.
Information about the parent, or about the already done transformation is shown by the command INFO.
INFO sel;
TRA information about the transformation done. (The names of the transformed and stored objects)
AMF AMF-values corresponding to the options A,M,F and AF of the command CONST FW.
4. Examples
The reference length of Napaship is increased by 20 meters. The transformation is defined by the following commands:
Without the commands ARGS and OK, the transformation above can be done in the following way also: TRA HULL -> B; DIM L=+20;. The
transformation is started directly after the DIM command.
Affine transformation
By the definition PLX (40,60) -> (30,65) the part X<40 is moved ten meters backwards and the part X>60 five meters forwards. The part in the
middle 40<x<60 is scaled respectively.
D is increased, and LCB is kept constant by a piecewise linear displacement transformation. The transformation is defined by PLX (40,60) ->
(X,X). Because of the two unknowns, the change of LCB could also be explicitly defined.
The command PLX c1 -> c2 defines the transformation by the frame area distributions of the parent (=c1) and the result (=c2) hull.
If the curves are not in the current version, the syntax curve/version must be used.
A hull named HULL is made to version RESULT by combining two already existing surfaces HULLA/VERSA/PROJA and HULLF/VERSF/PROJF.
Reference dimensions of A/VERSA are: L=233.022, T=7.3, B=32.2 and midship section=93.29. Corresponding dimensions for HULL/VERSF/F
are: L=185.0, T=6.6, B=28 and midship- section=86.134. Transformation is carried out by the following commands:
The resulting reference dimensions of the hull in version RESULT are: L=185, T=6.6, B=28 and midship section=74.064. Depending on the
similarities of the two parent hulls the resulting hull may need more or less manual corrections.
In this transformation STEM and STERN are kept constant. The location planes of frames and waterlines, and the midship section are invariant.
After the transformation, AMF values are checked, and a new transformation is carried out with a new AMF value
CONST
ACC D=1 LCB=0.1
TRA HULL/A -> B
DIM D=+100 LCB=+1
INFO AMF
CONST AMF=val
DIM D=+100 LCB=+1
A curve, named windcur, is moved in the current version 1 meter downwards without any change in reference system.
HULL hull
DES
NOREF
TRA windcur
MOV Z -0.5
The idea is that the user defines a transformation box and defines a transformation task(s) to the box. Any point of the box can be moved to any
direction and the parent surface part that is inside the box, will be transformed accordingly.
The theoretical background of the method that is implemented to NAPA is from T. Sederberg et al in 1986 *1 and it was further developed by S.
Coquillart 1990 *2.
*1 Free-Form Deformation of Solid Geometric Models, Sederberg, T. W. and Parry S. R., Proc. SIGGRAPH ‘86
*2 Extended Free-Form Deformation: A Sculpturing Tool for 3D Geometric Modeling, Coquillart, S., INRIA research document, 1990
The tool to apply FFD is called FFD Manager (MGR*FFD). For more information how to use it please see chapter Free Form Deformation
Manager
In most respects, the use of a surface is not dependent on whether it is a special or a general one, and a combined surface can contain both
types of surfaces. Because the special surfaces are simpler, there are some functions implemented for these only, the main one being usage as
owner surface of a surface object.
Table of Contents:
1. Common properties
1.1. Facet/patch surface representation
1.2. Sides and orientation
1.3. Discontinuities for calculation sections
1.4. BASE and FORM commands
1.5. Management of dependencies
2. Unrestricted plane
3. Restricted plane
4. Cylinder
4.1. Cylinder with base fixed
4.2. Cylinder with axis fixed
5. Double cylinder
6. Pyramid
7. Rotation surface
8. Connection surface
9. Tube
10. Arbitrary facet surface
11. Facet surface through set of planes
12. Example of defining bridge and front bulkhead surfaces
12.1. Abstract
12.2. Connection surface
12.3. Surface object or Trimmed Patch surface?
12.4. Creating openings
12.5. Mirroring the surface
12.6. Testing planarity
12.7. Dividing a Patch surface
12.8. CADMATIC link
13. Alternative forms of the BASE command
14. FORM command
15. Sphere
16. Additional definitions
1. Common properties
By default, all special surfaces are handled as so-called facet surfaces, i.e. combinations of plane faces. For all types except planes and tubes,
there is the alternative to treat the surface as a patch surface, expressed by adding option P to the initial definition command. For those surfaces
referring to a curve defined in advance, it is required that the curve is a definition curve (i.e. created with the CURVE command) and defined with
the spline mode set.
For curved surfaces, the patch representation usually gives a smoother and more economical result. However, note that some functions are not
available for patch surfaces, most important usage as owner surface of surface objects. There may also be the problem that the type of patch
used in NAPA cannot represent exactly the special property of a given surface type (e.g. rotation surface).
The following figure shows a facet and a patch representation of the same connection surface.
The orientation of a surface defines whether it essentially transversal, longitudinal, horizontal or closed. The orientation may also be undefined.
The orientation is relevant in room definitions when relying on coordinate directions rather than inside/outside for telling the side of the surface. It
is also relevant in NAPA Steel and in various other contexts.
For planes, the orientation is decided according to the largest component of the normal, and 'outside' is defined as the side where this component
is positive. For instance, a horizontal plane has outside=up.
When interpreting the definition of special surfaces, the questions of outside and orientation are decided on the basis of the surface shape.
Regarding the question of inside/outside, it is first checked whether it can be decided on the basis of a natural inside, i.e. whether the surface is
suitably curved. If this is not the case, and if the orientation can be determined, the outside is decided as for planes. If neither is the case, the
decision is made at random.
If the surface is closed, it is classified as such, else it is checked whether it can classified as having orientation X; Y or Z. If this is considered not
possible, the orientation is undefined.
The surface S2 is considered having a natural inside, which is in the direction of the positive x-axis and consequently, the outside in the negative
direction. Its general shape is still classified as transversal, and the orientation assigned is -X.
The surface S3 has a natural inside, but neither x nor y is considered useful as orientation, which is undefined.
These decisions are not always well defined, and the result may not be as expected. In such cases, the OUTSIDE command can be added to
force the desired result. This question is mainly important in connection with rooms, where warning 1068 ('inside selected') is usually caused by a
surface having the orientation undefined or defined differently than needed in the connection.
In definitions starting with a BASE command (or the equivalent local curve definition), the result is checked for discontinuities in the x-direction, for
controlling the generation of calculation sections in rooms delimited by the surface. The most common case is a deck with steps, defined as a
cylinder.
In several surface types, one or two curves are needed as input, given with either the BASE or FORM commands.
The shape given by BASE always keeps its orientation and usually also its position, while the FORM command gives a shape that is placed at the
fixed component provided by the first command in the definition. The shape given by FORM is always a plane curve and it is rotated so that its
orientation satisfies the conditions of the surface type in question. There may also be a rotation within the plane, for which there is a default
according to the surface type, but a different rotation can be specified by the option U or V.
In all cases where the BASE command is possible, the curve can be replaced by a local definition, using the same syntaxes as in a curve
definition except that the CURVE command is missing.
The objects presented here may depend on curves or point objects. If the definition of these change, the shape of the objects are recalculated
automatically. This is also done if the dependence is indirect, for example a curve used depends on a point object that has been changed. In
these cases, the update may also concern curves and point objects.
If cross referencing occurs between objects in memory, the update order may not be correct.
2. Unrestricted plane
An unrestricted plane is a plane defined without explicit extension. In practice, the section of such a surface must be limited, and an unrestricted
plane is therefore treated as if delimited by a box which is a multiple of the reference dimensions.
Note: in order for unrestricted planes to function, the reference dimensions must not therefore be in conflict with the region where the
planes are needed. The range can be checked and modified with the RANGE command in task REF.
PLANE name
The plane is then defined by commands X, Y or Z for coordinate planes and THROUGH for general planes. Commands X, Y and Z define a
coordinate plane with the given orientation and at a given coordinate, for instance
PLANE BH1-PLANE
X 22
The basic form of the THROUGH command is three points through which the plane is placed, for example:
PLANE PL1
THROUGH (0, 0, 2) (0 10, 5) (10 0 7)
If the plane is parallel with a coordinate axis, the coordinate on that axis can be replaced by a minus sign, and one point omitted, for example
PLANE PL2
THROUGH (-, 0, 2) (- 10, 5)
defining a plane parallel with the x-axis. The same can also be expressed by
The latter form is more convenient if graphic input is used. The latter point can be replaced by an angle:
where the latter triplet is the normal vector. The normal vector can be replaced by another point, so that the direction is given by the two points.
This case is distinguished by adding a minus between the triplets. The following example is equivalent with the preceding one:
The following form gets the plane containing the given curve:
THROUGH *curve
A plane representing the water plane at a given floating position can be defined by
where the trim is in meters, applying the normal sign convention and the heel in degrees.
These syntaxes are also used in other cases where planes are needed, for instance, when selecting a reference plane for inclined plane sections.
Examples of planes:
POINT P1 (0,0,0)
POINT P2(0,10,3)
POINT P3(-2,0,10)
PLANE PL1
THROUGH P1 P2 P3
PLANE PL2
THROUGH X P1 P2
3. Restricted plane
A restricted plane is defined by reference to a closed, plane space curve:
PLANE name
THROUGH curve
The surface is here defined as the part of the plane delimited by the given curve.
CURVE C1
X, 10
YZ * 90/, (-5, 5), (0, 8), -90/, (5, 5), (0, 2), 90/, (-5, 5)
PLANE PLC1
THROUGH C1
4. Cylinder
A cylinder is defined as the surface obtained when a straight, the generator, moves along a curve, the base curve. Alternatively, the process can
be imagined as a given curve being 'swept' a given distance along a straight, and in many CAD systems, the term 'sweep surface' is used for this
type of surface. Typical applications of this type of surface are decks, corrugated bulkheads, bow thruster tunnels, etc.
CYLINDER name
BASE ...
GENERATOR ...
The following figure illustrates the function of the base and the generator:
CURVE B
Z 0
XY (4,9) (11,11),(8,6),(24,9)
CYLINDER CYL1
BASE B
GENERATOR (0,0,0) (3,5,12)
BASE name
Instead of the BASE command, the definition of the curve can be directly inserted. For this and alternative forms, see below.
All forms define a straight line in space, either by one point and a direction, or by two points. In this context, only the direction and length are
relevant, and the point (x,y,z) is optional. l1 and l2 define the start and end point of the generator, by giving the distance to the reference point
(x,y,z) or (x1,y1,z1). L1 and L2 are optional and modify the result by moving the start point to the distance l1 and l2 respectively from the
reference point. When l2 is given, the point (x2,y2,z2) only gives the direction. The keywords L1 and L2 may be omitted. If one length is given, it is
treated as L2.
The generator will be placed with respect to the base so that the reference point moves along the base curve.
In the form above, the base curve determines the location of the cylinder. One can also begin by fixing the cylinder axis, giving a definition of the
form
AXIS ...
BASE ...
The following figure illustrates the function of the axis and the base:
CURVE B2
Z 0
XY (0 0) (7 2) (14 -3) (20 0)
CYLINDER CYL2
AXIS (9,4,0) (12,4,12)
BASE B2
As an alternative to BASE, command FORM can be used after AXIS. It differs from BASE in that it gives the cross section at right angles to the axis,
while a curve given in BASE keeps its orientation. The FORM command is presented more closely below, here is only a list of the main syntaxes:
FORM R=r
FORM (u,v), (u,v) ...
FORM / (u1,v1), (u2,v2) R=r
FORM name
The following figure illustrates the effect of the additional lengths that can be given in the AXIS command, for modifying the extent of the cylinder
with respect to the given points. Note that the lengths are always measured from the start point.
below: AXIS (0 0 0) (10 0 0)- above: AXIS (0,0,0) (10,0,0) L1=3, L2=9
Examples:
Round cylinder
CYLINDER EX1
AXIS (0, 0, 0), (10, 10, 10)
FORM R=3
CLOSE
The following example could be a deck surface and uses a local curve definition instead of the BASE command:
Deck surface
CYLINDER TTOP
Y 0
XZ <>, (0, 3), (18, 3), (22, 2), (65, 2), (65, 3), (100, 4)
GEN Y -11 11
In the example, the base curve is directly given in the definition. If a separately defined curve had been used, say, TTOP-CL, the definition would
have been
CYLINDER TTOP
BASE TTOP-CL
GEN Y -11 11
CYLINDER DHS
Z 10
XY (0, 0), 90/, (0, 9), 0/, (4, 13), -/,
(15, 13), /-, -/, (15, 10), /-, -/,
(22, 10), /-, -/, (22, 16), /-, -/,
(30, 16), -90/, (34, 12), (34, 0)
GENERATOR Z 4
The following example shows the difference between entering AXIS or BASE as the first command:
CYL, CEX1
AXIS (10 0 0) (10 10 10)
BASE BCURVE
CYL CEX2
BASE BCURVE
GEN (10 0 0), (10 10 10)
5. Double cylinder
For lack of a better word, the word 'double cylinder' is used to designate a surface which is otherwise analogous with an ordinary cylinder, but the
generator is also curved.
DCYL name
BASE base
GENERATOR gen
where 'base' and 'gen' are the names of the respective curves. The generator curve is moved along the base curve so that the orientation is
maintained and the origin (note again!) is at the base curve. This means that the generator must go through the origin (0,0,0) of the coordinate
system. The following figure illustrates the principle of the double cylinder. It is designed to show the difference between the standard cylinder two
examples above.
CURVE B1; Z 0
XY (4,9) (11,11),(18,6),(24,9)
CURVE G1
ZY (0,0),(4,4),(5,12)
ZX (0,0),(3,4) (3,12)
DCYL CYL3
BASE B1
GENERATOR G1
The base and generators are both space curves, the difference is that the base (the first component in the definition) is the one that keeps its
position.
In this type of surface, the number of faces may be very large, since it is the product of the number of segments in the base and generator curves.
The option TOL possible in a curve definition may be useful for specifying a larger tolerance than otherwise used.
DCYL MDECK-SURFACE
Y 0
XZ TOL=0.05, (0, 10), -/, (30, 10), (60, 13)
X 0
YZ TOL=0.05, (0, 0), /0, (12, -2)
The polygonization tolerance is set to a larger value in order to reduce the number of facets (at the expense of accuracy). This aspect is not
relevant if the patch option is used.
A double cylinder can also be defined with the combination of BASE + FORM. The FORM command works as in ordinary cylinders, deciding its
orientation at the start of the base curve. See surface type TUBE for a surface where the orientation of the generator can change along the base.
6. Pyramid
A pyramid is formed by moving a straight line running through a fixed point (the TOP) along a curve (the BASE). The general format is
PYRAMID name
BASE name
TOP (x,y,z) q
or
PYRAMID name
AXIS name
FORM ...
The two alternatives differ in the same way as for cylinders, i.e. the first record places the surface in the coordinate system.
The BASE command functions as in the definition of cylinders. The TOP command gives the coordinates of the top. The optional parameter q can
be used for creating a partial pyramid. It specifies the upper surface to be at the fraction q of the distance between the base and the top. When
'AXIS' is given, the first point defines the top.
In the AXIS command, the parameters l1 and l2 are available for adjusting the extension along the axis as in cylinders. The FORM will always be
applied at the given reference point and the top placed at the other one. Thus, two points + l2 give a partial pyramid. The following figure
illustrates the effect of the additional lengths.
Pyramid - con
PYRAMID, CONE
AXIS X 0 7
FORM R=3
CLOSE
Pyramid - funnel
PYRAMID FUNNEL
Z 20; XY * (20 0) /90 (25 4) /0,
-90/ (30 0) (25, -4) /0 90/ (20 0)
TOP (23 0 60) 0.33
CLOSE
7. Rotation surface
A rotation surface is formed when a given curve is rotated around a given axis. The surface is defined by AXIS+BASE or AXIS+FORM commands:
or
ROT name
AXIS ....<index terms="FORM" />
FORM form
These forms differ in the same way as in other types: the curve given by BASE rotates from its given position while the one given by FORM is first
placed in relation to the axis.
The AXIS command has the same syntax as in connection with cylinders, except for the optional parameters.
where angle=angle by which the base curve is rotated (default 360) and n=number of segments used to represent the arcs along which the points
move in the rotation. The default for n is dependent on whether the surface is a facet surface or patch surface. The location of the start point is
relevant when using FORM: the given shape is placed with its origin at the start point.
If the curve is rotated 360 degrees, the CLOSE command can be added to include the circles formed at the ends.
Examples:
CURVE BOSS-C
THR, (0, 5, 3), (20, 4, 3.5), (0, 5, 0)
XZ <> (0, 4), (5, 4.125), (10, 5) (20 5.25)
ROT, BOSS
AXIS (0, 5, 3), (20, 4, 3.5)
BASE BOSS-C
ROT, BEND
X 0
YZ , *,(6,0), /0, (9,3), (6,6), (3,3), 0/, (6,0)
When using FORM, the given shape is placed so that its origin is placed at the start point of the axis, the u-axis along the axis and the v-axis at
right angles to it. There is presently no option for controlling the direction of the v-axis, therefore the FORM command is mainly useful for defining
complete rotations. The following figure illustrates how the geometry defined by FORM is placed with respect to the axis (left) and the result (right):
ROT EX0
AXIS (100,0,0) (102.5,0,5)
FORM (0 0) (2 1) (4 0)
ROT, EX1
AXIS X; FORM (0 1) (5 3)
ROT, EX2
AXIS (10 0 0) (20 0 10); FORM (0 1) (5 3)
8. Connection surface
A connection surface is formed by connecting the points on curves with straight lines. The user must define at least two base curves. The format
of the definition is
CNS name
BASE base1
BASE base2
In the example below, the lower base curve is from the first cylinder example:
The curves are connected so that the start points and end points are connected mutually. If needed, the direction of a base curve can be turned
by adding option < to the BASE command, reversing the interpretation of start point and end point.
Examples:
Connection surface
CNS CNSEX1
Z 0; XY (0, 0), (3, 2), /-, -/, (5, 2), (8, 0)
Z 6; XY, (0, 0), (8, 0)
CNS CNSEX2
BASE CNSEX2-B1
BASE CNSEX2-B2
The connection surface is otherwise very straightforward, except for the problem of deciding what are the points to be connected.
The first principle is that the start points and end points are connected mutually. This causes interesting effects if the curves have different
directions, and the direction can be turned by adding option <.
Between the ends, the existing polygon points are connected in the order they occur, provided that the numbers match. In other cases, the curve
with fewer segments is divided into segments in proportion to those on the other curve. The solution to this problem usually has little effect on the
result, unless there are special points to be matched, for example, knuckles.
If both base curves are definition curves (i.e. the result of normal curve definitions), and they have the same number of definition points, the
addition command MDP (Match Definition Points) forces connection of corresponding points. With the patch option, MDP is implied - for creating a
patch surface the operand curves must satisfy the conditions for using MDP.
The example below shows an example of a case when the MDP command corrects an inaccuracy caused by bad point matching:
9. Tube
A tube is defined by a base curve and a cross section along the base. Definition is done by the commands
TUBE name
BASE curve
FORM cross section
TUBE TUBE1
XYZ (0 0 0) (5 0 3) (10 0 0)
FORM R=1
When a two dimensional form of the cross section is converted into the normal plane of the curve, one degree of freedom (i.e. the rotation
around the direction of the base curve) is undefined and it can be controlled by options U and V as presented below for the FORM command. The
result is applied at the start of the base curve. Along the base curve, the direction is modified by rotations around the normal of the osculating
plane of the base curve, i.e. the best general plane that can locally be fitted to the curve.
A smooth patch representation of the tube object has not been implemented. Instead of this, each facet is converted into a patch.
CUR BASE
XYZ * <> (0, 0, 0), (10, 0, 0), (10, 10, 0), (20, 10, 0), (20,10,
TUBE TUBE
BASE BASE
FORM, <>, *, (-1, -.5), (1, -.5), (1, .5), (-1, .5), (-1, -.5), U=
FCS name
FAC * (x1,y1,z1) (x2,y2,z2), ...
FAC ...
FAC ...
...
FCS F1
FAC (0,0,5), (5,0,5), (10,3,5)
FAC (0,0,10), (5,1,10), (10,5,10)
The syntax (x,y,z) stands for a point in space. It can also be represented by a point object. Two consecutive points are allowed to coincide,
creating a triangular facet. Instead of repeating two points, the syntax *(x,y,z) can be used. The optional asterisk in the FAC command has a
similar purpose, meaning that the start point is repeated, giving a closed set of points.
For creating a true facet surface, the points of a given face should be located in the same plane. If this is not the case, the surface will be useful
with the restriction that different sections may conflict with each other. With the patch option non-plane faces are treated as uniquely defined,
curved surfaces. Exact planes are obtained by adding the TRIANGLE command before the first FAC command (note!).
If the points given in the FAC command form closed curves, the CLOSE command can be used to add the 'bases' formed by the first and last sets.
Facet surfaces defined with point objects FCS, FCS1 FAC, P5, P6, P7, P8 FAC, P9, P10, *P11 FCS, FCS2 FAC, P1, P2, P3, P4 FAC, P5, P6,
P7, P8:
FCS, PLATFORM-LEG
FAC, *, *(12, 12, 16), *(0, 12, 16), *(0, 0, 16),
*(12, 0, 16)
FAC, *, (12, 9, 12), (9, 12, 12), (3, 12, 12), (0, 9, 12),
(0, 3, 12), (3, 0, 12), (9, 0, 12), (12, 3, 12)
FAC, *, (12, 9, 4), (9, 12, 4), (3, 12, 4), (0, 9, 4),
(0, 3, 4), (3, 0, 4), (9, 0, 4), (12, 3, 4)
FAC, *, *(12, 12, 0), *(0, 12, 0), *(0, 0, 0), *(12, 0, 0)
CLOSE
As presented above, the facet surface is always formed by a matrix of n*m points, some of which may coincide. More general configurations can
be obtained with the BREAK command. The effect is to start a new part rather than connecting to the preceding set of points. This following simple
example illustrates the new configurations possible:
FCS, BREAKDEMO
FAC, (0, 0, 0), (5, 0, 0), (10, 0, 0), (15, 0, 0)
FAC, (0, 0, 4), (5, 0, 4), (10, 0, 4), (15, 0, 4)
BREAK
FAC, (0, 0, 4), (5, 0, 4)
FAC, (0, 0, 8), (5, 0, 8)
BREAK
FAC, (10, 0, 5), (15, 0, 5)
FAC, (10, 0, 8), (15, 0, 8)
FCS name
THROUGH axis=(q1,q2) plane1, plane2, ... options
axis=(q1,q2) defines the limitation, for example Z=(2.5 5.7). Each plane is defined either by referring to a separately defined plane or by a local
definition of the form axis=q, e.g. X=12. With the option *, the first and last planes are connected, forming a closed set. Otherwise, the first and
last ones only form the limits for the surface. The option CLOSE has the same effect as *, in addition the top and bottom planes are added.
Example:
PLANE SWPL
THR X (5 0) (4 4)
FCS DH1
THROUGH Z=(0,4) Y=0 X=0 SWPL X=8 Y=0
12.1. Abstract
This is an instruction for defining the bridge outer walls, the front bulkhead, and other similar complicated Connection Surfaces, which are
intended to be used in NAPA steel as efficiently as possible.
1. A CNS surface should be defined as a Patch surface with the option P. If the surface being defined is supposed to represent a curved
object, the P option should also be used with CYL, ROT and TUBE surfaces, if the number of patches being created is less or equal to the number
of corresponding facets that would be created.
2. It is possible to define a non-planar facet surface, but this usually causes problems when linking to other programs and when making holes in
the surface. Therefore users should avoid defining non-planar facet surfaces.
3. If the original CNS surface has a larger surface area than the surfaces being built from it, then these surfaces need to be trimmed into their
usable dimensions. It is recommended to use the syntax SUR... TRIM... because it is updated automatically when the original CNS surface is
updated, whereas the syntax GEN... TRIM... creates an independent surface which is not updated.
4. Reflecting a Trimmed Patch surface over the centerline is defined with the syntax: "SUR name; REF name".
5. It is not necessary to divide surfaces for NAPA Steel as it is able to use any kind of surface. However the probability to encounter errors
increases the more complicated the surface is.
6. When a CNS surface needs to be divided into segments, it is best to be done with the syntaxes (see !EXP GEN/G0X TRIM):
7. The resulting subsurfaces are Trimmed Patch surfaces that may be used as main objects in NAPA Steel. In practice this means that it is
possible to create holes in these surfaces by trimming them. It is not always possible to create openings in curved trimmed surfaces using the
opening table. In addition, defining openings with the Sketch Tool does not work when an opening extends outside a subsurface onto two
subsurfaces or facets. An example of when this could occur is when a bridge surface is reflected over the centerline, and an opening is defined,
so that it extends over both the original, and the reflected surface.
It is advisable to define a Connection Surface (CNS) with the Patch option (P), that is, to create a patch presentation of the surface. The P option
is not set as default. The default option can always be checked with the command: DEF?>!EXP CNS.
CNS, S.DH11, P
Z, 35.38
XY, <>, *, (#BH01-4.025, 0), (#BH01-4.025, #L19), (#BH03,#L19), (#BH06-#6,
#L19),
(#BH06-#6, 13.305), (#BH07,13.305), (#BH07, #L19), (#BH12-#3, #L19),
(#BH12-#3,13.305),
(#BH13, 13.305), (#BH13, #L19), (#280+0.110,#L19), (#280+1.195,
19.59),(#280+3.206, 19.59),
(#280+4.737, 9.487), /-39.8, 90/, (#280+9.104, 0)
Z, 40
XY, <>, *, (#BH01-4.025, 0), (#BH01-4.025, #L19), (#BH03,#L19), (#BH06-#6,
#L19),
(#BH06-#6, 13.305), (#BH07,13.305), (#BH07, #L19), (#BH12-#3, #L19),
(#BH12-#3,13.305),
(#BH13, 13.305), (#BH13, #L19), (#280-1.589,#L19), (#280-0.260, 21.272),
(#280+4.649, 21.272),
(#280+6.306, 10.359), /-39.8, 90/, (#280+10.791, 0)
MDP
A Surface Object (A) as a NAPA Steel model main object usually does not work well with other surfaces than those built from planes (true facet
surfaces). A Trimmed Patch surface (B) tolerates non-facet-like properties and curvature, such as with uni-directional spreading surfaces (cf.
cylinder or cone surface).
SO DHST11_8P; IN S.DH11
LIM #278, -, -, DH12F, D11, -
RED BRWH1
RED BRWH2
RED BRWH3
RED BRWH4
RED BRWH5
RED BRWH6
RED BRWH7
RED BRWH8
RED BRWH9
RED BRWH10
RED BRWH11
RED BRWH12
RED BRWH13
RED BRWH14
An example definition of surface B (Trimmed Patch Surface - tolerates curvature and non-planarity):
SUR, DHST11_8P
TRIM, S.DH11, X>#278, Y<DH12F, Z>D11, >BRWH1, >BRWH2, >BRWH3, >BRWH4,
>BRWH5, >BRWH6, >BRWH7, >BRWH8, >BRWH9, >BRWH10, >BRWH11,
>BRWH12, >BRWH13, >BRWH14
Although NAPA accepts both of the above the definitions as NAPA Steel main objects, problems may occur if a Surface Object is used. This is
because the CNS surface, used as the parent surface, is not planar. Therefore a Trimmed Patch surface should be used instead and that is why t
he P option should always be used when defining a Connection surface. The planarity of any given surface can be checked. How to do this
is explained below.
An individual opening (e.g. windows, doors) has been created in the surface using a TUBE definition as below:
CUR BRWVECT1
XYZ <> (#280-3.385,0,40.9159), (#292+0.7226,0,35.68)
TUB, BRWH1
BAS, BRWVECT1
FOR, <>, *, (0, 0), ROUND=0.125/, (1.427, 0), ROUND=0.125/,
(1.5, 1.808), (0, 1.808), (0, 0)
The resulting surface is used to cut an opening in a Surface Object using the RED command, or in a Trimmed Patch surface with the '<' command.
SUR, DHST11_8S
REF DHST11_8P
A triangle test can be performed to find out whether any given surface is planar. An example of such a test is:
SUR, TRITEST
FACET, S.DH11, EN=3
COL 1; PLO TRITEST
If for some reason a Patch surface needs to be divided into several segments, it is best to be done, if possible, by selecting segments from the
original CNS or Trimmed Patch surface. This is done by using the commands GEN ...PATCH, or SUR ...PATCH.
CNS, DH12F, P
Z, 38.22
XY, <>, *, (#270, #L19), (#280-1.439, #L19), (#280-0.132,21.124),
(#280+4.528, 21.124), (242.583, 10.276), /-43.023, 90/, (247.05, 0)
Z, 39.355
XY, <>, *, (#270, #L19), (#280+0.228, #L19), (#280+1.296, 19.474),
(#280+3.110, 19.474), (240.702, 9.967), /-43.023, 90/, (245.4, 0)
MDP
Top of bridge
There are five subsurfaces in this example, so the division could be done using the following macro (see Chapter on NAPA BASIC for more
information on macros):
@for I=2,4
SUR DST12_5_@I; PATCH DH12_5 P=@I
PLO DST12_5_@I
@next
In the macro above, patches 2, 3 and 4 were selected. By dividing them, the following three independent surfaces are obtained.
SUR DH12_53
PATCH DH12_5 P=(2,3,4)
The CADMATIC 3DD link converts all surfaces into facet surfaces before transferring them into CADMATIC. Problems arise with non-planar
surfaces, which are possible in NAPA but do not work once transferred into CADMATIC.
BASE BASE/name
BASE TOP/name
where 'name' is the name of such a surface and BASE refers to the surface given as base in that surface, while TOP refers to the oppositebase.
BASE, by local curve definition)
The BASE command can also be replaced by two commands forming a normal curve definition (location surface+shape). For example, the
following definitions are equivalent:
CURVE CYL1-BASE
Z 0
XY (0 0) /0 (10 10)
CYLINDER CYL1
BASE CYL1-BASE
GEN Z 10
CYLINDER CYL1
Z 0
XY (0 0) /0 (10 10)
GEN Z 10
These options are not supported for surfaces defined with the P option and the update management does not take this dependence into account.
The form is a two dimensional curve that can be defined in one of the following ways:
FORM R=r circle with given radius and center at the axis
FORM (u,v), (u,v) a curve defined directly using the normal curve definition syntaxes
...
FORM / (u1,v1), this form defines a rectangle with two corners in the given points. The optional syntax R=r defines a radius at the corners
(u2,v2) R=r
FORM name form given by a separately defined curve. It must be defined with X, Y or Z as its location surface, but its location in the
ship coordinate system is not relevant
FORM This is a pilot level feature referring to a profile cross section as used in NAPA Steel (ST), for example, T*300*10*200*20
profile-spec T, where the T options gives the shape with thickness
options
The form is then placed in the ship coordinate system. The plane into which it is placed follows from the properties of the surface, leaving only a
rotation inside the plane to be decided. This aspect can be controlled with the options U and V.
The form is represented in a two-dimensional coordinate system with the axes u and v. The default is to align the v-axis with the 'up' direction as
closely as the direction of the plane allows. The up direction is given by the z-axis except for planes with a horizontal orientation, in which case it
is y.
With the option V, the 'up' direction can be changed, and an arbitrary rotation can be added:
'axis' is X, Y or Z and defines the direction for the v-axis. 'psi' is an optional additional rotation. The U option is otherwise similar, but it tells the
direction into which the u-axis is placed.
The following example shows a cylinder with the axis along the x-axis, using different options in the FORM command:
CYLINDER BOX
AXIS X 10
FORM / (-2 0.5) (2 0.5) (thick lines)
FORM / (-2 0.5) (2 0.5) V=Y (thin lines
FORM / (-2 0.5) (2 0.5) V=Z+20 (dashed lines)
With the exception of ST profiles, the patch option is supported when using FORM. When referring to an existing curve, it must be defined with the
spline option set (!GMTP SPLINE).The following example shows a surface with the patch option.
CYL CYLF P
AXIS Z 10
FORM, /, (-2, -1), (2, 1), R=.5, U=X
15. Sphere
A sphere with the center in the point (x,y,z) and radius R is defined by the following data:
The syntax 'axis>q' is optional and defines a restricted sphere as indicated. The restricted sphere can be at most a half-sphere. This option is fully
supported for axis=z only.
When doing plane sections, these are made from an exact sphere (except for polygonization of the curve), while other functions such as plotting
or calculating the area are based on a facet surface approximation, where restriction by other axes than Z is ignored.
SPH1
CENTER (0,0,0) R=5
SPH SPH2
CENTER (0,12,0) R=5 Z>0
The surfaces presented here are likely to be useful in parametric macro objects (PMO): see special definitions.
1. General
2. Overview of room types
2.1. Elementary rooms
2.2. Nonelementary rooms
2.3. Combined room
2.4. Modified room
3. Elementary rooms
3.1. Standard topology
3.2. Definition of an elementary room
3.3. Limiting surfaces
3.4. Designating the side
3.5. Special syntaxes in the limits command
3.6. Deviations from standard topology
3.7. Interpreting the standard topology
3.8. Dummy surfaces
3.9. Determining the extension of a room
4. Nonelementary rooms
5. Combined room
6. Adding a description text
7. Bottom and bottom area
8. Handling errors
8.1. 'Debugging' aids
8.2. Incorrectly determined limits
8.3. Wrong side selection
8.4. Geometric problems
8.5. Error 'intersection of elementary room failed'
9. Handling calculation sections
9.1. Selection of calculation sections
9.2. Graphic check of calculation sections
9.3. Instructions regarding the plate thickness
9.4. Volumes of open surfaces
9.5. Reliability of calculation sections
9.6. Box approximation
9.7. Accept failed partial sections
10. Hints for room definitions
10.1. Using named limiting surfaces
10.2. Simple surfaces or simple rooms
10.3. Using add or reduct
10.4. Simplification for run time efficiency
10.5. Extending the limits command instead of using reduct
11. Dynamically created rooms
1. General
The concept 'room' denotes a volume enclosed by a closed set of surfaces, most frequently used for representing the shape of tanks and
compartments. A single, closed surface can in principle also be used for this purpose. However, the definition is usually much easier by using the
possibility of combining several surfaces, each of which may be larger than the part actually contributing to the room.
Room concept
A room is by definition closed. If intersecting a room gives a non-closed result, it is assumed that the definition is incorrect or the section is outside
the room.
The surfaces occurring in a room definition are stored as pure references, and the geometry of the surfaces is taken into account only when the
room is used. This means that the definition of the room can take place independently of the surface definitions, and that it need not be updated
as long as it is valid as given, even if the surfaces are changed.
An elementary room is a room defined by one set of limiting surfaces only, in contrast to rooms defined by combining elementary parts.
The definition of an elementary room is formed by the limiting surfaces and instructions regarding what side of the room each surface forms.
The sides of a room can be defined by separately defined surfaces, referred to by their name, or as principal planes given directly in the room
definition. The coordinate of a principal plane can be given as such, using the frame system or using the reference coordinate of a surface. In the
latter case, the dependence on the surface is recorded, and taken into account if the surface is changed.
A nonelementary room is created by performing different operations on components formed by elementary rooms. Several elementary rooms can
be combined by forming their union or difference.
Reflection operations
The operations involved in forming a non-elementary room are performed in the order given in the definition, so that each operation is performed
with the result from all preceding operations specified in the room definition. It is therefore significant in which order the specifications are given.
A combined room is formed by a set of parts, each treated independently when making intersections or volume calculations. No geometric
operation is made to combine the parts, in contrast to the combinations presented above.
A combined room can be used to represent an object formed by separate parts or simply as a way of creating a collection of somehow related
rooms, so that it can be referred to by a single name. An example of the latter use is combining the rooms on a deck. The rooms collected into an
arrangement under SM are automatically available as a combined room, named by adding prefix ARR* to the name of the arrangement part, e.g.
ARR*DECK1.
It is possible to specify a part as negative, meaning that in connection with volume calculations, the results from this part shall be taken negative
when forming the sum over all parts. In order to obtain correct volumes of a combined room, the parts must be either entirely separate or entirely
contained in each other, and it is the user's responsibility to make sure that this is the case. It is also possible that a component in the combination
contributes with a fraction of its volume.
A transformation may be applied to a part of a room, for instance, translation or reflection. It is therefore possible that a meaningful 'combined'
room can contain one component only.
Volume oriented calculations are done so that the results are calculated for the parts separately and then added. A combined room needs
therefore no own calculation sections.
In some functions, for instance, drawing a section, the system makes a decision whether to treat a combined room as a single object with
anonymous parts or a collection of individual objects. The latter interpretation requires that the room is formed as a bare combination of parts, in
contrast to a combination involving transformations.
A 'modified room' is treated internally as a special case of a combined room, containing one part only, to which a transformation is applied. This
sole part can be identified with the whole room, which affects some operations like marking the name in a deck plan. By far the most frequent
case is reflecting a room about the center plane, for which the special syntax REFLECT is available:
ROOM T12S
REFLECT T12P
As for combined rooms in general, the reflected room needs no own calculation sections. Note the difference with respect to a non-elementary
room containing REFLECT, which is independent.
3. Elementary rooms
An elementary room may have arbitrary shape, but in the vast majority of cases, elementary rooms conform wholly or partly to the so-called stand
ard topology. This means a room having six sides, oriented as the coordinate planes:
The symbols A...T are used in commands where the sides are referred to. In a left-handed coordinate system, port and starboard are reversed.
As far as possible, the definition of an elementary room is interpreted in terms of the standard topology. The result is used when these sides are
explicitly referred to (e.g. PLOT room/B) and when making decisions regarding the extension of the room.
The following figure shows examples of rooms with standard topology, emphasizing the fact that the box topology is not the same as box shape.
ROOM name
LIMITS limit1 limit2 ...
where ROOM starts the definition and LIMITS gives the limiting surfaces. Each one of 'limit1', 'limit2' etc. gives one limit in the form of a surface or
plane, and an implicit or explicit instruction regarding on what side of the surface the room is located. A room may also be defined as a
transformation of another room using the LIMITS command.
The various possibilities for expressing the surface and the side are presented below.
The limits of an elementary room may be formed by separately defined surfaces or directly given coordinate planes.
A separately defined surface is simply represented by its name. The reference may be modified in various ways as presented later. One can also
give the name of a surface object, in which case the owner surface will be used as limit.
In the #-syntaxes, a displacement can be added in the form +d or -d, for example
#12-0.1, #BH1+2.3
In connection with surfaces, the displacement can also be given as a number of frame spacings in the form
#surface+#n or #surface-#n
In all cases, the references are interpreted when reading the room for run time usage, and the referenced surfaces are taken into account as
currently defined.
When defining on which side of a surface a room is located, reference to the inside or outside of the surface or coordinate direction can be used.
The symbols used are
<name inside
>name outside
Y<name... Z>name:
: similarly
Example:
determining, among other things, that the room is inside 'HULL' and below 'TTOP'.
Note carefully: when using the coordinate directions in connection with surfaces other than planes, the definition can be interpreted
only when the orientation of the surface is the same as the axis used. In the example above, it is assumed that the surface TTOP is
more or less horizontal, i.e. its orientation =Z. When this type of side selection cannot be interpreted, 'inside' is used as the best guess
and a warning is given. In the case of coordinate planes, 'inside' and 'outside' cannot be used.
In the forms above, the side selection is explicit. In order to take advantage of the fact that most rooms can be defined in terms of the sides
associated with the standard topology, there is an implicit side selection specified for the first six positions in the LIMITS command as follows:
Thus, if the side selection symbol is omitted, the implicit side selection is applied. For example, the following definitions are equivalent:
Explicit and implicit side selections can be mixed. The implicit side selection for a given position is not influenced by the type of side selection
used in the other positions. In order to take advantage of implicit side selections in cases where some side is missing, a minus sign can be used
to fill the corresponding position. For example, the following definitions are equivalent:
The primary purpose of the side selection is to get the room formed on the correct side of the surface. As described below, the way a limit is given
is also taken as a clue when deciding the role of the surface in connection with rooms not conforming to the standard topology. The general idea
is that the limit is supposed to be given the most natural way. For instance, Z>DECK1 and >DECK1 will usually select the same side, but the latter
alternative ('outside') contains no hint that the surface is the lower limit.
+name the surface reflected about the center plane and combined with the surface itself.
name(transf) surface with a given transformation, where the transformation is represented by the standard syntax. The syntax room(trans
f) may be used to define a room as a transformation of another one.
(name) dummy limit given by name. The usage of dummy limits is presented below.
A room located on the -y side is often defined on the other side and then reflected. With surfaces defined on +y side only, as normally done with
the hull, the syntax -name is useful when a room is directly defined on the -y side, while the syntax +name is useful when a room is partly located
on both sides. Using +HULL rather than both HULL and -HULL gives faster and more reliable processing.
ROOM R1
LIMITS 70 90 -HULL -3 - DECK1
ROOM R2
LIMITS 70 90 -3 +HULL - DECK1
The most frequent use of transformations is when performing a translation. The following example shows an example of a translation of a
corrugated bulkhead, compared with using the reference coordinate:
ROOM R1
LIMITS #15 #25 -1 1 0 2
ROOM R2
LIMITS R1(X+10)
It is possible that a room only partially conforms to the standard topology. Some side may be missing or there may be additional surfaces.
The following figures show examples of typical deviations from standard topology and the way these are reflected in the definitions:
One side missing, because one surface (the hull) delimits the room in two directions:
LIMITS 20 40 0 HULL - 3
Additional side:
The last example becomes complete standard topology if the top is formed by one surface, e.g.
It helps the system to interpret the definition correctly if the surfaces are presented in a way that reflects their role.
A room definition will in most cases be interpreted in the obvious way, but sometimes it is useful to know the rules for how the sides of an
elementary room are interpreted when identifying the lower x-limit, upper x-limit etc.
The basic rule is that a side selection in terms of coordinate directions can be interpreted as meaning that the surface forms the limit in question,
for instance
Y<
will be interpreted as 'HULL' providing the upper y limit, and consequently, the extension in the +y direction is decided on the basis of this surface.
This is also done when the side selection is implicit.
If there are several surfaces with the same side selection, the most likely one is selected, according to some heuristic rules. The two main rules
are that a coordinate plane, if any, is preferred and a surface in positions 1...6 has priority over other surfaces.
If on the other hand, no such surface is found in a given direction, it is assumed that some surface delimits the room in this direction also. Again,
some heuristic rules are applied to make the selection, the main ones being that a curved surface is more likely than a non-curved one, and one
with 'inside' specified is more likely than one with 'outside' or a selection according to coordinate directions. For example, in the case
LIMIT 20 30 0 HULL - 4
it is assumed that HULL also delimits the room from below, since it is the only curved surface available.
The bowthruster tunnel in the example above is a typical case where the rules above are needed. The y-limits are obtained according to HULL,
while TUNNEL provides the rest.
Dummy surfaces can be used in some cases to the help the system understand a room definition or make the processing faster. A dummy
surface is given in parentheses, and it does not add a limit, only new information. The dummy limit must be given in the position corresponding to
the limit it represents (e.g. 1 for lower x, 6 for upper z).
This definition tells that the lower z-limit is 0, without adding such a plane, which would give rise to a doubly defined limit. The syntax
name/axis=q, for instance, STEM/Z=3, is always interpreted as providing a dummy surface. A dummy coordinate in the x-direction can speed up
the generation of calculation sections by eliminating the process of searching for the limit.
A surface given in parentheses tells that this is the surface that restricts the room in that direction, when deciding the extreme coordinates, for
example
In this example, the dummy surface corresponds to what the system will assume anyway. Dummy surfaces may be needed when there are
several possible candidates for the limit (for instance, two surfaces with 'inside' specification), and the system selects the wrong one.
The extension of a room in the coordinate directions is needed for many purposes. In the general case, the limits can be known only after doing
time-consuming calculations. The method adopted is to get these coordinates as a by-product of the calculation sections.
However, there is the need to know the limits even if no calculation sections have been done. This section describes the way the limits are
deduced directly from the definition. While this does not always give the actual limits, the limits obtained are useful for most purposes, and the
generation of calculation sections is normally not started simply to get the extreme coordinates.
In an elementary room, the extreme coordinate in a given direction is determined on the basis of the surface classified as limit in the direction
concerned, according to the principles presented above. Thus, if a surface has been classified as lower z-limit (bottom), its lower z-coordinate is
assumed to provide the lower z-coordinate of the room also. The actual minimum z-coordinate of the room may be higher, but the coordinate thus
obtained means 'at least not further below', and it is usually accurate enough for most purposes. Especially, it is sufficient to avoid so-called
phantom sections, caused by intersecting the room with a plane not intersecting the limit, and therefore causing the limit to be ignored.
If the initially determined limit should be too inaccurate for some purpose, a dummy limit can be added to the definition.
When making calculation sections, the x-interval within which sections are done is taken from these initially determined limits. If these turn out to
be outside the object, the actual limits are found by searching. The estimated limits are then replaced by the result obtained from the calculation
sections. If an estimated limit is outside the room, the search process can be avoided and consequently, the generation of calculation sections is
made faster by adding a dummy limit. This can often be done using the syntax curve/axis=q, as in the following example:
or
In a non-elementary room, other operations than removing parts (REDUCT) are easily taken into account. As for a removed part, the present
system assumes that it will not reduce the extension of the room in any direction.
4. Nonelementary rooms
A non-elementary room is formed by combining several elementary rooms or by applying transformations.
ROOM name
LIMITS ...
ADD ...
REDUCT ...
The LIMITS record must always be first, but the ADD and REDUCT records may follow each other in any number and order. The ADD record
defines a room to be added by union and the REDUCT record one to be added by difference. The room to be added can be defined directly in the
command using exactly the same syntax as in the LIMITS command, or it can be defined by reference to another room, where any type of room
can be used.
The operations implied by the LIMITS, ADD and REDUCT commands are carried out in the order given, and the order is therefore significant.
Reflecting operations are made by inserting a REFLECT or SYMMETRIC command. The REFLECT command has the effect that the part formed
by the preceding commands is reflected about the center plane. Similarly, the SYMMETRIC command makes that part symmetric about the
center plane. There may be subsequent ADD or REDUCT commands to which the operation does not apply. Thus, the room as a whole is
symmetric only if the SYMMETRIC command is last.
Example:
ROOM R100
LIMITS 95, -, 0, HULL, 8, 11.9
ADD 95, 101, 0 4, 11.9, 14.5
REDUCT 96.5, 100, 2.9, 10, 8, 10
SYMMETRIC
The following example shows a common case that is essentially a non-elementary room, but that can also be defined formally as an elementary
one:
ROOM R04001
LIM BH6 BH7 LBH3 HULL - DECK
RED TUNNEL
ROOM R04001
LIM BH6 BH7 LBH3 HULL - DECK >TUNNEL
There may be slight differences in the volumes, because the component given by the REDUCT command is automatically taken into account as a
potential discontinuity.
5. Combined room
A combined room is defined by the commands
ROOM name
COMBINE part1 part2 ...<index terms="COMBINE" />
Each part is expressed by the name of the part. A removed part is preceded by a minus sign.
Example:
ROOM STABHULL
COMBINE STABHULL0 RUDDER PROPELLER -BOWTHRUSTER
ROOM THULL
COMBINE 0.99*MAINHULL 0.8*APP1 0.9*APP2
The factors are used in volume oriented calculations, so that the partial volumes are multiplied by the given factors when forming the total.
A part may be transformed, which is expressed by adding a transformation in parentheses after the part name. For instance, the following defines
a combination of a room and its reflected counterpart:
ROOM R12
COMBINE R1 R1(Y/0)
A combined room may have one part only, which is useful mainly for adding a transformation. For the common case of a room formed by
reflecting another one, the following special syntax is available
ROOM R1S
REFLECT R1P
ROOM R1S
COMBINE R1P(Y/0)
This text is displayed in the DES command. When adding the room to an arrangement, the text is stored as the description in the sense of the SM
subsystem.
The apostrophes around the text are compulsory, even if the text does not contain characters that would cause the need.
ROOM R1234
LIMITS BH2 BH3 - HULL TTOP DECK2
H 2.3
The normal rule would define the bottom as the section with TTOP, but the H command changes it to be the section with the surface z=2.3.
The center of gravity of the bottom area is also calculated from the section defined this way.
Note: the bottom area is calculated from the z-projection of the bottom contour.
The bottom area can be plotted with the command PLOT room/B.
8. Handling errors
Formal errors in the room definitions are usually easy to identify and correct. It may be more difficult to find the reason for failures caused by
geometric problems.
In order to help locate the source of an error, an additional name may be output as follows:
This means (normally) that the error is in the object 'name1', connected somehow to the component 'name2'.
An intersection of an elementary room fails when the result after including all limits is either not closed or the curve has wrong circulation. It is also
rejected if the area is extremely small, for the purpose of eliminating degenerated sections near the ends of objects. The error may be surfaces
missing in the definition, surfaces that have holes, surfaces that do not meet or wrong side selection. If the reason is not found by simply checking
the definition, there are two debugging options in the intersection command (X, Y or Z under task DRAW).
Option ! (one exclamation point) has the effect that the section discarded for one of the reasons above is drawn. Errors such as a missing limit or
a large gap are then easily seen.
SECT R1510; X 80 !
Option !! (two exclamation points) starts a graphic check of the whole intersection process, showing for each stage, the components (in red and
green) and the result (in white). In addition, a yellow dashed line is drawn parallel with the components, showing on what side the room is defined
to be. If it is difficult to identify the participating surfaces, these can be intersected separately. The header 'BEGIN COMBINE' refers to the
process of forming an elementary room, while 'BEGIN UNION' and 'BEGIN DIFFERENCE' refer to the combinations corresponding to ADD and
REDUCT commands.
Note: at this stage, the curves are plane curves in a local two-dimensional coordinate system, and the projection is not applied.
The following example shows how the check obtained with !! can look like. The two cases differ in the side selection on the surface LBH:
A yellow dashed line (not well visible in the example) tells the side on which the room shall be formed.
If the section is discarded because of a small gap, one can in some cases use command DMAX to the room definition, telling to overlook (and fill)
gaps up to the given tolerance. The default value is based on the reference dimensions.
A section can also be omitted because the plane is considered not intersecting the circumscribed box of the room, and no attempt is made to
make the section. In connection with rooms not having the standard topology, the reason may be that the role of the limiting surfaces has been
incorrectly interpreted. If checking the side selections does not help, dummy surfaces can be added to help the system.
If the side selection in a room definition is wrong or the inside/outside definition of the limiting surface is incorrectly determined, the system may
try to place a section on the wrong side of the surface. Unless the surface can be corrected, the side selection in the room definition must be
reversed. The warning 1068 (Inside selected) should always be regarded seriously.
It means that the given side selection has been impossible to interpret and that the selection made by the program was based on a guess. The
reason is most likely that the orientation of the surface was not the expected one, but if the guess was wrong, the error can always be corrected
by using 'outside' (prefix >) as side selection. (The message 1068 is suppressed if the name of the surface begins with 'HULL', because in this
case, the guess is almost always correct).
The orientation can be seen from the output of INFO, for example
------------------------------------------------------------------
LBH CYL 96-04-19 16.51 0.00 100.00 - -Y
This tells that the orientation of the surface LBH (the same as in the preceding example) is Y. The outside is in the negative direction of y,
therefore >LBH and Y<LBH would be equivalent as far as the side selected is concerned.
An intersection may also fail because it gives rise to a too difficult geometric problem. In this case, the room must be simplified, and if no other
solution works, the special case can be avoided by doing a slight translation of some surface.
ROOM R1
LIMITS 20 40 0 HULL 0 5
LIMITS 20 40 0 HULL - 5
or
LIMITS 20 40 0 HULL (0) 5
A problem which always causes failure is multiple symmetry, i.e. a surface that is symmetric by itself is made symmetric. This can occur in a
concealed way when a surface object containing 'SYM' is used as a limit.
Removing a contour from itself does not function. This can be the reason for 'phantom sections' in a complicated non-elementary room.
When defining a surface for usage in room definitions or surface objects, but not as such representing an object in the ship, one takes
unnecessary risks for geometric problems by delimiting the surface too exactly at some other surface rather than defining it with some margin.
The message 1058, 'intersection of elementary room failed', refers to an elementary room, either as such or as part of a non-elementary one, and
occurs when the section plane was within the estimated limits, but no section was still obtained. Unless the section of the room as a whole comes
out non-empty, it is accepted, since the reason for the failure may have been that the limits were inaccurate or the error is not necessarily serious.
If the elementary room in question is only part of a non-elementary one, the component is indicated in an associated message by giving the 'part
number' in the definition (LIMITS record is part 1). Example:
ROOM R123
LIMITS 20 40 0 HULL - 6
ADD 20 30 0 6 7
A missing section from an elementary room does not need to be an error - the section coordinate may have been outside the room, but the limit in
the direction concerned was inaccurate. An attempt to filter out unnecessary warnings has been made by trying to estimate whether the result is
due to errors in the geometry or the section was outside, but the present solution works only partly.
Rooms defined by COMBINE or REFLECT do not have own calculation sections, but use those of the parts. For a room defined as symmetric, the
half of the section only is stored.
When intersecting general surfaces for calculation sections, a larger polygonization tolerance than the normal one is used, but instead, the
segments are placed so that the enclosed area is exact. This way, calculation speed is increased, while still preserving accuracy.
Handling of calculation sections is for the most part automatic, but the following functions can be used when needed:
The plate thickness, if any, is added to the calculation sections and consequently, instructions concerning calculation sections may also involve
the plate thickness.
The number and location of calculation sections are in most cases decided automatically by the system, but if needed, you can add your own
instructions.
For accurate volume calculations, it is important that discontinuities in the x-direction are taken into account. These are normally created by
discontinuities in the limiting surfaces or by the ends of ADD and REDUCT parts. The latter ones are noticed by the system, and so are
discontinuities in some special surfaces. In other surfaces, information about discontinuities can be provided as part of the surface definition, from
which it will automatically be transferred to any rooms concerned. Information about discontinuities is given in the CSECT command, which can
be entered as part of the object definition in the form
CSECT x1 x2 ...
giving the x-coordinates of discontinuities. The degree of discontinuity is told by prefixes as follows:
The number of sections is decided on the basis of the required accuracy as specified by the values AACC and RACC in the reference system. If
one should want to add instructions in this respect, these can also be included in the CSECT command:
The second form allows for the addition of sections if the accuracy specified in the reference system is not achieved. In the last form, the limits of
the intervals can be designated as discontinuities with prefixes as above. Only discontinuities are inherited by referencing objects.
When making calculation sections, the accuracy obtained is checked by calculating the volume and center of gravity of the whole object. A local
discontinuity may therefore appear too small to influence the result. A common case is the following one, where the discontinuity affects the most
interesting part, but not the whole object:
If the name of the object contains the 'hull label' defined in the reference system, the shell plating thickness is added to the sections. This can be
specified directly by adding PT=d to the CSECT command. Option PT alone simply tells the system to add the plating thickness, the value of
which is taken from the reference system as valid when using the object.
If all sides of a room are coordinate planes, the results are calculated directly from the definition. This is also done if the room differs from a box
with a small enough margin, controlled by the AACC and RACC tolerances in the reference system.
In the drawing task, calculation sections are drawn by PLOT CSE object.
If the valid sections are not available, they are generated. If listing is set (command SLIST), the x-coordinates are listed. For example:
SLIST
PLOT CSE object
For symmetric objects, calculation sections are stored for one half only, and for box-shaped objects none. When drawing, curves are added to
make a result resembling whole objects. With option O (=original) the drawing is restricted to what is actually stored.
Drawing the calculation sections is an easy and efficient way of ensuring that there are no big errors in the geometric definitions.
The command PLOT object/X=CSE intersects the object at the places where there are special sections (ends of object or discontinuities).
The geometry resulting directly from the room definition represents the so-called moulded form and where required, the plate thickness is added
to the calculation sections. This is normally done for the objects representing the outer hull surface and the criterion for doing this is that the name
of the surface contains the hull identifier, see parameter HLID of the reference system. The value of the plate thickness is obtained from the
reference system (command SHELL).
The plate thickness can be added explicitly by the option PT in the CSECT command:
The bare PT option instructs the system to use the plate thickness of the reference system.
A plate thickness varying with the height can be defined in the form
where p1, p2 are plate thicknesses and z1, z2 the heights where it changes. The z-values must be increasing.
Normally the plate thickness is added to the moulded surface directly as an offset of the calculation section i.e. the curve of constant x-coordinate
in the same plane as the section. This does not take into account the curvature of the shell in three dimensions, only in the plane of the section. In
addition, discontinuities in the frame area curve resulting in plane areas orthogonal to the x-axis are not considered e.g. plate thickness at the
ends of a box aligned along the x-axis. Normally this does not represent a significant issue, but for certain floating objects e.g. column stabilized
offshore structures, TLPs and jackup platforms, the resulting discrepancies in volume can be noteworthy. Furthermore, since these structures are
usually simple enough to be calculated exactly by hand, a more rigid treatment of the volume is required.
Since Release 2004.1 it has been possible to consider the plate thickness in a more realistic manner. The old way is still available and used as a
default if there are no separators or all separators are z-coordinates in increasing order. Also in these cases the new method can be requested by
using the N option of the CSE command. In this newer method, the actual curvature of the surface is used to determine the actual modification to
the calculation section required, such that the surface normal is considered in the application of the plate thickness. The moulded object is
intersected and the result is modified according to the thicknesses and normal vectors of the intersected surfaces. The surfaces that cause a
discontinuity are taken into account by modifying the x-coordinate of the result. Two sets of calculation sections are stored in DB4:
SECTIONS0(object) for the moulded object and SECTIONS(object) for the object with a thickness.
In this way an object of NAPA (surface or room) may have a constant thickness or different thicknesses can be assigned to those geometric items
that are explicitly used in the definition of the object. In addition (with some restrictions) thicknesses can be assigned to 3D regions that are limited
by a set of principal planes.
The assignments of the thickness are done by the command CSE name PT=plth in the DEF task, or by the command CSE PT=plth; in the
definition of the object.
A constant thickness is given by PT=t0 and a variable thickness by PT=(t0, s1, t1, s2, t2,...), where
Thickness is t0 unless otherwise selected by the separators; t1 is related to the selection s1 etc. The following alternatives of t0, t1,... are
available:
numeric values
SHELL thickness of the reference system expressed by the * character. Positive values indicate a shift to the outside direction of the
object
STR*model in the special syntax CSE PT=STR*MODEL
If no thickness is given i.e. the command is CSE name PT; or CSE PT; the value stored in the reference system is used.
the x-limits are not automatically added into the set of discontinuities
those parts of the object's boundary that cause a discontinuity and belong to the same surface or plane of the definition must have a
constant thickness.
thicknesses of 3D regions of the referenced objects are skipped. Only 3D regions of the object itself are used.
if there are overlapping 3D regions, the thickness of their common part is defined by the last of these in the PT=... definition.
When there is a reference chain of objects, the thickness of a part is defined by the first matching definition in the chain. For instance, the
definition CSE HULL PT=0.05 implies a constant thickness 0.05 of HULL even if a conflicting definition CSE HULLA PT=0.03 has been made for
its part.
#d-regions
Examples:
CSE PT=(0.03, 'HULL', 0.04, 'DECK' 0.05' 'X=10' 0.06)
CSE PT=(0.02 'X>0 X<50 Z<5' 0.03)
CSE PT=(0.05,'Z>2',0.03,'Z>4',0.02)
CSE PT=(0.05,2,0.03,4,0.02) ;** as above
CSE PT=STR*HULL ;** read thicknesses from column PLTH of
STR*HULL
CSE PT ;** use thickness SHEL of the reference system
The thicknesses can be used in principal plane sections. They are always used in making the calculation sections. In other sections the thickness
is not used unless a special intersection mode is activated by !GM PT 3. In hydrostatics, the thickness is also always taken into account whenever
waterline sections are used (argument WLS ON).
The following figure containing the calculation sections and a y-section in the y-projection shows how the discontinuities of a room are handled:
ROOM R8
LIM R8A
ADD R8B
ADD R8C
CSECT,PT=(0, R8A, 1, R8B, 0.5, R8C, 0.25)
Although this subject is not related to rooms, it is noted here that in the CSECT command, the option H makes it possible to use an open surface
for volume calculations, using the same logic as for open hull surfaces. It implies that the shape is closed by the reflected counterpart and at the
heights corresponding to the extension of the surface in th z-direction.
Example of volume implied by an open surface, when given option H in the CSECT command
Errors causing incorrect or incomplete calculation sections can exist without the whole set of sections being rejected. The following warnings can
be symptoms of this kind of an error:
This is normal in cases where a room ends otherwise than at a plane, but may also be caused by geometric errors.
(warning 1058): This may be the normal result of a part having an estimated limit only, but it can also be the result of a definition error. If this case
was classified as 'warning' (see above), separate messages are added, saying either
or
In the first case, the x-limits of a room may be wrong and in the latter case, an ADD- or REDUCT part may be missing.
A non-identified discontinuity is likely to cause a warning about bad accuracy, and it can be corrected by using the CSECT command. This may
be unnecessary, since the error is partly compensated by adding sections.
Failed intersections exactly at the end of an object are fairly common, and they are usually compensated by making a section slightly inside.
The warning 14005 'open section has many branches' should be taken seriously. In places like the bulb this a normal case, but it may also be the
result of errors in the surface (hole, partial surfaces that do not meet).
Calculation sections are not generated for box shape rooms; on the contrary, the volume is calculated simply by using the dimensions (width,
height, length) of the room. The reason for this is to speed up the calculation.
The box approximation can be controlled with the following parameters in the REF task:
When making calculation sections, attempts are made not to accept an object containing errors. Occasionally, a failure to obtain a section may
incorrectly be treated as an error. The following example is constructed after a real-life case: ROOM
ROOM AFPSEXAMPLE
LIM -1, 18, 0, 5, 0, 10
ADD AFPSPART
ROOM AFPSPART
LIM 0, 15.6, 5, AFPSCYL, 0, 10
CSECT AFPS
The room AFPSPART contains the corrugations only and between them no sections are obtained. It will (correctly) be rejected for calculations
because gaps in the x-direction are not allowed. However, AFPSEXAMPLE will unnecessarily fail for the reason above. As a remedy for this, the
system can be instructed to disregard the error with the option AFPS (accept failed partial sections) in the CSECT command. It can be given to
any one of the objects in the example. When given to AFPSPART, it will be taken into account in any object referring to it (but it does not rescue
AFPSPART as such).
The alternatives can differ regarding run time efficiency, behavior when surfaces are changed, reliability of intersection, and adherence to the
natural logic of the geometry.
Using a named surface increases the number of objects to administer, but it allows for easier updates. As a general rule, all important bulkheads
and decks, occurring in many room definitions, should be defined as named surfaces, while components of lesser importance can be represented
by coordinates directly. Giving a coordinate directly makes the definitions simpler, but when it is changed, the change must be done everywhere
where the surface is used. The advantages of the two alternatives can often be combined by giving a coordinate measured from a surface rather
than the origin (syntax #surface+d).
ROOM R1
LIMITS BH1 BH2 0 HULL DECK1 DECK2
REDUCT R2
ROOM R2
LIMITS #BH2-3 BH2 0 5 DECK1 DECK2
A room similar to the one in the example below can be defined as two parts, each having coordinate planes as sides, or as a single part, provided
that a surface is defined to represent the longitudinal bulkhead.
ROOM R1
LIMITS 0 10 0 6 2 6
ADD 10 20 0 9 2 6
ROOM R1
LIMITS 0 20 0 BH1 2 6
Especially if the bulkhead is needed anyway, the latter alternative is to be preferred, because it reflects the actual geometry better and it is
geometrically more efficient, for example, the latter alternative gives an elementary room while the first one does not.
It is often possible to create a complicated nonelementary room in many ways. In the example above, the definition using ADD could be replaced
by one using REDUCT:
ROOM R1
LIMITS 0 20 0 9 2 6
REDUCT 0 10 6 9 2 6
The difference is usually marginal, but the one corresponding better to the actual configuration should be preferred. In the example, this means
the alternative using REDUCT, because the LIMITS part gives a better approximation of the whole room, as can be seen when using PLOT R1.
Here are some possibilities by which a room definition can be simplified in order to make it more efficient or reliable when used. In some cases,
this is done at the expense of making a less natural definition.
Whenever useful, the syntax +HULL should be used instead of HULL and -HULL separately, because in the first case, HULL is intersected only
once, and the combination implied by + is simpler than the one done between the parts in a LIMITS record.
If a room is located wholly in the part of a ship represented by a partial surface in the hull definition, using that part to delimit a room rather than
the whole surface gives faster intersecting. It also has the advantage that the room will not be formally dependent on the other parts, and a
change in these will therefore not cause new calculation sections to be done.
A REDUCT part can often be simplified by omitting a redundant surface, as in the following example:
ROOM R1;
LIMITS 10 20 0 HULL 3 6; REDUCT 14 20 5 HULL 3 6
ROOM R1;
LIMITS 10 20 0 HULL 3 6; REDUCT 14 21 5 11 4 7
The latter alternative is faster and more reliable, since the removed part is simpler, and the reduct operation does not involve geometric special
cases.
The most natural definition of a room may involve removing a part that belongs to another room. If, however, that other room itself is complicated,
the part may actually be much simpler and therefore faster to remove than the whole room.
If possible, it is more efficient to add a surface to a LIMITS command than to use REDUCT. A typical example is provided by the cargo space in
the following example:
ROOM CA1
LIMITS BH1 BH2 0 HULL TTOP MDECK >WTSURFACE
ROOM CA1
LIMITS BH1 BH2 0 HULL TTOP MDECK
REDUCT WINGTANK
Intended use for this feature would be to handle minor compartments by which one does not want to burden the database. Another possible use
is to maintain compartment 'budgets', representing specifications not yet realized by actual geometric definitions. With the aid of formal room
definitions, preliminary space reservations can be made and made visible in plans and listings.
This feature uses the functionality of the LOCTN quantity introduced for supporting the equipment concept (see SM.2). The essential service
obtained this way is the possibility to tie the location to existing geometry. In addition, the columns LENX, LENY and LENZ are needed to provide
the dimensions. Later extensions could include the bottom area for replacing LENX, LENY.
Example:
This creates a compartment at the front end of R12 with the given dimensions in X and Y and the height of the room in Z.
The room is available as if defined by a normal room definition (box) after the table has been read into memory.
Table of Contents:
1. Current Status
2. Introduction
3. Geometry Editor Window
3.1. Main operations
3.2. Active arrangement
3.3. Hull surface
3.4. Handling arrangement tables
4. Reference surfaces
4.1. Reference Surface Arrangement
4.2. Interactive definition of surfaces
4.3. Editing surfaces
4.4. Snap settings
4.5. Objects shown in the graphics
4.5.1. Layers
4.5.1.1. Creating customized layers
4.6. Definition of surface objects
4.6.1. In surface
4.6.1.1. Definition of the owner surface
4.6.1.2. Defining limits, additions and reductions
4.6.2. Extruded
4.6.2.1. Cross section shape
4.6.3. Definition in series
5. Defining a new room
5.1. Tree hierarchy
5.2. Defining an elementary room
5.2.1. Finding limits automatically
5.2.2. Defining limits manually
5.2.3. Editing limits
5.2.4. Further definitions
5.3. Defining a reflected room
5.4. Automatic room generation
6. Opening a room
7. Deleting a room
8. Graphics in the Geometry Editor
8.1. Graphics in 2D views
8.2. Graphics in 3D view
9. Buttons and menus
9.1. Buttons always available
9.2. Buttons only in the Room mode
9.3. Buttons only in the Surface mode
9.4. Menus
1. Current Status
Napa Designer provides far superior functionality for working with surface objects and compartments compared to the old Geometry Editor. We
recommend that instead of using Geometry Editor you start using Napa Designer. The Geometry Editor will no longer be maintained and
eventually Geometry Editor will be replaced by Napa Designer.
To learn more about Napa Designer, please see the tutorial videos within the program itself. The tutorial videos are also available on Youtube.
2. Introduction
The Geometry Editor is a tool intended for creating and editing mainly the inner geometry of the ship model.
The tool supports the following types of objects:
Surface Objects
Defined by owner surface and limits
Defined by local cylinder and limits
Reflected
Rooms
Elementary
Reflected
In addition to these, the following types of surfaces can be interactively edited as reference surfaces:
Principal planes
Planes parallel to a main axis and passing through two points in a plane normal to the axis
Cylinders with a local curve and generator
Cylinders with a radius
The command description is always available for all objects by right-clicking on the object in the graphics and selecting
Creating and editing geometry is done using run-time geometry, i.e. the definition is only stored in the database when it is saved. The tool also
supports the Undo functionality. While saving the created geometry in the database, it is also added (if so desired) to an arrangement.
When the Geometry Editor opens, it is assumed that the project includes an arrangement table (ARR*), which is defined as the default
arrangement. If there is no default arrangement, the tool creates a table ARR*A and uses that as the default arrangement. The Geometry Editor
also requires a hull surface (by the same name as the reference system parameter MOUL, default: HULL). A default reference surface
arrangement for handling the reference surfaces in the model is created automatically when the tool is opened.
The Graphics Window consists of three section views (longitudinal, transversal and vertical) and a 3D view as seen in the figure below. Each
section view has a gray cross-hair locator to present and change the location of the sections. The cross-hairs can be moved by dragging them or
by selecting a new location by holding down the left Alt key and left-clicking with the mouse. The location of the locator can also be typed into the
three fields in the main toolbar on top of the graphic areas (on the right). When a cross-hair is moved in one of the views, the sections in the other
two section views change accordingly.
There are two work modes available, the Room mode and the Surface mode, which can be changed by the buttons presented below.
The arrangement that is opened for editing is selected in both modes in the middle of the upper toolbar:
The hull surface that is used is taken from the reference system parameter MOUL (moulded hull).
A new feature in Release 2007.1 is the table which can be opened in the lower part of the Geometry Editor.
The table area contains the relevant tables of the current model. If the Geometry Editor is set to the Room mode, the current arrangement table is
shown and if the Surface mode is on, the current structural arrangement is shown. The reference surface arrangement table is available at all
times. The functions of the numbered buttons in the figure above are the following:
Button Description
Button Opens a tool for adding objects in the database to the current table that are not included. This is relevant when e.g. editing an old
1 existing model or when an object has been created by commands and should be added to the model.
Button Shows the model table, i.e. in the Room mode the current arrangement and in the Surface mode the current structural arrangement.
2
4. Reference surfaces
In order to create a model which is flexible in order to make quick changes possible it is recommended to build up the model based on reference
surfaces. A reference surface can for example be a plane defining a border of a watertight zone. All objects that are dependent on the position of
that limit is then defined to refer to this plane. When the design changes and the watertight limit is moved, the user can simply just move the
reference surface and all objects referring to it will be updated.
Since Release 2006.1 there has been a tool for organizing the reference surfaces for the geometry in a table called the reference surface
arrangement. The service is part of the Ship Model task in the same manner as the compartment arrangement.
Note! Since Release 2007.1 the handling of reference surfaces in the graphics has changed to be totally dependent on the reference
surface arrangement. That is, in order to get a surface visible in the graphics it should be added to the reference surface arrangement.
The basic principle of the reference surface arrangement is exactly the same as in the room arrangement or the structural arrangement. Where
the compartment model uses PURP as definition of the type attribute RTYPE is used to define this in the reference surface arrangement. The
Geometry Editor uses this arrangement for handling the surfaces that are shown in the graphics. The use of the reference surface arrangement
can though be extended to any user-specific application.
The current tool supports the interactive definition of surfaces as mentioned above. For example, the workflow of creating a principal plane is the
following (note that the Geometry Editor should be in the Surface mode):
1. Start definition by
selecting an object type
2. Select the view to work The Geometry Editor prompts you to select the view where the interaction should be started. Note that only
in principal plane views are supported.
3. Choose orientation and Once the view has been selected, an interactive object appears in the graphics. In the lower left part of the
attributes window inputs for the definition of type, name and arrangement appear.
When the type is chosen, a default name is generated for the surface based on a prefix given in the NAME
column of the REF* table and a free index.
The interactive editing tools for the supported surface types can be launched by right-clicking on the object (also in the Room mode) and selecting
'Edit Interactively'. The text description is available by right-clicking and selecting 'Text Description'.
The snap tool may be used to place the geometry on the desired location. The Snap Settings dialog can be found in the Options menu: Options
> Snap. The available snaps to objects are described in the following list. For more details see the chapter: NAPA Steel Graphical User Interface
The graphics area of the Geometry Editor consists of four views; one for each principal plane and one for a 3D view.
4.5.1. Layers
In the planar views different aspects of the model are presented as sections which are placed on separate layers whose visibility can be controlled
from the tool opened from the Layer Control button in the toolbar located in the upper part of the Editor.
Layer Toolbar
The layer tool consists of a list of layers available in the section views where the layers can be turned on/off by the Layer On/Off
Default layers
Layer Description
Structural Sections of the current structural arrangement. In the Room mode the STR* table recorded in parameter STR of the
Arrangement reference system is intersected.
All Reference All reference surfaces in the current reference surface arrangement
Surfaces
Hidden Objects Objects that are not active in the limit finder.
In addition to the default layers created by the Editor, you can define your own customized views. In the current tool the selections are mainly
related to handling the reference surfaces shown in the graphics. By clicking the Manage Layers button, a dialog is opened where customized
layers can be defined. The definition of selections of the reference surface arrangement is done as follows:
Subset
Only filters are defined, i.e. a subset of the reference surface arrangement is recorded. This means that the contents of the layer are
updated each time an object has been added to the reference surface arrangement which complies with the given filter (subset).
Custom Selection (explicitly selected objects)
Explicitly selected objects can be defined by clicking the Custom Selection button which opens selection lists where the selected objects
are located in the list on the right-hand side.
Note: if a custom selection is stored with filters defined, e.g. RTYPE=DECK, the selection contains objects in the reference surface
arrangement that comply with the RTYPE=DECK and the objects selected in the list. If the filters are left empty, only the selected
objects are included.
The functions new, open and save work in the same way for both rooms and surface objects, depending on if the window is in the Room or
Surface mode. A new object is created with the New button or an existing object is opened with the Open button. It is also possible to open an
object by right-clicking on it and selecting Open ‘object name’ from the pop-up menu.
The definition is stored with the Save button. When creating a new object, the definition is run-time until the Save button has been clicked, i.e. the
active object is not stored into the database before saving. The same applies when making changes to an existing object.
Operations concerning the geometry of the active object are selected from the toolbox in the left part of the window. As per Release 2007.1, all
operations available have not yet been implemented in the graphical user interface; however, the basic functions which enable the definition of the
major part of the structures in a ship are included.
4.6.1. In surface
The definition method refers to a surface object placed on an existing surface or a locally defined principal plane coordinate (coordinate, frame,
web, longitudinal or vertical) which is delimited. The resulting text description is similar to:
SO TEST;
IN BH5.CY LIM -, -, 0, HULL, LSTL5, DECK, <WT, >TTOP
SYM
or
SO TBH6;
X #30 LIM -, -, -, -, S.DK1, S.DKM, <+HULL
OK
After the initial data has been assigned in the New Surface Object dialog, the geometry tree is opened in the left area of the Geometry Editor:
The available owner surfaces are listed when clicking in the graphics
The Limits part defines how the owner surface is to be delimited in order to form the surface object. In the Geometry Editor the limits are defined
by entering the appropriate item in the geometry tree:
Limits item
The limits that are assigned into the definition are listed in the list in the lower left part of the Editor. There are two methods to obtain the limits
from the graphics:
Picking Limits
The limits can be selected from a list containing the possible limits that appear when clicking near the desired location in a section view:
While having the focus in the Limits, Addition or Reduction items there is a function for defining the limits automatically from the surrounding
reference surfaces. The sequence for this is the following:
Press the Ctrl button while having the mouse pointer in the desired planar view. An interactive handle will appear in the graphics.
Click in the area where the surface object should be defined. If the operation was successful, the surface object is defined by the closest
surfaces in the reference surface arrangement to the point where the mouse click was done.
The same procedure works for Additions and Reductions as well. Making quick limits and additions can be done using the following logic:
Mouse-click (no keys down) in the Limits, Addition or Reduction items. This will assign the limits to the active part, i.e. possible previous
definitions are overwritten.
Mouse-click with the Ctrl button pressed in the Limits or Addition items. If no Limits have been assigned, the limits are defined in the
Limits part of the definition. If the limits have been defined, an Addition is performed.
Hide/Show Function
The rule of thumb when applying the limit finding function is that all visible reference surfaces in the graphics are included in the selection of
surfaces to be evaluated. By using the Hide/Show function you can temporarily deselect surface from this group. The function is available by
right-clicking on the surface which is to be hidden or shown:
The hidden objects are not removed completely from the graphics but plotted with a dark grey pen to mark that they are not active in the limit
selection.
4.6.2. Extruded
The cross section shape part defines the geometry of the curve which is extruded. While the Cross Section Shape item is selected and the mouse
is moved in a section view, an interactive handle is visible. The definition is made by drawing the cross section curve in the selected view.
The cross section shape is defined by using drawing the curve with the desired snap options
When the desired curve has been defined, press Enter and the system will define a surface object of:
It is worth noting that the active snap setting plays a central role in how the object is defined. As the surface object is defined, the definition
functions evaluate the snapped points of the cross curve and determine the connection to 1) the framing system 2) other geometric objects. For
instance, when defining a transversal bulkhead in the Z-view of the Geometry Editor, the snapped points can be:
A powerful method to quickly define similar surface objects is to define the geometry of the first one and then apply the same limits on a selection
of owner surfaces. This is done by the Series function in the Geometry Editor which is available by clicking the series button in the toolbox in the
left part of the window:
Creating a new room can be started either with the New button or by selecting File > New. Either way, the New Room dialog opens as shown in
the figure below. In this dialog, you need to define at least a name, a type and an arrangement for the new room. A descriptive text and a purpose
are additional information. If you select the Use Prefix option and define a prefix, the Geometry Editor defines the name for the room. The name
of the room is the prefix and the first free index (number). The room is defined to be either in one arrangement or not in any arrangement. The
room type is either elementary or reflected. The purpose of the room included in an arrangement can be selected and modified later in the
Geometry Editor or, for example, in the Ship Model task.
A reflected room is a mirrored elementary room (i.e. an existing room is mirrored over the center line).
The definition of a room is divided into components. These components include an elementary definition, add, reduce and symmetry components,
and reflection tags. The Add and Reduce components can be either existing rooms or spaces defined by giving limits. Each component in the tree
hierarchy corresponds to a modification done in the room definitions (ADD, RED, SYM, ...). One line in the room's text definition is one component
in the tree hierarchy.
A hierarchy tree is used to present a room definition and its components (see the figure below). Each component is shown as a child of the room
definition. The definition of an active component is shown in the edit area under the tree (see the figure below). Components can be added to the
hierarchy tree, deleted from the tree and moved up or down in the tree. There is a toolbox with tools for these operations next to the hierarchy
tree.
An elementary room is a room defined by one set of limiting surfaces only, in contrast to rooms defined by combining elementary parts. The
definition of an elementary room is formed by the limiting surfaces and instructions regarding what side of the room each surface forms.
When the definition of the new elementary room has started, the name of the room appears to the top of the tree hierarchy on the left. Under the
top level is an item for Limits. Room boundaries are selected in this item. The easiest way to select room limits is to let NAPA do it. Move the
middle point of the cross-hairs inside the room boundaries and click the Find Limits
button on the left side of the room's tree hierarchy. This finds automatically the closest limits from the point where the cross-hairs is located and
applies these limits.
When the room is applied, NAPA generates calculation sections for it and plots those in the 3D view. Room limits are shown under the tree
hierarchy. If the result is correct, it can be saved either with the Save
button or by selecting File > Save or File > Save As.... After the room is saved, the creation of a new room can be started.
Room boundaries can be defined also manually. In the limits item, you can define all the needed limits for the basic room by selecting them from
different views. Selecting limits is done by clicking the left mouse button on the correct place and selecting the correct limit from the dialog box
that opens. The Geometry Editor automatically selects all the possible alternatives near the clicking point. Limits can be selected in any order and
they are shown under the tree hierarchy. Selecting limits is shown in the figure below.
button can be clicked when all the needed limits are selected. This generates the room and the calculation sections which are shown in the lower
right view. The result can be seen in the figure above. The result can be saved either with the Save
A limit can be changed by clicking it once and then finding another limit in the same way as described in the previous section Defining
limits manually.
Double-clicking on the limit text activates the text for modification. The text can be modified in any way according to the NAPA syntax for
room limits. Also surfaces that are not visible in the Geometry Editor can be used this way (just type in the correct name).
Instead of double-clicking, also a single click and pressing the F2 button in the keyboard activates the limit for editing.
Clicking the line below the last limit allows adding more limits either by typing them or selecting them manually from the views.
The whole room definition can be edited in the text form by clicking the Edit Room Definition button. Modifications can be run either with
the Apply or the Update button.
The selected limit is always highlighted in all the views to help distinguish it from the other limits. A room definition can always be applied with the
Apply button to check if it is working and what the room looks like.
After the basic limits have been defined, defining the elementary room can be continued if needed. All the needed functionality for room definitions
is located in the toolbar on the left side of the hierarchy tree.
Toolbar
The buttons in this toolbar are presented in the following table.
Add
You can reduce a room or limits from the room defined so far.
Reduce
The room, defined so far, is on one side of the ship but actually it
is located on the other side.
Reflect
Symmetric
The selected item (like Add or Reduce) is deleted. This does not
delete a room or a limit item.
Delete
Move Up
The selected item is moved one step down in the tree hierarchy.
Move Down
This finds automatically the closest limits from the point where
the cross-hairs is located and applies these limits.
Find Limits
Apply
The automatic limits finder can be used, in the same way as described in section Finding limits automatically , also in Add and Reduce items.
Reflect and Symmetric items can be used only once in one room definition but they can be used in any place in the hierarchy. These items have
an effect only on the definition defined before them. The Apply
button can be used all the time when something new is defined to check that the definition is working. This is also recommended.
The creation of a totally reflected room is selected already in the New Room dialog by selecting Reflected as the room type instead of
Elementary. A reflected room is a mirrored room over the center line from an already existing room. The source room must be defined entirely on
one side of the center line. A reflected room is defined by selecting one existing room from the Reflect list below the tree hierarchy. When the
Rooms can be generated automatically once all the main compartment boundaries have been defined in the surface model. The Generate
Rooms function can be found in the Tools menu. The figure below presents the procedure. The surface arrangement can be given with filters to
restrict the selected surfaces. The list of objects in the Selected field can be further edited.
The room generating feature is new in Release 2007.1 and it will most probably be under further development in the future. Limitations in the
current functionality are that the used surface objects cannot have any reductions (openings), i.e. the limits must form a ‘watertight’ boundary.
Secondly, using surface objects defined in patch surfaces (e.g. an inner skin) may cause the failure of the generation due to lack in the trimming
functionality in surface objects. In this case, it is recommended to use a trimmed patch surface instead of a surface object.
6. Opening a room
The definition of an existing room can be opened for editing by selecting the room from the Graphics Window (with the left mouse button and by
selecting Open... from the pop-up menu), or by selecting it from the list opened by File > Open or by clicking the Open
button. The current room definition can be changed interactively only when the focus is on the top level in the definition tree (see the figure
below).
7. Deleting a room
Rooms can be deleted with the Geometry Editor by selecting File > Delete . Only an active room can be deleted. The Geometry Editor deletes
the room from the database and the related arrangements. A room cannot be deleted if any geometric object refers to it (for example, if a room is
used in the definition of another room or in the definition of a surface object).
The handling of graphics in 2D views is mainly done with three buttons, one menu item and the cross-hairs. The buttons used are:
Button Description
This button shows all the selected surfaces with View > View
surfaces... which is described earlier in section Selecting visible
surfaces.
Show Surfaces
Show Rooms
This button shows all the rooms which are not part of the active
arrangement.
There is one cross-hairs in each 2D view. These cross-hairs show the intersections shown in the other 2D views.
The menu item Options > General settings handles some general settings and the settings for 2D and 3D plotting. The settings are in three
different tabs as shown in the next figure.
General settings
The General tab has two options for 2D plotting. The Show Names of Reference Surfaces as Tooltips option defines whether the names of
different surfaces are shown or not when the cursor is moved near them. The Highlight Elementary Rooms option defines whether the opened
room is highlighted or not. The highlight colour is controlled in the 2D Plotting tab. Tooltips and highlight are shown in the following figure.
All colours of the 2D section drawings are handled in the 2D Plotting tab. Different items are described in the next list and in the following figure.
All colours are represented with numbers. These numbers are basic numbers for colours in NAPA. All colours and their numbers can be shown
with a macro in DB7 called DATA*COLOURMAP.
There are two more ways to influence the graphics in 2D views. These are buttons for Fill Purpose
. The Fill Purpose button fills all the compartments with a colour defined for that purpose in the Ship Model task when the Show Rooms button is
selected.
The Use viewing limits button activates the selected viewing limits. Viewing limits are given into the field left of the activation button in the
following form: xmin xmax ymin ymax zmin zmax
. Several viewing limits can be entered and selected from the drop-down list. Selecting viewing limits and activating those with the button zoom all
2D views according to the selected values.
Graphics in the 3D view are mainly handled with two buttons and one menu item. Either calculation sections or OpenGL can be plotted in the 3D
view.
Calculation sections are plotted by default. Calculation sections can have either orange or red colour. Orange colour means that the room is
applied but not yet saved and red colour means that the room is saved into the project database. It is recommended to plot both the calculation
sections and OpenGL and to check that the room has been defined correctly and that it is working correctly.
OpenGL plotting is controlled with the Settings dialog that you can open from Options > General Settings. In the General tab of this dialog, you
can define whether the reference surfaces and additional rooms are plotted separately or not when they are selected in the tree hierarchy (the
option Enable 3D Plotting of Reference Surface and Additional Rooms). The 3D Plotting tab has more options to control OpenGL plotting. You
have the possibility to control the filling colours, transparencies and the colours of contours. Different colours are represented with the basic NAPA
colour numbers which can be plotted with macro DATA*COLOURMAP in DB7. The 3D Plotting tab is shown in the following figure.
The filling colours, transparencies and the colours of contours of the following items can be controlled.
Buttons that are available both in the Room mode and the Surface mode are described in the following table:
Info
Active arrangement
Show surfaces
Show rooms
Plot OpenGL
Room mode
Surface mode
Fill purpose
Sets the viewing limits in the following form: xmin xmax ymin
ymax zmin zmax. Viewing limits are used to zoom in all 2D
Viewing limits views. All viewing limits that have been used during the current
Geometry Editor session are available in the drop-down list.
Section coordinates
New
Opens the Open room dialog for opening any room from the
database.
Open
Save
Shows the name of the currently active room. The rooms that
have already been opened during the current session can be
found in the drop-down list. Any room can be opened by typing
the name of the room in the text field.
Active Object
Undo
Add
You can reduce a room or limits from the room defined so far.
Reduce
The room, defined so far, is on one side of the ship but actually it
is located on the other side.
Reflect
Symmetric
The selected item (like Add or Reduce) is deleted. This does not
delete the room or the limit item.
Delete
Move Up
The selected item is moved one step down in the tree hierarchy.
Move down
This finds automatically the closest limits from the point where
the cross-hairs is located and applies these limits.
Find limits
Apply
Edit object
X Planes
Y Planes
Z Planes
Principal plane
Cylinder surface
Creates a cylinder surface which has a circle form. The start and
end coordinate values are given as input values as is also the
radius. Select the location of the surface with one click in one
view.
9.4. Menus
File >
New: opens the New Room dialog for defining a new room.
Open...: opens the Open Room dialog for opening any room from the database.
Close : closes the currently active room.
Save: saves the currently active room into the database.
Save As...: saves an active room into the database with a different name.
Delete: deletes an active room from the database and from the arrangements.
Quit: closes the Geometry Editor.
Edit > Options for modifying a room definition (the same as the buttons in the toolbar on the left side of the tree hierarchy)
Add
Reduce
Reflect
Symmetric
Delete item
Move Up
Move Down
Apply definition
View >
View surfaces...: opens a dialog for selecting active reference surfaces (surfaces that are visible in the Geometry Editor).
3D-view locator: activates a locator in the 3D view which shows the location of the cross-hairs.
3D-view hull: activates the plotting of a hull in the 3D view.
Frame scales: frame scales are plotted on the sides of all 2D views (frames, longitudinals and verticals).
Show Command Area: command area is opened under the 2D view of Z projection.
Room Toolbox: activates buttons for defining a room (Add, Reduce, Reflected, ...).
Background: opens a list from where you can select the background colour for the Graphics Window. In addition, there are
more colours available in the Custom view.
Tools >
Generate Rooms : opens the Generate Rooms dialog.
Text Editor: opens the Text Editor.
Table Editor: opens the Table Editor.
Options >
Snap: opens the Snap Settings dialog for selecting the snap settings to be used in creating and modifying reference surfaces.
General Settings: opens the Settings dialog for modifying different settings for 2D and 3D plotting.
Help >
Show Tips: selects whether the tips (names) for different buttons are shown or not. Help texts for different buttons are displayed
in the bar in the bottom of the Geometry Editor window.
Help About
Online Manuals: opens Napa Manuals which can also be opened by pressing F1.
Help Viewer: opens NAPA Help Viewer.
About NAPA: opens a dialog with basic information about NAPA.
1. Introduction
2. Surface objects and trimmed patch surfaces
3. Defining a surface object
3.1. Defining the owner surface
3.2. Defining the limitation
3.3. Special limitation options
3.4. Generalized rounding functions
3.5. Surface object derived from bracket shapes
3.6. Selecting whole faces
4. Examples
5. 'Nonelementary' surface objects
6. Combined surface objects
6.1. Combining surface objects geometrically (merge)
7. Restrictions on the owner surface
8. Calculating the shape
8.1. Main method
8.2. Open limitation
9. Usage of surface objects
10. Usage of surface objects as room limits
11. Administering the ship components
11.1. Naming objects
11.2. Organizing into combined objects
11.3. Hierarchy between objects
11.4. Division into individual objects
11.5. Building the geometry
12. Parametric curves and sketch tool
12.1. Introducing the concept
12.2. Parametric curves as part of surface object definitions
12.3. Usage of parametric objects
12.4. Direct definition of parametric limits
12.4.1. General syntax
12.4.2. Defining a segment
12.4.3. Reference
12.4.4. Direction
12.4.5. Position by absolute coordinates
12.4.6. Defining the position as a distance
12.4.7. Specifying a point on the boundary
12.4.8. Length
12.4.9. Examples
12.4.10. Auxiliary reference object
12.4.11. Segments with radius
12.5. Creating holes
12.6. Parametric curve from sketch
12.7. Transferring a definition to another object
12.8. Editing parametric objects
12.9. Procedure when editing
12.9.1. More general editing
12.10. More general owner surfaces
12.11. Examples
1. Introduction
In most contexts within NAPA, steel constructions such as hull, deck and bulkheads can be described as surfaces without thickness, as so-called
moulded surfaces. Where needed, the thickness can be handled as an attribute. A more detailed definition of the structures is the subject of
NAPA Steel, but even then, the basis if formed by the moulded surfaces.
For the definition of the geometric shape of such objects, an object type called surface object is provided. A surface object is an object obtained
by delimiting a surface, the owner surface, with other surfaces.
The owner surfaces are usually fairly simple, mostly just planes, and the surface object is obtained simply by defining the limiting surfaces. The
central idea behind surface objects is illustrated by the following example, showing a deck (filled surface) and the bare surface from which it is
restricted:
CYLINDER TTOP-SURFACE; Y 0
XZ <> (0 3) (20 3) (25 1) (80 1) (90 2) (100 2)
GENERATOR Y -12 12
Note that the owner surfaces (also called reference surfaces) are the same as would be needed for room definitions anyway. As in the case of
rooms, the surface objects are automatically kept up-to-date when the components are changed, and therefore, they do not need a separate
update command or similar.
Restriction: the owner surface of a surface object cannot be a general surface. If such an object is needed, it has to be defined directly.
It is further assumed that the owner surface is a true facet surface, i.e. one where the faces are plane. For example, the faces of a
connection surface are likely to be twisted.
While a surface object is defined by the SO command and its subordinated commands, trimmed patch surfaces are defined as subcase of
SURFACE:
SURFACE name
TRIM parent limitation
Apart from the definition, the main difference with respect to a surface object is that the result is formally a patch surface that may be curved while
a surface object always is a facet surface.
the owner surface = the surface containing the surface object. A coordinate plane can be given directly in the definition of the surface
object; otherwise, the owner surface is given by the name of a separately defined surface. For the type of surface accepted as owner
SO name
Then follow the owner surface and the limitation, as presented below.
If the surface object is placed in a separately defined owner surface, it is defined by the command IN:
IN name
Where 'name' is the name of the owner surface. Implemented on pilot level (i.e. may not work under all circumstances), there is the possibility to
add a transformation, for example:
IN BH1.S(X+20)
Locally defined planes are given by command X, Y or Z as in the definition of planes, for example:
The owner surface can also be defined by another surface object. In that case the objects will share the owner surface.
The limitation is defined by commands LIMITS, SYMMETRIC exactly as in room definitions. In the LIMITS command, the interpretation of the six
positions corresponding to lower x limits, etc is done as for rooms, and when needed, unused positions must be designated by minus signs. The
interpretation of the LIMITS command is done as for rooms, for example, when deciding the extension.
When using the LIMITS, ADD and REDUCT commands, there are some differences with respect to rooms.
If the owner surface is an unrestricted plane, the surface object definition works exactly as for rooms. With a restricted owner surface, the
following differences are relevant.
While a room limit is closed by definition, the limits of surface object do not need to be closed because the owner surface by itself can provide the
restriction. Therefore, the limit of the surface object is allowed to be open, and the check of closed sections is not done as for rooms. When
intersecting rooms, most geometric errors are detected by the fact that a closed section is not formed. With surface objects, this check is not
available. If it should be necessary to restrict the surface object by a closed limit, the closing check can be activated by adding an asterisk as the
last item.
If the owner surface is restricted and the only modification to be made is adding openings (REDUCT), the LIMITS command can be omitted. With
a restricted owner surface, the use of the ADD command is discouraged: the definition should only remove parts, not add.
When defining the limits, there are two options valid for surface objects only (i.e. not for rooms): rounding, parallel translation parallel and explicit
curve. The two first alternatives are given as options D and R:
The D option defines a translation of the original contour the distance d at right angles to the curve. If d<0, the translation is outside.
Example of rounding and translation. The dashed line is the intersection with the room.
The radius can be specified separately for different corners in the form
R=(r1,r2,r2,r4)
These (four!) values designate the radii for the upper left, lower left, lower right and upper right corners respectively. Whether this definition
corresponds to the actual position obtained with the drawing conventions used may need checking. See below for more general roundings.
name(P+d)
for example
If this is combined with the D option, both translations will be carried out.
A curve can be used as such for defining a limit of a surface object. A typical use of this feature is to define an open limit, i.e. a limit that is not
bounded by another surface. An example of this is the inner side of a web, which is also the original reason for introducing this feature. This is
or
SO WEB12; X #12
LIM - - '(5,4.5), (7,8), (6.5,11)' HULL DECK2 DECK3
As shown by the example, the curve is extended if it does not cover the whole range (max 5 m). The direction of the extension depends on the
role the curve is given: in the example it is an y-limit and the extension is in the z-direction.
A locally defined curve is treated as a polygon if it contains a set of points only. If it contains other syntaxes, it is treated as a general curve
definition. From a referenced curve, the projection is taken that corresponds to the orientation of the surface object.
Local curve definitions are intended for simple cases only; otherwise, problems may be encountered with long strings as part of the definition.
For direct access to these definitions, the function GM.SOCURVE is provided. By extracting the curve limit, it can be modified with graphic
interactive tools and then replaced in the definition of the surface object.
More general roundings are available in the form of the parametric shapes used in NAPA Steel for brackets. The roundings are otherwise defined
as above, but the bracket designation is written in the place of the radius.
The following example uses the type R2S, formed by two roundings symmetrically.
Example of object with parametric roundings. In the left bottom corner, the corresponding bracket shape
is shown
SO EXAMPLE1; X 0
LIMITS -, -, 0, 10, 0, 5, R=(-,R2S*3000*2000,1,-)
RED - - 2, 8, 1, 4, R=(0.5,R2S*2000*1200,0.5,R2S*2000*1200)
Note the following restrictions: the rounding feature has been implemented for object in planes only and the part of the boundary affected by the
rounding must be straight.
The bracket shapes can be used as such to form a surface object or part of it. The definition is done with a LIMITS command with the normal
syntax, but the (two) surfaces now only define the place and orientation.
SO EXAMPLE2; X 0
LIMITS Y>0 Z>5 R=R2S*3000*2000
SO EXAMPLE3; X 0
LIMITS -, -, 0, 10, 0, 5, R=(-,1,1,-)
RED -, -, 2, 8, 1, 4, R=(0.5,R2S*2000*1200,0.5,R2S*2000*1200)
ADD Y>0, Z>5, R=R2S*3000*2000
ADD Y<10, Z>5, R=R2*3000*2500*0*2000
In addition to the geometric limitation, where the owner surface is cut with other surfaces, there is the possibility to restrict the surface by selecting
a subset of faces, i.e. the partial planes.
The selection is done with the command SELECT, which is given after the IN command. The selection is based on criteria related to the
orientation or location. The syntaxes are presented for the x-axis, the other axes are analogous.
The orientation is x if the x-component is the largest component of the surface normal. Preceded by a minus, the subcriterion is reversed, for
example:
SELECT -XX
Examples:
SO CBH.X1; IN CBH
SELECT XX Y>0
SO TTOP; IN TTOP.S
SELECT -Y
LIMITS <+HULL
The first example selects the transversal parts of CBH in the range y>0. The second example is otherwise a typical double bottom, but the vertical
4. Examples
Surface object in a plane:
SO BH1
X #120
LIMITS <+HULL Z<MAINDECK
SO BH4
IN BH4.S
LIMITS <+HULL z<MAINDECK
SO MAINDECK
IN MDECK.S
LIMITS <+HULL
RED HATCH1
RED HATCH2
RED CASING
SO LBH1
IN LBH1.S
LIMITS Z>TTOP Z<DECK2
If openings in a surface object, formed by shafts, casings and similar, are defined by reference to the corresponding rooms, it is made sure that
they are consistently defined, as in the following example.
SO DECK1
Z 3
LIMIT <+HULL
RED CASING
RED SHAFT
SO DECK2
Z 8
LIMIT <+HULL
RED CASING
RED SHAFT
SO DEMO
IN DEMO.S
REDUCT BOX1 D=0.5 R=1
REDUCT BOX2 D=0.5 R=1
Usage of SELECT:
SO BH1.P1
IN BH1
SELECT Y Y>0.5
In order to make the generation of the shape more reliable, the following restrictions have been added:
If there are both ADD and REDUCT operations, all ADD operations must be done first. If the SYM or REFLECT is used, it must be the last command.
Instead of using SYM, it is usually more reliable to make the surface object symmetric directly, as used in the initial example, rather than using
SO TTOP
IN TTOP-DECK
LIMITS Y>0 Y<HULL
SYMMETRIC
However, in cases like a corrugated transversal bulkhead, the SYM command makes the generation of the surface object faster, giving half of the
facets by simply reflecting.
The ADD command should only be used when the owner surface is an unrestricted plane.
SO name
COMBINE part1 part2 ...
The parts may be modified by transformations added after the name, for example, name(y/0).
As an exception to the rule that only objects of the same type may be combined, it is allowed to have bare surfaces as part of the combination.
There are cases when an operation with a surface object is carried out with the owner surface rather than the object itself. The most important
examples are the usage as room limits or for defining a plan in a setup. For the combination to have the owner surface defined, the partial objects
must have a common owner surface. Otherwise, the cases mentioned may work poorly or not at all.
Note: a structure arrangement (STR* table) can be used as a combined surface object.
In the preceding function, the combination merely represents a collection. There is also the option to have the parts of the combination merged
geometrically. The definition is similar with the preceding case, but the keyword is MERGE:
SO name
MERGE part1 part2 ...
The parts may be modified by reflection expressed the normal way by name(y/0). A part may also be also be removed (syntax -name).
This function is presently implemented only for objects with a plane as the owner surface, and the plane must be the same in all parts. Partial
objects violating this are added to the result without merging.
The normal method for generating the shape of a surface object requires that the facets are plane. If the owner surface is a connection surface or
some other type, where the faces may be non-plane, the associated inaccuracy will result in faces not meeting.
If the owner surface is a plane, the operation of generating the surface object is essentially the same as forming a plane section from a room.
Note: if the surface is not a plane but a general facet surface, the operation is carried out for each facet separately, and the results
combined. Note carefully this principle - being aware of it helps to understand the reason why a definition fails and how to correct it,
especially in connection with open limits. While this method is adequate for most surfaces in ship, the piecewise approach means that
the limitation of a single facet is not influenced by the result obtained for the surrounding surface, and may fail because its plane
intersects the limits differently than the surface as a whole.
While a room must be defined so that the limits are closed, this is not necessary for the limits of a surface object, if the owner surface itself is
limited, i.e. it is other than an unrestricted plane. The present implementation may not always handle open limits correctly, and you should take
into account the restrictions presented here and the way to correct possible problems. Unless the so-called 'strong limitation' is specified, as
presented below, it is assumed that the limits may be open.
The main problem concerns facets that should be excluded wholly, but their plane does not intersect the relevant limit. The most likely reason for
this is that individual facets of a surface may have a very different orientation with respect to the surface as a whole, and its plane may not
intersect some limit at all. Unless the strong limitation is specified such a facet will be included.
This problem can only be handled by adding limits. The 'strong limitation' means that the surface object is enclosed within limits in all directions,
and an asterisk is added as the last item in the LIMITS record to indicate this. This has the effect that the normal criteria for detecting failed room
sections will be applied, and a facet not giving a valid section is rejected.
An open limit can cause the situation pictured in the following example, where the limit ends in the middle of a facet:
These operations include intersecting with planes, drawing with the PLOT command, calculating areas and related quantities, usage as limits for
other objects, usage in #-references. The last case is subject to the same restrictions as for bare surfaces, i.e. there must be a reference
coordinate available.
A surface object can be used as the limit of a room. As presented below, the actual limitation will be done by the owner surface.
The calculator functions AREA and CGA can be used for surface objects.
The main complication when using surface objects as room limits occurs when the surface object is a combined one, where it is required that the
parts have a common owner surface. This may require that a corresponding combined owner surface is first defined. If no common owner surface
is available, that of a part is used, if it seems possible.
Another complication is related to transformations, which may occur in the definition of the room, in the specification of the owner surface of the
surface object itself, in the definition of the surface object (REF or SYM command) and in the definition of a combined object. It is not guaranteed
that any combination of these will work, and the definition may have to be simplified.
When treating the dependencies between objects, the owner surface substitution is taken into account, and other parts of the definition of the
surface object will be disregarded when sorting objects in dependence order. This allows an exception to the general rule forbidding cross
This section presents some aspects on this problem, by pointing out typical questions, without trying to provide a set of ready answers.
It is essential that good name rules are adopted and adhered to. The basic requirements for the name rules is that the name should tell the type of
an object and give (at least) a hint regarding its location but not the exact location.
When dividing objects into types, one must decide how specific the typing should be. For example, all rooms may be considered the same type
from the naming point of view, or one may want to distinguish, say, tanks from other compartments. Or, one may want to distinguish watertight
bulkheads from less important ones.
For expressing the location, various ways of numbering decks and bulkheads can be used, and the subordination of objects can be expressed by
suffixes .n.
The names of objects representing identifiable components in the ship will be needed by larger groups of people, and they should therefore be
designed with special care. In addition to these, there are bare surfaces and curves with the role of auxiliary objects. These should also be named
systematically, but one can afford less 'representative' names.
Taking into account that the simplest way of selecting subsets in the database is by a selection criterion 'name begins with ...', the parts of a name
should be organized so that the most important level of hierarchy comes first, for example, the type.
Organizing sets of objects and defining their non-geometric properties is done in SM. The result is stored in tables with the prefix STR*, which are
available as combined surface objects in the same way as ARR* table represent sets of rooms. For more information, see Compartment
arrangements.
Essentially, the relation between bare surfaces, rooms and surface objects is the following:
surface objects
rooms
The simplest definitions (from the geometric point of view) are obtained when they are done according to this hierarchy. However, in contrast to
other objects, the bare surfaces do not represent identifiable objects in the ship, and one may want to restrict their role to a minimum, by applying
the following hierarchy:
The only benefit from this is that room definitions can be done in terms of objects visible on a normal arrangement plan, and (possibly) named
according to better enforced standards. Since such definitions, if carried out literally, give more complicated and less reliable geometric
operations, the system substitutes the surface objects by their owner surfaces in room definitions, as presented above.
If a shipbuilder is asked to identify the different bulkheads visible on an arrangement plan, the answer is likely to vary from one person to
another. A typical question is whether two bulkheads on top of each other on different decks are separate objects, or only one object. A similar
question concerns the division into rooms.
In addition, there may be a need to have the same objects defined with a different subdivision, for example, individual compartments and whole
fire compartments, or whole bulkheads and the parts on different decks.
Especially in connection with various geometric complications, the same object can often be defined in many ways. Standards in this respect not
only remove the need to decide these questions repeatedly, but also help to understand the way a given ship is defined.
As an example, the principle for defining a typical deck can be to define the +y half, which is then made symmetric, or one can define a symmetric
owner surface, from which the deck is restricted in a single operation (as is recommended).
Another example is provided by a deck containing vertical steps. The simplest possibility is to define it as a single surface object, but probably,
one wants that the vertical parts belong to the bulkheads rather than the deck. The deck will then be formed by separate parts. Even then, one
can specify that the bare deck surface is defined as one (i.e. including the steps), because it will be useful when making deck plans.
If a bulkhead is formed so that it is difficult to define a single owner surface, one can either define a combined owner surface or define the
bulkhead as a combined surface object or define the bulkhead in separate parts. The following figure gives an example of this problem:
In this context, a parametric curve means a curve defined by dimensions such as breadths and radii, rather than coordinates of points. The
dimensions may refer to a given curve, called reference curve. The following figure illustrates a simple case:
Writing the syntax for the parametric curve can be avoided by using the so-called sketch tool. The sketch is simply a polygon that indicates the
structure of the result and initial values for the parameters. From the sketch, the actual definition is created according to the rules presented
below.
The sketch is entered in a similar way as the definition above. The example could have been originally created by the following sketch:
SO PDEMO; X 50
LIMITS Y>0, Z>0,
PPOL=I,
(0.79 3.16) (1 0.89) (4.46 1.04)
Parametric curves are presently available for defining surface objects, where the reference curve is the part of the boundary derived from limits
defined the normal way or the boundary of a hole. The definition corresponding to the example is
SO PDEMO; X 0
LIMITS Y>0, Z>0,
PCUR=((>B, S=4, N), (>B, D=1), R=1, (>L,D=0.9), R=0.4,
(>L, N, S=3))
Any LIMITS, ADD or RED part may contain a parametric part. A special case is a contour wholly defined by a parametric definition:
SO PDEMO2; X 50
LIM Y>0, Z>0, Z<DECK, Y<10
RED PCUR=((RIGHT),R=0.4,(>R, D=1.3),R=0.4,(>B, D=1.4),
R=0.4,(>L, D=1.9, L=3),R=0.4)
Occasionally there may be the need to refer to a surface that does not occur among the limits. This can be done by including the surface in the
LIMITS (or ADD/RED) command with the option REF:
The intersection with the surface given by REF is generated an made available as reference with syntaxes presented below.
The resulting objects differ in no way from other surface object except for function specifically treating the parameters. For this purpose there are
the GMT service functions presented under editing. These functions include plotting but plotting can also be done with the command
Direct definition means using the syntaxes presented above, rather than using a sketch.
Presently, this part has mainly been developed as far as to support definitions produced by the sketch tool. Use of the direct definitions is possible
but little attention has been paid to ease of use. The segments must be defined in a specified order and care must be taken to select between the
forward/backward aspect of directions. For example, for a vertical segment the correct choice must be made between UP and DOWN.
The parametric definitions have been primarily developed for surface objects in a coordinate plane. The definitions should also work in a general
plane. Usage with more general owner surfaces has been tentatively implemented as presented below.
Any part of the definition (LIMITS, ADD, RED) may contain a parametric part but the most common cases expected are the LIMITS command or
as an independent definition in the RED command. Multiple holes within the same contour should work but otherwise repeated parametric parts in
the same object may not work.
The parametric curve is treated as formed by a set of segments with optional fillets at the connections. The parametric limit is given last (note!) as
the property PCUR, the value of which is a list of segments and radii:
In this case there must be other limits preceding the parametric part and the result is supposed to be formed by the combination of these limits
and the parametric curve. As presented below, the parametric curve may also create a hole in which case the other limits only have the role of
reference curve.
The basic segment is formed by a straight. In addition some segments can be defined as arcs as presented separately below. The following
concerns straight segments.
A segment is defined by one or several parameters and the general form of the segment definition is
(ref,par1,par2...)
'ref' tells what element the segment depends on. It can be omitted if there are no dependencies or it may be given locally to a given component.
The definition of a segment can specify it more or less completely while leaving some aspects depending on the adjacent segments. For example,
the extension of the segment may be derived from the neighboring segments. In the extreme case, the segment has no own parameters, in which
case it simply connects the ends of its neighbors and is represented by the dummy definition (C).
The error message 11850, 'parametric curve could not be constructed' is most likely the result of insufficient parameters. An over determined
curve will normally come out simply ignoring some parameters.
The order in which the segments are entered is relevant. They should be defined in the correct mutual order, beginning at the first and ending at
the last part of the reference curve. See below for the order of the parts in the reference curve.
If the reference curve is closed, the object will be generated at the side that satisfies this rule as illustrated by the following example:
SO LEFT; X 0
LIM Y>0, Y<10, Z>0, Z<10,
PCUR=(R=0.5,(>B, SE=3, UP),(>B, DR=2.2),(>U, SS=7, UP))
SO RIGHT; X 0
LIM Y>0, Y<10, Z>0, Z<10,
PCUR=(R=0.5,(>U, S=2, DOWN),(>B, D=2),(>B, S=6, DOWN))
12.4.3. Reference
The reference indicates the element on which the current segment depends on. It can be given as an independent item at the start or as an
addition parameter to the property it belongs to (e.g. direction). The latter alternative must be used if there are references to more than one
element (e.g. position defined independently of the direction).
The symbols P and N have been reserved for referring to the preceding and next segment respectively but not implemented.
The basic way of designating the parts of the boundary is by referring to the side in the main coordinate directions: left (L), right (R), upper (U) or
bottom (B). Two symbols can be combined so that, for example, UL (upper left) refers to a part with an inclination between those of a pure left
limit (90 deg) and an upper limit (0). The directions are valid as seen when plotting the object in its own plane and with the positive horizontal axis
pointing right. The following figure illustrates the selection:
SO SIDESDEMO; X 0
LIM Y>0, Y<10, Z>1, Z<PL11, Z<PL12,
PCUR=((>B, SE=1, N),R=0.25,(>LU, D=1),R=0.25,
(>UR, D=1.5), R=0.25,(>B, SS=1.5, N))
Parts of the boundary can be designated by an index (first=1, second=2, etc). The parts of the boundary correspond to different surfaces in the
LIMITS command in the order they appear in the resulting geometry where they occur with clockwise rotation.
In case of closed limits, the numbering starts from the upper left corner as shown in the preceding figure.
Indices can be used when it is difficult to classify the side the terms above.
12.4.4. Direction
The direction of the segment is implied by the other components of the definition in the following cases:
In the remaining cases, the direction must be defined explicitly in one of the following ways:
The direction can be modified in the form N+corr where 'corr' is a change to the basic direction. For example, UP+10 means 10 degrees more
than the UP direction, i.e. 100 degrees.
Presently, the generation of the shape requires that not only is the angle correct but also the direction in the sense of backward or forward.
Therefore, the direction is included in symbols LEFT, RIGHT, UP or DOWN. Similarly, if the angle is given directly, the correct alternative from the
whole range 0...360 (or -180...+180) has to be selected.
The alternatives P and N usually work correctly as such. However, if P refers to the opposite side, it must be given as PR. See the example below
for the similar case DR with distances.
The way the angle is presented graphically depends on how it is defined. For example, 80 or UP-10 would give the same geometry but the
graphic presentation of the angle will be different.
The position can be defined by absolute coordinates. This alternative normally implies the direction and therefore the distinction between
backward/forward must be made.
(ref, D=d)
This is well defined in the case that the referenced element is straight and it implies also the direction of the segment.
If the S option has been given in addition to the distance, it defines a point on that element from which the distance is measured.
The case that the part is not straight has own notation:
(ref, DO=d)
With this notation the segment will be an offset from the boundary. The distance will be constant also with curved boundaries.
The position can be defined by a point on the boundary. The definition must refer to an element of the boundary using the concepts presented
above (>B, >L etc). The point is expressed by the distance from a reference point that can be either
By default, the distance is expressed as the length along the boundary. With the additional option U or V, the distance is interpreted as the
horizontal/vertical distance to the reference point.
The keyword for this case, i.e. a point on the boundary, is formed by the symbol S followed by the selection of reference point and optionally the U
or V option. Examples:
In the other cases, the distance is given positive but in the SA case the sign separates points before and after the reference point.
A point defined this way will always be on the line containing the segment. The bare S option, together with the reference defines start or endpoint
of the segment, for example
This definition makes the parametric curve start at a point 3m from the end of the bottom segment.
Points on the boundary can also be defined for giving a direction to the segment rather than defining a point on it. This is expressed by the option
TO and FROM:
TO=(ref,ss=l), FROM=(ref,ss=l)
TO defines a point after the segment and FROM a point before it.
SO EXAMPLE1; X 0
LIM Y>0, Z>0, Z<PL10,
PCUR=(R=0.7, (>B SE=7, N) (>B D=1.8),
(FROM=(>B,SE=5.2) TO=(>U SSU=2)),
(>U D=2), (>U, SS=5.4 UP))
12.4.8. Length
By default, the segments are bounded by the intersection with the surrounding elements and the length is a derived property. The length can also
be given explicitly with the L option:
L=l
The length given this way is measured along the segment. A horizontal or vertically measured length can be given as LU=l or LV=l.
SO EXAMPLE2; X 0
LIMITS Y>0, Z>0,
PCUR=((>B, SE=7, N+20, LV=3),(C),(>L, SS=7, –20, L=3))
The definition is otherwise symmetric but the length at the start is measured vertically.
The length implies the position of the neighboring element which consequently should not have the position fixed. If it does, the L option overrides.
A segment that is completely defined by the surrounding ones can be given by the dummy definition
(C)
(C=connect).
12.4.9. Examples
SO DEMO1; X 0
LIM Y>0, Z>0, Z<PL10,
PCUR=((>B, N, S=4),R=0.3,(>B, P, D=1),R=1,(>L, P, D=1),R=1,
(>U, P, D=1),R=0.5,(>U, V, S=3))
SO DEMO2; X 0
LIM Y>0, Z>0, Z<PL10,
PCUR=((>B, N, S=5),R=0.5,(>B, P, D=1.1, L=4),R=1,(C),R=2,
(>U, P, D=0.6, L=3),(>U, N, S=5))
An object that is not included in the limits may still be made available as a reference for locations or angles. In the LIMITS command, the object is
added with the REF option:
where 'name' is the name of the referenced object. When forming the object, the intersection between the owner surface and the auxiliary surface
is generated and clipped so that it is inside the actual limits. Presently only one auxiliary curve is supported.
The auxiliary object works in most case as the normal limits. References to the auxiliary object are expressed with the syntax >A. Lengths along
the auxiliary objects are measured as usual from the start or end. For example,
(>A D=1.5)
Points on the boundary can be measured from the auxiliary reference curve using A as the reference point. For example,
(>B SA=1.2)
means measuring along the bottom the distance 1.2 from the intersection with the auxiliary surface. In this case, selecting B rather than any other
part of the reference curve has no influence. The sign of SA is relevant.
SO EXAMPLE9; X 0
LIMITS Z>0, REF=PL21,
PCUR=((>B, SA=-3, N+30),(>B, D=3),(>B, SA=4, –30))
Curved parts of the result can be created as fillets between the segments. With the R option in the segment definition, a segment itself can be
defined as an arc of circle. The radius of the arc may be given or implied by other conditions.
This has presently been implemented only partly and the most important restriction is that the curved segment must have straight parts as
boundaries; therefore, two arcs must not follow each other. At the ends, the definition of the start/end point must imply a straight as presented
below.
A circle with the radius given and one end fixed may imply the location of the straight at the other side; otherwise the bounding straights must
follow from other components of the definition. The bounding straights may or may not have the length (and consequently the endpoints) fixed.
This determines how many degrees of freedoms there are left for the arc. If the radius and both endpoints of the arc are fixed, the arc is
completely defined by this. Otherwise, tangency is implied at one or both ends:
Radius given
With RN instead of R in the definition, the end conditions are modified so that right angles are created. The following combinations are supported:
Radius given
One end fixed right angle at this end, tangency at the other
The sign of the radius is relevant. Most arcs will have the same general rotation as the boundary (clockwise) and the radius is entered positive.
The first or last segment may be an arc provided that the segment definition includes the S option (or SS, SE) by which the start point is fixed. If
an angle is added, it defines the tangent of the circle and if none is given, N is implied. For example, the following defines a parametric curve
starting with an arc at right angles to the boundary;
A hole can also be defined by a parametric curve. If the parameters rely on the same limits as the main part, the RED command can be given with
the PCUR part only:
SO ...
LIM ...
RED PCUR=(...)
If the hole depends on own limits, the limits must be given in the RED command:
SO name ....
LIMITS ...
RED lim1, lim2, PCUR=(H, ....)
The H option is needed to distinguish this case. The limits do not need to be closed but they must be connected (so that the section contains a
single branch). Note that in this case only the given limits are used for referencing.
The sketch stage works similarly. The H option is given as PPOL=IH. If the given polygon is not closed, it is closed automatically.
Creating parametric curves is supported by the sketch function. The sketch is simply a polygon that roughly describes the result. Using some
heuristic rules the definition logic and the corresponding dimensions are derived from the sketch. The result is recorded as segment definitions in
the form described above.
The polygon is not reconstructed literally but treated as an approximation from which a definition with typical engineering properties is created.
The following adjustments are made:
With some likelihood, the resulting definition has a structure that matches the designer's intentions but the measures may not be correct. These
are, however, easily changed and for that purposes functions are provided for displaying and changing them.
The equivalent definition is available in the syntaxes presented above and the structure of the definition can be changed by modifying this
representation.
Defining a surface object from a sketch is similar to the definition presented above:
SO...
LIMITS ... PPOL=((u,v),(u,v),...) or
SO ...
LIMITS ... PPOL=I,
(u,v), (u,v), ...
The sequence of points (u,v) represents the sketch. The first form maintains the definition in the original form and is mainly intended for test
purposes.
The latter form records the interpreted definition and a later DES will show it with PPOL replaced by PCUR. The polygon is saved and displayed
as a comment in DES.
The points (u1,v1), (ua,va), (u2,v2) define an arc of circle that indicate the desired result.
The parameters TOL and ATOL are used for deciding whether elements are parallel, vertical or horizontal. The tolerance is always at most ATOL,
but if the error along the length of the segment is greater than TOL, the tolerance is reduced accordingly. The default value for TOL is adapted to
the size of the object. For a square 10m*10m it is 0.5.
The parameters NTOL, QTOL control decisions when a measure may be placed where the extension of a segment intersects the boundary. The
first criterion is that the boundary must be closer to the segment by the fraction QTOL of the segment length. The second criterion is that the
segment is roughly perpendicular to the boundary so that the direction differs at most NTOL from the normal.
When combining the polygon with the limits, the polygon must intersect the limits in two points. Segments wholly outside the limits are dropped.
When making a hole with RED, the polygon must not intersect the outer boundary. However, if it does, an attempt is made to create a notch
rather than a hole, but this is presently an unofficial function.
A typical parametric definition does not rely on absolute coordinates and it can therefore be copied unchanged to another similar place. If limits
are referred to by indices, the number of limits should match.
An analogous but reflected definition requires some changes concerning among other things the order between segments, angles and references
to the sides. This can most easily be done by adding an instruction for this purpose at the start of the definition:
REFV means reflect around the vertical axis. REFU reflects around the horizontal one and REFUV both. The following figure illustrates this:
In the example, the definition is primarily made for the object in the upper right corner while the other parts are reflected as indicated. Showing
only the PCUR part, the definition for the original object and the REFV version are:
PCUR=((>U,SE=1,DOWN,L=0.5),(C)), (>R,SS=1.4,L=0.7,RIGHT))
DES will show the original definition. When using GMT.EXTRACT, there is the option to apply the reflection in the result rather than showing the
reflection option (option E). GMT.PCURVEPAR handles only the final result.
To use the same PCUR definition as it is in another SO, syntax (->NAME) is available.
In the above example, the objects are defined with the following syntax:
SO TEMP; X 80
LIM Y>0, Y<2, Z>0, Z<2,
PCUR=((>U, SE=0.2, N-20),R=0.1,(>U, DR=0.5),R=0.1,
(>U, SS=0.2, N+30))
SO TEMP2; X 85
LIM Y>0, Y<2, Z>0, Z<2,
PCUR=(->TEMP)
SO TEMP3; X 90
LIM Y>0, Y<2, Z>0, Z<2,
PCUR=(->TEMP)
Editing parametric objects is supported within the GMT framework. When such an object is opened with GMT.EXTRACT, the symbol PCUR
represents the parametric limit in the record containing the limits.
The actual definition is stored in record 16070+I so that each segment is represented by its definition in text form. I is the number of the
corresponding LIM/ADD/RED record within the definition (LIM=1, first ADD/RED=2 etc, 4 less than the record number of the corresponding record
in the expansion description). The radii are stored separately as rec. 16170+I.
The REFU, REFV or REFUV option is recorded as an additional element last (note) in the record 16070+I.
In a definition using PPOL, PPOL replaces PCUR in the limit record and record 16070+I contains the points in the point syntax. Options (e.g. R=r)
can be given in record 16170+I.
This presentation is not complete and covers only the information needed for changing parameter values, not modifying the structure.
The function GMT.PCURVEPAR produces a list of parameters used in a given object. The result is stored in a description containing one record
17000 for each parameter, containing
4...7 : two points, u1,v1,u2,v2 indicating where the parameter can be measured
In the case of an angle, u2,v2 give the angle range for radius vector when drawn from (u1,v1).
In the case of distances, the two points represent places where a dimension line can be plotted.
In the case of a radius, the first point represents the center and the second one a point on the middle of the fillet.
The GMT.PCURVEPAR function contains an option for plotting the parameters. The parameters are flagged in the output by identifiers on three
levels as follows:
1 : PCUR
2 : name of object
The unrounded parametric curve is also available. The result description can be used as a curve when plotting.
Note: the set of parameters included and consequently the index depend on the options when calling GMT.PCURVEPAR.
Note also: GMT.PCURVEPAR always returns the parameters as they appear after the application of possible reflections. When used in
combination with GMT.EXTRACT, the option E must be given so that its result is analogous.
The function GMT.GETPSEGMENT returns the parameters of a segment in a form where the different items are extracted from the syntax. The
parameters can be modified and then restored with the reverse function GMT.SETSEGMENT. However, for the simplest case, i.e. modifying the
value of a single parameter, the operation can be made shorter with GMT.UPDSEGMENT.
In the value of angles and radii, the sign is relevant but one may want to show the absolute value to the user. At replacement, the original sign
should be transferred to the value.
The function GM.TYPE with option P tells whether the given object has a parametrically defined part.
In order to do more complex changes, the parameters of the segment can be fetched with GMT.GETPSEGMENT(edescr,part,segnr,work), where
'work' is a description provided by the caller. After editing 'work', the segment is updated by GMT.SETPSEGMENT(work,edescr,part,segnr).
The syntaxes can be opened with the function GMT.GETPSEGMENT. The result is returned as a description containing three records:
Note that for a simple update case, there is a shortcut provided by GMT.SETPSEGMENT.
The following table presents the parameters as stored in the result of GMT.GETPSEGMENT.
The GMT.SETPSEGMENT function performs the reverse function, i.e. updating the expanded definition when parameters have changed.
Changing parameters can be done by modifying the input description or (for a single parameter) include the change as additional parameters.
Parametric curves can also be used in inclined planes and facet surfaces.
An owner surface formed by an inclined plane works in most respects as a coordinate plane. When interpreting directions and sides, the
interpretation is done as for the coordinate plane that is closest to the given one. Note carefully that this decides the interpretation of left, right,
upper, lower. Dimensions are applied as measured within the plane. When entering the shape as a sketch, it is interpreted as given in the
corresponding projection.
The following example shows an identical definition applied in a straight and inclined plane:
SO TESTPL0; X 0
LIM Y>0, Z>0,
PCUR=((>B, SE=6 N, L=2), R=0.4, (C),R=1,(>L, SS=6, N, LU=3))
SO TESTPL1; IN PL1
LIM Y>0, Z>0,
PCUR=((>B, SE=6 N, L=2), R=0.4, (C),R=1,(>L, SS=6, N, LU=3))
The parametric curve can occur in the RED command and occasionally in the LIMITS command. If the command contains other limits than the
parametric curve, these form the reference curve as in an unrestricted plane. If there are no such limits, the facet itself forms the reference curve.
In the latter case there is the problem to decide what facet the dimensions refer to. When interpreting a sketch, this is implied by the polygon. In a
direct definition, a point must be given that is inside the selected facet. The point is given by three coordinates and applied in the projection
closest to the facet in question. The point is given at the start of the definition with the syntax
>(x,y,z)
SO TESTFACS; IN BH1.S
LIM PCUR=(>(13,6,6.5),(>B,SE=8.94,N,L=3), R=0.1, ©),
R=0.1, (>L,SS=7,N,L=5.59))
*** PPOL=I,
(-5, 7),(5, 7),(8, 3),(8, -3)
Without this selection, the parametric curve will be applied to all facets.
A sketch is interpreted as entered in the projection corresponding to the overall orientation of the surface.
12.11. Examples
SO WEB_COT70_C; X #WEB70
LIM >LBHD_S, Z>INNERBOTTOM, <DECK, <LBHD_P,
PCUR=((>B, SE=9.05, N),(>B, D=0.1),R=3,
(FROM=(>B, SE=7.5), TO=(>L, SS=7.5)),R=3,(>L, D=3.1),
R=2.5,(>B, DR=10.92),R=2.5,(>R, D=3.1),R=3,
(FROM=(>R, SE=7.5), TO=(>B, SS=7.5)),R=3,(>B, D=0.1),
(>B, SS=9.05, N))
RED PCUR=((>U, SE=2.6, DOWN, L=12.48),R=2.5,(LEFT),R=2.5,
(UP),R=4.5,(>R, SS=2.1, RIGHT, L=18.6),R=4.5)
SO WEB_COT70_P; X #WEB70
LIM >LBHD_P, <DECK, <INNERSKIN_P,
PCUR=((>L, SE=6.2, N),(>L, D=0.1),R=2.5,
(FROM=(>L, SE=5.1), TO=(>U, SS=5.1)),R=3.5,
(>U, D=2.2),R=3.5,
(FROM=(>U, SE=5.2), TO=(>R, SS=5.2)),R=3,(>R, D=0.1),
(>R, SS=6.7, N))
SO WEB_COT70_S; X #WEB70
LIM <LBHD_S, <DECK, <INNERSKIN_S,
PCUR=(REFV,(>L, SE=6.2, N),(>L, D=0.1),R=2.5,
(FROM=(>L, SE=5.1), TO=(>U, SS=5.1)),R=3.5,
(>U, D=2.2),R=3.5,
(FROM=(>U, SE=5.2), TO=(>R, SS=5.2)),R=3,(>R, D=0.1),
(>R, SS=6.7, N))
SO WEB_COT68_2_C; X #WEB68
LIM >LBHD_S, Z>INNERBOTTOM, <DECK, <LBHD_P,
PCUR=((>B, SE=8.35, N),(>B, D=0.1),R=4.3,
(FROM=(>B, SE=6.65), TO=(>L, SS=6.65)),R=3.5,
(>L, D=2.4),R=4.8,(>U, D=2.1),R=4.8,(>R, D=2.4),
R=3.5,(FROM=(>R, SE=6.65), TO=(>B, SS=6.65)),R=4.3,
(>B, D=0.1),(>B, SS=8.35, N))
SO SW68_P; X #WEB68
LIM >LBHD_P, Z>INNERBOTTOM, <DECK, <INNERSKIN_P,
PCUR=((>B, D=16, N),(>R, D=0.1),(R=5.9),(>B, D=10),R=5,
(>L, D=2.6),R=3,(>U, D=2.6),(R=5),R=0,(>R, D=0.1),
(>R, SS=7.6, N))
SO SW68_S
REF SW68_P
SO DK1_FO; Z 5
LIM X>#100, X<#110, <HULL,
PCUR=((>L, SE=1, N),(>L, D=0.1),R=0.1,
(FROM=(>L, SE=0.7), TO=(>R, SS=2)),R=2,(>R, D=0.2),
(>R, SS=4, LEFT))
Table of Contents:
Command MC (=modify curve) gives access to a command environment where various operations can be done on curves. This subtask was
initially introduced in order to support testing of some internal functions, such as translating or re-scaling a curve. It is not supported as a main
function of the system, but made available in order to allow various special things to be done.
Usually, these functions are only concerned with the geometric shape, and other aspects are only partially taken into account. Thus, the result
does not always have the status of a definition curve, for which, for instance, the DES command can be used. When using the DES command on
a curve modified in the MC task, the commands that have produced it are listed as comments, to give some information.
When starting with a curve that must not be destroyed, it is recommended always to begin with the RENAME command. A modification can be
cancelled with command CANCEL. Simply leaving MC leaves the modification in the run time memory.
The current curve can be plotted with PLOT (no parameters). The AUTO command given outside is valid for automatically drawing the changed
shapes. The colour, projection and other aspects can be changed by the normal commands.
In the following, some functions are briefly presented. For more information, see the command explanations.
Command TRANSLATE moves a curve given distances in the coordinate directions. RSC (re-scale) changes its size, optionally with different
factors in the different coordinate directions. Reflection is obtained by using a negative factor. In the following example, the thick/black curve is the
original one. The curve is a frame.
TRANSLATE 0 12 3 (right)
RSC (1 -2 1) (left)
1.1.2. Rotation
A rotation is done by first defining the axis with command AXIS and then doing the rotation with command ROTATE.
Example of rotations:
GET FRA
RENAME TTT
AXIS (22, 0 0)
Z
!DO 'ROTATE 22.5' 31 @@ AUTO set outside
An offset curve is formed by moving the points of a curve a given distance at right angles to the curve. The sign of the distance is relevant. The
curve must be a principal plane curve. This is done bycommand PTR (parallel translation):
Command COMBINE combines curves, so that the curves are combined at their intersection points. What parts are taken depend on the direction
of the curve. The direction can be changed with command TURN (the current curve) and with prefix < (the operand curve). The curves may be
closed, but the logic is not dependent on this.
The ADD and REDUCT command work specifically on closed curves, forming the union or difference.
GET TT3
ADD TT4 (middle)
GET TT3
RED TT4 (right)
In the form ADD *; the ADD command works so that the branches of the current curve are combined mutually.
Example:
The text 'DEMOSHIP' is made into a curve named TEXT, located in the plane y=10, starting at x=40, z=6, having height 2.
The REF option must be added if the text otherwise would be viewed from the backside in the projection to be used.
The FILL option is relevant if there are letters having holes, for which there are two versions, one of which is designed to work with filling. With this
option, the version used for filling is selected.
3. Command GENERATE
The definition command GENERATE creates an object by performing an operation on existing objects. The result is a self-contained object, with
no permanent dependence on the operand objects. This means that it will remain the same until the definition is repeated, even if the operand
objects are changed. The result may be a curve or a surface, depending on the operation.
The DES command can be applied on the result, returning the GENERATE command by which it was created. The result of DES begins with a
command corresponding to the object type in question (CUR or FCS), and should not be used when re-entering the definition. If the result is a
curve, option ! in the DES command gives the result as an equivalent curve definition (optional feature).
where 'name' is the name of the result and 'operation' the instruction by which the object is created.
The option ! is needed if an object of different type and the given name exists. A short description of the object can be added by the option
DES='description in apostrophes'.
The syntax
object/axis=q
gives the intersection between the given object and the coordinate plane given by 'axis' and the coordinate 'q'.
The result is a curve. If the curve is closed, it can be treated as a surface by giving option S.
Example:
The syntax
object/surface
gives the intersection between the given object and the surface.
In most cases, the surface must be a plane or a facet surface, but if 'object' is a patch surface, the intersecting surface can also be one.
If the object is a room, the result is a facet surface, unless option C is given. In other cases, the result is a curve.
Example:
By adding prefix *, a plane curve is interpreted as the cylinder having the curve as base curve and axis=the coordinate axis corresponding to the
curve plane. The following example uses a curve created by the FTC command, placing the letter N at the bulb:
The following example illustrates the difference between intersecting the volume or walls of a room:
If the first case, the volume is intersected and the result is a surface, in the latter case the walls, and the result is a curve. Instead of C, the prefix *
can be used as in the PLOT command, i.e. BOX/*TTOP. In the example, the box extends outside the surface on one side only - therefore there is
no intersection with the wall on the other side.
The keyword defines the type of the limitation. The alternatives differ in the way the limits are expressed, what kind of surfaces are allowed, what
is the type of the result and what is the generation method. The following keywords are available:
LIMIT A surface object is internally generated, but the result is expressed as a facet surface. The limits are given exactly as in the LIMITS
command in the definition of surface objects.
TRIM A trimmed patch surface is calculated from the patch representation of the original surface.
With the keyword LIMIT the limits are given with the same syntax as in a room definition, using explicit axes. For example, the following command
generates a facet representation of the part of the hull between x=12, x=33 and under the inclined plane PL1:
With the keyword TRIM the result is stored as a patch surface, otherwise a facet surface. If the original surface is a patch surface which is
converted to facet surface, the accuracy can be controlled with option TOL (default 10*GMTOL).
One application for this function is to generate parts of the hull with different plating thickness for weight calculations. Note that restriction in one
direction can be done in the AREA and CGA functions of the calculator.
If the keyword TRIM is given and the original surface is a patch surface, the result is a so-called trimmed patch surface, described in more detail
below. In this case, more general surfaces than planes can be used.
A more general way of restricting surfaces is formed by so-called trimmed patch surfaces. As far as the command is concerned, there is little
difference with respect to the function described above: there is the TRIM keyword and the operands can be of more varied types.
Although the function is primarily created for patch surfaces, it can be used for other surfaces also: the operand is converted to a patch surface
when needed. Only grid surfaces cannot be used.
The restriction is expressed by a combination of the following syntaxes (same as in room definitions, also transformed objects can be used e.g.
HULL(x+0.1,z-0.1)):
<name, >name inside or outside of the given surface, e.g <HULL> or a curve lying on the untrimmed surface
axis<q, axis>q at the given side of a coordinate plane, e.g. Z>21, X<#15, Y>1
There is no reflection option, therefore HULLF-SB has been made to give the reflected side: SUR HULL-SB; COMBINE HULLF(Y/0).
The surface generation can be defined so that the operands can be restricting surfaces and part of the result at the same time. This alternative
differs from the preceding one in that all surfaces have a limitation syntax. A surface that is a limit only is entered in parentheses. The following
examples illustrate the difference.
The option TOL=tol controls the accuracy by which boundaries of the trimmed parts are generated, default=GMTOL (can be changed by !TOL).
An orientation is automatically selected for the result but at need it can be set with the option OUT. The alternatives X, Y, Z, R (=reversed), or
name of a surface that defines the direction are available. The preceding minus sign indicates the opposite direction.
The DEBUG option can be used to check the trimming process. It is shown how the trimmed region is obtained from the participating surfaces .
Tasks that are not well defined are more easily detected. The following alternatives are available:
Trimmed surfaces can be intersected and trimmed as the normal patch surfaces. The surface is drawn on patch a time, the definition curves are
not plotted. The direct SB-link can be used, and the surface can be transferred into VDAFS (version 2.0). Offset surfaces cannot be created from
the trimmed ones. Trimmed surfaces cannot be used in the transformation task.
The generation of trimmed patch surfaces is a very demanding function and there is a relatively high risk for geometric failures. It is estimated that
the following reasons are the most likely ones:
the participating surfaces meet at patch borders. This can often be corrected by making a slight change to some limit. A transformation of
the limiting objects can be defined directly in the GENERATE command. For example, the command GEN HULLA2 TRIM HULLA
<SKEG(z+0.001); could be used.
the trimming surface ends in the middle of the trimmed one and the result is ill defined. This can be corrected by extending the relevant
surface.
SURFACE name
TRIM trim-specification
where 'trim-specification' defines the trimming as in GENERATE. The essential difference with respect to GENERATE is that this definition is
subject to the normal change management while GENERATE (as always) creates an independent object.
If one wants to use a function implemented for facet surfaces only, a general surface can be converted to a facet surface with the command
According to the general principle of the GENERATE command, the result is a self-contained object. This form can therefore be useful in some
cases even if the object initially is a facet surface. Thus, when applied to a surface object, the result is a surface without the normal connection to
the objects from which it was formed.
Cylinders, double cylinders, rotation surfaces, cones and pyramids, and general facet surfaces can be represented as a set of polynomial
patches. In the spline mode of the curve definition, generation of the patches makes use of the spline representation of the base and the
generator curves. Otherwise the connection between the facets and the patches is one to one. Explicitly closed facet surfaces are for the moment
not supported, but the ends can be added by trimming the resulting patch surface with planes.
The following example shows the patch representation SP of a double cylinder S. Note that the structure of the nine patches is determined by the
definition points of the base curves C1 and C2. The definition points are marked with circles. There are three spline segments in both of these
curves.
This function is an optional feature, available for patch surfaces only. The syntax is
surface/id=q
'id' designates the type of curve and 'q' is the constant value for the quantity in question. The alternatives for 'id' are
M mean curvature
G gaussian curvature
Example:
The curve CX0 gives the points where the curvature of the x-section is 0, which includes points of inflexion.
For just checking the result graphically, use the PLOT command directly.
Offset surfaces are created by moving the points on the parent surface by a given distance along the surface normal. The parent surface can be a
patch surface, a facet surface or a combination of these. The resultis always in a form similar to the patch surface. The offset surface is created
by
'name' is the name of the resulting surface, and 'surface' the name of the initially given surface. 'distance' is the distance the given surface is
translated. Its sign is relevant - a positive sign means translation to the outside, a negative sign to the inside.
The function is implemented with the restriction that the element structure of the given surface can be maintained. The following figure
illustrates this restriction:
Example of allowed/not allowed offsets. The larger offsets are not allowed because the curved element
disappears
The shape of a wave, as used in the calculations, can be made available as a geometric object by the command
'wave-name' is the name under which the calculation wave has been defined and 'name' the name of resulting object (may be the same). 't' gives
the mean draught corresponding to the wave. The optional parameter (n) makes a more economical surface taking only every n:th point of the
initial wave shape. (The parentheses are part of the syntax).
where 'name' is the name of the result, 'hull' the name of the hull surface and t the draught by which to intersect the hull. The surface height of the
surface is from z=0 to the higher one of the given surface and 2*design draught. With option S, the symmetric part is added.
The command
creates a combination of two or more surfaces. It differs from the normal definition by SURFACE ..; COMBINE ...; in that the result is a
stand-alone object, not affected by later changes in the operands and useful even if the operands are not available. This option was originally
introduced in order to support parametric macro objects (see below).
Transformations can be applied to operands in the same way as in the standard COMBINE command.
The minimum or maximum of a curve set can be generated with options MIN or MAX:
where 'name' is the name of the result and 'curve1', 'curve2' etc. the list of curves. 'axis' is the direction in which to take the maximum, X, Y or Z.
The first curve must be a principal plane curve and the result will be a curve of the same type. Example:
In the case of surfaces, the boundary is a combination of those patch edges that define the outer limit of the surface.
In the case of surface objects and facet surfaces, the boundary is a collection of the facet boundaries.
The feature has been implemented for the purposes of the FEM link, but it is available here independently also.
From a patch surface, a partial surface can be made by collecting separate patches. At the same time, or instead of this, larger patches can be
divided into several smaller ones. This case is distinguished by the P option:
The result 'name' contains the patches selected by one of the following alternatives:
P=i patch i
The option to subdivide patches has been added in order to provide a way to overcome some problems with patch surfaces. E.g. the combination
of an extremely small GMTOL and a very curved patch may result in missing curve segments. It is also possible that the local minimum obtained
by the calculator function DIST is not a global one if the patch is too complicated. The accuracy of offset surfaces may be better when there are
Geometrically, a subpatch is exactly equal to a part of the original patch. The whole surface may be subdivided, P=(ALL/n), or the critical parts
only, P=(ALL,i/n,...).
In the following example, the transom is made into an own surface, of which one patch is subdivided. The plot of the original surface, showing the
patch numbers, is done with
ID PN
PLOT HULLA E
Example of subpatches:
This paragraph describes numeric objects defined by calculations directly. Their primary purpose is to provide a shortcut for calculations when the
geometry is not available the normal way, but sections can be digitized from a drawing or read from a file.
The CSC command gives a set of curves forming the calculation sections. The difference between SURFACE and ROOM is that the section for
SURFACE are supposed to be typical hull section, describing half of the hull, while the sections for ROOM are supposed to be complete.
ROOM BJHULL
CSC TAB*BJDATA
where BJDATA is a table containing Bon-Jean data according to the following specification:
The table should contain frame areas as function of height stored in a set of columns formed by either Z A A A or Z A Z A ... where Z=column
containing z-coordinates and A a column containing frame areas (note: whole, not half areas). The second form must be used if the different
curves have different z-arguments.
The quantity of the columns must be Z for the z-arguments and AREA for areas. The name of the column begins with Z for z-values and A for
areas. For columns specific for a given x-coordinate, the initial letter is followed by the coordinate, for example, Z10, A10, where 10=the
x-coordinate.
NEW TAB*BJTAB
COL, Z
COL, A66.5=AREA
COL, A71.1=AREA
COL, A75.7=AREA
COL, A80.3=AREA
COL, A84.9=AREA
Original sections (thin lines) and the calculation sections of the test object.
At 6 m, the volume of the test object is 776.0 compared with 779.7 of the original.
This type of object can be used in calculations and plotted as calculation sections (PLOT CSE ...). If the source table is changed, the definition
(ROOM ...; CSC ..) must be re-entered to get the changes into use immediately. The sections are generated so that they give the correct frame
areas, but are not optimized from the smoothness point of view.
A parametric macro object is defined in the DEF task by the command PMO:
where 'name' is the name of the resulting object, 'macro' is the name of the macro and 'parameters' the set of parameters transferred to the
macro.
The macro is in all respects a normal macro with parameters. Thelast object defined represents the result. Its name is not relevant: the result
obtains the name given in the PMO command. The macro may define other objects if needed in the definition of the result. None of these objects
will remain after the macro has finished.
As a simple example, the macro CUBE generates a cube with a given size and location. The following example creates an object MYCUBE with
side=1, and the location at (5,0,3):
@@ parametric cube
@parameters(l=n,x=n,y=n,z=n)
@@ l: length of side
@@ x: x-coordinate of midpoint
@@ y: y-coordinate of midpoint
@@ z: z-coordinate of midpoint
@l2=l/2
CYL CUBE
Z @Z-L2
XY <> (@x-l2,@y-l2) (@x+l2,@y-l2),(@x+l2,@y+l2),
(@x-l2,@y+l2) (@x-l2,@y-l2)
GEN Z @l
CLOSE
The DES command applied to the object gives the definition as given (i.e. PMO ...). With the parameter !, the definition created by the macro is
shown.
The defining macro should be provided with notes and comments explaining its usage. These can be listed with the command
which lists the notes and parameters. If the parameters are explained in the macro as in the example shown above, the listing shows the
explanations also. For the explanations to be found, the name of the parameter must be followed by : or = and they must not be separated from
the @PARAMETERS statement by other lines than comments and empty lines. See also the service function AI.PARAMETERS(), which can be
used for any macro obeying the conventions presented above.
The object created by the macro may depend on other objects created by the same macro, and these auxiliary objects will be removed after
completing the definition. Dependences on other objects will not be recorded for others than those directly referenced by the result. The resulting
object must be an independent one, i.e. not requiring the object administration. Thus, a combined surface cannot be made with the SURFACE
command, but can be done using the suboption COMB in GENERATE. If the macro creates a general surface, preparation is done automatically.
A reference point defines a named location (x,y,z) in connection with an object. Reference points were primarily added for supporting the new
alternatives for defining the placement of equipment.
Reference points are available for all object types except points and are defined by the RP command, added after the main definition of the
object:
RP id (x,y,z)
Reference points can be plotted by PLOT RP and they can be fetched with the GM.RP service function.
6.2. Features
A feature is geometric shape associated with a geometric object, presently implemented for rooms only. The original reason for introducing this
concept was to provide definitions supporting calculations related to sliding cargo: the opening where outflow takes place can be defined as a
feature. A feature is defined by reference to a curve or surface object, using the command FEATURE, for example
ROOM HOPPER
....
FEATURE HATCH HOPPER.H
The feature can also be a point, either by reference to a point object or explictly in the form (x,y,z).
Features can be plotted by PLOT room/feature and accessed with the service function GM.FEATURE.
The function GM.CONVERT creates a topology model of the connections. It can be used for the following purposes:
The modifications that are needed before the transfer (if any) depend totally on the other systems requirements regarding the internal tolerances,
knot multiplicities, methods how the connections are derived from the geometry etc.
This function combines patches of a preparable simple surface into nurbses of degree 3 without changing the geometry of the surface. Each
nurbs of the result surface is build from a two dimensional N*M array of the original patches. The patches are connected with knots of multiplicity
3; the boundary knots of the nurbs have multiplicity 4.
The function makes an attempt to maximize the size of the patch arrays under the following conditions:
curves that are classified as knuckles in the preparation result are separating the nurbses
the optional user defined nurbs boundaries are taken into account
the 4 edges of each nurbs are free of knuckles
The function GM.CONVERT with the keyword TOP creates a topology model of a nurbs surface and uses it to modify either the structure or the
geometry of the surface. If the original surface has no nurbses, they are automatically built from the original surface representation.
Modifications of the structure (option I and II) do not change the geometry, but create a surface where the connections between the nurbses are
more evident for the receiving program i.e. the same control points and the knots are shared by the connected nurbses but for some small
rounding errors that can now be eliminated by the PTOL=... option of the TOIGES command.
The rebuild function (option R) is available for the cases where the receiving system requires internal knots of multiplicity one. Each nurbs of the
original is rebuild by fitting a new nurbs to a point set selected from the original one. Within each new nurbs the surface is tangent plane (=G1)
and curvature (=G2) continuous, but the continuity is broken at the connection lines between the new nurbses.
Tangent plane (=G1) continuity at the connection lines can be improved by the B option. Based on the original geometry it finds out those edges
of the nurbses where G1-continuity is required. By using the tangent planes of the connected nurbses it creates a common target tangent plane
that is realized at a selection of points by using some additional degrees of freedom created by knots inserted near the boundaries. The B option
can be used also with the original nurbses (or patches) without the rebuild option R.
GM.CONVERT(SUR,TOP,'TOP',OPT,SUR2), where
The function GM.CONVERT with the keyword INT interpolates a nurbs surface into a two dimensional N*M array of 3D-points.
The function GM.CONVERT with the keyword SP selects a two dimensional N*M array of 3D-points from a surface. The four edges bounding the
surface are given by the user together with the dimensions (N,M) of the array. The points are selected so that the distances between two adjacent
points are about the same within each row or column. By using an additional option, a surface containing one nurbs can be fitted to the created
point set. The fitting can be done also by calling GM.CONVERT with keyword INT.
GM.CONVERT(SUR1,TABLE,'SP',REF, SUR2)
The nurbses of a surface can be drawn with identifications and filled with nurbs specific colours as follows: ID NURBS, ID2 NAME; FILL RNDN;
PLO surface
Discontinuities of tangent planes can be plotted by the command PLOT surface DC=angle. Within the plotted curves the angle between the
normal vectors of the connected nurbses is larger than the given angle.
The function GM.CONVERT(SUR,TABLE,'CP') reads control points of a nurbs surface into a table.
1. General
2. Definition of parameters
2.1. Parameter sets
2.2. Attributes of parameters
2.3. Definition in the DEF-task
2.4. Definition under table calculation
3. Use of parameters in geometric definitions
3.1. Supported objects
3.2. Activation of parameters
3.3. Replacing items by parameters
4. Working with parametrized geometry
4.1. Copying an existing geometry
4.2. Administrational commands
4.3. Tasks TRA,EC,MC,ES
5. Examples
5.1. Introduction
5.2. Parametrisation in the NAPA system
5.3. Parametrisation of the DTMB 5415 naval combatant
5.4. Container ship
5.5. Passenger/RO-RO ferry
5.6. Cruise Liner
5.7. Parametric templates
1. General
A parameter is a variable that can be used to represent a geometric item in the definition of a geometric object. The item can be e.g. a coordinate,
an angle or a point of a curve.
When the object is defined, the item can be replaced by the symbol of the parameter, or by an expression that may contain parameters. When the
geometric form is calculated, the parameters and the expressions are replaced by their values.
The internal geometry is always stored without parameters, but the definition data is available in two different forms. The actual input data i.e. the
definition containing parameters and expressions is shown by the command DES object;. The corresponding data without any parameters or
expressions is shown by the command DES object !!. The difference is shown in the following example:
DES *FRF
PDEF HULLF
PAR XFRF 50
PAR BREF 10
PAR YMAX '0.5*BREF'
PAR RBLG 2
PAR HMD 10
OK
CUR FRF; X XFRF
YX (0,0) ('YMAX-RBLG',0) (YMAX,RBLG) /- (YMAX,HMD)
DES *FRF !!
CUR FRF; X 50
YZ (0,0) -/ (8,0) (10,2) /- (10,10)
2. Definition of parameters
The parameters are collected into parameter sets. They are geometric objects, that are stored in table format. The prefix of the name is PDEF*.
The parameter sets may depend on each other so that a set (=child) can inherit the parameters from another set (=parent).
Is is recommended to organize the parametrization so that it obeys the structure of the HULL. If HULL is combined of HULLA and HULLF, the
parameter sets could be PDEF*HULLA and PDEF*HULLF, that have a common parent PDEF*HULL. The PDEF*HULL should contain at least
some variables of the reference system.
name symbol
The definition or modification of a parameter set is started by the PDEF command. The parameters are defined by the subsequent PARAMETER
commands. The definition is ended by the command OK. As a result, the parameter set is stored into the database, the related tables and the
table widgets, and the set of runtime parameters are updated.
<parent the set inherits parameters from PDEF*parent. The parameters of PDEF*parent are available in PDEF*name, but they cannot be
modified there. If there is no option <parent or I, the parameters of PDEF*DEFAULT in DB1, DB2 or DB7 are copied to
PDEF*name. The set in DB7 contains pointers to the reference system such as PAR LREF 'REF(''LREF'')' etc
NM no model is used. As a default, when a new set is created, a model table PDEF*MODEL is searched from DB1, DB2 and DB7 in
that order. The model contains the defaulted columns of the parameter sets. Some geometric data is included in the
PDEF*MODEL//DB7, so that the parameter sets can be created in the TAB task also.
The modification of an existing set PDEF*name can be started by the command PDEF name; (without any options) so that the old inheritance
data is not lost.
where
name Symbol of the parameter. The name should be unique within this and the parent sets. If the parameter already exists in this set, the
old attributes are overwritten.
def Expression that defines the value. Earlier defined parameters or those of the parent set can be included in the expression. The
expression should be in the form of the NAPA string. Examples about valid syntaxes are shown in chapter 'replacing items by
parameters'. Some special definition syntaxes are provided for certain cases. The special ones start with the characters 'identifier:' e.g.
'INC:','IP:', 'P1:','IP2:' described later.
type Type of the parameter. The type must be given for point and line parameters. Otherwise it is optional. Most of the alternatives listed
below are reserved for future use (plotting of parameters, better error checks).
P: point
PX,PY,PZ : point in projection
LINE: line
LINEX,LINEY,LINEZ: line in projection
X,Y,Z: coordinate
A: angle
AX,AY,AZ: angle in projection
LX,LY,LZ: length along the given axis
C: coefficient
CX,CY,CZ: coefficient for a length on the given axis
R: radius
RX,RY,RZ: radius in projection
IX,IY,IZ: interval on the given axis
A logical expression for a valid parameter can be defined here. It is checked each time the parameter is evaluated. If the rule is violated, a
warning is given.
Undefined attributes in the middle of the PAR command should be marked -; or another form of the command, where the optional attributes are
shown explicitly as attr=value, should be used e.g. PAR XFRF 60 DES='x-coordinate of frf';
'(x,y,x)' P
'(u,v)' PX,PY,PZ
'coeff**line' P,PX,PY,PZ
The following definitions are used to define a rounding to the corner between two straight lines that are both defined by a point and an angle.
For example,
Because the parameter sets contain data in the table format, they can be modified in the TAB-task or by the table editor also.
A new set must be created by the PDEF-command if the model PDEF*MODEL is not used, or the model does not contain geometric data
(records 1000 etc.)
It is not checked if the syntax of the given data is correct, or if it can be evaluated.
In general, a change in the table does not result in an automatic update of the runtime parameters. The table data is transferred to the
runtime set of parameters only when the corresponding parameter set is activated.The activation is done by the commands PSET sets;
PSET UPDATE; or indirectly by suitable DES or UPD commands. An automatic update of the runtime parameters, the related tables an
table widgets is done only if the parameter set contains the column VALUE for the text form value of the parameters. The definition of the
column should be COLUMN VALUE GM;.
The parametrization has been installed in the definition of the following objects:
point objects
curves
tangent functions
planes
Before the parameters are available, the corresponding parameter sets must be activated i.e. they must be added to the set of runtime
parameters.
The activation is done directly by the PSET command, or indirectly by the DES or UPD commands. For example, PSET HULLF; CUR FRF;... is
needed if PDEF*HULLF is not already active. But, EDI FRF; ADD; can always be used because all the referenced parameter sets are activated
by the implied DES command.
All active parameters are listed by the command the given one are shown by PSET LIST *parameter. The form of the list can be changed by the
LQ PDEF command. The following quantities are available:
NR index
NAME symbol
FORMULA definition
TYPE type
Geometric items (coordinates, angles, points) can be replaced by expressions in string format. If the expression contains more structure than a
normal string of NAPA it must be enclosed in apostrophes.
expression value
-LREF -100
0.5*LREF+1 51
'0.5*LREF+1' 51
'LREF*SIN(I*DA)' 1.234
'100+1' 101
The place where the geometric item is used has an effect on the value of the expression. For example, the parameter POINT2 has a different
interpretation in the following cases
A parametrized geometry can be copied from another project by the command COPY **object FROM version/project; or by running the definition
macro created by the EDI **object;.
The copy command copies the parameter sets as a whole. The option ! is needed to overwrite other existing objects than parameter sets. To
overwite parameter sets, the option !! is needed.
While defining a parameter set in the PDEF task, you can copy parameters from another set without redefining the existing parameters (having
the same name) by using the GET command. If the ! option is used, a redefinition is done.
The parameter sets of the current project/version are listed by the command PDEF CAT:. A parameter set can be deleted by the commamd
UNSAVE PDEF*name. It can be described by DES PDEF*name. The command DES *PDEF*name shows also all the refered parameters from
the refered sets.
The parametrization is not supported. In the TRA,MC and EC tasks the parametrization is removed totally before execution. In the task EC, the
parametrization of the changed items is removed.
5. Examples
The project PARALIB contains some parametrized hull forms.
5.1. Introduction
In the early design stage, the time needed to define an optimised hull form is of essence in today's shipbuilding. With the help of CFD programs,
several phenomena of the flow field around the ship hull can be determined. When optimising the hull form, it is of importance to consider several
different approaches and variations of the hull form.
By using an automatic hull form optimization, a great number of hull form variations and their performance may quickly be investigated.
In the automatic hull form optimization, a parametric representation of the hull form is needed, in order to be able to rapidly vary different aspects
of hull form.
In the NAPA system, the hull surface is defined by a grid, which consists of a set of curves. In the parametric representation, sets of parameters
are used in the definition of the grid curves. As the grid structure varies significantly for different ship types, templates for specific ship types are
used.
Parameters are used in the grid curve definitions mainly as coordinate values and angle conditions. Special parameters such as point objects and
lines are also supproted. Only geometirc, global and local parameters are used.
The parameters are defined using the command line syntax in the PDEF-task, which is entered from the DEF-task. Parameteres can also be
defined using the graphical table editor. The same graphical visualisation of the parametric hull is available as for an explicitly defined hull.
The parametric template of the DTMB5415 naval combatant was created by first defining a normal explicitly defined NAPA grid. As reference in
the grid definition, the hull form in IGES format, downloaded from the website of Gothenburg 2000 workshop on CFD in Ship Hydrodynamics:
http://www.iihr.uiowa.edu/gothenburg2000/5415/combatant.html
The parameters of the DTMB 5415 ship model are gathered in three different tables. The main table 'PDEF*HULL' contains parameters which are
common for the whole ship. It consists of global geometric parameters such as the main dimensions, but also information about the location of the
main frame, angle of deadrise and bilge radius. The Froude number is also used as a parameter and affects the x-location of transom. Figure
below shows the 'PDEF*HULL' parameters.
A single propeller container ship was parameterised using few (less than 40) parameters. The hull was divided into three parts: aft hull, mid hull
and fore hull. Also three parameter sets (PDEF*HULL, PDEF*HULLA and PDEF*HULLF) were used. Figure below shows the parameter set
PDEF*HULL, common for the whole ship. The parameter set PDEF*HULL contains in this template only the main dimensions, bilge radius,
propeller diameter, Froude number and the x-location of the aft and fore main frames.
The parametric template for the grid of a ropax ferry is designed to describe as a hull form of a typical ferry. The whole hull (HULL) is divided to
the three separately parts, the aft body (HULLA), the mid body (HULLM) and the fore body (HULLF). The definition parameters are given in the
three tables, PDEF*HULL, PDEF*HULLA and PDEF*HULLF. In the tables, the amount of the parameters has been kept as so minimum as
possible. Some of parameters are defined only in a definition of objects. If a parameter appears more than one time in definitions, it is added to
the table.
The parameter set in the table PDEF*HULL is common for the whole ship and is shown in following figure. The set consists of the main
dimensions read from the reference system, the bilge radius and the station of the mid body ends.
The parametric template of the cruise liner is nearly same as of the ferry. Only ratios are changed to describe the nature of the hull form of typical
cruise liner. The tables of the parameter sets are shown in the following figures
The above described and some further ship specific parametric hull templates are available in the project PARALIB.
Error rendering macro 'toc' : [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ' '
(code 32) (expected a name start character) at [row,col {unknown-source}]: [1147,37]
A connection surface is formed by connecting the points on curves with straight lines, drawn
between corresponding polygon points. The user must define at least two base curves. If
needed, the polygonization of the curve with less points is adjusted so that the curves contain
equal amount of points. At least two BASE records must follow.
The command starts the definition of a space curve. The explanation of the additional
commands needed is available after the CURVE command is entered.
Type of the curve representation is defined by the variable GMTP in the reference system. The
default value STD means that only the polygonized curve is calculated. If GMTP SPLINES has
been entered, an additional spline representation is also stored.
type: (opt) curve interpolation method, M1 (original) M2 (new). Normally set permanently by
parameter GMTP in the the reference system or by command GMTP. Alternatives SPLINE or
STD are the same as M1 but specifying the storage format.
A cylinder is a surface formed when a given straight (the generator) moves along a given curve
(the base). These are defined by commands AXIS+FORM, AXIS+BASE or BASE+GEN.
P: (opt) create patch representation To get the full advantage of the P option, the spline mode
should be on (!gmtp spline) and all the related curves should have a spline representation also.
EXAMPLES
CYLINDER BTR-TUBE; AXIS (90 -10 2) (90 10 2); FORM R=1.5
CYLINDER TTOP; BASE TTOP-CL; GENERATOR Y -10 10
CYLINDER TTOP
Y 0; XZ <> (0 2) (20 2) (20 1.5) (50 1.5) (60 2.2) (80 2.2)
GEN Y -10 10
A double cylinder differs from a simple cylinder in that the generator may be curved. Records
BASE+GEN must follow.
EXAMPLE
DCYL MAINDECK
BASE MAIND-CL
GENERATOR MAIND-SECTION
The command starts editing of the curve given, i.e. changing the curve by adding, deleting or
moving points. (Explanation of the editing commands are available after the EC command is
entered).
EC, curve
The command starts the surface editing function, for interactive modification of a non-combined
general surface. A valid, prepared grid must be available when entering the task.
-ES name
name: (opt) name of surface to be edited. When surface editing is reentered in order to continue an
already started editing, the name must be omitted.
This command can be used when an object already in use has been redefined in another run,
and one wants to get the new definition. For larger updates, !GM RESET on the task level can
be used.
FETCH name
The definition of a parameter set is started by the PDEF command. The parameters are
defined by the subsequent PAR commands. The existing parameters are shown by the LIST
and DES commands. The task is ended by the command OK or SKIP. A parameter set is a
geometric object, that is stored in the database with the prefix PDEF*. The prefix is needed in
the DES command, but not in the PDEF and PSET commands. The PSET command creates a
runtime selection of parameters that can be used in the geometric definitions.
PDEF name
------------------------
<parent: (opt) name of a parent set. All parameters of the parent set are inherited by the current set. A
parameter set can have many parents. If there are no explicitly defined parents, A) the parents
of an existing set are not changed, and B) the parameters of PDEF*DEFAULT are copied to a
new set. The description PDEF*DEFAULT is searched from DB1,DB2 and DB7 in that order.
The description in DB7 contains pointers to the reference system, so that e.g. the parameters
AP,FP,XMIN,... are available.
I: (opt) the parameter set is an independent one i.e. a set that has no parents.
N: (opt) the parameter set is a new one. An existing set having the same name is deleted. Without
this option new parameters are added to the the existing set, and the old parameters can be
modified by the PAR commands.
NM: (opt) no model As a default, a model table PDEF*MODEL is searched from DB1, DB2 and DB7
in that order. The model contains the defaulted columns of the of the parameter sets. The
PDEF*MODEL in DB7 contains some geometric records also, so that parameter sets can be
created in the TAB task also.
Examples:
PDEF HULL N ;** create a new PDEF*HULL
The parameters of PDEF*DEFAULT
are copied to PDEF*HULL.
PDEF HULL ;** modify an existing PDEF*HULL,
or create a new one
PDEF HULL are inherited by PDEF*HULL.
PDEF HULL PDEF HULL I N ;** no parents.
The parameters of PDEF*DEFAULT
are not copied.
-------------------------------
List a catalogue of parameter sets. The optional parameters unit etc. are the same as in the
general CAT command (see !exp CAT/GEN).
Examples:
PDEF CAT
PDEF CAT NAME>HULL
The command starts the definition of a plane The plane may be a restricted on or an
unrestricted one. One of the commands X, Y, Z or THR must follow.
EXAMPLE
PLANE BH1-PLANE; X 24
PLANE DIAG1; THR (- 10 0) (- 0 10)
This command creates an object by running a macro, to which the variable properties are
passed as parameters. This function is provided on pilot level, and the object created must be
a surface. In the DES command, use option ! to see the object as created by the macro: by
default, the definition is shown as the PMO command.
EXAMPLE
An object named MYBOX is created by the macro BOX. The macro could begin with:
@parameters(l=n,b=n,h=n)
(x,y,z): point given by three coordinates. A coordinate can be given by reference to a point.
p(axis+q): other point translated the distance q along 'axis'. Several translations can be
combined.
EXAMPLES
POINT A (10 0 0)
POINT B STEM/Z=7
POINT C STEM/DECKF
POINT D -A
POINT E A(X+10,Y-1)
The command starts preparation of a surface, i.e. generation of the final surface definition from
its parts. Preparation must be done after the surface has been defined in order to make
intersectioning possible. Later changes in the curves will not affect the surface until a new
preparation is done.
name: name of surface to be prepared. The surface may be a combined one, in which case all partial
surfaces will be prepared.
options:
KD: (keep date) keep date of preceding preparation. This prevents dependent objects (e.g.
rooms) to be considered changed.
SI: (smooth interpolation) generate tangent functions using smooth interpolation, default linear
interpolation. (Grid surfaces only).
TP=angle: (selection between type of 3-side patches) 3-sided patches whose opening is less
than angle are prepared so that singularities are eliminated. This is usually favourable for
nearly planar patches. As a default all 3-sided patches are singular. (Opening of patch is here
defined as the largest angle between normal of surface at corners)
TEST: temporary addition for testing a features in finding the intersections between curves in
the grid, taking more advantage of explicit references.
TOL=tol: (curve/curve-intersection tolerance) Two curves intersect, if their distance is less than
tol. As a default only the exact intersection points are taken into account.
NO: (no options) ignore preparation options stored with the surface by command PO.
TTOL=tol: tpl-tolerance
TSC=typ: type of smoothing in curve appproximations 0: not in use 2: use 2nd differences of
control points 3: use 3rd differences of control points 4: use 4th differences of control points
sign=-1: apply smoothing when nurbs is fitted to points
G=typ: grouping The segments of the tpl-model can be grouped so that a common structure of
control points and knots is obtained between connected nurbses wherever possible; 0: no
grouping; 1: group; 2: group & lower nurbs degree to one if possible
PREP LD
List the diagnostics of the preceding preparation, if any. Alternative DD=draw diagnostics, i.e.
draw omitted curve parts. NOTE: if the last preparation concerned a combined surface, the
diagnostics concern the last partial surface only.
The parameters that can be used in the geometric definitions are activated by the PSET
command. An automatic activation is done internally by commands like DES and UPD.
------------------
The given sets are activated to form the current runtime set.
set1: name of the parameter set The prefix PDEF* is not needed.
-----------------
List parameters of the runtime set. The list is controlled by the command LQ PDEF of the DEF
task.
*name: (opt) list the given and all the referenced parameters
PSET UPDATE
-----------
Update the set of runtime parameters. The corresponding run time tables, and the table
widgets are also updated. In general, a change in the table editor or in the TAB task does not
result in an update of the runtime parameters. Only if the column VALUE (=value of the
parameter in text form) is present, an automatic update is done.
PSET OFF
--------
PSET +
------
PSET -
------
PSET
----
A pyramid (or cone) is a surface formed when a straight passing through a given point moves
along a given curve. These components are defined by commands AXIS+FORM, AXIS+BASE
or BASE+TOP.
P: (opt) create patch representation. Note: the 'pyramid' property may not be rendered exactly.
The command starts the definition of a room. The explanation of the additional commands
needed is available after the ROOM command is entered.
The explanation of the additional commands is available after the ROOM command is entered.
A rotation surface formed when a given curve is rotated a given angle around a given axis.
These are defined by commands AXIS+BASE or AXIS+FORM.
P: (opt) create patch representation. Note: the 'rotation' property may not be rendered exactly.
SCC, name, sc
P: plane (tangent plane of the surface coincides with the plane of the curve
E: end of surface
-: free angle
sc1/X/sc2: different side cond. on -x/+x side of the curve (Y and Z analogically)
O=axis: defines the outside of the surface axis= +-X, +-Y or +-Z. also O=L, O=R
SCC, name
SCC, FRMID M
SCC, FLATBOTTOM, P
SCC, KNUCKLE1 -//-
SO name 'text'
The explanation of the additional commands is available after the SO command is entered.
SPHERE, name P
The command starts the definition of a general surface (simple or combined). The command
THROUGH or COMBINE must follow (explanation available after command SURFACE
entered)
type: (opt) P=patch, G=grid, W=wireframe. Default acc. to reference system (parameter GMST) or
from installation parameters.
TGF, name/+-axis
/+-axis: (opt) defines the side of the curve on which the tangent function is valid, if the curve is a
knuckle.
When referring to the result in DES ao commands, the name of the curve with prefix T*, T+ or
T- is used, e.g. T*WL1. T+ or T- is used when /+axis or /-axis has been given.
EXAMPLE
TGF, KN1F/-Z
Starts definition of tangent function for the surface below KNF. One of the commands XT, YT
or ZT must follow.
A tube is created when a given transverse cross section moves along a base curve. It is
defined by the command BASE+FORM.
EXAMPLE:
TUBE T1
BASE B1
FORM R=0.1
The UNDO command restores the definition of an object overwritten by a definition done during
the current entry to the GM task. For controlling UNDO, see !GM UNDO, default=save 20 last
definitions. The olde definitions can also be listed or taken to the editor work area.
UNDO
This command does the basic function: cancel the last definition. If the last definition created a
new object, it must be canceled by UNSAVE.
UNDO selection !
This form allows canceling of other definitions than the last one.
!: (opt) needed as check against accidental use if more than object is selected
function:
E: enter definition of objects in the UNDO BUFFER to the editor work area
selection: (opt) objects concerned, default=all if function=L, else last. Alternatives as above.
The shape of the given curve or surface is recalculated in order to take into account changes in
referenced curves.
UPDATE, surface, F
F: (opt) force=update all curves. Otherwise only curves dependent on changed ones are updated.
WO wireframe options
alternatives: (opt) parameters of the option see !exp WO/G40; or !exp WO/G40 LIMIT; etc.
This command is used alone after the CURVE command, and defines a curve by combining
parts, either by simply collecting or by combining geometrically. This alternative is intended for
special purposes such as generating the lateral profile. Multi-branch space curves are not
supported consistently.
+: add the parts analogically with ADD in a room definition. The parts must be closed plane
curves in a common plane. With prefix - at the second operand, it is reducted.
*: combine at the intersection point. Those curve parts are retained are to the right of the other
operand. Prefix < turns the direction of an operand. The parts must be plane curves in a
common plane.
This record defines a curve through points given as space points, i.e. directly with three
coordinates or by intersecting curves. The curve is defined by this record only. NOTE: all
functions are not supported for this type of curve, among other things, it cannot be used in a
surface definition.
This command records additional information with the object as the value of a quantity defined
in the quantity standard (task FORM, command !FORM). The values can be fetched with the
function GM.QNT.
EXAMPLE
QNT ACODE A1
This command adds a named point for designating a location on the curve. Can be plotted with
PLOT RP ... and accessed by the service function GM.RP.
RP id (x,y,z)
RP id #i
i: index of the definition, counted from the start of the curve, in the order the points appear in the
resulting curve
EXAMPLE
CURVE C1
...
RP REFPOINT (0,4,5)
PLOT RP C1
Some alternatives of the generate command are available here also. The name of the
command is the same as the task keyword of the GEN command. The following keywords are
available: SECTION, BOUNDARY, MAX, MIN, ENV. For an explanation see !EXP GEN/G0X
SECTION; etc.
Defines a plane through three given points. The points can also be given by point objects.
Defines a plane parallel with a given axis (in this case y), passing two points.
This command defines a location surface with constant x, so that the resulting curve is a frame
curve.
X, x
A projection in the plane indicated by the letters in the identifier is defined by explicit points
and/or reference to other curves. When this command is entered as the first one after the
CURVE command, the result will be a general space curve.
options:
*: cancel automatic sorting, and take the points in the order given. Default= sort points
according to ascending x (first symbol in the command identifier).
**: order points so that a feasible curve can be fitted through the point set (=general ordering)
***: as **, but the first and the last points are endpoints of the resulting curve also.
LMAX=l: select max. length of the polygon segments. May be needed if a tangent curve is
defined later.
(u,v): explicit point in the projection. Depending on the the projection, (u,v) means (x,y), (x,z) or
(y,z).
name: name of curve, meaning the point where the location surface intersects. 'name' can also
be a point object, from which the relevant coordinate pair is taken. The following additional
specifications can be given to a curve name:
name/axis=q:
intersect the curve with the plane
indicated
instead of using the location surface
name/axis>q,
name/axis
a1/: (opt) angle valid BEFORE the point p, where 'before' is interpreted according to the resulting
curve direction. The alternatives for a1 are:
-: free angle.
*axis=angle: angle measured in the section given by 'axis'. e.g. *X=30. The point must be
defined by a curve reference.
ROUND=r: see !exp ROUND/GEN for this and other rounding syntaxes of NAPA
/a2: (opt) angle condition AFTER the point, analogically with a1.
For the purposes of digitizing, a point entered twice is defined to be a knuckle point (equivalent
with -/ p /-).
XY COPY name
XY AS name
This form copies the definition of the projection from the given curve. The difference with
respect to COPY is that curve references are interpreted with the current location surface while
COPY takes the points as such.
A smooth curve is fitted through the given points so that the given sideconditions are obeyed.
points:
(x,y,z) : coordinates of point. The character '-' can be used for an unknown coordinate.
curve/curve : intersection between two curves. A sidecondition that forces the curve to the
plane defined by the two intersecting curves is also implied at the point.
sideconditions: (opt) A sidecondition after the point is given by /sc, and before the points by sc/. More than one
sidecondition can be defined on each side (e.g. x=30/ z=60/ point). The following alternatives
are available:
plane=angle: inclination of a projection of the curve in a plane (=X,Y or Z) is the given angle (in
degrees).
*plane=angle: inclination of the intersection between the surface and the plane (=X,Y or Z) is
the given angle (in degrees). The sidecondition can be used only when the point is defined by a
reference to another curve.
*(vx,vy,vz): direction of the curve is parallel to the given vector. The character '-' can be used
for an unknown component.
(vx,vy,vz): derivative of the curve with respect to the parameter is equal to the given vector.
Length of the vector controls the shape of the curve. Lengths of order unity are recommended.
The character '-' can be used for an unknown component.
* : tangent function
- : free angle
P : plane sidecondition. The sidecondition can be used only when the point is defined by a
reference to another curve.
P=(vx,vy,vz): plane sidecondition with an explicitly given normal vector of the plane.
P=surface: plane sidecondition. The curve is in the tangent plane of the surface. The normal
vector of the plane is calculated at a point on surface that is nearest to the given definition
point.
M : midship sidecondition
'user_defined_sideconditions': By using these sideconditions the user has access to the inner
parts of the curve definition. The set of definition points and directions can be modified, and
restrictions can be defined for the available degrees of freedom. A user defined sidecondition
with a given name is implemented as a macro SC*name, that contains modification commands
of the SC task (see !com g96, !exp command/G96). In order to activate a sidecondition it
should also be introduced in the description SC*TYPES containing the following records: 1 :
(type 3) names of sideconditions 2 : (type 2) minimum number of parameters required 3 : (type
3) a short description of the sidecondition In the curve definition a user defined sidecondition
with a given name is asked by the syntax name, name=par, or name=(par1,par2,...,parn).
options : (opt)
coord=q: (opt) If the points are defined by (u,v), the third coordinate (coord=X,Y or Z) is set to q. As a
default q=0, and the current projection is used.
TP=5: first calculate with TP=4, then with TP=0 (=default, if there are unknown coordinates)
TC=0: all components are calculated independently (=default, if there are no angle conditions)
TC=4: all components are calculated together (=default, if there are angle conditions)
Examples:
XYZ (0,0,0) /x=30 /z=30 -/ (1,1,1) (2,1,1)
XYZ X=40 (0,0) -/ (8,0) (10,2) /- (10,12)
Frame at x=40
Instead of directions the derivatives are given. Because they are of small length, the curve is
only slightly curved.
The curve starts from a tangent plane of HULLF. The tangent plane is calculated at a point on
surface that is nearest to (100,1,5).
see XY
as in command X
see XY
see XY
as in command X
see XY
see XY
This command defines the boundaries for the surface patches. Giving this command also
triggers the use of new preparation mode
(transf): (opt) transformation applied to the part. For alternatives, see !EXP TRA/GEN.
This command defines a numeric surface by a set of calculation sections. The surface can be
used in calculations only. The sections are supposed to represent the positive y-half of a
symmetric surface. In other cases, the object must be defined as a room.
curve1...: name of curves in the order of increasing x. The curves must be have constant x.
This command adds instructions regarding the selection of calculation section. Same function
as CSECT under DEF, except the surface name is optional. See !EXPL CSE/G0X.
For a noncombined surface, this command is necessary if the orientation of the surface differs
much from that of a conventional hull form, for which default +Y is useful. For a combined
surface, this command can be used for defining a common orientation of the result in the case
that the parts have different orientation, but it cannot be used for switching inside/outside.
OUTSIDE, +-axis
Example
SURFACE DECK
THR ...
OUTSIDE Z
PO preparation options
The parameters of this command will be used as options in the PREP command. This
command can be used if one always wants a service such as U=update, or set some
instruction controlling the preparation result. Valid for non-combined surfaces only.
PO options
AU: (automatic update): whenever the surface is used, first verify that the preparation is up to date.
If needed, update the curves and repeat preparation.
others: options that can be given in the PREP command, (see !EXP PREP/G0D).
REF surface
This command adds a named point for designated a location in the room. Can be plotted with
PLOT RP ... and accessed by the service function GM.RP.
RP id (x,y,z)
This command defines the set of secondary curves. Meaningful only when combined with the
BND command
When calculating the area, the center of gravity of the area or the area distribution, this
command specifies that the surface shall be interpreted as one half of a symmetric surface.
The SYM command affects no other operations.
THROUGH curve1,curve2,...
THROUGH arr()
Some alternatives of the generate command are available here also. The following keywords
are available: TRIM, LIMIT, PLIMIT, OFFSET, PATCH, FACET, WAVE, B5. For an explanation
see !EXP GEN/G0X TRIM; etc.
WO wireframe options
Options that control the plane sections of the wireframe surfaces are defined.
WO LIMIT limits
---------------
A limiting box of the plane sections is defined. Intersection points with the grid that are outside
the limiting box are omitted from the result.
Examples:
WO LIMIT Y>0;
WO LIMIT - - 0 - - -;
WO LIMIT OFF;
EX endpoints of x-sections
WO EX endpoints
---------------
UMIN/VMIN: if the primary criterium UMIN results in many points, select a unique one by VMIN
etc.
Examples:
WO EX SYM UMIN VMAX; ** default
WO EX OFF
EY endpoints of y-sections
WO EY endpoints
---------------
Endpoints of the y-sections are defined. As WO EX endpoints; but now u=x and v=z.
Examples:
WO EY VMAX US/VMAX; ** default
WO EY OFF;
EZ endpoints of z-sections
WO EZ endpoints
---------------
Endpoints of the z-sections are defined. As WO EX endpoints; but now u=x and v=y.
Examples:
WO EY SYM VMIN US/VMIN; ** default
WO EZ OFF;
----------------------
ON: the grid data is used Ordering of the intersection points is not only dependent the
coordinates of the intersection points, but also on the geometry of the intersected curves in the
neighbourhood. (default)
WO EC opt
---------
Forcing of intersections into the box of extreme coordinates of the intersected surface.
opt: alternative
ON: the intersection curve is modified so that there are no coordinates outside the box of
extreme coordinates of intersected surface (default).
OFF: intersection curves can go outside the limiting box of the surface
---------------------------
An ordering rule of a plane section is defined. There can be any number of such rules for a
surface.
c1,c2,...: curve c2 is after c1 etc., but there can be other grid curves between the given ones.
*,c1,c2,...: curve c2 is connected to c1 etc.. No other grid curve can be between the given
ones.
Examples:
WO SORT X WL1 WL2 WL3 WL4 WL5
WO SORT X 0 50 WL1 WL2 WL3 WL4 WL5
WO SORT X - 50 WL1 WL2 WL3 WL4 WL5
WO SORT X OFF
WO SORT OFF
WO LIST
-------
WO
--
Show values of those options that have been defined by the user.
WO RESET
--------
This command defines a plane passing through given points or a given curve. Some special
syntaxes can also be used.
Basic form, specifying three points in space. The points can also by given by the name of a
point object. If the plane is parallel with a coordinate axis, this coordinate can be replaced by a
minus sign, and the third point omitted.
This form defines a plane parallel with 'axis' (X, Y or Z), passing through the given points in the
plane normal to the axis. The coordinates can be given by point objects.
As above, but the second point is replaced by the angle measured in the plane normal to the
axis.
A plane is placed through the point (x,y,z) such that its normal vector has a given direction.
With the option -, (v1,v2,v3) is interpreted as a point, such that the vector is from the first to the
second point, otherwise (v1,v2,v3) gives the vector directly.
THROUGH (v1,v2,v3,d)
This form defines the plane by its normal vector (v1,v2,v2) and distance to the origin d (with
sign). If the length of the vector (v1,v2,v3) is 1, the equation of the plane is v1*x+v2*y+v3*z=d.
THROUGH curve
This form defines a restricted plane by giving the delimiting (plane) curve.
THROUGH *name
This form defines an unrestricted plane coinciding with the plane of a given plane object of any
type.
Defines the plane corresponding to the seawater plane of the given floating position.
X x
name: name of point object or curve. The x-coordinate of the first point is taken.
Analogically with X
Analogically with X
5. Special surfaces
The record defines a straight line between given points forming the axis of the cylinder.
(x1,y1,z1), (x2,y2,z2): Two points on the straight. The points can also be given by point objects.
L1=l1: (opt) modifies the result so that the start of the cylinder is at the distance l1 from the start point.
Preceded by an asterisk, the length means a relative length with respect to the distance
between the points.
L2=l2: (opt) modifies the result so that the end of the cylinder is at the distance l2 from the start point.
As above but without identifiers. If one length only is given, it is interpreted as l2.
This form defines the axis by a start point and a direction. The item l2 is compulsory in this
case.
l1: (opt) distance from startpoint to start of the cylinder. Identifiers optional as above.
EXAMPLES
AXIS (75 -8 3) (75 8 3)
AXIS X -12 12 (same as AXIS (-12 0 0) (12 0 0))
AXIS (10 0 0) 90/0 2.5 (same as AXIS (10 0 0) (10 2.5 0))
This record defines a space curve serving as the base curve of the surface. When the BASE
record is given first it defines the location of the curve. If it is preceded by the AXIS record, this
one defines the location and the base curve is translated so that the ORIGIN coincides with the
startpoint of the axis. The base curve always keeps its orientation. The base curve can be
replaced by a local curve definition.
BASE curve nr
BASE TOP/surface
BASE BASE/surface
This form defines the base by using the base or top of another surface of a type where this
concept is defined. This form allows many surfaces to be connected.
This command specifies that the base(s) shall be considered part of the surface, making it
closed. This requires that the base curve is closed.
This record defines the cross section as it appears in the normal plane to the axis.
FORM R=r
--------
FORM RECT=(lu,lv)
----------------------
Rectangle with sides lu,lv and reference point in the middle. A square can be defined as
SQ=lu.
----------------------
Defines the form by reference to a curve. The curve must be a plane curve. The orientation
with respect to the axis will be determined as follows: The curve is placed so that the origin
coincides with the start of the axis and having the orientation unchanged. The curve is then
turned so that the normal coincides with the axis. This can be modified by the 'orientation'
option.
---------------------------------------
This alternative is in all respects analogous with the preceding one, except that the curve is
defined directly in the FORM record, using the normal syntax (including angles, if needed). The
uv-coordinate system in which the curve is defined is selected so that the third axis is parallel
with the coordinate axis closest to the surface axis, while u- and v- axes are parallel with the
remaining ones.
--------------------------------------
R=radius: (opt) the four corners are rounded with the given radius
--------------------------
Use a profile definition of NAPA STEEL. Pilot level. This interpretation requires a NAPA STEEL
license.
profile: profile definition e.g. T*200*10*100*10. For other syntaxes, see !exp iprof/sta. The name must
contain at least two asterisks, if needed add one at the end, e.g. SQ*1000*.
options:
opt: string containing T=use profile with thickness and/or R=reflect the profile contour.
---------------------
The optional orientation parameter controls the rotation of the form inside the normal plane.
The result is expressed by a coordinate direction (X, Y or Z) into which the local U or V
coordinate is directed as closely as allowed by the plane. An additional rotation can be given.
U=dir+psi: after applying the option U=dir, the form is rotated an angle psi around the axis.
V=dir+psi: after applying the option V=dir, the form is rotated an angle psi around the axis.
Examples:
FORM / (-2,-1) (2 1) R=0.1 U=X+30
FORM FORM1 V=-Z
This record defines the generator of the cylinder, giving a shape which moves along the base.
This form is used for a normal cylinder. This form defines a straight segment by two points. the
startpoint of which will be placed at the base curve. Note: the two points only define a direction
and a distance, the position in space is irrelevant. Otherwise the command is analogous with
AXIS, and all the other forms specified for AXIS are available.
GENERATOR curve
This form is used for a double cylinder. The given curve represents the shape, which is placed
so that its ORIGIN is on the base curve. The generator can in this case also be defined by a
local curve definition.
This command starts a local curve definition, replacing the BASE command. The X command
is the same as would be given after CURVE in a curve definition. Similarly Y, Z; XY, XZ, ...
XYZ.
The record defines a straight line, such that the base of the pyramid is placed at the startpoint
and the top in the endpoint.
L1=l1: (opt) restricts the pyramid so that the base is at the distance l1 (+ or -) from the given
startpoint.
L2=l2: (opt) restricts the pyramid so that upper surface is at the distance l2 (+ or -) from the given
startpoint.
As above, but without identifiers for l1, l2. If one length only is given, it means l2.
This form defines the axis by it startpoint, direction and distance to the endpoint.
EXAMPLES
AXIS (75 -8 3) (75 8 3)
AXIS Y 12; AXIS (0 0 0) (0 12 0); AXIS (0 0 0) 90/0 12
The unrestricted form goes from (0 0 0) to (0 0 10), but the lower base it cut at z=1 and the
upper one at z=5.
This record defines a space curve serving as the base curve of the surface. When the BASE
record is given first it defines the location of the curve. If it is preceded by the AXIS record, the
given curve is translated so that its ORIGIN coincides with the startpoint of the axis. The base
curve always keeps its orientation. The base can also be defined by a local curve definition,
using the commands X,Y,...XZ.
BASE curve nr
BASE TOP/surface
BASE BASE/surface
This form defines the base by using the base or top of another surface of a type where this
concept is defined. This form allows many surfaces to be connected.
This command specifies that the base(s) shall be considered part of the surface, making it
closed. This requires that the base curve is closed.
This record defines the cross section as it appears in the normal plane to the axis. For a
complete description of the alternatives, see !expl FORM/G4C.
FORM R=r
Defines the form by reference to a curve. The curve must be a plane curve.
q1: (opt) defines that the given base shall be moved the given relative distance to the top, in order
to form the actual base.
q2: (opt) defines the upper base of a partial pyramid by giving the relative distance from the lower
base to the top. If only one value is given, it is interpreted as q2
This command starts a local curve definition, replacing the BASE command. The X command
is the same as would be given after CURVE in a curve definition. Similarly Y, Z; XY, XZ, ...
XYZ.
This record defines the curves to be connected (one at a time). The base can also be defined
by a local curve definition, using the commands X,Y,...XZ, XYZ.
<: (opt) turn the curve so that endpoint/startpoint change role. Not available with the patch option.
This command specifies that the ends shall be considered part of the surface, making it closed.
This requires that both given curves are closed. Not implemented with the patch option.
This command specifies that if the operand curves are both definition curves, the connection
shall take place by connecting matching definition points. This is now handled automatically so
that MDP is implied if the conditions as satisfied. NOTE: with the P (patch) option, this must be
possible.
This command starts a local curve definition, replacing the BASE command. The X command
is the same as would be given after CURVE in a curve definition. Similarly Y, Z; XY, XZ, ...
XYZ.
(x1,y1,z1): Startpoint of the axis. The point can also be given by a point object.
DIV=n: (opt) defines the subdivision into facets or patches around the rotation axis. The default is set
so that the angle of each part is 10 degrees for a facet surface (N=36 if full angle). For a patch
surface, the result is decided using the polygonization tolerance.
This form defines the axis by it startpoint, direction and distance to the endpoint.
EXAMPLES
AXIS (75 -8 3) (75 8 3)
AXIS Y; AXIS (0 0 0) (0 12 0); AXIS (0 0 0) 90/0 12
This record defines the curve to be rotated such that the given curve is rotated from its original
position the given angle around the given axis. The base can also be defined by a local curve
definition, using the commands X,Y,...XZ.
BASE curve nr
This command specifies that the ends shall be considered part of the surface, making it closed.
This requires that the rotation angle is 360 degrees.
This command defines a shape in the plane of the axis, giving the curve to rotate. This form is
intended for complete rotations (angle=360), there is no option for the starting position.
The form is given by a curve definition using the normal syntaxes. The u-axis is along AXIS
and the v-axis at right angles to it.
FORM curve
This form gives the shape by reference to a named curve. The curve must be a plane space
curve (location surface X, Y or Z). An x-curve is placed so that the y-axis coincides with AXIS,
else the x-axis.
EXAMPLES
FORM (0 1) -/ (5 2) /- (10 2)
The result is a radius equal to 1 at the start point and constant=2 from 5 to 10.
C RPROFILE; Z 0; XY ...
FORM RPROFILE
This command starts a local curve definition, replacing the BASE command. The X command
is the same as would be given after CURVE in a curve definition. Similarly Y, Z; XY, XZ, ...
XYZ.
The first FAC command defines the node points at one side of the surface. Each subsequent
FAC command adds a set of facets by connecting the points to the corresponding ones in the
preceding FAC command. Thus, each FAC command should contain the same number of
points. Double points are allowed.
point: node point given in one of the ways presented below. Prefix * makes the point a double one.
The four points forming a facet should in principle be in the same plane and warning is given if
not so. Non-plane facets will work reasonably in most cases, but the surface created is not
unambigous and it cannot be used as owner surface of surface object. With the patch option,
the faces need not be plane.
EXAMPLE
FCS DEMO
FAC (0,0,0), *(0,5,0), (0,10,0)
FAC (0,0,5), (2,3,5), (2,7,5), (0,10,5)
FAC (0,0,10), (2,3,10), (2,7,10), (0,10,10)
The surface consists of 9 facets, one of which is a triangle ending at the double point (0 5 0)
OK explicit finish
OK;
axis=q: defines a coordinate plane, e.g. X=#12. Preceding the axis symbol by + or -, the order of the
points is adjusted so that the outside is to the side indicated.
(u,v)...: points forming the polygon in the plane specified. The polygon is automatically closed if
needed.
This command gives a set of planes from which the surface is formed. In one direction, fixed
limiting coordinates are are given, and between these, each plane contributes with the part
between the nearest ones in the list of planes. The first and last plane are used for limiting only.
(plane): definition of general plane. 'plane'=syntax defining a plane, see !EXPL THR/PLANE,
e.g. (Z (10 2) (20 2)).
*: (opt) close the set of planes, so that the first and last planes delimit each other, else the first
and last planes are not part of the surface but define where plane2 starts and planeN-1 ends.
CLOSE (opt) as *, but add top and bottom to close the surface in all directions
EXAMPLE
FCS DEMO; THR Z=(0 10) Y=0 X=0 PL1 X=10 Y=0
FCS DEMO; THR Z=(0 10) Y=0 X=0 (Z (0,3) (10 5)) X=10 Y=0
The latter is equivalent with the first one if PL1 is defined as PLANE PL1; THR Z (0,3) (10 5).
This command causes SUBSEQUENT faces to be subdivided into triangles. Default=make four
sided triangles. This command should normally be
TURN;
This record defines a space curve serving as the reference curve along which the origin of the
form curve is placed.
BASE curve nr
This command specifies that the end shall be considered part of the surface, making it closed.
This requires that the form curve is closed.
This record defines the cross section as it appears in the normal plane to the base curve. For a
complete description of the alternatives, see !expl FORM/G4C.
FORM R=r
Defines the form by reference to a curve. The curve must be a plane curve.
This command starts a local curve definition, replacing the BASE command. The X command
is the same as would be given after CURVE in a curve definition. Similarly Y, Z; XY, XZ, ...
XYZ.
This command specifies that the base(s) shall be considered part of the surface, making it
closed. This requires that the base curve is closed.
Connection surfaces only: if both base curves are made with the general curve definition
commands, this option causes the facets to be placed so that corresponding definition points
are connected. The number of definition points must be same in both curves. Note: the normal
removal of redundant points is not done. The option LMAX may be useful in the curve
definition, in order to give an economical surface.
OK finish definition
This command explicitly finishes the definition. Any command not valid in the context will do the
same.
This command can be used in special cases when the normal determination of the orientation
has failed or given another result than desired.
OUT axis
axis: X, Y or Z, defining the outside to be in the given direction. -axis can be used for designating the
negative halfaxis.
OUT R
This command records additional information with the object as the value of a quantity defined
in the quantity standard (task FORM, command !FORM). The values can be fetched with the
function GM.QNT.
EXAMPLE
QNT ACODE A1
RC axis=q
axis=: (opt) X, Y or Z, defines the axis. It can be omitted if the orientation of the surface has been
determined.
q: reference coordinate
This command adds a named point for designated a location in the room. Can be plotted with
PLOT RP ... and accessed by the service function GM.RP.
RP id (x,y,z)
When calculating the area, the center of gravity of the area or the area distribution, this
command specifies that the surface shall be interpreted as one half of a symmetric surface.
The SYM command affects no other operations.
The facets forming a facet surface are derived from the polygon segments of the operand
curves. Especially in a double cylinder, there may be the need to improve the performance of
the surface by reducing the number of facets. This command assigns a tolerance for reducing
the number of segments, such that the result differs less than the given tolerance from the
original polygon points. The default is to remove only doubled points and internal points on
straight parts. The result of FORM is not affected in most cases. The angle between ploygon
segments set an additional restriction on the simplification.
TOL tol
This option is relevant for a connection surface where the matching curve parts do not lie in the
same plane (normal case). The four sided faces normally made will not define a surface
uniquely and the surface cannot be used as the owner surface of a surface object. The TRI
option removes these drawbacks but usually at the expense of a less smooth result.
The command defines an elementary room which is combined with the result of the
PRECEDING specifications in the room room definition, so that the result is the UNION of the
volumes involved. Note carefully the difference with respect to doing a logical combination with
COMBINE.
EXAMPLES
ADD 0 12 3 8 4 11
ADD R12A
A combined room or surface object is formed parts which are treated as a group, but without
any kind of geometric combination (as in ADD ...). In calculations, the results for the parts are
simply added. A part of a combined room can be defined as negative, i.e. the volume etc. is
subtracted.
part1,part2...: the parts. Prefix - (minus) defines a part to be subtracted. A transformation can be added in the
form name(transf). For defining the transformation, see expl TRA/GEN.
This defines an otherwise normal combination, but with a fraction attached to the parts. The
effect is to apply this factor to the volume of the parts.
COMBINE array()
Examples
ROOM STABHULL; COMBINE HULL RUDDER -BOWTHRUSTER
ROOM R1; COMBINE R1SB R1SB(Y/0)
!SELECT TYPE=R DATE>920319
ROOM NEW-ROOMS; COMBINE LIST()
ROOM STABHULL
COMBINE 0.99*MAINHULL 0.95*APP1 0.95*APP2
This command defines a numeric object by a set of calculation sections. The object can be
used in calculations only. The sections must be closed and have constant x.
This command specifies the tolerance by which it is decided whether a room section is
accepted as closed. Can be used in special cases, when limiting surfaces do not meet exactly.
DMAX tol
This command defines a curve or point that represents a given feature of the room. Presently
used for defining hatches in connection with sliding cargo. The information is stored as a
reference to the curve: later changes will affect the result. The features can be plotted by PLOT
room/feature.
FEATURE id curve
curve: geometry of the feature, point, curve or surface object. Special cases: A,F,P,S,B,T: aft, fore,
port, starboard, bottom or top of the room. Note that these may not be available for all shapes:
test by PLOT room/side.
EXAMPLE
FEATURE id (x,y,z)
H heights
This command defines heights related to the bottom and top of the compartment. If given with
signs, the values are interpreted as differences with respect to zmin, zmax or (zmax-zmin)
respectively.
The command must be the first one after the ROOM record and defines either the complete
room (if it is an elementary one) or the initial part, which can be modified by ADD, REDUCT,
REFLECT or SYMMETRIC commands
limit: limit specified by a surface and the side on which the room is located. The alternatives for the
surface are:
coordinate: coordinate of principal plane. The axis is implied by the side selection. The
coordinate can be given directly, by a frame number or any other type of #-reference. The side
selection is added before the surface, and the alternatives are:
axis>: to the positive side in the direction of the given axis, e.g. X>25. Analogically axis<.
<: to the inside of the surface, analogically >=outside. For example <HULL means 'inside'
HULL'
omitted: for the first six limits, there is a side selection default X>, X<, Y>, Y<, Z>, and Z>
respectively.
Special syntaxes:
R=r: round the corners with radius r. (Primarily intended for REDUCT).
D=d: translate the contour the distance d within the plane of the object and at right angles to
the curve (same function as PTR/MC)
With the special option <> the given limits are used as such and are not replaced by the owner
surfaces when the room is intersected. Rooms defined by the <> option are called direct limit
rooms. It is quite important that the first 6 limits are the outermost limits of the room i.e. the
extreme coordinates of the room can be estimated from these. The option !! of the intesection
comamnds X,Y and Z can be used to debug definition errors of direct limit rooms. Direct limit
rooms were first introduced for the function TPL.ROOMS('GEN' surfaces), that creates a set of
rooms limited by the given surfaces.
EXAMPLES
LIMITS, X>0, X<10, Y>0, 0, Z
LIMITS, 0, 10, 0, HULL, 0, TTOP
Example of using a transformation
ROOM ROOM2
LIMITS, ROOM1(X+10)
(equivalent)
LIMITS 0 Y
LIMITS BH1 #BH1+8 0 HULL Z
Example of direct limit rooms
ROOM R77
LIM <> TCBH1_M#187, TRN_LS_TOP#215, INNERSKIN_S,
INNERSKIN_P, INNERBOTTOM, S.DECKCOM,
Z>TRN_LS_TOP#187, Z
X>TRN_US_FWD#187, X>TRN_LS_FWD#187, X
X
Any command not belonging to the context has the same effect.
The orientation is normally determined automatically, but at need one can change
inside/outside or, if the geometry allows it, select another axis. Surface objects only.
OUTSIDE dir
dir: direction giving the orientation and the side designated as 'outside', alternative -X, -Y, -Z or +X,
+Y, +Z.
This command records additional information with the object as the value of a quantity defined
in the quantity standard (task FORM, command !FORM). The values can be fetched with the
function GM.QNT.
EXAMPLE
QNT ACODE A1
RC axis=q
q: reference coordinate
The command is otherwise analogous with ADD, except that the DIFFERENCE is taken
between the preceding part and the elementary room defined in the REDUCT command.
When given without parameter, the command has the effect that the result of the PRECEDING
specifications in the room definition is reflected about the center plane. With parameter, the
room to be defined is formed by reflecting the given room.
REFLECT, room;
room: (opt) name of other room to be reflected. If this is given, the room definition must contain this
record only.
This command adds a named point for designating a location in the room. Can be plotted with
PLOT RP ... and accessed by the service function GM.RP.
RP id (x,y,z)
EXAMPLE
ROOM R1234
...
RP MANHOLE (#BH1+1 0 #DECK2)
PLOT RP R1234
The command has the effect that the result of the PRECEDING specifications in the room
definition is reflected about the center plane add added to the unreflected part.
7. Auxiliary functions
The object (surface) given in the command will be used instead of an omitted one in the PREP,
UPDATE, GRID and SECT commands.
ASSUME name
AUTO ON/OFF/A
ON: set automatic drawing on (default). Concerns only the the curves explicitly changed.
AUTO /OFF/
CANCEL ALL
Cancel all current temporary definitions. A faulty object not accepted into the obj. administration
will not be noticed.
Select and list the set of objects and load it into the run time object administration. This allows
more information to be asked for with command INFO. The criterion has the standard form (see
!EXPL SEL/GEN), using subcriteria NAME, DATE, VER and TYPE. Alternatives for TYPE are
S=surfaces, R=rooms, SO=surface objects.
EXAMPLE
CATALOG NAME>T TYPE=R
The dates listed are the dates of the original definition, which may be different from the dates
listed by more general catalog functions, giving the dates when the descriptions where last
updated in the data base.
This command converts object stored in in pre-level D format to level D format, and stores the
result in the data base. This conversion is done automatically when an object in the old format
is encountered, but the result is not stored in the data base.
Convert all objects in the current version. This command will also cause the version to be
registered as belonging to level D.
This command copies objects inside the current version or from other projects or versions.
newname: name of the copy. The operation is not allowed if 'newname' is locked.
Copy set of objects from another project or version. By default, objects already existing are not
overwritten, see options. For general surfaces, the preparation result is also transferred if it
exists. Locked objects are not transferred. Arrangements (ARR*, STR*) are not copied, but
their parts can be.
objects: set of objects expressed by the syntax presented under DES, e.g. **HULL.
/project (opt) name of project, default=current. The project may be given by the name of the file
containing it.
options:
!: copy even if already existing, provided that the type matches. For parameter definitions
(PDEF*), !! is needed.
NQ: (no query) obey transfer restrictions without questions, default=allow decision for every
object that violates the restrictions. NQ is default if the command is run from a macro.
EXAMPLES
COPY FRF FRFOLD
Fetch HULL and all its parts (also the curves) from version A in project P1234. Allow
overwriting unless the existing object is of different type.
COPY *HULL FROM A/P1234 Fetch HULL and its directly referenced parts (e.g. HULLA,
HULLF). This is enough to make the object useful, but it cannot be changed.
Copy the rooms of arrangement A in version B, including all geometry they depend on.
Disregard any existing objects with the same name. The arrangement itself must be fetched
under SM (GET A/B).
By this command, a description of given objects is printed in the same form as given in the
definition. See also command EDIT.
*object: given object including referenced ones (directly referenced ones only). No sorting is
done.
**object: as above, but indirectly referenced objects are also included, down to a level
dependent on the type of object. The objects are sorted so that all references are backwards, if
possible.
****object: as above, but indirectly referenced objects are added down to the lowest level. If
several objects are named, the references are treated as defined for the first one.
array(): the operation concerns the objects stored in the given array. For example, the result of
the !SELECT command can be used (array LIST).
opt: options by which an approximative text form definition is created based on the polygon
representation of the curve. By using these options a NAPA definion can be obtained e.g. for
curves created by the GENERATE commmand or for curves created by the IGES interface etc.
The original curve is not changed, only the text form defintion is displayed. Any one of the
following options imply this function.
!!: display evaluated number results instead of the parametric variables. See command PDEF.
BRC=brc: number of branch (default=all branches). If the curve has many branches, the suffix
'_i', (i=branch number) is added to the name of the generated curve.
REF=surface: add references to the grid curves of the surface. A primary point is added to the
curve first in order; and a reference to the latter one.
REF2=alt: as REF=alt, but primary points are not added to the first curve in order
RTOL=rtol: a reference is added if two curves are within the distance rtol from each other
(default: 5*GMTOL)
FIX=D: keep original definition points e.g. special points of IGES curves
DEC=n: max number of decimals in the definition form (default=3). Note: has no effect on
XYZ-curves (they have always 3).
ORD=1: use ** ordering if the original curve has not a monotonically changing coordinate
ORD=2: use * ordering if the original curve has not a monotonically changing coordinate
EXAMPLES
DES, STEM, STERN
DES, (FR, 1,10,1) gives FR1, FR2, ... FR10
DES, **HULL gives complete def. of the surface HULL
DES, **ARR*A gives compl. def. of rooms in arr. version A,
excluding curves in the surface definitions.
DES, ****ARR*A gives total set of objects involved in
arrangement version A.
DES, X12 ! generate equivalent definition for section
curve X12
This command is in all respects equivalent with DES, except that the result is stored in the
editor work area and the editor is started. Within the editor, all editor commands are available,
including SAVE and REPLACE. Exit from the editor can take place the normal way (END,
OMIT), or by using the command ADD, in which case the contents of the work area will be run
as in *ADD. When EDIT is given without parameters, the editor is entered using the current
contents of the work area.
EDIT objects NL +
+: (opt) ADD the result to the current contents of the work area, default=replace the current
contents
Selected information is listed for given objects or objects currently in memory. The data to be
listed are selected with command LQ and the way of listing with command TOO or options in
the INFO command. See also command CAT (option LOAD).
objects: (opt) selection of objects, default=the one selected for intersecting, if any, otherwise all objects
in memory.
TYPE=t: selection according to the type, from the set of objects in memory (note!). The
alternatives for the type are S=surfaces, R=rooms, SO=surface objects, CR=combined rooms,
ER=elementary rooms, GR=general rooms, FS=facet surfaces, CS=combined surfaces,
P=planes. See also command CAT. Further selection can be done with table output option
SELECT.
ALL: all objects in memory. The set visible can be restricted with SELECT.
CALC: (opt) update calculation sections and surface obj. if needed. Done automatically if named
objects are given in the command.
The command can be used for definition curves only, and gives a list of points on the curve
including the data producing them.
LIST, curves P T N
curves: curves to be listed. The alternatives are the same as described for the DESCRIPTION
command.
P: (opt) list all polygon points. Default=only points corresponding to input points
N: (opt) use new list module using the general table output function, controlled by commands LQ
and TOO, with subject CUR. For quantities available, use command LQ CUR ALT. The
quantities TSX, TSY and TSZ are used only if there is a tangent function attached. To get the
tangent function on the other of a knuckle, add qualifier S.
With this command, accidental change of objects can be prevented by placing a lock that
makes the system refuse to define or redefine the locked object. (Optional feature). Without
parameters, the LOCK command gives a list of locked objects.
LOCK objects
objects: objects to be locked, either named directly or given by some of the syntaxes defined for DES.
LOCK CANCEL
EXAMPLES
LOCK HULLF
Lock the surface HULLF. Allows the curves to be changed, but without affecting the surface.
LOCK **HULLF
Lock the surface HULLF and all curves it directly or indirectly depends on.
This command controls the information to be output with commands INFO, LIST curve N, or
NLIST surface. The corresponding LQ subjects are GM, CUR, and NODE. Subject GM is the
default, the others must be given. For example, a list of quantities available by the NLIST
command is obtained by LQ NODE ALT. For a list of alternatives of INFO, use LQ ALT. For
more information about the command, see !EXPL LQ/GEN.
For length quantities (e.g. CGX), a reference coordinate can be given as qualifier (coordinate
value or 'XREF', e.g. LQ ... CGX/XREF ...).
Standard selections for INFO are provided under the following names:
STD: type,date,x-limits,status
EC: all extreme coordinates
ADM: administrative oriented data
AREA: area oriented data
LQ NODE and TOO controlled listing function for patch surfaces. Available quantities are listed
by LQ NODE ALT.
selection: (opt) selection of points. As a default all node points i.e. intersection points between the grid
curves are listed.
TAB*table: points of a table, that contains at least two of columns X,Y,Z. If all coordinates are
given, the nearest point on surface is selected. Otherwise the third coordinate is interpolated
from the surface.
EQP=*n: as above, but points in boundary of the original patch are omitted.
options:
SEP: list all points separately. As a default, only distinct points are listed. With option SEP
duplication of points is allowed.
EXAMPLES
LQ NODE NR X Y Z C1 C2;
NLIS HULLA; Coordinates of the node points and names of the intersecting curves are listed
PRO Y; DEF; NLIS HULLA (3.5,4.0); Coordinates, and inclination and curvature of the principal
plane sections are calculated at the digitized point on the surface.
NLIS HULLA WL1A; inclinations of the curve in the projection z are calculated before and after
the node points.
List corner points of the patches 3 and 4. Common points are listed only once and the patch
number 3 is stored to the table PN/S1 and 4 to the table PN/S2. By using the command NLIS
HULLA 3 4 SEP; the common points are duplicated and the table PN/S2 is empty.
This command renames objects in the data base, and optionally corrects any references to
them
newname: new name The operation is not allowed if 'oldname' or 'newname' is locked.
RENAME GLOBAL
This form starts the process where not only objects are renamed, but all references to these
are changed. The references are changed in other objects, in arrangements and in loading
conditions. The renamed objects can be surfaces, rooms and surface objects only.
This function has presently been tested in small scale only, so it is strongly recommended to
see that a valid back-up copy is available.
The objects to be renamed are inquired after entering the RENAME command. Before the task
is carried out, opportunity to cancel the operation is given.
It is advised that the list of renamings is prepared in advance and then added. This list is
formed by name pairs
oldname1 newname1
oldname2 newname2
....
with one pair/line. After answering OK, the actual process is started. An object mentioned
without a following new name is corrected for references only.
This command removes objects from the run time memory and is intended for saving time and
memory when large amounts of objects are used but only temporarily. It should be used
carefully because it may affect current operations. Before removing it is checked that the
objects are not referenced by remaining objects or by arr* or STR* tables. The operation
concerns object handled by the object administration (surfaces, rooms and surface objects).
RMV !
This forms removes all objects present. Objects referenced by active ARR* and STR* tables
are restored.
options: (opt)
PP: include any objects referenced by the given one and not referenced by any remaining
object.
F: force, remove without the checks mentioned above. Saves time in case it is known in
advance that the object can be removed.
N: raise no event. By default, the event GM.REMOVE is raised for every object removed.
The command stores a list of objects in the calculator array LIST. This array can then be used
in a macro, for controlling a !DO command or in the general selection syntax (i.e. SEL
NAME=LIST()). If the array LIST exists, it is used, else a new one is made. The list is sorted
according to dependences.
objects: set of objects selected with the syntax presented under DES.
type: (opt) keep only objects of given type: P=points, C=curves, S=surfaces, R=rooms, SO=surface
objects. >type, <type: keep also types after/before the given one in the sequence above.
EXAMPLE
SELECT **HULL
The array LIST will contain the names of the partial surfaces of HULL and all curves used in
the definition of it.
SELECT **HULL
This command sets temporary definition mode on/off. While this mode is on, definitions are
saved in the run time memory but not stored. The objects defined this way can be used in the
current run (in any task). Handling temporary definitions is installed on pilot level only.
TEMP ON/OFF
The options concern the output done with command INFO or with command LIST curve N. The
former subject (GM) is default, the latter (CUR) must be given, e.g. TOO CUR. For an
explanation, use !EXPL TOO/GEN.
UNSAVE objects;
objects: objects to be deleted, (see command DESCRIPTION) The objects must not be locked. NOTE:
an object read into the run time object adminstration (rooms, surfaces, surfac objects) remains
until !GM RESET is done or the version is changed.
This command defines the way general surface is divided into facets. This definition is stored to
database, and it is used in future, until cancelled by 'SFG surface OFF'.
option: (opt)
This command allows specification of where or how many calculation sections shall be
generated for an object, and other aspects related to volume calculations. This specification
can be given for rooms and surfaces. Note that calc. sections are not generated separately for
combined or reflected rooms, and any CSECT command must be given for the basic object.
Defines discontinuities at given x-values. One (or no) asterisk means a discontinuity in the
slope of the frame area curve, while two asterisks or character < means a jump in the frame
area curve.
object: name of object NOTE: this parameter is not given when the CSECT command is given as part
of the definition of an object (=directly after the definition of the geometry).
These forms defines the number of sections to be generated and (optionally) discontinuities.
object: as above.
x1,x2,...: limits for the x-intervals. The x-values may be preceded by asterisks as described above for
defining discontinuities.
CSECT >n
Defines the minimum number of sections: this defines the initial set, which may be extended if
accuracy requires it.
Specifies plating thickness =d, possibly in addition to instructions regarding sections. NOTE: d
is given in the normal unit (m). Option PT without value means that the plating thickness shall
be added using the value stored in the reference system (default if the object name contains
the hull label defined in the reference system). A plate thickness that varies with the height can
be given as
CSECT PT=(p1,z1,p2,z2,...pn)
SF=factor: Gives shell factor as alternative to PT: the VOLUME will be increased by the given
factor.
H: The H option is relevant for open surfaces, allowing volume calculations to be done
according to the principles applied for hull surfaces: close the surface by reflection about y=0,
nominal volume=to the design draught. This option is default if the object name contains the
hull identifier (parameter HLID in the reference system).
AFPS: allow failed partial sections. This option has been added for cases where the sections
fail in an ADD or RED part but this failure is actually the correct result. This option prevents the
whole object from being rejected. If the object as a whole fails this way in some x-interval this
option does not help but it is taken into account if the object is used as an ADD or RED part.
CSECT object -
As above, but the calculation sections are calculated by another method (=N). Two sets of
sections are created. SECTIONS0(name) for the moulded object and SECTIONS(name) for
the object with a thickness. The N-method is used if explicitly asked by the N-option or if the PT
option contains alternatives that are not supported by the other method.
thickness:
PT: use parameter SHELL of the reference system (option N required for the new method)
PT=(t0,s1,t1,s2,t2,...tn): variable plate thickness defined by the thicknesses t0,t1,... and the
separators s1,s2,.... Thickness t1 is valid in the region defined by the separator s1 etc. The
following separators are available: names of objects, planes in syntax axis=q, STR*models,
3d-regions defined by any combination of axis<q or axis>q, z-coordinates (equivalent to
3d-region z>coordinate).
N: (opt) new way of making the calculation sections Some examples (with an implicit N-option):
CSE ROOM PT=STR*HULL CSE ROOM PT=(0.01 'HULL' 0.02) CSE ROOM PT=(0.01, 'Z>4
Z<6', 0.02 'HULL' 0.03 'Z=10' 0.04)
The command defines draughtmarks to be used in drawings. The curves on which marks are
must be defined before this command can be used.
DRM, curvea, inta, textha, curvef, int, texth, min max unit
textha: text height for the marks at 'curvea'. 'inta' and 'textha' can be omitted if they are the same as
'int'. 'texth'.
Examples
DRM, STERN, 1.0, 0.5, STEM, 1.5, 0.4, M
DRM, STERN, STEM, 2, 1, FEET
GEN HULLAT X>... HULLA TYPE=P
This command starts the fairing function for a given curve. Selected points are moved within a
tolerance in order to increase the fairness of the curve. If automatic drawing is on, the result is
drawn. The result is stored if explicitly specified, otherwise the result is available in the run time
memory under the name curve-F.
tol. (opt) tolerance, default 10*polygonization tolerance. With explicit sign, a one-sided tolerance is
specified, so that +=move outside only, -=move inside only.
points: (opt) selection of points to be moved, default=all internal points (excluding endpoints)
p1,p2...: selected points, where p=(u,v) (point in the projection plane) or axis=q (point with
given coordinate). In both cases, the nearest definition point is taken.
direction: (opt) direction into which points are moved, default=coordinate direction nearest to the curve
normal.
SAVE=name: (opt) save result under the given name, different from the curve name. Default is that the result
is saved in the run time memory under name name-F, e.g. WL10-F.
EXAMPLES:
FAIR WL2F L
The curve WL2F is faired according to the defaults. The result is drawn (if AUTO given) and the
changes applied are listed. The curve is not changed.
The curve is faired by moving primary points only. All changes are done by changing the
y-coordinate within a tolerance 5 cm. The curve is changed according to the result.
A text is stored as a curve in the space coordinate system for the purpose of being in drawn in
3D.
FONT=font: (opt) font, default EL. The font must available under this name in the sysdb or napadb (logical
fonts not available).
The command PLOT curve; will draw the text in the current projection. More general orientation
of the text is obtained by using MC (modify curve).
This command defines new objects by performing operations on other ones. The result is a
self-contained object which may be a curve or a surface.
The result is written into the data base and the DES command can be applied on the result.
The '!' option is is needed to overwrite an existing object of different type.
Overview of alternatives:
SECTION Section
----------------------------------------------
An intersection is calculated
quantity=val: calculate lines of constant quantity (patch surfaces only). The following quantities
are available: IX,IY,IZ: inclination in given plane, DX,DY,DZ: curvature in given plane, M: mean
curvature, G: gaussian curvature
surface: name of surface, by which the given object is intersected. Note: If the object is a room,
the syntax room/*surface gives the part of the room boundary that is located in the surface. If
there is no such part, room/*surface returns the intersection as a curve. The syntax
room/surface returns the section with the volume as a facet surface. With the option C, the
section room/surface is returned a curve.
*curve: intersect with a cylinder generated by the plane curve and an axis perpendicular to the
plane (patch surfaces only). If needed, the plane can be given in the form object/*axis=curve.
/transformation: (opt) reflection, translation etc. specified as described under !EXPL TRA/GEN. Only for plane
sections.
options:
S: make surface instead of curve (only for sections with closed objects)
DREC: add direction to the result for use of SB-link (patch surface / plane, cylinder or patch
surface).
EXAMPLES:
GEN R10SECTION R10/Z=12
GEN EQUAL_INCLINATION R10/IZ=10
GEN DC1 HULL/DECK1
GEN TTOP+1M TTOP/(Z+1)
GEN CTEST HULL/X=#10 DES='frame 10'
GEN PROFILE ARR*A/Y=0 MERGE
--------------------
name: name of object. If the object is a combined one, the operation is done for the parts.
options:
F: force intersecting, even if valid sections are available. It can also be used to cancel the effect
of the R-option.
R: 'rescue' existing sections from being recalculated. This option can be used for saving time
when the effect of changes in the hull or other surfaces are considered insignificant, or
accurate volume oriented quantities are not needed for current purposes. This option does not
affect rooms directly redefined.
EXAMPLE:
GEN CSE ARR*A F
----------------------------------------
A trimmed patch surface is generated. A trimmed surface can also be created by SURFACE
name; TRIM ...; which will be subject to the dependence management.
surface: name of the object to be trimmed. The object can be a surface or a surface object.
Transformed objects such as surface(x+1,z+3) can also be used.
limitation: a restriction defined by <obj, axis<q, axis<obj etc. - The limiting object can be a surface or a
curve lying on the surface to be trimmed. - Some of the limitations may be given before
'surface', meaning that parts of the corresponding surfaces (as defined by the other limitations)
are taken into the result. It is also possible to define the task by a set of limitations only (in the
same way as a room is defined by the LIMITS command). If some of the limitations are
collected into parenthesis the corresponding surfaces are omitted from the result. - In the
tpl-based trimming (option MODE=N), the type of the limit can be described in more detail by
using << or >> e.g. Z>>TTOP in those cases where the given surface alone defines the upper
of lower limit in a certain direction.
BTOL=btol: object specific combination tolerance of patch-sections. The global default is controlled by !GM
BTOL btol, and defaulted to 0.001.
OUT=alt: (opt) orientation The following alternatives are available: alt= x,y,z,sur or -alt, where sur is the
name of an operand surface.
DEBUG=alt: (opt) check of the trimming process The following alternatives are available (MODE=O
trimming only):
i: patch number
314: standard form of generated patch surfaces (defaulted when there are less than 1400
patches)
MODE=opt: (opt) mode of operation The following characters in opt are available:
-E: do not add surface boundaries to the tpl-model; this option can be used if the trimmed
region is totally inside the surface
EXAMPLES:
GEN hulla-top TRIM hulla z<10 DES='part below z=10'
GEN hulla-skeg TRIM hulla >skeg
GEN hulla+skeg TRIM >hulla >skeg
GEN hulla+skeg TRIM >hulla >skeg(z+0.01)
GEN hulla+skeg TRIM zskeg out=y
GEN box TRIM x>0 x<1 y>0 y<1 z>0 z<1
GEN box-top TRIM x>0 x<1 y>0 y<1 z>0 (z<1)
GEN hullat TRIM x>cyl1 hulla
-------------------------------------
A surface is trimmed by a curve lying on the surface. The task can be done by the 'GEN
surface TRIM ...' command also, but here another method is used. The same method is used in
the STEP link, when a patch representation of the curved plates (NAPA Steel) is generated.
TYPE=-NURBS: patch
TYPE=NURBS: nurbs
-------------------------------------
Internally a surface object with one LIMIT command is generated, but the result is expressed
as a general facet surface.
surface: an object to be restricted. The object should be a facet surface or a surface object. Otherwise a
conversion to a facet surface is done with the given tolerance.
EXAMPLES
GEN deck LIMIT deckcyl <+hull
GEN box LIMIT boxcyl 0 1 0 1 0 1 DES='the unit box'
GEN box LIMIT boxcyl x>0 x<1 y>0 y<1
GEN bhpart LIMIT bh1 z>ttop z>mdeck
------------------------------------------
EXAMPLE:
GEN bh1p PLIMIT bh1 z<5 z>pla1 DES='part of a bh'
------------------------------
surface: an object of NAPA. In case of some facet surfaces (=cylinder, double cylinder, rotation surface,
pyramid, connection surface), the spline representation of the definition curves is used if that
one is available, and there are much less patches than facets in the surface. Otherwise one
patch is created for each facet.
STYP=type: (opt) type of the created patch surface. Type 314 is the default for generated patch surfaces
containing less than 1400 patches. Otherwise the type 312 is defaulted. In the latter case, the
storage format of a preparable surface is used, and the patches are stored in the desription
P*surface, and there is no upper limit for the number of patches.
BTOL=btol: object specific combination tolerance of patch-sections. The global default is controlled by !GM
BTOL btol, and defaulted to 0.001.
EXAMPLES:
GEN DECKP PATCH DECK DES='patch repr. of a deck'
GEN HULLP PATCH HULL P=(1,4/2)
------------------------------
EXAMPLE
GEN HULLAF FACET HULLA TOL=0.1 DES='hulla faceted with a tolerance'
---------------------------------
EXAMPLE:
GEN B BOUNDARY HULL DES='boundary of hull'
----------------------------------------
An offset surface i.e. a surface translated along the surface normal is created.
D=offset: distance between the two surfaces Only small offsets that can be done without changing the
patch structure are allowed.
BTOL=btol: (opt) object specific combination tolerance of patch-sections. The global default is controlled by
!GM BTOL btol, and defaulted to 0.001.
EXAMPLE:
GEN HULLO OFFSET HULL D=+0.1 DES='a larger surface within distance
0.1'
-----------------------------
This form makes a surface from a wave defined for calculations. Wave inclinations over 60
degrees are ignored.
EXAMPLE:
GEN WAVE-SURFACE WAVE WAVE1
B5 B/5 surface
----------------------
This form makes a surface representing the b/5 limit or variations of it.
hull: name of hull surface from which to generate the b/5 curve
S: make symmetric
-------------------------------------------
This form generates a curve formed so that at each argument the largest value of the given
coordinate in the curve set is taken. Alternative MIN is analogous and alt. ENV is the
combination of MAX and MIN. The first curve must be a principal plane curve, and the result
will be of the same type.
options:
TOL=tol: tolerance used for cleaning redundant points, default=GMTOL. Minimum distance
between arguments=5*tol.
This form is otherwise similar with a normal combined surface, but the result is a self-contained
object represented as a facet surface.
-------------------------------------------
(transf): (opt) transformation, see !EXPL TRA/GEN for alternatives. (The parentheses are part of the
syntax).
-----------------------------
Some link functions (IGES,STEP) can create surfaces that contain It is possible to obtain the
equiparameter curves of the NURBS surface by the 'GENERATE target EQP ...' command.
target: (opt) result of the conversion. The result is a wireframe surface containing the curves defined
by the C=name option. If this option is missing the result is a curve with the given name. In the
latter case the name can contain the substring '%BRANCH' that is replaced by the branch
index when each branch is stored separately into the database.
source: (opt) a surface that contains also the NURBS representation. Such a surfaces can be created
by some link functions (STEP,IGES)
C=rule: (opt) naming rule of curves. The naming rule may contain the substring '%BRANCH'. In that
case each equiparameter curve is stores separately with a name obtained by replacing
%BRANCH by the branch index.
P=dir: (opt) direction of curves 1,2: along the 1st or the 2nd parameter direction; 0= both directions
Examples:
GEN SUR1 EQP NURBS1 C=EQP%BRANCH
GEN CUR1 EQP NURBS1
GEN EQP%BRANCH EQP NURBS1
GEN SUR_U EQP NURBS1 C=U%BRANCH P=1
GEN SUR_V EQP NURBS1 C=V%BRANCH P=2
CSCURVE
This form generates a curve or a surface from the calculation sections of an object.
restr: (opt) restrict the result with a surface and/or x-coordinate, alt. y>name, y<name, z>name,
z<name, x>coord, x<coord
F: make the result formally a facet surface. The sections form the faces of the surface, see
option S for representing the wall.
S: make the result a surface representing the wall. The result may be poor if the room changes
significantly between two discontinuities.
This command starts a subtask where functions of the hull editor can be used by commands. It
has primarily been developed for the purpose of testing the functions of the hull editor, i.e. the
set of service functions in the group GME.
This command gives access to a number of curve modification tasks, such as translation and
rotation. This subtask is primarily intended for various special cases, and the result is in most
cases only a curve form, without associated information needed for instance in hull definition.
MC curve
curve: (opt) name of curve to be modified. The curve can also be given by a separate command
(GET) after entering this one.
This command changes the orientation registered for a surface and optionally reverses
inside/outside. The latter is possible for facet surfaces (defined by CYL, DCY, PYR, CNS, ROT,
FCS), a surface created with GENERATE or read by a link function. This function is intended to
be used when the automatically determined orientation is wrong or when several
interpretations are possible.
OUTSIDE name s !
s: alternatives:
axis: (X, Y or Z): the surface is defined to have an orientation essentially perpendicular to the
given axis, the outside being in the positive direction of the axis.
-axis: as above, but the outside is in the negative direction of the axis.
N: none=the orientation is undefined because the surface has such a form that no direction is
useful
R: (reverse) change inside to outside and vice versa (without changing the classification).
A: adjust the direction of patches to make a surface that has a well defined globally consistent
outside. This option is needed e.g. when several independent NURBS surfaces are packed into
a single NAPA surface by a link function such as IGES or STEP.
G: according to geometry
GP: according to geometry but directed along the positive coordinate axis
!: (opt) force the change even if the selected orientation is not reasonable according to the
geometry criterion applied.
OUT name
Output the result of the geometry criterion for the most natural orientation. The output includes
the components of the average normal. The test for a given orientation is that the
corresponding component must be >0.25.
This command adds or changes a quantity associated with a geometric object. NOTE: the date
of the object is not changed. The values can be fetched with the function GM.QNT.
value: value of the quantity, one or several. May also be an array reference of the form arr().
EXAMPLES
QNT R1234 ACODE A1
QNT R1234 H HARR()
This command defines the reference coordinate of a surface or surface object. The reference
coordinate defines the nominal plane used when interpreting references of the form #BH1 or
#BH1+0.5.
RC name axis=q
name: name of object (only when the RC command is given independently of the object definition)
This command defines a reference point in a given object. It does the same function as RP
when given as part of the object definition but as an independent operation.
EXAMPLE
RP BASE1 DP #2
This command sets temporary definition mode on/off. While this mode is on, definitions are
saved in the run time memory but not stored. Handling temporary definitions is installed on pilot
level only.
TEMP ON/OFF
This commands defines a wave as used for hydrostatics in waves. If geometric operations are
needed, the wave can be converted to a surface with the GENERATE command.
WAVE name
height: wave height measured from hollow to chest. If the value given is negative and the POSITION
alternative is not given the wave will be in hogging position, otherwise in sagging position.
length: (OPT) length of the wave (default = reference length of the ship)
angle: angle between the ship's and wave's moving directions. The wave comes from the port side if
angle is positive and orientation is left handed or angle is negative and orientation is right
handed. Otherwise the wave comes from the starboard side.
9. Link functions
This command defines where to store the result when using commands TOSBH,TOSBD,
TOHSVA, TOIGES, TODXF and TOVDA.
FILE file
'file' file name given directly. Must contain a slash or a point. Slashes (/) are used as delimiters
(also in Windows).
directory>file: old way, where the directory is given separately. In the two cases above, all
output goes to the given file.
*suffix: as *, but the given suffix is added after the object name
FILE CLOSE
Close the current file. If not done before, it is done at exit to task level.
EXAMPLES
FILE '/test/geom/linkoutput'
FILE '/test/geom'>linkoutput
Objects are transferred from SIKOB, IGES, BLINES, VDAFS, DXF or from the KHI lines
system to Napa.
----------------------------------------
The versions SIKOB77 and SIKOB74 are supported, If the first item in the line for the reference
dimensions is 2 instead of 1, the file is supposed to be in the format of SIKOB77. Otherwise,
the older format is used.
The link from SIKOB74 may be controlled by adding comment lines to the SIKOB-file. The
following options are available:
dir2>file2: Name of the resulting text file containing the NAPA definition of the hull.
options:
ORDER: apply ordering data of the SIKOB77 file. The grid curves are listed in the THR
command in the required order. A frame, that obeys the ordering, can be created by the
commands 'CUR name; X xval; XY * *HULL'. Note that by using 'ZY *HULL', the points are
ordered by the increasing z-values. If the ordering data does not contain all curves of the grid,
the order obtained by XY * *HULL can be wrong. In this case the general ordering option ** can
be used. XY ** *HULL orders the points so that a feasible curve can be fitted through the point
set.
DEBUG: show information about the SIKOB77 transfer The structure of the file is listed (start of
each datasheet, some entities, and the 'blank cards'.
Examples:
FROM SIKOB TEMP>HULL.SIKOB TEMP>HULL.NAPA
---------------------------------------
file: name of the text file containing the IGES data. (dir>file, or the directory path in apostrophes)
name: naming rule for the resulting NAPA objects The rule is evaluated for each selected
entity. Entities that get the same name are packed into the same NAPA object. If there is a type
conflict the entity is omitted. For example a surface cannot be appended into a curve. The
following 'variables' can be used as substrings: %NAME: name in the IGES file (for unnamed
entities the variable is replaced by %TYP%IND) %TYP: X,Y,Z,C,S for x,y,z-curves, general
space curves, surfaces %IND: incremental index for x,y,z-curves, space curves, surfaces
%TYPE: C for curves and S for surfaces %INDEX: pointer to IGES directory (1,3,5,...)
%BRANCH: index of curve branch (1,2,3,...)
CAT: list content of the IGES file. The list is controlled by the command LQ IGES. The
available quantities are shown at the end of this command description.
EQP=n: subdivide each knot sequence into n-parts. As a default the subdivision is controlled
by the option TOL=tolerance (default=GMTOL).
EQP=(nu,nv): as EQP=n, but diffrent subdivisions are are given for the 2 parameter directions.
TOL=tol: tolerance for the approximation of NURBS entities that are rational or whose degree
is greater than 3 (default=GMTOL).
TOL2=tol2: polygonization tolerance for the trimming curves in the parameter space of the
surfaces. If tol2<0, a tolerance relative to the extents of the parameter region is given. Default:
TOL2=-0.001.
OUT=alt: outside of surfaces Definition of the outside is required, if several NURBS surfaces
are collected into a single NAPA surface, and the directions of the NURBS surfaces are
incompatible (e.g. two neigbours have outsides y and -y). The following alternatives are
available. X, Y, Z, C (=closed), R (=reversed), A (=adjusted so that the outside is well defined
but otherwise arbitrary), G (=according to geometry), IGES (=as in the iges file =default), -alt
(as above but inverted).
NX=s: string replacing %TYP in the name of x-curves (default: NX=X). If the given string has
the character *, it is replaced by the smallest integer (>IX=i) that makes the name unique in the
database.
IC=i: lower limit of %IND for general space curves (default: IC=0)
UNIT=sca1: scaling factor from IGES units to meters (default: accept the unit data in the IGES
file)
CON=1: omit curve parts in the Y=0 plane (default for Tribon files)
CON=0: read IGES curves as such (default if the file is not made by Tribon)
selection: (opt) selection of the transferred entities The selection is done in the standard NAPA way (see
!exp sel/gen) by using the quantities of the directory section that are listed at the end of this
command description.
Examples:
FROM IGES TEMP>HULL CAT
catalog of the iges file
FROM IGES TEMP>HULL.IGS
create surfaces S1,S2,S3,...
x-curves X1,X2,...; y-curves: Y1,Y2,...; z-curves: Z1,Z2,...
general space curves C1,C2,...
FROM IGES TEMP>HULL.IGS N=*
as above, but the indices are selected so that existing
names are avoided
FROM IGES TEMP>TID_LINES.IGS NX=FR* SCAX=@320/20
Transfer x-curves from the IGES file created by TID
so that the x-coordinates are multiplied by 10.
FROM IGES 'temp/hull.igs' HULL
all entities -> HULL
1st entity defines if HULL is surface or curve,
entities of conflicting types are skipped
FROM IGES TEMP>HULL.IGS HULL (ENT=128 OR ENT=144) AND DEP=0
as in the previous example but ensured
---------------------------------
Curves are transferred from BLINES to NAPA The input file is obtained by the command 'DATA
CURVE/FILE=name' of the system TID Lines. This command creates one file for each curve,
but the user can manually combine these files into a larger file that is used by the link. The
names of the NAPA curves are taken from the items 'FILENAME: name' of the input file.
file: name of a file containing a list of curve coefficients i.e. knots and control points of the third
degree polynomial B-spline curves of BLINES. The curves are converted into the spline curves
of NAPA. The polygone representation with the current GMTOL is also calculated.
+surface: (opt) as above, but the curves are added to an already existing surface
Examples:
FROM BLINES '/napa/temp/hull1.blines' HULL PO='TOL=0.003'
FROM BLINES '/napa/temp/hull2.blines' +HULL
---------------------------------
file: text file containing either calculation results, or offset points of hull.
TAB*table: name of table. It may contain a variable NAME. If there are many surfaces in the file, a
separate table for each surface is created and NAME replaced by name of the surface.
options:
--------------------------------------------
The geometry is transferred so that there is one to one correspondency between the definition
points and angles of the KHI and NAPA curves. Some data i.e. the 'WL interrupts' and the 'BL
interrupts' are not transferred.
From the NAPA file, a surface is created by : 'DEF>EDI; GET dir>napa-file; ADD'. Additional
waterlines etc. must be added before the surface is preparable. For example, a waterline at
z=1 is created by 'CUR Z1; Z 1; XY *surface'.
dir: directory
N: The name of the x-section is a combination of 'X', KHI name, and 'F' or 'A'.
F: The first point and direction of an x-section is not adjusted even if RF>0 in the middle frame
(RF= rise of floor)
TOL=value: In the case of a rising floor, the adjustment of coordinates (and directions) is done
only if the point changes less than a given tolerance (default= RF, rise of floor)
F0: In the case of a rising floor, adjust all points. As a default, the first point only is adjusted.
Examples:
FROM KHI temp>line1077 temp>napahull
---------------------------
Transfer VDAFS data into NAPA. Only the entities SURF (untrimmed surface) and FACE
(trimmed surface) are supported.
CAT: (opt) list content of the VDAFS file. The following quantities are shown:
NAME=rule: (opt) naming rule for the created NAPA objects The naming rule is a string where the following
variables can be used:
For example, if the options NAME=SET TYPE=SURF are used, all SURF entities belonging to
the same set are collected into the same NAPA surface whose name equals to the name of the
related set.
EQP=n: (opt) subdivision of SURF entities. Each surface element is subdivided into n*n patches.
OUT=alt: (opt) orientation of the created surface(s) The following alternatives are available.
G: according to geometry
R: reversed
C: closed
is allowed.
selection: (opt) Selection criteria for the VDAFS entities to be transferred. The selection options must be
the last parameters of the command. The general selection criteria (!exp sel/gen) are available
for all the quantities shown by the CAT option.
Examples:
FROM VDAFS TEMP>VDA CAT
List content of the VDAFS file
-------------------------
The curves in a DXF-file are transferred into the database of NAPA. A polygone representation
without any definition data is created. Three or two dimensional DXF data can be used. The
name of the transferred curves is a combination of a prefix and an index. As a default, the
principal x,y and z-curves are called X1,X2,...,Y1,Y2,...,Z1,Z2,... and the other curves C1,C2,...
.
dir>file: dxf-file
PLOT: (opt) the result is only plotted The drawing is in the 3d-format and e.g. PRO I is available.
DRAW: (opt) as PLOT, but the linetype definitions (color etc.) are taken into account
surface: (opt) surface name A surface containing the transferred curves is created.
NX=s: (opt) prefix for the names of principal x-curves (default: NX=X)
NY=s: (opt) prefix for the names of principal y-curves (default: NY=Y)
NZ=s: (opt) prefix for the names of principal z-curves (default: NZ=Z)
NS=s: (opt) prefix for other than principal plane curves (default: NS=C)
IS=i: (opt) start index for other than principal plane curves (default: IS=0)
SETUP=name: (opt) name of the setup macro searched from db7,db2 and db1 in the given order. (default:
SETUP=DXF*NAPA*TYPES)
UNIT=val: (opt) scaling factor of coordinates. The coordinates in the dxf-file are multiplied by the given
factor. The default value is given in the setup macro by the command 'UNIT val'. In the
defaulted setup macro DXF*NAPA*TYPES in DB7 the command is UNIT 0.001. If there is no
UNIT command in the setup macro, the defaulted value is 1.
LAYN=layers: (opt) transfer only the givel layers The layers are given in a string separated by spaces;
wildcards are supported.
COMBINE: combine curves so that gaps smaller than GMTOL are eliminated
COMBINE=gtol: combine curves so that gaps smaller than gtol are eliminated
COMBINE=(gtol,atol): combine curves so that gaps smaller than gtol are eliminated provided the angle between the
curves is less than the value related to atol=abs(sin(angle)); 0.0<=atol<=1.0 i.e. 0<=angle<=90.
Examples
FROM DXF TEMP>HULL.DXF PLOT ;** plot only
FROM DXF TEMP>HULL.DXF ;** transfer curves
FROM DXF TEMP>HULL.DXF HULL ;** create surface also
E Examples
----------------------------------
3D-dump files of CADMATIC (*.3dd) can be read into NAPA. The dump should be created so
that all CADMATIC surfaces are represented by the general facet surfaces of CADMATIC type
FS. The 'component templates' of the file are stored into an EQT*table. Their instantiations and
the 'inline components' of the file are stored in an EQP*table. The following should be noted:
- The existing EQP* and EQT*tables with the same same are replaced by the new ones
created by the interface
SUR=rule: (opt) naming rule of the NAPA surfaces (default: %B%I) The following 'variables' can be used -
%B: T for component templates; I for inline components - %I: cadmatic identifier
SUR=OFF: (opt) surfaces are not transferred into the NAPA database, but only references to the related
CADMATIC objects are stored in the FORM column of the EQP*table. The reference is of the
form '{offset}dir/file.3dd'. The actual geometry is always read from the file when needed.
SEL=alt: (opt) selection of CADMATIC items. Any combination of the following alternatives is available
(default: TCI): T : component templates C : component instantiations I : inline components
TSEL=s: (opt) selection of component templates and instantiations. Only those component templates
that match the given string with witdcards are selected.
Examples:
FROM 3DD temp>t1.3dd
FROM 3DD TEMP>T1.3DD SUR=OFF ;** use references to t1.3dd
FROM 3DD TEMP>T1.3DD SUR=OFF SEL=TC ;** omit inline components
FROM 3DD TEMP>T1.3DD SUR=OFF EQP*T1 EQT*T1 ;** use nondefaulted tables
Surfaces of Napa are transferred into the definition format of the KHI lines system.
This subtask handles generation of panel models for CFD calculations. It is a newer version of
the original PANEL task.
This subtask handles generation of panel models for CFD calculations. See NPN for revised
version.
The command controls generation of data related to the circle representation in connection with
definition or updating of curves
SB ON/OFF
SB TOL=tol
This command stores in a file the data defining a surface for the so called preliminary surface
of SB.
SBP name
---------------------------
Patch and facet surfaces (with some restrictions) are written into an ascii file, that can be read
by the OPTISCAT system.
Z<q: (opt) elements that are totally in the region z<q are skipped
Examples:
FILE TEMP>DATA; TO OPTISCAT HULLA HULLM HULLF;
FILE TEMP>DATA; !SEL NAME>HULL; TO OPTISCAT LIST();
---------------------------
objects: (opt) objects to be transferred, either name of STR*table or by syntaxes of the DES command.
file: (opt) result file. If omitted, there must be a file open from the preceding TO VRML (option
CONT given).
'file': name of file in apostrophes including the directory path e.g. '/n/napa/temp/ship.wrl'. If the
name contains no suffix, the suffix .wrl is added.
options:
COL=ind: (opt) colour of the objects As a default, the colour is read from the columns LFCODE
or FCODE of the STR* table (if available).
TEXT=text: text for the individual object, default name of object. If the structure arrangement
contains the TEXT column, it is used.
LINK=file: name of file to which a link is established. If the structure arrangement contains the
LINK column, it is used.
CONT: the file is left open so that additional entities can be appended into the same file
Examples:
----------------------
NAPA geometry is converted into the GDL format.The related MDL file is also created. The
conversion is controlled by the macro GDL*TYPES that is searched from DB1,DB2 and DB7.
The commands of the macro are explained by !COM G98 and !EXP comand/G98. The macro
assigns default values to the options of the TOGDL command. (GDL = Geometric Description
Language of Cadmatic, MDL = Model Description Language of Cadmatic)
D=n: (opt) number of decimals in coordinates Default D=99: select according to size
F=n: (opt) field length of coordinates Default F=0: use dynamic format
----------------------
Examples:
TO 3DD DK1 FILE='c:/napa/temp/dk1.3dd'
Objects of Napa are written in the DXF format to the file defined by the command FILE. Only
the entities section of the DXF standard is created. As a default, the units of the x y and z
coordinates are those set for the corresponding quantities in the FORMAT task or by !FORMAT
command. The default is meters, but e.g. millimeters can be used.
-------------------
Curves or the boundary of surface objects are linked to DXF. All polygone segments of a curve
are linked. Plane sections can be transferred also by using the command sequence
DR>STORE DXF options; intersections...; STORE OFF.
objects: a set of objects given by the same syntax as in the command DES ( name, *name, **name,
(name,i1,i2), list() etc.)
E: extended entity data. An 'extended entity data' called NAPADATA is connected with each
object. Name of the object is stored there. This is probably a feature not supported by all
programs that can read DXF-files. As a default NAPADATA is not added to the file. For more
information about the 'extended entity data' in AutoCAD, refer to the manuals of ADS or
AutoLISP. A registration of NAPADATA is done by the command (RECUP '"'NAPADATA'"') of
AutoLISP.
TYPE=alt: type of objects to be transferred. The following alternatives (=alt) are available: C
(=curves), S (=surfaces), SO (=surface objects) and ALL (=all objects). If there are indirectly
referenced objects (*name etc.) the default is TYPE=C. Otherwise, the default is TYPE=ALL.
LH=layer: layer for holes (default: LH=0) The identifier can be an integer or a string
UNIT=alt: unit of coordinates default: units of the quantities x,y,z. These can be changed by the
!FORMAT command. UNIT=M: meters UNIT=MM: millimeters
Examples:
TODXF STEM STERN CL ;** transfer 3 curves
TODXF **HULL ;** transfer grid curves of HULL
TODXF HULL ;** transfer facets of a surface
TODXF HULL REP=S ;** transfer patches of a surface
TODXF (SO,1,10) ;** transfer SO1 ... SO10
TODXF LIST() ;** transfer objects in the list
TODXF DECK L=B LH=H ;** different layers for boundary and holes
Patch surfaces are written in the IMSA IDF (Revision 3.01) format in the file defined by the
FILE command.
The link has been tested by transfering a surface to FastShip. There were some limitations of
editing operations of this kind of surfaces in FastShip. They were corrected, and the necessary
changes will be incorporated in all releases of FastShip 4.37 and on.
---------------------
objects: names of surfaces to be transferred. The objects are independent Napa objects, or a collection
of these in structures STR*name or in lists name(). If the surface is not a patch surface, the
facet representation of the surface is first converted into such. Each patch is converted into the
NURBS format of the IMSA IDF standard. Trimmed patches are transferred so that only the
coefficients of the patch are linked. The curve representing the trimmed boundary is missing.
C=string: (opt) coordinate system The default is '1,-1,-1', that corresponds to the transformations x -> x, y
-> -y, z -> -z
+: (opt) add also the strings NONRATIONAL and PERIODIC to the definition of each NURBS
surface that are needed in the FastShips .srf format
K=parametrization: (opt) The knot sequence for the NURBS surface is defined by one of the following alternatives:
PTOL=ptol: (opt) Control points within the tolerance ptol are forced to be equal. This option makes the
transfer easier to such programs (such as FastShip), that require an extremely precise
geometry in order to find out the connections between the surfaces. The option K=D is
defaulted. In this case it is possible to represent the connection of patches that share a
common edge in an exact way. (The option PTOL=-ptol works as above and also lists the
largest modification and the related point)
Examples:
TOFS HULLA HULLM HULLF
TOFS HULLA C='1,1,1' ;** user defined coordinates
TOFS HULL K=D ;** transfer to NewScafo
TOFS LIST() ;** list of objects
NAPA geometry is converted into the GDL format.The related MDL file is also created. The
conversion is controlled by the macro GDL*TYPES that is searched from DB1,DB2 and DB7.
The commands of the macro are explained by !COM G98 and !EXP comand/G98. The macro
assigns default values to the options of the TOGDL command. (GDL = Geometric Description
Language of Cadmatic, MDL = Model Description Language of Cadmatic)
D=n: (opt) number of decimals in coordinates Default D=99: select according to size
F=n: (opt) field length of coordinates Default F=0: use dynamic format
Z-sections from an object of Napa are transferred to the milling format of HSVA. Destination of
the result is defined by the command FILE. Each section is devided into two parts. The
subdivision takes place at the midship section. A third part in the flatside region is added, if the
z-section has a straight part intersecting the midship section, and the z-coordinate is larger
than zfs.
MID=x: x-coordinate of the midship section (default=XMID from the reference system)
Objects are transferred to the IGES standard. Destination of the result is defined by the
command FILE of by the option FILE='file'. Surfaces, surface objects and curves are
transferrable.
*object: given object + directly referenced objects The alternatives **object, ***object are also
available (as in the DES command).
options:
TYPE=entity: preferred surface and curve entities 128: rational b-spline surface (default) 114:
parametric spline surface 126: rational b-spline curve (default) 112: parametric spline curve As
a default the spline spline representation of the NAPA curves is transferred if that one is
available. Otherwise the polygon representation is used. A forced reading of the polygon is
done by the options TYPE=<>126 and TYPE=<>112. A missing spline approximation (that
obeyes TOL=tolerance) is created by the options TYPE=*126 ot TYPE=*112.
K=knots: knot sequence for TYPE=128 transfer. The following alternatives are available: K=D:
degenerate sequence 0,0,0,0,1,1,1,1 (default) K=P: periodic sequence -3,-2,-1,0,1,2,3,4
K=(k1,k2,...,k8): user defined sequence
D=alt: number of decimals in the result (default=10) (Note that the coordinates are expressed
in meters) The following alternatives are available: - n: number of decimals in exponent format -
En: as above - Gn: number of decimals in G-format of Fortran - Fn: number of decimals in fixed
point format
TOL=tol: tolerance of the conversion. The variable 'Minimum User Intended Resolution' has the
value 2*tol in the IGES file. As a default tol=0.1*GMTOL. The tolerance is used when the
3d-form of the trimming curve is calculated from the parameter representation.
PTOL=ptol: Control points within the tolerance ptol are forced to be equal. This option makes
the transfer easier to such programs (such as ACIS), that require an extremely precise
geometry in order to find out the connections between the surfaces. The option should be used
together with the options TYPE=128 K=D. In this case it is possible to represent the connection
of patches that share a common edge in an exact way. (The option PTOL=-ptol woks as above
and also lists the largest modification and the related point)
GRP=alt: type of grouping lt=1: all entities related to same NAPA surface are in the same
group lt=2: parts of combined surfaces are also grouped
PLATOL=platol: tolerance for detecting planar nurbses; defaulted platol=0 i.e. planarity is not
checked
ROUND=i: rounding of control points of a nurbs; defaulted i=0 i.e. rounding is not used;
coordinates are represented with accuracy 10**-i meters
Given curves, tangent functions, surfaces or surface objects are output in SB format, either as
used in SB hull system or SB drawing system, depending on whether the command is TOSBH
or TOSBD. The result is stored in text files as specified in the FILE command.
objects: set of objects given as in the DESCRIPTION command. If a surface is given without asterisk,
one asterisk is assumed. A tangent function (SBH only) associated with a curve is designated
by prefixes T*, T-, T+, e.g. T*WL1.
(Z): (opt) specifies that tangent curves shall be generated giving waterline angles (SBH only)
This form allows generation of tangent curves corresponding to the tangent functions
generated at surface preparation (SBH only).
curve1...: (opt) name of curves for which tangent curves are desired. If omitted, all curves except frames
are taken.
Surface objects, and (faceted) surfaces are transferred into a format of Unigraphics.
Destination of the result is given by the FILE command.
TOUG objects
------------
objects: names of objects to be transferred. The objects are independent Napa objects, or a collection
of these in structures STR*name or in lists name().
Examples:
TOUG BH1 BH2 BH3
TOUG BHLIST()
TOUG STR*BH_ALL
TOUG STR*DEMO THI=FEMTHI ;** read thickness from column femthi
TOUG STR*DEMO THI=FEMTHI THI=TAB*THI ;** read thickness from column
femthi of table tab*thi
TOUG BH1 THI=STR*DEMO ;** read thickness of bh1 from column thi
of table str*demo
Objects of Napa are written in VDAFS format into a file that is defined by the command FILE.
- patch surfaces
- facet surfaces
- surface objects
- curves in the preparation results of the surfaces
- independent curves in the database
As a default, there is one SET entity corresponding to each object in the TOVDA command.
Each set contains all entities related to the corresponding object. SET entities are the only way
to structure in VDAFS 1.0. VDAFS 2.0 provides an additional way i.e. the GROUP entity to
structure the transferred objects.
For example, when a surface object is transferred, the primary surface entities i.e. FACE
objects can be collected to a GROUP having the name of the surface object. The owner
surfaces (SURF entities), and the trimmed boundaries (CONS and CURVE entities) can be left
outside the group. However, they belong to the same SET entity.
C: Transfer curves of surfaces (default= transfer surfaces) In the case of patch surfaces,
curves stored in the preparation description are used. Otherwise, boundaries of the facet are
transferred. The result of the option C is a collection CURVE elements.
C=line: Add a comment line into the header of the VDAFS file. Many such options can be given
in the command. For example, three lines are added by the set C='line 1' C='line 2' C='line 3'.
D=alt: Number of decimals in the result (default: D=E7) (Note that coordinates are expressed in
millimeters) The following alternatives are available: - n: number of decimals in exponent
format - En: as above - Fn: number of decimals in fixed point format - Gn: number of decimals
in G-format of Fortran
VER=ver: version of VDAFS (default: VER=2.0) Transfer to the version VDAFS 2.0 takes use
of the elements FACE and GROUP in a way that has been described above.
H=name: name of the header (default= name of the file) Note: only characters 0..9 and A...Z
are available and the length of the string is limited to 8 characters. Unknown characters are
converted into X.
S=alt: structuring by SET entities (Default: S=NAME) The following alternatives are available: -
OFF: omit SET entities - string: naming of the sets. If the string contains a 'variable' NAME, it is
replaced by the name of the current object. If the string contains a 'variable' INDEX, it replaced
by the number of the created set.
G=alt: structuring by GROUP entities (default: G=OFF) The version VDAFS 2.0 is required.
The following alternatives are available: - OFF: omit GROUP entities - string: naming of the
groups. If the string contains a 'variable' NAME, it is replaced by the name of the current object.
For example, the command 'TOV HULL GROUP=GNAME' creates groups
GHULLA,GHULLM,GHULLF,GHULL. Here HULL is a combined surface containing 3 parts. By
using 'TOV HULL GROUP=NAME', the groups HULLA,HULLM,HULLF and HULL are created.
If the string contains a 'variable' INDEX, it replaced by the number of the created group.
PN=n: number of the first patch = n+1 (default: PN=0) The following names are used (i=patch
number): PPi = name of the SURF object FFi = name of the FACE object PPiCj = name of the
j'th boundary in real space PPiPj = name of the j'th boundary in parameter space
FN=n: number of the first facet boundary = n+1 (default: FN=0) Boundary curves of facets are
named as CCi, where i= number of the facet.
GN=n: number of the first group = n+1 (default: GN=0) The 'variable' INDEX in the option
G=name is the number of the group.
SN=n: number of the first set = n+1 (default: SN=0) The 'variable' INDEX in the option S=name
is the number of the set.
ADD, (u,v)
ADD, name
is added
This is a shorter form of the MOVE command, where the given point both designates the point
to move and gives its new position.
(u,v): given point. The point nearest this point is changed to have the given coordinates. The new
point must be within the tolerance 0.5 m from the initial one.
DELETE, (u,v)
DELETE, name
either the explicit point nearest the given one or the reference
This command controls the MOVE I; command, by defining a function extending the effect to
neighbouring points. See also command RANGE.
DISTRIBUTION expression
expression: calculator expression defined in the interval (-1,1), with the argument named L. The argument
is the relative distance in the range specified, where 0=at the moved point and -1, 1 at the ends
of the range. The function value is the relative move with respect to the primarilt given obe,
normally 1 and l=0 and 0 at the ends.
DISTRIBUTION Fi
F1: (1-(1/(1-exp(-4.)))*(1-exp(-l*l*4.0))
F2: (1-(1/(1-exp(-6.)))*(1-exp(-l*l*6.0))
F3: 1.0-abs(l)
F4: cos(0.5*pi*l)
DISTRIBUTION ON/OFF
EXAMPLE
DISTR '(1-(1/(1-exp(-4.)))*(1-exp(-l*l*4.0))'
The current curve is modified so that an new point is added at the continuation of the curve,
either at a specified distance or at a specified coordinate.
EXTEND l -
- (opt) replace the current end point rathed than adding a a new point.
EXTEND axis=q -
The curve is extended to so that it reaches the given coordinate. The value of the coordinate
decides whether the extension is to the start or end.
q: coordinate value
- (opt) as above
EXAMPLES
EXTEND 1.2
EXTEND -0.5 -
EXTEND Z=12.5
IM method
axis: (opt) U or V: restrict the move to the given axis, i.e. change only u or v. The purpose of this
option is to avoid a undesired change of one coordinate when the new point is given by graphic
input.
(u1,v1): point to be moved. The nearest explicit point within a tolerance of 0.5 m ship scale is selected.
Several moves may be defined in one command. See also command ADJUST.
MOVE I
This form starts the interactive form of the move. Place the cursor on the selected point and
drag it with the left button down. The operation is finished with by pressing the right button.
OK finish editing
The OK command is given to indicate that no more editing commands will be given, and the
curve shape can be recalculated. Necessary only if command REPEAT has been given.
Curve references are removed, keeping the definition point as a primary one.
This command is relevant when using DISTR and MOVE I, defining the range in which the
change is active. The default corresponds to RANGE -2 -2; i.e. two definition point intervals in
both directions. If the curve end comes first, the range is restricted to this.
rmin: range before the curve: >0: length along the curve, <0: number of definition point intervals. -1:
to the end.
EXAMPLES
RANGE 5 5
The change affects the definition points nearer than 5 m to the moved one.
RANGE -3 -3
It is assumed that only one change will be done, and after the first change, the curve is
recalculated (without OK command). This command allows several changes to be made with
one call of the editing function.
SORT method
XY: apply the general sorting method in the XY plane, similarly other projections.
A curve is added to the current one in a similar way as by the ADD command in room
definitions. The operand curves must be closed principal plane curves in the same plane.
ADD curve
ADD *
In this case the operation is done by combining the branches of the current curve.
This command defines the axis used in the rotations. It can also be used for specifying a
translation, see command TRA.
This command makes the curve contain a given curve branch only.
BRANCH n
The current curve is erased. Provided that the initial curve was either read from tha data base
or the command RENAME used, the original curve is obtained by using command GET.
This removes unnecessary data from the current curve. Such data are doubled polygone points
or polygone segments on the same straight. The data recording the initial definition of the curve
are also removed if present.
CNV (x,y,z) q
CNV (u,v) q
This form applies to principal plane curves and differs in that the operation is done in the plane
of the curve.
The is the standard COLOUR command, see !EXPL COL/DR. Similarly DASH, THICKNESS,
FILL.
This command connects a curve to the current one in such a way, that both operand curves
contribute with the parts that are to the RIGHT of the other curve. Both curve curve must be
principal plane curve with the same orientation. The combination rule means that if a closed
curve shall be created by successive combinations, the order of combination and the direction
of the curves must be CLOCKWISE.
COMBINE curve
curve: name of curve to be added. If the curve has wrong direction, the prefix < will cause the curve to
be turned before the combination (e.g. COMBINE <STEM).
This command allows a new curve to be selected as target for the modifications. NOTE: if one
does not want the original curve to be affected by subsequent changes, it is advisable to use
command RENAME before the changes.
GET name
This command generates a projection of the current curve. The simple form just makes a plane
curve out of a space curve, while the general form makes an arbitrary parallel projection. In the
latter case, the result is generated as a curve in the plane y=0.
GPR X
Make the given curve a plane curve with x=0. Similarly for Y and Z.
GPR v1,v2,v3
Make a projection in the direction given by a vector. The result is stored as a curve in the plane
y=0.
This command allows many curves to be collected under one name. The command is designed
so that one can conveniently collect many modifications of the same curve into a single
receiver, for instance curves representing windows in the ship. If the receiving curve does not
exist, one is created. This command can therefore also be used for copying.
MERGE curve
The main definition context is reentered. The curve is not stored in the data base, but it is left in
the memory.
The curve is translated a given distance at an angle perpendicular to curve. The curve must be
a plane space curve (location surface X, Y or Z).
PTR d *
*: (opt) combine the moved contour with the initial one in order to form a closed contour
A curve is reducted from the current one in a similar way as by the RED command in room
definitions. The operand curves must be closed principal plane curves in the same plane.
REDUCT curve
This command allows the result of the operation to be stored with a different name. Without
parameters, the name of the current curve is returned.
RENAME name
The current curve is stored in the data base, replacing an already existing one. See also SAVE.
REPLACE name
ROTATE angle
The corners of the current curve are rounded by a given radius. Those points are counted as
corners where the adjacent segments are long enough to allow the rounding. The current curve
must be a plane curve.
ROUND r
RSC rescale
The given curve is rescaled, possibly differently in the directions of the different coordinate
axes. The scaling is done before the translation.
The current curve is stored in the data base. If the curve already exists, use REPLACE.
SAVE name
The current curve is erased, eliminating any changes made in it, and the subtask is exited.
This command has been added for testing the basic routine of dividing a curve with another
one. The result, if successful, is that the current (closed) curve is divided into two by the one
given as operand. The current curve must be a plane curve.
SPLIT curve
TRANSLATE dx,dy,dz
TRANSLATE *
The translation given by an AXIS command is used. This means the distance between the
given points.
The direction of the current curve is reversed. May be needed before COMBINE, for instance.
This function returns the date of an object, either the date of the original definition or the 'logical
date', i.e. the date when referenced objects are taken into account. The latter alternative is
available for surfaces, rooms and surface objects.
GM.DATE(name,'D')
D: (opt) return definition date, relevant for surfaces, rooms and surface objects.
GM.DATE('#SYSTEM')
The function tells the type of an object. The function value is a string as presented below.
'missing' and 'error' are returned for missing or unidentifiable objects.
GM.TYPE(object,opt,ver,project)
opt: options
M: main types: return only main types, i.e. POINT, CURVE, TGF, SURFACE, PLANE, ROOM,
SO (PLANE=unrestricted plane).
P: only distinguish between non-parametric (0), parametric, limits (1) and parametric with
hole(2).
project: (opt) search for the object in the given project. Default: the currently open project.
The subtypes are expressed by the following symbols. Note that some types cannot be
identified by the subtype only.
Point: no subtypes
Curve: X, Y, Z: principal plane curve
G: general space curve
Surface: COMB combined
COMB-F combined, all parts type facet
COMB-P combined, all parts type patch
GRID grid surface
PATCH patch surface
WIRE wireframe surface
G general plane
X, Y, Z: plane with constant x, y or z
CYL cylinder
DCYL double cylinder
PYR pyramid
CNS connection surface
ROT rotation surface
NUM numeric surface
SPHERE sphere
RSPH restricted sphere
FAC: general facet surface
Room: COMB combined
MOD other room modified (e.g. reflect)
ELEM elementary room
BOX: elementary room, box
GEN: general room (with ADD, RED, REF, SYM)
NUM: numeric room (from calculation sections)
?: from other version
Surface object: as room.
The function tells the status of an object regarding possible errors. The function is available for
rooms, surfaces and surface objects.
status=GM.STATUS(name,opt)
opt: options
-99 missing
-11 failed generation of surface object
-9 incorrect incorrect for other reasons,
e.g. reference object missing
-8 stripped stripped of geometry
1 ok
2 ok for calc stripped, but can be used in
calculations
9 cse failed calculation sections failed
otherwise may be useful
The function returns the description of an object in a macro. The function value is the resulting
macro, if any, else 0.
GM.DES(object,macro,opt)
macro: receiving macro (reference number) Without the A option, preceding contents are removed.
opt: options:
!: generate from the geometry (curves only), same as ! in the DES command; all other options
of the DES command that are related to the generation of the definition are available also (e.q.
ORD=...).
macro=GM.DES(object)
This form differs in that the receiver is created internally with the name DATA*DESCRIPTION
and returned as the function value.
EXAMPLE
@mac=dm.create('')
@gm.des('**HULL',mac)
Create a macro and store the definition of HULLA including referenced parts.
The function returns the orientation of a surface. The function value is 1=x, 2=y or 3=z. The
value is given negative if the outside is in the direction of the negative axis. 0=orientation not
determined, 4=closed object.
dir=GM.OUTSIDE(name,v)
v: (opt) real array for receiving the average normal. The closer the result is to a unit vector, the
closer the surface is to the plane with the given normal.
The function returns the owner surface of a surface object or the surface from which a trimmed
patch surface has been made. An ordinary surface is returned as such. A locally defined
coordinate plane is returned in the form axis=q.
osname=GM.OS(name,opt)
OPT: options
EXAMPLES
In the examples, it is assumed that BH1 is defined as
SO BH1; IN PL1; and PL1 as Y 10; BH2 is defined as REFLECT BH1.
@gm.os('BH1') -> PL1
@gm.os('BH1','C') -> Y=10
@gm.os('BH2') -> BH2
@gm.os('BH2','C') -> Y=-10
@gm.os('BH2','R') -> -PL1
@gm.os('BH2','O') -> OS.BH2
The function returns the reference points defined in connection with a geometric object
(command RP). It either returns coordinates of an existing point or defines/modifies a point.
list=GM.RP(object)
This form returns a list of reference points. 0=none. The result is a string array that is part of
the definition of the object and must not be changed.
GM.RP(object,id,p)
p: (opt) real array for receiving the result: x,y,z. Without this parameter, the receiving record is
created internally (reused next time) and returned as the function value.
GM.RP(object,id,definition)
definition: string (note) providing the new definition, syntax as in the RP command. Special case
DELETE=delete the point.
EXAMPLES
@p=gm.rp('DECK1','HOLE1')
The coordinates of the reference point HOLE1 of the object DECK1 are returned as the array
p.
@p=arr(2)
@gm.rp('DECK1','HOLE1',p)
As above, but the result is returned in the array provided by the caller.
@gm.rp('CURVE1','RP1','(12,0,5)')
@gm.rp('CURVE1','DP1','#2')
The function returns a curve or a point as defined by the FEATURE command of a room. The
function value is 1 of the feature is found and ok, else 0.
list=GM.FEATURE(object)
This for returns a list of reference features. 0=none. The result is a string array that is part of
the definition of the object and must not be changed.
ok=GM.FEATURE(object,feature,curve,opt)
opt: options
EXAMPLES
@curve=dm.create('F1.R123')
@ok=gm.feature('R123','F1',curve)
@p=arr(2)
@ok=gm.feature('R123','P1',p,'P')
Within a given model, this function finds the object that forms a the boundary on a given side of
a given object. The function is implemented only partially. The corresponding limit from the
LIMITS command is compared with the surfaces or owner surfaces in the model. The object is
taken where
GM.BOUND(name,side,model)
side: coordinate axis, 1=x, 2=y or 3=z, >0=upper limit, <0=lower limit. 0=return all limits.
EXAMPLE
@limit=GM.BOUND('DECK1',-3,'A')
This function stores the calculation sections of an object as a space curve. Sections are
returned even if the given object has none because it is a box or it is a modification of another
one. See GM.CSEXTRACT for further processing of the result.
GM.CALCSECT(name,rname,limit,opt)
name: name of object (normally a room) for which sections are made
rname: name of result: a curve with this name is created in the run time memory. The different section
appear as curve branches. Record 100001 contains the x-coordinates of the sections. In a
combined object, the additional parts have number 100002, 100003 etc. These record are not
recorded if the DD option or a restriction has been given.
restr: (opt) restriction in the form Y>name, Y<name, Z>name, Z<name (one string). name=name of
surface with orientation matching the limitation (y or z). Other transformations than reflection
not supported in a combination. Implies option DD.
opt: options:
D: flag parts in the result. DD: stronger alt. needed for GM.CSEXTRACT.
This function is relevant for the result from GM.CALCSECT or GEN name CSCURVE with
option DD. The option DD flags elementary parts in the result and records their extension. See
parameters for available results.
GM.CSEXTRACT(name,rname,pname,opt)
rname: name of result, may be empty if only plotting. If 'rname' begins with TAB' a table is made of the
parts, else a curve. The result is not stored in the data base.
pname: (opt) restrict the operation the the given part (compartment)
M: merge: disregard redundant x-limits, i.e. combine boxes belonging to the same room and
sharing a common x-coordinate
The function returns an array containing the x-coordinates of the calculation sections, either all
of them or discontinuities only. The function is valid for non-combined objects only, for others it
must be applied to the parts separately (can be extracted with GM.SELECT). For boxes, the
end coordinates are returned.
GM.CSPOS(name,array,opt)
opt: options:
D: only discontinuities, default all calculation sections. In all cases, step discontinuities are
represented by repeating the x-coordinate.
arr=GM.CSPOS(name,opt)
As above, but the array is reserved internally and reused at the next call.
EXAMPLE
@xarr=gm.cspos('R1234','DTL')
@n=rsize(xarr)
!do 'plot r1234/x=%xarr(i)' @n
The function returns a property of a given geometric object, either derived from the geometry or
explicitly defined with the QNT command.
GM.QNT(name,prop,opt)
prop: property, name of quantity, either defined explicitly with the QNT command or derived from the
definition or geometry. The latter group contains the same quantities as available in INFO/DEF.
opt: options
G: only quantities derived from the geometry or the definition of the object, disregard definitions
from QNT
R: as Q, but return the quantity as a reference to the record containing the quantity (in the
object, note!). This way other values than the first one can be accessed.
arr=GM.QNT(name)
This form returns a list of quantities defined with the given object as a string array. The array is
reused at the next call,
EXAMPLES
@ORNT=GM.QNT('BH1','ORNT')
@C=GM.QNT(NAME,'ACODE')
@R=GM.QNT(NAME,'ACODE','R') @N=RSIZE(R)
The function returns the origin and the direction of the axes of the local coordinate system of a
given object. The local coordinate system is available in ST with the notation $q, e.g. ($0.5,5):
GM.LOCCOORD(name,p,v)
v: (opt) record (real) for receiving the direction of the axes. One value for each axis: 1=same as
the main coordinate axis, -1=reversed. If the array is not given, these values are returned at
indices 4...6 in P.
EXAMPLE
@r=arr(2)
@gm.loccoord('BH1',r)
Calculate points on surface and normal vectors of the surface at these points
np=GM.PONS(sur,p,v,ps,vs, opt,atol)
v: given direction (real array with 3 components) If v=0, the point nearest P is selected. if v<>0,
the intersection surface/'line defined by p and v' is used
vs: normal vector of surface at points ps (real array for components vx1,vy1,vz1,vx2,vy2,vz2,...)
atol: (opt) angle tolerance for detecting equality of normal vectors (default=0.01745 i.e. 1 degree)
This function is intended for surface objects relying on a bracket from ST (in the form LIMITS
lim1 lim2 R=bracket, also ADD...). This is a partial implementation covering only objects with
one such component. The only modification supported is reflection around y=0. Note: only
available for the object containing the bracket in the definition - not objects referencing it.
brid=GM.BRACKETINFO(name,r)
The function value is the bracket identifier if any, else empty string.
r: (opt) real array for receiving the location of the bracket expressed as x,y,z,x1,y1,z1,x2,y2,z2
where (x,y,z) is the location of the corner, (x1,y1,z1) the end of the first leg and (x2,y2,z2) that
of the second leg. Not assigned if there is no bracket (function value=empty).
The purpose of the function is to identify all reference surfaces on which a given room or
surface object depends. Also locally defined planes may be included.
GM.REFSURFACES(name,result,axis,q,opt)
result: description for receiving the result. If the description is named TAB* or REF*, the result is
returned as a table.
axis,q: (opt) define a plane axis=q such that only surfaces intersecting this plane are returned. With
option C the sections are added to the result.
opt: options
H: take the hull only (=any surface containing the HLID in the name, see reference system)
Z: omit if orientation=AXIS
Some quantities of a surface are calculated at a set of points. Presently, only one alternative
related to principal curvatures has been implemented. See also GM.QNT.
GM.SURQNT(sur,rx,ry,rz,rv,rec,opt)
opt: quantity; Presently, only one alternative has been implemented, and the following set of 11
quantities is returned in REC: z,y,z,crvs,crvl,crvsx,crvsy,crvsz,crvlx,crvly,crvlz
The function controls the dbwatch function, by which changes of objects in other runs are
automatically transferred to this one. At specified intervals, the dates of the currently used
objects (of the specified types) are compared with the dates in the data base and if a newer
date is found, the object is updated. See also event GM.UPDDB.
GM.DBWATCH(opt,time)
opt: control:
OFF: cancel
empty: no change
other: set the set of object types to be checked, one or several of C=curves, S=surfaces,
R=rooms, O=surface objects. Implies ON.
time: (opt) set the minimum time interval between checks default=300 (5 min). It can also be
included in 'opt' in the form *time (as used in the output of the next form).
opt=GM.DBWATCH()
GM.OPTION(id,value)
value: (opt) new value. When omitted, the current value is returned.
GMTP: alt. STD, SPLINE, M2 as in !GMTP, with prefix O-, using routines before 99.1
The function copies a surface and its components from a foreign source.
GM.COPY(name,version,project,options,list)
project: (opt) project. May also refer to a data base unit in the form DBi.
P: allow a partial copy even if some of the components cannot be copied because missing in
the source, existing in the receiver or being locked.
N: do not copy, just record the objects concerned in 'list' Default: copy nothing unless the
operation can be done completely.
The function runs a macro containing geometric definitions, allowing definitions to be run
regardless of the current task. NOTE: the macro is deleted from the run time memory after
finishing the operation.
GM.RUN(macro,parameters,opt)
macro: macro as reference to a description, which can be obtained with the calculator function
MACRO.
parameters: (opt): parameters to the macro (all as one string). If not needed but 'opt' follows, give empty
string.
opt: options
N: do not check for dependences on this object, saves efforts from the object administration
This function is intended for cases when a series of geometric definitions is made (normally by
a macro) and it not necessary to update other objects or tables during this operation.
GM.FREEZE(c)
state=GM.FREEZE()
GM.UPDATE(funct)
funct: function
Data can be read from surfaces, curves and points. The process should go as follows:
GM.READ('OPEN',NAME,OPT,LW,R)
LW: integer work array or 0 (OUTPUT) The array is passed into GM.READ with the keywords
ITEM,DATA or CLOSE, but should not be used in any other way.
R(1): type
1: facet surface
2: patch surface
3: nurbs surface
R(2): number of items. This is exact only for points and curves. For surfaces it is an upper limit.
Dummy value 999999 indicates an unknown number of items. In that case GM.READ('ITEM'...)
should be called until no more items are found.
GM.READ('OPT',ID,R,S,OPT)
S: string options
LIM: LIMITATION BY PLANES AND SURFACES The facet generation can be limited by planes and
surfaces. The parameter R can be used to define a limiting box for the reading task:
R(1...6)=xmin,xmax,...,zmax. Values -999 and 999 can be used as dummy limits. The
parameter S can containg additional or alternative limits. It is a combination e.g. 'X>150
Y>LBH1' of limitations with the following syntax: axis>coordinate, axis<coordinate, axis>object,
axis<object, >surface or <surface (where axis=X,Y or Z).
REP: REQUIRED REPRESENTATION This option defines what kind of representation of the object
is created by the reading process
FAC: FACETING OF CURVED SURFACES This option affects the faceting of patch surfaces. The
following 4 items can be given (NR<=4):
r(2)=1: polygonize
r(2)>2: as 0, but the facets are subdivided so that in the result there are no facets with more
than r(2) edges.
r(3)=1: open curves r(1)=0: curves of preparation description 0<r(1)<100: equiparameter lines
of patches
r(1): the value should be 40 indicating the general coordinate transformation of NAPA
r(1..9): rotation. Coefficients are ordered so that the first index of the rotation matrix runs faster
than the second.
r(10..12): translation
SUR: READING GRID CURVES FROM SURFACES As a default curves are read from the project
database. If the SUR option is assigned, the curves read from the given surface. If the curve is
not found in the surface, it is read from the project database.
NURBS: TYPE OF NURBS SURFACES Special options for the nurbs surface generation are assigned.
r(1)=0: (default) do not modify control points and accept the accuracy limited by the rounding
errors and the 32 bit representation of floating point numbers.
r(1)>0: control points that are located within the distance r(1) are forced to be the same. This
option can be used if the program requires an extremely precise geometry in order to find out
the connections between the surfaces.
r(2)=2: 3d-polygon
r(2)=3: 3d-spline
r(2)=4: 3d-nurbs
r(3)=1: inverted
r(4)=1: fetch also implicitly defined boundaries i.e. boundaries of nontrimmed surfaces
r(5): ordering of control points The control points are read into an array r by
GM.READ('DATA',...). This option defines how the points are ordered in the array.
GM.READ('ITEM',LW,ITEM,IT,RT)
An item of an object is fetched. Some geometric properties are returned here. The rest should
be fetched by GM.READ('DATA',...). The data that is returned in arrays it,rt is dependent on the
parameter TYPE obtained from GM.READ('OPEN',...):
plane: RT(1)*x+RT(2)*y+RT(3)*z=RT(4)
RT(7...54): patch coefficients. The related basis functions are the following:
1,u,u2,u3,v,uv,u2v,u3v,v2,uv2,u2v2,u3v2, v3,uv3,u2v3,u3v3 (notation: u2v=u*u*v etc.)
IT(1): number of spline segments Each spline segment is represented by 4 coefficients related
to the following basis functions: 1,t,t2,t3 (0<t<1) (notation: t2=t*t etc.)
GM.READ('DATA',LW,RT,SEL,OPT)
Geometric data is read from an item of an object. It is supposed that the object has been
initialized by GM.READ('OPEN',...) and the item by GM.READ('ITEM',...).
1: x-coordinates
2: y-coordinates
3: z-coordinates
-SEL: number of items related to SEL The values of SEL that can be used are dependent on
the parameter TYPE of GM.READ('OPEN',...) as follows:
10: control points of surface The data is packed according to the fortran declaration REAL
RT(IT(8),IT(9),IT(10)) i.e. the first index of the 2 dimensional point set runs faster than the
second, and each point is represented by IT(8) (=3 or 4) numbers. The order can be changed
by the NURBS option of GM.READ('OPT',...)
SEL=7: control points of curve The data is packed according to the fortran declaration REAL
RT(IT(4),IT(5))
OPT: option
OPT>0: branch number of a surface boundary Note: OPT is not used if the data is not ralated
to the boundary, but to the underlying surface.
GM.READ('CLOSE',LW)
The data in a DXF,IGES or VDAFS file is converted into a surface or a curve of NAPA. The
result is not stored into the database but left in the free storage. If there are both curves and
surface in the same file, the function reads the surfaces from the IGES and VDAFS files. In the
DXF case, the first the first item defines the type of the result.
descr=GM.FROMFILE(file, name)
descr: result
file: pathname of the file containing the .dxf, .igs or .vda suffix.
The function returns a list of objects directly or indirectly referenced from a given one.
arr=GM.SELECT(name,types,filter,opt)
The function value is an array containing the result. The array will be reused at the next call of
GM.SELECT. If the given object is a room or surface object, the result contains all surfaces
and rooms it depends on, for a surface, the result contains all curves and possible other
surfaces.
name: name of object. May be given with version in the form name/version (not with P option)
types: (opt) return only objects of given types, default=all. The parameter is a combination of the
following characters:
P: point objects
C: curves
T: tangent functions
S: surfaces
R: rooms
O: surface objects
-: reverse the main type criterion, e.g. -R. The type selection can be followed by a subtype
selection of the form /s, where s can be
G: only surfaces defined by a grid (includes patch surfaces defined this way)
P: only patch surfaces (includes other than those defined by a grid). NOTE: S and P return only
non-combined surfaces.
filter: (opt) wildcard expression, take only objects the name of match the wildcard. At least an empty
'opt' must follow.
*: same as 1.
**: take only references two levels down (as in DES **...) (same as * if P option)
P: parts: consider only references having the meaning that the object is a part, either from
COMBINE or MERGE.
GM.SELECT(name,types,opt,arr)
Otherwise as above, but the receiving array is given in the call. The function value is an empty
string.
GM.SELECT('DB',...)
Otherwise as above, but selecting objects from the data base matching the given criteria. The
functionality overlaps that of !SELECT, the main addition being the possibility to use subtypes
as selection criterion. The P and S options are ignored.
EXAMPLES
@LIST=GM.SELECT('HULL','CP')
@LIST=GM.SELECT('ARR*A','R','G')
@LIST=GM.SELECT('ARR*A','S/P')
@NLIST=ARR(3)
@GM.SELECT('HULL','','S',NLIST)
Return in NLIST all objects upon which HULL is dependent, sorted in dependence order.
@GM.SELECT('HULL/B','','S',NLIST)
@LIST=GM.SELECT('DB','S/G')
Return in all surfaces defined by a grid (=all surfaces to which the PREP command applies)
@LIST=GM.SELECT('DB','R','^R*','')
This function modifies objects so that part of the information is removed at the expense of
functionality. The purpose is to allow some operations without revealing all the information and
the function is primarily intended for general surfaces. The effect depends on the type and
options. The default action for patch surfaces is to remove the patches. Sections cannot be
made but the object is available for calculations provided that the calculation sections are up to
date. The same concerns rooms dependent on the surface. Curves are changed so that DES
cannot be done, optionally the curves are deleted from the database. NOTE: objects already in
memory are not affected (use !GM RESET).
GM.STRIP(objects,opt,key)
name: name of object. If the object is a combined surface, its parts are treated, otherwise the
function is applied on the given object only.
opt: options:
*: extend the operation to all referenced objects also. Ignored if the objects are specified by an
array.
G: treat the given object only, ignore parts of combined object. Default when given an array,
where references supposed to handled.
6: do the operation on unit 6 (version same as current). This option cannot be used in
combination with *. Similarly 5=unit 5.
key: (opt) relevant with options P and R: key for encryption/decryption, without this the information
can be read with low level tools. The key is case sensitive.
GM.STRIP('AUTOMATIC RESTORE',opt,key)
This form controls automatic restore at run time of objects stripped with option P. 'opt' must be
R, else automatic restore is switched off. The key must be used consistently in the stripped
objects.
The function removes objects from the run time object administration and is intended for saving
time and memory when large amounts of objects are used but only temporarily. The definitions
stored in the data base are not affected but a run time copy is removed by default. The function
should be used carefully because it may affect current operations, all of which are not included
in the checks done. Before removing it is checked that the objects are not referenced by
remaining objects or by arr* or STR* tables. The operation concerns objects handled by the
object administration (surfaces, rooms and surface objects).
GM.REMOVE(name,options,list)
options: (opt)
PP: include any objects referenced by the given one and not referenced by any remaining
object.
F: force, remove without the checks mentioned above. Saves time in case it is known in
advance that the object can be removed.
N: raise no event. By default, the event GM.REMOVE is raised for every object removed.
This function has primarily been added for suppprting actions related to incorrect objects. See
also command PBB in DR.
GM.STATUSCHECK(selection,receiver,status,opt,ropt)
selection:
types: string, one or several of S=surfaces, R=rooms and O=surface objects: check active
objects of the given type
M: missing
S: stripped
I: plane section of a room failed The check is done with y- and z-sections. Each y- or z-interval
that has no area discontinuities is divided into parts of equal distances as controlled by
ropt(1:2). Plane sections are made at the subdivision points.
ropt: (opt) real array to control the check of rooms (with opt=I or B)
A command of the TRA task is stored into (or read from) a work description. The transformation
is carried out by GM.TRANS.
GM.TRARG(descr,command_id,parameters)
Store a command
descr: (input) a work description for the transformation. It should be created outside this routine, and
also deleted when it is not needed any more.
command_id: (input) identifier of the command Note: instead of NOREF use command REF OFF Note:
instead of NOFRA use command FRA OFF
command=GM.TRARG(descr,command_id)
Example:
@DESCR=DM.CREATE('TEST')
@GM.TRARG(DESCR,'DIM','L=+10')
@GM.TRARG(DESCT,'DES','ON')
@GM.TRARG(DESCR,'DATA','ON')
@GM.TRANS('HULL','A','NAPASHIP',RUNTIME,DESCR)
GM.TRANS() transform
GM.TRANS(object,version,project,result,descr)
name: name of a version of the parent project Note: empty string does not refer to the current
version
RUNTIME: the parent is read from the free storage, and not from the database. In this case the
project should be an empty string.
RUNTIME: the result is left into free storage, and not stored into the database
result: (input) result version Note: empty string does not refer to the current version
Examples:
@GM.TRANS('HULL','RUNTIME','','RUNTIME',DESCR)
@GM.TRARG('HULL','A','NAPASHIP','ATRA',DESCR)
The function returns the parameters of a plane providing the best fit to a given point set. The
function value is a measure of the fit obtained (0...1), <0=error
d=GM.FITPLANE(x,y,z,vp)
vp: array (real) for receiving the result. The result is four values a,b,c,d such that ax+by+cd=d for
the plane.
d=GM.FITPLANE(curve,vp)
ok=GM.FITPLANE(definition,vp)
EXAMPLE
@pl=arr(2)
@d=gm.fitplane('KNF',pl)
PLANE PKNF; THR (@pl(1) @pl(2) @pl(3) @pl(4))
The plane that approximates the curve KNF is calculated and defined as the plane PKNF.
The function modifies a curve or surface by translation, rotation, rescaling or projection. The
function value is the reference number of the result.
result=GM.TRANSFORM(object,name,tr1,tr2,...,opt)
object: given object, name or reference number. The object can be a point, curve, surface or surface
object. A surface will always give a facet surface as result.
name: name of the result. May be empty if the result is not to be stored and it will be accessed by the
function value.
tr1: first transformation, record of type 2. The first item in the record tells the type of transformation
while the others are type specific parameters according to one of the specifications below:
10,dx,dy,dz: translation
20,x0,xy,z0,vx,vy,vz,angle: rotation around an axis passing through the point (x0,y0,z0) and
having the direction given by the vector (vx,vy,vz). 'angle' is the rotation angle in radians.
30,sx,sy,sz,xp,yp,zp: change the size of the object, scaling the axes by the factors sx,sy and
sz. The point (xp,yp,zp) is the pivot point (remains unchanged). The pivot point may be omitted
(default (0,0,0)) and a single scale may be given if all factors are the same.
40,px,py,pz,xp,yp,zp,vx,vy,vz: project the given object in the direction (px,py,pz). The two latter
groups are optional: (xp,yp,zp) defines the origin in the plane into which the projection is made,
default=(0,0,0) and (vx,vy,vz) the normal of the projection plane, default=(px,py,pz). See also
parameter 'opt'.
50,px,py,pz,axis,q,lim: projection from the point (px,py,pz) to the plane axis=q. 'lim' is optional
and defines a limitation on 'axis' to be applied before the projection (surfaces only) This
operation has been added to support visibility checks.
tr2: (opt) second transformation, same alternatives as tr1. Several transformations can be given.
They are carried out in the order given.
W: (for rotation with draught,trim and heel) set the coordinate system so that z=0 corresponds
to the water plane.
I: (for rotation with draught,trim and heel) interpret the position parameters in internal units
(radians). Default: heel, azimuth in degrees, trim in meters.
O: (for projection): take only faces showing the outside to the viewer (when looking in the
direction (px,py,pz)). Similarly I=inside.
X: (for projection): return the result as a curve in the plane x=0, similarly, Y, Z. Default=return a
space curve in the projection plane (parameter x0,y0,z0 not relevant).
A: (for projection): return the area ofthe result as the function value, generate no curve. The
projection must be the last transformation.
EXAMPLES:
@r=arr(2)
@n=parse('20 5 0 0 0 0 1',r)
@r(8)=30*ro
@s=gm.transform('BOX','BOX-ROT',r,'S!')
Rotate the surface BOX 30 degrees around the z-axis and the point (5,0,0). The result is stored
under the name BOX-ROT. An existing object of different type may be overwritten.
@rrot=arr(2)
@n=parse('21 5 0 5 2 12',rrot)
@rpro=arr(2)
@n=parse('40 5 0 5 1 1 0',rpro)
@c=gm.transform('BOX','',rrot,rtra,'YO')
@a=area(c) @dm.remove(c)
The box is first rotated into the position given by trim=2, heel=12. The result is then projected in
the direction (1,1,0) (same as PRO 45 0) and the result is stored as a curve with y=0. Only
faces showing the outside are taken. After getting the area, the result is removed from the run
time memory. This example could be from a wind area calculation. The option A gives the
result more shortly:
@a=gm.transform('BOX','',rrot,rtra,'OA')
The function can be used to read data about the definition curves of the surface. In addition,
the geometry of the curves can be generated. The polygone representation of the curve is
calculated with the tolerance GMTOL based on the exact boundary of the related patches.
D=GM.SCURVE(surface)
surface: (input) name of the surface The surface should be a simple or a combined patch surface.
D=GM.SCURVE(surface,curve,resname,opt)
A curve is fetched from the surface. Both the spline and the polygone representations are
available.
*p: profile
*k: knuckles
*b: boundaries
opt: options
G: generate *p etc. from the patch data; otherwise the curve parts are read from the
preparation descriptions (if these are available). As a default, the result contains always the
polygon representation and for curves surfaces also the spline repr. The default can be
changed by using the additional options S (spline+polygon) or P (polygon).
The function returns the parameters of the plane corresponding to a given floating position
defined by draught, trim, heel. Optionally, it returns the distance fram a given point to the plane.
v=GM.WPLANE(t,trim,heel,opt)
This form returns the plane as a vector such that the equation of the plane is
v(1)*x+v(2)*y+v(3)*z=v(4). 'v' is an array that will be reused at the next call of this function.
t: draught
d=GM.WPLANE(t,trim,heel,p,opt)
This form returns distance from the plane to the given point.
EXAMPLES
@v=gm.wplane(10,0,5)
This function handles limits of surface objects defined as curves. It either extracts the definition
in various forms or replaces by a new definition. Its purpose is to support editing functions
dealing with these limits.
stat=GM.SOCURVE(name,nr,'I')
This form only informs about the existence of such limits and informs what editing functions can
be used. The function value is 0=does not exist, 1=defined as a simple local definition,
2=general local definition, A option applicable, 3=more general definition, 9=defined by
reference to a curve. Case 3 differs from 1 in that the array version (option A) cannot handle
the general features.
nr: selects between several limits, 1=first, 2=second etc in the order they appear in the definition of
the object
name=GM.SOCURVE(name,nr,opt)
This form returns the given limit as a curve or as the definition syntax. A local definition is
returned as a curve named LIMITnr-name.
opt: options
S: return the definition as the definition syntax (string), default=curve name as presented above
GM.SOCURVE(name,nr,descr,'A')
This form returns the points definining the limits as records 101, 102 in the given description. A
smooth curve is marked by adding flag record 1. A general defintion cannot be handled with
the A option, but is accepted if option ! is added, but possible other parts of the definition tha
npoints are lost.
nr: limit nr
descr: description for receiving the result. Previous contents are removed.
GM.SOCURVE(name,nr,def,'U..')
nr: limit nr
def: (opt) new definition. Default=get a curve with the same name as obtained when getting a limit.
GM.SOCURVE(name,nr,descr,'UA..')
The given limit is to be updated using corrdinates in arrays in the same form as returned when
option A is given without U.
nr: limit nr
descr: description containing records 101, 102. NOTE: at most 5 are allowed (otherwise definition is
likely to be too long).
EXAMPLES
@if GM.SOCURVE('WEB12',1,'I') then
@name=GM.SOCURVE('WEB12',1)
Gets the first (and usually only) curve limit of the given object. If it is locally defined, a curve
name LIMIT1-WEB12 is created.
@name=GM.SOCURVE('WEB12',1,'U')
Updates the surface object after the curve LIMIT1-WEB12 has been changed.
@d=DM.CREATE('')
@GM.SOCURVE('WEB12',1,d,'A')
@uarr=rec(d,101) @varr=rec(d,102)
The points defining the given limit are stored in the (unnamed) work description d and fetched
as arrays uarr, varr.
@GM.SOCURVE('WEB12',1,D,'UAD')
Updates the surface object after the array have been changed.
The function GM.ROUND can be used to round a set of corners of a 2d polyline. The result is a
description that contains the coordinate records 101 and 102 of the rounded curve. The
location of the corners and the related radia of the roundings is given by the user.
res=GM.ROUND(urec,vrec,rrec,krec)
res=GM.ROUND(urec,vrec,radius,angle)
angle: all corners of the polygon whose opening is less than the given angle (in degrees) are rounded
The function returns the intersection points between two curves. (More general version of the
function IBC). The function value is the number of intersection points.
np=GM.IBC(curve1,curve2,rx,ry,rx,tol,rk1,rk2)
rk1: (opt) array for receiving point parameters on curve1 (as in the functions COORD, INCL).
np=GM.IBC(curve1,plane,rx,ry,rx,tol,rk1)
plane: real array containing the values vx, vy, vz and q such that the equation of the plane is
vx*x+vy*y+vz*z=q.
EXAMPLES
@rx=arr(2) @ry=arr(3) @rz=arr(3)
@np=gm.ibc('CURVE1','CURVE2',rx,ry,rz)
Get the intersection points between the curves CURVE1 and CURVE2.
The function returns a set of arcs of circles that represent a plane curve or a projection of a
space curve. If the curve is a general space curve, the relevant projection must be indicated by
the opt parameter. The arcs are represented by the endpoints and the segment height. The
segment height is negative for clockwise rotation.
GM.TOCIRCLES(curve,brn,tol,ru,rv,rh,opt)
rh: similarly for the segment heights. The number of values in rh is one less than in ru,rv
opt: options
GM.TOCIRCLES(curve,brn,tol,rt,opt)
The result is returned as strings in TRIBON format. The option T must be given.
curve: as above
brn: as above
tol: as above
opt: options
X,Y,Z: as above
The subroutine controls plotting of unrestricted planes. It defines a coordinate box such that
only the part of the plane within the box is plotted (does not concern sections of planes). The
PLIM option in PLOT overwrites this setting. The default depends on the reference dimensions.
GM.PLLIM(lim)
lim: real array containing the limits, xmin, xmax, ymin, ymax, zmin, zmax
GM.PLLIM(0)
GM.CONVERT(name1,name2,'G', brec,opt)
Group patches into larger sets that are represented in the NURBS format. At the moment the
NURBS representation is supported in the following commands:
DR>ID NURBS; ID2 NAME; FILL RNDN; PLO sur2; SEC sur2;
brec: (opt) a record containg names of curves that are boundaries of the patch groups. It is not
required that the list is complete. Other boundaries are taken into use if needed.
opt: options
N: create only the NURBS representation. As a default, the patches calculated from the
NURBS representation are also stored in the result.
GM.CONVERT(points,surface,'INT',opt)
surface: name of the result surface. Nurbs and patch representations are both created.
opt: options
R1: the points are in the format of the LOFT task i.e. the columns are stored in consecutive
sets of records 1001,1002,1003, where each record has M coordinates. Such a description can
be created e.g. by the CALC command of the LOFT task.
R2: the points are created by GM.CONVERT with keyword SP i.e. POINTS=REF from
GM.CONVERT(su1,table,'SP',ref)
GM.CONVERT(sur,tdescr,'TOP', opt,sur2,nsr)
opt: options
I: insert knots to obtain same structure of knots and control points along the connection lines
between the nurbses
II: subdivide the nurbses so that there is at most one neignbor connected to an edge of a nurbs
R: rebuild nurbses by fitting into a point set obtained from the original surface without
reparametrization
R2: rebuild nurbses by fitting into a uniform distribution of points and parameters obtained from
the original surface
nsr: (opt) number of subdivisions in rebuild Each nonzero iterval of knots is divided into nsr parts
(default=3)
GM.CONVERT(sur1,table,'SP',ref, sur2)
A two dimensional N*M array of 3D-points is selected from a surface. The four edges bounding
the surface are given by the user together with the dimensions (N,M) of the array. The points
are selected so that the distances between two adjacent points are about the same within each
row or column. By using an additional option, a surface containing one nurbs can be fitted to
the created point set. The fitting can be done also by calling GM.CONVERT with keyword INT.
n=GM.CONVERT(model,block,'NPN',sur,opt)
block: name of NPN block empty string: all blocks of the model
opt: options
U: assign uniform parametrization to the input data. As a default, the parameters are averaged
out from the chord lengths.
G: apply tangent continuity constraints at nurbs boundaries. The surface is not any more going
through all NPN points. The command OPT D; should be added to the NPN-model.
GM.CONVERT(sur,table,'CP')
IF needed the given surface is first converted to the facet representation, and the facets are
returned either in the description of a facet surface or in the description of a curve. See also the
function GM.GETFACETS.
GM.FACETS(source,name,opt,tol)
tol: (opt) accuracy of the result tol>0: tolerance tol<0: each facet is subdivided into n*n-parts
(n=int(-tol))
EXAMPLES
@sur=gm.facets('HULL')
@sur=gm.facets('HULL','FACET_SURFACE')
@sur=gm.facets('HULL','FACET_CURVE','C')
The calculation sections of an object are converted to a facet surface. The number of pounts is
adjusted so that consequtive sections have the same number of points and similar features are
connected. This is done separately for each interval between step discontinutities.
GM.CSTOSURFACE(name,result,tol,ktol,opt)
result: name of the result. Presently, the result is not stored (available at run time only).
tol: (opt) tolerance for comparing coordinates, default=0.001. If the name begins with TAB*, the
result is generated as a table.
ktol: (opt) tolerance used when identifying knuckles to be taken into account as features in the
shape, default=20 (degrees). 0=use default.
opt: options:
C: return the result as curve (adjustments of points done as for the surface)
A: take all sections, default omit redundant sections (all points equal within tol).
GM.CORNERS(curve,proj,arr,adj)
Returns corner points of a closed curve. The corners are identified by finding nearest points to
straights of 45 and 135 degree inclination.
arr: integer array for receiving result, the corners are returned at this order: upper right, lower right,
lower left, upper left
GM.CORNERS(curve,proj,arr,angle,opt)
This returns all points classified as corners. Corners are identified as knuckles exceeding the
given angle
opt: options
A: this must be given in order to distinguish this case form the previous one
n=GM.COUNT(obj,opt)
opt: options
d=GM.GIRTH(name,p1,p2,desc)
Distance between points p1 and p2 along a section from the given surface. The section is
obtained by the coordinate having the same value on p1 and p2.
GM.GIRTH(name,axis,q,ref1,ref2,n,xarr,yarr,zarr,opt)
Return n points evenly distributed between ref1 and ref2 on the given surface along section
axis=q.
q: intersection coordinate
opt: options
GM.GIRTH(name,axis,q,ref1,gv,n,xarr,yarr,zarr,opt)
Returns n points so that spacing along the given section is gv starting from ref1.
The function extrapolates a curve by extending it a given distance at the ends in the direction of
the first/last segment.
GM.EXTRAPOLATE(curve,l1,l2)
The function modifies a given curve so that it has only unique values on both sides of the given
axis on a given plane. The modified curve is stored in runtime memory with the given name.
Can be used e.g. for modifying the waterline curve.
GM.UVALCURVE(curve,newcur,axis,plane,opt)
plane: plane where the curve has constant values (1=X 2=Y 3=Z)
The function returns 1 if the point is inside, -1 if outside or 0 if the question could not be
decided. The object can be closed in 3d (a room, closed surface) or in 2d (closed curve,
surface). In the latter case the test is done in a projection.
GM.INSIDE(refobject,point)
refobject: name of reference object, with reference to which the test is made
point: point to be tested, either three coordinates x,y,z or array containing the coordinates
GM.INSIDE(refobject,u,v,proj)
proj: projection, X, Y or Z
GM.INSIDE(refobject,object)
As above, but another object is given instead of a point. If the object is a point object, the result
is equivalent with the one above, otherwise the center of gravity is tested. The function does
not test for partial overlap. Holes in 'refobject' are ignored.
EXAMPLES:
@GM.INSIDE('R601',22,0,3) -> 1 if (22,0,3) inside R601
@GM.INSIDE('DAMHULL','R10')
@IF GM.INSIDE('STABHULL',P) THEN ...
The function tells whether there is an overlap between two rooms or closed surfaces. The
check is done using the calculation sections and is therefore slightly inaccurate. By default, the
function returns 'no overlap' in uncertain cases. This can be modified with options O, A.
ovl=GM.OVERLAP(name1,name2,opt)
opt: options
A: reduce tolerance by which overlap ignored, i.e. return 1 rather than 0 in uncertain cases.
AA=stronger
O: return ovl=1 of there is only an uncertain overlap. Default=0 in this case. This consideration
is caused by a section in one object that is not matched by one in the other. In this case, the
nearest ones on both sides are tested and an overlap is considered uncertain if only one of
them gives an overlap.
X: in the case described above, make an additional section for the test
I: if one of the bounding boxes is completely inside the other, return 1 (=overlap) without further
checks.
ovl=GM.OVERLAP(name,testobj,result,opt)
This form is similar but the second operand is a box or a cylinder and the intersection points
with the calculation sections can be obtained. It has been implemented for purposes related to
penetration into tanks.
curve: plane space curve with fixed y or z. The test object is a cylinder with this base and
extending outside the ship (+y or -z). With option R the direction can be reversed.
result: (opt) name of curve where intersection points are stored as records x (1001), y (1002) and z
(1003).
opt: options:
R: see above
The function returns a point that is roughly in the center of an object but if needed corrected so
that it is actually inside it. The function is available for closed curves and rooms.
p=GM.POINTINSIDE(name,opt)
p: array containing the result, x, y or z. See also options X, Y, Z and A. The array is reused at the
next call.
opt: options:
A: if the object is a combined one, return the result separately for each elementary part as
additional coordinate triplets in the result. Default=return one point.
W: try to improve the result so that there is more space around the point. WW: same but trying
harder.
GM.POINTINSIDE(name,p,opt)
As above, the the result is returned in the array p provided by the caller.
The function returns the relative location of a point in the direction of a coordinate axis, with
respect to an open surface. The function returns 1 if the point on the positive side, -1 if the
point is on the negative side and 0 if the side is undetermined and -9 if the side could not be
decided because the line through the point does not meet the surface.
dir=GM.WHATSIDE(surface,point,axis)
point: point to be tested, either name of object, three coordinates or array with three values
EXAMPLES
@GM.WHATSIDE('HULL',40,4,3,2) -> -1 (to -y from the hull)
@GM.WHATSIDE('HULL',40,4,3,3) -> 1 (to +z from the hull)
@GM.WHATSIDE('HULL',40,-3,3,3) -> 0 (no result)
POINT P1 (40,4,3)
@GM.WHATSIDE('HULL','P1',2) -> -1 (as in first example)
The function returns the name of the room in a given set that contains a given point. If no room
contains the point, the function value is 'OUTSIDE'.
GM.WHATROOM(collection,point,opt)
point: point to be tested, either name of object, three coordinates or array with three values
opt: options
EXAMPLE
@NAME=GM.WHATROOM('ARR*A',40,3,4)
Name of room in the current arrangement containing the point
(40,3,4)
This function returns the position of a set of objects, as measured in a given section. The
typical use of this function is to get deck heights from a model.
GM.POS(nlist,axis,saxis,q,options,qs,qrec,nrec)
q: section coordinate
options:
L,U,C,A: select place in the section where to get the coordinate, default=at the coordinate qs
I: add successful coordinates to the output as obtained, default=keep the indexing of 'nlist'.
Implies S. Duplicates are removed. NOTE: default if rooms are given.
qs: (opt) coordinate where to measure the position, given on the remaining axis after 'axis', 'saxis'.
Not allowed if there is an object with execute-only rights (replaced by C option).
nrec: (opt) array receiving the names in the order returned (intended to be used with option I).
EXAMPLE
@nlist=tp.column('STR*DECKS','NAME')
@qrec=arr(2)
@nrec=arr(3)
@gm.pos(nlist,3,1,45,'LIO',qrec,nrec)
z-coordinates (axis=3) are measured in the section x=45 of surfaces in STR*DECKS at the
lower y. Of those objects occurring in the section and satisfying the O option (orientation=Z),
the coordinates are returned in 'qrec' and names in 'nrec'
The purpose of this function is to identify the compartments at the sides of a surface. It is
intended for pieces of surface small enough so that the question has an unambigous answer at
both sides and the result is checked at roughly the midpoint only.
res=GM.ACOMP(set,name,pcurve,list,tol,opt)
The function value is formed by name1/name2, where name1=the neighbour on the lower side
and name2 the one on the upper side. Upper/lower is interpreted according to the axis that is
closest to the normal of the curve. name1 or name2 may be empty if there is no neighbour.
See also parameter LIST.
set: name of combined room providing the candidates for the neighbours. Can be an arrangement
(ARR*...). Empty=current arrangement under SM.
name: name of object to be tested. May also be a closed curve. It may be a point object provided that
option X, Y or Z is given. A surface must have the orientation defined.
pcurve: (opt) curve defining part of the surface. Relevant only if 'name' is a surface. The parameter 'opt'
must also be given (may be empty).
list: (opt) string array for receiving the result: two items, one for inside and one for outside. An
empty string means that there is no neighbour on that side. With this parameter, the function
value is empty.
tol: (opt) distance from the surface at which a point is selected for testing inclusion in the
compartment, default=0.2.
opt: options
O: return the result in terms of inside/outside, default lower/upper according to the orientation.
The compartment on the inside is returned first.
S: single try: test with the given tolerance only, otherwise additional checks may be done with
0.5*tol and 2*tol.
The function tells whether two plane curves have the same shape and optionally generates the
difference.
same=GM.COMPCURVES(curve1,curve2,tol,result,opt)
curve1: name of first operand. NOTE: only first branch checked. The curve may be a local plane curve
(records u,v), a plane space curve or a general space curve. In the last case, the comparison is
done in the projection specified by option X, Y or Z.
tol: tolerance
result: (opt) name for storing the result. Assign empty if not used and 'opt' follows. NOTE: the result is
not written to the data base.
opt: options
X: if the operand curves is a general space curve, do the check in the x-projection. Similarly Y
and Z.
Q: check also the third coordinate. It is only checked that the ranges are the same.
B: if 'result' has been given, return the differing parts on both curves, default curve1 only
C: if 'result' has been given, return the common parts rather than the difference
EXAMPLES
@SAME=GM.COMPCURVES('A','B',0.001)
@SAME=GM.COMPCURVES('A','B',0.001,'DIFF','X')
As above but store the parts of A not covered B Y as the curve DIFF. Do the comparison in the
X projection.
D=GM.DIST(OBJ1,OBJ2,P1,P2,DIR,LIM,OPT,DQ)
The smallest distance between the given objects (surfaces,rooms) in the given direction is
calculated. As an option, the search can be restricted within a box. The search is done by
intersecting the objects with a set of principal planes AXIS=Q, where directions of the AXIS and
DIR are orthogonal. For each DIR there are two alternatives of AXIS, but as a default only one
of these is used. X-axis is used for DIR=+-Y or +-Z, and Y-axis for DIR=+-X. With option A,
both alternatives of AXIS are used. The set of intersection coordinates Q contains the extreme
coordinates of the objects. For AXIS=X, the discontinuities of the object are included in the
Q-set. Other planes are added in between so that the distance between the planes is smaller
than DQ.
D: function value i.e. the smallest distance between the given objects
P1: real array for coordinates of the nearest point in OBJ1; p1=0 is accepted
P2: real array for coordinates of the nearest point in OBJ2; p2=0 is accepted
LIM: real array containing limiting coordinates xmin,xmax,ymin,ymax,zmin,zmax of a box where the
smallest distance is searched; lim=0 is accepted
OPT: options
B: calculate distance to boundary of room. As a default, objects totally inside a room result in
D=0
I: use the nondefaulted alternative of intersection AXIS; i.e. AXIS=Z for DIR=+-X or +-Y, and
AXIS=Y for DIR=+-X
DQ: (opt) maximum allowed distance between the the intersection planes; as a default DQ=1.
D=GM.DIST(OBJ,XARR,YARR,ZARR,DARR)
D: function value i.e. the largest distance from the point set to the object
The part of the room boundary that is located in the given surface is created. The surface is a
principal plane or a facet surface.
GM.RLIM(room,arr,axis,q,tra,tol,qval)
arr: an array where the created surfaces are stored In the case of an integer array, the reference
numbers are stored. In the case of a string array, the names are stored. In the latter case the
surfaces are also written into the database.
3: symmetric surface
2: reflected surface
tol: (opt) tolerance (default=0.01). For each plane or for each planar facet, the room is intersected
by two planes, that are translated along the plane normal by the amount -tol and tol. The
difference between these sections contains information about the boundary.
qval: (opt) acceptance criteria for the facets (default=100). Only those facets, whose 'larger side' is
less than qval*'smaller side' are accepted.
Examples:
@r=arr(3)
@nb=gm.rlim('R10',r,'TTOP') ;** part on TTOP
@nb=gm.rlim('R10',r,3,1.5) ;** part on Z=1.5
@nb=gm.rlim('R10',r,'Z=1.5') ;** part on Z=1.5
@nb=gm.rlim('R10',r,'Y=2',0,3) ;** parts on Y=2 and Y=-2
The function returns the limits of an elementary part of a room or surface object definition, (LIM,
ADD or RED command), either as a string or in an array. In the latter case, the function value is
an integer which is >0 for a LIMITS or ADD part, else <0. The absolute value is 1 if there are no
transformations, 2 for a reflection, 3 for symmetry and 9 for a case not handled. 0=part out of
range. A partially different function is obtained with the option A.
Restrictions:
The room must not be a combined one. Transformations are handled only for the simplest
cases: room definition ending with REF or SYM or another room reflected (option must be
given). Multiple transformations are not supported.
GM.RLIMITS(room,part,array,options)
part: 1=limits record, 2=first ADD or RED, 3=next etc. With option A, 0=all parts.
array: (opt) string array for receiving the result. Each limit is stored at an own index. Without this
parameter, the result is returned as the function value. Without option AA, preceding contents
are removed.
options: without the options, the result is the same as in the DES command. With the options, the result
is generated from the internal form used at run time. The most important difference is that the
six first positions are assigned the limits classified as forming the main limits in the coordinate
directions. These may include dummy limits in parentheses. The option may include
I: use the run time form (implied by the other options). In this form various interpretations and
arrangements have been made to the limits.
R: recursive: if another room is referenced, the LIMITS command of it is returned, else the
room as such
C: in case of coordinate planes, return the coordinate explicitly, regardless of its original
definition.
B: (bare) if the limit is formed by a surface, return the name only, not side selection or
transformation codes. This option is intended to be used with option T (in a separate call!).
T: (transformations) return only transformation codes, i.e. reflections and other operation
applied on surfaces. REF=reflection, SYM=symmetry, DUMMY=dummy limit, otherwise the
transformation syntax (as given in parentheses after the object name).
A: with this option, a list of surfaces is produced, without connection to their role. Coordinate
planes are returned as axis=q. The C option is recommended. The operation may concern all
parts of the definition (assign part=0). Other transformations than reflections around y=0 are
ignored. The function value is empty. The output array is compulsory. With option AA new
surfaces are ADDED to preceding contents.
EXAMPLES
ROOM R123; LIMITS BH1 #BH1+10 0 HULL Z<10; ADD R1230
ROOM R1230; LIMITS #10 #20 0 3 2 4
GM.RLIMITS('R123',1) -> LIM BH1 #BH1+10 0 HULL Z<10
GM.RLIMITS('R123',2) -> ADD R1230
GM.RLIMITS('R123',1,'I') -> LIM BH1 #BH1+10 0 HULL (HULL) 10
GM.RLIMITS('R123',2,'I') -> ADD R1230
GM.RLIMITS('R123',2,'R') -> LIM #10 #20 0 3 2 4
GM.RLIMITS('R123',1,'Q') -> LIM 21 31 0 HULL (HULL) 10
@ll=arr(3)
GM.RLIMITS('R123',1,ll,'I') -> 1
!VAR LIST ll -> BH1, #BH1+10, 0, HULL, (HULL), 10
GM.RLIMITS(room,res,opt)
opt: options
The function stores data for the definition points in of a given curve in a table or in separately
given arrays. The function value is the number of points. The function can also be used for a
point object, for which one element is returned in arrays def, x, y and z. The curve can also be
the base curve of a cylinder or similar surface, provided that the curve has definition points.
GM.CURTOTAB(name,def,a1,a2,x,y,z,t1,t2,c1,c2,opt)
name: name of curve. The object can also be a cylinder (CYL, DCYL, PYR, CNS).
def: string array for storing the definition of the points in the normal definition syntax.
a1: string array for storing the angle conditions before the points (slash omitted)
a2: string array for storing the angle conditions after the points (slash omitted)
t1,t2: (opt) real arrays for receiving the angles before and after. Not used if XYZ curve.
c1,c2: (opt) real arrays for receiving the curvatures before and after. Not used if XYZ curve.
GM.CURTOTAB(name,table,opt)
As above, but the receiver is the given table, containing one or more of the columns DEF, A1,
A2, X, Y, Z.
EXAMPLE
@DEF=ARR(3) @A1=ARR(3) @A2=ARR(3)
@N=GM.CURTOTAB('STEM',DEF,A1,A2)
@X=ARR(2) @Y=ARR(2) @Z=ARR(2) @T1=ARR(2) @T2=ARR(2)
@C1=ARR(2) @C2=ARR(2)
@N=GM.CURTOTAB('STEM',DEF,A1,A2,X,Y,Z,T1,T2,C1,C2,' ')
The function creates a curve or updates an existing one using definition points and angles
stored in calculator arrays or a table.
GM.TABTOCUR(name,def,a1,a2,cmmnd,locsur)
a1: string array containing angle conditions before the points. Empty value where no angle
condition. The slash is optional.
commnd: command for defining the shape, including a possible sorting instruction. Without this
parameter, this information is taken from the present version of the given curve. EXAMPLE:
XYZ for creating a curve with three co-ordinates defined. XY/YZ/XZ for creating a curve with
two co-ordinates defined.
locsur: (opt) definition of the location surface, in the normal syntax (string). It is compulsory if 'cmmnd'
is given and not XYZ.
GM.TABTOCUR(name,table,cmmnd,locsur)
As above, but the arrays are supposed to be found as columns DEF, A1,A2 in the table given
by second parameter.
EXAMPLES
@GM.TABTOCUR('STEM',DEF,A1,A2)
The curve 'STEM' is updated using the arrays DEF, A1 and A2.
The curve STEM is created from the information the given table and the given parameters.
n=GM.I2P(iref,pref,opt)
opt: options
n=GM.P2I(pref,iref,pref2,opt)
pref2: description that defines the scope of the search This description should be calculated by
gm.p2i with option **U for that geometry (e.g. a surface HULL) whose parameters are
searched.
opt: options
GM.PSET(sets,opt)
set: name of the PDEF*set or string record containing names of the pdef*sets
opt: option
r=GM.PSET(idata)
NAME: parameters
GM.PSET(imod)
Set type of interactive modifications i.e. define how expressions that contain parameters are
changed e.g. when a point is moved in the Hull Surface Editor. For instance if imod='K1', a
definition 'BREF/2' is converted into '-1.3+BREF/2' when a point is moved -1.3 meters in the
negative y-direction.
K0: the so called k-expressions (i.e. k*expr1, k*exp1+expr2 or k+expr1) are modified by
adjusting the coefficient k
K1: as K0 for the k-expressions; other expressions that contain parameters are converted into
form k+expr1 and the coefficient k is adjusted.
K2: as k1, but the possible conversion is done into the form k*expr1
GM.PSET(icalc)
The function value is a component (location and/or angle) of the definition of a point in a
definition curve (string, definition syntax).
GM.PDEF(curve,point,aspect)
GM.PDEF(curve,1,'P')
2.1. Management
Create the operating environment for the editing process and make it current. Several
processes may be open simultaneusly. Views must be assigned with GME.VIEW.
GME.OPEN(id)
id: user selected identifier for distinguishing the work areas. The state is stored in a description
named GME*id.
The control structures for the given process are deleted. No more actions are possible. Exit
from the main task has the same effect. See also function GME.TIDY.
GME.CLOSE(id)
This function should be called at least when abandoning a surface that has been modified but
changes not stored. All components of the current surface are removed from the free storage
and if the surface has been used for intersecting, also the preparation result. After this, the
state of the process is 'no current surface'.
GME.TIDY(opt)
opt: options:
A: remove any curves from the free storage. This option is provided for the case that several
surfaces have been used, and no cleaning done between. No other task is supposed to be
active, using named curves in the free storage.
S: as A, but for surfaces. It does not affect surfaces handled by the object administration.
The given process is made current. If it does not exist, the result is that no process is current.
Redrawing must be requested separately.
value=GME.WORKAREA(id)
name=GME.WORKAREA()
The function value is 0=not opened, 1=opened, no current surface, 2=surface current,
3=surface current and changed.
A surface is made the object of editing. GME.OPEN('STD') is implied if no work area is opened.
GME.VIEW(current) is implied if no view has been assigned. Function value: 1=ok, 0=error.
GME.GET(name,opt)
opt: options:
R: allow use of data in the run time store, default is to force reading new curves from the data
base.
GME.GET()
Without parameters, the function value is the name of the current surface or empty=none.
The function creates a new surface and makes it the target of the editing process. The surface
is empty except for two dummy curves marking the extension of the surface.
GME.NEW(name,size,opt)
opt: options:
This function is relevant when the current surface is a combined one. It selects part of the
surface to be current, which is presently used in the ADDCURE and REMOVECURVE
functions only.
This function adds a curve to the surface optionally to the editing process only. An existing
curve can be replaced by a copy from the data base or backup. If the current surface is
combined, the curve is added to the current part.
GMR.ADDCURVE(name,opt)
opt: options
F: force reading a new copy from the data base, default=reject if the curve is already in use
The given curve is removed from the current surface and from the editing process. By default, it
is not deleted from the data base. If the current surface is a combined one, the curve is
removed from the current part, if any, else first part where found.
GME.REMOVECURVE(name,opt)
opt: options
Calling the function without options returns the current type of the curve. If the type is changed,
the results are also updated to the screen.
GME.CURVETYPE()
GME.CURVETYPE(name)
GME.CURVETYPE(name,opt)
opt: options
GME.LOCK(name,opt)
opt: options
L: lock curve
U: unlock curve
EXAMPLE
GME.LOCK('KNA','L')
GME.LOCK('HULLA','UWS')
This function cancels changes done. The amount of UNDO possible is controlled by option
UNDO. The function also handles auxiliary functions related to UNDO.
GME.UNDO()
GME.UNDO(opt,op)
Special functions.
opt:
OP: return the name of the last operation (i.e. the one that will by canceled by UNDO) empty if
none
FIX: treat subsequent changes as one. A name of this set of changed can be given as second
parameter.
B: bundle: treat repeated occurrences of the same function as one change. Repeated call with
this option breaks a a possible previous bundle.
op: (opt) if UNDO FIX: record this string as the name of the set of the operation started (answer to
next GME.UNDO('OP')), if UNDO OP, number of steps back, default=1.
The current objects are written to the data base. Not needed if the auto-store mode is on (see
options).
A backup of the current surface is made by storing the curves and the surface in DB4.
GME.BACKUP()
The last copy made with GME.BACKUP is restored. The function value is 1=done, 0=error.
GME.RESTORE(opt)
opt: options
DB: read from the main data base rather than DB4.
?: do not read, but return the date of the last backup (internal form).
GME.RESTORE('?')
Special case: return the time (integer hhmmss) of the last backup, 0=none belonging to this
session.
GME.UPDATE(opt)
opt:
SS: correct cross referencing silently, do not report the original problem
W: (with P): write the result to the data base even if option SAVE=0
GME.PREP(opt):
opt:
DDP: as DD, but make the result permanent, default=disappears at the next update of the
view.
This function is intended for cases when a curve has been changed by an action outside the
editing context. The effect is to update the dependent curves and the display.
GME.CHANGED(name,opt)
The function controls the set of views covered by the update services. Function value=empty.
GME.VIEW(nr)
GME.VIEW()
This form returns the list of currently active views as the reference number of the internally
used list.
The function concerns the views managed by the editing process (see GME.VIEW). Function
value=empty.
GME.REDRAW(opt,view)
R: complete redraw of default contents (curves and point objects) after emptying the display.
The function controls the scaling of the views by assigning the size of the object. Default=from
current surface.
GME.SIZE(arr,opt)
arr: (opt) array containing xmin...zmax, compulsory if option C not given and especially with option
P,
opt: options:
The function draws the curves as before the last change, stored in the backup or as stored in
the data base.
GME.PLOTOLD(opt,col,view)
2: cover two changes backwards (must be OPT UNDO >1), similarly higher numbers. Can also
be given as a number.
The function plots a symbol at points of the type specified by the first parameter.
GME.PLOTPOINTS(type,marker,col,size,opt)
type: type of points, as in ID command. For cases A, PA, LOC, see command ID for defaults, else
GME.SETOPTION.
LOC: points in the definition of the location surface (when defined as a projection).
GME.CURVATURE(array)
array: string array containing the names of the curves for the curvature display, 0: empty the list
The function identifies the object pointed at by the given coordinates in the current view. The
possible alternatives are tested in the following order and the function value tells the type of
object:
These alternatives are checked in dependence order (most primary first). Return 'start' if no
result.
GME.IDENTIFY(start,u,v,opt,res)
start: value defined as the function value. The identification proceeds with the next possibility in the
list above, 0=begin from start.
u,v: (opt) point in the projection plane, default last graphically input item.
opt: options
PP: if possible, take the curve that has a definition point, default=take first curve in definition
order.
N: take the nearest point if there are several points within the tolerance.
res: (opt) integer array for returning information on the object found: object index, point index, point
type. For a point on a curve, the point type is 0=isolated primary point, 1=node containing a
primary point, 2=node, no primary point, -1: no point selected. For an angle indicator, the point
type is -1 or +1 if the angle is valid before/after a knuckle, else 0.
name=GME.IDENTIFY()
Special case: return the name of the curve pointed at by the locator in the current view. Empty
is returned if none.
The function value is 0=no object current, 1=point object or tangent function, 2=curve, no point
on the curve, 3=curve and point on it.
GME.CURVE()
The function value is the name of the current curve or empty=no current curve.
GME.CURVE(sel,arr)
The function value is a reference number to a record containing data related to the current
curves. The records must not be changed. Note: index 1 is reserved for the location projection
when selected, and is normally not used.
N: curve names (all curves currently treated). The alt. T,R and B are indexed as this one, D
gives indices in this record.
R: reference numbers
C: current list of curve names for the additional curvature display (set with GME.CURVATURE)
O: curve names ordered in dependence order. A receiver array must be given as the second
parameter. The function value = the number of curves.
The function value is the index of the current point. 0=no point current.
A curve or point object is made current. The highlight is changed in the display.
GME.SELC(name)
GME.SELC(di)
GME.SELC('+')
GME.SELC('l')
Special case: location projection of the current curve. No action if the curve is not of correct
type. Note: lower case l.
GME.SELC()
Special case: return record containing the list currently active curves.
GME.SELP(nr)
nr: index of definition point on the current curve. Special cases: 0=return number of points, -1: take
the preceding point -2: take the next point.
GME.SELP(name)
name: select definition point that is given by the name of a referenced curve or point.
n=GME.SELP()
The function returns the next definition point, counted from the current point along a given
curve. It differs from GME.SELP in that the definition point may be on another curve.
pnr=GME.NEXTP(name,opt,rname)
The function value is the index of the point selected, 0=none obtained. If the point is on another
curve, it is returned negative.
name: name of curve, empty=current curve. The curve must be one that passes through the current
point.
opt: options:
rname: (opt) output parameter for receiving the name of the curve that has the resulting point as a
definition point. The parameter must be a string variable.
The function returns the definition of the current object (curve or point) in a description provided
by the caller. See also GME.RUN. The function value is the number of lines returned.
n=GME.DES(macro,curve)
The functions returns items related to the definition of a point on the current curve or the curve
as such.
GME.DEF(qnt,curve)
TYPE: 0=point object, 1...3=principal plane curve (1=x etc) 4=general space curve
LTYPE: type of location surface, 0=fixed coordinate (TYPE=1...3), 1...3: projection along the
given axis, 4=general plane, 10=XYZ curve.
PTYPE: type of point, 1=primary, 2=from point object, from curve intersection, 10=the object is
a point object
NAME: name
The function returns an array containing the coordinates x,y,z of the current point object or
current point on the current curve.
arr=GME.COORD()
The function value is the sorting method of the current curve, values as in GME.NEWDEF
(X,Y,Z,F,G).
The function returns the interpolation method of the current curve, alt. M1, M2 or XYZ.
lock=GME.LOCKED(curve)
0: no restrictions
n=GME.LOCKED(list)
The coordinates of the locator are updated and the display updated.
GME.SETLOCATOR(x,y,z,opt)
GME.SETLOCATOR(opt)
Special functions
opt: options
GME.GETLOCATOR(axis)
arr=GME.GETLOCATOR()
The function starts an operation where the locator is changed by moving with the cursor.
GME.MOVELOCATOR(opt)
2.6. Options
GME.SETOPTION(id,value)
AADD: automatic add: a curve defined with GME.RUN or under the HLE task is automatically
added to the editing process (AADD=1) or to the surface (AADD=2). Default: AADD=0, no
addition.
UNDO: number of UNDO steps possible, default 1. The backup for UNDO is reset when this
option is given.
UPD: extent of update after change: 1=current curve 2=whole grid, default=2.
UPDI: extent of update in real time operation: 0=moved point, 1=current curve, 2=all curves
attached to the moved point, 3=whole grid. Default=2.
MXDX: for checking against unreasonable changes: upper limit for changes of x, default
0.1*LREF. Similarly MXDY, MXDZ, default 0.1*BDWL.
ACC: auxiliary curve colour, applied to curves not in the surface, default: 0=same as CC.
DPS: symbol for definition points (marker number). Similarly RPS=secondary points,
POS=point objects, LPS: point in the location surface, aps=points with angle, LS=locator.
Special case: 100=cross hair.
DPH: height of symbols above. >0: ship size, <0=drawing size (fixed regardless of scaling)
Similarly RPH=secondary points, POH=point objects, LP=location points, APH=points with
angles, ILH=length for ID L, ILA=length for ILA, LH=locator.
DPC: colour of symbols above. Similarly RPC=secondary points, POC=point objects, LPC,
APC, ILC, IAC: for ID l, ID A, CRVC=curvature indicator. LC=locator.
DPO: plotting definition points: 1=all curves, 3=only for curves selected for the curvature
display
LPO: plotting location surface points: 0=not, 3=all curves, 4=as 3 but imply L option in MOVE,
MOVEI.
CRV: curvature indication using colours: 0=not, 1=all curves, default=0. Note see also CRVO.
CRVO: curvature indicator (porcupine) on: 0=not, 3=all curves, 1=current only, 2=both curves
at node
ITOL: tolerance for identification of points and curves, 0.1 mm screen scale, default=15 (1.5
mm).
MTOL: tolerance for real time operations, unit 0.1 mm screen scale, default 2.
GME.SETOPTION('STD')
Special case, restore all option to built-in values. STD-D: as STD but only those related to the
display.
GME.GETOPTION(id)
GME.OPTID(i)
Returns the identifier of the i:th option. I=1...29, some positions empty. The GETOPTION and
SETOPTION functions accept the index i as argument.
GME.OPTID(i,0)
GME.SETPOPT(id,value)
KTOL: knuckle point tolerance in degrees. Controls how sharply a curve can turn at a point
before the point is considered to be a knuckle point.
K2TOL: knuckle line tolerance in degrees. If a curve that intersects another curve has a angle
discontinuity greater than this value, the curve is identified as a knuckle line.
BTOL: approximation tolerance for the boundary curves. Controls how much the shape of the
boundary can differ from the final preparation result. Fixed number of subdivision can be used
by giving a negative integer value.
TSC: type of curve smoothing in the approximation. 0: off 2: use second differences
G: type of grouping. 0: no grouping, 1: group, 2: group & lower nurbs degree to one if possible
NTOL: approximation tolerance for the boundary normals. Controls how much the surface
normals are allowed to differ from the normal plane calculated from the boundary curves.
IMAX: number of iterations in surface fitting Iterations are used to improve surface fitting when
some equiparameter curves are not properly supported by the grid of auxiliary curves.
GTOL: gap elimination tolerance. If a plane section of the surface contains gaps that are
smaller than this value, they are eliminated.
GME.SETPOPT('STD')
GME.GETPOPT(id)
GME.POPTID(i)
Returns the identifier of the i:th option. I=1...16, some positions empty The GETPOPT and
SETPOPT functions accept the index i as argument.
GME.POPTID(i,0)
GME.PREPDIAG('ELEMENTS',markers)
Plot element boundaries with different colours. Green: ok. Blue: less than four sides,
subdivision might be needed. Red: more than four sides, requires subdivision.
markers: (opt) 1: draw markers at the end points of the element boundaries
GME.PREPDIAG('NORMALS',curname,scale,nsamples)
curname: (opt) curve name, 0: all boundary curves. Only with option NORMALS.
scale: (opt) scale for the vectors that represent the normals, default: 1.0
The function returns information about all objects at a node point. The function value: 0=not a
node, 1=node containing a primary point, 2=node containing no primary point.
GME.NODE(descr,point,curve)
1: names of objects
3: points: index of the point on the curve, for point object 1. 0=no definition point.
4: reference type: -1=no definition point, 0=primary point, 1=normal reference, 2=curve/axis=q,
3=curve/curve
The returns the constraint needed for keeping the current point within the location surfaces of
the curves involved. The function takes into account curves with a curved location surface by
its tangent plane only. At most two curves with location surfaces are taken into account at the
point. The function value is 0=no constraint, 2=movement allowed in one direction only,
1=movement allowed in a plane.
GME.CONSTRAINT(arr,opt)
arr: array (type 2) for receiving the result. In case 2 a vector is returned representing the allowed
direction, in case 1 a plane in the form (v1,v2,v3,q) representing the plane v1*x+v2*y+v3*z=q.
opt: (opt) additional constraints, ignored if no freedom left by those obtained from the curves. Value
X, Y, Z, FX, FY or FZ as in GME.MOVE.
The function applies to the current point object or current point on the current curve.
GME.MOVE(x,y,z,opt)
x,y,z: (opt) new coordinates or increments. The change may be restricted by options or by conditions
caused by the location surfaces involved. If omitted, take the position from the locator.
opt: options:
C: this option is relevant if the current point is a node and another curve than the current one
contains a primary point: allow change of operand curve so that the change is applied to the
primary curve.
O: allow change of order between points, default=restrict changes so that the ordering is not
changed.
FX: fix x, allow only change of y and z. Similarly FY, FZ. In a principal projection, X, Y or Z may
be replaced by U or V.
G: treat the given point as given graphically in the current projection, if it is X, Y or Z. The effect
is to disregard changes of this coordinate. Default if x,y,z taken from the locator.
K: keep the old curve position at the given point. The point is selected according to the axis
given by option X, Y or Z, or according to the curve direction. Options N, O implied.
L: allow the location projection to change, if the selected point contains a degree of freedom.
E: (after L or LL): apply only if the current curve has a location surface defined in the current
projection.
GME.MOVE(u,v,opt)
As above, but u and v are interpreted according to the current projection which must by X, Y or
Z.
GME.MOVE(opt)
This function handles moving of points by a real time operation. Be default, it operates on the
current curve, but the point may be changed if allowed by option C.
GME.MOVEI(opt)
opt: options
N: apply no constraints from location surfaces, default=keep the the point in the location
surfaces of the intersecting curves.
X: allow movement in the x-direction only, similarly Y, Z. In a principal projection U and V may
be given, representing the axes visible.
FX: fix x, similarly FY, FZ, FU, FV In a principal projection, X, Y or Z may be replaced by U or
V.
R: 'dynamic' restriction: keep only the largest one of the changes in dx, dy or dz.
S: shorten: carry out changes as 0.25 times the given one. Similarly SS=0.1.
C: allow change of curve if the current point is a node having a primary point on another curve
than the current one.
CC: allow arbitrary change of curve. The place where the cursor is pressed selects the point to
be moved. If the point is not valid, it is disregarded without message.
F: finish the operation after first change, else allow new start. F option implied if operation
started with button 1 down.
K: keep the new point on the original curve. The new point is is decided using the coordinate
expressed by option X, Y or Z if given, else according to the curve direction.
GME.ADD(opt)
opt: options
GME.ADD(u,v.opt)
GME.ADD(x,y,x,opt)
GME.FIX(opt)
opt: options
GME.FIX(u,v,opt)
Add a point at the place designated by the given coordinates, interpreted in the current
projection.
GME.FIX(x,y,x,opt)
A node point is fixed by adding a primary point to the first curve in the definition order. The
point is designated as the current one (default), by the locator or by coordinates in the current
projection.
GME.FIXNODE(u,v,opt)
GME.DELETE(opt)
opt:
F: remove the current point regardless of its type. Default: remove only primary points.
C: if the current point is not a primary point, try to identify one in the current node.
The function is valid for a node where two curves meet. Referencing order is kept unchanged,
but a new primary point is added to the curve being referenced. The location of the added point
is such that the shape of referencing curve is the same as without the reference.
The function applies the relax operation to multiple nodes of the current curve. Reference order
of the curves is kept, but new primary points are added to the referenced curves. The location
of these points are such that they do not affect the geometry of the referencing curve. If the list
of points contains primary points, they are removed in the process.
GME.RELAXCURVE(list)
The purpose of this function is to remove a possible primary in the vicinity of a node and unless
the node is already fixed, fix it to its current position.
GME.CLEANNODE(opt)
opt: options:
S: search: find a node in the vicinity of the current point, default=the node in question is given
by the current point. Range as described for option T.
X: do not delete a point in the range if there is already a primary point in the node.
E: allow deleting of endpoint, default=do not remove a point if the curve would be truncated.
P: allow redefining of point object defining the removed point for fixing the node
The function is valid for curves having a general location surface, and is intended for modifying
the definition so that as far as possible, points in the location definition correspond to points in
the shape. The default action is to move isolated primary points to a nearby point in the shape
definition if possible within a given tolerance.
GME.CLEANLOC(opt)
opt: options:
D: delete other points than endpoints having no match in the shape projection (after any
adjustments).
F: add a point to the location definition corresponding to primary definition points in the shape
The function starts the fairing algorithm for adjusting points for improving fairness. The object is
the current curve and optionally intersecting curves athe the moved points. By default, all
primary points except endpoints may be moved.
GME.FAIR(tol,opt,freepoints,fixpoints,w)
opt: options:
C: move the current point only. It must contain a primary point, but it may be on another curve
in the node.
A: all: apply the fairing criterion also to curve intersecting the given one at the moved points.
freepoints: (opt) integer array containing list of points to be moved. 0=not given.
fixpoints: (opt) integer array containing list of points to be fixed. 0=not given.
w: weight controlling the effect on intersection curves. A positive value implies option A.
This function adds a reference to the current curve of the given curve or of all curves.
GME.ADDREF(opt)
The referenced curve is found by the position of the locator in the current view. If the current
curve is an xyz-curve, the position of the locator is relevant for giving the qualifier.
opt: options
GME.ADDREF(opt)
This case differs by the option G. The grid is searched for curves intersected by the location
surface of the current one and that do not have a reference to it. Not available for xyz-curves.
opt:
X: take only references from frames. Similarly Y and Z for buttocks and waterlines
GME.ADDREF(opt,syntax)
The function is valid for a node where two curves meet. It changes the references so that the
mutual order of dependence between the two is reversed. Other changes may be done if loops
are formed.
The function is valid for a node where two curves meet. It removes the reference from the
active curve.
GME.REMOVEREF(opt)
opt: options
References given in the curve definition but not resulting in a point are removed.
GME.CLEANREF(opt)
opt: options:
The function changes the value of an angle condition at the current point.
GME.CHANGEANGLE(value,opt)
angle: angle in the given or implied projection. For a curve with a location surface, the
projection is the shape projection, for an xyz-curve the current projection unless the original
form is in a given projection.
vector: array containing three values, defining the direction vector. The length is relevant if so
in the original definition.
opt: options:
B: select the angle before the point, default: select the side where the angle is fixed, if two
angles, then the one before the point.
I: increment, default=the given value is an absolute value. 'value' must specify an angle. If the
original definition is by a vector, the effect is to change the vector.
P: do not accept the change unless the angle affected is the one visible in the current
projection.
The function adds an angle condition fixing the current direction of the curve.
GME.FIXANGLE(opt)
opt: options
B: select the angle before the point, default: if no angles fixed, make a common fixed angle,
else fix the free one.
R: allow also fixing of an indirectly given angle, default only undefined or free angles.
GME.FREEANGLE(opt)
opt: options
K: make a knuckle
B: select the angle before the point, default: if not K option, find a given angle, else apply to the
undefined one.
Change the angle by a real time operation. The target is the current curve and by default, the
current point.
GME.ANGLEI(opt)
opt: options:
B: select the angle before the point, default: select the side where the angle is fixed, if two
angles, then the one before the point.
C: starts a different operation where the point is first selected and then the angle is designated
by dragging the cursor away from it.
F: finish the operation after first change, else allow new start. F option implied if operation
started with button 1 down.
The function changes the location surface of the current curve. The function is implemented
only for curves with a constant coordinate as the location surface.
GME.MOVELS(opt)
The new coordinate is expressed by the locator. The locator is interpreted in the current
projection. Unless a node is located, the projection must be a principal one.
opt: options
N: adjust the coordinate to match a definition point near the locator. The tolerance is 2*itol.
R: if there are nodes on the curve with a primary point, move these points also.
P: (with R): if a referenced point is created by a point object, allow change of the point object.
GME.MOVELS(q,opt)
q: new position
opt: options
R: as above
GME.MOVELS(opt)
The new position is indicated by the locator. The current projection must be a principal one
which is not the same the axis of that coordinate.
opt: options
R: if there are nodes on the curve with a primary point, move these points also.
N: take the node pointed at by the locator. An arbitrary projection may be used.
The function starts a real time operation for moving a the location surface. The function is
implemented only for curves with a constant coordinate as the location surface and the current
projection must be a principal one which is not the same the axis of that coordinate.
GME.MOVELSI(opt)
opt: options
R: if there are nodes on the curve with a primary point, move these points also.
The primary point contained in the current point is replaced by a point object. See also
GME.CLEANNODE, option P.
GME.POINTOBJECT(name)
name: name of point object created. If the name ends with *, the * is replaced by the first index giving
an unused name.
opt: options
A: add the reference to all curves at the node, default=to the first one in the dependence order.
GME.DELETEPOINT()
A new curve is created and added to the edited set but not to the surface. Unless specified by
the parameters, the location is taken from the locator. It must be within the range of the
surface. The curve can be placed through the current grid, default=to add two points, the actual
location is subsequently defined with the standard editing tools. See also GME.GENLOCS,
GME.GENPLANE, GME.CONVERT.
GME.NEWCURVE(name,type,opt,locs)
name: name of curve. The name may contain an asterisk, which will be assigned the lowest available
index, giving a previous nonexistent name.
P: take the position from the current point. If the point is a node or defined by a point object, the
loaction is defined by a reference.
X: keep x fixed (in the projection plane). Ignored if type=x or option G given. Similarly Y and Z.
3: make the curve contain three primary points, default=2. Ignored if G option. Similarly 4...9.
N: try to adjust the fixed coordinate to the nearest definition point. For the tolerance, see T
option.
!: allow overwriting an existing definition. Incompatible with names that contain an asterisk
locs: (opt) location surface, default: take from the locator or the current point.
This function converts a principal plane curve to a curve with a general location surface, so that
either a second projection is added to the current one or the shape projection becomes the
location projection.
GME.GENLOCS(opt)
opt:
L: marks the latter case: the current shape projection becomes becomes the location projection
and anew shape projection is initiated.
X: select projection X for the new projection, similarly Y and Z. Default=selected according to
the curve shape.
A: make the location surface contain points corresponding to all points in the current curve.
Default=two points only unless L option.
This function converts a principal plane curve to a curve with a general plane as the location
surface.
GME.GENPLANE(opt)
opt:
X: create a plane with the axis parallel with X, similarly Y and Z. Default=define a plane with
three points.
GME.CONVERTXYZ()
This functions assigns a new name to the current curve or point object. The references to the
curve in the surface or other curves ar updated.
GME.RENAME(name,opt)
opt: options
'!': allow redefinition of an object with this name, unless it is part of the current surface.
This function changes a component of a curve definition by a definition in the command syntax.
GME.NEWDEF(aspect,definition)
A: angle condition, side unspecified. If empty, all old angles are removed, else if no slash
contained, the existing angle condition is replaced, or if no decision possible, the one before.
With a double slash as separator, angle conditions are assigned to both sides, e.g. -//-.
SORT: sorting method: values X,Y,Z, F=fixed, G=general, GE=general with ends fixed.
IM: interpolation method M1 or M2. Ignored for XYZ curves (always M2).
definition: text providing the definition in the normal input syntax. For specal values, see above.
This function runs a macro that can contain definition commands CUR, POINT, SUR, TGF and
SCC. The effect is otherwise the same as when running the macro under DEF, except that
UNDO is supported, SAVE option obeyed and updates done.
GME.RUN(macro)
macro: reference number of description containing the macro (can be obtained with the function
MACRO, see !expl C.MACRO)
This function moves a point on a curve without connection to the surface editing task. For a curve
with a location surface, only the shape projection can be changed.
GME.MOVESO(curve,point,change,distr,range,opt)
point: index of the definition point concerned. GME.DEFPOINT can be used for giving a point index
when knowing coordinates.
change: desired change, two or three coordinates. For a curve with a location surface, two coordinates
are needed, according to the shape projection. For an xyz-curve, three coordinates are needed
unless the P option is given.
distr: (opt) function controlling the effect on the neighbouring points, default=change the given one
only. The function defines a fraction of the given change to be applied to points within the range
defined by parameter 'range'. The function can be a built-in one (symbol F1,F2..) or given as a
calculator expression. In the latter case, the function should return a value in the range 0...1,
using an argument L (length from the given point), having the range (-1,1). The built-in functions
are 1: (1-(1/(1-exp(-4.)))*(1-exp(-l*l*4.0)) 2: (1-(1/(1-exp(-6.)))*(1-exp(-l*l*6.0)) 3: 1.0-abs(l) 4:
cos(0.5*pi*l)
range: (compulsory if 'distr' given). It defines the range within which 'distr' is applied, either a length (>0)
or number of definition point intervals (<0).
P: interprete two coordinates as being given in the current projection (XYZ curves only)
R: restrict the effect so that only the direction getting the largest change is changed.
EXAMPLES
@gme.moveso('FRF',1,0,0.5)
@gme.moveso('FRF',1,0,0.5,'I')
@gme.moveso('WL6F',4,0,0.7,'F1',-3,-3,'I')
Move the fourth point of WL6 0.7m in the direction of +Y, allowing the two nearest points in boths
direction move also, using the distribution function F1.
@gme.moveso('WL6F',4,0,0.7,'1-(1/(1-exp(-4)))*(1-exp(-l*l*4))',-3,3,'I')
The function returns the point number of a definition point, when given its coordinates. The
function value is a point number or 0=failure.
point=GME.DEFPOINT(curve,location,opt)
location: two or three coordinates. For a curve with a location surface, two coordinates are needed,
according to the shape projection. For an xyz-curve, three coordinates are needed unless the P
option is given.
P: interprete two coordinates as being given in the current projection (XYZ curves only)
A: consider all definition points, default=return a primary point. Note: all points are always
counted in the point numbering.
TT: set tolerance=0.5. The nearest point is always returned, but if the distance exceeds the
tolerance, a negative point number is returned.
EXAMPLE
pnr=GME.DEPFPOINT('STEM',99,4)
Return the point number nearest to x=99, z=4 on the stem curve.
3. Events of group GM
This event is raised when the definition of an object has been changed (in the current run, see
also GM*UPDDB). (CURVE, SURFACE, CYL, ROOM, SO, GEN) etc. (10001).
GM*CHANGE(name,type)
This event is raised when run time objects are updated because of changes in a referenced
ones. (10002).
GM*UPDATE(list)
This events is raised when objects have been update as the result of changes done in another
run (DBWATCH mode on).
GM*UPDDB(list)
list: string array, list of objects updated from the data base
The event is raised when an object is removed from the run time memory (command RMV,
function GM.REMOVE).
GM*REMOVE(name)
The event is raised when the current component has been changed (460001)
The event is raised when the curve(s) have been changed. (460002)
The event is raised when a new position is registered for the cursor in a real time operation,
implying moving a point in space (460003). Presently used in GME.MOVEI,
GME.MOVELOCATOR.
GME*CHANGE3D(x,y,z)
The event is raised when a new position is registered for the cursor in a real time operation,
implying moving a point in the projection (460004) Presently not used.
GME*CHANGE2D(u,v)
The event is raised when a new position is registered for the cursor in a real time operation,
implying turning an angle (460005). Presently used in GME.ANGLEI.
GME*CHANGEANGLE(a)
Set the options from the options dialog widget. Internal event (460011)
GME*SAVEOPTS()
Read the default options into the options dialogue widget. Internal event for GUI (460012)
GME*DEFAULTOPTS()
Raised when the keyboard focus is traversed into a drawing area. Internal event for GUI
(460013)
GME*FOCUSIN(id)
Raised when the current surface is closed. Internal event for GUI (460014)
GME*CLOSE()
GME*NEW(surname)
GME*LOAD(surname)
Table of Contents:
If explicit selections are not made, given surfaces are intersected with given argument planes and coordinates of all points generated by the
polygonization are listed. If special curves are defined, with the SPECIAL command, intersections with them are included in the result tables.
where each <abc> is a selection at a direction of a specific coordinate plane as a combination of symbols defining the plane, the method for
coordinate generation and inclusion of special points.
The first symbol <a> defines the coordinate plane to be used as the first argument in coordinate generation. Surfaces given in output commands
are intersected with argument planes at the selected directions. Accepted alternatives are X, Y, Z and -. The last one is used for defining the
coordinate generation method for space curves and as a default if coordinate plane specific selections are not made.
The second symbol <b> is optional and defines the coordinate generation method for intersections of surfaces and for given plane curves
perpendicular to the coordinate axis selected by the first symbol <a>. Accepted alternatives are
The P option is the default if nothing else is given. Note, that the first and second symbol cannot be the same.
The third symbol <c> specifies whether to include intersection points with special curves into the table. Accepted alternatives are
+ include intersections with special curves, ignore intersections with special curves
The default is to include the intersection points if special curves have been defined with the SPECIAL command.
If keyword OFF is given as the first selection in the command, the default selection is restored.
1.1. Examples
SELECT -N
Intersect given surfaces with all argument planes, divide the resulting curves and possible given other curves into constant number of intervals
and generate coordinates by listing the end points of the intervals.
SELECT X, -Z
Intersect given surfaces with x argument planes and generate coordinates by listing intersection points of the resulting curves and possible given
other curves with z argument planes.
SELECT XZ, ZX
Intersect given surfaces with all argument planes and generate coordinates by listing intersection points of the resulting x-intersection curves with
z argument planes and z-intersection curves with x argument planes. The result contains the same points two times in different order. To
guarantee, that the coordinate values of the points are exactly the same, the ADJUST option should be set on.
SELECT XC
Intersect given surfaces with x argument planes and generate coordinates by listing the resulting intersection curves in circle representation. To
list quantities specific for the circle representation, a predefined list quantity selection named ARC can be selected with the LQ command.
SELECT XR+
Intersect given surfaces with x argument planes and generate coordinates by listing consecutive points at adjusted distances from each other
from the resulting intersections including the intersection points with the defined special curves. The adjusted distance is based on the given l
argument but adjusted to be constant between any pair of special points. A special point is either an end point of a curve or an intersection point
with a special curve.
SPEC curves
2.1. Examples
Define a profile by combining STERN and STEM, flat of bottom by combining FBA, FBM and FBF and two knuckle lines from KN2 and by
combining KN1A and KN1B.
Save the current definition under the given name (a definition named STD is automatically retrieved when starting the task).
SPEC CAT
3. Output commands
The output commands of the task are LIST, PLOT, CALC, SAVE and OUTPUT. All of them accept the same syntax for the geometric objects to
be included in the lofting tables to output. They also use the selections made with the SELECT command and definitions made with the SPEC com
mand when producing their output. The only exception is the LOFT subject in the LIST command, which requires the coordinate generation
method within the command line and does not support inclusion of special curves.
3.1. LIST
The LIST command produces lofting tables from given geometric objects using the general table output module, obeying commands LQ, TOO
and !FORM. Two subjects, NLOF and LOFT, produce different layouts for the lofting tables.
The NLOF subject lists selected geometric quantities from given surfaces and curves in table format. Each separate object is listed in its own
table. The name of the current output object is available through a variable named LOCASE.
where NLOF is the subject of the list (default, can be omitted), <objects> is a list of objects (optional, default is the hull surface), TOO is a
delimiter between <objects> and <t-options> and <t-options> is a list of table output options (optional).
Items in the object list have the following alternatives (the same alternatives are available in other output commands also)
SPEC all special curves defined with the SPECIAL command. Note 1: intersection points with the other SPEC curves are not
taken into account. Note 2: the intersection curves related to the SPEC options X,Y or Z are omitted.
If a name is not given for a surface to intersect, the name given with the HULL command is used.
The LOFT subject produces a lofting table in compact layout by listing each object in one line of the same table. The SELECT command cannot
be used with this type of a list but a restricted set of coordinate generation methods is available through the <args> parameter.
where <args> is an argument combination, expressed by combining the symbols of the first and second arguments, e.g. XZ. If only two
arguments from x, y and z have been given, and no other parameters follow, this parameter can be omitted.
List of objects <objects>, TOO and table output options <t-options> have the same syntax and meaning as in the NLOF subject. However, items
in the object list should produce plane curves parallel with each other in order to produce a useful table.
The LQ command controls the listing with the command LIST. The available subjects are NLOF and LOFT from which NLOF is the default and
can be dropped from commands.
CODE: ordinal number of the point (special curve name is included for intersection points of special curves)
X x-coordinate
Y y-coordinate
Z z-coordinate
Additional quantities for the circle representation include the following. Note that the circle representation is available only for plane curves and
does not include special curves. The special LQ subjects ARC and ARC3 are available for listing 2d and 3d circle representation s.
UU first coordinate
VV second coordinate
X x-coordinate
Y y-coordinate
Z z-coordinate
When the LOFT subject has been selected, a quantity without a qualifier is duplicated as many times as there are values of the second argument.
For example, when listing y-coordinates as a function of x and z, there will be as many y-columns as there are values of the z-argument. A
numeric qualifier selects a single value of the second argument, giving its index in the set of values, for example Y/1 gives y-coordinates for the
first z-value only.
A string qualifier S or T gives the second and third point respectively, when there are many points corresponding to the given argument
combination. If the additional points are on a different branch, use the command CONNECT ON.
Note, that for other than patch surfaces, tangents and inclinations are calculated from the polygon representation, and may be inaccurate.
3.2. PLOT
The PLOT command plots the generated points. The projection and scaling must be defined in advance (commands PROJ and SIZE).
PLOT objects, C
where <objects> is a list of objects as in the LIST command and C, if given, plots straight lines between the points.
3.3. CALCULATE
The CALCULATE command calculates the coordinate tables and puts the result into a named description which can be accessed by table
calculation routines.
where <id> is the name of the result description and <objects> is a list of objects as in the LIST command.
3.4. SAVE
The SAVE command calculates the coordinate tables, puts the result into a named description and saves the description to the auxiliary
database.
where id is the name of the result description and <objects> is a list of objects as in the LIST command.
3.5. OUTPUT
The OUTPUT command writes the generated coordinates to a separate output file opened with the FILE command. The format of the file is
specific for each output mode available through the MODE command. The command can be used only if the output mode is specified.
OUTPUT objects
3.6. FILE
FILE dir>file, S
where <dir> is the directory and <file> is the file to open. If S is also given, the output to the file is echoed also to the screen. The file can be
closed with the FILE CLOSE command.
3.7. WRITE
The WRITE <text> command can be used for writing arbitrary text to the current output file.
3.8. MODE
The MODE <mode> command selects the output mode to use. The available modes depends on the customer configuration of the NAPA system.
The ARGS command lists the values of the arguments, options, selections, and definitions controlling the task.
The HULL command defines the name of the hull surface to be uses as a default surface in output commands.
The PREP command defines the source of named curves. In general the form of a grid curve in the preparation result is not equivalent to the form
of the corresponding independent curve in the project database DB1. The differences are small, and can be seen from the result of PLOT surface
and GRID surface. A selection between the two possible sources is done by the command PREP. As a default, corresponding to PREP OFF, the
curves are read from DB1. By using the command PREP surface, the curves are read from the preparation description of the given surface or one
of it's subsurfaces. The source must be a patch surface. The curves read from the preparation description are polygonized according to the
current polygonization tolerance. If the curve is not found in the given surface, it is searched from DB1.
The X, Y and Z commands are used for entering the argument coordinates.
The NR and L commands define the number of intervals and the distance between points for the N and L coordinate generation methods.
The XMIN, XMAX, YMIN, YMAX, ZMIN and ZMAX commands limit the argument objects to interesting parts.
When the CLEAN option is on, knuckle points, points very near each other and redundant points are cleaned from the output lists. The cleaning
tolerance can be controlled with the PTOL command.
The CONNECT option helps in some cases when an intersection of a surface contains several branches. The effect is to force intersection curves
to have one branch only by connecting the branches.
When the ADJUST option is on, coordinates of points which represent the same point in space, but are located on different intersection curves,
will have exactly the same values. The adjusting tolerance can be controlled with the DTOL command.
The ASCENDING option can be used to force the coordinates from the given objects into ascending order.
The CTOL command sets the tolerance controlling the circle representation of curves.
The form of a grid curve in the preparation result is in general not equivalent to the form of the corresponding curve in the database. As a default,
the LOFT task uses the curve in the database. By using the command PREP surface, the curve is read as stored in the given surface. The
surface must be eighter a simple or combined patch surface. If there is no such curve in the surface, the curve is read from the database.
A default set of parameter values may be stored in the macro TINIT*LOFT in db2 or db1. The macro is run each time the LOFT task is entered.
5. Other commands
The standard output commands NL (new list), TYPE (add arbitrary text), NP (new page) and FIG (add figure) are available. Commands PROJ,
SIZE, COL, DASH, THI and TH from the general drawing task are also directly available. For other drawing commands, use the DR command
which enters to the general drawing subtask.
In addition, the EDIT command enters to the editor subtask and the SRV command to the services subtask.
The end points and the amplitudes of the circle segments can be transferred as an option. If the circle representation is not selected by the SEL c
ommand (e.g. SEL -C), a conversion to circle segments is done based on the defined selection. An amplitude is added as a comment after the
starting point of a segment i.e. line syntax = 'x y z ! amplitude. The type of the amplitude is selected by the following options:
C=1 use 1d-amplitude for the plane curves and for the projections of the space curves .3d-amplitude is used for the space curves that are
represented in the 3d-space
The required number and the creation of the PARTS is controlled by the following options:
P=HULL each HULL command creates a PART with the given name
The coordinates are written in meters in the format f.d, where f=field length and d=number of decimals.
The representation of the curve entities in the IDF file is controlled by the following options:
R=2 as R=1, but with the additional constraint v=f(u) and u=g(v) (u,v are coordinates of a plane, and f,g are arbitrary functions). If the
constraint is violated, the 3d-curve is subdivided into parts. The constraint is not applied if only one projection is explicitly defined in the
SPEC command.
The name of a plane curve is controlled by the option N1=string.A set of variables can be included in the string. e.g. by using N1='COORDINAT
E VALUE' the section surface/x=10 is called 'X 10' in the IDF file. The following variables are available:
COORDINATE X,Y,Z or XD.Note: Design and building frames can be distinguished by using the command ID XD or ID X (=default)
corresponding to the values XD or X of the variable COORDINATE.
The name of a space curve is controlled by the variable N2=string. The following variables can be included in the string:
This option defines how the curves are classified into plane and space curves. The classification has an effect on the following:
T1=0 (default) a plane curve is a curve that is located in a principal x,y, or z-plane, unless an explicit projection has been asked in the SPEC c
ommand. For example, the curve TEST created by GEN TEST HULL/X=10 or by CUR TEST; X 10; YZ ... is a plane curve, but
the curve SPEC 'TEST XY YZ'=TEST; OUT SPEC is a space curve. Also the curve created by SPEC 'TEST YZ'=TEST; OUT
SPEC is a space curve
T1=1 a plane curve is such a curve in a principal plane that has been intersected in the LOFT task. For example, the curve created by X
10; OUT is a plane curve, but the curve TEST created by GEN TEST HULL/X=10 or by CUR TEST; X 10; YZ ... is a space
curve.
AR=1 done after each OUT command i.e. the commands X OFF; Y OFF; Z OFF are automatically executed after each OUT command.
The maximum opening angle of circle segments is defined by the option AMAX=angle. Circle segments, whose opening angle is greater that
given one are spilled into smaller parts. As a default AMAX=90
MODE SCAFO
MODE IDF C=1 P=2 P=HULL R=2 F=9.4 AR=1 N1='COORDINATE VALUE' N2='NAME
PROJECTION INDEX' T1=1 AMAX=90
In addition only a subset of the IDF arguments are available, and the
SELECT -
CONNECT ON
option is defaulted.
A circle representation of the transferred curves is written in a format, that is an extension of the IDF standard. After each point, the amplitude
(height) of the circle segment (starting from the point) is written as an additional comment i.e. 'x,y,z, ! amplitude'. Positive amplitudes correspond
to counter-clockwise rotations.
The curves are classified into plane and space curves. Plane curves are the plane sections that are calculated in the LOFT task. For example, the
curve created by
X 10
OUT
is a plane curve. The other curves are space curves. For example, the result of
OUT X10
is a space curve although the curve X10 has been created in the DEF task by the command
The only way to change the classification is to rename the curve so that it includes the string '/X='. For instance, the result of
SPEC 'HULL/X=10'=X10
OUT SPEC
is a plane curve.
Plane curves are output in one projection, and they are never subdivided into parts.
Space curves are written into two separate projections. Each projection is a principal plane curve in the IDF file. Name of the projection curve is a
combination of the names of the curve and the projection. For example, the two projections of the curve 'KNF' are called 'KNF XY' and 'KNF XZ'.
As a further complication, if the 'v=f(u), u=g(v)' constraint of SCAFO forces a subdivision into e.g. 2 parts, the stored 4 curves are called 'KNF XY
1', 'KNF XZ 1', 'KNF XY 2' and 'KNF XZ 2'. The subdivision is not done if only one projection has been explicitly asked by the SPEC command
(see below).
As a default, the planes where a space curve is represented are the definition planes of the shape and the location surface. If these are not
available, the program selects the two projections by fitting a plane to the point set. The planes corresponding to the smallest and the largest
component of the normal vector are selected. A user can always force a selection by the SPEC command.
The two projections are called 'KNF XY' and 'KNF XZ'.
By using SPEC 'name XY'=curve, only one projection of the defined curve is output. The IDF name of the curve is 'name XY'. The last option
can be used to transfer 'Side Tangents' and 'Bottom Tangents' that are only defined by a projection in SCAFO. Note that the definition of
projections is a special option of the SPEC command supported only by the SCAFO and IDF modes. Its main use (here also) is to ouput curves
with different names e.g.
SPEC KNA1=TRANSOM
OUT SPEC
SPEC STEM=curve1+...+curven
OUT SPEC
SPEC curves
X (0 100 1)
OUT
The transfer sequence is shown below. Two HULL commands are needed, the first for the after body and the second for the fore body. For each
HULL command there is an IDF PART in the result file.
The sections can be classified into design, building or general sections by using the command ID D, ID B (=ID OFF=default), or ID S res
pectively. With ID D the variable COORDINATE in the naming rule N1=string of the MODE command is replaced by XD,YD or ZD corresponding
to the coordinate x,y or z.
If ID B or the default ID OFF is active, the string is replaced by X, Y or Z. By using ID S or ID S=i, a positive integer i is added after the name
of each section. After each curve, the integer is incremented by 1.
... define arguments (sections, special curves etc.) and output objects in the after body ...
... define arguments (sections, special curves etc.) and output objects in the fore body ...
The points can be stored in different layers as controlled by the command LAYER n n1/typ1 n2/typ2 ..., where n,n1,n2,... are the names
of the layers , and typ1,typ2,... are the types of the curves. The names can be strings or integers and he following types are available:
G grid curve
KC knuckle curve
BC boundary curve
In the following example, the curves are put into the layer SPACE, except for the x,y and z-sections that are output into the layers 1,2 and W
respectively.
LAYER SPACE 1/X 2/Y W/Z define layers for the output
Y (0 10 1) define y-sections
z (0 20 1) define z-sections
PREP sur2 define a patch surface from which the named curves are fetchedIf the preparation result of the surface or any of it's
subsurfaces contains the curve, it is read from that preparation description. Otherwise the curve is read from the database DB1.
A reading from DB1 is forced by the command PREP OFF
X define x-sections
coordinates
Y de fine y-sections
coordinates
Z define z-sections
coordinates
The curves are output into different DXF-layers as defined by the LAYER and ID commands. As a default each curve is stored in a unique layer.
The name of a layer is a combination of a string and an integer. The string is obtained from the LAYER command based on the type of the curve.
The integer is obtained from the ID command based on the selected string. For instance, the layer SECTIONS10 is created by the commands
X10
OUT
are active. The defaults of the NUPAS mode can be reset by the commands
LAYER NUPAS
ID NUPAS
By the definition ID OFF no integers are appended to the layer name. For example, by using LAYER SEAMS; ID OFF all curves are collected
into the same layer called SEAMS. On the other hand, by using LAYER SEAMS; ID NUPAS there is only one curve in each layer. Seams of the
after body are named SEAMS300, SEAMS301, ... , and those of the forebody are called SEAMS1301, SEAMS1302 etc.
The maximum number of points in a NUPAS curve is 796. If this number is exceeded, a warning is given and the name of the NAPA curve and
the name of the DXF layer are displayed, but otherwise the upper limit is not taken into account. If there are too many points, the output points
must be selected in another way by the SELECT command. As a default, all the polygon points of a curve are output. For example, the following
selections can be done:
ID layer suffix
n layer name
n/A layer name + restriction x<XMID,where XMID is the parameter from the reference system
n/typ Layer name + restriction on the curve type (typ= X,Y,Z,P,S,G,KC,BC, see !expl layer)
The following alternatives can be used to define the integer suffix. If two alternatives are given, the latter one is applied only if the first one cannot
be used.
(imin,imax) index defined by the upper and the lower bounds. The current value of the index (=i) is optional and defaulted to imin-1. The
i next index to be used as a suffix is i+1.
For example, the command ID SECTIONS FR (5000,32768) indicates that the frames 1,2,... are stored in the layers SECTIONS1, SECTIONS2,...
. Frames whose numbers are not integers (e.g. HULL/#1.5) are stored in the layers SECTIONS5000, SECTIONS5001 etc., provided the definition
LAYER SECTIONS/X is active.
The ID command does not delete the data that has been given by the previous ID commands. All data about the suffixes is deleted by the
command ID OFF.
The suffix definitions are displayed by the command ID without any parameters. In general this gives more data about the suffixes than
that given by the ARGS command, where only the last ID command is shown.
When the adjust option is on, coordinates of points which represent the same point in space,
but locate on different intersection curves, will have exactly the same values. The adjusting can
be controlled by the DTOL command.
ADJUST ON/OFF
This option can be used to force the coordinates from the given objects into ascending order.
ASCENDING ON/OFF
The command calculates the coordinate tables and puts the result into a named description
which can be accessed by table calculation routines.
When this option is on, knuckle points, points very near each other and redundant points are
cleaned from the output lists. The cleaning can be controlled by the PTOL command.
CLEAN ON/OFF
CMOD mode
M2: (=default) new method whith a better handling of the tolerance. Space curves are also
convertable. In case of the space curves the amplitude of the circle segments is expressed as
a 3d vector.
This option helps in some cases when an intersection of a surface contains several branches.
The effect is to force intersection curves to have one branch only by connecting the branches.
CONNECT ON/OFF
This command sets the tolerance controlling the circle representation of curves when using the
C option with the SELECT command.
CTOL tol
If one wants to add a figure (to be added with the FIG command), it can be prepared under the
general drawing task, to which this command gives access. To return to the LOFT task, use
command LOFT or Ok.
This command sets the tolerance controlling the adjusting of the same points when the
ADJUST option is on. The tolerance defines the distance within which points are considered to
represent the same point. It is also used when obtainining intersection points with special
curves.
DTOL tol
This command opens/closes an output file to be used by the WRITE and OUTPUT commands.
It is available only if the output mode is specified.
FILE dir>file, S
This command defines the surface from wich coordinates are listed with the output commands
if other geometric objects are not given in the command line. The default for the hull name is
the name defined as 'hydrostatic hull' in the reference system.
HULL name
ID intersection curve id
Identification of the outputted curves is defined here. The command is available in the KHI,
IDF, SCAFO, DXF and NUPAS modes.
ID id0 did
----------
------------------------------------
section_type: This parameter has an effect on the names of the outputted sections.
D: design sections The variable COORDINATE in the naming rule N1=string of the MODE
command is replaced by XD, YD or ZD corresponding to the coordinate x, y or z.
S: general sections A positive integer is added after the name of each section. After each
curve, the integer is incremented by 1.
S=i: as the option S, but a starting value of the integer is defined. (default=1)
Example (IDF,SCAFO) :
MODE IDF N1='COORDINATE VALUE'; X 50
ID D; OUT; ** curve is named 'XD 50'
ID OFF; OUT; ** curve is named 'X 50'
ID S; OUT; ** curve is named 'X 50 integer'
ID S=3; OUT; ** curve is named 'X 50 3'
ID layer suffix
---------------
Define an integer suffix that is appended to the name of the layer used in the DXF and the
NUPAS modes.
NOTE 1: The ID command does not delete the data that has been given by the previous ID
commands. All data about the suffixes is deleted by the command ID OFF.
NOTE 2: In general the ID command without any parameters gives more data about the
suffixes that the ARGS command. The ARGS commands shows only the last ID command.
n: layer name
n/typ: layer name + restriction on the curve type (typ= X,Y,Z,P,S,G,KC,BC,PC, see !exp layer)
suffix: The following alternatives can be used to define the suffix. If two alternatives are given, the
latter one is applied only if the first one cannot be used.
index: definition of an index to be incremented by (imin,imax) istart, where imin and imax are
the lower and the upper limits of the index, and istart+1 is the next index. The parameter istart
is optional and defaulted to imin-1.
Example3: ID WATERLINES Z
For example the curve HULL/Z=1 is stored in the
the layer WATERLINES1000. If the are many branches in
the curve and the NUPAS mode is active, the layers
WATERLINES1000, WATERLINES1001 etc. are created.
The second branch is stored in WATERLINES1001 and so on.
L l argument
This command gives the distance between two consecutive points to be listed from selected
intersections of surfaces and from given curves.
L length
L OFF
Layers are defined for the curves , that are outputted in the DXF or NUPAS modes.
-----------------------
X: x-section
Y: y-section
Z: z-section
S: general section
G: grid curve
LAYER OFF
---------
LAYER NUPAS
-----------
This command produces lofting tables from given geometric objects using the general table
output module, obeying commands LQ, TOO and !FORM. Two subjects, NLOF and LOFT,
produce different layouts for the lofting tables.
List selected geometric quantities from given surfaces and curves in table format. Each
separate object is listed in its own table. The name of the current output object is available
through a variable named LOCASE.
objects: list of objects (optional, default is the hull surface). Items in the list have the following
alternatives:
Produce a lofting table in compact layout by listing each object in one line of the same table.
The SELECT command cannot be used with this type of a list but a restricted set of coordinate
generation methods is available through the args parameter.
args: argument combination, expressed by combining the symbols of the first and second
arguments, e.g. XZ. If only two arguments from x, y and z have been given, and no other
parameters follow, this parameter can be omitted.
objects: list of objects as in LIST NLOF. However, items in the list should produce plane curves parallel
with each other in order to produce a useful table.
The command controls the listing with the command LIST. The available subjects are 'NLOF'
and 'LOFT' from which 'NLOF' is the default and can be dropped from commands. For general
information see !EXPL LQ/GEN. Special features for subject 'LOFT' are:
A quantity without a qualifier is duplicated as many times as there are values of the second
argument. For example, when listing y-coordinates as function of x and z, there will be as many
y-columns as there are values of the z-argument. A numeric qualifier selects a single value of
the second argument, giving its index in the set of values, for example Y/1 gives y-coordinates
for the first z-value only.
A string qualifier S or T gives the second and third point respectively, when there are many
points corresponding to the given argument combination. If the additional points are on a
different branch, use the command CONNECT ON.
The command defines the mode to use when the output from the task is directed to a separate
file with the OUTPUT command. It also sets values for arguments specific for each mode.
MODE KHI
--------
----------------
C=i: (opt) representation of circle segments. The endpoints and the amplitudes of the circle
segments are transfered. If the circle representation is not selected by the SEl command (e.g.
SEL -C), a conversion to circle segments is done based on the defined selection. An amplitude
is added as a comment after the starting point of a segment i.e. line syntax = 'x y z ! amplitude'.
The type of the amplitude is selected by the following alternatives: - C=1: use 1d-amplitude for
the plane curves and for the projections of the space curves. 3d-amplitude is used for those
curves that are represented in the 3d-space. - C=2: 3d-amplitude is always used - as a default,
the amplitude is omitted
P=alt: (opt) handling of PARTs in the IDF-file The following alternatives are available: - P=i: number of
PARTs (default=1) - P=OUT: each OUTPUT command creates a PART (default) - P=HULL:
each HULL command creates a PART with the given name.
F=f.d: (opt) format of coordinates written in meters. f=field length,d=number of decimals (default:
F=8.3)
R=i: (opt) representation of curves in the IDF file The following alternatives are available: - R=0:
curves are represented in the 3d-space (default) - R=1: space curves are represented by
projections - R=2: as 1, but with the additional constraint v=f(u) and u=g(v) for 3d curves (u,v
are coordinates of a plane, and f,g are arbitrary functions). If the constraint is violated, the
3d-curve is subdivided into parts. The contraint is not applied, if only one projection is explicitly
asked by the SPEC command.
N1=name: (opt) naming of plane curves (default: N1=NAME) A set of variables can be included in the
string. e.g. by using N1='COORDINATE VALUE' the section surface/x=10 is called 'X 10' in the
IDF file. The following variables are available: - NAME : curve name in the LOFT task -
COORDINATE : X,Y,Z or XD Note: Design and building frames can be distinguished by using
the command 'ID XD' or 'ID X' (=default) corresponding to the values 'XD' or 'X' of the variable
COORDINATE. - VALUE : value of coordinate
N2=name: (opt) naming of space curves (default: N2=NAME) The following variables are available: -
NAME : name of the curve in the LOFT task (=default) - PROJECTION : '','XY','XZ' or 'YZ' The
projection is marked only if R=1 or R=2 and the curve is a space curve, or if an explicit
projection has been defined in the SPEC command (e.g. SPEC 'KNF XY XZ'=KNF). - INDEX :
'', or number of subdivided part Subdivision is done only if R=2 and the curves is a space curve
violating the constraint v=f(u) and u=g(v).
T1=i: (opt) classification of curves This option defines how the curves are classified into plane and
space curves. The classification has an effect on - naming i.e. whether to use N1=name or
N2=name - creating of projections - subdivision of curves The following classification options
are available: - T1=0: (default) a plane curve is a curve that is located in a principal x,y or
z-plane. However, if an explicit projection has been asked by the SPEC command, the curve is
a space curve. - T1=1: a plane curve is a curve in a principal plane that has been intersected in
the LOFT task.
AR=i: (opt) automatic reset of arguments X,Y and Z The following alternatives are available: - AR=0 :
not done (=default) - AR=1 : done after each OUT command
AMAX=angle: (opt) maximum opening angle of circle segments (default = 180 degrees)
------------------
The SCAFO mode is a tailored IDF mode. The command 'MODE SCAFO' is equivalent to the
commands 'MODE IDF C=1 P=2 P=HULL R=2 F=9.4 AR=1 N1='COORDINATE VALUE'
N2='NAME PROJECTION INDEX' T1=1 AMAX=90'. In addition only a subset of the IDF
arguments are available, and the 'SELECT -' is implied, and the 'CONNECT ON' option is
defaulted.
1) Two HULL commands are needed, the first for the after body and the second for the fore
body.
2) The x-sections can be classified into design or building frames by using the command ID XD
or ID X respectively. The latter one is the default.
3) The projections where a space curve is represented can be defined in the SPEC command
by adding the required projections to the curve name. For example, the curves 'KNF XY' and
'KNF XZ' are created by the commands SPEC 'KNF XY XZ'=KNF; OUT SPEC. If the
projections are not explicitly defined, the defaults of the program are used.
MODE DXF
--------
Curves are outputted in the DXF format. The points are stored in the VERTEX entities of the
POLYLINE entity. Only the entities section of the DXF file is created. The entities are stored in
different layers as controlled by the LAYER command.
MODE NUPAS
------------------
Note 2: As a default:
NAPA curve -> NUPAS curve
-----------------------------------------------------
x-sections -> frames in the layer SECTIONS
y-sections -> buttocks in the layer BUTTOCKS
z-sections -> waterlines in the layer WATERLINES
knuckles and
boundary curves -> knuckles in the layer KNUCKLES
curves with the
sidecondition P -> angle curves in the layer AL
other curves -> dimension lines in the layer DS
NL new list
NR nr argument
This command gives the number of intervals to be listed from selected intersections of surfaces
and from given curves. Alternate values for nr can be given for named objects.
NR OFF
NR, 5, 10/'HULL/X=*'
List 10 intervals from x-intersections of HULL and 5 intervals from other objects. Note, that the
name has to be included in apostrophes if it contains special characters.
This commands writes the generated coordinates to a separate output file opened with the
FILE command. The format of the file is specific for each output mode available through the
MODE command. The command can be used only if the output mode is specified.
OUTPUT objects
The same quantities that can be listed can be plotted as diagrams with PLD. with PLD,
although not nearly all quantity combinations make reasonable diagrams.
This command plots the gerated points. The projection and scaling must be defined in advance
(commands PROJ,and SIZE).
PLOT objects, C
This command controls the output of PLD. For explanations, see !EXPL POO/GEN.
This command controls the output of PLD. The quantities are the same as of LQ NLOF. See
!EXPL LQ for instructions specific for this case and !EXPL LQ/GEN for general properties of
PQ/LQ.
In general, the form of a grid curve in the preparation result is not equivalent to the form of the
corresponding independent curve in the database. A selection between the two possible
sources is done here.
PREP surface
------------
Named curves are read from the preparation result of the given surface. The surface must be a
patch surface, either a simple surface or a combined one. If there is no such curve in the
surface, the curve is read from the database.
PREP OFF
--------
These are commands from the general drawing task made directly available. For the others,
use the DR command.
This command sets the tolerance controlling the cleaning of redundant points when the CLEAN
option is on.
PTOL tol
The command calculates the coordinate tables, puts the result into a named description and
saves the description to the auxiliary database.
This command can be used for selecting the method by which coordinates are generated from
the geometric objects given in the output commands.
If explicit selections are not made, given surfaces are intersected with given argument planes
and coordinates of all points generated by the polygonization are listed. If special curves are
defined, with the SPECIAL command, intersections with them are included in the result tables.
abci: selections at directions of different coordinate planes as combinations of symbols defining the
plane, the method for coordinate generation and inclusion of special points.
a: The first symbol defines the coordinate plane to be used as the first argument in coordinate
generation. Surfaces given in output commands are intersected with argument planes at the
selected directions. Accepted alternatives are X, Y, Z and -. The last one is used for defining
the coordinate generation method for space curves and as a default if coordinate plane specific
selections are not made.
b: The second symbol is optional and defines the coordinate generation method for intersections
of surfaces and for given plane curves perpendicular to the coordinate axis selected by the first
symbol. Accepted alternatives are:
The P option is the default if nothing else is given. Note, that the first and second symbol
cannot be the same.
c: The third symbol specifies whether to include intersection points with special curves into the
table. Accepted alternatives are:
The default is to include the intersections if special curves have been defined with the
SPECIAL command.
SELECT OFF
SELECT -N
Intersect given surfaces with all argument planes, divide the resulting curves and possible
given other curves into constant number of intervals and generate coordinates by listing the
end points of the intervals.
SELECT X, -Z
Intersect given surfaces with x argument planes and generate coordinates by listing
intersection points of the resulting curves and possible given other curves with z argument
planes.
SELECT XZ, ZX
Intersect given surfaces with all argument planes and generate coordinates by listing
intersection points of the resulting x-intersection curves with z argument planes and
z-intersection curves with x argument planes. The result contains the same points two times in
different order. To guarantee, that the coordinate values of the points are exactly the same, the
ADJUST option should be set on.
SELECT XC
Intersect given surfaces with x argument planes and generate coordinates by listing the
resulting intersection curves in circle representation. To list quantities specific for circle
representation, a predefined list quantity selection named ARC can be selected with the LQ
command.
SELECT XR+
Intersect given surfaces with x argument planes and generate coordinates by listing
consecutive points at adjusted distances from each other from the resulting intersections
including the intersection points with the defined special curves. The adjusted distance is
based on the given l argument but adjusted to be constant between any pair of special points.
A special point is either an end point of a curve or an intersection point with a special curve.
The command defines special curves which can be included in the coordinate tables, such as
knuckle lines, flat bottom area, etc. By selecting the '+' option in the SELECT command,
intersection points with special curves can be added to selected output objects. Definitions can
be saved and retrieved by using specific keywords with the command.
SPEC curves
SPEC OFF
EXAMPLES
SPEC PROF=STERN+STEM, FB=FBA+FBM+FBF, KN=(KN1A+KN1F, KN2)
Define a profile by combining STERN and STEM, flat bottom by combining FBA, FBM and FBF
and two knuckle lines from KN2 and by combining KN1A and KN1B.
name: name of the definition (a definition named STD is automatically retrieved when starting the
task)
SPEC CAT
This is the standard TOO command (see !EXPL TOO/GEN), and controls the LIST command.
Within the LOFT subject, the header alternatives SH and LH are used for showing the value of
the second argument, so that SH shows the value only and LH the value preceded by the
symbol of the argument.
Writes arbitrary text to the current output file. It is available only if the output mode is specified.
WRITE text
X x arguments
X OFF
This command defines an upper limiting plane in the x-direction by which the objects given in
the output commands can be restricted.
XMAX xmax
XMAX OFF
This command defines a lower limiting plane in the x-direction by which the objects given in the
output commands can be restricted.
XMIN xmin
XMIN OFF
Y y arguments
See command X
Z z arguments
See command X
The command is analogous to the XMAX command with one exception. The upper limiting
plane in z-direction can be defined with two coordinates: the first one corresponding to the
height of the plane at the after perpendicular of the ship and the second one at the fore
perpendicular. When this special option is used, the intersection planes in z-direction will be
parallel with the limiting plane and the resulting intersection curves will be general space
curves.
1. Overview
1.1. Geometric links
1.1.1. TRIBON and AVEVA
1.1.2. VDAFS: geometry to the VDAFS standard
1.1.3. DXF: geometry to the DXF standard
1.1.4. IDF: Link to the IMSA IDF standard
1.1.5. Others
1.2. Drawing links
1.3. Toolkit routines interfacing to NAPA
2. Specifying the output file
3. Link to Tribon/AVEVA Marine
4. Link to Nupas-Cadmatic Hull (direct)
4.1. Running the interface
4.2. Overview of the control variables
4.3. Project/version of NAPA
4.4. Name conversions
4.5. Log file
4.6. Intersection tolerance
4.7. Limiting box given by Nupas-Cadmatic Hull
4.8. Curves with many branches
4.9. Shift of extreme plane sections
4.10. Additional intersection tolerances
4.11. Reading files of standard format
5. Link to VDAFS
5.1. General
5.2. Transfer of surfaces
5.3. Transfer of curves
5.4. Format of coordinates
5.5. Conversion of names
5.6. Grouping facilities
5.7. Notes about VDAFS transfer from NAPA to DeskArtes
6. Link to DXF (3D)
6.1. Transfer of geometry
6.2. Object to line elements of DXF
7. Link to IGES
8. Link to the IMSA IDF standard
9. Link to Unigraphics
10. Link to HSVA milling machine
11. Link to KHI
12. Link to OPTISCAT
13. Link from Sikob
13.1. Link from SIKOB74
13.2. Link from SIKOB77
13.3. New link from SIKOB (Release 2003 -)
14. Link from IGES
14.1. Troubleshooting for TOIGES
15. Link from VDAFS
16. Link from DXF
17. Link from Blines
18. Link from Shipflow
19. Link from KHI
20. Drawing links
20.1. Setup of the drawing link to DXF
20.2. Setup of the drawing link to Interleaf
20.3. Drawing link from DXF
21. Links in the other tasks of NAPA
21.1. Links of the FEM task
21.2. Links of the LOFT task
21.3. Link to ShipFlow
21.4. Link to DAWSON and RAPID
1. Overview
The result of most link functions from NAPA to other systems is an alphanumeric file that can be used as input for the target system. However,
there is the link to Tribon, and a Toolkit Package, where no intermediate file is needed and information is passed directly to the other system.
In case of links to NAPA, an intermediate alphanumeric file created by the other system is always used. The file should be in correct format of the
operating system. For example, in the UNIX environment a DOS-file cannot be read by the inverse DXF-link. Conversion to unix-format is done by
the unix-command 'dos2unix dos-file unix-file'.
Most of the geometric links are installed under the DEF task.
In the LOFT task there are links to KHI, DXF, IDF, NUPAS and SCAFO.
In the FEM task there are links to DXF, IGES and a tailored LQ and TOO controlled output.
NAPA surface can be used in Tribon/AVEVA Marine via NAPA surface server
The geometry is not transferred via NAPA surface server, but at run time, sections are made directly from the NAPA surface
References to NAPA curves can be used
Note: NAPA surface server is used for utilization of NAPA surface in Tribon/AVEVA Marine. However, all structures can be transformed
to Tribon/AVEVA Marine with NAPA Steel functionality (See Chapter 18 in NAPA Steel manual).
The NAPA Surface server is distributed by AVEVA. However, running the Surface server requires a NAPA Surface server license.
patch surfaces
curves
surface objects and facet surfaces
trimmed surfaces
curves
boundary of surface objects
1.1.5. Others
Drawing links are available for transfer to Tribon general design, Interleaf, and the DXF format. The DXF format is used by many systems
including Autocad.
The drawing links are installed under the PLOT task (command SEND).
The following concerns geometric links - the drawing links are presented more closely in the last section.
A set of toolkit routines to intersect surfaces and to fetch named curves from the database of NAPA is available in the VAX/VMS operating
system. Intersections by planes (principal and inclined), and cylinders (combination of circle segments) are supported. Named curves are read
either from a preparation result of a surface, or copied directly from the curves stored into DB1.
The interface is a single shareable program library LINK_NAPA_1.EXE that can be used by other programs. The interface routines together with a
small example program illustrating their use is documented elsewhere.
Common principles
Except for the direct Tribon link, the links obey the following common principles:
The conversion function can be applied on directly defined objects or (in some cases) on the result of the intersection function.
Conversion of directly defined objects is started by a command in the definition environment (Task GM, subenvironment DEFINE). The
selection of objects is done with the general selection syntax used in other auxiliary definition functions.
Conversion of intersection curves is done by adding the corresponding specification in the STORE command.
The output is created as output on listclass 3.
The listclass is normally directed to FORTRAN unit 12. Optionally (mainly for test purposes), the output can be directed to the terminal.
The destination of the output must be specified with the FILE command (see below).
The receiving file can either be a single file for all objects or a separate file for each object. In the latter case, the files will be named as
the objects with an optional suffix.
FILE directory>file
If 'file' is an actual file name, all output will be directed to the given file in the given directory.
If an asterisk is given instead of a file name, separate files will be used for each object. These files will be created in the directory given and
named as the objects in question. After the asterisk, an optional suffix can be added.
If a receiving file exists, any previous contents will be erased, and if it does not exist, a new file is created.
Examples: if curves C1, C2 and C3 are converted, the following result is obtained by different FILE commands:
FILE, SB>* -> files SB>C1, SB>C2 and SB>C3 are generated.
NAPA: the name of the NAPA project and version separated by a slash (name/version)
NAPAPROJDB: path to NAPA project database location
NAPA_GMTOL: geometry tolerance, for example, 0.001
NAPA_CGGRID: (this can be left empty)
NAPALICENSE: path to NAPA license file
NAPA_LOG: options for log file (for example: FADE)
NAPA_PRINT: path to log file
Note: the full description on the NAPA Surface server functionality in Tribon/AVEVA software can be found in Tribon/AVEVA's Manuals.
Interface programs that can be used by Nupas-Cadmatic Hull to read data directly from the database of NAPA are available in Windows XP
Professional, Windows Vista and Windows 7. A license for the feature 71 of NAPA is required.
The interface is based on the RPC i.e. the Remote Procedure Call standard. The Nupas-Cadmatic Hull and the NAPA sides of the interface are
two different processes that communicate by using a predefined RPC protocol.
By using the interface Nupas-Cadmatic Hull can e.g. intersect surfaces and read curves directly from the database of NAPA.
The interface is controlled by a set of environmental variables. These variables should be assigned before the server is started.
The combination {NAPA, NAPASYSDB} or the combination {NAPA, NAPAPROJDB} is required. The other variables are optional. If all the
databases of NAPA are available, it is recommended to define NAPA, NAPASYSDB and NAPAPROJDB.
The variable NAPA contains the name of the project and optionally the name of its version. If the version is not stated, the default version
registered in the system database will be used. For example, in order to use the defaulted version A of the project TEST the following definitions
can be used:
export NAPA=TEST
export NAPA=TEST/A
The name conversions between Nupas-Cadmatic Hull and NAPA should be defined in two tables of the project database of NAPA. The names of
these tables are stored into the variables NAPA_SURFACE and NAPA_CURVE e.g. as follows
export NAPA_SURFACE=TAB*NUPAS_SHAPES
export NAPA_CURVE=TAB*NUPAS_LINES
If the variables are not assigned, the names TAB*NUPAS_SHAPES and TAB*NUPAS_LINES are used as default.
The table corresponding to NAPA_SURFACE should contain the column SHAPE for the shape numbers of Nupas-Cadmatic Hull and the column
NAME for the names of the NAPA objects.
The table corresponding to NAPA_CURVE should contain the columns LINE_TYPE and NUMBER for the Nupas-Cadmatic Hull identifiers and
the column NAME for the names of the NAPA curves. If the table has the optional column SURF, the curve is read from the given surface, and not
as an independent curve from the database. For example, the curve STEM that is read from the preparation result of HULLF probably differs a
little from the independent curve STEM, and is also more consistent with the intersection curves of the surface HULLF. If there is a surface
(=sur1) in the column NAME and another surface (=sur2) in the column SURF, the stored line refers to the intersection sur1/sur2 that is calculated
by the interface.
A NAPA macro is available for the generation of (the first version of) the conversion tables. User instructions are shown in the DEF task by the
command !ADD .NUPAS ?; For example, the command !ADD .NUPAS creates the conversion tables containing HULL and the components of
HULL and the curves used in their definition.
The name of the log file created by the link is defined in the variable NAPA_PRINT e.g. as follows
export NAPA_PRINT=/tmp/nupas_napa_link.log
The log file contains information about the selected project and the values of the environmental variables. If you have defiined a variable, it is
marked by the string 'DEFINE' in uppercase. If you have not assigned a value for the variable, the string 'define' in lowercase is used. For
example,
In the log file there is also some additional data that is controlled by the variable NAPA_LOG. The following options are available:
S short log
F full log
C compressed log containing error messages only
NAPA INTERFACE
PROJECT TEST
Test project (can be deleted without warning)
VERSION A
DEFINE NAPASYSDB /n/pr/ship/sysdb
DEFINE NAPADB /n/pr/ship/napadb
DEFINE NAPAPROJDB /n/pr/ship/test.db
DEFINE NAPA TEST/A
DEFINE NAPA_PRINT /n/napa/temp/nupas.log
define NAPA_LOG S (log: S,F,C)
define NAPA_SURFACE TAB*NUPAS_LINES
define NAPA_CURVE TAB*NUPAS_SHAPES
define NAPA_PLATOL 0.00001 (shift of extreme plane sections)
define NAPA_GMTOL 0.01 (polygonization: tol,NUPAS)
define NAPA_GTOL 0.1 (gap tolerance /curves)
define NAPA_BTOL 0.001 (gap tolerance /patches)
define NAPA_ATOL 0.1 (angle tolerance /knuckles)
define NAPA_LIMITS ON (limiting box: ON,OFF)
BEGIN TRANSFER
1. Limits of Shape=0
-> HULL
2. Line 3,1
-> TR2/HULL
-> 77 points
3. Line 10,11
-> HULLA/CYL1
-> branch 1
-> 87 points
4. Shape=0/X=50
-> HULL
-> 47 points
Transfered entities:
128 : rational b-spline surf. entity
4 patches transferred
END OF TRANSFER
The tolerance of intersections is controlled by the variable NAPA_GMTOL. The following alternatives are available:
The intersection polygon calculated by NAPA differs from the accurate intersection less than the tolerance. However, Nupas-Cadmatic Hull has a
limit in the maximum number of points accepted (796 points). In case the intersection polygon has more points than the limit, the number of points
has to be reduced (by the user) resulting in a more inaccurate curve.
The use of the limiting box (=shape_default_area or shape_sub_area) given by Nupas-Cadmatic Hull is controlled by the variable NAPA_LIMITS
that can have the following values:
The connection of different branches of a NAPA curve is controlled by the variable NAPA_CONNECT that can be assigned as
If an object is intersected with a principal plane that corresponds to an extreme coordinate of an object, the plane is shifted inwards by a certain
tolerance. For the purposes of the link, the default shift is 0.01 mm. It may be changed by the definition
Exceptions to NAPA_PLATOL are defined in the variables NAPA_XMINTOL, NAPA_YMINTOL, NAPA_ZMINTOL, NAPA_XMAXTOL,
NAPA_YMAXTOL, NAPA_ZMAXTOL. For example, if a y-section at the lower y-limit of a surface was shifted less than the value of
NAPA_PLATOL, a smaller value (in meters) for NAPA_YMINTOL should be given.
The variables NAPA_GTOL, NAPA_ATOL and NAPA_BTOL correspond to the tolerances set by the !GM GTOL, !GM ATOL and !GM BTOL
commands of NAPA.
NAPA_GTOL is used in the plane sections of rooms, surface objects and combined surfaces. If two branches of the intersection are separated by
less than the given tolerance (in meters), the branches are always combined. It is also used in combining the branches of a curve that has been
made symmetric by the link.
NAPA_ATOL is used in the detection of knuckles in order to determine if an intersection point is duplicated or not. The point is duplicated if the
direction of the intersection curve differs less than the given angle (in degrees). In the case of surface/'straight line' intersections the point is
duplicated, if the surface normal at the two points differs more than the given angle.
NAPA_BTOL has an effect on intersections of patch surfaces and general facet surfaces. The branches coming from the independent patches are
connected if the gap between the patches is less than the given tolerance (in meters).
The reading of NAPA dump files could be useful e.g. when the user of Nupas-Cadmatic Hull does not have NAPA, and new versions of surfaces
or conversion tables (TAB*NUPAS_LINES,TAB*NUPAS_SHAPES) are needed.
5. Link to VDAFS
5.1. General
Geometry is stored in the VDAFS format by the command 'TOVDA objects options'. Two versions of the VDAFS standard are supported:
The format is accepted by several systems, and it has been tested on CATIA, INTERGRAPH, BRAVO and DESKARTES.
patch surfaces
curves in the preparation results of the surfaces
independent curves in the database
facet surfaces
surface objects
trimmed surfaces
For the last three categories, the function is implemented on pilot level only, and it requires at least level 2.0 of the VDAFS link. The same level is
needed if a patch surface contains triangular patches (as created by option TP in the PREP command).
All surfaces and surface objects are transferred as patch surfaces. If the object is not originally a patch surface, it is first converted into such.
Facets with more than four sides and facets containing holes are by default (for VDAFS 2.0) converted into trimmed patches that are represented
by the FACE-object of the VDAFS-standard. By using the option VER=1.0 a subdivision into four sided patches is done instead. Surface objects
are linked in the same way as the other facet surfaces.
The patches are represented by a set of VDAFS entities. The entities and their names (given by the link) are described below:
name = entity
-----------------
-PPi = SURF (i'th patch)
-FFi = FACE (i'th patch, that is a trimmed one)
-PPiCj = CURVE (j'th trimming curve of patch I in 3d-space)
-PPiPj = CONS (j'th trimming curve of patch I in parameter space)
As a default, the first patch that is transferred by the TOVDA command has the number I=1. Another numbering can be selected by the option
PN=i0. In this case, the number of the first patch is i0+1.
Each nontrimmed patch is represented by exactly one SURF entity. The primary VDAFS object corresponding to a trimmed patch is the FACE
entity. Each FACE entity refers to one SURF entity. The trimmed boundary on that entity is described both in the 3D space (CURVE entities), and
in the parameter space of the SURF object (CONS entities).
A wire-frame representation of surfaces is transferred by using the option C of the TOVDA command. The grid is transferred as stored in the
preparation description. If there is no grid, boundaries of the facets or surface objects are linked. The boundaries are names as CCi, where I is the
number of the transferred facet during the current command. As a default, the numbers start from 1, but another numbering can be defined by the
option CN=i0, so that the first I is i0+1. Structuring of the data is done by the SET and GROUP entities, as described above.
Independent curves (in DB1) are also transferable. The spline representation is used, if it is available. Otherwise, the polygon representation is
linked.
Coordinates are represented as millimeters in the VDAFS file. The format is controlled by the option D=alt. The following alternatives are available
(default=E7):
In the VDAFS standard, only the characters 0..9 and A...Z are available and the length of the string is limited to 8 characters. Unknown characters
are converted into X. For example, a curve named EXAMPLE-CURVE is converted into a curve called EXAMPLEX.
The name of the HEADER entity is controlled by the option H=name. By default, the name of the file is used.
All entities related to an object that is given in the TOVDA command can be collected into the same SET entity of the VDAFS standard. A smaller
set containing the primary objects only can be created by using the GROUP entity of VDAFS 2.0. These two structuring facilities are controlled by
the options S=alt and G=alt of the TOVDA command. The following alternatives are available:
Substring Replacement
For example, if a surface HULL containing three partial surfaces HULLA, HULLM and HULLF is transferred to VDAFS by the command 'TOVDA
HULL G=NAME S=SETINDEX', the following structure is created:
name = HEADER
SET1 = SET
definition of vdafs entities related to hull
HULLA = GROUP / a list of primary entities of hulla
HULLM = GROUP / a list of primary entities of hullm
HULLF = GROUP / a list of primary entities of hullf
HULL = GROUP / a list of primary entities of hull
SET1 = ENDSET
name = END
FILE directory>file
TOVDA obj1 ... objn S=SINDEX G=NAME
S1=BEGINSET
data about obj1 (patches, trimming curves etc.)
name11=GROUP / patches of name11 belonging to obj1
name12=GROUP / patches of name12 belonging to obj1
...
S1=ENDSET
...
Sn=BEGINSET
data about objn
namen1=GROUP / patches of namen1 belonging to objn
namen2=GROUP / patches of namen2 belonging to objn
...
Sn=ENDSET
Triangular patches with singularities are not allowed in DeskArtes. They can be eliminated in NAPA by the option 'TP=angle' of the PREPARE
command. By using a large angle e.g. TP=999 all singularities are cleaned away.
TP=angle Selection between type of three-side patches. Three-sided patches whose opening is less than 'angle' are prepared so that
singularities are eliminated. This is usually favorable for nearly planar patches. As a default all three-sided patches are singular.
(Opening of a patch is here defined as the largest angle between the surface normal at the patch corners.
Sometimes the boundary of a surface object containing a hole overlaps with itself in NAPA and is transferred as such into VDAFS. This is
not supported by the standard, and causes some problems of tessalation in DeskArtes.
DeskArtes does not understand the empty comment lines in the VDAFS header. Something should be written there.
probably a feature not supported by all programs that can read DXF files. By using the option NE, NAPADATA is not added to the file.
For more information about the 'extended entity data' in AutoCAD, refer to the manuals of ADS or AutoLISP. A registration of NAPADATA
is done by the command (RECUP 'NAPADATA') of AutoLISP.
Syntax 1:
DEF?>FILE dir>file
DEF?>TODXF objects options
Syntax 2:
DEF?>FILE dir>file
DR?>STORE DXF options
DR?>intersection commands ...
DR?>STORE OFF
Objects are given with the same syntax as in the DES command e.g. FR1, (FR 1 10), *HULL or CLIST(1). If no 'extended entity data' is needed,
option NE can be used. The unit of the data is controlled by the command '!FORM' for the quantities X, Y and Z.
TYPE=alt type of transferred objects. The given set can be restricted by the option TYPE=C, TYPE=S, TYPE=SO, if only curves, surfaces
or surface objects are to be transferred. If there are indirectly referenced objects (*name,**name etc.), the default is TYPE=C.
Otherwise, the default is TYPE=ALL i.e. all objects of the set are transferred.
REP=S surfaces are written in the spline representation. Each patch is converted into a variant of the POLYLINE entity that represents
a cubic b-spline surface.
The options LAYN=layer, UNIT=alt, and D=n are available in the command DR>STORE DXF ... also.
There is also a dialog window to export to DXF in the Hull Surface Editor, see the chapter Hull Surface Editor, To DXF.
This is the first version of the FEM link. It is not supported any more and has been replaced by the FEM task, where the created model can be
output e.g. in the DXF format.
By the TODXF command the geometry is transferred to the DXF standard as a set of line segments. The output can be used in a mesh
generation of a FEM system, provided the FEM system can read DXF data and is capable of combining calculation elements from the
independent line segments.
Curves, either given by the user or intersected by the link, are the basic objects that are transferred. Each curve is represented by a set of
line-elements. Breakpoints are intersection points with the given planes and curves. When two curves intersect i.e. when the nearest points are
within a tolerance from each other, these points are forced to be the same, and that point is a point of subdivision and an end point of a subset of
line-elements. Overlapping line-elements are eliminated from the result file.
Syntax:
objects: names of curves and/or any objects of NAPA that can be intersected by planes. A set of objects may be given in the same way
as by the DES command.
sections: (opt) set of intersection planes defined by e.g. X=x1 or Y=(y1,y2,dy)
options: (opt) additional control parameters
+PLOT: draw the transferred segments also
PLOT: draw only, do not transfer
+B: boundary of objects is also used (if available)
+BE: a boundary is generated through endpoints of curves
TOL=tol: point detection tolerance (default=GMTOL). Equality of endpoints of line-elements is checked with this tolerance.
ITOL=itol: curve/curve-intersection tolerance (default=3*'point detection tolerance'). Special case ITOL=0: use standard
intersection routines of NAPA.
Y>0: only line-elements with positive y are taken into account
7. Link to IGES
Surfaces and curves of NAPA can be transferred into IGES. The version 4.0 of IGES is supported.
The result file is given either by the option FILE='filename' (apostrophes needed) or by the FILE command of the DEF task.
The complete list of options is shown by !EXP TOIGES. Below are some notes about their use:
Surfaces are converted so that for each patch or facet there is a related IGES entity. As a default NURBS entities 128 with degenerated
knots (K=D) are created. The degree of the NURBS is 3 for patches and 1 for facets. Additional trimmings are described by the Trimmed
Surface Entity 144. Other knot sequences of the NURBS surfaces are available by the options K=P (periodic) or K=(k1...k8) (arbitrary).
By using the option TYPE=114 nurbs entities are replaced by the Polynomial Surface Entity 114. Facet surfaces can also be transfered
as a set of restricted planes by using the option TYPE=108. In IGES 4.0 there was support for holes also but this option was removed
from the newer version 5.2.
In creating NURBS surfaces the option PTOL=ptol can be used to force those control points that are within the distance ptol exactly the
same. In this case connections between surfaces are found easier also in programs that use extremely small geometrical tolerances
(such as ACIS and PRO/Engineer). The option PTOL=-ptol works as above and also lists the largest modification and the related point.
The adjustments are done for each NAPA object separately.
Curves are converted as a default into NURBS curves (Rational B-Spline Entity 126). Parametric spline curves (entity 112) are created by
the option TYPE=112. This option also affects the type of the trimming curves of surfaces. A curve in NAPA has a polygon representation
and an optional spline representation. If the spline representation is available, that one is transferred as a default. By using the option
TYPE=P (or TYPE=<>112 or TYPE=<>126) the polygon is used. In the case of generated curves that are represented only by polygons,
an approximating spline representation is created and transferred by using the option TYPE=S (or TYPE=*112 or TYPE=*126). The
approximation is controlled by the option TOL=tolerance (default=GMTOL).
Entities that are related to the same surface of NAPA can be grouped. By using the option GRP=1 all IGES entities related to the same
NAPA object are collected into the same group. By GRP=2 the grouping is nested for combined objects so that there is one group for
each component.
The name of the related NAPA object is stored in the directory section of the IGES file in the position 'Entity Label'. The related patch
number is stored in the position 'Entity Subscript Number'.
FASTSHIP
MACSURF
PATRAN
IGRIP
GMS
RHINOCEROS
3DView
There is also a dialog window to export to IGES in the Hull Surface Editor, see the chapter Hull Surface Editor, To IGES.
The objects are independent NAPA objects, or a collection of these in structures STR*name or in lists name(). The following options are available:
C=string Definition of the coordinate system> The default '1,-1,-1' corresponds to the transformation y -> -y, z -> -z.
+ Add also the strings NONRATIONAL and PERIODIC to the definition of each NURBS surface. These are needed in
FastShip's .srf file format
PTOL=ptol Control points within the tolerance ptol are forced to be equal. This option makes the transfer easier to such programs (such
as FastShip) that require an extremely precise geometry in order to find out the connections between the surfaces. The
option K=D is defaulted. In this case it is possible to represent the connection of patches that share a common edge in an
exact way. (The option PTOL=-ptol works as above and also lists the largest modification and the related point)
The link has been tested by transferring a surface to FastShip. Some limitations in FastShip concerning editing operations of surfaces with a
periodic knot sequence were encountered. The necessary changes have been added from FastShip 4.37 release and on.
The link can also be used to transfer a surface into the SCAFO system. In this case the option K=D is required.
9. Link to Unigraphics
Facet surfaces and surface objects can be transferred from NAPA to Unigraphics. The transfer is done by the commands
The objects are independent NAPA objects, or a collection of these in structures STR*name or in lists name().
The plate thickness is controlled by the option THI=thickness. The thickness can be given directly (e.g. TOUG BH1 THI=0.005) or read from a
column of a table (e.g. TOUG STR*BH THI=FEMTHI).
A value of the z-coordinate or a set (z1,z2,dz) defines the transferred sections. The scale of the result is given by the option SCA=scale
(default=1). Each section is divided into two parts. The subdivision takes place at an x-section defined by the option MID=x (default=XMID of the
reference system). A third part in the flat of side region may be added. If the z-coordinate of the section is larger than a value zfs given by the
option FS>zfs (default=0), and the section has a straight part that intersects the midship section, the flat of side region is identified as an
independent part.
Separate files for the forepart and the afterbody must be created.
The curves to be transferred are shown by the command ARGS with the following syntax:
HUll surface
X 'middle frame' 'other x-curves'
Y 'tangent trace line' 'end profile' 'end breadth'
K 'knuckle curves'
The curves can also be given directly with the commands X,Y or K.
DEF?>FILE dir>file
DEF?>TO OPTISCAT objects options
Z>value Patches that are totally in the region z<value are skipped
TOL=tol The distance between the OPTISCAT elements and the NAPA surface is less than the given tolerance
If the surface is not a patch surface, it is converted into such. Each patch (limited by the unit box in the parameter space) is converted into the
OPTISCAT format with a tolerance given by the user. The connections between the patches are not taken into account. Each patch is converted
independently from the other patches of the surface. First it is checked if the patch is plane within the given tolerance. Nondegenerate plane
patches are converted into the entities QUAD, and degenerate plane patches into the entities TRIA. Otherwise the conversion is done into one or
more elements of the type QUAD9 so that the tolerance is obeyed. Because each patch is converted independently from the others, there can be
gaps between the elements of the adjacent patches.
surface objects
trimmed patch surfaces
patch surfaces with the TP option
closed facet surface
The files are given with the syntax directory>file or with the total name in apostrophes.
The result is a text file containing the grid curves and the surface definition. Appendices and cambers are not included. The definitions are run by
the commands
The SIKOB curve definitions are transferred into NAPA as explicit definition points. As the SIKOB curves are not interdependent, the user is
required to add cross references in NAPA to create closed surface openings. As a default the link only adds frames to the end points of the curves
not connected to the grid. The sequence of the points in the added frames is based on the SIKOB definition. The added frames contain no angle
conditions. They must be added by the user to represent flat of bottoms etc. correctly.
The interpolation code 1 in the SIKOB decks and knuckles is converted into the angle condition /- -/ before the corresponding point. This is the
only angle condition produced by the link.
The linked curves contain no side conditions. This means that decimal figure added to the number of the knuckle curve of SIKOB is not taken into
account.
The link may be controlled by adding comment lines starting with $ NAPA before the definition of the related subject in the SIKOB file. The
following options are available:
The name of the object in NAPA is defined. The default names are the following:
centerline CL
frames defined with the centerline FRM1,FRM2,...
decks and knuckles KN1,KN2,...
extra waterlines defined with the knuckles C1,C2,...
waterlines WL1,WL2,...
frames added by the link FR1,FR2,...
surface HULL
Additional frames are added to the locations given by a set of x-coordinates and/or the options ENDPOINTS and NOT ENDPOINTS. The option
ENDPOINTS is a default, meaning that frames are added to the endpoints of curves not connected to the grid.
Although the format of SIKOB77 is quite different from that of SIKOB74, the type of the grid is very much the same. The result is a collection of
curves that do not form a complete grid in the NAPA sense. At least frames must be added manually by the user in order to create a preparable
surface of NAPA.
The link from SIKOB77 differs from that of SIKOB74 in the following:
The purpose of the new link program is to create a NAPA hull surface and compartments from the SIKOB data. The link program consists of three
macros located in the NAPA database (DB7):
.FROM_SIKOB Macro
This macro reads the SIKOB hull data file and writes the data to a description named SIKOB*HULL. The input file should be in ASCII format.
There can be several decks defined in the SIKOB data. The first one is used as a deck boundary curve. The macro also stores some data in the
NAPA reference system. AP, FP, BREF, SHELL parameters and frame systems are updated. You should check that the reference system is
correct after the updates.
If the file name is not given as an option, it is inquired from the user.
EXAMPLE:
!ADD .FROM_SIKOB temp>inhull74
.SIKOBTOCURVES Macro
This macro reads the description created by the .FROM_SIKOB macro and creates NAPA hull grid curves. The hull surface is formed using three
partial surfaces: HULLA, HULLM and HULLF. If frame (waterlines) data are missing, only a simple wireframe surface is created using knuckle
curves and decks. The link program assumes that the first defined deck defines the main deck curve. The main deck must be continuous from the
aft to the bow. Special curves (flat side, flat bottom) are created and used if they exists. Waterline curves are created using Z-values from the
frame data. The hull grid is created using references to other curves, so it should be ready for patch surface preparation. The NAPA hull grid
curves are created in the DEF task by the command:
EXAMPLES:
!ADD .SIKOBTOCURVES OKN
--> Only knuckle curves are created to object KNSUR
!ADD .SIKOBTOCURVES NWL
--> Boundary and frame curves are created
!ADD .SIKOBTOCURVES OWL
--> Waterlines are added to the existing hull
!ADD .SIKOBTOCURVES
--> Boundary, frame and secondary waterline curves are created
!ADD .SIKOBTOCURVES HULLA AKN NWL
--> Aft hull part with knuckle curves and without waterlines is created
It is advisable to run this macro multiple times and in the following order.
With option NWL, just primary curves are linked and they can be easily checked and modified if necessary
With option OWL, just waterline curves are added to the hull
.SIKOB_COMP Macro
This macro reads the SIKOB 'vol' file and creates NAPA compartments according to it. The macro creates two descriptions: SIKOB*CURVES and
SIKOB*COMP, where curve and compartment data is stored. This data is used to create curves, cns surfaces, and compartments. The
SIKOB*HULL description created by the FROM_SIKOB macro is used to create limiting decks. Only SIKOB compartments definition types 1, 2
and 3 are supported. The link creates an arrangement named SIKOB where all the generated compartments are stored. The NAPA
compartments are created in the DEF task by the command
EXAMPLE:
Curves (entity 126: rational b-spline, 112: parametric b-spline, 100: circular arc, 110: line, 102: composite curve). The curve can be in the
3D cartesian space or the 2D parameter space of surfaces.
Groups (entity 402: associativity instance, forms 1,7,14,15)
Transformations (entity 124 forms 0,1)
The content of the IGES file can be listed by the command FROM IGES dir>file CAT selection. The list is controlled by the LQ IGES command.
The following data items of the directory section are available. NAME and DES are strings, and the others integers. In the table the NAPA
quantities NR and NAME are used for the integer and string items respectively. The name of the item itself should be given as a qualifier of the
quantity. For instance, LQ IGES NR(ENT)/NR NAME(DES)/DES is a valid selection of the items to be listed.
Examples:
FROM IGES TEMP>FILE1.IGS CAT
FROM IGES TEMP>FILE1.IGS CAT ENT=128 !
Entities can be selected from the IGES file. The selection is done in the standard NAPA way (see !exp sel/gen) and it is based on the quantities of
the directory section (ENT, PAR,...) that were described in connection with the catalog function. The selection acts on the geometry subset of the
entities of the IGES file (=points, curves, surfaces, transformations, groups, subfigure definitions and instances). All entities (including properties
etc.) are available by the SUBSET=ALL option. The selections should be given as the last parameters of the command. The defaulted selection
contains all independent entities of the geometry subset. In the case the defaulted selection contains entities that are not supported by the
interface (such as. 143: bounded surface) a user-defined selection (e.g. DEP>-1) is needed so that at least the referred entities could be
transferred.
Examples:
FROM IGES TEMP>FILE1.IGS CAT (ENT=128 OR ENT=144) AND DEP=0
FROM IGES TEMP>FILE1.IGS STEST ! (ENT=128 OR ENT=144) AND DEP=0
A selection based on the index of the entity in the file (that was the only alternative before the Release 2001.1) can be made by one of the
following options:
E=-I as above, but surfaces are inverted. The optional inversion has been implemented, because the IGES file may contain surfaces
whose outsides are not consistent with each other in the NAPA sense.
E=(i,...-j,...) many entities are selected. Some of these are taken as such, and some are inverted
The naming of the result objects is controlled by the parameter name of the command FROM IGES dir>file name ... . The 'variables' %TYPE,
%INDEX and %BRANCH can be included in the name. %TYPE is replaced by the character C for curves and S for surfaces. %INDEX is replaced
by the pointer into the directory section (=column DIR in the list created by the CAT option). Curves that have many branches are exploded into
single branched curves if the variable %BRANCH (that is replaced by the branch index) is used.
The created surfaces are normal patch surfaces of NAPA. If the IGES surface is a nonrational polynomial surface (i.e. all weights are equal), and
the degree of the basis is less than four in both directions, the relationship between the two surfaces is one to one. NURBS entities (curves or
surfaces) that are rational or whose degree is greater than three are approximated by a tolerance. Each patch (defined by the knot structure) is
subdivided so that the tolerance GMTOL is achieved. Another tolerance is given by the TOL=tol option. A user-defined subdivision can be defined
by the option EQP=n or EQP=(nu,nv) so that each patch is subdivided into n*n or nu*nv parts.
Examples:
FROM IGES TEMP>FILE1.IGS STEST ;** automatic subdivision if needed
FROM IGES TEMP>FILE1.IGS STEST EQP=1 ;** no subdivision
FROM IGES TEMP>FILE1.IGS STEST EQP=4 ;** each patch into 16 parts
The orientation of the result surface can be controlled by the option OUT=outside of the FROM IGES ... command. The option is always needed if
many NURBS surfaces are collected into a single NAPA surface and the orientation of the individual parts is inconsistent. The following
alternatives of the option are available:
As a default, the NURBS data of the IGES file is not stored as such, but converted into a patch representation of a NAPA surface. By using the
option +NURBS also a NURBS representation is created. With the option NURBS, only the nurbses are stored. The nurbses can be used in
OpenGL drawings and by the IGES link, but e.g. intersections are always calculated from the patch representation.
Equiparameter curves can be read from a NURBS entity 128 by using the EQP option:
Examples:
FROM IGES TEMP>FILE1.IGS C0 EQP ;** -> curve c0
FROM IGES TEMP>FILE2.IGS C%BRANCH EQP ;** -> curves c1,c2,c3..
With the option SPLINE it is possible to transfer also the spline representation of the curves. Please notice that the splines are not the same as
NAPA definition curves. You can use the manual editor EDI or redefine with the DES command to create an approximative curve. The accuracy of
the result curve can be controlled with tolerances, please check !EX DES.
It might be necessary to prepare the surface before opening it e.g. with the Hull Surface Editor. The references should be carefully checked and
repaired.
There is yet no support e.g. for the following geometric entities of IGES:
It is possible that some of these unsupported entities are created by the default output of the sending system, but an optional form supported by
the NAPA interface is also available. For example, Rhinoceros prefers entity 143 (bounded surface) for trimmed surfaces, but an optional output
using entities 144 (trimmed surface) is also possible.
Often importing an IGES surface is used to import only the surface without curves and thus the possibilities to modify the imported IGES surface
are very limited in NAPA. Therefore, it should be taken care of that the original IGES surface is as good as possible. Possibilities to modify the
imported surface are better if also the curves are imported but even this requires some amount of manual work.
To achieve the best result with imported IGES surface, the following is advised:
Use non-rational surfaces with three-degrees or lower. This way NAPA does not need to approximate while converting to NAPA's
three-degree polynome surface. The approximation can be modified with option TOL.
Use untrimmed surfaces. This avoids the tolerance problems of polygonization of trim curves in parameter space. This can be modified
with option TOL2.
Make sure the surfaces are connected to each other precisely and preferably the number of knots is the same with connection edges (=
uniform parameterization). The distribution can be seen with option EQP=1.
Avoid overlapping surfaces/patches.
Do not use degenerated surfaces i.e. surfaces where the knots are one upon the other.
Remove internal objects such as thruster tunnels, rudders and tanks. Only the hull surface should be imported.
It is recommended to use only a half of the surface as e.g. in the HYD task the surface is mirrored automatically. If there is a need to use
an unsymmetric surface, a room definition like STABHULL should be used in calculations.
Check the outside orientation of surfaces/patches. In NAPA the orientation can be checked with the command PLO surname OUT and
the orientation can be changed with the OUT command. However, it is easier if the original orientations are correct.
In many cases the above mentioned actions are easier to perform with some outside program other than NAPA specialized in IGES surfaces.
The problem locations with imported surfaces in NAPA can be checked with following:
Plot the surface with openGL. Small gaps can be detected quite easily this way.
Plot surfaces/patches with out option, PLO sur O, to see the orientations.
Check with command INFO sur that the volume is calculated correctly and that the orientation is correct.
Plotting the intersections of patches, PLO sur1/sur2. If the curve is discontinuous, there are gaps.
Check the points of multiple branches with SLIST:
SEC surname
SLIST B
X D=0.1
The content of the VDAFS file is shown by the command FROM VDAFS dir>file CAT. In the catalog the following quantities are used:
A subset of the entities in the VDAFS file can be transferred. The standard selection criteria of NAPA are available (!exp sel/gen). All quantities
listed by the CAT option can be used (except for the syntax NAME=.., that is not a selection option here but reserved for the naming rule). For
example, all SURF entities belonging to the set HULLA are selected by the option SET=HULLA. The selection options must be the last options of
the command.
The transfer of the SURF entities is exact for all surfaces of degree <=3 in both directions. Otherwise, the result is an approximation, whose
accuracy is controlled by the option EQP=n. Each surface element is subdivided into n*n patches.
As a default, there is one NAPA surface for each SURF or FACE entity in the VDAFS file. All patches are collected into the same surface by the
option NAME=name. By using NAME=*name a combined surface of the parts is created.
The name of the result in the option NAME=name may contain the variables (=substrings) ENTITY, SET and INDEX. For example, the default
corresponds to the option NAME=ENTITY. The surfaces S1,S2,S3,... are created by the options NAME=SINDEX INDEX=0. All FACE and SURF
entities within a VDAFS set are collected into a single NAPA surface, whose name is equal to the name of the set, by the option NAME=SET.
The option OUT=alt has an effect on the inside/outside orientation of the surface. The following alternatives are available:
The option TOL2=tol has an effect on the polygonization of the trimming curves in the parameter space of the surfaces. If tol<0, a tolerance
relative to the extents of the parameter region is given. If tol>0, an absolute polygonization tolerance is defined. The default is PTOL=-0.001.
Surfaces with the same name in DB1 can be overwritten only by using the ! option.
The DXF curves are stored into the database of NAPA as polygones without any definition data. The name of the curves that are located in the
principal x,y or z-plane is a combination of a prefix and an index. As a default, the principal plane curves curves are called X1,X2,X3,..., Y1,Y2,...,
Z1,Z1,.... and the other curves C1,C2,....
Note: as the imported curves are polygones and not M2 splines which is the default NAPA form, for example, definition points (ID P)
are not shown. You can simply change the curve by rerunning the definition and the curve is converted as spline.
As an option, a surface containing the transferred curves is created. The DXF file can also be plotted (without storing anything to db1) by the
command FROM DXF dir>file PLOT. The drawing contains 3D data. !VIEW 3D is implied, and e.g. PRO I is available.
If the DXF file contains only 2D data, the drawing is transferred into a principal plane that by default is at Z=0, but it can be changed by the user.
The transfer is controlled by the same macro DXF*NAPA*TYPES that is used in the drawing link from DXF (EDR>LOAD dir>file.dxf).
NX=s prefix for curves that locate in principal x-planes (default: NX=X)
NY=s prefix for curves that locate in principal y-planes (default: NY=Y)
NZ=s prefix for curves that locate in principal z-planes (default: NZ=Z)
NS=s prefix for other than principal plane curves (default: NS=C)
IS=i start index for other than principal plane curves (default: IS=0)
Z=zval two dimensional data is transferred into the given plane (default: Z=0)
SETUP=s name of the setup macro search from db7,db2,db1 (default: SETUP=DXF*NAPA*TYPES)
UNIT=val scaling factor of coordinates (default: SETUP=1 or the value defined in the setup macro by the command 'UNIT val')
Examples:
plot only
transfer curves
In general importing from DXF requires always some amount of manual work to transfer the grid surface to a patch or NURBS surface. Curves
should be transformed (see the note above) and references added. This can be done quite fast though with the Hull Surface Editor once the
curves have been redefined to M2 or M1.
The source file contains a list of curve coefficients i.e. the knots and the control points of the third degree polynomial B-spline curves created by
Blines. These curves are converted into the spline curves of NAPA. The polygon representation with the current GMTOL is also calculated. The
use of the polygon representation is recommended. There is no use to set the spline mode on (GMTP SPLINE in the REF task or !GMTP
SPLINE) unless most of the patch edges are part of a single spline segment. The spline segments can be drawn by using the identification ID
SPLINE.
As an option, the name of the surface containing the transferred curves may be given. By the syntax +surface, the curves are appended to an
existing surface of NAPA.
Options for the surface preparation can be set by the option PO='preparation options' of the command FROM BLINES. The default combination is
PO='TOL=0.005 ATOL=1.0'. This means that two curves intersect if their distance is less than 5mm and their mutual angle at that point is greater
than one degree.
Preparation option TOL=tol is probably needed, because intersection points between the curves are not explicitly defined by reference, and the
curves do not exactly go through each other (e.g. because of the limited accuracy of points in the source file). Such points are easily missed in a
preparation without the tolerance definition. The tolerance should be larger than about 0.001, and smaller than the smallest distance between two
non-intersecting curves. The upper limit can be increased by using the option ATOL='angle in degrees', and supposing that non-intersecting
curves within distance TOL have the same direction within tolerance ATOL.
The transferred curves are generated ones containing no definition data. An approximate conversion to definition curves is done by the
commands DES or EDI, and it can be controlled by a number of options that are described in the chapter 'change of generated curves'
As a default, the quantities X,Y,Z (=coordinates of points), FVX,FVY,FVZ (=components of velocity), FCP (=pressure coefficient), and FCF (=skin
friction coefficient) are read from the result file. The name of the table may contain a variable NAME. If there are many surfaces in the file, a
separate table for each surface is created and NAME replaced by name of the surface.
If the file contains offset data of a surface, option O is required. A table containing columns X,Y and Z is created.
Points of the table can be plotted by 'PLOT TAB*table ...'. Columns of the table can optionally be drawn as additional identifications.
The result file is a macro containing definition commands of a NAPA surface. The geometry is transferred so that there is one to one
correspondence between the definition points and angles of the KHI and NAPA curves. Some data i.e. the 'WL interrupts' and the 'BL interrupts'
are not transferred.
From the NAPA file, a surface is created by: 'DEF>EDI; GET dir>napa-file; ADD'. Additional waterlines etc. must be added before the surface is
preparable. For example, a waterline at z=1 is created by 'CUR Z1; Z 1; XY *surface'.
dir: directory
The graphic that is currently visible is converted by the transparent command !SEND TO system options
In the PLOT task the selected drawing is converted by the command SEND TO system options
INT Interleaf
The following options can be used. The shown default values are the defaults of the program that can in some cases be modified in the setup
description of the link ( DXF*TYPES,...).
FILE='file' name of the result file. Note that apostrophes are needed and the name should contain the directory path and it should be in
the format of the operating system.
The following options are available for the DXF link. The default values can be defined in the setup description DXF*TYPES in db1, db2 or db7.
UNIT=val scaling factor from the NAPA units to the DXF units. The default UNIT=1000 corresponds to millimeters in the DXF drawing.
SETUP=name name of the setup description that is searched from db1, db2 or db7. By using SETUP=NONE, no setup description is used.
Logical pens, fill codes and font codes are supported by the drawing links. In the definition tables e.g. in the PENCODES table the following
columns are required:
DXF: T7.3
SBD: T7.1
MDD: T7.2
INT: T7.5
The conversion of drawings is controlled by options in the command. In addition, for the DXF and the Interleaf link a more detailed optional setup
procedure is available. These are described below.
The link can be controlled by a setup description. Conversion tables for line thickness, colour, dashing pattern and pen type are included. Without
a setup description, defaults of the program are used except for the line thickness, which is not supported at all.
The default name of the setup description is DXF*TYPES. Another description DXF*name is selected by the option SETUP=name of the
command SEND. The description is searched first from the project and then from the system database, and then from the NAPADB. By the
definition SETUP=NONE, defaults of the program are used. The setup description can be edited by the description editor DED of the task TOC.
A version of the NAPA->DXF transfer is selected by the option VER=number of the !SEND TO DXF and PLOT>SEND TO DXF commands. All
available versions are listed by the command !SEND TO DXF VER=?. The version dependent data is stored in the DXF*TYPES control
description. The DXF*TYPES in the NAPADB contains the following predefined versions:
The control description in the system database (DB2) or in the project database (DB1) may contain also user-defined versions. By the macro
!ADD DXF_MODEL_DATA it is possible to create a new version related to a model DXF file that has been exported from any program that should
import files from NAPA.
In the NAPA -> DXF transfer the model data related to a version is used as such but for the following:
There are control records for specifying AutoCAD dashing patterns directly at the link.
These control records are intended to maintain different versions of DXF link.
The records RECNR are the same as before e.g. record 1 controls the line thickness, record 2 the colour etc. If the record is missing, the record
RECNR is used as such.
There is an option in AutoCad to control how the dashing pattern is centered in a POLYLINE. As a default, the NAPA->DXF transfer creates
curves, where the pattern is applied to each segment of the polyline independently from the others. There is an option to make the dashing
pattern continuous throughout the entire length of the polyline. The new option is taken into use as follows:
Add integer record 10000*version+12 into the description DXF*TYPES (in DB2).
RGB-colors are available with the option RGB and ACI of the !SEND TO DXF command. ACAD2004 is required. It is possible to use both or
either of the two options at the same time (see !exp send/gr1).
With the option ACI, the Autocad Color Index that is nearest to the RGB-color is selected. The search is based on the table TAB*ACI available in
DB7. This option will overrun colours specified in records **21 and *22.
RGB option adds to the DXF file the colour components after ACI code from records **21 and **22. So colours are stored in two different ways
and it is up to the receiving software (AutoCAD) which one is used.
A layer defined by GR.LAYER or !LAYER may have a descriptive text also. By using the LAYN=** option of the !SEND TO DXF command, this
string is used as the name of the DXF layer.
The LAYN=** option is supported only by the !SEND TO DXF command, but not by the SEND TO DXF command of the PLOT task.
The link is controlled by a macro INTERLEAF*TYPES. The macro is searched from DB1, DB2 and DB7 (in the given order). The macro contains
setup commands that are explained in
!COM G95
and
!EXPL command/G95
Drawings of the DXF standard are transferable to NAPA. The conversion is done by the command LOAD in the Drawing Editor (EDR) of the
PLOT task. Syntax:
DXF drawings can also be added into a NAPA drawing directly by the FIGURE 'file.dxf' ...; command. The name of the DXF file including the
whole directory path should be in apostrophes. For example, the following command transfers the DXF file into a rectangle entered interactively
by the user (option SI) so that the layers are also transfered (option K)
FIG 'temp/file.dxf' K SI
The transfer is controlled by an optional macro defaulted to DXF*NAPA*TYPES. Another text can be used by the option SETUP=file. The file is
first searched from DB1, then from DB2, and then from DB7. If the file is not found, the default setup of the program is used. Available setup
commands are listed by !COM G94. Explanation of a command is obtained by !EXPL command/G94.
Only a subset of the DXF-standard is supported by the link. Features not recognized by the link are omitted and a warning is given. The following
features are controlled by the setup description. The related commands are in parentheses:
linetypes (LTYPE)
text styles (STYLE)
colours (COLOUR)
filling patterns (HATCH)
line thicknesses (THI)
units (UNIT)
text justifications (JUS)
polygonization tolerance (TOL)
name of the drawing (NAME)
storing of blocks into partial drawings (STORE)
type of the log produced by the link (LIST)
layers (DEBUG NOLAYERS)
selection of transferred entities (DEBUG LINK)
selection of DXF data that is omitted totally (e.g. entities) or calculated by the link (e.g. the size of the drawing). (DEBUG OMIT...,
DEBUG SIZE)
The wireframe representation and the element representation can be output in the DXF and the IGES standard. In addition there is a tailored LQ
and TOO controlled output facility. These are explained in more detail in the document of the FEM-link.
The LOFT task can be run in the KHI, DXF, IDF, NUPAS and SCAFO modes. This is explained in the document of the LOFT task.
The SFL subtask of the DEF task contains functions for converting a surface into a set of panels for CFD purposes.
Creates and transfers hull panel data for CFD programs developed by MARIN.
1. Introduction
1.1. Purpose
1.2. Properties of a panel model
1.3. Organization of the panel model
1.4. Output for different systems
2. Definition of panels
2.1. Topologic classification
2.2. Simple block
2.3. Combined blocks
2.4. Controlling the spacing between points
2.5. Generating the internal points
2.6. Obtaining a section oriented result
3. Definition syntaxes
3.1. Block
3.2. Definition of a combined block
4. Storing the result
4.1. Contents of the panel description
4.2. Handling updates
5. Auxiliary functions
5.1. Plotting functions
5.2. Displaying definitions
5.3. Generating a surface
5.4. Surface grid smoothing
5.5. Surface grid quality
5.6. Commands in NPN task
6. Panel definition with NPN to RAPID
6.1. Panel Requirements
1. Introduction
This document describes how to generate models for CFD and seakeeping calculations from a hull surface. These functions are available as the
subtask NPN under DEF. This task replaces an old version which is still available as the task PANEL, presented in a separate chapter.
1.1. Purpose
The purpose of the panel task is to generate a representation of the hull surface useful for CFD and seakeeping calculations. The name of the
task is derived from the fact that the surface is represented as a set of panels, and the representation as a whole is referred to as a panel model.
The main function of the panel task is to handle the subdivision of the hull surface in a suitable way and to store the result. In addition it handles
graphic checks.
Numeric access to the result is provided by the service function NPN.PANEL. Using this function, output can be generated in the form required by
the target system.
The models described here are supposed to serve different CFD systems, assuming only the following properties to be common:
The surface in question is described by a set of panels, each defined by four corner points. The four points are not required to be in the same
plane.
The panels of the surface are collected into one or several blocks each formed by a matrix of n*m adjacent panels. The panels share corner
points that form a matrix of (n+1)*(m+1) points.
The system allows that a side of a panel is reduced to zero, resulting in a triangular panel.
The system makes no assumption regarding the connections between the blocks, but means are provided by which they can be connected by
common sets of points.
The receiving system is assumed to require a consistent circulation of the panels. The conditions for achieving this are presented below.
A panel model is treated as a named object. In the database, the prefix NPANEL* is used.
The panel model consists of one or several blocks. Each block is identified by a name, which needs to be unique within a given model only. The
blocks may refer to each other, provided that the references do not form loops.
A type and a descriptive text can be added for each block. The type is a string intended for the case that the receiving system needs some kind of
classification.
A given block must be placed in a single surface (as defined in NAPA), but the different blocks may be generated from different surfaces.
Several simple blocks, as defined above, can be combined so that the combination can be output as one block, i.e. it is formed by a matrix of n*m
points. In the output, the combination replaces the partial blocks, which are treated as intermediate stages only. Blocks can be combined in
several levels, so that the parts may also be combinations.
In addition to the primary definition, the storage format of a block contains the derived information, formed by the set of points generated from the
definition.
The system as such is independent of the target CFD system. Special requirements posed by a specific system must be taken into account when
preparing the model definitions and creating the output file.
There is presently no built-in function for the latter task, which has to be done by macros. Support for this is provided by the service function
NPN.PANEL.
2. Definition of panels
This section describes the geometric principles, while syntaxes are presented later.
For managing the topology of the model, the sides of a block are referred to as the left, right, top and bottom sides. These names are just
labels, but for easier use, it is intended that normally the names have their natural meaning when seen in a side view. This way, the natural
meaning is maintained for most of the hull.
Directions within a block are counted from left to right and top to bottom, for example, when numbering points. The storage order of the points
depends on the classification of the sides, and so does the circulation of the panels generated.
Where blocks are combined or where blocks are attached (explicitly in the definition), the attached sides must have matching classification, for
example, a left side meets a right side. This rule cannot be obeyed in all cases. For example, at the inner side of a twin skeg, it is recommended
that top and bottom are reversed. At the aft end of the skeg, left meets left, which has to be handled by sharing an explicit definition rather than
using a reference.
Even if blocks are defined independently of each other, a consistent circulation must be ensured. An easy test whether two blocks are consistent
is that their sides can be made to match by moving within the surface, as illustrated by the following figure:
A block is defined by four border curves and instructions regarding the subdivision at the curves. From this, internal points are generated as
presented in the next section. The two steps are illustrated by the following figure:
Steps in creating a block: first points on the border, then the interior
The border curves can be a
named curve
section of the surface
border of another block
A border curve is usually longer than the part actually contributing to the block. Normally, this part is implied by the other borders, which must
intersect at the corners. In special cases, the part can be indicated by marking the ends with point objects.
If the border curve consists of more than one branch, there can be an error in calculating intersections with other borders. This problem can be
solved by modifying the border curve, or by increasing tolerances BTOL and/or GTOL. See !EXP !GM TOL for details. An improvement of
handling border curves with several branches will be implemented later.
A limit may be reduced to a point, which has to be represented by a point object. In the output primarily generated, this point will be duplicated as
many times as there are points on the opposite side, keeping the normal n*m structure.
In the simplest case, the subdivision along a border is defined by giving the number of subintervals only. By default, a uniform spacing is created.
At separate request, a non-uniform spacing can be given concentrating the points near one end.
When referring to the border of a neighboring block, the points of the other block are used as such and no separate subdivision instruction
can/need to be given. The limit of the referenced block must match the topologic classification: for example, a top limit is assumed to be matched
by a bottom limit.
On two opposite borders, the number of subdivisions must be the same. Normally, this is achieved by having one of them undefined. In contrast
to this, the distribution can be controlled separately on both sides. The default is to copy a distribution defined for one side to the other.
A combination is formed by a list of partial blocks, connected at either their left/right or top/bottom limits (according to the topologic classification).
The point sets on connected borders must match, at least regarding the number. Normally, a match is obtained by having one of the blocks refer
to the other.
The combination can be done in several levels, so that the partial blocks are combined ones.
Three options control the spacing of the points inside a border of a block:
number of subdivisions
argument: length along curve or coordinate (only partly implemented)
relative spacing of points
In most cases, the default for the argument is the curve length. In this case, even spacing means that the distance between points is equal when
measured along the curve.
In the primary direction the default for the argument is the coordinate axis when the section planes are coordinate planes.
By default, the points on a border are selected with even spacing. The alternative is to have the spacing change linearly as a function of the
argument. The degree of change is expressed by giving the ratio between the spacing at the end with respect to that of the start (in the given
interval), Thus, 2 gives double density at the end while 0.5 gives double density at the start. Alternatively, 0.5 can be expressed as -2. The ratio is
the theoretical ratio at the ends when the spacing approaches zero. With a finite number of points, the ratio between the actual line elements will
be smaller.
The following figure illustrates the distribution obtained with 20 points and different values of the ratio k:
This section describes the principles by which the points are selected within the block, when given the border curves and the subdivision at them.
The points on the border curves follow from the definition of the block.
For obtaining the internal points, a set of plane sections is selected, connecting matching points on two opposite borders. This pair of borders is
referred to as the primary borders and they are by default the bottom and the top. The direction between these borders is referred to as the pri
mary direction. With the option DIV of command BLOCK, the default (DIV=U) can be changed (for example to DIV=V). The other set of borders
is the secondary one. This naming reflects the order in which the borders enter the subdivision process.
Placement of section planes when the primary direction is the default (DIV=U, primary borders top and
bottom)
The points on the primary set of borders define two points for each section plane. Thus, there is one degree of freedom left, for which three
alternative strategies are available:
In the first alternative, an adjustment to the direction is made if forced by the given points.
The default is to use the second alternative, making the planes parallel with the average normal of the block (as estimated from the borders).
Other alternatives can be selected with the DIV option.
From the section curves, points are selected by dividing the length of the curve into parts according to a distribution that is interpolated between
those of the secondary borders.
The structure of the result, i.e. the order in which points are stored, is not dependent on the selection of primary/secondary direction.
The following example illustrates the selection of internal points. The primary direction is U (default), meaning that the section planes connect the
bottom and top limits. A distribution getting denser towards the fore end is defined at the primary limits. The set of planes is parallel with the z-axis
(option DIV=PZ).
Regarding the selection of primary/secondary borders (alternatives U and V in DIV), one rule is that the more complicated borders should be the
primary ones. For example, if the left/right borders are irregular, use DIV=V. This way, there is a better chance for a good match between the
section planes and the secondary borders.
The effect of selecting a fixed direction is relatively easy to imagine. When selecting planes parallel to a given axis, the effect can be imagined in
the projection along this axis, as the sections will appear straight.
A good test of the division options is that planes placed between the endpoints of the primary borders would roughly generate the secondary
borders.
The effect of a given decision can be easily seen with the graphic check facilities. Note especially the option G of command PLOT in task NPN,
for plotting the generator sections.
If the other software system requires blocks formed by points from sections with a fixed coordinate, for example, x-sections, this is obtained by
obeying the following rules (presented for the case of x-sections):
The X option has the additional effect that the points on the primary border having undefined spacing are generated by taking the same
x-coordinates as those of the opposite border, ensuring that the generator sections can be x-sections.
The X option also has the effect that X is used as the argument rather than L. This effect can be cancelled by adding the option L, i.e. DIV=XL.
3. Definition syntaxes
3.1. Block
name is the name of the resulting block. The name and the limit definitions are compulsory components.
TYPE defines a string that has no effect on the geometry, but it may be used when preparing data for the receiving system.
DIV controls the generation of internal points, and is formed by a combination of the following options:
N(v1,v2,v3) select the subdivision planes with the normal equal to the vector (v1,v2,v3)
P(x,y,z) select the subdivision planes using the point (x,y,x) as the third point
The alternatives X...P() are mutually exclusive. They may be preceded by the option V or L, for example, DIV=VP(0,12,9). In the cases D and N,
only the relative lengths of the vector components are relevant.
LEFT/RIGHT/BOTTOM/TOP:
Keyword preceding the definitions related to the given limit. 'limit' is formed by a definition of the limit and optionally the subdivision as follows:
curve[/(p1,p2)] [distr]
axis-name the name of the curve, projection along axis e.g. Y-CLD
The coordinate q can be represented by a point object given by its name, for example, X=P1. A tolerance can be added, for example,
X=12+0.001. The tolerance is intended for cases when it is difficult to obtain a section at the nominal coordinate.
The optional syntax /(p1,p2) restricts the curve to the part between the point objects p1 and p2. Normally, this is implied by the borders in the
other direction. If only one point is needed, assign - for the other.
Note: the order between the points obeys the topological rule: left->right or bottom->top.
The syntax 'distr' is optional and it can be omitted if the subdivision is obtained from the opposite border or the current limit is obtained from
another block. The syntax of 'distr' is
n[/k]
where n is the number of subintervals, and can be given as *, in which case it will be the same as on the opposite limit (default). k is the relative
density at the end with respect to the start, as explained above.
POINTS:
This keyword precedes the definition of points obtained from other groups, and available instead of normal points in the definition of sections and
curve extensions. The keyword is followed by one or several point definitions according to the syntax
name=nr/side/block
where 'name' is the name used for the point, block the name of a block, side=LEFT, RIGHT, BOTTOM or TOP and nr the point number on the
given block limit. A negative number is the point number counted from the upper end, for example, -1=last one. The direction is from lower to
upper limit according to the topologic classification.
Example:
This definition corresponds to a typical block defined with the old panel task: 13 x-sections from 20 to 50, 7 points selected along the sections
from the lower limit to z=8.
Example:
This definition corresponds to the one in the figure below. NPA3, PF0, NPF4, NPF5 are points objects.
Detail of the case above. The example to the right is obtained by changing the DIV option in BOW1 to
DIV=PXV
'name' is the name of the resulting block while 'name1', 'name2' are the partial blocks.
U combines blocks by their left/right limits, similarly V for combining in the other direction.
The options TYPE and DES have the same function as in a basic block. The option TOL defines a tolerance for the allowed mismatch between
corresponding points at the connected limits, default 0.5.
The partial blocks must be listed in the order they appear and so that the right/top end of the preceding block matches the left/bottom end of the
next block.
The following example illustrates a combination, one part of which is also a combination:
COMBINE G3-5 U G3 G4 G5
COMBINE G1-5 U G1 G2 G3-5
Example of combination
The following is an example of a panel model definition for a larger part of the hull surface (HULLA).
HULL HULLA
COMBINE B5-B2 V B5 B4 B5 B2
When saving the result, it is checked that the results are calculated.
The following information is intended for usage in macros fetching data from the panel model and it refers to the resulting model description.
In the beginning of the description, there is the record 1501, containing a list of block names. The record 1502 tells the type of the blocks:
1=simple, 2=combined, -1, -2: contained in a combination. Thus, positive values in record 1502 designate components that belong to the result
while others are intermediate results.
The geometry of each block is stored after a flag record having a record number equal to the index in the records mentioned. The flag record also
contains the number of points in both directions.
The coordinates of the panel corners are stored in three records 1001 (X), 1002 (Y) and 1003 (Z), in the order shown by the figure below:
Before any output functions in the NPN task are used, the model is updated if needed, i.e. the coordinates are calculated. The model is also
updated when storing in the database.
The curves and point objects are also updated, as far as they are dependent on other curves or point objects. This function takes advantage of
the normal object administration, where a formal surface named PANELMODEL is maintained.
Updating is also done when reading the model from the database so that it corresponds to the current geometry.
When using the service functions of the group NPN.PANEL, no updates are triggered.
5. Auxiliary functions
Graphic checks of the current panel model are obtained with the PLOT command under the panel task. The syntax of the PLOT command is
By default, the whole current model is plotted. The optional parameter 'block' restricts the result to the given block.
The parameter 'option' controls the result as presented below. The option is entered as a single string.
The parameter 'th' defines the size of texts or point markers, default as in the command TH.
By default, the model is plotted as points, represented by the marker 1 (a cross). With option D the marker is changed to 5 (a dot). With option E
(elements), the panels are plotted as closed curves and with option L, as the limits of blocks.
For error checking purposes, the options C and G are provided. Option C plots the curves forming the block borders (as originally obtained, before
limitation to the block) and option G the plane sections used for generating the internal points.
With option F, the result is coloured so that each block gets a different colour, either a fill colour (with option L or E), or a line colour.
By default, blocks that occur as parts in a combination are omitted. With option A, all blocks are plotted, while option S plots all non-combined
blocks.
As far as the options are not mutually exclusive, they can be combined, for example, EF: plot as panels with varying filling. When the parameter
'block' is omitted, combined options must be marked by an asterisk in order not to be interpreted as object names. The following alternatives are
equivalent:
PLOT ALL EF
PLOT *EF
The normal DES and EDIT commands are provided. With a block name as parameter, only the given block is displayed. If a name cannot be
identified as a block name, it is interpreted as the name of a geometric object.
EDIT *; enters the whole model definition to the editor work area.
With DES +; or EDIT +; the definition of all curves and points used are displayed before the panel data.
The command GENERATE generates a facet surface corresponding to the given panel object. This surface can be used as a normal NAPA object.
Smoothing of the surface grid is performed with the service function NPN.SMOOTH. Before smoothing can be performed a facet surface of
nondegenerated quad cells needs to be generated. The smoothing uses improved mode "I" as default. The user can define the number of
smoothing steps and the name of the facet surface that is created as output. Figure below shows a surface grid defined with 4 blocks before and
after smoothing.
NPN>get paneling1
NPN>gen FCS_P1A
NPN>@sfres=npn.smooth('FCS_P1A','HULL','FCS_S1A',12,'I')
NPN>rep
The quality of the surface grid can be evaluated with the service function NPN.QUALITY. The surface grid needs to be given as a facet surface.
The facet surface can be generated from panel model with "gen" task. NPN.QUALITY creates file QUALITY_S.DAT that contains quality
indicators and center coordinates for each cell. The file can be viewed with post processing application Tecplot. Figure below shows how the the
skewness values can be viewed in Tecplot.
NPN>get paneling1
NPN>gen FCS_P1A
NPN>@sfres=npn.quality('FCS_P1A','TAB*FCS_QUALITY','c:/napa/temp/kcs/MAY_P
1A/')
This command defines a block directly from the hull geometry, in contrast to COMBINE which
uses already defined blocks.
TYPE=s: assigns a string which can be used for controlling the target system.
HULL=name: defines the surface to be used as source. Default=the one defined for the model
as a whole.
DIV=spec: controls the subdivision. V=generate sections from left to right, default=U, from
bottom to top limit. X=make sections parallel with x-plane, PX=make sections parallel with the
x-axis, similary Y, Z. D(v1,v2,v2): make sections parallel with the vector (v1,v2,v2), N(v1,v2,v2):
make sections at right angles to the vector (v1,v2,v2), P(x,y,z): make the sections using the
point (x,y,z) as the third point.
points (opt): points for use in the definitions of the block, derived from other blocks:
POINTS: name=nr/side/block
axis=q: section at the given coordinate. The coordinate can be represented by a point object or
a point from the 'points' definition. The syntax +tol or -tol can be added.
/(p1,p2): (opt) restricts the curve to the part from p1 to p2, where p1 and p2 are points.
Normally this is implied by the other limits. The subdivision defines the division of the limit. It is
compulsory if the opposite limit does not provide this information.
/k: (opt) controls the distribution of the points, density at end with respect to that of the start,
1=even spacing. Default as on the opposite side or 1.
bottom-limit: keyword=BOTTOM
top-limit: keyword=TOP
EXAMPLES
BLOCK B1 DIV=X LEFT: X=60 5 RIGHT: X=80 BOTTOM: WL0 8/10 TOP: WL9
The block is defined between the given curves so that the the vertical subdivision is 5 and
horizontal 8. In the horizontal direction, the point density is increased towards the fore end
(k=10).
Similarly with the preceding one, using the block B1 as lower limit.
Options added.
A block is defined by combining existing blocks. Blocks can be combined in one direction only,
from left to right or from down up.
options:
TYPE=s: as in BLOCK
DES=text: as in BLOCK
EXAMPLE
COMBINE B12 V B1 B2
This command starts the normal curve definition function. The keyword CURVE must be
entered with min. three characters.
DELETE name
DES name +
name: (opt) interpreted as the name of a block in the first place, otherwise the name of geometric
object, default=the whole current panel model in dependence order.
DES !
Without parameters, the commands simply enters the text editor. With the parameters allowed
for DES, the result of the DES function is stored in the editor work area. EDIT * enters the
current panel model, EDIT + with curves and points also.
This command generates a NAPA surface (facet surface) or a limit curve from the panels of the
current model.
block: (opt) name of block or ALL. Must be given if options follow. For limit curve generation explicit
block name must be used and not ALL.
opt: options:
S: generate from simple blocks only, default=normal rule of taking all but those being used in a
combination.
L: This form generates the limit curve of the given block and leaves the result in the run time
memory.
GET name/vers/proj !
/vers: (opt) version. NOTE: the version is taken into account when reading only.
EXAMPLES:
GET PANEL1
GET PANEL2/A/PRO2
This command defines the name of the surface providing the hull form. A different surface can
be assigned to individual blocks. This command is presently compulsory.
HULL name
NEW name
This command adds descriptive text. For more information, see !EXPL NOTES/GEN.
This command plots the points or the limit curves involved. Parameters not recognized by the
current subtask will be assumed to be parameters of the general PLOT command (as in task
DR). The projection and scaling must be defined in advance (commands PROJ, SIZE).
option:
L: plot the limits only, LS=plot the limits so that left, right, bottom, top separated
HF: Plot elements using hidden lines effect and same fill colour.
I: plot block names May be ombined with other option, e.g. EI.
C: plot the original limit curves, intended as support for finding errors.
G: plot the sections used for generating internal points, intended as support for finding errors
F: (combined with other option, e.g. EF): fill each block with a different colour. For points, sets
the line colour.
S: plot all simple (non-combined) blocks S and A may be combined with other options, e.g. LS.
N: plot panel normal vectors. Vector arrow is scaled according to current text height (TH
command).
These are commands from the general drawing task made directly available. For the others,
use command DR.
RENAME name
The command assigns a new name ot a block and corrects all references to it.
If the definitions already exist in the data base, use REPLACE or add option !. To change the
name, command RENAME must first be used.
SAVE !
!: (opt) save without attempting an update. Default: save the model with all points calculated. The
option allows saving even if there is an error that prevents the update.
This is otherwise the standard SIZE command, except for the following forms:
SIZE *
SIZE block
UNSAVE name
This command starts the generation of points according to the block definition. This is normally
done automatically when doing an output function (presently SAVE or PLOT). but not when
using the service function GM.PANEL.
opt: options:
F: force: update even if the block is already calculated. Needed if changes have been made to
the geometry since the model was last read or updated. Default if 'name' given.
S: shortcut: when 'name' given, assume that possible referenced blocks are up to date.
Otherwise, all referenced blocks are updated if needed.
When solving the flow field in RAPID using nonlinear free surface boundary condition, the panels close to the calm water line are adapted to the
wavy waterline. This adaptation causes the requirement that the panel sets close to the calm water line should continue all the way to the upper
boundary. Actually, it is a good manner to combine the blocks vertically from a position close to the base line all the way up to the upper boundary
(z-maximum).
In case of a transom stern ship, where the transom is expected to keep dry at the considered ship speed, there should be no panels on the
transom.
The following figures show different views of the panelisation of the DTMB-5415 naval combatant.
NEW RAPID1
HULL HULL
BLOCK BAL2,
LEFT: X=1.2622 8 RIGHT: X=14.3 */2,
BOTTOM: SKL 10/0.4 TOP: Z=2.48
BLOCK SKEG,
LEFT: X=1.2622 3 RIGHT: X=14.3,
BOTTOM: STERN TOP: L-BAL2
BLOCK BAL1,
LEFT: TRANS */1 RIGHT: L-SKEGBAL2,
BOTTOM: STERN 3 TOP: Z=2.48
BLOCK BAFB,
LEFT: L-SKEG RIGHT: FRA,
BOTTOM: STERN 6 TOP: FBA
BLOCK BAL3,
LEFT: L-BAL2 RIGHT: FRA,
BOTTOM: L-BAFB TOP: Z=2.48
BLOCK BAU1,
LEFT: TRANS 5 RIGHT: FRA,
BOTTOM: L-CBATOT TOP: DECKA
BLOCK BFBF,
LEFT: L-BAFB RIGHT: BLBTE2,
BOTTOM: STEM 15/2 TOP: WLFD2
BLOCK BFD2,
LEFT: L-BFD1 RIGHT: TFBLB2,
BOTTOM: WLFD1 6 TOP: TFBLB1
BLOCK BFD3,
LEFT: P1WLFD1 RIGHT: TFBLB2 4,
BOTTOM: STEM TOP: L-BFD2
BLOCK BFD4,
LEFT: L-BFD3 RIGHT: P2STEM,
BOTTOM: STEM 4 TOP: WLFD1
BLOCK BFD5,
LEFT: L-BFD2 RIGHT: STEM,
BOTTOM: L-BFD4 TOP: TFBLB1
BLOCK BFL1,
LEFT: L-BAL3 RIGHT: X=50.5648,
BOTTOM: L-BFBF TOP: Z=2.48
BLOCK BFL2,
LEFT: L-BFL1 RIGHT: STEM,
BOTTOM: L-CBFD TOP: Z=2.48
Output of the panels to a separate text file in the RAPID format is done with the ADDNPN.MARIN macro, which is run in the NPN task with the
command:
The last figures 12 and 0 are the draught and trim. Explanatory text of the macro is shown with the command:
!ADD .MARIN ?
!ADD .CAT
They are also mainly for output of panel models in specific formats.
This function was originally introduced for generating input for numeric hydrodynamics with the Shipflow system. It has later been generalized for
other, similar purposes. The original task name SFL is still available. The Shipflow format is presently the only built-in output format, other formats
can be created with macros.
A revised version exist as the subtask NPN - new panel generation. Its main difference is in a more general method for selecting points.
Table of Contents:
1. Geometric principles
2. Installation
3. Definition commands
4. Examples
5. Auxiliary functions
6. NAPA surface from panel geometry
7. Output functions
7.1. Output for Shipflow
7.2. Output for DAWSON and RAPID systems
8. Fetching panel data in a macro
8.1. FORMAT S
8.2. FORMAT P
8.3. FORMAT E
9. Output sample for Shipflow
10. Commands in task PANEL
1. Geometric principles
The panels are generated from a surface that represents the hull form, normally an ordinary patch surface. The surface can also be defined as a
room, in which case sections are modified as shown below in order to extract the actual hull surface:
The panels are created as groups formed by a matrix of n*m points with columns at fixed x-, y- or z-coordinates. In the other directions points are
selected so that the curve length along the section is divided into segments of equal length. The following figure illustrates a set of points
consistent with the definition of a group:
In the primary direction a group is delimited by fixed coordinates. In the secondary direction, the border of the surface, a fixed coordinate on the
corresponding axis or a curve in the surface can serve as limits. Thus, the limits in the secondary direction can be curved. A group may contain
internal limits in the secondary direction, dividing it into parts each with its own fixed spacing.
The division into groups is dictated by the need to control the spacing between the points and to take into account special features such as
sections formed by several branches. Inside a group, the sections must be formed by a single branch.
A fixed z-limit between the branches will split an initially multibranched section into parts with single branches. Limits given as curves do not have
this effect.
The following principle works when the group directions are x and z: When a limit is expressed by a curve, an attempt is made to find the
intersection between the curve and the current section. If a point is not obtained and the curve is defined with y=0, the height of the curve at the
given x is fetched and the section is intersected at that height. Thus, the curve may give the height only - it need not be in the surface. However, if
the surface is not single valued with respect to x and z, a curve in the surface is the only way to designate the limit. Note: failure to find an
intersection may be caused by a too large polygonization tolerance (use command !TOL).
The sections are used in the order defined. Inside the sections, the order in which points are output depends on the inside/outside of the surface.
The directions are selected so that for a surface with the orientation of a conventional hull (+y recorded as outside), the points go in the direction
of the positive secondary axis (+z in the example above). The limits of a group must be defined in this order. There is an option T (turn) by which
the direction can be reversed.
If needed a tolerance can be added at the end frames, making the section at a different place than the nominal x.
2. Installation
The panel generation function is available as a subtask entered by command PANEL in the DEF task. The definitions are handled as named
objects that can be stored in the data base, where the prefix PANEL* is added to the given name. The standard commands NEW, GET, SAVE,
REPLACE, RENAME, CATALOG and WHERE are used for the administrative functions. As presented in the introduction, the command SFL is
available as an alternative, implying that the prefix is SFL*. A descriptive text, visible in the catalog, can be added with command TEXT.
Under this subtask there are commands by which the definition can be entered, modified and displayed (commands HULL, DEF, ADD, DES and
EDIT). Graphic checks can be done with command PLOT and the associated control commands. Command OUTPUT does output to the Shipflow
system. Output for other purpose have to be created with macros, for which instructions are given below.
3. Definition commands
The basic definition command is ADD, by which a group is added. In order to make the presentation more concrete, it is made for the case that
the primary axis=x and secondary axis=z (the most common case). Other combinations work analogically.
In its most basic form, the command has the following parameters:
for example
The symbols X and Z define the primary and secondary directions. x-sections are made from x=x1 to x=x2, so that the interval is divided into nx
parts. The number of sections is consequently nx+1. Similarly, along the x-sections there will be nz+1 points at equal spacing when measured
along the curve. If no intersection is obtained with a z-limit, the corresponding end point is taken.
The group limits can be tied the geometry of the hull by using point objects or curves instead of coordinates, for example
Point objects always represent a fixed coordinate. In the primary direction, a curve represents the relevant coordinate of its start point, in the
secondary direction, the actual curve geometry is used.
In the secondary direction, internal limits can be used dividing the section into parts each having its own fixed spacing:
In the following example, a rising knuckle has been added as an inner limit:
A non-uniform spacing in the x-direction can be given by directly giving the coordinates. This case is signalled by adding a colon to the symbol X,
for example
ADD X: 12 13 14 16 20 25 Z ....
All standard forms of entering values, including a series or frame numbers can be used (see !EXPL VALUES/GEN). Note that this case breaks the
symmetry between X and Z - there is no corresponding possibility for Z.
x/tol
The tolerance will be added when making the section, but 'x' is recorded in the output.
hull: name of surface, default=the one given as the HULL argument or if none, the name given as parameter MOUL (moulded hull) in the
reference system. This option is provided in case one must use different surfaces for different groups, for example, in order to handle a
catamaran.
T (turn): generate points in the reverse direction with respect to the default (see above).
(id): identification
Note this restriction: the command can be at most one line long.
The DEF command is otherwise identical with the ADD command, but the index of the group is given as the first parameter:
DEF i ...
This command allows a group to be modified rather than added. The output of the DES command is by default done as DEF commands.
4. Examples
The following example is a simple application of the basic elements:
ADD X 77 7 95 Z -1 8 KNF 4 11
The interval between x=77 and x=95 is divided into 7 parts. Along the frames, the part from the start to the curve KNF is divided into 8 parts of
equal curve length, while the part for KNF to Z=11 is divided into 4 parts. The following figure shows the result:
The following figure (from NAPASTAR) illustrates the use of other directions than x and z:
The following example illustrates the use of general coordinates for the sections:
5. Auxiliary functions
The DES command displays the definition of the current set or a given part. Without parameters, the whole set is printed in the form of DEF
commands (i.e. with the group index). The alternatives are
DES i
DES A
The EDIT command works as DES, except that if no parameters are given, the editor is simply entered. The command EDIT A gives a text that
begins with the EMPTY command, so that when the work area is added, its contents define the groups completely.
For graphic checks, the PLOT command is provided. By default, the result is a set of points represented as crosses, the size of which can be
controlled with the TH command. Without parameters, all points are drawn. PLOT i; plots the i:th group only, and PLOT L plots limits. Any form of
the PLOT command not recognized by this function is handled as the general PLOT command. The crosses resulting from PLOT obey !VIEW 3d.
Alternatively, the geometry generated can be shown as elements, i.e. surface elements formed by four points. This alternative is selected with
option E. If filling is on (command FILL), the elements are sorted so the nearest ones are drawn last in order to create a hidden lines effect. The
example of the preceding paragraph was plotted with the E option.
For controlling the plotting, the PROJECTION, SIZE, COLOUR and other commands are available.
For use by the general identification function, the graphic output from the panel task is marked as follows:
The identification function is new in rel. 97.1 and presently available as the function GR.IDENTIFY. The result can be used by GR.HIGHLIGHT.
where
This surface can be used in any function useful for surfaces. The following example shows sections, compared with those of the original surface.
The surface is stored in format that is new in release 96.1 (compressed facet surface).
7. Output functions
This paragraph presents the service available for outputting panel data to specific systems. Presently, the only built-in format is for the Shipflow
system, while macros are provided for DAWSON and RAPID systems.
Output for other purposes have to be created with macros, for which instructions are given below.
Command OUTPUT generates an ASCII file representing the current set of panels in a format designed for Shipflow:
OUTPUT dir>file
The output is done to the given file. For special cases, the output can be done without specifying a file. The output will then be done as normal
alphanumeric output with listclass=3, for which control can be given by using the !LINK 3 ... command.
The coordinates in the output obey the format for quantities X, Y and Z. (Use command !FORM X etc.).
A macro is provided in the NAPADB for generating data for the DAWSON and RAPID systems. The macro is named ADDPANEL.MARIN and can
be run by
!ADD .MARIN
Instructions for using the macro are obtained by !ADD .MARIN ?. The design of a suitable panel structure is left to the experts of the systems in
question.
Three formats are provided, that can be selected with command FORMAT.
8.1. FORMAT S
First, the default format is presented (FORMAT S). There, each section is stored separately in three records numbered 1001, 1002 and 1003,
containing the x, y and z coordinates respectively. The record representing the intersection direction contains only one value, the fixed
intersection coordinate. The sections of a given group are collected together and the set of sections is preceded by a flag record i, where i=the
group index.
number of sections
number of points in the sections
not used (assigned 0)
primary direction (1=x, 2=y or 3=z)
secondary direction
The following commands fetch the j:th section of the i:th group of the definition named TEST (directions x and z assumed):
@D=DB('SFL*TEST')
@FLAG=REC(D,I)
@NX=FLAG(1)
@NZ=FLAG(2)
@XR=REC(FLAG,'X',J) (j:th X-record after the flag)
@YR=REC(XR,'Y') (first Y-record after the x-record)
@ZR=REC(XR,'Z')
(REC(XR,'Y') is the same as REC(XR,1002), see !FORM Y). If the commands are run in the PANEL task, the reference number of the current
panel definition is available in the variable SOURCE. Using this, one can begin with
@FLAG=REC(SOURCE,I)
8.2. FORMAT P
The format P (point set) differs from format S in that the section structure is not explicit, but all points of a group are collected into a single set of
records 1001,1002,1003.
The order of the points within the point list follows the pattern
p11,p12,p13,...
p21,p22,p23,...
...
pn1,pn2,...
where the first index belongs to the first one of the x, y or z axes and the second index to the latter one. For example, if the axes are x and z, the
first index belongs to x and the second to z. Note that this is independent of their roles as primary and secondary directions.
The points on a given axis follow the order given in the definitions. If the task is entered as SFL, there is an exception in that x sections are output
in the order of decreasing x.
8.3. FORMAT E
The format E, elements, differs from P in that the panels, i.e. surface elements formed by sets of four neighbouring points are explicitly recorded.
The points are recorded as in format P, and the elements by records 100, each defining one element. The contents of a record 100 is formed by
four integers, representing the corner points, expressed by their index in the point list. Before the elements, the flag record 99999 is stored.
@XREC=REC(SOURCE,'X')
@YREC=REC(SOURCE,'Y')
@ZREC=REC(SOURCE,'Z')
@FLAG=REC(SOURCE,999999)
@EREC=REC(FLAG,100,I)
@FOR P=1,4
@X=XREC(EREC(P))
@Y=YREC(EREC(P))
@Z=ZREC(EREC(P))
!TYPE @X @Y @Z
@NEXT
The order in which points are output depends on the directions in which coordinates are defined for the primary and secondary axes.
PART1
PART2
PART3
PART4
A panel is defined in a region delimited by constant coordinate on one axis and by coordinate
limits or curves on another. Points are generated from sections with coordinate planes on the
first axis. NOTE!: the definition must fit into one line. If this is not possible, the panel must be
entered as several ADD commands. Use the DEF command for changing an already existing
panel.
ADD hull (id) T axis1 pl1 ni pl2 axis2 lim1 n1 lim2 n2 ... limn
hull: (opt) name of hull, allows the given panel to be formed from a different surface than the general
one
(id): (opt) identification of the panel, default=PANEL. It is also used as the second level label when
plotting (see !EXPL GR.IDENTIFY).
pl1,pl2: limits on the section axis, given by coordinate values, by a point object or by a curve. The
intermediate coordinates are selected with a constant spacing.
ni: number of intervals between pl1 and pl2. The resulting number of sections is nx+1. Max. 100.
lim1,lim2...: limits on axis2, by either given coordinates, point objects or curves. NOTE: in the case of a
curve, its actual geometry is used, while on axis1, only the coordinate of its startpoint is used.
n1,n2...: the number of intervals between the limits on axis2. The intermediate points are selected in
order to give a constant spacing measured along the section curve.
EXAMPLES
ADD X 10.5 9 FRA Z -1 10 KN1
Generate a panel between x=10.5 and the frame FRA, dividing the interval into 9 parts. In the
z-direction, 10 intervals are taken from the start to KN1.
Generate a panel by 9 waterlines from z=6 to DECKA, with 7 intervals from the start to the
curve TRANSOM and a constant spacing along the curve,
Otherwise as above, but the end sections are made at the given distance from the nominal
place.
ADD hull (id) T axis1: coordinates axis2 lim1 n1 lim2 n2 ... limn
Differs from the preceding form in that the coordinates for the sections are given with the
general syntax for a set of values, see !EXPL VALUES/GEN. Note the colon at axis1.
EXAMPLES
ADD X: 10 12 14 17 20 Z -1 6 20
ADD X: (#10 #30 2) Z -1 6 20
Old syntax with axis1=X and axis2=Z. The components are otherwise the same as in the
syntax above, but the x-limits must be numeric.
EXAMPLES
ADD 20 3 40 * -1 10 100
Forms a panel from the whole height between x=20 and 40. There point matrix will have size
4x11.
The panel is formed by two parts, one from below to the curve DWL, and the other from DWL
to KNF.
A panel named PANEL2 is made between 92 and 96. The section for x=92 is made at 92.01.
This command stores the panel geometry in the same description that contains the definitions
(PANEL*id or SFL*id). See command FORMAT for format options. When changing definitions
by DEF or ADD, the geometry is removed from the description. NOTE: there is no automatic
updating to take into account effects of changed geometry: at need, the CALC command must
be repeated. It is recommended to include it in a macro using the results.
This command is otherwise equivalent with the ADD command, but by giving an index, the
definition of an already existing panel can be modified.
DEF i ...
DELETE i
This command prints the current panel definitions in the input format.
DES selection
selection: (opt) selects part and form. Default=the whole set in the form of DEF commands.
Without parameters, the commands simply enters the text editor. With the parameters allowed
for DES, the result of the DES function is stored in the editor work area.
This option is provided for cases when there is no ready output format programmed, but the
result description is used with calculator functions. This option selects between different
formats as presented below. See also command CALC.
FORMAT alt
S: (standard) each panel is represented by a flag record 1,2... followed by sets of records
1001,1002,1003, one for each section in the panel.
P: (point set) each panel is represented by a flag record 1,2... and a single set or records
1001,1002,1003, containing the points of the panel.
E: (elements) all points in the total set of panels are collected into a set or records
1001,1002,1003. For each element, a record 100 is stored, containing the corner points as
indices in the point set.
This command generates a surface from the panels. The surface is stored as a compressed
facet surface (new type introduced in 96.1), having a format that corresponds to FORMAT E.
part: (opt) use only the given part, default=all. 'part' is the index used in the DEF command.
GET name/vers/prof
name: name of set. The complete data base name is formed by SFL*name or PANEL*name,
depending on what command the task was entered with.
/vers: (opt) version. NOTE: the version is taken into account when reading only.
This command defines the name of the hull used for generating link data. Default=moulded hull
according to the reference system. The hull can be represented as a room, in which case
sections are modified by removing the parts with y<0 and the uppermost part.
HULL name
NEW name
This command adds descriptive text. For more information, see !EXPL NOTES/GEN.
The points in the current set are output to a given file or to a the destination which can be
controlled by command !LINK 3 ..., for example, !LINK 3 S; outputs the result on the screen.
OUTPUT dir>file
This command plots the points or the limit curves involved. Parameters not recognized by the
current subtask will be assumed to be parameters of the general PLOT command. The
projection and scaling must be defined in advance (commands PROJ, SIZE).
PLOT sel
sel: selection of output, default=all points. NOTE: use option E too see the actual geometry implied.
i: index of panel
E: plot elements, not points. If filling is on, the plotting order is selected to give a hidden lines
effect.
These are commands from the general drawing task made directly available. For the others,
use command DR.
RENAME name
If the definitions already exist in the data base, use REPLACE or add option !. To change the
name, command RENAME must first be used.
Table of Contents:
1. Selection of objects
2. Listing and editing object definitions
3. Listing curve data
4. Listing information about a patch surface
5. Listing information about objects (INFO)
6. Catalogs
7. Change of generated curves
8. Lofting tables (old version)
8.1. Commands of old version
8.2. LIST command
8.2.1. Available quantities
8.2.2. Special cases
8.2.3. Headers
8.2.4. Coordinates from curves
8.2.5. Limiting the surface
8.3. Other commands
9. Deleting objects in the database
10. Copying objects between projects and versions
11. Renaming objects
12. Automatic drawing
13. Temporary definitions
14. Sharing objects between versions
15. Converting to the new format
16. Frames, webs and longitudinals
17. Locking of objects against changes
18. Command GENERATE
1. Selection of objects
The following syntaxes can be used for designating objects in a number of commands. In the descriptions of the functions, the notation 'objects'
stands for one of the following alternatives:
(ident,i1,i2,di) This specifies a series of objects with names containing a constant start part 'ident' and an index starting with the value 'i1'
and ending with the last number 'i2'. 'di' gives the step. Example:
CX,1,10,2
*object This stands for the object including directly referenced objects, for example, a combined surface and the partial surfaces.
**object This stands for the object including referenced objects, down to a level dependent on the context. For a general surface, it
means all referenced curves, including all directly or indirectly referenced ones. For rooms, it means all rooms and surfaces
involved, but not curves.
****object This stands for the object including all referenced objects.
DESCRIPTION, objects
producing the data by which the objects are defined. The function is valid for all types of objects created by the definition program.
DESCRIPTION, **HULL
This gives the entire definition of the hull surface with the curves in the correct order.
The command EDIT is otherwise equivalent, but the result is stored in the editor work area, and it can be modified with any of the editor
commands. It can also be stored in the database.
Outside the geometry task, the DES function is available in the form !GM DES object. Only a single object can be given in this case.
The old version, which is presently the default, is otherwise similar with the new one, but the contents and layout are fixed. An exception is formed
by the option T, by which angles calculated from a tangent function can be added. The new version is obtained by adding option N. It uses the
general table output function, so that the contents are controlled with LQ CUR and the layout with TOO CUR, where CUR is the subject identifier
for this list.
the coordinates, If the curve is a principal plane curve, the constant coordinate is printed only once.
X, Y or Z
inclination of the TP is the inclination in the projection plane, TL in the location surface. The quantity ANG is the inclination in a projection,
curve, TP, TL or selected by adding a qualifier in the LQ command, e.g. LQ CUR ... ANG/X for angle in x-projection. If the point is a
ANG knuckle, two lines are printed for the point.
angle condition The angle condition is printed in the same form as used in the curve definition. An angle condition in parentheses stands
SC for an angle condition not written in the definition, but equivalent with the side condition obtained from a referenced curve.
referenced This quantity is the name of a referenced curve, if any, otherwise empty. If the reference includes qualifiers, these are
curve REFC shown also. The curve name is given in parentheses if the point is obtained as an additional intersection point, in contrast
to a point obtained by a repeated curve reference.
inclination of the These quantities give the inclination of x-, y- or z-section of the surface, as provided by a tangent function defined for the
surface TSX, curve.
TSY and TSZ
By default, only definition points are listed, but with option P in the LIST command, all polygon points are included.
In the LQ and TOO commands, remember the subject identifier CUR, for example:
LQ CUR ALT
TOO CUR HD=(S,UL)
(If the subject is omitted, the LQ and TOO concern the INFO command).
The format of the numbers (field, unit, number of decimals) can be modified with the !FORMAT command.
Table output options cannot be given in the LIST command, only with the TOO command (TOO CUR ...).
The following output sample shows the same curve in the old and new listing formats:
LIST FRA
NR X Y Z TP SC REFC
------------------------------------------------------------------
1 22.00 0.000 0.000 0.0
2 4.700 0.000 0.0 -/ PFRA1
3 6.500 1.800 90.0 / PFRA2
4 6.500 10.000 90.0
The 'surface' must be a non-combined patch surface. As a default all node points of the surface are listed. Subset of these points can optionally
be selected so that they are on the given curves (syntax: NLIST surface curve1 ... curveN). If the selection contains digitized points, information
about these only is listed (syntax: NLIST surface (u1,v1) ... (uN,vN)). A selection based on the patch numbers is also possible (syntax: NLIST p1
... pN) The patch numbers can be seen by plotting with ID PN.
As a default, the size of the tables is equal to the number of the distinct points within the selection. If there are more than one value of a quantity
required at a point, either a qualifier connected with the quantity must be used, or the option SEP used with the command NLIST. The option SEP
means that the points are stored separately, and the defaulted qualifier of the quantity is adequate.
QUANTITY EXPLANATION
X 1001 x-coordinate
Y 1002 y-coordinate
Z 1003 z-coordinate
With the quantities ANG and CRVN the following qualifier can be used to define the branch of curve and the projection where the quantity is
calculated:
pij inclination of the branch j (1=before, 2=after the point) of the i'th intersecting curve in the projection p (p: X,Y,Z or P=projection plane of
the curve).
Contents of the records C1 and C2 can be controlled by the qualifier Si, where i is the number of the curve intersecting at the point (default=1 for
C1 and 2 for C2).
With the quantities TSX, TSY, TSZ, CSX, CSY, CSZ, CRVS, CRVL, CRVM, CRVG, PN, PU and PV,
C1 C2 X Y Z
m m m
-------------------------------------------------
FRA CLM 22.00 0.000 0.000
FRA FBM 22.00 4.700 0.000
FRA FSM 22.00 6.500 1.800
FRA DECKM 22.00 6.500 7.200
FRF CLM 62.00 0.000 0.000
FRF FBM 62.00 4.700 0.000
FRF FSM 62.00 6.500 1.800
FRF DECKM 62.00 6.500 7.200
Information about objects concerned by the object administration, surfaces, rooms and surface objects, is obtained with command INFO. This
function is based on the general table output routine, obeying the command LQ for selecting quantities to be output and TOO for controlling the
way of outputting. For a list of alternatives, use LQ ALT. The subject identifier is GM, but it need not be mentioned, since this is the default
subject.
The object(s) can be given by naming them in the command, or by a selection criterion, of which ALL is a special case. A preceding asterisk has
the usual functions of designating the parts also. A selection criterion operates on the objects presently in memory. If there is an object selected
for intersecting (command SECT) it is used as default.
The following standard selections are delivered with the system, selected so that the result fits into one line on the screen:
STD: type,date,x-limits,volume ao
The following samples show the (slightly truncated) output from INFO, using the various standard quantity selections:
lq std:
NAME GSTYPE DATE TIME XMIN XMAX REFQ ORNT SS
------------------------------------------------------------------
HULL COMB 89-09-14 8.16 -5.00 108.00 - Y *
lq ec:
NAME GTYPE XMIN XMAX YMIN YMAX ZMIN ZMAX
-----------------------------------------------------------------
HULL SURFACE -5.00 108.00 0.00 10.00 0.00 12.00
lq adm
NAME GTYPE GSTYPE DATE TIME SDATE STIME SS XMIN
XMAX
----------------------------------------------------------------------
HULL SURFACE COMB 89-09-14 8.16 89-09-14 8.16 * -5.00 108.0
lq vol:
NAME XMIN XMAX ZMIN ZMAX VOLM CGX CGY CGZ
SS
---------------------------------------------------------------------
HULL -5.00 108.00 0.00 12.00 20181.7 49.42 0.00 6.72
*
LQ area:
NAME XMIN XMAX REFQ ORNT AREA CGXA CGYA CGZA
----------------------------------------------------------------------
TTOP -10.00 111.00 - Z 2747.7 51.06 0.00 2.15
Note specially the quantity SS ('section status'). '*' means that calculation sections are available and up to date, 'x' means that they are not up to
date, while empty means that no sections exist. For surface objects, SS provides the corresponding information about the generated geometric
form.
INFO *HULL
The INFO command is primarily intended for assisting working with definitions and similar, and not producing results in the normal sense.
Therefore, generation of calculation sections or updating the shape of surface objects are automatically started only when the selected set of
quantities contains volume or area oriented quantities, and the objects are named in the command.
For listing data about objects not in memory, see option LOAD in the CATALOG command.
Outside the geometry task, the INFO service is available in the form !GM INFO and !GM LQ.
6. Catalogs
Listing catalogs of objects in the database is done with command CATALOG. The effect can be restricted by a selection criterion involving type,
name and date or any other criterion possible in the general CATALOG command.
The list produced contains name, type, date and descriptive text. In order to list more information, option LOAD causes the objects to be read into
the run time memory, from which more complete listings can be done with INFO. The LOAD option is not available for curves and point objects.
This function is handled with the DES or EDIT commands. The equivalent definition is generated automatically if there is no other way of creating
the result, and with option ! it can be applied on any curve. Note specially the result of a GENERATE command, for which DES normally gives the
original definition (with GENERATE), but with option !, it is presented as a direct curve definition beginning with CURVE. The following options can
be used for controlling the result:
!: generate the curve definition regardless of possible other ways producing the result. This option must be the last one.
BRC=brc: number of branch to be converted. As the default, all branches of the curve are handled. If the curve has many branches, the
suffix '_i', where i is the number of the branch, is added to the name of the generated curve.
AC=END: add angle conditions to endpoints. In the default case this is only done when special angles are detected.
KTOL=val: tolerance for knuckle detection. When the direction of curve before and after a point differs more than 'val', the point is
considered a knuckle (not only result of polygonization).
The conversion is started by searching the special points of the generated curve. The special points are end points, discontinuities in direction and
curvature, and inflection points. All of these are used as definition points with possible angle conditions. After this additional points are added
according to the tolerance.
Note that the result is the displayed definition only, and the original curve is not affected. Only when running the definition (with or without change
of name), a new curve is created.
Lofting tables, containing coordinates of selected points on surfaces or curves, can be produced under task OLOFT.
Commands TABLE, YTABLE and ZTABLE belong to an older version of the OLOFT task, which can still be used, although the newer LIST
command offers more possibilities.
Command TABLE lists coordinates of curves, while commands YTABLE and ZTABLE list y- and z-coordinates of a surface. Commands UNIT,
FORM, PAGE and DEC control the formatting in these functions.
The LIST command is based on the general table output function, and the result can be controlled with commands LQ and TOO.
A lofting table from a surface requires two arguments. If only two arguments out of X, Y and Z have been given, these two are used, otherwise the
first parameter of the LIST command tells the argument combination. It is formed by combining the symbol of the first argument with that of the
second one. The most common type of lofting table uses the arguments X and Z, so that the LIST command is in this case
LIST XZ ...
The surface from which the lofting table is made is given by command HULL, default=moulded hull from the reference system. The values are
found from sections according to the first argument. The remaining parameters of the LIST command are table output options.
X: x-coordinate
Y: y-coordinate
Z: z-coordinate
The inclination is calculated from the polygon representation, and may be inaccurate.
A quantity without the qualifier presented below will be repeated in the table as many times as there are values of the second argument (as
columns if the format is horizontal, rows if the format is horizontal).
For handling special cases such as printing all values of multiple points, the table can be controlled column by column, using the following
qualifiers in the LQ command:
A numeric qualifier designates a single value of the second argument, by giving its index in the argument list, for example:
LQ X Y/1 Y/2
If there are several points corresponding to a given argument pair, the first one (counted from the start of the curve) is selected. With the string
qualifiers S and T, the second and third point respectively can be selected, for example
gives three columns, each corresponding to the first z-argument but giving the first, second and third points. Missing points are marked with minus
sign in the output.
Multiple points are not handled in the case that the section consists of many curve branches and the points occur on different branches.
8.2.3. Headers
The long and short headers (LH and SH in the table output options) are not supposed to be useful in their normal functions. Instead, they are
used for showing the value of the second argument. The long header shows the value preceded by a symbol for the coordinate, while the SH
gives the value alone, formatted as specified for the given quantity.
Values for given curves can be listed by giving the curve name as qualifier in the LQ. The coordinates of the curve are fetched according to the
first argument. Listing of angles is not available in this case.
Example:
LQ X Y Y/DECK Z/DECK
With LIST XZ, this gives a table containing halfbreadths for the hull for all x- and z-values, and y and z for all x-values for curve DECK.
Another possibility to avoid undesired points is to cut parts of the surface away with coordinate limits:
All limits must by given, but irrelevant limits can be replaced by minus signs. If the hull is defined as a room, points with negative y-coordinates
can be excluded with the following command:
LIMITS - - 0 - - -
The standard output commands NL (new list), TYPE (add arbitrary text), NP (new page), FIG (add figure) are available. Figures can be made by
entering the general drawing function with command DR.
UNSAVE, objects
where 'objects' is the syntax presented above for referring to single objects or objects including referenced ones.
'objects' is the general syntax for designating sets of objects, for example **HULL for the surface HULL and all objects it depends on.
'version' designates the source version. If /project is not given, it means a version in the current project, else in the given one.
The options concern the action when an object with the same name already exists in the current version. The default is not to copy if an object
already exists. With option !, the restriction is lifted as far as to allow overwriting an object of the same type. With option !!, all restrictions are
lifted.
If the transfer involves an object violating the restrictions, the default is to ask for advice what to do. The following answers can then be given:
With option NQ (no query), the transfer restrictions are obeyed without questions. NQ is default if the COPY command is given in a macro.
For general surfaces, the preparation result is also copied. The surface is therefore useful even if the curves have not been copied, but it cannot
be modified. Plotting must be done with PLOT, not GRID.
Arrangements (ARR*, STR*) can be used, but then, only the objects are fetched, not the tables, which have to be copied in SM.
Examples:
Fetch HULL and all its parts (also the curves) from version A in project P1234. Allow overwriting unless the existing object is of different type.
Copy all rooms from ARR*A in version B, as far as not already existing.
Copy the rooms of arrangement A in version B, including all geometry they depend on. Disregard any existing objects. The arrangement itself
must be fetched under SM (GET A/B).
There is an (older) short form of the COPY command, copying within the current version:
The effect is the same as for COPY, except that the object with name 'oldname' is removed. This operation does not affect any references to the
object.
The command RENAME GLOBAL; starts a renaming process in which not only the name of objects are changed, but references to them are also
corrected. Since this requires that all objects in the current version are checked, all changes needed should preferably be done at the same time.
The names to be changed are entered in the form
old-name new-name
and it is recommended that this list is prepared in advance as a macro (one renaming on each line). After entering the RENAME GLOBAL
command, the name changes are inquired, and a verification whether it is ok to do the changes is asked for. This function is intended to support
the maintenance of systematic naming conventions.
This function should be used with caution: for lack of interest in it, its maintenance has not been active. It is recommended that a valid back-up
copy of the database is available before doing the global renaming.
In order use automatic drawing of changed surfaces, rooms and surface objects, there must be a SETUP specified, telling how to draw. In this
case, drawing is done only when a definition is finished explicitly with OK. This way, it is avoided that the fairly large process involved in updating
dependent objects is not started until a set of related updates is finished. Command DRW UPD can also be used.
This facility is intended to allow experimenting in order to find out the effect of various changes, without disturbing the database. Presently, this
facility is implemented on pilot level only.
SURFACE HULL
FROM A
SURFACE HULL-A
FROM A HULL
If the object is a room or surface object the definition is analogical. This function is implemented on pilot level only.
The definition thus shared is only the one directly behind the given name. In the example above, 'HULL' may be defined as 'COMBINE
HULLA HULLF', and to get the desired result, HULLA and HULLF must also be shared.
If one should want to convert geometry from the old to the new format, this can be done with command CNV. If all objects are converted, the
version as a whole is registered as belonging to level D.
On pilot level, a possibility to define a shape for the corresponding structures is implemented. The possibilities are limited to giving a breadth and
planes delimiting the structures at the ends. The corresponding objects are available as surface objects designated by names of the form
FRAMEn, WEBn and LONGn.
All definitions related to frames webs and longitudinals are made under the reference system (task REF).
Locking is done with command LOCK under task DEF. Without parameters, the LOCK command gives a list of currently locked objects.
The locking function is otherwise simple and straightforward, except for the problems caused by objects being dependent on others. It is essential
to distinguish between self-contained objects and non-self-contained ones. If a self-contained object is locked, such as a curve or a non-combined
surface, locking the object alone will fix the shape. Locking a room or a combined surface locks only the definition as such, but allows changes
caused by changes in referenced objects. For a discussion of dependencies between objects, see chapter 'General about geometric objects'.
Even a self-contained object may be dependent on other objects, and although changes in the other objects are not reflected in the locked object,
it may be desirable to have these locked also.
The syntaxes presented under 'Selection of objects' can be used in the LOCK command. Therefore, the scope of the locking can easily be
extended to referenced objects. For example
LOCK HULLF
locks only the surface HULLF. This allows the curves in the surface to be changed, but the effect cannot be transferred to the surface.
LOCK **HULLF
For the special case of locking part of a general surface, see the paragraph about defining partial surfaces.
The command can also be used for starting the generation of calculation sections:
The calculations will be generated automatically when needed, but with the GENERATE command, the update to be done differently than would
be done in the automatic update.
The R option marks existing sections as still useful. This option can be used for saving time when the effect of changes in the hull or other
surfaces are considered insignificant, or accurate volume oriented quantities are not needed for current purposes. This option does not affect
rooms directly redefined.
The B option means that sections are recalculated at existing x-locations. This option saves about half the time, by omitting the process of finding
out the required spacing and location of calculation sections. With modern computers, this option can be considered obsolete.
With option F (force), the calculation sections can be recalculated, if the need to do so is created by some circumstance not covered by the object
administration, e.g. change in the frame system.
If there is an arrangement defined, all rooms in it can be updated by using the arrangement in the GENERATE command. For example
The same function, but with graphic output added is available as PLOT CSE.
Vocabulary (GM)
This section gives a summary of some of the concepts used in this document.
Combined A combined room is a room defined as a combination of independently defined parts. Sections of the combined room are
room formed by the contours obtained from the parts intersected separately. Translations may be defined for the parts.
Combined A combined surface is analogous with a combined room, except that the contours obtained when intersecting the parts are
surface connected, if there are coinciding start and end points.
Elementary A room defined by single set of surfaces, as opposed to rooms defined by more complex operations (reflecting or
room combination of parts).
Cylinder A surface formed when a straight moves along a curve, alternatively, the surface formed when a curve is moved along a
straight.
Editing (of Changing an object by modification commands rather than feeding a changed definition.
surface or
curve)
Connection A surface formed when the points on two curves are connected pairwise.
surface
External A description of an object in alphanumeric form. This description serves as input to the definition module for creating the
representation internal representation.
Facet surface Surface formed by or treated as a set of plane faces. All surfaces except general ones are handled this way.
Free angle A free angle means an instruction concerning the inclination of a curve at a given side of a given point, meaning that the
curve shall be defined at this side as if the point were an end point. When used as a side condition, a free angle implies this
type of behavior for curves defined to intersect the curve.
Inside (of a By convention, one side of a surface is called the inside and the other side the outside.
surface)
Internal The representation of a geometric object created by the definition program and used by the other components of the
representation system.
Location Defining the location surface is the first step in a curve definition, and defines an elementary surface in which the curve lies.
surface
Modified object Refers to an object defined by applying a transformation (e.g. reflection, translation) on another one.
Object The part of the geometry system responsible for handling the dependencies between objects at run time and taking into
administration account the effect of changes.
Orientation Tells whether a surface can be considered essentially transversal (orientation=X), longitudinal (Y) or horizontal (Z).
Owner surface The surface which is restricted in order to give the surface object.
(of surface
object)
Plan (As part of an arrangement drawing): drawing showing the section between objects of the ship and a plane or other surface.
May also refer to the result of plan definition (subtask PLD/DRAW).
Preparation (of An operation in which the surface definition of a general surface is created from its components. It must be started (by
a surface) command PREP) each time a new surface is defined or an old one updated.
Projection The plane containing the projection, by which the shape of a curve is defined.
plane (of a
curve)
Projection A plane in the ship coordinate system into which the curves are projected in order to be drawn.
plane (in
drawing)
Reference Coordinate defined for a non-plane surface, providing the nominal plane used in references like #BH1.
coordinate
Restricted A plane defined by the location surface of a closed plane curve, and restricted to the area inside the curve.
plane
Room A volume enclosed by a closed set of surfaces. Instances of rooms are tanks, compartments, appendages. The whole ship
can also be defined as a room.
Run time Means the representation of a room or a surface object created when using an object, where references to other objects
representation are resolved.
Setup A description of the parts forming an arrangement drawing controlling the effect of subsequent DRW commands.
Side condition Information related to a space curve used in a surface definition, telling something about the behavior of the surface in the
neighborhood of the curve.
Special surface A surface with some special geometric property that allows it to be defined and handled in a simpler way than general
surfaces, for example, planes, cylinders.
Spline The mathematical representation of the curves as generated. In the spline mode (GMTP=SPLINE), this representation is
representation maintained in the whole fairing process, else it is directly converted to a polygon representation.
Standard Designates a room that has a box-like shape, where one can identify six sides (aft, fore, port, starboard, lower and upper).
topology
Standard angle Angle measured in the normal plane of a curve, giving the normal to the surface containing the curve.
Tangent A tangent function defines the inclination of the tangent plane at different points on a curve.
function
Transformation May refer to the transformation of the shape done in a surface transformation, or to a transformation regarding location or
orientation, created by a translation, reflection or rotation.
Hydrostatics (HYD)
Hydrostatics (HYD)
Overview of functions (HYD)
Task HYD -basic hydrostatic quantities (HYD)
Task STAB - hydrostatics as function of heeling (HYD)
Task FRA - drawing and listing of frame areas (HYD)
Task BJ - Bonjean curves (HYD)
1. General
2. Tasks
2.1. Task HYD - main hydrostatic functions
2.2. Task STAB - stability elements
2.3. Task FRA - frame areas
2.4. Task BJ - Bon Jean tables and curves
3. Data concepts
3.1. Hull
3.2. Reference system
3.3. Layout control
3.4. Wave
3.4.1. Hydrostatics in oblique waves
3.5. Opening
1. General
The hydrostatic subsystem (HYD) contains output functions by which basic hydrostatic data are presented in graphic or list form. The functions
are normally used for the hull, but other objects can also be used. The results can also be stored in the database for use in other contexts.
The hull (or other object) must be defined in the geometry subsystem (GM).
2. Tasks
This task contains functions based on hydrostatic data of the ship calculated for given floating positions.
The output functions are based on a common result description, which can be stored and used, for example, under the table calculation task. The
output alternatives include
list of hydrostatic data for given heel and trim as functions of draught (LIST HYD). This list is based on the general table output module
(LQ/TOO) With option TABLE, the results are made accessible for use in other applications.
list of hydrostatic data as a function of draught and trim (LIST TRQ).
combined list of the above (LIST COMB).
plot of hydrostatic curves (PLD). The available quantities are the same as those of LIST HYD. PLD obeys PLD and PQ. An older plot
function PLOT is also available.
trim diagram (PLOT TRIM), showing draught and trim as a function of displacement and longitudinal displacement moment. The result is
also available in list form.
loading scale (PLOT LDS) showing hydrostatic quantities in a nomogram form.
In addition, there are output functions for background data regarding reference system, hull object and quantities used.
This task contains functions based on hydrostatic data calculated as a function of the heeling angle when given an initial condition by
displacement and center of gravity or indirectly by draught and trim .
In this task, frame areas are output either in list or plot form. The frame areas can be output as absolute values or as relative values with respect
to the area at the midship. The trim can be given as an argument.
In this task, the sectional area and the area moment about a reference point for specified sections are output as a function of draught, either
graphically or as a list. The sectional area and moment may be calculated for the bare hull or with shell plating included.
3. Data concepts
3.1. Hull
Any geometric object for which the calculation sections are available can be used for representing the floating object treated under hydrostatics.
By default, the object defined as 'hydrostatic hull' in the Reference System is used, except in task STAB, where the 'stability hull' in the Reference
System is used.
The hydrostatic hull is often the bare hull surface, which is combined with its reflected counterpart in order to enclose a volume. An object in the
form of a room is always taken as is.
Appendages, bow thruster tunnels and similar modifications can be done by making a room definition containing added or removed parts, or by
forming a combined object.
With regard to the stability hull, it is usually essential that it is correctly delimited at the deck. When needed this is most easily achieved by making
a room definition where the hull is delimited by separately defined surface representing main deck.
The command INFO (in HYD and STAB tasks) produces information about the current object of calculation.
The following particulars defined in the reference system will be used in the tasks of the Hydrostatics subsystem.
LREF, BREF main dimensions of the ship. CB and other coefficients are calculated according to these
XREF the draught is measured at XREF and the ship is trimmed around this point
MID the midship section area is calculated from a frame section intersected at MID
KEEL thickness of keelplate. The total draught of the ship (TK) will include the thickness defined
SHELL Thickness of shellplating. Used in all hydrostatic quantities unless explicitly excluded.
Note: whether the shell thickness is actually taken into account is dependent on the definition of the hull used: either explicitly in the CSE
command or implicitly because the name of the hull includes the hull label (as defined in the reference system).
The following possibilities can be used for varying the list layouts:
These are options added to the listing command in order to control the layout of a table obtained by using the standard table output routine. For
tasks where it is possible to select the quantities to be listed, a general selection command LQ may be used. At run time, the command !EXPLAIN
LQ/GEN and !EXP TOO/GEN gives the explanations.
Standard layouts are stored in the NAPA data base under the names LQ*HYD*STD, LQ*STAB*STD and LQ*LDS*STD. User defined layouts can
be produced and stored in the system data base using the commands TOO and LQ. Standard layouts are in DB7. These can be by-passed by
saving ones with the appropriate name in either DB1 or DB2.
3.4. Wave
The calculations of stability elements may be performed for a sinusoidal or trochoidal type wave. Wave can be defined with argument WAVE. The
draught value in waves will then correspond to the mean level between the wave hollow and crest.
To calculate hydrostatic quantities in waves, HULL argument has to be defined as a room (i.e. STABHULL), HULL defined by a surface is not
accepted.
The figure below shows how oblique waves are treated in NAPA, the wave is not extending inside the ship and the integration limits for each
X-section are attained from the intersection between the hull and wave surface, which is visualized by the red line in the figure below. The shaded
area of the hull is the one affecting the volume derived quantities. For longitudinal waves the approach is the same, but in that case the wave
heights are equal on both sides of the ship.
3.5. Opening
Openings may be defined and/or used in task STAB in the calculation of the angle of flooding. The openings are shared also by the Stability
Criteria Task (CR) and the Damage Stability Task DA.
The main output is hydrostatic data listed or plotted as a function of draught. Special functions are plotting of trim diagrams and loading scales. In
most functions the trim is fixed, but there is a alternative for listing data as a function of both draught and trim. The heel is always fixed, usually at
zero.
Table of Contents:
1. Overview of quantities
2. Function
3. Arguments
3.1. The hull object
3.2. Draught, trim and heel
3.3. Waterline sections for area related quantities
3.4. Other arguments
3.5. Handling of arguments
3.6. Deflection
4. General output functions
5. Listing functions
5.1. LIST HYD
5.2. LIST TRQ
5.3. LIST COMB
5.4. LIST TRIM
5.5. Background information
6. Plot functions
6.1. Plot hydrostatic curves (PLD)
6.2. Hydrostatic data, old function (PLOT)
6.3. PLOT LDS - loading scale
6.3.1. Arguments
6.3.2. Controlling scaling aspects
6.3.3. Controlling tick subdivision
6.3.4. Controlling headers
6.3.5. Other options
6.3.6. Editing the result
6.4. PLOT TRI - trim diagram
6.5. Plot options
6.6. Using the general diagram drawing task
6.6.1. Example 1 - hydrostatic curves
6.6.2. Example 2 - curves with varying trims
7. Command specifications
1. Overview of quantities
This paragraph gives a list of quantities available. This set can be extended and the symbols be changed under the quantity standard, so
command LQ ALT or LQ ALT L should be used to get up-to-date information.
The following quantities are available for output in the HYD task:
CB block coefficient
CP prismatic coefficient
CW waterplane coefficient
DW deadweight TON
IX ix of waterplane M4
IY iy of waterplane M4
T draught, moulded M
TA draught aft M
TF draught fore M
AZIMIN,AZIMAX,IMIN,IMAX
These quantities are related to stability around arbitrary axes (NOTE: This is an add-on feature of NAPA). AZMIN and AZMAX are the directions
of weakest respective strongest resistance to heeling and IMIN, IMAX the corresponding moments of inertia.
CB,CM,CP,CW
The fullness coefficients are based on the actual depth (T), the reference length (LREF) and the reference breadth (BREF) from the reference
system. Optionally (qualifier L in the LQ), the actual waterline length can be used instead of LREF. Moulded volumes are used.
FRA, FRAM
The frame areas are calculated at the position given by the reference system parameter XMID.
T,TA,TF,TK
The mean draught T is measured at XREF while TA and TF are measured at the perpendiculars. TK differs from T by the value of the reference
parameter KEEL.
TRF,TRFA,TRFF
The trim factors tell how much the trim (TR) and draught at the ends (TA,TF) change as the result of one unit of change of the longitudinal center
of gravity.
LWL
The waterline length is obtained by making a section of the hull surface at the given draught and taking the distance between its end points.
WSA
The wetted surface area is calculated the traditional way by integrating frame lengths.
Except for those quantities labelled 'moulded', the quantities are calculated taking into account shell thickness.
2. Function
The calculations are controlled by a set of arguments, as presented below.
The various listing functions are started with the command LIST. Without specifying a particular list alternative, the LIST command gives one page
with background information and a basic list (same as LIST REF + LQ EXPL + LIST HYD).
Calculations are started automatically when a quantity is needed and not already calculated. The result is saved at run time and re-used as long
as the relevant arguments are unchanged. The calculation results can be saved and retrieved as described below.
3. Arguments
A list of available arguments and their current values is obtained with command ARGS. The following is an output example:
The main arguments are the name of the hull object and the draught and trim. For the hull, draught and seawater density, the default values are
fetched from the reference system, while the default for the trim is zero.
The name of the object representing the hull is fetched from the reference system (the one specified as 'hydrostatic hull').
A different object can be given with command HULL. This object does not necessarily have to represent the hull; it can be a partial hull or any
other room or surface for which hydrostatics are needed. In this case, there may be need to redefine the reference dimensions in order to obtain
useful fullness coefficients (commands LREF,BDWL,XREF).
As an alternative the draught below keel TK can be given instead of the moulded draught T, in which case TK is also used in various lists and
plots.
When many trims are given, this set is used as an argument when listing a function of both draught and trim, while output produced for a fixed trim
is calculated for trim=0. If a single trim is given, it is used in all calculations.
The draught at the perpendiculars can be given instead of a single draught and trim (command TT). The draught can also be replaced by a set of
displacements (argument DISP). The effect is equivalent to giving the draughts, that result in the given displacements when using the current trim.
A subset of draughts can be specified for output lists using the SUBSET command. It is applied in LIST HYD only and the subset must be within
the range of the specified draughts in the T argument.
The calculations are always made for a fixed heel, which is normally zero, but which can be changed (command HEEL). A warning is given if the
heel is not zero, since it represents an exception that may be an error.
The argument WLS refers to the problem of inaccuracies that may occur near the ends of the ship, owing to the fact that a discrete set of
calculation sections is used. These inaccuracies usually have little importance for the quantities related to the volume, but may affect those
related to the waterline area (for example WLA, LCA, KMT). The errors can be seen as a stepwise behaviour when the quantities are drawn as a
function of draught.
This problem is in principle avoided by calculating waterline oriented quantities from sections with the current water plane. However, this method
increases the demands on the correctness of the calculation object, from which the sections must be obtained correctly. This option is set with
command WLS:
WLS ON/OFF
Since this option was introduced, the standard method for doing end corrections has been improved, and should in most cases be sufficient.
The sea-water density used for converting volume to displacement is fetched from the reference system, but can be changed with command
RHO.
The lightweight must be given as argument LWX if the output quantity DW (deadweight ) is used. It is needed for the loading scale, and optionally
for LIST HYD and the trim diagram.
The argument set can be saved with the command ARG SAVE NAME and fetched with ARG GET NAME. The catalog of argument set is listed
with ARG CAT. A saved argument set can be deleted from the database with ARG UNSAVE NAME.
3.6. Deflection
Note that The feature has been installed for test usage, but it may not be supported in all contexts or it may have unforeseen side
effects. Consequently it is not yet included in the arguments.
The deformation of the hull, i.e. how much the base line deviates from the straight line can be defined with the command DFL. The deformed hull
will be used in calculation.
The deformation is defined by (at least three) measured draught values. The program sets a smooth curve through the given points and
calculates its deviation from the straight line going through the points (AP,TA) and (FP,TF) (trim eliminated). Outside the given points the curve is
extrapolated by the line having the same slope as the smooth curve has at its ends.
DFL d
The deformation is defined by giving the deviation at XREF. The program sets a smooth curve through the points (AP,0), (XREF,d) and (FP,0)
defining the deviation. The curve is bending upwards (hogging) if d > 0 and downwards (sagging) if d < 0.
The plain DFL command lists the current definition of deflection. The present deflection can be removed with the command:
DFL 0
NL open a new list and/or specify list parameters. If not given, a list named 'HYDROSTATICS' is opened
NP new page
5. Listing functions
This list option produces the basic list, containing hydrostatic quantities as a function of draught with fixed trim and heel.
The quantities to be listed are controlled by command LQ (= LQ HYD), and the layout is controlled by table output options (command TOO).
The list can be produced in both vertical and horizontal format. In the vertical format, each quantity is output as a column, where draught values
are running downwards. In the horizontal format, each quantity is output as a line, with different draughts running horizontally.
Vertical format:
Horizontal format:
quantities dependent on the seawater density, for example DISP, can be output for a different density
centers of gravity can be measured from a specified reference point (default=0). The reference point is given by a coordinate value, in
addition there is the special case XREF.
the fullness coefficients CB,CP, CW and CM can be calculated with the local waterline length rather than LREF by giving qualifier L
Example:
lists the displacement for two sea-water densities and specifies XREF as reference point for LCB. To get this recorded in the headers, these
should be added, for example
The qualifier L for CB replaces LREF with LWL and gives the same results as the formula for CB2.
This list alternative gives a list showing the value of selected quantities as a function of both trim and draught. This alternative requires that more
than one trim value is given as an argument. Each quantity is listed in a separate table. There is a separate LQ set providing control for this listing,
having subject identifier TRQ (i.e. LQ TRQ ...).
Giving command LIST TRQ without specifying a quantity gives all quantities listed in LQ TRQ. Fixed items in the LQ will appear as headers
between the groups (implemented only partially for vertical format). More control over the layout is obtained by listing one quantity at a time by
giving it in the command, e.g.
This allows TYPE, NP and other commands to be used between the quantities.(see 3.4 above)
The table is listed using the table output module, where values belonging to different trims perform the role of different quantities and draught is
the arguments. The possibilities to change the layout by table output options are limited. Useful options are SPACE, FH1, FH2, UL, TABLE and H.
The alternatives horizontal/vertical format are available, referring to the direction in which the draught argument runs.
The quantity in question is presented by a separate header line, which can be omitted by option NH (no header), if one should want to replace it
by an own text with the TYPE command.
Example:
Note the H option for making the latter example horizontal format.
The texts 'trim' and 'draught' are fetched from the quantity standard (as the so-called short header).
This list alternative contains a combination of the two preceding ones, allowing trimmed values to be output in combination with untrimmed ones,
so that values belong to a given draught are aligned. The layout is fixed as horizontal (draught argument runs horizontally). The first lines of the
table give values for quantities at even keel, i.e. those selected by LQ HYD. Then follow the quantities selected by LQ TRQ, in a similar way as
when using LIST TRQ.
In controlling the format, fixed components in the LQ TRQ set can be used. These will appear as text between the different quantities. Note the
special case NP, by which page feeds can be inserted between groups of trimmed quantities. Option NH suppresses the headers automatically
added between the groups (=the long header from the quantity standard).
Adding headers is controlled by options in the command. The default for the first header is the quantity symbol, but it can be replaced by the long
or short header (options LH, SH). The standard way of marking units is to add the unit as the second header in the first part, while it is added to
the intermediate header for the trimmed quantities. Alternatively, the unit can be suppressed (option NU) or added at every data line (option U2).
The field length reserved for the headers can be controlled with options FH1,FH2.
Example:
The units are added automatically, but can be suppressed by option NU.
This command lists values corresponding to the trim diagram. For further information, see PLOT TRIM.
LIST HDP
Lists a header page, containing information about the hull and the quantities used.
LIST REF
Lists reference dimensions and other information from the reference system.
LIST OBJ
Note also the general LQ EXPL command, by which a presentation of selected quantities can be listed.
6. Plot functions
The main graphic output command is PLD, plotting hydrostatic quantities as a function of draught. The plotting obeys the standard commands PQ
and POO. The quantities available in PQ are the same as in the main LQ.
The plotting function is a straightforward application of the normal plot options, presented in MN.2. The standard PQ delivered in the NAPADB is
the following:
This set of options is designed to provide a reasonable plot of up to four functions, having their axes at different places, with different logical pens
and scales coordinated so that even values coincide.
The PLOT command is an older command than PLD. It produces a different layout and so far as it can be controlled, it is done with command
SIZE and those listed separately by !COM.
This command produces the same information as LIST HYD in graphic form, i.e. the quantities shown are those selected by the LQ command,
with the exception that new quantities cannot be added by formulas.
Hydrostatic curves
More freedom to create plots is offered by using LIST HYD with the TABLE option and using the table generated as the source in the general
diagram drawing task, as presented below.
In case one should want a similar layout, but with modifications, it is probably easier to do it with the PLD command. The following example shows
the basis for such a set of options.
The loading scale shows displacement, deadweight ao. quantities as a function of draught. The function is named 'loading scale' according to its
most frequent use, but essentially, it displays hydrostatic quantities in general in nomogram form. This plot is created by the command PLOT
LDS.
All main hydrostatic quantities can be used (see LQ ALT), but the following ones are default:
In addition, a scale for taking into account different sea-water densities can be added in connection with the deadweight.
Additional text ‘FW’ is added to the header for fresh water quantities, i.e. with option /F.
Loading scale
New quantities can be added using the normal symbols by mentioning them in the command. Quantities belonging to the standard selection are
omitted by adding the symbol preceded by a minus sign, or using option '!'. This option has the effect that only the explicitly mentioned quantities
are added, and in the order given. A 'redundant' quantity named, i.e. one that would anyway be included, has the same effect.
The deadweight correction is drawn by default, if the deadweight is included. It is omitted if a single sea-water density is specified with option
RHO.
6.3.1. Arguments
The draught range of the diagram is the one specified by the draught argument T. The accuracy of the diagram is affected by the number of
draught arguments.
If the diagram is produced for a range of sea-water densities, by adding a correction scale, the basic values are the density given as argument,
which is also used as the upper limit of the range. Otherwise, the value given as calculation argument is used, or the one given as option RHO.
If the deadweight is requested, the lightweight must be given as an argument in the arguments for the HYD task.
The vertical size of the diagram can be controlled by option SCALE or H. The scale defines the scale in which draughts are drawn, while H gives
the height of the nomogram part. Default is H=0.2.
The horizontal size is defined by option D, giving the breadth of a single column, default=0.02.
The height of the part reserved for headers can be selected by option HU, giving this part as a fraction of the column breadth. The default is 1.75
if built-in headers are used, and 1.0 if symbols only are used.
The text height of the main header can be controlled by option THH, which also affects the size of frame reserved. The height of the numbers
drawn at even valued ticks is controlled by option TH, giving the text height as a fraction of the column width (default=0.075).
The spacing between the ticks on the various scales is selected automatically, in order to give what is considered a reasonable spacing. If the
derivative of the function varies much, a varying subdivision is used. This can be overridden by adding the spacing to the quantity symbol in the
command, for instance DISP=100. The spacing is given in the unit by which numbers are marked.
The main header can be given by option HD, default='LOADING SCALE'. With option NHD, it is omitted. For the standard loading scale
quantities, there are built-in headers, which are used as default. For added quantities, the short header from the quantity standard is used. With
option SH, the short header is used for all quantities. This header can be changed temporarily by command !FORM id SH='....'. With option S,
symbols are used for identification.
Numbering of ticks is done in the unit provided by the quantity standard, but can be changed by command !FORM.
The font for all texts can be defined with option FONT.
Options F1 and F2 specify a filling raster by which the diagram part and header part respectively are filled. Option XREF defines the reference
point from which longitudinal centers of gravity are measured.
Option HCORR=q changes the vertical location of the number at the scales. The default is to place the text so that its center is at the height of the
tick. q gives a change with respect to this, expressed as a fraction of the text height.
If needed, many aspects of the result can be adjusted by editing the resulting drawing (subtask EDIT under PLOT). To facilitate this, each scale is
output as one curve (or possibly 2...3).
The following (partial) example illustrates the use of option FONT (with a background), HCORR, F1 and F2:
The trim diagram shows the floating position as a function of displacement moment or vice versa:
The argument range for the diagram is defined by the draught argument, applied at the aft and fore perpendiculars, all combinations of which
provide the trim range. The TRIM argument controls the calculation, and must cover a sufficient range, preferably with the same spacing as the
draught arguments. If a combination of draughts gives a trim that is between calculated values, the result is obtained by interpolation, for which a
warning is given.
T (6,8,0.5)
TR (-2,2,0.5)
The largest trim is 8-6 and smallest 6-8, as defined by the draughts, with intervals of 0.5 m. The calculation trims required are consequently those
given by the TR command.
Some of the diagram drawing control commands are installed in the HYD task, as part of the PLOT (not PLD) command. However, their
usefulness is limited, because the diagrams are to a large extent controlled by other considerations.
The SIZE command controls the size of the drawing area of PLOT HYD and PLOT TRIM.
Hydrostatic curves with layout of the user's own selection can be made under the general diagram drawing task, to which the values can be
transferred by using the list output option TABLE. This option stores the result in a table as used in the table calculation module, from which the
general diagram drawing task can be entered.
In the example, the draught scale has been made vertical, and therefore the draught appears as the function, while the other quantities appear as
'argument' (this example was designed before there was option VA, vertical argument). Note how the SCU command has been used for selecting
a given scale, so that the result can be read with a ruler. In some cases a zero point is also specified. With PLOT U, the scales corresponding to
different quantities have been drawn at selected places.
HYD
LQ , HYD, T, DISP, LCB, KMT, CP, CB WSA, MCT, TCP
LIS HYD TABLE
TAB @@ enter table calculation
GET TABLE @@ get the table just produced
DIAG @@ enter diagram drawing
size 0.2 0.15
smooth v @@ note v-option (the actual
argument drawn as v-axis)
fun t; scv 50 0 @@ set draught as vertical axis
plot mm @@ plot 'mm-paper'
thi 3
arg disp; id disp; scu 50000 0; plo f; plo u
arg kmt; id kmt; scu 200; plo f; plo u +
arg tcp; id tcp; scu 2000 1400; plo f
@@ note zero point (1400), note that internal unit (ton/m)
plo u ll -0.02; @@ uaxis 0.02 m below lower limit
scu 2 0.5 @@ shared by CP, CB
arg cb; id cb; plo f
arg cp; id cp; plo f
plo u ul + 'CP,CB' @@ note label
arg wsa; id wsa; scu 10000 1200; plo f; plo u ul
plo v; plo v ul + @@ draught scale to left and right
END
END
In this example, the result of LIST TRQ LCB is made into a diagram.
TRI (-2 2 1)
T (1 9 1)
LIS TRQ LCB TABLE
TAB
GET TABLE
DIAG
THI 3
PLO BOX
FUNCTION T; ** cf preceding example
SMOOTH V
RANGE V 0 9; ** fixed range needed to
RANGE U 35 66; ** get common coordinate system
** plot curves,
** note selection from many columns with same name
PLOT U; PLOT V; PLOT V UL +; ** add the axes
TEXT 'LCB as function' (0.03 0.12)
TEXT 'of draught and trim' (0.03 0.1)
END
END
Resulting diagram
7. Command specifications
This command handles functions related to the arguments. Without parameters the current
values are listed.
/vers/proj: (opt) specifies the source: version and optionally project. Default: project data base if found,
then system data base and last NAPA data base.
The current arguments are saved under the given name in the project data base or in the
specified location.
ARG CAT
ARG RESET
The command concerns BDWL as defined in the reference system. It affects the definition of
CB and other coefficients.
This command is not usually needed, because calculation is started automatically when results
are requested, and results are not already available as a result of previous calculation or
fetching from the data base.
CAT type
Select the current freeboard deck edge. The freeboard deck edge is used for calculation of
quantities related to the freeboard.
CFRB name
CFRB OFF
This command defines longitudinal center of gravity of light weight. (Needed for trim diagram
with option DW).
CGXW value;
WAVE: wave
The command defines deformation of the hull, i.e. how much the base line deviates from the
straight line. The deformed hull will be used in calculation
The deformation is defined by (at least three) measured draught values. The program sets a
smooth curve through the given points and calculates its deviation from the straight line going
through the points (AP,TA) and (FP,TF) (trim eliminated). Outside the given points the curve is
extrapolated by the line having the same slope as the smooth curve has at its ends.
DFL d
The deformation is defined by giving the deviation at XREF. The program sets a smooth curve
through the points (AP,0), (XREF,d) and (FP,0) defining the deviation. The curve is bending
upwards (hogging) if d > 0 and downwards (sagging) if d < 0.
EXAMPLE:
DFL -0.1
Hull is deflected to sagging condition. Therefore, the draughts at fore and aft end are 0.1 m
smaller than the argument draughts, measured at XREF. The actual draughts can be listed
with the qualifier D for quantities TA and TF in the LQ selection.
DFL 0
No deflection
This command gives the calculation depths indirectly by displacements. The effect of this
command is to generate the equivalent draughts that result in the given displacements in LIST
HYD. Arguments TRIM, HEEL and RHO are relevant for interpretation of this one.
DISP values
NAPA's calculation method, which is based on the x-sections of the ship, causes some
inaccuracies at waterline ends (specially if waterlines end sharply and specially in waterline
area dependent quantities). The inaccuracies can be eliminated by setting 'end corrections on'
before starting calculations. Note! It takes much time to find out waterline ends and therefore
use end corrections only if really needed (usually the inaccuracies are negligible).
ECO ON/OFF
The command enters in a subtask which defines a freeboard deck edge. See also command
CFRB for selecting the current freeboard deck edge
Note that the program assumes the freeboard deck edge symmetric with respect to y=0, if the
curve is open, i.e. the first and last points do not coincide. If the curve is closed, no symmetry is
assumed.
Hydrostatics is normally calculated for heel=0 only, but this argument allows calculation for
other heels also.
HEEL heel
This command defines the object serving as hull. The default is taken from the reference
system. To calculate hydrostatics in waves the hull object must be defined as a room, i.e.
STABHULL
HULL name
This command starts various listings. If calculated values are not already available, calculation
is done with the current arguments.
This command lists hydrostatic values for the given trim and heel (first trim if several given).
The quantities to be listed are specified by command LQ. For available qualifiers, see !EXPL
LQ
This command lists hydrostatic values as function of both draught and trim. A separate table is
produced for each quantity. The output is controlled by LQ TRQ and TOO TRQ. Note that
calculation formulae are not supported in LQ TRQ since each quantity is listed separately.
quant: (opt) list only the given quantity, otherwise all quantities listed in LQ TRQ. See LQ TRQ ALT for
alternatives.
NH: (no header) omit the headers normally output between quantities
THD: header text for the draught quantity, default=short header of quantity. Special case
NONE=omit.
TRHD: header text for the trim quantity, default=short header of quantity TR
TEXT=text: text substituting the quantity header (must be single quantity selected)
T: output the quantity header as part of the table, default: as a separate text
I: output the 'trim' header in line with the trim values (default if CLASSIC)
A: output the 'trim' header above the trim values (default if not CLASSIC)
t-options: standard table output options. Some properties of this list are fixed (e.g. headers) and cannot
be changed. The separate UL (underline) option can be used. Option H creates horizontal
format, where the draught argument runs horizontally.
quant: quantity, default=all selected by command TRQ. For alternatives, use command TRQ,ALT.
This command prints a combination of the preceding ones, showing all quantities selected by
LQ HYD and LQ TRQ. The format is always horizontal, i.e. values of a given quantity are
output horizontally, while values corresponding to given draughts are output vertically.
NH: (no header) omit the headers normally output between values calc. for trims.
SH: use short headers (from quantity standard) instead of symbols to identify quantities
RDH: repeat draught header at each trim quantity. First quantity in the LQ must be T.
Underlined if UL option given.
t-options: table output options (only some options are effective, e.g. UL, FH1, FH2)
O Others LDS,TRI,REF,HDP
As LIST HYD, but showing the default quantities of the loading scale.
The draught arguments are used for draught aft and fore, and all combinations giving a trim
inside the calculated range are used. Trims not coinciding with calculation trims are
interpolated. For accurate results, select the calculation trims according to the draughts.
XREF=x: (opt) reference coordinate for MX, default XREF in the reference system
NH: (opt) (no header) omit the headers preceding the actual table
NTH=n1: (opt) controls division into pages: sets number of trims output on the same line
NP: (opt) for DocBook: add forced pagebreaks between the groups defined by NTH, NTV
RULER: (opt) in DocBook, add rulers between groups with given draught aft
LIST REF/OBJ/HDP
List various background data, REF=reference system, OBJ=current hull object, HDP=standard
header page. The following options can be used with LIST HDP and LIST REF to control the
output for reference system data:
B: brief list
LIST ARG
List arguments
This command selects the quantities included in output started with LIST HYD, LIST COMB or
PLOT CURVES. Without parameters, the list of currently selected quantities is displayed. Note
alt. LQ EXPL, which gives a presentation of the quantities intended for the result list. The
qualifier that can be added to a quantity is interpreted as rho for quantities dependent on it, e.g.
DISP/1.010, or reference point for locations, e.g. LCB/XREF. The qualifier L for coefficients
CB,CP, CW and CM means that the actual waterline length shall be used instead of the
reference length. If hull deflection is defined the deflection can be taken into account by using
qualifiers, namely TA/D and TF/D.
With subject=TRQ, the selection concerns the output of results for varying trims (LIST TRQ,
LIST COMB). Fixed components (text in apostrophes), will appear as headers between the
different quantities. 'NP' can be added for causing new pages. Calculation formulae are not
supported in LQ TRQ since each quantity is listed separately.
EXAMPLES:
LQ T VOLM DISP LCB/XREF KMT
Select volume moulded, displacement, LCB and KMT for output at even keel. LCB is measured
form XREF (instead of x=0).
Select the quantities mentioned, adding text to be output between the groups.
The command concerns LREF as defined in the reference system. It affects the definition of
CB and other coefficients and of trim.
This command defines light weight of the ship (needed for loading scale if deadweight
included).
LW value
Used for calculating the deadweight, used in the loading scale and available as output quantity
DW.
NL new list
This command can be used to start a new list or specify parameters of the list. See !EXPL
NL/GEN. Default for the list name is 'HYDROSTATICS'.
NP new page
This command draws a diagram showing the quantities selected with command PQ and using
the options set by command POO.
plot-options: (opt) standard plot options, see !EXP PLD/GEN. If this part is given, the keyword POO must be
added.
This command starts drawing of the result. If calculated values are not already available,
calculation is done with the current arguments.
M: Main alternative
PLOT CURVES
Plot selected quantities as a function of draught. The quantities drawn are the same as
specified by command LQ. See also PLD command for a more modern plotting function. With
option NF the frame with details on calculation object and dates is not drawn.
Draw loading scale or other nomogram showing hydrostatic quantities as a function of draught.
The calculation is controlled by the argument T, which sets not only the range of the diagram
but also the accuracy by which the diagram is made (note!). If a drawing is already open, the
given component is added to, else an independent drawing is created. The set of quantities is
either wholly defined in the command or defined as a modification to the default set
T,DW,DISP,MCT,TCP,KMT,TK,FRB. Minimum freeboard FRB is included only if the CFRB
argument is defined. The latter interpretation is done under more restricted conditions than in
releases before 2007.1: any mention of a default quantity without + or - implies that the
quantities are wholly listed.
qnt: specifies quantity. Any quantity in LQ LDS ALT is available. -qnt removes a quantity in the
default selection, +qnt can be used for repeating it.
=d: (opt) specifies tick spacing. In the form qnt=(d,num), the spacing between numbered ticks can
be defined separately.
L: draw the ticks to the left, default if attached to density scale at the left
N: do not draw the scale (for use with R for plotting only the density correction scale)
options:
BRHO=d: breadth reserved for a single density in the density correction scale
LTI=q: length of the longest ticks as fraction of the breadth of the column, default=0.5
HCORR=q: height correction for numbers, as fraction of the text height, default=center of text
aligned with tick
RHO=rho: select single seawater density (=exclude correction scale for water density). Default
if explicit quantity selection.
SH: use the short header from the quantity standard as identification for the quantities (can be
changed by !FORM qnt SH=...)
F1=pattern: fill pattern number for filling the data part, negative value=colour. Default=no fill.
F2=pattern: fill pattern number for filling the header part, negative value=colour. Default=no fill.
FORM: apply the quantity standard regarding formatting of numbers (field and nr of decimals).
NOTE: the field length is relevant: the left limit is aligned with the left limit of the column.
Example:
PLOT LDS
The same as the default scale but with the quantities explicitly declared
Variation with fewer quantities and the DW plotted on both sides of the density correction scale
The set above outlines the process when tailoring the scale using PLOT LDS for the scales
only.
Draw trimming diagram. Draughts and trims can be drawn in relation to displacement and
displacement moment (default) or deadweight and deadweight moment (option DW).
The calculation uses draught and trim arguments as presented under LIST TRI. Commands
SIZE, THD and NET can be used for modifying the result.
options:
R=step: restrict marking of trims and draught to multiples of 'step'. The step parameter may be omitted,
default=1.
This command handles plot output options for diagrams drawn with command PLD. For the
syntax of the POO command, see !EXPL POO/GEN.
This command selects the quantities to be output graphically using command PLD. The first
quantity in the list is used as the argument. The available quantities and the meaning of
qualifiers are the same is in command LQ. For the general syntax of the PQ command, see
!EXPL LQ/GEN.
RHO rho
For more details, see !EXPL SCAN/GEN. SCAN SEND just sends the current result list to the
printer. Note: the current result list closed.
SIZE size
This command affects the basic list only (LIST HYD). It allows a list to be made with differing
draughts than those used in the calculation. The values need not be literally a subset in any
other sense than that they must be kept inside the original range - values not among the
calculated ones are interpolated linearly.
SUBSET values
SUBSET OFF
This command defines the calculation draughts. An initial set of draughts is selected on the
basis of the height of the design waterline. See also commands DISP and TK.
T values
This command defines the calculation draughts. See also commands T and DISP.
TK values
Standard table output options, see !EXPL TOO/GEN. The default subject=LIST HYD, the
output of list TRQ is controlled by TOO TRQ.
TR calculation trims
This command defines the calculation trims. Default is zero trim only. If one trim only is given,
this is used for all values calculated. If many trims are given, the basic lists (e.g. LIST HYD) are
calculated for zero trim, while the trim arguments are used for listing quantities as function of
both trim and draught (LIST TRQ).
TR values
This command defines the calculation trims. Default is zero trim only. If one trim only is given,
this is used for all values calculated. If many trims are given, the basic lists (e.g. LIST HYD) are
calculated for zero trim, while the trim arguments are used for listing quantities as function of
both trim and draught (LIST TRQ).
TRIM values
This command specifies a single trim and draught by giving the draught at the perpendiculars.
TT ta tf
This command adds arbitrary text to the result list. See !EXPL TYPE/GEN.
The given data items are removed from the data base.
This command defines the wave used in the calculations. NOTE: In order to do calculations in
wave, define a room for the hull (i.e. STABHULL) and use it as the HULL argument.
WAVE name
length: (OPT) length of the wave (default = reference length of the ship)
angle: angle between the ship's and wave's moving directions. The wave comes from the port side if
angle is positive and orientation is left handed or angle is negative and orientation is right
handed. Otherwise the wave comes from the starboard side. The rotation is done around X=0.
WAVE OFF
This argument concerns quantities involving the waterline area (e.g. WLA, LCA, KMT), which
will be calculated by actually making the waterline sections, instead of using the normal
calculation sections. This gives accurate results, but it places greater demand on the
correctness of the calculated object, and is slightly slower. This option has no effect if the hull is
represented by a surface and the heel is not zero. NOTE!!: works if the object is a room only.
WLS ON/OFF
Table of Contents:
1. Overview of quantities
2. Arguments
3. Function
4. General output functions
5. Listing functions
5.1. LIST LONG
5.2. LIST MS, KN
5.3. General list
5.4. Background data
6. Plotting functions
6.1. PLD STAB
6.2. The PLOT command
6.3. PLOT OI
6.4. Controlling the PLOT command
7. Openings
8. Stability in waves
9. Command specifications
1. Overview of quantities
The following quantities are calculated for heeling 0 only:
T draught, moulded
TR trim
TMD transv. moment of displacement
MS residuary stability lever
KN 'KN' (cross curves)
HPHI righting lever
EPHI righting lever integral
2. Arguments
The calculations are controlled by a set of arguments, the most important of which are draught, trim, heeling and name of the hull object.
There are defaults for the central arguments based on the reference system, except for heelings, which are fetched from a description named
STAB*HEELS in the system data base. The hull object used is the one specified as 'stability hull' in the reference system. With command ARGS,
a list of currently valid arguments is obtained in the form used for input.
The draught (T) and trim (TR) arguments specify a set of initial conditions. These imply displacements as longitudinal centers of gravities, which
are kept fixed when calculating the result quantities at the given heels. These quantities can also be given directly as arguments DISP
(displacement) and LCG (longitudinal center of gravity). In the heeled positions, the ship is balanced according to the displacement and center of
gravity of the initial conditions. Draughts and trims therefore occur both as arguments and calculated values.
As an alternative to T, the draught below keel TK can also be given as the argument. In this case the TK should be used also in the argument of
lists instead of T.
The height of the center of gravity can be given (argument KG). It will improve accuracy by taking into account the longitudinal shift of cg caused
by trimming. It is also needed for calculating HPHI and EPHI. For the latter purposes, it is also possible to give them as options in the list or plot
commands and to use GM instead.
The FIXTRIM argument sets a mode that simulates manual calculations where balancing is done around the x-axis only.
The AZI argument changes the axis around which heelings are measured, default=0 (x-axis). For more information, see the system manual. This
is an optional feature.
The calculation can be given for an unsymmetrical weight by using the YCG argument.
The argument set can be saved with the command ARG SAVE NAME and fetched with ARG GET NAME. The catalog of argument set is listed
with ARG CAT. A saved argument set can be deleted from the database with ARG UNSAVE NAME.
3. Function
The various listing functions are started with the command LIST. Without specifying a particular list alternative, the LIST command gives the
'LONG' list.
Whenever output is requested, it is checked whether valid calculation results are available, and if not, calculation is started. Calculations are not
started if no arguments have been changed since the last calculation or if the FETCH command was just used.
In order to start calculations without producing output, command CALC can be used.
NL open a new list and/or specify list parameters. If not given, a list named 'STABILITY' is opened
NP new page
5. Listing functions
This list option is the default, giving for each initial condition a table, listing draught, trim, KN, MS, HPHI and EPHI as a function of heel.
The two latter quantities require that the vertical center of gravity is given, either as argument or as an option in the command.
The following is an output example (one value for each of the argument):
INITIAL VALUES:
DRAUGHT MOULDED: 4.000 M
KMT: 5.531 M
LCB FROM XREF: 0.860 M
TRIM: 0.000 M
DISPLACEMENT: 3584.263 TON
SALTWATER DENSITY: 1.025 TON/M3
============================================================
HEEL T TR KN MS
degree m m m m
0.0 4.000 0.000 0.000 0.000
10.0 3.932 0.028 0.970 0.010
20.0 3.729 0.119 1.974 0.082
25.0 3.575 0.190 2.497 0.159
30.0 3.395 0.286 2.991 0.226
40.0 2.987 0.448 3.766 0.211
50.0 2.388 0.484 4.364 0.127
60.0 1.692 0.482 4.694 -0.096
70.0 0.947 0.448 4.788 -0.410
80.0 0.178 0.387 4.689 -0.758
If there are openings defined as relevant, information about these can be included as an option (LIS LONG OPE)
These listing commands produce MS and KN as functions of heel and draught for the various trims in the argument list. The follow is an example
of LIST MS:
The general list function is based on the table output module, allowing the contents and the layout to be controlled with commands LQ and TOO.
When applied to the current case, there is the difficulty that the basic function of the standard table output module is to produce a list of quantities
as a function of one argument, while in this task, there are three arguments: draught, trim and heel, alternatively displacement, LCG and heel.
The solution adopted is that the first argument is used as the normal one, i.e. by repeating the lines in the table. If the second argument has
many values, the columns for the quantity are repeated, and if the third argument has many values, the whole table is repeated.
The role of the three arguments is specified in the LIST command, having the following format:
where 'arg1', 'arg2' and 'arg3' tell the argument quantities, using the symbols T (or TK), TRIM and HEEL or DISP, LCB and HEEL. They
correspond to the first, second and third arguments as presented above.
The parameter 'value' for the second and third arguments is optional, selecting the given value only, otherwise the whole range of the argument is
used. The given value must be among those given as arguments for the calculation.
The third argument may be omitted. The default is T=TDWL, TRIM=0 or HEEL=0, depending on 'arg1' and 'arg2'. If none of these rules can be
applied, the first argument value is selected for heel and the last argument value is selected for the others.
Note: the first argument is specified by the variable quantity ARG in the LQ. The actual quantity to use as ARG is specified in the LIS
command, when requesting output. The quantity HEEL is substituted into the LQ for the variable ARG. When listing, it is replaced by
the actual argument quantity. This way, the LQ remains valid even if the arguments are changed, and the specific symbols can be
reserved for selecting the corresponding result quantities. When the first argument is T, quantity TK (draught below keel) can be used
as an alternative.
If the third argument is heel or trim, the qualifier E (even keel) can be used for restricting the third argument to heel=0 or trim=0. Note that some
quantities are only calculated for heel=0, regardless of the heel argument.
The following examples are given primarily in order to show the selection of arguments. The special questions related to selecting headers are
presented below. The calculation is done with DISP and LCG as arguments:
HEEL 0 10 20 25 30 40 50
DISP (1000 5000 1000)
LCG 40 41 42
HEEL T TR KN MS
degree m m m m
---------------------------------------
0.0 4.420 -0.504 0.000 0.000
10.0 4.344 -0.456 0.959 0.009
20.0 4.120 -0.324 1.946 0.075
25.0 3.960 -0.246 2.450 0.137
30.0 3.806 -0.175 2.887 0.152
40.0 3.413 -0.111 3.667 0.151
50.0 2.856 -0.161 4.288 0.097
The selected quantities are listed as functions of heel for DISP=4000. In this case, there is in fact only one argument, and this is a normal case of
table output. In the following example the role of the arguments are reversed:
DISP T TR KN MS
ton m m m m
-----------------------------------------
1000 0.704 -0.253 3.687 -1.176
2000 1.981 -0.383 3.000 -0.017
3000 3.012 -0.407 2.618 0.153
4000 3.960 -0.246 2.450 0.137
5000 4.975 -0.051 2.280 -0.033
In this example, the whole range of the argument DISP is used. Only one quantity (KN) has been selected in the output.
LQ ARG, KN
TOO STAB HD=((Heeling, ' KN at displacement'), ('angle ', A), UL)
LIST HEEL DISP
Heeling KN at displacement
angle 1000 2000 3000 4000 5000
-----------------------------------------------
0.0 0.000 0.000 0.000 0.000 0.000
10.0 1.925 1.247 1.024 0.959 0.957
20.0 3.282 2.455 2.081 1.946 1.876
25.0 3.687 3.000 2.618 2.450 2.280
30.0 3.991 3.465 3.145 2.887 2.681
40.0 4.395 4.200 3.942 3.667 3.461
50.0 4.613 4.630 4.439 4.288 4.048
KMT is calculated for HEEL=0 only, and gives only one column (with warning 2023).
LQ ARG, KN
TOO STAB HD=(('Heeling', ' KN at displacement'), ('angle ', A), UL)
LIST HEEL DISP LCG
LCG 40.00 m
Heeling KN at displacement
angle 1000 2000 3000 4000 5000
-----------------------------------------------
0.0 0.000 0.000 0.000 0.000 0.000
10.0 1.925 1.248 1.029 0.967 0.962
20.0 3.281 2.457 2.092 1.959 1.876
LCG 41.00 m
Heeling KN at displacement
angle 1000 2000 3000 4000 5000
-----------------------------------------------
0.0 0.000 0.000 0.000 0.000 0.000
10.0 1.924 1.247 1.024 0.959 0.957
20.0 3.281 2.455 2.081 1.946 1.876
LCG 42.00 m
Heeling KN at displacement
angle 1000 2000 3000 4000 5000
-----------------------------------------------
0.0 0.000 0.000 0.000 0.000 0.000
10.0 1.923 1.246 1.020 0.954 0.953
20.0 3.279 2.452 2.074 1.936 1.867
The third argument LCG is added in the list command, causing the output to cover the whole range and implemented by repeating the table. Note
the headers telling the value of this argument. These can be replaced by headers of the user's design by using the LBG option in the TOO.
A single symbol in the LQ may result in a varying number of columns where the quantity is the same, but which belong to different values of the
second argument. In order to add identification to these columns, the following service is provided:
When multiple values are given for the second argument, the headers LH (long header) and SH (short header) have been given the special
function of showing the value of that argument. SH gives the value alone, formatted as specified by the !FORM command. LH gives the value (in
a compressed format) preceded by the quantity symbol.
In a header where the texts are given directly (using the syntax (text1, text2...) in the TOO command), each quantity is treated as one item, and
the given string is written over the whole set of resulting columns. A special case is the symbol A (for argument), which is replaced by the value of
the second argument as in header SH. These services are available for the two first headers only.
When many tables are generated by multiple values of the third argument, the table output option LBG (lines between groups) can be used for
adding headers before the respective tables. Note that a line containing NP (=new page) causes a new page. The value of the third argument is
stored in the variable HDT, HDTRIM, HDHEEL, HDDISP or HDLCG depending on what quantity is the third argument. The default is a text telling
the value of the third argument, preceded by the long header. This header can be suppressed with option NH.
Examples:
Listing result:
Listing result:
========= KN (M) at trim=0 ==========
HEEL= 0.0 10.0 20.0 30.0 40.0 50.0
draught
--------------------------------------------------------
1.250 0.000 3.290 5.324 6.584 7.233 7.492
2.500 0.000 2.468 4.348 5.695 6.759 7.543
3.750 0.000 1.994 3.825 5.320 6.502 7.168
5.000 0.000 1.765 3.512 5.107 6.138 6.654
6.250 0.000 1.666 3.345 4.760 5.629 6.114
LIST OBJ and LIST REF give information about the calculation object and reference system respectively.
6. Plotting functions
A graphic representation of the main result quantities is obtained with the PLD command. The same questions regarding multiple arguments
concern this command also. The options by which the selection is expressed are the same as in the LIST command, and the effect is analogous:
the first argument has the normal function of the argument quantity, i.e. represented at one of the axes
the second argument is treated by plotting several curves
the third argument is handled by repeating the diagram. The result is, however, doubtful in this case.
The headers SH and LH are available for distinguishing curves of different quantities as in the LIST command.
PQ STAB, ARG, KN
POO STAB, NET, SMOOTH,
ARG: AXIS,
F1: AXIS,
KN: RANGE=6
There is no automatic service for guaranteeing that the different curves for a given quantity are scaled in the same way. The simplest
way to achieve this is to give a RANGE or SCALE option for the quantity, as in the POO command above.
The PLOT command is an older command, the functionality of which is replaced in a more general and standardized way by the PLD command.
In the presentation below, the equivalent PQ+POO+PLD combination is given. In the NAPADB, PQs named as the plot functions (I.e. HPHI, MS
etc) are available. Before using PLOT, fixed ranges may need adjustment.
Here only a few examples are given; for more information, see the explanation texts.
PLO HPHI plots the stability lever GZ as a function of heeling angle. Its integral EPHI can be added as an option:
Stability curves
The following commands produce more or less the same result, except for the figure:
To omit the EPHI curves, simply omit EPHI from the PQ.
PLOT MS plots the residuary stability lever as function of heel for fixed draughts:
PLOT DMS plots the residuary stability lever as a function of displacement for fixed heels:
PLOT DMS
The equivalent PQ+POO+PLD (argument DISP used):
PQ ARG, MS
POO STAB, NET, AXIS, SMOOTH,
MS: RANGE=(-2,0.5), ID=LH
PLD DISP HEEL
PLOT CMS plots the residuary stability lever as a function of draught for fixed heels:
PLOT CMS
The equivalent PQ+POO+PLD:
PQ ARG, MS
POO STAB, NET, AXIS, SMOOTH,
MS: RANGE=(-2,0.5), ID=LH,
ARG: AXIS=Z
PLD T HEEL
PLOT CKG
The equivalent PQ+POO+PLD:
PQ ARG, KN
POO STAB, NET, AXIS, SMOOTH, VA,
ARG: AXIS=Z, RANGE=(0,7),
KN: RANGE=6, ID=LH
PLD T HEEL
6.3. PLOT OI
This command gives a diagram showing the heeling angle at which given openings are immersed.
Opening immersion
This function is not supported by PLD.
Commands providing plot options according to the old standard are installed as in the HYD task. These can be used to the extent that they are
not overridden by fixed setting in the plot tasks.
Some of the plots are placed into drawing frames read from the system data base. If the frames are not needed, e.g. because the result is
inserted into the list, these can be omitted by option NF (no frame) in the PLO command.
If the plot is placed in a frame, the frame controls the size of the drawing area, otherwise the SIZE command can be used.
7. Openings
Data regarding the immersion of openings can be obtained in the long list and in PLOT OI. The openings in question are the same as used in DA
or CR. Definition of openings and listing of them can also be done in this task.
The OPE option in the LIST LONG command gives information about immersion of openings. Note that these openings must be defined as
relevant.
8. Stability in waves
The calculations can also be performed for a non-level sea. The wave form can be specified by reference to an already defined wave, or by
providing the information in the wave command. The shape of the wave can be either sinus or thoroidical. See !EXP WAVE for more information.
9. Command specifications
This command handles functions related to the arguments. Without parameters the current
values are listed.
/vers/proj: (opt) specifies the source: version and optionally project. Default: project data base if found,
then system data base and last NAPA data base.
The current arguments are saved under the given name in the project data base or in the
specified location.
ARG CAT
ARG RESET
The command defines stability axis other than the x-axis. All stability quantities are calculated
in the plane perpendicular to the stability axis. The input heeling angles are angles around the
stability axis and input trims are trims along the stability axis. The output quantity HEEL is
angle around the stability axis, the output quantities TR and TRA are trims along the stability
axis, HEELX is heeling angle around the x-axis and TRX is trim along the x-axis. Default
stability axis is x-axis.
AZI a
a: azimuth angle (deg). The stability axis makes an angle 'a' with the x-axis on the xy-plane. 'a' is
positive towards the +y-axis and negative towards the -y-axis.
This command is not usually needed, because calculation is started automatically when results
are requested, and results are not already available as a result of previous calculation or
fetching from the data base.
CAT type
O: openings
The given data items are removed from the data base.
This command is an alternative to T. The results will be calculated for the given set of
displacements instead of draughts. A preceding T command is replaced by DISP and vice
versa.
DISP values
FIXTRIM ON
FIXTRIM OFF
This command defines the calculation heels. Default is taken from the system data base.
HEEL values
values: heels (around stability axis) as series or single values If the set of heels includes negative
values, zero must be present in the set given. In other cases it is added if missing.
This command defines the object serving as hull. The default is taken from the reference
system. To calculate hydrostatics in waves the hull object must be defined as a room, i.e.
STABHULL
HULL name
KG h
The LCG argument (in addition to DISP) is an alternative to giving initial trims.
LCG values
This command starts listing of the result. If calculated values are not already available,
calculation is done with the current arguments. The output format can be controlled by the
option described below and with commands *FORM and *PAGE.
HPHI: add hphi-values. KG (or GM) must be known, either from KG-argument or option in the
command.
GM=gm: alternative to KG
LIST MS options
List ms as function of draught and trim. Analogically LIST KN. Options O, R, table output
options.
This form starts a general listing function controlled by the LQ and TOO commands. The
parameters arg1...arg3 control the basic structure of the table, as presented below. The
arguments T and TRIM below are replaced by DISP and LCG if these are used in the main
arguments.
arg1: first argument (T, TK, TRIM or HEEL), the argument corresponding to different lines in the
table. The whole range is always used.
arg2: second argument (T, TK, TRIM or HEEL). If this argument has many values, the columns
corresponding to each quantity are repeated. See command TOO for the generation of
headers in this case.
=value2: (opt) restricts the second argument to this value, default=all values in the current argument set.
arg3: (opt) third argument. Default=remaining one after arg1 and arg2, taking 0 for trim or heel and
tdwl for draught. If this argument is given, the effect is analogous with arg2, except that multiple
values are handled by repeating the table.
NH: (opt) (no header) suppressed the header telling the value of the third argument. (Table option
LBG can be used for headers between the partial tables).
LIST ARG
List arguments
EXAMPLES
LIST LONG HPHI GM=1.5
LIST HEEL T
LIST H T=5
List quantities selected by LQ, for varying heels and T=5, TRIM=0.
This command concerns the general list function. For general instructions about the LQ
command, see !EXPL LQ/GEN. The following special rules concern this case: The quantity
ARG must be selected for listing the quantity declared as first argument in the LIST command.
At output, it will be replaced by the actual argument (draught, trim or heel). If there are many
values of the second argument, each result quantity in the LQ results in as many columns as
there are values of this argument, unless qualifier E (even keel) is is used, or the quantity is not
calculated for all values. Quantity TK gives the draught arguments measured from below the
keel (only for LIST T ...).
EXAMPLE:
LQ ARG KN; LIST T HEEL
In this example, a table is obtained, containing a column T and as many columns KN as there
are heel arguments.
NL new list
Starts a new list and/or set parameters of the list. See !EXPL NL/GEN.
A table based way to define all openings available in the task. The opening arrangement is a
table with prefix OPE*, each row defining an opening. If an opening arrangement is active, all
separately defined openings are ignored as well as the commands OPENING, EDI OPE, DEL
OPE and COPY OPE. The commands CAT OPE, DES OPE, ROP, IRO and OGROUP work
normally.
OPARR name
OPARR OFF
Deactivate the opening arrangement (the openings defined by the task OPEN become
available).
OTYPE: type of opening regarding its severity in progressive flooding. The alternatives:
CONN: Pair of compartments connected by the opening. The syntax comp1,comp2 defines the
connection in both directions, the syntax comp1 -> comp2 defines one-directional connection
from comp1 to comp2. Either of the names may be SEA. In DA, the current relevancy of the
opening is checked by the following logic: The opening is relevant if (provided it is not
watertight)
COL: Filling colour(s) of opening in plotting tasks DRW FLO and DRW OPEN of DA. Up to four
logical fill codes col1 col2 col3 col4 may be given : col1 = opening has become irrelevant and
above the water line, default GREEN; col2 = opening is relevant and above the water line,
default GREEN; col3 = opening has become irrelevant and is under the water line, default
RED; opening is relevant and under the water line, default RED.
SIZE: size of the square marker in plotting tasks DRW FLO and DRW OPEN of DA. A preceding
asterisk defines the size directly in the dimensions of the drawing otherwise it is in the ship
scale.
TPX,TPY,TPZ: Text position in x-, y- and z-sections relative to the center of the marker representing the
opening. The following alternatives are available:
L: to the left
O: over
R: to the right
Opening, immersion angle of which is printed in results. The command POS (x,y,z), defining
the position, must follow.
This commands plots stability data using the general diagram output module. The quantities to
be included are controlled with command PQ, having the same options as LQ. The graphic
result can be controlled with command POO.
arg1,arg2,arg3: selects arguments exactly as in the LIST command. For each value of the third argument, a
separate drawing is made.
option: (opt) standard plot output options in addition to or replacing those given with command POO.
EXAMPLE:
PQ ARG KN
PLD HEEL T
option: (opt) standard plot output options in addition to or replacing those given with command POO.
This command starts drawing of the result. If calculated values are not already available,
calculation is done with the current arguments. Alternatives CKG , HFI and OI are drawn into
pre-stored frames unless inhibited by NF option. When no frame is used, the size is determined
by the SIZE command (default A4). Diagram control commands (RANGE, LINE, SCU, SCV
etc.) are obeyed to the extent that they are not overridden by task dependent control.
OI op1 op2 ... draw curve showing immersion angle of opening as a function of draught.
op1,op2..= name of the opening(s). Options:
EXAMPLES
PLO HPHI KG=9.5 EPHI
The hphi curve is drawn for kg=9.5, using the standard drawing frame and scaled according to
the size of the curves.
This command controls the graphic result produced by PLD. For the parameters of the
command, see !EXPL POO/GEN.
This command controls the quantities to be included in when using the PLD command. The
function of this command is otherwise identical with that of LQ, except that it controls the
plotting.
Without parameters, the result is the same exit+re-enter. With parameter D, only diagram
options are reset.
With this command, the density of seawater stored in the reference system can be substituted.
RHO rho
For more details, see !EXPL SCAN/GEN. SCAN SEND just sends the current result list to the
printer. The current result is finished.
SIZE size
This command lists or changes the set of heels stored in the project or system data base, used
as default when entering this task. The current heel arguments are not affected. Without
parameters, the current standard heels are listed. Changing the system data base requires full
professional mode.
This command defines the calculation draughts. An initial set of draughts is selected on the
basis of the height of the design waterline. See also commands DISP and TK.
T values
This command defines the calculation draughts. See also commands T and DISP.
TK values
This command concerns the general list function. For general instructions about the TOO
command, see !EXPL TOO/GEN. In order to provide headers for multiple columns of a single
quantity, the following special rules are valid:
The header SH (short header) is replaced by the value of the second argument for each
column. It is formatted as specified by !FORM. The header LH (long header) works similarly,
but the value is preceded by the symbol of the argument quantity.
When giving headers directly (i.e. HD=((text1, text2, ...),...), the duplication of columns is taken
into account so that empty headers are added at the additional columns. The symbol A will be
replaced by the value of the argument. These services are available for the two first headers
only.
This command defines the calculation trims. Default is zero trim only. Instead of trims, the
longitudinal center of gravity may be given, in which case a result in the second format is
produced.
TRI values
TYPE text
text: text to be added given literally (no apostrophes). The only processing done is variable
replacement.
This command defines the wave used in the calculations. NOTE: In order to do calculations in
wave, define a room for the hull (i.e. STABHULL) and use it as the HULL argument.
WAVE name
length: (OPT) length of the wave (default = reference length of the ship)
angle: angle between the ship's and wave's moving directions. The wave comes from the port side if
angle is positive and orientation is left handed or angle is negative and orientation is right
handed. Otherwise the wave comes from the starboard side.
WAVE OFF
YCG y
In the absence of other instructions, frame areas are produced from the hydrostatic hull (as defined in the reference system) at the design water
line and at trim=0.
There are the older output command LIST and PLOT and the newer ones, NLIST and PLD, added in rel. 2002. Note that some of the control
commands apply to the old ones only.
Table of Contents:
1. Arguments
2. Standard output functions
3. Absolute and relative frame areas
4. Shell plating
5. Plot options for the PLOT command
6. Handling multiple draughts in NLIST and PLD
7. Examples
8. Command specifications
1. Arguments
The main arguments are draught, trim, x-values and the name of the hull object. The current values can be listed with command ARGS.
Default for the draught is the design water line. Different draughts can be set with the argument T.
The x-argument (command X, synonym XARG) specifies where to calculate and output the frame areas and is mainly intended for listing. When
drawing, one should normally rely on the default, which is to use calculation sections, where all discontinuities are taken into account. The
x-coordinates can also be specified indirectly by a step, using command XSTEP. The PLD command always relies on calculation sections.
Note: even when the x-arguments have been given, the result is based on the calculation sections.
With the argument TR, trim, the curves can be plotted with trim.
The following arguments are relevant for the old output commands only (LIST and PLOT), the new ones are controlled by the standard
commands LQ, PQ, TOO, POO.
Commands ARANGE and LIMITS set the range for the areas and x respectively. The default is to adapt to the size of the object.
With the argument MLD, one can select between total frame areas (plate thickness included) or moulded areas.
An option not listed among the arguments is to use non-dimensional areas. This option is set with command NONDIM and plots the areas so that
the maximum=100%.
The argument set can be saved with the command ARG SAVE NAME and fetched with ARG GET NAME. The catalog of argument set is listed
with ARG CAT. A saved argument set can be deleted from the database with ARG UNSAVE NAME.
The marking of the x-axis can also be done non-dimensionally, by using a formal frame system where the design length is divided into 20 parts. In
the PQ, the usage non-dimensional coordinates are controlled by the qualifier to the quantity XREL: default=(0.1) in the range from aft to fore
perpendiculars.
In the old output commands, these aspects are controlled by command NONDIM. In the new commands, NLIST and PLD, this aspect is handled
by the quantity selection in LQ and PQ.
4. Shell plating
As default, frame areas are calculated with shell plating ('total frame area'), but moulded values can be requested with command MLD (old
commands) and by the quantity selection in the new commands (quantity FRAM instead of FRA).
When drawing frame areas from objects other than the hull, command LIMITS can be needed for restricting the x-interval.
For PLD, the control is done by PQ and POO as usual. Note however the special questions caused by duplicating of quantities, as presented
below.
t=5.1 (default)
5.1m with option M
5.1 with option B
LIST M
Result:
x area
5m 5.25m 5.5m 5.75m 6m
m m2 m2 m2 m2 m2
--------------------------------------------
0.00 0.1 0.4 1.0 1.9 3.3
20.00 77.1 82.1 87.1 92.1 97.1
40.00 86.1 91.1 96.1 101.1 106.1
60.00 86.3 91.3 96.3 101.3 106.3
80.00 66.8 71.3 75.9 80.5 85.2
100.00 13.2 13.3 13.5 13.8 14.2
Note that the short header for X is assigned empty (one space needed for distinguishing it from an undefined header).
PQ FRA, X, FRA
POO FRA, BOX, NET, FONT=S, ID=SH,
ARG: AXIS,
F1: AXIS, RMARG=*(0,0.05)
PLD M
Getting the curves for all draughts in a common scale is the result of internally added options.
7. Examples
The following examples show absolute and relative frame area curves from a hull form containing appendages and bow thruster:
8. Command specifications
Defines the maximum value for the area axis of the plots, i.e. the range covering the vertical
size of the plot. It does not imply any limitation. For the PLOT command.
ARANGE, area
area: maximum value on area axis. If nondimensional areas are drawn, a fraction of the order 1
should be given.
This command handles functions related to the arguments. Without parameters the current
values are listed.
/vers/proj: (opt) specifies the source: version and optionally prohect. Default: project data base if found,
then system data base and last NAPA data base.
The current arguments are saved under the given name in the project data base or in the
specified location.
ARG CAT
ARG RESET
This command can be given after the PLOT command for the purpose of adding texts, scales,
net or similar components.
This command stores the current frame area curve as a space curve. The purpose of this
function is to support transformations based on entering a modified frame area curve. There
must be a single draught specified. The points are stored at the current x-arguments (given by
XARG) or if not given, according to the calculation sections.
scale: scale factor for the area, default 1 (for non-dimensional areas 100).
HULL, hull
hull: name of the surface. Default: 'hydrostatic hull' in the reference system.
This command defines the interval in the x-direction to be covered by the plot, default=whole
ship. For instance, this can be used when frame areas of a compartment are drawn. For PLOT
command only, PLD is controlled by the RANGE option (... POO ARG: RANGE=(xmin,xmax)).
This command produces frame areas in list form. The quantities used are X and FRAM (for
!FORM command). See NLIST for listing controlled by LQ and TOO.
LIST t-options
t-options: standard table output options (see !EXPL TOO/GEN) Note specially the TABLE option, by
which the result can be further treated under table calculation.
LIST ARG
List arguments
This is the standard LQ command (see !EXPL LQ/GEN) for controlling the output of NLIST.
Note that selection between total, moulded or relative frame areas is done by selecting
quantities (e.g. RFRA)- not by using the NONDIM or MLD command. Similarly for the
argument. (FRMX and FRMZ are only available with plate thickness).
If there are multiple draughts (given by command T), the result quantities are duplicated. The
header component SH (short header) is assigned so that it indicates the draught argument.
For XREL (relative x-coordinate), the numeric qualifier defines the value assigned at the fore
perpendicular, default=1. (The value at the aft perpendicular is 0).
The default is to calculate total frame areas (shell thickness included as specified for the
object). This can be changed with the MLD command. It is valid for the LIST and PLOT
commands only: NLIST and PLD are controlled by LQ and PQ respectively.
MLD ON/OFF
This command specifies a grid net to be drawn instead of axis. For more details, see !EXPL
NET/GR6. For PLOT command.
This command starts a listing handled the standard way using LQ and TOO.
M: if multiple draughts, the header generated has the form 5.1m, default is T=5.1
The command controls the representation of the arguments and function values. Relevant for
the PLOT and LIST commands only: NLIST and PLD are controlled by LQ and PQ
respectively.
NONDIM sel
This command plots a diagram handled the standard way using PQ and POO.
M: if multiple draughts, the header generated has the form 5.1m, default is T=5.1
PLOT options
options:
NOT: (no text) omit text giving hull name date etc.
This is the standard POO command (see !expl POO/GEN) for controlling the output of PLD.
Note the usage of the header component SH (short header) for separating results for different
draughts. Note that if there are multiple draughts, options for quantities designated by F1 etc
may not be applied correctly, use the names of quantities instead. The range of added
quantities are assigned so that they depend on that for the last draught (assumed to be
highest).
This is the standard PQ command (see !EXPL PQ/GEN) for controlling the output of PLD. It is
in all respects analogous with LQ.
Defines the size of the drawing area of the frame area curve when plotted by PLOT. (Same
alternatives as in !GRP).
SIZE, size
size:
S: size of screen
This command specifies that the area curve shall be drawn as a smooth curve through the
calculated points. Otherwise a polygone is drawn.
SMOOTH OFF
T draught arguments
Defines the draught(s) for which frame areas are calculated and output. Number of draught at
most 50.
T values
This is the standard TOO command (see !expl TOO/GEN) for controlling the output of NLIST.
Note the usage of the header component SH (short header) for separating results for different
draughts.
TRIM trim
This command can be used when the frame areas are needed at specified x-locations. The
default is to use the x-coordinates of the calculation sections. Can be abbrieved to X.
X values
X -
This form restores the initial default = use location of calculation sections.
This form is an alternative to XARG, and selects from the range covered by the object the
values that are a multiple of the given step.
XSTEP step
The draughts at which areas are calculated are initially set to 0.2*tdwl...2*td wl in steps of 0.2*tdwl, and can be changed with command T.
The x-positions are selected by dividing the reference length into 20 parts. A different selection can be done with command X. In the drawing, the
marking of x-values is done as x-coordinate or frames, depending on the way the coordinates are given in the X-command.
The size of the drawing is initially set to A3, and can be changed by command SIZE. The scaling of the frame and moment values can be
changed with command SCALE.
The hull used is the one specified as 'hydrostatic hull' in the reference system, and can be changed with command HULL.
With command SMOOTH, a smoothed curve is placed through the set of calculated values.
The plotting is started with command PLOT and listing with LIST.
The listing obeys the page size (command !PAGE) but not the command !FORM.
The scaling of areas and moments is presented as a text, which is valid only if the drawing is plotted in the initial scale (use SCALE *1 under the
PLOT task). Alternatively, the scaling can be shown graphically (command SCL).
Example of plot:
Bon Jean-curves
Table of Contents:
1. Command specifications
1. Command specifications
This command handles functions related to the arguments. Without parameters the current
values are listed.
/vers/proj: (opt) specifies the source: version and optionally prohect. Default: project data base if found,
then system data base and last NAPA data base.
The current arguments are saved under the given name in the project data base or in the
specified location.
ARG CAT
ARG RESET
HULL hull
LIST options
options:
OLD: list with the old format (default is the LQ controlled list)
NH: no header
LIST OBJ
LIST REF
The command controls the set of listing quantities and their properties. The quantities available
are T=draught, AREA=frame area and MZA=vertical moment of area. Giving this command
selects the new version of the listing function (new in rel. 2007), controlled by the LQ and TOO
commands. LQ OFF cancels this selection and selects the old form. For the LQ command, see
!EXPL LQ/GEN. The LQ is modified for taking into account multiple x-coordinates: If the
quantity T is included, it is output first. If AREA is included, the area column is repeated as
many times as there are x-coordinates, similarly MZA for moments. If The last quantitiy is T,
draughs are output to the right also. The output is divided into groups if it does not fit on one
line.
The argument MODE selects between moulded or total frame areas. The value is either
TOTAL (default) or MOULDED.
MODE mode
PLOT options
N: omit other texts than numbers at the scales. The result can be equipped with text of own
choice under the DR task (after first saving this result in the data base).
Define scale for the area or moment curve. If the scale command is not given the scale will be
chosen from a set of standard scales so that the curves do not overlap.
scale: scale of curve. The scale 1/100 means that one centimeter on the drawing corresponds to 100
units on the curve (m2 or m3)
The scaling of the moments and areas are shown by a scale instead of a text.
SCL OFF
A smooth curve is placed through the calculated points, instead of a polygon. Cancelled with
option OFF.
T calculation draughts
T, draughts
This command controls the listing with the standard TOO options see !EXPL TOO/GEN. Giving
this command selects the new version of the listing function (new in rel. 2007), controlled by
the LQ and TOO commands. LQ OFF cancels this selection and selects the old form. The
header component LH is converted into the form X=x for showing the corresponding
x-coordinate.
X, x-coord
x-coord: x-coordinates given in the standard form. If frame numbers are used, the marking of x-values is
done as frame numbers. If this command is not given there will be 21 sections starting from AP
and ending at FP with a spacing of LREF/20.
See also NAPA User Meeting workshop papers about ship model.
Table of Contents:
The ship model is such a model, where the real object is the ship (according to the designer's intentions), where the properties modeled are
those that are relevant for most naval architectural calculations and other functions related to the early design stage.
The model is in this case formed by data structures in the computer. The subsystem of NAPA named SM handles the creation of the model and
the extraction of data from it for various purposes. The definition of geometric forms is handled by the geometry subsystem, where in fact most of
the actual work is done. The geometry subsystem is therefore an integral part of the ship model concept, and the ship model in the sense of a
subsystem of NAPA only provides the administrative framework.
When using the ship model concept, the focus is set on describing the ship, rather than creating input for individual applications, although the
applications that the model is intended to support must be taken into account.
This way, one can make the description of the ship easier by removing redundancies, taking advantage of the relations between different
components of the model and removing from the ship description such data that is not specific to the ship. The result is also potentially more
useful for other purposes, by removing unnecessary connections to specific analyses.
Ideally, the ship model contains a complete definition of the ship within the scope and accuracy specified. This information should be capable of
being shared with other systems needing the same data. Sharing the same primary source of information not only saves time, but it also ensures
that the same definition is used consistently.
to provide an efficient tool for the designer to express his ideas, providing among other things direct access to all analysis functions
available
to form the primary source of information about the current design.
3. Scope of application
Initially, the need for the data in the ship model was created by the need to support standard naval architectural calculations (stability, loading
conditions, etc). These applications alone need a substantial amount of information, the core of which is a description of the hull and the general
arrangement. This need is mainly restricted to the parts below the main deck, and the ship needs to be described only in terms of spaces
(compartments).
Using the same tools, the description can be extended to cover the whole ship, and taking advantage of already existing data, the description can
easily be extended to cover the structures also. Adding these, the result is a complete description of the ship with the required 'global' accuracy.
The complete ship model gives possibilities for new applications, including weight and cost calculations. Above all, the result can be treated as the
primary source for this information, which is capable of being transferred automatically to other systems. Since the NAPA ship model is used at or
near the place where the design decisions are made, the information in it has the best possibility to be up-to-date and available as early as
possible.
The degree of detail in the NAPA ship model should be such that it provides what is here termed a 'global' description of the ship. This degree of
detail corresponds to the design decisions taken at the early design stage. This information should be adequate for the analyses done at this
stage, while the detailed design of steel, outfitting, etc is then done in specialized systems, normally also by different departments in the shipyard
or design office.
In order to carry out a specific analysis task, it is not necessary that the ship model is complete; only that the necessary data for this task is
available. The accuracy can also be adjusted to the current needs - the same tools can be used in the various stages, the difference being in the
degree of detail in the description of the internal arrangement, accuracy by which the hull form is described, etc.
Most of the present system deals with the functional aspects of the ship, and for this purpose, the ship is described in terms of compartments (ta
nks, cargo spaces, accommodation, etc), reflecting the central functions of the ship. To support this, the geometry system provides the object type
called 'room'.
Using the same geometric raw material as for the spaces, the description can be extended to the structures from which the ship is built (hull,
decks, bulkheads). For this purpose, the object type called 'surface object' is used.
The surface object as such only provides a description in terms of molded surfaces, to which attributes, for example, plate thickness, can be
added. This description is enough for many purposes: graphic representations, calculations needing areas and centers of gravity, support for FE
models, etc.
A more detailed description of the structures including stiffeners, holes, seams, plates, etc is treated as a separate task handled by the NAPA
Steel subsystem. Even here, the basis is formed by the molded surfaces.
The third category of objects supported by the ship model is formed by what is called pieces of equipment. Such a piece can be anything not
contained in the other categories - from an anchor to a main engine. The primary purpose of this object type is to allow such weight components
to be handled with a connection to the geometry of the ship and to be included in output, for example, in deck plans. Originally, the concept of
equipment did not include a geometric shape of the pieces. When this is written, the equipment concept is being generalized, including, for
example, the geometric shapes, but these extensions have not yet been released.
For all of these objects, various non-geometric properties can be defined. Some of these properties are needed in the applications of NAPA, while
others can be used in output from the SM system, in user-defined applications and as selection criteria. Within certain limits, the set of properties
can be modified by the user.
5. Ship-specific information
The intention is that in the definitions of the ship model, only primary information need to be entered, i.e. information more or less directly resulting
from design decisions.
On the other hand, more general information should be capable of being defined independently of the ship. The ship model subsystem provides
the tools needed for handling also these definitions, which are normally stored in the system database.
The remaining information is mostly capable of being generated from these two categories of information.
6. Functions
The main functions of the ship model subsystem, as visible to the user, are the definitions of sets of objects and their properties, including the
general definitions stored in the database. Under the ship model, various summaries and other listings can be made, while graphic output is done
In a complete ship model, the number of objects of different kinds can be very large. It is therefore essential that good naming rules are defined
and adhered to. Regarding geometric objects, this question is discussed in more detail in the Geometry Manual.
The power of the system is in an essential way dependent on the use of standard data in the system database, and the quality of these definitions
affects the level of service that can be obtained. Regarding compartments, the crucial question concerns the use of the concepts 'purpose', 'type'
and 'class'. In order to take the maximum advantage of the purposes associated with each compartment, a good typing and classification system
is needed. Concerning the parts of the ship that have been treated by computers for a long time (tanks, cargo spaces, etc), there is an established
usage, but concerning the remaining parts, pioneering work is required by the user organizations.
This concerns even more the new parts dealing with structures and table calculation, including the Table Editor.
As presented below, the table definitions are generated automatically and you do not need to bother with these. However, within the limits
described below, the contents of the tables can be tailored to the needs of the shipyard or even a single project.
Because of the table format, all functions available for tables can be applied to the data in the ship model. This includes use of the output
functions of table calculation, use in other tables or macros or using the possibilities for sharing data with external systems.
The tables belonging to different subjects are distinguished by different prefixes, as shown by the following table:
'command' is the command by which the corresponding environment is entered from SM.
Most commands needed for arrangement definitions, and all special functions related to this are installed directly in the SM subtask. The
command DIR (direct) does not change the subject, but enters table calculation directly, changing the set of available commands to those of table
calculation. This is necessary only when one wants to do special things like change the definition of columns.
The colour and pen code definitions relate colours or line types to various properties of objects in the ship model. Colouring codes for
compartments can also be stored as compartment parameters (in PAR* or directly in the arrangement).
The prefixes listed above are used in the full names of the tables concerned. Under table calculation, this prefix is also set as the prompt.
9. Installation
The SM subtask itself is installed in parallel with geometry definition and drawing. The following scheme illustrates the set of subtasks involved:
Without the model, the table definition must be entered manually, and a model table is therefore in practice necessary for the subtasks of SM.
Standard models are delivered in the NAPA database. By modifying the model, the function of SM can be adapted to the needs of a specific user
organization or a project. The necessary properties of the tables concerned are specified below.
Some of the quantities can also be obtained with the aid of calculator functions, but even for these, SM handles the calculation slightly more
conveniently and efficiently.
The available quantities and their arguments are presented separately for the different types of objects supported by SM.
SM uses the same mechanism internally when results are requested for various purposes. This is seen as so-called hidden columns appear in the
tables (seen by using SEL ALT). (The column OBJREF, visible the same way, is added for the convenience of SM only.) The hidden columns are
removed before storing in the database.
Note that this paragraph refers to calculations - the combination of data from other tables is done with the normal table calculation syntaxes.
Table of Contents:
1. General
1.1. Purpose
1.2. Current arrangement
1.3. Combined arrangements
1.4. Storage of arrangements
1.5. Arrangements as geometric objects
1.6. Bottom surface
2. Properties of compartments
2.1. Categories of parameters
2.2. Overview of standard quantities
2.3. Room-specific parameters
2.3.1. Name (NAME)
2.3.2. Purpose (PURP)
2.3.3. Description (DES)
2.3.4. Alternative name (CCODE)
2.3.5. Inclusion control (INCL)
2.4. Parameters associated with the purpose
2.4.1. Description of the purpose (PDES)
2.4.2. Type (TYPE)
2.4.3. Classification (CLASS)
2.4.4. Density (RHO)
2.4.5. Steel reduction
2.4.6. Capacity (CAP)
2.4.7. Permeability (PERM)
2.4.8. Variable permeability (IPERM)
2.5. Properties of substances
2.6. Difference between purpose and contents
2.7. Calculated parameters
2.8. Calculating the permeability
2.9. Compartment description
2.10. Deck height
2.11. Bottom areas and related quantities
2.12. Sounding devices
2.13. Handling undefined values
3. Definition task SM
3.1. Work arrangement
3.2. Main definition functions
3.3. Example
3.4. Differing commands between SM and TAB
3.5. Height for deck sections (command H)
3.6. Other definitions
3.7. Registering arrangements
3.8. Getting a fast start
4. Getting information
4.1. Listing in the input format
4.2. Drawing functions
4.3. Overview of stored arrangements
4.4. Checking an arrangement
5. Output functions
5.1. Listings related to arrangements
5.2. Selecting and sorting
5.3. Available quantities
5.4. Examples
5.5. Arrangement drawings
5.6. Functions concerning neighbouring compartments
5.7. Calculator functions
6. General definitions related to arrangements
6.1. Storing of parameter definitions
6.2. Purpose definition subtask
6.3. Automatic additions to PAR*PRO
6.4. Use of non-standard purpose definitions
7. Tailoring the arrangement tables
7.1. Necessary properties of an arrangement table
7.2. Standard table definition
1. General
1.1. Purpose
For those functions in NAPA dealing with compartments, an arrangement, in the sense used in the ship model subsystem, is normally needed in
order to provide the necessary information.
The most important piece of information is the purpose telling the role of the compartment in the ship. From the purpose various other properties
can be derived. An arrangement can often be defined by simply entering the compartments and their purposes.
In the same way as there is a current version of the project, from which data is fetched without separately specifying the version, there is a current
arrangement used as the source of arrangement related data.
Unless otherwise specified, the system automatically selects the one specified as permanent (using the REG command under SM). A different
arrangement can be made current with the command ARR of the current task (e.g. LD) or (in special cases) with the command !SM.
If one has fully defined ship loading conditions, damage stability can be run more efficiently with an arrangement subset containing mainly the
compartments below the main deck. REG command. With machines getting faster, this aspect has more or less lost its significance.
The current arrangement tells the set of compartments belonging to the arrangement and their properties. Therefore, the properties handled by
SM are available for only those compartments that belong to the arrangement. When changing the arrangement, the properties of a given
compartment may change or become undefined.
In table definitions, the generic name ARR*CURRENT refers to the current arrangement, and it will be replaced by the name of the arrangement
that is current when reading the table. A subsequent change of arrangement in the current run will not affect this. The command !TAB RESET c
an be used on the task level for removing all tables in memory in order to force a table to be read with a changed arrangement.
It is often useful to define an arrangement as a combination of parts, normally compartments on the same level (deck). The complete
arrangement is then formed by combining the parts.
A combined arrangement is formed by the union of the compartments in a set of arrangements. The definition of a combined arrangement is done
with the command COMBINE, which simply gives a list of the partial arrangements. The same compartment may occur in more than one partial
arrangement (for example, an engine room that passes through several decks), and if one wishes that the parts shall work independently, the
compartment must be mentioned in all parts. If a compartment is defined with different properties in the different parts, those of the first part will
be used.
When a combined arrangement is used, it is expanded, meaning that the partial arrangements are replaced by their components. When a
combined arrangement is read under the SM task, it is expanded, and it can be used for listing and other purposes. However, modifications can
only be done to the partial arrangements.
For a combined arrangement, the system automatically adds the option P (see the COMBINE command under table calculation), causing the
quantity PART to be added at run time, telling the partial arrangement from which each compartment is fetched.
Arrangements are stored in the database with the prefix ARR* For example, an arrangement named DECK1 is stored as ARR*DECK1. The prefix
is allowed but it is not necessary in commands that specifically concern arrangements. In commands not restricted to arrangements (for example,
SECT under task DRA), the prefix must be given.
An arrangement contains a list of rooms in the same way as a combined room, and it can be used as such. When used in commands dealing with
geometric objects, it is not evident from the context that an arrangement is designated, and the ARR* prefix must be added. Examples of such
use are SECT ARR*A, PLOT CSE ARR*DECK1, INF **ARR*A.
For a (partial) arrangement, a bottom can be defined (the command H), either by a fixed or varying height or by the name of a surface. This is
used for generating the deck contour and contours for deck plans. If no bottom has been defined, deck plans are made using the same contours
from which the bottom area is calculated. The H command is useful mainly when the arrangement if defined as a combination of decks.
2. Properties of compartments
This section describes the properties that can be associated with compartments in an arrangement.
The parameters associated with compartments in an arrangement can be divided into the following categories:
standard parameters
added parameters
calculated parameters
The standard parameters, for example, density, are those that applications in NAPA expect to be available. Added parameters are parameters
that can be added by the user's own definitions, and they can be used in various general functions. An alternative identification of a compartment
could be an example of such a parameter. Calculated parameters do not depend on any definitions made under SM, but they are made available
in the functions supported by SM. Examples are volume and bottom area.
The standard parameters and the calculated ones are described below.
Other parameters can be added as needed. The values must either be entered directly (as primary columns) or generated by formulas or table
functions. Their use is restricted to the general functions (in output, as basis for other quantities, for subset selections, for colouring of plans, etc).
The following parameters can only be defined directly for each compartment:
NAME name
PURP purpose
The following parameters are normally obtained indirectly from the definition of the purpose, but they can also be defined directly:
CLASS class
TYPE type
PERM permeability
This section describes the parameters that are room-specific, and they can only be defined for each room individually. The symbols in
parentheses are the names of the corresponding quantity.
The name is the name of the object (room) providing the geometry and it is expected to be the key quantity in the arrangement tables of the
compartment. It also the identifier used in SM.
The purpose of a compartment describes the intended use of it. It is represented by a symbol that refers to a definition stored in the database in a
PAR* table. If the purpose of the compartment is to carry a given substance, the name of that substance is used for describing the purpose.
This is a text that can be used in output documents/lists to describe the (individual) compartment more closely (e.g. 'Main engine room'). It can be
fetched from the room definitions, provided that such an instruction is made in the arrangement definition (calculation rule SM given to the DES
column).
The alternative name is a name that can be used in documents in cases where a specific naming system is required (e.g. 'tank codes'), differing
from the one used internally (i.e. NAME). Other similar identifiers can be added as needed. CCODE is normally intended for output purposes, but
in loading conditions (LD), it is available for designating compartments instead of NAME.
This quantity has been added primarily because of Onboard-NAPA, for the purpose of handling ships where movable decks, bulkheads or similar
make it possible to utilise the spaces in different ways. INCL tells whether a compartment is active (1) or not (0). This feature is supported in
loading conditions and geometric operations as far as needed by the Onboard-NAPA. Do not include this quantity unless there is a specific need
for it.
The following parameters are normally deduced from the purpose of a room, but if needed, they can be defined directly for a room as so-called
exceptions.
This is a text that can be used in output for describing a purpose, for example, 'Engine room' for purpose=ER.
The type provides a classification on physical grounds. Compartments designed for liquid contents, bulk contents, machinery spaces or
accommodation are examples of different types. The type is used for such purposes as determining when to apply free surface corrections. The
types used for rooms with the purpose of carrying some substance are described in the next paragraph.
The main use of the type is presently in the loading conditions, where the relevant types are those presented in the next paragraph. In other
contexts, little use is presently made of the type, and the symbols are presently only partly standardized.
While the type concept is related to the technical and physical aspects of a compartment, the classification should reflect the role in the operation
of the ship. For example, a fuel oil tank and a cargo tank could have the same type, but different classes. The same is the case with a passenger
cabin and a crew cabin. Conversely, two cargo spaces could have the same class but different types.
Presently, the standard system functions make little use of the class concept, except in loading conditions, where the class can be used as a
basis for free surface rules. The symbol B is reserved for bunkers and X for ballast.
Other uses for the class is in selection criteria, for example, when colouring arrangement plans in order to show subsets such as 'passenger
accommodation', or when selecting a subset of rooms for compartment lists (see the command SUBSET).
This parameter is relevant only when there is a content associated with the purpose. The unit weight is presently always expressed as
weight/volume (density), as presented below.
The steel reduction defines the fraction of the molded volume to be deducted in order to give the net volume.
In principle, this is a property of the compartment and not of its purpose, but since steel reductions are mostly based on standard values rather
than calculated individually for each tank, it is practical to associate these standard values with the purpose. If the standard value cannot be used
for a specific compartment, a different value can be defined directly for that compartment.
The steel reduction does not take into account the distribution of the reduction. If this is necessary, the reduction has to be done by a reducting a
geometrical object from the compartment. In the CP subsystem, it is possible to define a steel reduction that varies with the filling, but it is only
used by CP for sounding tables and in the inclining test.
The capacity defines the fraction of the net volume that can be loaded. The reasons for having a non-unity capacity may be tied to the purpose of
the compartment or to some property of the compartment itself. In the latter case, the capacity is analogous to the steel reduction, where the
purpose provides a default, which can be replaced by a compartment-specific value.
The permeability defines the percent of the compartment that will be filled with flooding water. It is used in damage stability calculations, unless
replaced in the damage definition.
The variable permeability defines the percent of the compartment that will be filled with flooding water as a function of height p1,z1,p2,z2,...,pn or
as a function of draught T,p1,t1,p2,t2,...,pn. It replaces the constant permeability whenever given. It is used in damage stability calculations,
unless replaced in the damage definition. IPERM definition as a function of draught is required e.g. for cargo spaces in probabilistic damage
stability calculations according to SOLAS 2009. Below is an example of the IPERM definition for a Ro-Ro space of a ship with the following
calculation draughts:
T,0.95,6.2,0.9,6.9,0.9
In this example, the permeability is 0.95 when the draught is less than 6.2 m, 0.9 between 6.2 m and 6.9m, and 0.9 with deeper draughts than
6.9m. The draughts defined in the IPERM definition can be any draught between the calculated draughts, (DL, DP, DS) and preferably half the
distance (as in the example) to maximize the margin for changes in the calculation draughts.
The word 'substance' is used here in an enlarged sense, covering all the various types of matter that can occur as varying contents of the spaces
of a ship. It may therefore stand for things such as automobiles and passengers.
The type of substance influences the logic of many system functions, and there is therefore a fixed set of types defined. The symbols shown in
brackets are the ones used in definitions.
homogenous (H)
The basic property of this type is that it fills the volume available. The reason for defining this type may be that the substance actually has
this property, but more frequently, it is used for fast loading of given amounts of a load without calculating the exact distributions. There is
therefore defined the special case LH, standing for a liquid that is otherwise treated as homogenous, but for which a free surface
correction may be applied. If the capacity is greater than the slack limit, the compartment will not have a real free surface correction but
the compartment is taken into account when applying the IMO correction.
A homogenous substance has no fixed density, and the density defined for it represents the maximum density allowed.
liquid (L)
A liquid fills the given volume to a given level, having a predefined density. A liquid moves when the heeling angle of the ship is changed
(it has a free surface).
bulk (B)
A bulk substance fills the space to a certain level in the same way as a liquid, but no free surface corrections are taken into account. This
is the default behaviour of substances.
grain (GR / GRX)
This type informs the system that the contents are subject to the rules concerning grain loads, and must be taken into account when
calculating grain shift moments. In other respects, the type is treated as bulk.
containers (C)
This type controls the function of the MASS command under the LD task, causing the load given to be interpreted as the name of a
container load.
partially movable cargo (PMC)
This type is reserved for cargo that should trigger the logic related to dredgers in LD.
Deck Load (D)
This type is reserved for timber deck loads which should be assumed to contribute to the buoyancy when calculating the GZ curve for
loading conditions.
User can define new types under PAR*PRO according to individual needs. Needs may arise when building applications using the logic of
separating purposes (or compartments or loads) into groups.
In addition to the types presented above some other types can be found in the PAR*STD table in the NAPADB. Their role is merely to serve as an
example and their explanation is:
Density (RHO)
Theoretically, the unit weight should be defined as weight/volume for other loads than solids, for which weight/area should be used. Because of
the rather marginal importance of solid loads, only weight/volume is handled.
This section adds some notes about the distinction between the following concepts:
purpose
contents (designed)
contents (actual)
A large portion of the compartments of a ship have the purpose of carrying some load. It has not been found practical to have different symbols
for a substance and the purpose of carrying that substance, for example, 'ballast water' and 'tank designed to contain ballast water'.
Therefore, a common symbol (BW in this case), designates both aspects, and it has a single definition. If there are no contents associated with a
purpose (e.g. 'engine room'), some parameters are irrelevant and they can be undefined.
It is also possible that a compartment is designed to contain many alternative loads (e.g. bulk/ore). The properties associated with such a purpose
can either be partly undefined (e.g. no density), or one can assign default values to be used when no specific load is defined.
One must distinguish between the design contents (purpose) and the actual contents (load). The design contents, as connected with the
purpose of a compartment, is one aspect of the designer's intentions. It serves as default when compartments are loaded without specifying the
load and guides the collection of various summaries. The actual contents, as occurring in a loading condition, may be any substance. If there is no
content associated with the purpose, or if the compartment is designed for many loads (e.g. bulk/ore), the type of load must be specified explicitly
in the loading conditions. In the Loading Conditions Manual, it is described how the parameters of a tank are selected when the actual load is
different from the design load.
Under the Loading Conditions task, the quantity LOAD tells the current load, while PURP gives the purpose as in SM. These are the same only
when the compartment is loaded with the design load.
A mass load is by definition a load that is not loaded into a compartment. The formal location associated with a mass load is assigned
purpose=MASS, and the load is given by the quantity LOAD.
The following quantities are available without a specific definition in the LIST, SUBSET and SORT commands under SM, and in any application
using SM as the source. For example, these quantities can be used as the basis for colouring or in the ID command of the drawing task. Note
that these quantities are treated as parameters of the compartments in the arrangement, and they are not available for other compartments (when
asking SM), even if most of them could be evaluated independently.
The same quantities are supported under table calculation when using formula=SM.
When one of these quantities is needed under SM, the values are fetched and added as a so-called hidden column to the current table, as can be
seen with the command SEL ALT. If the quantity already exists in the table, it is used as it is.
The permeability, as used in calculations related to damage stability, is normally handled as an ordinary compartment parameter. There is,
however, the possibility to generate it automatically in SM. It should be checked that the definitions listed below are consistent with the rules used
and the usage of the type.
The decision made by SM is made on the basis of the compartment type as presented below. In this respect, it differs from all other quantities
which have the compartment as the argument.
The permeability is deduced from the type according to the following rule.
The verbal description of the compartments (quantity DES) can be given in the definition of the objects, for example
This can be fetched to the arrangement by defining the DES column with calculation formula=SM:
COLUMN DES SM
If the description is consistently given in the room definitions, no DES column needs be added to the arrangement table - fetching the description
is done automatically. Alternatively, DES can be defined as a normal, primary column.
CALC DES SM
(directly under table calculation) descriptions are fetched without creating a permanent dependence.
The deck height HD is calculated as zmax-zmin. This rule fails if the compartment locally extends outside the natural deck heights and it must be
corrected in the definition or the object. Keeping this restriction in mind, the quantity is supposed to be useful for normal accommodation
compartments. When needed, more exact values can be assigned with the H command in the room definition, where HD can be given directly.
Bottom areas are generated from a section of the compartment with the surface considered as the bottom. This surface is defined as the one
occurring as the lower z-limit in the LIMITS command of the ROOM command. In most compartments that have a naturally defined bottom this rule
works well, but in other cases, the section to be used must be specified in the definition of the object (command H).
Warning: the intersection of rooms with facet surfaces may occasionally fail, and the bottom areas should be carefully checked. Where
needed, the H command must be added to the room definition.
The bottom area is set to 0 if there is no bottom surface according to the rules above, or the surface is a general one, for which intersecting is not
implemented.
The section itself can be checked graphically with the PLOT command:
PLOT name/B,
for example
PLOT ARR*DECK1/B
It can also be seen with the command DRW when another intersection surface has not been specified in the H command or when specified in the
setup:
The quantities are calculated from the horizontal projection of the section.
The quantities LWALL (length of wall) and SWAREA (side wall area) are also derived from the bottom area section. The length is simply the
length of the section (after projection). For combined rooms or possibly for difficult section surfaces, there may be extraneous lines in the section
that will be contained in the length (check deck plans). The side wall area is calculated as LWALL*HD. There is no function available for
calculating a better defined side wall area, but this logic is supposed to be useful for those compartments where this quantity is likely to be needed
(having vertical walls and a fixed height).
The quantity SDE is a string that contains a list of sounding devices as defined under CP. The devices are listed in an unspecified order
separated by commas, for example, 'MS,MS/V1,RS'. The original reason for introducing this quantity was to support selections such as
SUBSET SDEV<'MS'
Values of parameters may be intentionally undefined because they are irrelevant or because a project has not reached the stage when the values
are needed. Values may also be undefined because of some error, for example, the geometry of a compartment being incorrect or undefined.
An undefined string value is represented by an empty string, while an undefined numeric value is represented by zero. These values are used
when an undefined value is encountered in some context, for example, in a listing. Depending on the context, the usage of an undefined value
may be an error of various degree. The presence of such errors is normally not signaled specially, but it is visible in the results as zero volumes or
similar. An exception is formed by the steel reduction, for which an undefined steel reduction cannot be distinguished from the assumed 'no steel
reduction'.
3. Definition task SM
The definition of arrangements is done under task SM, which is installed in parallel with the geometry definition task (DEF) and the general
drawing task (DRAW). Thus, the geometry definition functions and the drawing functions can be used without losing the current state of
arrangement definition.
As a newer alternative, the task is also available under the graphical user interface as the SM main window. These tools can be used in parallel.
Since the arrangement is defined by a table, it can be treated with the bare Table Editor or anywhere under the TAB task. It is recommended to
do this in a separate work area:
TAB
WA ARR*
Under the SM task, the definition, listing and other functions are done for the work arrangement. When entering the definition task, the current
main arrangement is also assigned as the work arrangement, unless the work arrangement has not been selected previously. The reverse is only
partly true: when selecting a new work arrangement with the command GET, it is made the current arrangement if it is registered.
The main definition functions are formed by adding or deleting compartments and defining their parameters. These tasks are done by the general
table calculation module, which may be entered directly (the command DIR), but all frequently needed commands can be used in the SM task.
Some commands work differently when used directly under SM as presented below.
The basic command for adding new compartments is ADD, where the purpose may be included:
The basic command for changing the parameters is DEF. For compatibility with old SM versions, the synonym PAR can also be used. With this
command parameters are assigned to a given compartment, either by entering the values in the column order or preceded by explicit identifiers.
Assuming that the three first columns are NAME, PURP and DES, the following commands are equivalent:
If the compartment given by DEF does not exist, it is added. Since this may be a typing error, a warning is given, but only for the first one of a set
of consecutive additions.
It is possible to give a value for a generated quantity (e.g. RED) as a so-called exception, which can only be done with an explicit identifier, e.g.
For more information about the definition commands, see the table calculation.
3.3. Example
The following example defines an arrangement using either the DEF or ADD commands, giving the purpose as the only property.
NEW DECK1
DEF R10 BW
DEF R72 BW
DEF R73 BW
DEF R11 DT
DEF R601 ER
DEF R20 FW
DEF R21 FW
DEF R40 HFO
DEF R41 HFO
DEF R50 HFO
DEF R51 HFO
DEF R52 HFO
DEF R202 ST
NEW DECK1
ADD PURP=BW R10, R72, R73
ADD PURP=DT R11
ADD PURP=ER R601
ADD PURP=FW R20, R21
ADD PURP=HFO R40, R41, R50, R51, R52
ADD PURP=ST R202
The following commands work differently under SM and from under table calculation (TAB):
The command SELECT is otherwise equivalent with the command SUBSET under TAB, but only the standard selection syntax is available (not
calculator formula). On the other hand, SM makes sure that the quantities used in the selection are available. The same concerns the command S
ORT.
The DES command under SM is an entirely different function from that under table calculation. While the latter lists the definition of the table (i.e.
the table structure), the DES command under SM lists the definition of geometric objects or arrangements.
The height defined with the command H tells where to intersect the compartments in the arrangement in order to get the sections representing the
bottom. These sections are used for drawing deck plans and for drawing the deck contour. The height can be given as a fixed height value, as a
height that varies with x or by the name of a facet surface. This surface should cover the whole x- and y-range of the ship, preferably with a
margin.
The translation shown in the last example can be used for restricting the effect to rooms either below (as in the example) or above the surface.
More possibilities for controlling these sections are obtained if a plan definition is made (subtask PLD under DRAW). A plan with the same name
as the arrangement part is used automatically when defining a setup.
If no bottom has been defined, deck plans are drawn using the same contours as used for generating bottom areas.
An explanation concerning the arrangement as a whole can be added with NOTES (or TEXT). The first item in the notes is visible in the output of
CATALOG. The text is also available as the item TX1 in a column definition referring to a set of tables (see the command TSET under table
calculation).
The arrangements added to the list should be those that have an independent function, not those that are only parts of combinations or made for
test or similar purposes. One of the registered arrangements is the current main arrangement meaning the one used as default when
arrangement related data are needed and no other is made active (analogically with the project version registered as permanent). The other ones
in the register are stored for information only. The current main arrangement is defined with the command:
Initially, an arrangement A is registered as permanent. If no such arrangement is available, an empty one is generated.
With the REG command, one can also specify arrangements to be used as default under LD, CP, DA or WG.
In a new project where room definitions have been made, a fast way to get the names of the compartments to the arrangement is provided by the
!SELECT command:
SM
NEW A
!SELECT TYPE=R
!DO 'ADD %NAME' NAME=LIST()
LIST is the name of the array generated by !SELECT. A stronger selection criterion can be given in the !SELECT command if it serves the
purpose, for example,
4. Getting information
The following sections present output functions assisting the creation and management of arrangements, while the main output functions are
presented later.
The normal DES and EDIT commands list data in input form. These commands are used for presenting the arrangement as a whole or to give the
geometric definition of objects. In order to present the definition of single compartments in the context of the current arrangement, the commands
P (listing to the screen) or PED (to editor work area) are used. The compartments to be presented are either all, those named or those satisfying a
selection criterion (see below). Normally, the data is given in the form of DEF commands, but alternatively, ADD commands can be used (option *
in the DES command). See the examples given above.
For graphic check of the arrangement, the drawing functions started by commands SETUP and DRW are available. These commands and the
commands ID and FILL are available directly under SM; otherwise, the drawings must be made under subtask DR.
Fill colours, line types and texts can be used for expressing other properties of the compartments than the geometry. For more information, refer
to the Geometry Manual. For functions specially designed to help locate errors, see below.
A list of stored arrangements can be obtained with the normal CATALOG command. The command !SM shortly lists information about the
registered arrangements.
More information can be obtained with the command MAP. It lists the names and descriptions (from the TEXT command) of the registered
arrangements and optionally the compartments contained. The following is an output sample of MAP L:
Registered arrangements
A
DECK0
R62 R72 R73 R44 R45 R30
R31
R55 R56 R11 R33 R47 R58
R63
R10 R20 R21 R46 R60 R61
R53
R54 R57 R32
DECK1
R10 R11 R20 R202 R21 R302
R40
R402 R41 R42 R43 R50 R502
R51
R52 R601 R72 R73
DECK2
R70 R71 R10 R11 R702 R201
R301
R501 R401 R601
DECK3
R200 R300 R400 R500 R600 R700
R701
R100 R101
DECK4 deck number 4
R420 R421 R80 R481 R482 R430
R431
R440 R441 R449
DECK5
R80 R550 R551 R520 R521 R530
R540
R541 R581 R582 R549
For checking the definition of the arrangement itself and the geometry behind it, the normal listing and drawing functions can be used. There are,
however, errors that can be difficult to see, for example, two compartments that overlap.
Specifically for this purpose, the option ID PTR is available in the drawing task, adding an additional contour parallel to the main one. In the
following example, it is used with the DRW command:
Another useful check is obtained by a macro delivered in the NAPADB and started with the command
PLOT .ARRCHECK
It draws the current arrangement in the current SETUP, using a special drawing mode causing graphics drawn twice to cancel out. Thus, if there
is a doubly defined part, it will obtain a different colour. The following example shows the same setup as above:
5. Output functions
The information stored in the ship model is needed by other functions within NAPA and outside NAPA in the form of various documents and in
other systems by link functions.
Fetching information needed in other subsystems of NAPA is done automatically. Documents that directly present various aspects of an
arrangement are formed by lists produced under SM task and by drawings created in the general drawing task. The LIST command installed
under SM is presented in more detail below. The drawing functions are presented in the Drawing Manual. Here only an overview of the
possibilities is given. See also the check functions presented in the preceding chapter.
Link functions associated with arrangements are formed by drawing links, by which drawings can be transferred and the geometric links by which
geometric objects can be transferred. The drawing links are installed under PLOT task, where selected drawings can be output for use in other
systems (see the command SEND). The geometric links are available under DEF task in GM, and they presented in the Geometry Manual.
Information can be fetched to macros by calculator functions. Some special output functions are provided by the service functions.
The purpose of the command LIST under SM is to produce various lists that contain data about individual compartments or summaries for groups
of compartments. The bases for this listing function are the compartments belonging to the work arrangement, i.e. the one in the work area of
SM.
The list function is based on the general table output module controlled by the commands LQ (for selection of quantities) and TOO (table output
options, for controlling the layout).
By using the possibilities of selecting, sorting, grouping and calculating totals, a variety of lists can be produced. See !EXPL LQ/GEN and
TOO/GEN for general instructions.
Selecting subsets of compartments can be done with table output option SELECT or with the command SUBSET (or the command SELECT which
is a synonym for SUBSET). Similarly, controlling the order of output can be done with option SORT or command SORT.
There is therefore a double facility for these functions, which in many cases are interchangeable. The interaction between these functions and
their differences are presented here.
While the table output option SORT only concerns the output, the command SORT actually sorts the components of the arrangement. The
command also contains additional options, the most important of which is to sort according to a secondary sorting criterion. For example, if the
basic sorting criterion is PURP, a secondary criterion NAME can be given for sorting within groups of constant purpose.
The main difference between the SUBSET command and the table output option SELECT, is that a SUBSET command of the form SUBSET
PURP=(p1,p2,...) has the additional effect that the purposes are listed in the same order as they are given in the command. (Normally, a selection
criterion simply tells whether a component is included or not).
Sorting by the table output options overrides the SORT command, while a table output option SELECT further restricts a possible selection by the
SELECT command.
The result of the subset selection with the SELECT command is available in the array SUBSET.
Examples of subsets:
SUBSET CGZ=2...4 Selects rooms with the center of gravity in the specified range.
SUBSET TYPE=L Selects compartments with TYPE=L, other than ballast water tanks.
-PURP=BW
SUBSET Selects compartments so that the name, when extracting the number it contains, is in the given range. (For example,
+NAME=100...199 R123 is selected but not R270).
In the list produced with the LIST command, all quantities defined in the arrangement table are available. In addition, there are those that SM
provides as calculated quantities. Because the set of quantities stored in the table may vary, the set of available quantities (as seen with LQ ALT)
is checked each time the table is changed. If the current selection contains a quantity that is no longer available, it is not removed but a warning is
obtained when listing.
5.4. Examples
The first example shows a simple list of compartments that are part of an arrangement, where the quantities associated with the loading capacity
are selected. The quantity selection is given by
NAME name
PURP purpose
VOLM volume moulded M3
RED steel reduction %
VNET net volume M3
RHO density TON/M3
CAP filling capacity
WLMX maximum load TON
With TOTAL as the only table output option, the resulting list is:
The other example demonstrates using table output options for grouping and adding subtotals. The list selection is given by
Note the quantities added in brackets. These are not listed, but used in the formulas or in the texts added by the table output options. The table
output options are
The following output example is made with SELECT TYPE=L, i.e. tanks only.
------------------------------------------------------------
NAME PURP VOLM VNET CGX CGY CGZ IY*RHO
m3 m3 m m m tonm
------------------------------------------------------------
CAPACITY OF Diesel Oil (RHO=0.86)
RT022 DO 36.5 35.8 20.15 -1.69 0.71 22.0
RT021 DO 36.5 35.8 20.15 1.69 0.71 22.0
------------------------------------------------------------
SUBTOTAL DO 73.1 71.6 20.15 0.00 0.71 43.9
CAPACITY OF Fresh Water (RHO=1)
RT001 FW 30.7 30.1 13.27 1.62 1.82 11.8
RT002 FW 30.7 30.1 13.27 -1.62 1.82 11.8
RT071 FW 80.9 79.3 71.16 0.00 3.45 19.2
------------------------------------------------------------
SUBTOTAL FW 142.3 139.5 46.17 0.00 2.75 42.8
------------------------------------------------------------
NAME PURP VOLM VNET CGX CGY CGZ IY*RHO
m3 m3 m m m tonm
------------------------------------------------------------
CAPACITY OF Gray Water (RHO=1)
RT044 GWT 18.1 17.7 37.50 -6.07 1.08 8.4
CAPACITY OF Heavy Fuel Oil (RHO=0.94)
RT051 HFO 33.8 33.2 51.57 1.06 1.00 8.0
RT041 HFO 88.0 86.3 41.09 2.06 1.00 60.6
RT042 HFO 88.0 86.3 41.09 -2.06 1.00 60.6
RT052 HFO 33.8 33.2 51.57 -1.06 1.00 8.0
------------------------------------------------------------
SUBTOTAL HFO 243.8 238.9 44.00 0.00 1.00 137.1
CAPACITY OF SLUDGE (RHO=2.38)
RT043 SLU 18.1 18.1 37.50 6.07 1.08 20.1
CAPACITY OF Water Ballast (RHO=1.025)
RT023 WB 90.0 88.2 19.42 0.00 0.75 2274.1
RT045 WB 114.6 112.3 43.92 0.00 1.11 1685.9
RT053 WB 127.9 125.4 54.13 0.00 1.18 790.6
RT061 WB 58.9 57.7 63.79 0.00 1.21 56.1
RT003 WB 170.2 166.8 9.92 0.00 2.19 2187.2
RT081 WB 40.4 39.6 79.08 0.00 2.55 3.6
------------------------------------------------------------
SUBTOTAL WB 602.0 590.0 37.12 0.00 1.49 6997.6
------------------------------------------------------------
TOTAL 1097.4 1075.9 38.70 0.00 1.48 7250.0
The following example shows a summary where totals for each purpose are listed:
----------------------------------------
Purpose Volume Load Area
m3 ton m2
----------------------------------------
Cargo 3282.3 3282.3 462.0
Crew cabin 991.5 0.0 311.5
Crew corridor 971.2 0.0 303.0
Crew mess 119.9 0.0 42.8
Office 93.2 0.0 25.3
Control room 98.2 0.0 27.1
Wheelhouse 269.7 0.0 77.0
Diesel oil 73.1 58.5 0.0
Deck store 159.4 0.0 28.6
Fresh water 142.3 132.5 0.0
Galley 206.0 0.0 73.6
Galley store 172.8 0.0 58.7
Gray water 18.1 16.8 0.0
Heavy fuel oil 243.8 213.3 0.0
Hotel store 191.9 0.0 39.4
Lift 393.0 0.0 30.1
Linen store 250.6 0.0 46.1
Air condition 209.7 0.0 48.2
Apparat space 1186.4 0.0 242.5
Machinery sp. 1432.9 0.0 492.1
Repair shop 96.8 0.0 25.5
Machine store 99.1 0.0 25.1
Bar 1302.4 0.0 487.9
Pass. cabin 3290.4 0.0 1144.5
Conference 659.2 0.0 235.4
Pass. corridor 2768.2 0.0 988.6
Restaurant 1391.4 0.0 543.5
Sauna 288.8 0.0 103.1
Shop 430.1 0.0 153.6
Sludge 18.1 40.9 0.0
Shop store 186.2 0.0 43.9
Stairs 380.7 0.0 50.8
Void 248.8 242.3 0.0
Water ballast 602.0 604.8 0.0
----------------------------------------
TOTAL 22268.0 4591.5 6110.0
The functions for supporting drawings related to arrangements are contained in the commands SETUP and DRW in the drawing task. These
functions are described in more detail in the Drawing Manual. Here, only a short overview of the possibilities is given.
Primarily, what can be shown in these drawings is the geometry of the arrangement, presented in the form of sections between various objects
and planes or deck/bulkhead surfaces. The objects intersected can be volumes (rooms) or surfaces (decks, bulkheads), depending on what
aspect is to be shown.
The intersecting surfaces can be any plane section through the ship, or a section at some of the inner surfaces. In the latter case, the inner
surface must be a plane or a combination of planes (facet surface). These surfaces should be defined so that they go through the ship (not just
halfway), preferably with a margin with respect to the ship dimensions. In order to select the objects on one side of the surface only, a small
translation can be added to the surface using the - or + suffix, for example, TANKTOP+, TANKTOP-, or explicitly TANKTOP+0.05.
Alternatively, a fixed fill colour/pattern can be given in the FILL command, and then applied to selected subsets. For example,
FILL RED
DRW SELECT CLASS=E
The following example shows a plan where all tanks are marked:
DRW ALL
FILL 5
DRW SELECT TYPE=L
When drawing sections of structures, the line types can be used similarly expressing various properties.
The functions presented here are available in the form of service functions:
The basic function of testing the neighbouring relationships is implemented by inspecting extreme coordinates only, and it will not work correctly at
all times.
The main purpose of these functions is to assist in identifying places where some special measure, for example, special insulation, is needed
because of the kind of neighbouring compartments.
The following example finds all such pairs where one has PURP=MMA and the other has TYPE=A:
@l1=arr(3) @l2=arr(3)
@sm.nbpairs('PURP','MMA','TYPE','A',l1,l2)
Parameters of compartments can be accessed with the calculator function CPP (compartment parameter):
CPP(name,par)
where 'name' is the name of a compartment and 'par' is the symbol for one of the quantities available in the current arrangement. Examples:
CPP('R10','PURP')
CPP(NAME,'DES')
The properties are fetched from the current arrangement, which must be loaded at the call.
The calculator function PP (purpose parameter) returns a value associated with a given purpose, for example:
PP('HFO','RHO')
PP(PURP,'PDES')
The source of the parameters depends on the current arrangement as presented above. Normally, the table PAR*PRO and PAR*STD are used.
The function FCODE tells the fill raster or colour defined for a given purpose or substance, for example, FCODE('HFO'). The source of the fill
codes is determined as when using FILL PURP.
In order to extract data from a non-standard table, the calculator function EVAL can be used. For example, using the example in section Compart
ment description, the steel addition factor for a compartment with purpose=BW could be obtained by
EVAL('STADD','BW','PAINTDATA')
More functions are available in the form of service functions (see !COM SM.F). The concept of service function is newer than the basic functions
listed above. The present set of service functions is very limited and it contains some general functions such as inquiring the current arrangement
and some special services such as SM.NPAIRS presented above.
This section treats the definition of general properties not related directly to the compartments, mainly the attributes attached to the purpose
(PURP). A common property of all these definitions is that they are done as tables under the table calculation module. The standard values are
stored in the system database, but project-specific ones can be stored in the project database.
The only necessary set of definitions is the one that defines the properties of substances or compartment purposes.
As properties of compartments, these parameters can (less conveniently) be defined directly for the compartments, but to use the properties of
substances (such as the density of fuel oil) independently of compartments, these definitions are necessary.
The parameter definitions are stored in tables with prefix PAR* that have the quantity PURP as the key column.
Parameters defined for general usage, independent of specific ships, are stored in the system database in a table named PAR*STD.
In addition to this, ship-specific parameter definitions can be stored in the project database (separately for each version). This can be used for
definitions differing from the standard ones or for purposes not considered generally useful. Storing these definitions in the project database also
isolates the project from possible later changes in the system database. The standard name for the table containing these definitions is
PAR*PRO.
In the standard definition of an arrangement, the parameters are made available by the following statements:
APPLY PAR*PRO
ALT PAR*PRO/PAR*STD
The effect of this is that all information in the table PAR*PRO is made available in the current arrangement table, and for purposes not defined in
PAR*PRO, an attempt to find the definition is made in PAR*STD.
Note: this replacement is not automatically cancelled if a PAR*PRO table is made in the same run - use the command UPDATE.
By changing the APPLY command, the source of parameters can be changed. For more information about APPLY, see the Table Calculation
Manual.
For the effect of using non-standard APPLY commands in an arrangement definition, see below.
The definition of the properties related to purposes is done in the subtask PDEF of task SM. This subtask is identical to the table calculation
module - SM only creates a work area named PAR and sets the subject (=table prefix) to PAR*.
When entering the task, the table PAR*PRO is made current if it exists. If there is no such table, a new one is made by the commands:
NEW PRO
LOAD KEY ARR*CURRENT L
The effect is to create a table with the structure of the model table (PAR*MODEL), and to load all purpose symbols occurring in the current
arrangement into the table, including any values corresponding to primary columns in the table. Note that ARR*CURRENT refers to the current
arrangement, which does not need to be the same as the work arrangement.
The commands are the normal commands of table calculation, for which there is a summary below.
The following example shows the definition of a few symbols in the format used by the system.
If the general definitions in PAR*STD are in order, there is normally no need to create the project-specific table PAR*PRO. It has, however, been
found useful to add the set of purposes used in the current arrangement to the PAR*PRO table when entering the subtask PDEF. Thus, note that
the data visible in PDEF may differ from the stored contents of PAR*PRO.
The copying of parameters can be cancelled by the GET command. The GET command always gets the table of the database, thus GET PRO und
er PDEF will get the table as stored. The reverse task, updating from the current arrangement, can be done with LOAD PAR.
In the arrangement definitions, the source for the parameters attached to the purpose can be changed simply by modifying the APPLY command,
for example
APPLY PAR*SPECIAL
The effect on the properties of the compartments is obvious, but the problem arises regarding the source to be used when these parameters are
needed without connection to a specific compartment (e.g. finding the density of diesel oil). For this the following solution has been adopted.
If there is no current arrangement, the standard sources PAR*PRO and PAR*STD are used. If there is a current arrangement, the first table in the
APPLY command that has the prefix PAR* is used for project-specific parameters (i.e. the role of PAR*PRO). The ALT command is not taken into
account - PAR*STD is used for symbols not defined in the given table. The table can be specified explicitly by
!SM PAR id
The use of this command should be done with care, as contradictions can easily be the result.
The contents and the calculation rules of the arrangement tables can be adapted to the needs of the user organization or project.
However, the following properties must be maintained: the table has a key column named NAME, and it provides, directly or indirectly, values for
the quantities PURP, PDES, TYPE, CLASS, RHO, RED, CAP and PERM. The compartment description (DES) is also likely to be needed.
'Indirectly' means here that the quantities are obtained by an APPLY command, referring to a table function containing the quantity.
The following definition is the standard model delivered with the system:
This definition is selected in order to maximize the similarity with the old version of SM (before 92.1) This table allows all standard quantities to be
handled and exceptions to be defined for all quantities without modifying the table definition.
The simplest possible table definition contains the PURP column only, and uses no project-specific parameters:
Modifications are done under table calculation (the command DIR). The example below shows the addition of a primary column (DES) and a
dependent one (RED):
DIR
COLUMN DES
COLUMN RED *
END
Without the asterisk, the RED column will be a primary one that has to be assigned manually. The asterisk maintains the dependence on the APP
LY command, but now exceptions can be defined.
The contents and the calculation rules of the tables used by SM can be modified to serve the purposes of the user organization. The most likely
modification is adding new quantities, but to some extent, the calculation rules can also be modified. One example is presented in connection with
permeabilities. The examples presented here refer to compartment arrangements, but the other subjects are handled analogously.
In connection with each subject, the necessary properties of the tables, which must not be changed, are presented.
In order to make a new quantity useful in the same way as a standard SM quantity, it must be available as a column in the main definition table
(ARR*, STR* or EQP*). It is not necessary to add it as a main column - it may be added indirectly via an APPLY command. For quantities with less
general use, separate tables can be used as presented below.
As a general rule, the new quantities should be stored in columns named as a registered quantity (as done in task FORM).
If the new quantity is a primary one, a column is simply added. Otherwise, a calculation rule must be supplied, either as a formula or by referring
to another table. In the following example, the weight/m2 is added to an arrangement table, using a source named TAB*WEIGHTSTANDARD:
COLUMN W2 <TAB*WEIGHTSTANDARD
Note the prefix TAB*: the prefix must always be added when it is different from the current one (ARR* in this case). (It is here assumed that the
weight table is made under task TAB.)
The columns should preferably be arranged so that all primary columns come first. This gives the most compact output from the PRINT command
.
If a new quantity is intended to be used generally, it can be added to the model table. For added quantities not in the model table, note this: the D
ES command under SM generates data beginning with NEW, creating a table according to the model.
In order to generate data for some special purpose, for which it is not considered useful to burden the main definition tables, separate tables can
be used. The facility by which the connection to the main tables is established is the ALOAD command. This command stores an instruction to
load the key column of the table by using another one as the source.
This is illustrated by the following example. The new quantity estimates the painting work hours, using the total wall area of the tanks, a coefficient
representing additional area because of steels and the hours/m2. The two latter properties are assumed to be dependent on the purpose of the
compartment, according to the table PAINTDATA:
A table with the following definition collects a subset of compartments from the current arrangement and fetches the properties defined by the
table above:
The generic name ARR*CURRENT is replaced by the name of the current arrangement when reading the table. The ALOAD command makes the
table contain the specified subset of compartments in the current arrangement. The PURP column is necessary in order to provide the link
between this table and the PAINTDATA table.
(In this example it is assumed that both tables are made under task TAB, and consequently, have a common prefix).
For the usual administrative purposes, the standard commands NEW, GET, SAVE, REPLACE, UNSAVE, CATALOG and WHERE are available.
The PRINT (or P) command lists data by lines in the input format. The lines to be printed are designated by line numbers or by using the key
value (NAME for geometric sets, ID for pieces of equipment). Unless otherwise is specified with the command PMODE, the PRINT command lists
primary data only.
For listing in a more readable format, the command LIST is used. The command SLIST is similar, but it obeys table output options set with TOO.
The set of columns visible in listings can be controlled with the command SELECT. SELECT ALT gives a list of columns available.
Similarly, the command SUBSET restricts the set of lines included in the listings. The SUBSET command is taken into account in the calculator
functions CSUM, CMIN, CMAX, CTOT and CPSUM.
When modifying or adding lines, the most important command is DEF, by which an item can be added or its parameters modified. Other definition
commands are ADD, ASG and INQUIRE. Input with line numbers can sometimes be useful. In this case, the corresponding print mode can be set
with PMODE NR.
Return to the main task is done with the command END or OK. Changes made but not stored will remain during the run.
Note: the GET command gets the copy stored in the database, overwriting any changes that have not been stored. The command TREA
T gets the run time version to the work area.
When re-entering the subtask, the state of table calculation is restored to what it was at exit.
This subject is in most other respects also analogical with compartments, concerning the management as tables and treatment of attributes.
In this context, the structures are treated as moulded surfaces only, without any details such as stiffeners, which is the subject of NAPA Steel. The
concept of structure arrangement as such is the same in both contexts: NAPA Steel only adds new properties.
Table of Contents:
1. Purpose
2. Role of the SM subsystem
3. Geometric objects
4. Properties of structures
5. Handling of structure definitions
6. Definition of structure types
7. Sets of structures
8. Usage as geometric objects
9. Proposed organization
10. Usage of structures in drawing functions
11. Dynamic limitation function
1. Purpose
Compared with compartments, the structures can be considered as describing a different aspect of the same geometry: instead of spaces, the
structures describe the physical objects delimiting the spaces. The common geometry can also be seen in the way the objects are defined: both
are created by topological operations on the same geometric raw material.
Presently, the standard applications of NAPA are more concerned with volumes than structures and the latter are mainly needed for general
purposes such as
the calculation of quantities derived from the surfaces: area, the center of gravity
the calculation of quantities obtained by combining those above with properties provided as attributes, for example, weight
graphic representations
transfer to other systems
weight calculation
generating FEM models
NAPA Steel
3. Geometric objects
With the 'global' accuracy employed within the NAPA ship model, the geometry of structures can be represented as moulded surfaces. The plate
thickness can be added as an attribute, but it is not described by the geometry.
Thus, any geometric object type forming a surface can be used for representing structures, except grid surfaces, for which all operations needed
are not implemented. However, the object type specifically introduced for this purpose is the surface object, by which most objects can be
defined considerably more easily than by direct surface definitions.
Presently, surface objects cannot be defined in patch surfaces, for which the similar role is handled by trimmed surfaces.
As for rooms, the name used for the geometric definition is also used in the ship model definitions.
4. Properties of structures
The most important properties of the structures follow from the geometry. As for other properties, the requirements depend on the applications
where the structures are used.
It is likely that it is useful to know the type of structure according to the following categories:
It is here assumed that there is a strong connection between the aspects presented above, so that a single type can be used. For example, a
watertight bulkhead obviously belongs to the bulkheads, and its construction is likely to be different from others. From the type, various other
properties can be derived, Thus, there is a quantity STYPE, structure type, which has a role similar to that of PURP for compartments.
The following geometric properties are available as a service of SM: they can be added as a column with formula=SM,:
AREA area
The description, DES, can be obtained from the geometric definition in the same way as for rooms.
The following quantities, defined in the quantity standard, are relevant for structures:
MAT material
W2 weight/m2
W weight
With the command STR, table calculation is entered for definition of structures. The tables representing structures have prefix STR*, and this
prefix is set automatically when using command STR.
As presented above, the only property that normally need to be added to a structure is the type, represented by the quantity STYPE. Thus, the
standard table definition for this purpose is given by
The APPLY and ALT commands refer to the type definitions presented below.
When needed, the descriptive text can be added exactly as presented in connection with arrangements.
The properties that are useful to be derived from the structure type are still not well understood. In the table delivered in the NAPADB, the
following properties are recorded:
The types defined from the set defined in AP218 protocol of STEP.
7. Sets of structures
A table containing a list of structures and their properties has the analogical role with a table representing a set of compartments. The analogy is
reflected in the term 'structure arrangement'.
the given arrangement is made current in the same sense as the current compartment arrangement, i.e. it defines what structures belong to the
ship and gives their properties. Presently, the selection of line types is the only function making use of the current arrangement. Under NAPA
Steel, there is an own management for the current arrangement.
The STR* prefix must be used in commands, for example, PLOT STR*BULKHEADS.
9. Proposed organization
The best way to organize the structures of a ship remains to be found out by practical experience. This section presents a suggestion to start with.
The hull must normally be divided into parts in order to account for parts with different properties. These parts can be organized into a separate
table, named STR*HULL, for example.
Unless deckhouse walls are included as bulkheads, they can be collected into an own table.
The decks (horizontal structures) can be organized into an own table named STR*DECKS.
The bulkheads (vertical structures) can be organized in the same way as the compartments: if these are organized by decks, the bulkheads are
also; otherwise, the bulkheads are collected into a single table.
The division of bulkheads into decks does not necessarily imply that corresponding surface objects are divided similarly - when collecting the total
set of structures, duplicates are removed as for compartments. There are, however, occasions when it is advantageous to have the surface
objects defined for each deck separately. This gives better possibilities to draw perspective drawings, and makes it possible to add properties that
vary with the deck.
Different categories of structures can be distinguished by using different line types, automatically selected on the basis of a property available in
the SM definitions. For this, there must be a line type standard created as presented in connection with general definitions.
PEN *table/alt
For determining the parameters used as basis for the pen selection, there must be a current structure arrangement, as set with the command !SM
STR id.
With the dynamic limitation, the undivided object is the common source which is subdivided in the structure arrangement table. The following
columns carry out the limitation:
The NAME column gives the name of the resulting object. The syntax of LIMITS and SELECT is the same as in the corresponding commands of
the surface object definition. The source object cannot be a patch surface.
When using this facility, note that the objects are available at run time only (not in the database) and only after the table has been read into
memory as a table (e.g. by GET under table calculation, by !TAB GET or by TP.READ ). SECT, PLOT and other geometry-oriented commands do
not engage the table management for doing the updates required.
This is illustrated by the following example of fetching whole facets (BH1) and geometric division (BH2):
Note: the table must not have a check criterion requiring that the object given by NAME exists in the database.
Outfit (SM)
Table of Contents:
1. Introduction
1.1. Purpose
1.2. Objects handled
1.3. Management
1.4. Installation
2. Properties of equipment
2.1. Main components of the definition
2.2. Dimensions and locations related to equipment
2.3. Various quantities
2.4. Declaring equipment properties in the table
2.5. Reference points
2.6. Figures
3. Defining the position of a piece of equipment
3.1. General
3.2. Defining the location with separate coordinates (case 1)
3.3. Defining the location by reference to an object (case 2)
3.4. Additional options
3.5. Location in a compartment with a given purpose
3.6. Example
4. Geometry of equipment
4.1. Source and type of the geometry
4.2. Creating parametrized shapes
4.3. Adding the geometric shapes
4.4. Management
5. Modifying the orientation
6. Routes
6.1. Route concept
6.2. Properties of a route
6.3. Defining routes
6.4. Examples of routes
7. SME task
8. Drawing of equipment
8.1. Plotting in 3D
8.2. Plotting sections
8.3. Drawing in arrangement plans
8.4. Representing equipment by figures
9. Standard table definitions
9.1. Equipment
9.2. Equipment types
9.3. Routes
10. Support functions for the graphical user interface
11. Commands of the SME task
1. Introduction
This part of the ship model stores information about arbitrary objects in the ship, which can be anything from a main engine, a lifeboat or a mast to
a piece of kitchen equipment. For such objects, the word equipment will be used.
In addition, there are objects called routes, which connect places that may be defined by pieces of equipment.
1.1. Purpose
A compartment arrangement defines the ship in terms of spaces. To this, a structure arrangement adds the walls and under NAPA Steel, the
structural members of the walls can be added. The outfit subsystem adds objects inside the spaces, integrating these objects into the ship model,
so that they can be used together with the other ones in applications and output based on the ship model.
A central service of the outfit subsystem is that the location of the outfit components can be defined with respect to other objects in the model.
This way, the definition can be done without knowing the coordinates and the location can be automatically updated when the geometry changes.
The outfit components can but do not need to have a geometric shape. Without the geometry, the objects can be used for weight and cost
calculation, for production planning and various other administrative purposes. For example, it is possible to sort pieces according to the
compartment they are located in.
The modeling possibilities allow the equipment to be handled with a degree of accuracy that is sufficient for the management of space utilization.
For this purpose, the geometry of the pieces needs to be modeled with a degree of detail sufficient for the purpose. It is assumed that normally,
simplified representations are used that serve identification of the object in a plot and checking the space required.
pieces of equipment
routes
The central properties of a piece of equipment are location, size and optionally geometric shape. If no shape has been defined, the object is
treated as a box. The piece may have reference points by which locations can be controlled accurately. To this, any attributes desired can be
added.
A route connects two locations, which can be represented by pieces of equipment. A route has a specified cross section, which implies a
geometric shape for the route as a whole. To this, attributes can be added, for example weight/m.
1.3. Management
All objects are defined by tables. The objects can be grouped into as many tables as serves the purpose, and larger sets can be formed by
combining the tables. For example, equipment with similar properties can be grouped into separate tables. Among other things, this makes it
more convenient to handle properties specific for different groups. Alternatively, the grouping can be made on the basis of location, for example,
by decks.
Equipment tables have the prefix EQP* and route tables ROUTES*.
In a given project and version, there may be a current source for equipment and route information analogically with the current arrangement.
They are set with the command REG in the SME task. Presently, their only use is that the table names EQP*CURRENT and ROUTES*CURRENT
are converted to the registered names in the same way as ARR*CURRENT.
These tables may be supported by tables defining types of routes and equipment.
For equipment, there is further a store of geometric shapes containing all base objects used in the current run and resulting from parametric
definitions or fetching from external sources (e.g. IGES, DXF files).
1.4. Installation
For running the system by the command interface, there is the task SME, handling both equipment and routes. It is analogical with the SM task for
compartment arrangements in that it is a kind of front end for table calculation: for definition purposes it contains a subset of table calculation
commands and in addition, output and other functions specific for this subject. The SME task is installed in parallel with DEF, DR and SM.
The tables involved can also be treated with the Table Editor and for the functions specific for this subject, there is the graphical user interface
supported by a set of service functions.
2. Properties of equipment
From the definition point of view, the central properties of a piece of equipment are:
identification, ID the name by which a piece can be designated. It must be unique within a given model.
type, ETYPE the name of a type, by which properties common to groups of equipment can be defined.
location, LOCTN an instruction that defines the location, which may refer to geometric objects in the ship or to other pieces of
equipment
geometric shape, a definition of the shape, which may refer to an object, available in the NAPA database or in file or defined as a
FORM so-called parametric shape.
orientation ORNT, allows the shape defined by FORM to be rotated and reflected.
Equipment types:
LCGX the location of the center of gravity with respect to the lower x limit, similarly LCGY, LCGZ
Instances:
If there is a geometric shape associated with the object, the lengths can be derived from it. The local center of gravity is placed in the midpoint if
not defined explicitly.
Dimensions related to the location and extension of a piece of equipment (analogically for the z-direction)
Sets of equipment are stored in tables named with prefix EQP*. The definitions are handled under table calculation, which is entered with the
command EQP. The most important primary columns are
The quantities X, Y, Z, XMIN, ... ZMAX are compulsory and added automatically as so-called hidden columns if missing. If declared explicitly, they
should have the calculation formula SME, for example
The lengths (LENX, LENY LENZ) and the centers of gravity (LXCG, LYCG, LZCG) can be fetched from type definition the normal way by the APP
LY command. If declared in the table, they should have the formula SME: the effect is to derive the quantity from FORM if possible, else from the
type table given in APPLY.
The center of gravity, XCG, YCG, ZCG can be declared with the SME formula.
Primarily for the purpose of controlling locations, a piece of equipment has a number of reference points.
The values XMIN, XMAX, XCG, X and the analogous coordinates on the other axes provide the basic set of reference points. The origin is also
available.
By separate definitions in geometric objects, other reference points can be added. These have a name by which the point can be referred to.
These names should reflect the meaning of the reference point, for example, AXIS on an engine.
In cylinders, there are the predefined reference points START and END.
Reference points are designated by names. The standard reference points are named by three letters, one for each axis x, y and z. The letters
are
L: lower limit
U: upper limit
M: midpoints
C: center of gravity
O: origin
For example, the midpoint of the aft x-limit is LMM and the corner at XMIN,YMIN,ZMAX is LLU.
The center of gravity is the same as the midpoint, unless the corresponding local center of gravity (LCGX, LCGY or LCGZ) has been defined
differently.
Partly for compatibility with older releases, the following symbols are available:
O origin
A aft=LMM
F fore=UMM
S: starboard=MLM
P: port=MUM
B: bottom=MMU
T: top=MMU
M: midpoint=MMM
C: cg=CCC
In a left-handed coordinate system, the definitions of P and S are reversed (i.e. L is replaced by U and vice versa).
Additional reference points can be defined as part of the geometric definitions, using the command
RP name (x,y,z)
The use of reference points in location definitions is presented below. In addition, there are functions for marking them in a plot or inquiring their
positions.
2.6. Figures
For presentation in arrangement plans and similar, the shape of the objects may also be available in the form of figures. The figures can be saved
in NAPA database or fetched from files in a format supported (e.g. DXF).
3.1. General
The position of a piece of equipment is defined by an instruction given as the quantity LOCTN, which is a string obeying the syntaxes presented
below.
The position of a piece of equipment can be specified directly by coordinates or by reference to other objects.
In its simplest form, LOCTN gives the position directly by three coordinates. Reference to objects in the model can be given in two ways:
For providing coordinates (case 1), the following types of objects are possible:
The positions can be modified by a displacement in the direction of the axis concerned.
The reference points of surfaces and rooms are defined analogically with those of equipment.
As a special case, the location instruction can be specified by - (minus sign) which is equivalent with 'O: (0,0,0)', i.e. place the origin in (0,0,0).
This alternative is relevant when the shape of the piece is defined by an object that is already in its correct position.
In the definitions, the two basic cases are expressed by two forms of the location instruction, which are presented separately.
Syntax:
ref: (x,y,z)
ref (optional) reference point, syntax and default as presented above, default=MMM
y similarly for y
z similarly for z
#nr+d frame number with optional displacement (d), similarly web, longitudinal or vertical
Note that a surface with the #-prefix defines the position using the reference coordinate, else the actual geometry.
A piece of equipment can be referred to under the same conditions as in case 2: it must exist in the same table or in one connected by a
reference (the command REF).
Examples:
LML: aft x limit 0.5 m in front of the reference coordinate of BH1, lower z limit on DECK1
(#BH1+0.5,0,DECK2)
BASE: (END:TUBE1 the reference point BASE is placed so that its x-coordinate is that of the point END in the piece TUBE1, its
LBH-1, DECK2) y-coordinate at 1 m from LBH and its z-coordinate at DECK2.
Instead of, or in addition to the common reference point (given at the start of syntax), each coordinate can be equipped with a separate reference
point, using the notation ref/coord. This reference point concerns the given coordinate only and overrides a point possibly given in the normal
position. In addition to the normal reference points, the following alternatives are available:
S starboard, equivalent with U for the y-coordinate. In a left-handed coordinate system, P=U and S=L.
B bottom
T top
Example
The following example shows the use of reference points and how the result is controlled by the local geometry:
ID ETYPE LOCTN
P1 PIECE 'LML: (BH1 0 TTOP-SO)'
P2 PIECE 'LUL: (BH1 LBH TTOP-SO)'
P3 PIECE 'LUL: (25 LBH TTOP-SO)'
In this case, there is an object, which can be a compartment, another piece of equipment and also a point object. The reference point in the object
being defined is given as above. Now there is also the possibility to give a reference point in the referenced object.
Syntax:
ref:refr object
Note the colon separating the reference points: it must be given even if one of the points is omitted, and the side defines which reference point is
intended.
A piece of equipment must be found in the same table or in one declared with the REF command in the table definition, for example
The latter reference point (refr) has the same alternatives as the first one, but it defines the matching point in the referenced object.
If the object providing the location is a room, the default reference points are MML:MML, meaning that the new object is placed in the middle of
the room, standing on the floor. In the other cases, the default corresponds to the specification MMM:MMM, i.e. match midpoints in all directions.
For a room, the components xmin...ymax, zmax are taken from the extreme coordinates while zmin obeys the rules for the bottom area if
applicable (the command H in the room definition used if given). Note that the local geometry of the room is not used.
Examples:
R1234 midpoint of R1234 in x and y, bottom of equipment and bottom of room coinciding
R1234 F the same as above, using the shorter notation presented below
UMM:AXIS E-GENERATOR midpoint of upper x-limit at the reference point AXIS of the equipment GENERATOR
ID ETYPE LOCTN
P1 PIECE 'O: (0 0 0)' ''
P2 PIECE2 'LML:UML E-P1' ''
P3 PIECE2 'UUL:LLL E-P1' 'TZ=90'
P4 PIECE 'LUL:LLL E-P3' ''
These syntaxes are added after the room name, for example:
R1234 F T
The example places the piece so that the front and top sides are aligned.
There may be a displacement added to the symbol, for example, A+0.5, meaning that the effect is modified by a translation of 0.5 m along the
axis associated with the symbol, in this case x.
Modifications to the definition following from the main part can be added by the following options:
where X, Y and Z override the coordinate obtained otherwise while DX, DY and DZ define changes. RY means reflect around y=0 and switch
upper/lower if given as reference point for y.
refers to the reference point 'INLET' of the component COMPR1, but 0.5 above it. With Z instead of DZ, the effect would be to disregard the
z-coordinate obtained and replace it with 0.5.
The compartment into which a piece of equipment is placed can be given indirectly by giving its purpose (in the sense of the arrangement). The
syntax is formed by the name of the purpose in parentheses, for example
'(ER)'
Assuming that ER designates 'engine room', the definition instructs the system to place the component in the engine room.
The syntaxes presented in the preceding section are available for specifying the location more closely, for example
'(ER) A'
There is presently no proper solution for handling the case that there are many compartments matching the criterion, the solution is to take the
first one encountered (with a warning).
This function has been added in order to support general definitions, not tied to a specific ship. It is assumed that the symbols for the purposes
are standardized, while the naming of compartments may follow rules not useful for this purpose.
3.6. Example
4. Geometry of equipment
A piece of equipment has a geometric shape associated with it. If no other definition is provided, it is treated as a box that has the specified
dimensions and the origin at the lower limits.
The shape is defined in an own coordinate system, and the position of the equipment is recorded by the location of the origin (quantities X, Y and
Z). If not explicitly defined in the equipment table, the corresponding columns are added as so-called hidden ones (seen by SEL ALT or DES *
under TAB). The same is done with the extreme coordinates XMIN...ZMAX.
By default, the piece is oriented so that the directions of the local axes are the same as those of the ship coordinate system. This can be modified
by the column ORNT.
In the actual pieces of equipment, these objects are translated and rotated as specified in the equipment definition. The name base object refers
to the object as originally defined, i.e. in their original position and orientation.
The shape can be represented by a curve or a surface (not surface object), available in the normal representation. The object must be
self-contained, i.e. not dependent on the object administration for collecting the parts. Therefore, surface objects or combined surfaces cannot be
used. However, a combination made by GENERATE name COMB ...; is possible.
The surfaces should in principle be closed, i.e. define solids. However, for the purposes of this application this is not strictly necessary, only that
they work properly in graphic output functions.
Curves can be used when a wireframe representation is sufficient for the graphic output, for example, for a handrail.
In the last case, the objects are dynamically converted to the NAPA representation, in a similar way as implemented for DXF drawings.
The purpose of the macro alternative is to make it possible to create an object type with adjustable dimensions or other properties. This also
makes it possible to create objects that are in more complicated ways dependent on the current model, for example, a handrail following a given
curve or a staircase located in a room. The adjustable properties are communicated by parameters to the macro.
The last object defined in the macro is assumed to be the result, while possible others are assumed to be intermediate results, which are
discarded. For example, the auxiliary objects can be parts from which the result is formed by combination. In addition to standard surface or curve
definitions, the macro can contain NAPA BASIC operations.
The objects created by the macro are not saved in the database. The names are otherwise irrelevant, but they should be selected so that possible
interaction with objects present at run time is avoided. The objects are not accessible as such, only by reference to the equipment type (as
defined originally) or equipment instance (placed as defined in the equipment table). See the command PMO/DEF for creating normal objects by
parametric macros.
The following example is a macro creating an object formed by two boxes. Note also the reference points defined.
The macro can be a standard one (i.e. with database prefix DATA*), but the special prefix PMO* has been reserved for these types of macros, for
easier distinction from others.
In equipment definitions, the shape is added as the quantity FORM, either as a property of the equipment type (EQT table), from which it is
inherited by the actual pieces of equipment or directly in the EQP table. FORM is a string obeying one of the rules presented below.
name(par1,par2,...)
where 'name' is the name of the macro and par1... etc are parameters. In processing the parameters, the symbols ETYPE, LENX, LENY and
LENZ are replaced by the values obtained from the table. Otherwise, the parameters are passed as given to the macro and processed using the
normal conventions.
An object available in a foreign format is recorded by its file name, which is distinguished from other cases by the suffix, for example, DFX.
Other cases give the name of a geometric object, which is read read from the project database.
The extension (LENX, LENY, LENZ) is taken from the given form unless a value (>0) is provided by other means.
The following example shows objects (from the macro above) added to a set of equipment.
4.4. Management
The object representing the actual piece of equipment is obtained from the base object by translation and optionally reflection, rotation and
rescaling. This object is created at need for the operation in question (e.g. plotting) and it is then discarded. Thus, the objects are available in the
standard functions related to equipment only, but they can be converted to normal objects by the service function SM.EQP (actual object from
EQP* table) or SM.EQPOBJECT (base object directly).
The base objects are read from the database or created when first needed and maintained at run time but they are not saved.
The update management of the equipment table takes into account changes in the model but not in the base objects. In most cases this is not
needed since the objects are recreated every time they are used. Manual triggering of updates is needed for changes done in the current run and
affecting other objects in the model via changes in LENX, LENY or LENZ or changes in macro creating them.
Manual triggering of updates is done with command GU (geometry update) in the SME task.
For an object defined in FORM, the quantity ORNT changes the orientation by a rotation or reflection around the reference point.
Presently, only one rotation is possible. The quantities LENX, LENY and LENZ always mean the dimensions before the rotation.
In the rotations, named reference points maintain their meaning unambiguously. The interpretation of standard reference points, for example,
LMM is tied to the coordinate directions, and interpreted according to the orientation after rotation. Rotations other than multiples of 90 degrees
may cause ill defined results.
6. Routes
Presently, the connection is always by a straight line: more complex routes must be divided into parts.
As its name implies, the intended purpose of routes is to handle space reservations for ducts, packets of pipes, cables or similar. However, routes
can be used for any purpose for which their geometric behaviour is suitable.
The derived properties are similar with those of equipment, however, note the usage of xmin...zmax.
These give the extension of the connecting line, so that (xmin,ymin,zmin) is the start point and (xmax,ymax,zmax) the end point (i.e. not
necessarily xmin<xmax).
Routes are defined by tables having ROUTE* as prefix. Each line defines one route.
The ends of routes are defined by entries in an equipment table (EQP*), which do not need to describe actual objects in the ship. The ends are
defined in the columns NODE1 and NODE2, giving the equipment ID of the items, while the equipment table is given in the REF command of the
route table. It is also possible to define endpoints by coordinate triplets directly.
By default, the midpoint is used as reference point, but another one can be specified by the columns REFP1 and REFP2, expressing reference
points in the same way as presented above.
The special syntax N (nearest) means the midpoint of the side nearest to the other node.
An object may have several equivalent reference points, and especially after rotations it may be difficult to select the correct one. In such a case
one can list the alternatives in the form r1,r2,...rn and of these, the nearest one is taken. For example, if the object has the reference points
START and END, the syntax START,END means take the nearest one of these reference points.
The cross section is defined in the column FORM, which has the same alternatives as in the FORM command of cylinders. Some useful
alternatives for routes are
The form may be undefined, in which case routes can only be plotted as lines (option L).
The first is a very simple example where two of the nodes are represented by boxes and the middle one is a formal one for providing the position.
ID ETYPE LOCTN
DEF E1 BOX '(0 0 0)'
DEF E2 POS '(0 0 4)'
DEF E3 BOX '(0 5 4)'
In the second example, the nodes are represented by objects with the geometry defined, including reference points.
ID LOCTN
DEF PUMP '(F/BH1 S/LBH1 B/DECK1)'
DEF VALVE '(BH1-0.3 0 T/DECK2-0.5)'
DEF BEND 'END: (U2:PUMP : START/END:VALVE)'
Note that the pipe bend is aligned with given reference points in PUMP and VALVE.
7. SME task
Functions related to outfit can be run as commands in the SME task, which can be entered from DR, DEF and SM.
It contains definition and output functions for equipment and routes: the commands are the same, and the selection is done by the command SBJ:
All definition commands are normal table calculation commands. For modifying the table definition or using more special functions, the standard
table calculation task can be entered with the command DIR.
The most important functions specific for the task are the output functions, of which plotting is described below. The list output function presently
only lists information in the table.
8. Drawing of equipment
The plotting functions for equipment and routes are in most respects identical and presented together. They are available in standard PLOT and D
RW commands and as service functions.
The PLOT and DRW commands of the subtask SME differ in that the source table and item do not need to be given. The presentation below uses
the commands.
8.1. Plotting in 3D
In the SME task, the PLOT command without parameters plots the current item.
In the SIZE command, * refers to the size of the current table while ** to that of the current component.
Sections with coordinate planes can be plotted by adding axis=q to the PLOT command, for example,
Equipment and routes can be plotted in arrangement plans with the normal SETUP + DRW commands.
DRW normally draws objects as sections with the planes or surfaces given in the setup. In this case, the default is to the plot the objects in the
same way as by PLOT and the plan definitions are applied only for selecting the plans where each piece is visible. The effect can be controlled by
the RANGE option in a plan definition.
With the option F, equipment is plotted as figures. For the conditions for this, see below.
Equipment can also be represented graphically by figures, provided that the name of the figure is available as the value of the quantity FIG.
The figure can be stored the normal way in the NAPA database or it can be read from an ASCII file in a format supported by the system. In the
latter case, the figure is represented by the file name, which must include the standard suffix. Presently, DXF is the only format supported this
way.
The figure can represent the object in several ways, and for lack of standards in this respect, the interpretation can be controlled by the quantity
MODE for which there are the following possibilities:
G 'geometrically correct': the figure is a picture of an actual object plotted in a specified scale and with the drawing origin at the origin of the
geometry. The properties of the figure (e.g. extension) must match those of the object modeled.
B as G, but no assumption is made about the origin: the placement is done according to the extension recorded (default)
E a general shape that can be scaled as needed to fit the recorded extension
A as E, but it is also allowed to modify the proportions if required to fit the recorded extension
S a symbol that has no connection to the shape or size of the object. The size used for symbols is fixed in the PLOT command.
In addition to the selection described above, MODE can also control the usage of the figure in different projections. The alternatives are
expressed by the following symbols:
P there are figures available for all projections, obtained by adding suffix .X, .Y or .Z to the name recorded by FIG.
9.1. Equipment
The standard table definition for storing sets of equipment is the following.
COLUMN ID KEY
COLUMN ETYPE
COLUMN LOCTN TEXT
COLUMN FORM TEXT
COLUMN ORNT TEXT
COLUMN XCG SME
COLUMN YCG SME
COLUMN ZCG SME
APPLY STT*PRO
ALT STT*PRO/STT*STD
The APPLY and ALT commands refer to the type definitions presented below. The TEXT option in the column definition causes apostrophes to be
added when using the PRINT or DES commands.
Of these, only the columns ID and LOCTN are strictly necessary. Other columns can be added for representing any attributes desired. All
properties defined for the equipment type are automatically available. FORM may be a property derived from the type and omitted or declared
explicitly as
COLUMN FORM *
This makes it possible to define exceptions. Similarly, other properties, for example, the weight can be declared.
The quantities LENX, LENY, LENZ, XMIN, XMAX, YMIN, YMAX, ZMIN and ZMAX are automatically added if they are missing. They can be
declared in the table definition with SME as the calculation rule, for example
The definition of equipment types performs the role of a simple material database. The tables are stored with prefix terms= EQT*/>EQT*, and the
subtask is entered with the command EQT.
The tables presented above assume that the standard definitions are stored in the system database under the name EQT*STD, while the
standard name for project-specific definitions is EQT*PRO. It is, however, likely that a more flexible set of tables proves more useful, as outlined
below.
WUNIT is a symbol designating the meaning of the weight unit. It is used for documentation only. UNITW defines the weight of one weight unit.
LENX, LENY and LENZ specify the extension of the component in the coordinate directions. An undefined dimension (zero) is interpreted in
connection with determining the location: if the location is given by a reference to an object, the extension is taken from that of the object.
Otherwise, the extension is estimated from the weight by determining a box with the proportions of the ship having density=1 ton/m3.
LXCG, LYCG and LZCG can be used for locating the center of gravity more precisely inside the objects (see the figure above). If the value is not
given at all or if it is zero, the center of gravity is placed in the middle.
FIG is the name of the figure by which the object can be drawn into an arrangement plan. For the name rules of the figures, see above. For
controlling the use of the figures, the column MODE is likely to be necessary.
Any other piece of information considered useful can be added, from cost to the name of the manufacturer.
Provided that the APPLY commands in the EQP* tables are modified accordingly, the type definitions can be organized differently.
One possibility is to divide the components of different categories into separate tables. This would make it more natural to add properties specific
for some category. For example, different types of engines can be collected into a table to which the power or speed can be added.
By combining the tables, a table containing all types can be created. If the total number of items is large (thousands), the tables should be kept
separate.
9.3. Routes
COLUMN ID KEY
COLUMN TYPE
COLUMN NODE1
COLUMN REFP1
COLUMN NODE2
COLUMN REFP2
COLUMN FORM TEXT
APPLY TAB*PRO
REF EQP*name
Presently, there is no quantity or prefix defined for types of routes. In the declarations above, TYPE is used for the type and the standard table
prefix TAB* for the type table. As in the case of equipment, FORM can also be a property derived from the type. Any other columns defining
useful attributes can be added.
The REF command lists one or several tables containing the equipment referenced. If one table is not enough, it is recommended to use a
combined table.
The opened form is a description in the sense of the data management system, for which the functions of the DM series are needed.
The operation can take place independently of the tables, keeping the syntax in a variable, or the fetching/assignment can take place directly to
the table.
Note that LOCTN and FORM can be expressed in different ways, involving different parameters. Modifying without changing the case is done
simply by replacing individual items. To change the case, for example, from a location in a room to a location expressed by three coordinates, the
type of definition must be changed, which can be done by entering a new definition with the correct form, for example,
@SM.EQPDEF('(0,0,0)',D,'A')
Note the option C in SM.EQPASG, which activates some checks, mainly concerning the existence of referenced components.
For providing a list of available alternatives, the functions SM.EQPLIST and SM.RPLIST are available. The former prooduces a list of all pieces of
equipment to which it is possible to refer from LOCTN on a given line in a given table. SM.RPLIST provides a list of all named reference points
available in a given case.
In the opened form, parameters from a parametric macro are available individually. Alternatively, one can use AI.PARAMETERS for extracting a
list of parameters and their properties.
id,id,...: value of quantity ID for the new items. For more information, see !EXPL ADD/TPA.
This command produces a list of equipment sets in the current project and version, containing
the name and description.
This is the same command as COLOUR in the drawing task, for changing the line colour.
Similarly THI, DAS, TCOL, FONT, PEN.
name: name of result. With no other parameters, the definition of the given (combined) equipment set
is displayed.
This command defines properties of a given item. If it does not exist, it is added. A warning for
the addition is given for the first DEF in a sequence. The set of parameters in an equipment set
may vary, and those presented below are only examples. For a complete description of the
DEF command, see !EXPL DEF/TPA.
loctn: syntax defining the location, see !expl ILOC for explantion.
DELETE ALL
DELETE SELECTED
This is the same function as DES under table calculation, see !EXPL DES/TPA.
The command enters table calculation for treating the current equipment set directly. This gives
access to the complete set of functions under table calculation, for example, for modifying the
table definition, while the special services related to equipment (e.g. PLOT) are not available.
This commands plots equipment from the current table into the current SETUP.
options: options controlling the plotting, one string. The alternatives are the same as presented under
PLOT, in addition
F: plot using the figures defined (must recorded by FIG in the table). In combination with option
B, the figure only marks the center, with E the figure is stretched to mark the extension. With
FF; objects having no figure are omitted.
X: plot as sections, default=plot as 3d, the plan definitions only control what objects belong to
each plan
DRW ... -
Run the normal DRW command. This minus as the last item signals this case.
EXAMPLES
DRW ALL
DRW ALL BP
Draw all pieces marking the position only with a box coloured according to the associated fill
codes.
DRW ALL -
Without parameters, the text editor is entered. With parameters, the command is identical with
DES, except that the result is stored in the editor work area.
The geometry definition task DEF will be entered. The equipment set in the work area remains
and is available when SM is re-entered.
This command enters table calculation for defining properties associated with equipment types.
This command enters table calculation for defining tables giving fill codes for colouring of
objects according to some property.
Standard FIG command (see !EXPL FIG/GEN). NOTE: plotting a figure into the current
drawing must be done under DR.
A given equipment set is read from the data base and made the current work equipment set.
See also TREAT: make current without forcing reading from the data base. For special options,
see !EXPL GET/TPA.
GET name
name: name of the equipment set. It is fetched from the current version of the current project. NOTE:
if the equipment set is read in order to be modified, it must be a noncombined one.
This command forces updates or removal of geometry stored for equipment objects.
GU U
GU P
GU def
GU E
Remove objects. If needed again, the will be recreated automatically. Must not be done if there
are objects plotted with the S option.
This command offers an alternative way of giving parameters. One at a time, the id of a piece
is displayed, including the current value of the parameter to be defined. The new value is then
inquired. An empty answer means that the current value is retained. LOCTN can be given as
such without apostrophes.
The set of objects inquired can be restricted with SUBSET. The process can be interrupted by
answering QUIT.
This command lists data from the current table, as selected by LQ and controlled by TOO. A
subset set by SUBSET is obeyed.
LIST options
This command selects the quantities listed by the LIST command (see !EXPL LQ/GEN). A list
of alternatives is obtained by command LQ ALT.
The registered equipment sets are listed, giving the descriptive text and a list of parts, if the
equipment set is a combined one.
MAP option
option:
L: (long): list the compartments. If an equipment set occurs repeatedly, the list is replaced by
'...'
EXAMPLE
MAP L R301 R302
The list of equipment sets will show where the given compartments belong.
NEW name
This command defines/lists the description associated with the equipment set.
NOTE description
This command produces the definition of individual objects in input form (by DEF commands).
For more options, see !EXPL PRINT/TPA. If a SELECT command is active, the set is restricted
according to to the subset.
P selection
A: all
This command enters table calculation for defining tables giving pen codes to be used for
separating objects according to some property.
The command is otherwise the same as P, but the result is entered into the editor work area.
see command P.
This commands plots equipment from the current table obeying current projection and scaling.
axis=q: (opt) make section with the given plane, default=plot the object as it is.
options: (opt) options controlling the plotting, one string. For the default, see command PO.
E: plot as boxes according to the dimensions of the object (ignore a possible geometry)
B: only mark the center of gravity with a box. BB=use a bigger box.
O: plot only faces turning the outside to the viewer, similarly I for inside
C: if LIMITS have been specified, clip objects with the given limits. Default=only thest the
location of the center.
T: id ID NAME has been set, show equipment type rather than ID. NOTE: this option affects
also the interpretation of 'sel'
R: mark also reference points. With ID NAME, the names of the reference points are shown
rather than the ID of the piece. The option concerns only defined reference points (from the
object given in FORM). RR=plot reference points only.
S: 'super 3d mode', implemented on pilot level. The internal representation of the drawing is
only a reference. The main main purpose is to save run time memory.
ATTR=(...): record attributes of the equipment, attr1,.. etc are names of quantities in the equipment/route
table.
LINK=template: add a link to file, the name of which is obtained by replacing the character % in the template
with the ID of the object
PLOT ... -
Apply the PLOT command of DR. The minus sign marks this case and omitted before
executing the command.
EXAMPLES
PLO ALL
PLOT * R
PLOT ALL HP
Plot all objects, sorted for hidden linses effect, coloured according to the fill codes.
PLOT TTOP -
This is the same command as PMO in the DEF task (see !EXPL PMO/G0D). With this
command, parametric definitions can be tested independently. Presently, the PMO command
supports surfaces only - not curves. Note the option PMO HELP for producing information
about the use of a macro.
This command sets plot options that will be used if no option string is given in PLOT or DRW.
PO options
options: string of options as presented under PLOT. The initial default is to plot the geometry of the
pieces, if available, else a box according to its dimensions.
This command updates or lists the set of registered equipment sets. The registered equipment
sets are supposed to be alternative sets of whole equipment sets, in contrast to various partial
equipment sets or equipment sets defined for test or similar purposes. One of the registered
ones is defined to be the default one, i.e. the one used unless otherwise specified - presently in
service functions only. If the current subject is routes, this command concerns these.
REG id PERM
PERM: (opt) make the given equipment set the assumed one
REG id subs
This commands makes the given equipment set default for the given subsystem.
subs: LD, CP, DA or WG. The registration can be cancelled by REG NONE subs.
REG DELETE id
REG LIST
RENAME name
This command is otherwise equivalent with SAVE, but is used then the equipment set already
exists in the data base.
This command stores the current equipment set, when not existing previously in the data base.
For special options, see !EXPL SAVE/TPA.
For more details, see !EXPL SCAN/GEN. SCAN SEND just sends the current result list to the
printer. The current result list is finished and a possible open drawing is closed (NOTE!).
SUBSET select subset of lines (TP) This command selects a subset of items for controlling the P, PED,
DES, EDIT, LIST, DELETE and INQUIRE commands. A given selection is valid until leaving
the EQP environment. Without parameters, the current selection criterion is shown.
SUBSET subset
subset: subset in standard form (use !EXPL SEL/GEN if needed). The selection can be based on any
valid quantities in the table for example ID, ETYPE, X.
EXAMPLE
SELECT X>100
SELECT ID=R*A
This is the same command as in the drawing task, see !EXPL SETUP/G20.
Except for cases *, **, this is the same command as SIZE under DR, see !EXPL SIZ/G20.
SIZE *
Special case: scale according to the size of the current equipment set.
SIZE **
Special case: scale according to the size of the current piece of equipment.
SORT qnt
The command enters 'bare' table calculation for using it with out any predefined purpose (in
contrast to command PDEF and others)
TREAT get equipment set from the run time store (TP)
This command is otherwise similar with GET, but instead of reading the equipment set from the
data base, it is fetched from the run time store. If the equipment set does not exist in the run
time store, the effect is the same as of GET.
UNSAVE: name
This command forces updating of the current work equipment set, for taking into account the
effect of some change. It is intended for cases when the normal automatic update for some
reason has not been done.
For compartments, structures and equipment, the colouring can also be defined as normal attributes.
Note: this must be distinguished from the definition of logical pen and fill codes, as provided by the graphic subsystem; these codes
define device codes (e.g. colour index) associated with a given symbol and a given output device.
Table of Contents:
1. Colouring standards
2. Handling the colouring standard as compartment parameters
3. Line type standards
4. Use of fill codes and line types
1. Colouring standards
The colouring standards presented here are used as fill colours when drawing sections of compartments. For the special case STYPE=structure
type, the filling logic can also be applied on structures. The tables are named COLOUR*id, and they have the following contents.
The first column contains the identifiers for which the colours are defined. The column name (=quantity) tells for what aspect the table is defined,
for example, PURP=compartment purposes. Any quantity available in the arrangement can be used as the basis for colouring, including numeric
ones. For a string quantity, the value DEFAULT can be added in the key column. The colour defined for this line will be used if a given identifier is
not found.
In addition, the table must contain at least one column containing colour codes. The first such column is used as default while possible other
columns are used only when separately specified. The column names can be chosen freely. Whether a column gives device codes or logical fill
codes is seen from the type of data: integers are used as device codes, strings as logical fill codes. When using direct device codes, positive
values stand for raster codes and negative values for pure colours. Value -99 gives black and -98 background (device dependent).
The following table illustrates a fill code table. It is made for colouring according to the type.
NEW COLOUR*TYPE
COLUMN TYPE KEY
COLUMN FCODE
COLUMN LFCODE=C
It is not necessary to define the first column as the key column, but it makes it possible to use the table as a table function. The name of the table
does not need to be the same as the aspect (TYPE in example).
Fill codes can also be defined for numeric quantities. In this case, the first column contains values defining the ranges of values for the given
quantity, for which the other columns define colours. Example:
NEW COLOUR*W2
COLUMN W2
COLUMN FCODE
W2 FCODE
--------------
0.0 -1
0.1 -7
0.4 -5
1.0 -2
99.0 -2
The table gives colours for quantity W2 (weight/m2). For example, values from 0.1 to 0.4 will be coloured with colour 7.
Fill codes entered this way are connected to the compartments exactly as the other compartment parameters.
Instead of fill codes, pen codes are given, either device codes (integers) or logical pen codes (strings). A device code is interpreted the same way
as in the definition of logical pen codes:
1000000*pen+1000*colour+10*dash+thickness
Zero values mean that the corresponding property is not affected. For example, code 2000 sets colour 2, without affecting thickness or dash
pattern.
In a given table and for a given device, a given aspect should be controlled consistently (i.e. set in all or alternatives or not at all). For example, if
the colour is set for only some objects, the colour of the remaining ones will be random (depending on what was drawn before). If the colour is set
for none of the objects, the initially valid colour will be used.
FILL *table/alt
'table' is the name of a fill colour table without the COLOUR* prefix. From the table, both the basis for filling and the colours can be read. '/alt' is
optional and it gives the name of a column in the colour table.
The special case FILL PURP is interpreted as follows. For deciding the source of fill colours, the following alternatives are tested in the given
order:
if filling according to purpose has already been specified, either by a preceding FILL command or with !SM FST, the same filling is used.
if the fill colour is available as a compartment parameter, i.e. either the quantity FCODE or LFCODE is available in the current
arrangement, these parameters are used.
if there is a table named COLOUR*PURP, it is used. (The same effect as FILL *PURP)
if none of the alternatives above applies, a filling standard in the old format is used (named CONT*STD, as made under the editor).
is always interpreted the old way, where 'std' is the name of a filling standard in the old format.
The filling standard can also be specified with the !SM FST command.
FILL STYPE
is handled similarly as FILL PURP, but for colouring structures. There must be a structure arrangement made current by !SM STR.
PEN *table/alt
This command affects the drawing of structures, and the properties of the structures are fetched from the current 'structure arrangement', as set
with the command !SM STR name. The special case STYPE can be entered without the asterisk.
PURP=purpose: (opt) purpose of the compartments added. If omitted, the purpose will be undefined. If a
compartment exists already, the purpose is changed if given, and a warning is issued.
name,name... : names of compartments added. A name preceded by prefix * refers to the objects referenced
from the given one, see example.
EXAMPLES:
ADD T1 T2 T3
ADD PURP=HFO T1 T2 T3
ADD *ROOMS
All compartments mentioned in ROOMS are added. ROOMS should normally be a combined
room.
This command produces a list of arrangements in the current project and version, containing
the name and description.
This is the same command as COLOUR in the drawing task, for changing the line colour.
Similarly THI, DAS, TCOL, FONT, PEN.
name: name of result. With no other parameters, the definition of the given (combined) arrangement is
displayed.
This command defines the parameters of a compartment. If the compartment does not exist, it
is added. A warning for the addition is given for the first DEF in a sequence. The set of
parameters in an arrangement may vary, and those presented below are the most common
ones. For a complete description of the DEF command, see !EXPL DEF/TPA.
Parameters not needed can be omitted, in which case they will retain their value if any,
otherwise remain undefined. The explicit qualifiers may be omitted, if the parameters are given
in the same way as listed by the P (print) command.
This form is otherwise equivalent with the first one, but the parameters listed here are those
normally derived from the purpose (as defined under subtask PD). The values given this way
are recorded as so-called exceptions.
...: (opt) stands for any combination of the main parameters (see preceding form).
class,type,red,perm,cap: (opt) value class, type, steel reduction, permeability and capacity (=filling) For these
parameters, the qualifiers must not be omitted. An exception defined can be removed by giving
an asterisk as the value (e.g. RED=*). See also command DELETE.
EXAMPLES
DEF R40 HFO 'Heavy fuel oil tank12'
PAR R40 PURP=HFO DES='Heavy fuel oil tank12' CCODE=12SB
(Equivalent)
This command deletes compartments from the current arrangement or components of the
definition.
DELETE ALL
DELETE SELECTED
DELETE EXCEPTIONS
Delete all so-called exceptions, i.e. values replacing those otherwise derived from the purpose,
e.g. room specific steel reduction.
Listing of definitions in input format. This command concerns whole arrangements or geometric
definitions. The P (or PED) command lists data concerning individual compartments in the
arrangement.
name: name of arrangement or geometric object. The name is interpreted as that of an arrangement,
if one is found. If the name of a combined arrangement is preceded by an asterisk the DES
function is carried out for the parts also. In addition, the parts are enclosed in NEW and SAVE
commands, so that the generated data can be used as such for transferring the arrangement.
The command enters table calculation for treating the current arrangement directly. This gives
access to the complete set of functions under table calculation, for example, for modifying the
table definition, while the special services related to SM (e.g. command H) are not available.
Note that some commands under SM with the same name work differently under table
calculation (SELECT,LIST,DES, see the document SM.2).
This is the same DRW command as in the drawing task. For an explanation, !EXPL DRW/G21.
This is the same PLOT command as in the drawing task.
Without parameters, the text editor is entered. With parameters, the command is identical with
DES, except that the result is stored in the editor work area.
EXAMPLE:
EDIT *A
SAVE TEMP>ARR-A
The text ARR-A in TEMP will contain the data that added under SM will create a copy of the
arrangement A.
The geometry definition task DEF will be entered. The arrangement in the work area remains
and is available when SM is re-entered.
This command enters table calculation for defining properties associated with equipment types.
This command enters table calculation for defining tables giving fill codes for colouring of
objects according to some property.
This is the same command as FILL in the drawing task, see !EXPL FILL/G22
A given arrangement is read from the data base and made the current work arrangement. If it
is a registered one (see command REG) it will also be made the current arrangement in the
sense of the current source of arrangement data in other functions. For special options, see
!EXPL GET/TPA.
GET name
name: name of the arrangement. It is fetched from the current version of the current project. NOTE: if
the arrangement is read in order to be modified, it must be a noncombined one.
This command defines the heights where to intersect the rooms in order to create deck plans,
or gives a surface by which to intersect. It is meaningful mainly for arrangements formed by
one level only.
H h
h: fixed height
H h1,x1,h2,x2...
h1,h2: heights for intersection. The different values are applied in different x-intervals as defined
below.
x1,x2...: divide the ship in intervals in the x-direction, within which different heights can be defined for
intersecting. Without parameters, the current values are displayed.
H surface
Gives name of surface (facet surface) with which sections for the deck plan is formed. The
surface must cover the whole length and breadth of the ship (also -y side), preferably with a
margin. A translation can be added using the syntax surface+d or surface-d, e.g. TTOP-0.02.
H ... N
As any of the cases above, but the given height or surface is for generating the deck contour
only - deck plans are made from bottom areas.
This command offers an alternative way of giving parameters. One at a time, the name of a
compartment is displayed, including the current value of the parameter to be defined. The new
value is then inquired. An empty answer means that the current value is retained. NOTE: the
compartment description and purpose description can be given as such without apostrophes.
The set of compartments inquired can be restricted with SELECT. The process can be
interrupted by control-C or by answering QUIT.
INQUIRE par
EXAMPLE:
SELECT DES=''
INQUIRE DES
With this command, selected quantities of selected compartments are listed. The set of
quantities is controlled by command LQ, while the set of compartments is controlled by
SELECT. The command SORT is also obeyed.
LIST options
A SELECT command of the form SELECT PURP=(p1,p2,...) will interact with table output
option SORT or GROUP so that the order between the purposes p1,p2... is maintained.
This command selects the quantities listed by the LIST command (see !EXPL LQ/GEN). A list
of alternatives is obtained by command LQ ALT.
The quantities FSM and FSMI must be equipped with a qualifier to give the angle (otherwise 0).
The filling degree for which FSM is calculated is 0.5 unless another value is found in variable
FSMFIL.
The registered arrangements are listed, giving the descriptive text and a list of parts, if the
arrangement is a combined one. Optionally, the compartments are listed also.
MAP option
option:
L: (long): list the compartments. If an arrangement occurs repeatedly, the list is replaced by '...'
EXAMPLE
MAP L R301 R302
The list of arrangements will show where the given compartments belong.
NEW name
This command given the name of the surface (or room) forming the outer surface of the current
arrangement part. It is used for generating the deck contour in DRW DC.
OS name
name: name of object. The moulded hull defined in the reference system is used as default.
This command produces the definition of individual compartments in input form (by DEF
commands). For more options, see !EXPL PRINT/TPA. If a SELECT command is active, the
set is restricted according to to the subset.
P selection
A: all
This command enters table calculation for defining tables giving pen codes to be used for
separating objects according to some property.
Under this subtask, the permanent purpose definitions or those stored for the project can be
changed or listed. These definitions are tables treated with the normal commands of table
calculation. NOTE: the project specific set is automatically loaded to the work area, and any
purpose symbols used in the current arrangement but missing in the table are added.
The command is otherwise the same as P, but the result is entered into the editor work area.
see command P.
This command updates or lists the set of registered arrangements. The registered
arrangements are supposed to be alternative sets of whole arrangements, in contrast to
various partial arrangements or arrangements defined for test or similar purposes. One of the
registered ones is defined to be the assumed one, i.e. the one used unless otherwise specified.
REG id PERM
REG id subs
This commands makes the given arrangement default for the given subsystem.
subs: LD, CP, DA or WG. The registration can be cancelled by REG NONE subs.
REG DELETE id
REG LIST
RENAME name
This command is otherwise equivalent with SAVE, but is used then the arrangement already
exists in the data base.
This command stores the current arrangement, when not existing previously in the data base.
For special options, see !EXPL SAVE/TPA.
For more details, see !EXPL SCAN/GEN. SCAN SEND just sends the current result list to the
printer. The current result list is finished and a possible open drawing is closed (NOTE!).
This command selects a subset of compartments for controlling the P, PED, DES, EDIT, LIST,
DELETE and INQUIRE commands. A given selection is valid until leaving the SM environment.
Without parameters, the current selection criterion is shown.
SELECT subset
subset: subset in standard form (use !EXPL SEL/GEN if needed). The selection can be based on any
valid SM quantities (for example NAME, PURP, TYPE, CGX, DATE).
EXAMPLES
SELECT NAME>R
SELECT PURP=HFO
SELECT CLASS>B
SELECT CGZ=0...1.5
SELECT NAME=*ARR*A1
This is the same command as in the drawing task, see !EXPL SETUP/G20.
qnt1: quantity to be sorted (any valid SM quantity, e.g. NAME, PURP, CGX, DATE)
/qnt2: (opt) quantity by which to sort within sets of constant value of 'qnt1', default=keep initial order
within such groups.
options: (opt)
EXAMPLE
SORT PURP/NAME
Sort the compartments primarily according to purpose, and within groups of constant purpose,
the compartments are sorted by name.
This command enters table calculation for the purpose of defining sets of structures.
properties associated with structure types. This command enters table calculation for the
purpose of defining
The command enters 'bare' table calculation for using it with out any predefined purpose (in
contrast to command PDEF and others)
TEXT description
description: text documenting the purpose or role of the current arrangement. If omitted, the current text is
displayed.
This command starts the same list as LIST under table calculation, see !EXPL LIST/TPA.
This command is otherwise similar with GET, but instead of reading the arrangement from the
data base, it is fetched from the run time store. If the arrangement does not exist in the run time
store, the effect is the same as of GET.
This is the same command as SELECT under table calculation, controlling the PRINT, TLIST
and DEF commands, see !EXPL SEL/TPA.
UNSAVE: name
This command forces updating of the current work arrangement, for taking into account the
effect of some change. It is intended for cases when the normal automatic update for some
reason has not been done.
2. Service functions of SM
SM.ARR(name,'PERM')
name=SM.ARR()
This form returns the name of the arrangement currently loaded (with prefix ARR*).
Empty=none current. With parameter 'DEFAULT', the name of the default arrangement is
returned.
The function returns the name of the current table providing properties of compartment
purposes/load types (with prefix PAR*). Empty=none current.
The function returns an array containing the given parameter of the compartments of the
current arrangement. NOTE: the result is a pointer to the actual array and must not be
modified.
n=SM.COMPPAR(sel)
The function returns a list of compartments in the current arrangement, optionally restricted by
a selection criterion. Function value=number of compartments returned.
SM.COMPLIST(array,crit)
EXAMPLE
@list=arr(3)
@n=sm.complist(list,'TYPE=L')
The function returns a list containing all values of a given string property that occurs in the
current arrangement. Function value=number of values returned.
n=SM.LIST(prop,array)
EXAMPLE
@list=arr(3)
@n=sm.list('PURP',list)
The array LIST will contain a list of all purposes occurring in the current arrangement.
table=SM.REFARR()
Returns the name of the current reference surface arrangement, empty if none current. The
result is the name of the table (prefix REF* included).
SM.REFARR(name,'PERM')
name: name of the arrangement, prefix REF* optional. With name=empty, the default arrangement is
taken.
arr=SM.REFARR()
arr=SM.REFARR('DEFAULT')
table=SM.OPARR()
Returns the name of the current opening arrangement, empty if none current. The result is the
name of the table (prefix OPE* included).
SM.OPARR(name)
For a given compartment the function returns empty if it is not in the current arrangement, else
the name of the object explicitly belonging to it. It has been added to support cases where here
are combined objects in the arrangement.
comp=SM.IDENTIFY(name)
EXAMPLE
Assume that the arrangement contains the compartment R123, formed by the combination of
R123A and R123B.
The subroutine returns a list of compartments that are neighbours to a given one. The result is
obtained by comparing the circumscribed boxes and is not completely reliable. The potential
neighbours are fetched from the current arrangement.
SM.NEIGHBOURS(name,nlist,sides,ext,tol,ovrl,opt)
sides: (opt) integer array for recording on what side the compartments in 'nlist' are: -1/+1: lower/upper
xlimit, similarly -2/+2, -3/+3. Assign 0 if not used and other parameters follow.
ext: (opt) real array for recording the extension of the common border (approximatively). For each
item in 'nlist', the six numbers xmin, xmax, ymin, ymax, zmin, zmax are stored.
tol: (opt) tolerance for gap between compartments, default=0.02. The the gap is >tol, the
compartments are not considered neighbouring.
ovrl: (opt) tolerance for overlap laterally, default=0.1. If the neighbour overlaps less than orvl*len
along the limit considered, the compartments are not considered neighbouring.
Z: consider neighbours over and under. Default if neither X, Y nor Z: consider all.
P: plot the result, provided that 'ext' given. The result is labeled for GR.IDENTIFY).
EXAMPLE
@nrec=arr(3)
@sm.neighbours('R123',nrec)
@ext=arr(2)
@sm.neighbours('R123',nrec,0,ext,'PXY')
As above, but return the extensions, plot the result, consider only neighbours at the sides (in x
or y directions).
The function finds all compartment pairs in the current arrangement such that each satisfies a
given criterion and the compartments are neighbours. The test used is based on extreme
coordinates only, and may give pairs that are not neighbours.
SM.NBPAIRS(qnt,crit1,qnt2,crit2,rp1,rp2,rext,tol,ovrl,opt)
qnt1: quantity for the first criterion, e.g. PURP. The quantity must be available in the arrangement
table.
crit1: criterion for the first component of the pair, value of 'qnt1', may contain wildcards
rp1: string record for receiving the names of the first component in the pairs
rp2: string record for receiving the names of the second component in the pairs
EXAMPLE
@r1=arr(3) @r2=arr(3)
@sm.nbpairs('PURP','ACC','TYPE','L*',R1,R2)
Find all neighbours such that the first one in the pair has PURP=ACC and the second one
TYPE beginning with L.
This function has primarily been added for selecting section coordinates for a set of plans such
that all compartments can be seen. The present method is very simple: all places where a
compartment ends are selected, and the sections are taken at the middle of the intervals found.
This may be modified by a minimum distance between sections. The compartments are taken
from the current arrangement.
SM.SELCOORD(arr,axis,d,min,max,subset,opt)
subset: (opt) list of compartments, either a list of names (string array) or indices (integer array). The
latter can be obtained by TP.SUBSEL.
opt: options
EXAMPLES
@xlist=arr(2)
@sm.selcoord(xlist,1,1)
x-coordinates are selected and stored in the array 'xlist'. Sections nearer than 1 m to the
preceding one are omitted.
@sel=tp.subsel('ARR*A','PART=(DECK0,DECK1)')
@sm.selcoord(xlist,1,1,-10,50,sel)
Otherwise as the preceding example, but x-sections are selected between -10 and 50 m only,
and only the partial arrangements DECK0, DECK1 are selected.
SM.CONFIG(table,op,comp)
table: arrangement table, name (with prefix) or other alternatives as presented in !EXPL TP.STDPAR.
op: operation:
INCL: change inclusion so that the compartment given by 'comp' is included (=INCL=1). The
other subdivisions belonging to the same main compartment are adjusted so that all
compartments belonging to the same subdivision are active while all others inactive (INCL=0).
It is assumed that the initial state is a correct subdivision.
MAIN: for all configurable sets, make the main part active. Can be used for assuring that the
initial state is valid.
CHECK: check the configurable sets. The test is that the sum of volumes of the active parts
matches that of the main part, and is useful only when the active set is a true subset of the mai
part.
name: name of compartment: make this one active. The name can contain a wildcard (* or ?).
:id: select the target using the label used in in the SUBD column.
SM.PLOTEQP(table,sel,axis,q,attr,link,options)
table: source table, standard alternatives, see !EXPL TP.STDPAR, in addition empty=current
equipment table
0: all items
array: list of items, either integer array=list of line numbers or string array=list of id:s.
attr: (opt) string record containing a list of quantities to be added as attributes in svg output. The
quantities must be available in the equipment table.
link: (opt) link template for svg output, string containing one %. The % is replaced by the ID of the
piece, for forming the file name.
E: plot as boxes according to the dimensions of the object (ignore possible geometry from
FORM).
B: only mark the center of gravity with a box. BB=use a bigger box.
O: plot only faces turning the outside to the viewer, similarly I for inside
C: if LIMITS have been specified, clip objects with the given limits. Default=only thest the
location of the center.
T: id ID NAME has been set, show equipment type rather than ID. NOTE: this option affects
also the interpretation of 'sel'
R: mark also reference points. With ID NAME, the names of the reference points are shown
rather than the ID of the piece. The option concerns only defined reference points, not implied
ones such as midpoint.
S: plot in so-called super-3d mode: the plot contains a reference and not a copy of the
equipment geometry. Pilot level.
EXAMPLES
@SM.PLOTEQP('EQP*MACHINES')
@SM.PLOTEQP('EQP*MACHINES'.0,'P')
@list=TP.SUBSEL('EQP*MACHINES','ETYPE>M')
@SM.PLOTEQP('EQP*MACHINES'.LIST,'P')
Plot the current table, add the given attribute and links to HTML files.
The function is similar with SM.PLOTEQP, only the operation concerns a set of routes-
SM.PLOTROUTES(table,sel,axis,q,attr,link,options)
The function plots pieces of equipment from a given table according to the current setup. By
default, the objects are plotted as such (not sections), using plan definitions only for deciding to
what plan each object belongs.
SM.DRWEQP(table,sel,part,link,attr,options)
table: source table, standard alternatives, see !EXPL TP.STDPAR, in addition empty=current
equipment table
0: all items
array: list of items, either integer array=list of line numbers or string array=list of id:s.
options: string containing one or several options. For a list, see !expl SM.PLOTEQP, in addition:
F: plot using the figures defined (must be present in the table). In combination with option B,
the figure only marks the center, with E the figure is stretched to mark the extension. With FF;
objects having no figure are omitted.
The function is similar with SM.DRWEQP, only the operation concerns a set of routes.
SM.DRWROUTES(table,sel,part,link,attr,options)
The function returns a curve or surface corresponding to the given piece of equipment.
descr=SM.EQP(table,id,axis,q,name,opt)
table: source table, standard alternatives, see !EXPL TP.STDPAR, in addition empty=current
equipment table
EXAMPLES
@SM.EQP('EQP*MACHINES','W12','S-W12')
Make the geometry of the item W12 from the given table available as the surface S-W12.
@C=SM.EQP('EQP*MACHINES','W12',3,2.5)
@A=AREA(C)
@DM.REMOVE(C)
This function gives access to the geometry of an object defined in the same way as that of a
piece of equipment, but independently of any equipment table.
SM.EQPOBJECT(def,opt,name)
opt: options:
This function is provided for testing the routing concept, and returns routes or aspects of them
as plots (default) or geometric objects. The route table (1. argument) must contain columns ID
(name of route), KNOT1 (column name, start knot), KNOT2 (end knot) and FORM (cross
section, string, syntax as in !EXPL FORM/GM). It must also contain a reference (command
REF) to an equipment table, providing the definitions of the knots). Columns XCORR, YCORR
and ZCORR are applied if present. The function value is the reference number of the object in
free storage or zero if only a plot of the object is requested.
SM.ROUTE(table,id,axis,q,name,opt,list)
id: identifier of route to be plotted. Empty=all or subset (see parameter LIST, option R).
I: leave the result in the free storage, the function value is the reference number of the result.
R: apply subset specified for the table (must be in the current work area)
list: (opt) integer record providing list of selected lines, can be created with TP.SUBSEL.
EXAMPLES
@it=tp.read('ROUTES*DEMO')
@sm.route(it,'')
@sm.route(it,'R1','ROUTE.R1','SP')
Save the route R1 as a patch surface in the data base. The name will be ROUTE.R1.
@list=tp.subsel(it,'TYPE=DUCT')
@sm.route(it,'','','',list)
@sm.route(it,'','X',12)
@sm.route(it,'','ROUTES')
The function expands the definition of a piece of equipment (as given by the syntax) so that the
type of definition and its components are accessible individually. The result is stored in a
description, the format of which is described by the text EQPEXPAND available in the
NAPADB. The reverse operation is performed by SM.EQPASG. The functions are intended to
support the graphic user interface.
SM.EQPDEF(syntax,descr,opt)
opt: options
SM.EQPDEF(table,line,descr,opt)
This form differs in that the input is taken directly from an equipment table
table: table designated according to the standard alternatives, see !expl TP.STDPAR
opt: options
EXAMPLES
@D=DM.CREATE('')
@SM.EQPDEF('PIPEBEND(3,0.5)',D,'F')
@SM.EQPDEF(0,0,D)
Store all parameters of the object defined by the current line in the current table.
The function does the reverse function of SM.EQPDEF: from a description of the form created
by it, the corresponding syntaxes are created and returned as the function value or stored into
a table.
SM.EQPASG(d,opt)
opt: options:
O: return ORNT
SM.EQPASG(table,line,d,opt)
opt: options:
C: do error checks
P: for FORM: construct parametric definition from the parts (rec. 32, 33) even if rec. 31
available
EXAMPLES
@loc=SM.EQPASG(d)
@SM.EQPASG(0,0,d,'L')
The function returns a list equipment available for referencing from a given table, i.e. either
present in the table or in a referenced one.
SM.EQPLIST(table,lnr,list,owners,opt)
table: equipment table, standard alternatives, default=current. If 'table' is given, 'lnr' must also be
given.
lnr: line number, default=current line. The item on this line omitted from the result
list: string record for receiving the result (ID of the pieces)
owners: string array for storing the names of the tables to which the pieces belong.
opt: options
list=SM.EQPLIST(table,lnr,opt)
As above, but the result is returned in an array reserved internally and returned as the function
value. The array is reused at the next call.
EXAMPLES
@list=arr(3) @owners=arr(3)
@sm.eqplist(0,0,list,owners)
Return the equipment id and table names of the pieces accessible from the current table.
@list=sm.eqplist()
The function returns a list of reference points available for a given item. The result includes the
defined reference points, either in the piece itself or in the referenced object (from LOCTN)
SM.RPLIST(source,list,opt)
list: string record for receiving the result (names of ref. points)
opt: options
R: return reference points in the object referenced from LOCTN, default=points in the object
itself (as defined in FORM). NOTE!!: if the referenced object is another piece of equipment, the
current table and line are supposed to be the one from which the reference is made.
list=SM.RPLIST(source,opt)
As above, but the result is returned in an array reserved internally and returned as the function
value. The array is reused at the next call, however, different arrays are used with or without
the R option.
EXAMPLES
@list=arr(3)
@d=dm.create('')
@sm.eqpdef(0,0,d)
@rp1=sm.rplist(d)
@rp2=sm.rplist(d,'R')
@dm.delete(d)
The list of reference points in the current object is stored in RP1 and those in the one providing
the location in RP2.
Capacities (CP)
Capacities (CP)
Tank tables (CP)
Sounding devices and steel reductions (CP)
Examples of output macros (CP)
Commands and service functions (CP)
Frequently asked questions (CP)
1. Introduction
2. Quantities available
3. Arguments
3.1. Depth Arguments
3.2. Trim and heel
3.3. Other arguments
3.4. Adaption of arguments when changing compartment
4. Variables
5. Listing
5.1. LQ qualifiers
5.2. Standard lists commands
5.3. Selecting sets of compartments
5.4. Presentation of undefined values
5.5. Examples
6. Diagrams
1. Introduction
The capacities task CP handles sounding tables and devices and produces output as a function of depth, sounding, ullage, draught, trim and heel.
Tank geometry is derived mainly from the geometry task GM with some parameters from Ship Model SM.
The sounding devices and steel reductions for individual compartments are defined in the subtask PAR.
The results are derived from the volume or the surface of the liquid in a tank filled to a given level. The tank fillings are given in different methods
including volumes, heights or sounding device readings.
2. Quantities available
The following quantities are available for output:
Quantity Explanation
T draught
WL weight of load
The net volume is the moulded volume minus steel reduction, while the weight of load is the net volume multiplied by the density of the contents.
A normal, fixed steel reduction is obtained from SM. A steel reduction that varies with height can be defined in the subtask PAR, and used under
CP only.
H and GAUGE can be both arguments and result quantities, depending on which one is given (see paragraph about arguments).
VCORRT gives a volume correction (net volume), defined as the volume at a given trim minus the volume at zero trim. VCORRH does the
analogous function for heel. SCORRT gives the trim correction in the form of an increment to the sounding value. SCORRH gives the analogous
correction for heel.
FSM (free surface moment) is the real moment caused by shifting of the liquid at a given heeling. The basic quantities should be calculated for
heel=0 (argument HEEL), while the heel for which the moment is printed is given as qualifier in the LQ command.
3. Arguments
The arguments controlling the calculation can be listed with command ARGS. The function of the arguments is presented in the following
paragraphs.
The calculation depths can be specified directly as depths, or indirectly as sounding values, volumes or fillings. The arguments can further be
given directly as a set of values or by a step. The corresponding arguments H, STEP, GAUGE, GSTEP, VOL, VSTEP and FILL, FSTEP are
alternatives that replace each other. (The volume argument is the net volume). If H is given and GAUGE is among the list quantities, the former is
listed as given while the latter one is calculated and vice versa.
When the GAUGE quantity is calculated, the calculation is done with the argument trim and heel, and therefore in line with those
quantities only that are calculated with the same arguments, not volumes with a trim or heel changed by a qualifier.
When applying the step arguments, the range is selected so that the maximum volume at zero trim is included in the result list.
For the gauge step, there are the following additional options. With the argument TRRANGE, it is possible to define a trim range to be taken into
account when deciding the range of gauge values needed. With the following options, special values can be added if not already in the series:
Command ADD TE (tube end) adds the end of the sounding tube and ADD MAX adds the gauge corresponding to the maximum filling at the trim
and heel defined by the arguments.
The listing order in the table is from lower to higher values of the given argument. If the argument is ullages, this means that the volumes will be
listed in descending order. With the table output option REV the order can be reversed.
The heights are measured from a reference height, that is selected as the lowest coordinate of the tank, but can be changed by the argument
REFZ. A permanent reference height can be defined as part of the tank oriented definitions (subtask PAR).
The meaning of the argument H is obvious at zero trim and heel only: the height differs from the draught (T) by the constant REFZ, and with a
non-zero trim (and to a less extent heel), the natural meaning of height is lost. In order to get an argument with a well defined interpretation, a
formal, vertical sounding tube can be defined.
The result quantity T is the one used as draught argument in the basic volume calculations. It is not intended for ordinary result lists, but it can be
useful if one wants to compare results with values obtained by other means (e.g. calculator function VOL). It can also be used if one wants to
define the plane representing the upper surface (e.g. command PLANE under task DR).
The T values listed correspond to the current arguments (TRIM, HEEL) and are not valid for quantities with differing arguments
provided in the LQ.
When selecting a new compartment, this may cause a change of the depth arguments as presented below.
For more flexibility, isolated argument values, not following from the step or not contained in a series can be added separately with command
ADD. Values given in the ADD command are interpreted as arguments of the type presently valid, and added to the current set. Redefining the
argument cancels the ADD command. Volume arguments are not supported.
For height arguments (H or STEP), there is the alternative ADD STEPS, adding values where there is a step in the waterline area function. The
values are added doubled, causing the waterline area to be calculated separately above and below the discontinuity. The same effect is obtained
if a double argument is added manually.
The number of depths resulting from the current combination of depth argument and compartment can be inquired with command NARG. The
result is also stored in variable NARG, in order to support decisions regarding page feeds or similar in listing macros. Note: without the NARG
command, the variable is not updated.
In a given table, the calculations are made for a fixed trim and heeling, the values of which can be set with the corresponding arguments (TR,
HEEL).
Values calculated for several trims and heelings can be added into a single table the following ways:
The volume and quantities derived from the volume (VNET, WL) can be equipped with a qualifier in the quantity selection (LQ command), which
will be interpreted as trim. For example,
gives the net volume for three trims in the same table (-1,0 and 1). The volume without qualifier is calculated as specified by the trim argument
(assumed 0 in the example).
Alternatively, a heel can be given as qualifier, which is distinguished from a trim by adding prefix H, for example VNET/H10, denoting heel 10
(degrees). For symmetry, a T can be added in front of a trim (e.g. VNET/T-2). Both a heel and a trim can be combined, for example VNET/H5T1
for heel=5, trim=1.
Another possibility is to use the correction quantities VCORRT, VCORRH, SCORRT and SCORRH. The two first ones give a correction to the net
volume, and the two latter ones to the sounding value. The last letter T or H tells whether the correction is for trim or heeling. The argument for
which the correction is calculated is given as qualifier, for example
This selection gives the net volume and a volume correction for trims -1 and 1 and heelings 5 and -5.
The sounding correction gives the same information in the form of a correction of the sounding value, so that the volume table, read at the
corrected sounding value gives the corrected volume. For the sounding correction to be exact, the spacing between the calculation draughts
should be small enough to allow linear interpolation.
For the correction quantities (VCORRT, VCORRH, SCORRT, SCORRH) to be meaningful, they must be calculated with fixed gauge (not height),
using GAUGE or GSTEP as argument.
ARR - arrangement
The arrangement has its normal function of providing parameters for the compartments and a set from which selections are made. The current
arrangement is selected as default, either as such or as the subset prefixed with LD (e.g. LDA) as in loading conditions. A tank need not belong to
the arrangement, but some parameters (mainly RED) may then need assigning manually.
When a new compartment is selected, the first device defined is selected as default. Without a sounding device, the arguments GAUGE, GSTEP
and the list quantity GAUGE cannot be used. The sounding device is expressed as type/id, where '/id' is optional. If no id is given, a device with
the given type and empty id is selected, if found, otherwise the first one with the given type.
This parameter is relevant for quantities WL (weight of load) and FSM (free surface moment) only. The default is fetched from the arrangement.
This parameter is relevant for quantities VNET (net volume), WL and FSM, and for the argument quantities VOL and VSTEP. The default is
fetched from the arrangement, unless a special definition has been made under CP (see below).
This argument controls the listing of undefined centers of gravity or redundant volumes, as presented below.
This option may improve the accuracy of quantities derived from the surface (AWP etc), provided that the sections are obtained reliably.
Most of the arguments are to some degree dependent on the compartment, and may need correction after changing compartment. This
paragraph presents the changes made by the system, when reading a new compartment.
For RHO and RED, new values are always assigned after reading a new compartment. If a variable steel reduction has been defined, it will be
used. A non-standard value to be applied on many compartments must therefore be repeated.
REFZ is normally handled as RHO and RED, i.e. the given value is supposed to be relevant for the current compartment, and new values are
assigned when a new compartment is read. With the option *, e.g.
REFZ 0 *
the given value will be kept fixed when changing compartments. Command
REFZ -
has the (only) effect that the fixing of the reference height is cancelled.
When the compartment s changed, a sounding device is automatically selected. If no other instructions have been given, the first one
encountered is selected. The argument SDEV selects a sounding device for the current compartment, and does not affect subsequent
compartments. In the same way as for the reference height, this can be changed with the option *, with the effect that the device for a new
compartment is selected so that the given one is matched as closely as possible. The value shown by command ARGS is the one currently
active, and if the * option has been given, this selection is listed separately.
SDEV -
If no sounding device matching the default is found when fetching a compartment, a message is printed, provided that a sounding argument is
active (otherwise the sounding device is assumed not relevant).
Of the depth arguments, H, STEP, GSTEP and VSTEP are treated as useful regardless of compartment, and keep their value when reading a
new one. The other ones are supposed to need redefining, but in order to have some arguments, defaults are assigned as follows: Fixed gauges
are replaced bay GSTEP=0.1, and fixed volumes are replaced by STEP=0.5. If the new compartment does not have a sounding device, gauge
arguments are replaced by STEP 0.5. If a gauge step is replaced because the compartment does not have a sounding device, the value is saved
and applied again when possible.
4. Variables
A number of calculator variables are assigned in order to support programming of macros:
The variable COMP is assigned the name of the current compartment. If the compartment is a part of an arrangement, the following variables are
set from SM-task:
SMCLAS class
SMPURP purpose
SMTYPE type
If a selection has been made with command SELECT, the list of compartments is available in the calculator array CPLIST. The identifier of the
current sounding device is stored in variable SDEV. If none is available, value 'NONE' is assigned.
At separate request (command NARG), the number calculation depths is stored in variable NARG.
The variable LTUBE is assigned the length of the sounding tube (if any).
5. Listing
5.1. LQ qualifiers
In the LQ command, a so-called qualifier can be added to the symbol of the quantity, separated by a slash, e.g. VOL/2. The effect of the qualifiers
is dependent on the application, and in this case, the following alternatives are available:
The standard list commands NL (new list), NP (new page), LF (line feed), TYPE (print arbitrary text), FIG (add figure) are all available, as are
commands !FORM and !PAGE.
In designing layouts, the parameterless calculator function CLINE may be useful, telling the line number of the last line printed on the current page
(headers not counted).
The TYPE command, possibly with variable components can be used for adding headers not belonging to the table.
Note the calculator function FMT, by which a fixed format and field length can be given to a numeric variable. For string data, function SBS has
the same effect. Note also that the syntax of the TYPE command allows fixed starting columns to be given. A (tilde) at the end of the line allows
the TYPE command to be input on several lines (the tilde character may be changed in the installation parameters). The following are two
examples of the TYPE command:
In order to help printing tables over many compartments, commands SELECT and SORT are available. Command SELECT selects a subset of
compartments from the current arrangement, using a criterion based on the standard SM quantities. The following example selects all
compartments with liquid contents except ballast water:
The result of the selection is a calculator array named CPLIST, which can be used for controlling loops in macros or the !DO command, as in the
following example:
where LIST-MACRO is the name of a macro containing listing commands, including a command COMP @NAME. The array itself can be listed
with !VAR LIST CPLIST. Another way of using the array is presented below in the example list for LISTCP.STD.
Command SORT controls the order within the set selected by defining a parameter (e.g. NAME, XMIN) as sorting criterion. NOTE: Must be given
before SELECT.
A selection made with SELECT can be further restricted on the basis of a criterion concerning sounding devices. This selection is given as a
separate SELECT command after the initial one, in the form
SELECT DEV=type
SELECT DEV=type/id
SELECT DEV>type or
SELECT DEV<id
where 'type' and 'id' are the identifications used for sounding devices, for example:
SELECT DEV=MS
An equal sign means that both type and id must match (omitted 'id' means empty id, not unspecified one). The other forms mean that the type or
id only need match. If the type is given with one letter (e.g. SELECT TYPE=R), the selection concerns both sounding and ullage devices of the
same main type.
If the device selection is repeated, it is done from the set resulting from the initial SELECT.
At arguments giving zero volume or waterline area, the centers of gravity are undefined. When this happens at the bottom of the tank, the
standard solution is to use the values obtained when calculated close to the bottom. Above the tank, the last values obtained are used.
Alternatively, the values may be represented by minus signs or spaces.
Volumes and areas outside the range of the compartment are normally represented by the natural values, i.e. zero for areas and volumes below
minimum and max volume for arguments above maximum. Above the upper limit of the range, one can alternatively represent these values by
minus signs or spaces, if one wants to emphasize the fact that the range of the tank is exceeded The first value of the maximum volume is printed
- repetitions only are suppressed.
These aspects are controlled by the argument DMODE. It is a string, where the existence of the following letters are interpreted as follows:
These options should not be used if the table is used as input for diagram plotting or processing in the table calculation module, because the
values used for representing dummy values can cause unwanted effects.
5.5. Examples
The first example shows an ordinary list with a number of quantities listed as function of the gauge reading:
LQ CP, GAUGE, VNET, CGX, CGY, CGZ, AWP, CGXA, CGYA, FSM('FSM/30')/30
TOO CP HD=(UL, S, U, UL, -, UL)
GSTEP 100
-----------------------------------------------------------------
GAUGE VNET CGX CGY CGZ AWP CGXA CGYA FSM/30
cm m3 m m m m2 m m tonm
-----------------------------------------------------------------
0 1.5 64.08 3.66 0.03 34.3 64.11 3.73 3
100 39.0 64.50 4.12 0.49 37.3 65.96 4.49 35
200 75.2 65.17 4.34 0.93 41.5 65.95 4.65 32
300 113.3 65.44 4.45 1.40 42.5 66.03 4.69 33
400 145.8 65.49 4.56 1.80 19.7 64.34 5.77 26
500 165.5 65.37 4.70 2.09 20.1 64.48 5.78 7
600 185.6 65.28 4.82 2.43 20.4 64.58 5.79 2
700 205.9 65.21 4.91 2.81 20.7 64.65 5.79 2
-----------------------------------------------------------------
The following example illustrates combination of different trims in the same list:
----------------------------------------------------------------
sounding trim=-2 trim=-1 even keel trim=1 trim=2
cm m3 m3 m3 m3 m3
----------------------------------------------------------------
0 1.7 1.3 1.5 2.1 3.1
100 39.6 39.3 39.0 38.8 38.6
200 75.8 75.5 75.2 75.0 74.7
300 114.0 113.7 113.3 113.0 112.7
400 145.3 145.5 145.8 146.0 146.3
500 165.1 165.3 165.5 165.7 165.9
600 185.2 185.4 185.6 185.8 185.9
700 205.5 205.7 205.9 206.1 206.3
----------------------------------------------------------------
The following example illustrates the effect of DMODE. The first example is listed with the default behaviour. The LQ is the same as above, but
the tank is different.
----------------------------------------------------------------
sounding trim=-2 trim=-1 even keel trim=1 trim=2
cm m3 m3 m3 m3 m3
----------------------------------------------------------------
760 2092.5 2087.1 2082.0 2077.1 2072.6
770 2118.5 2113.1 2108.0 2103.2 2098.7
780 2144.6 2139.2 2134.1 2129.3 2124.8
790 2170.7 2165.3 2160.2 2155.4 2150.9
800 2196.8 2191.4 2186.2 2181.4 2176.9
810 2222.3 2217.4 2212.3 2207.5 2203.0
820 2244.1 2243.5 2238.4 2233.6 2227.9
830 2261.7 2267.2 2264.5 2259.1 2248.7
840 2275.1 2282.8 2290.5 2277.8 2265.3
850 2284.4 2290.0 2290.5 2288.2 2277.7
860 2289.5 2290.5 2290.5 2290.5 2286.0
870 2290.5 2290.5 2290.5 2290.5 2290.1
880 2290.5 2290.5 2290.5 2290.5 2290.5
----------------------------------------------------------------
DMODE V
----------------------------------------------------------------
sounding trim=-2 trim=-1 even keel trim=1 trim=2
cm m3 m3 m3 m3 m3
----------------------------------------------------------------
760 2092.5 2087.1 2082.0 2077.1 2072.6
770 2118.5 2113.1 2108.0 2103.2 2098.7
780 2144.6 2139.2 2134.1 2129.3 2124.8
790 2170.7 2165.3 2160.2 2155.4 2150.9
800 2196.8 2191.4 2186.2 2181.4 2176.9
810 2222.3 2217.4 2212.3 2207.5 2203.0
820 2244.1 2243.5 2238.4 2233.6 2227.9
830 2261.7 2267.2 2264.5 2259.1 2248.7
840 2275.1 2282.8 2290.5 2277.8 2265.3
850 2284.4 2290.0 - 2288.2 2277.7
860 2289.5 2290.5 - 2290.5 2286.0
870 2290.5 - - - 2290.1
880 - - - - 2290.5
----------------------------------------------------------------
6. Diagrams
The standard commands PQ, POO and PLD are available. The subject identifier is CP, but being the only alternative, it is not needed in the
commands.
The PQ command (plot quantities) has the same alternatives as the LQ command.
With command
predefined plots can be run in a similar way as with the LIST command. The macros are named PLOTCP.macro in this case.
The following example concerns the tank shown in the figure below:
sounding devices
variable steel reductions
reference heights
These are installed as the subtask PAR under the main CP task. In addition, there is the possibility to define a reference height.
Table of Contents:
1. Sounding devices
1.1. Device types
1.2. Identification of sounding devices
1.3. Defining sounding devices
1.4. Selecting the sounding device for calculation
1.5. Auxiliary functions
1.6. Drawing of sounding devices
1.7. Old definitions
1.8. Using sounding values with the calculator
2. Steel reduction as a function of filling
2.1. Function
2.2. Definition
2.3. Alternative definitions
2.4. Storing
2.5. Updating
2.6. Connection to SM
2.7. Auxiliary functions
2.8. Example
3. Other definitions
1. Sounding devices
The sounding devices can be manual sounding devices or remote sounding devices, and both types can show soundings or ullages. The types
are designated by two-character symbols as follows:
LS, LU same device type as RS,RU, but with installed with local reading device.
From the calculation point of view, types LU,LS are equivalent with RU,RS, and the difference has been introduced for administrative purposes
only.
A manual sounding device is formed by a tube, along which a distance is measured, either from the zero point up to the liquid level (sounding) or
from the upper end down (ullage). The zero point is by default at the end of the tube, but can be redefined by explicit definition.
The following figure shows an example, where straight sounding tubes are placed in the corners of a box shaped tank. Soundings are shown to
an inclined liquid level.
This device is presently implemented for tanks with horizontal bottom only (at least in the region where the device may touch it).
The quantity ' gauge' is used to denote device readings, regardless of whether they represent soundings or ullages.
The usage of the words 'manual' and 'remote' in this context has historical reasons, and the relevant aspect is the geometric behaviour. For
example, a device that senses the upper level of the surface by using a directed radar beam must be defined as an MU device.
A sounding device is always attached to a specific compartment. A compartment may have several devices, which usually can be distinguished
by their type only, but when needed, an additional identifier can be added. Thus, the identification of a device is formed by
type/id
where 'type' is MS, MU, RS, RU, LS, LU or DS. '/id' is optional, and can be selected freely.
Sounding devices are defined with command DEV in subtask PAR under CP. This command either redefines a device or adds a new one,
depending on whether there is already a device with the given identification.
where 'comp' is the name of the compartment, 'type/id' is the identification, 'curve' the definition the geometry of the tube and 'h' the (optional)
height of the zero point.
'curve' can be represented by a directly given set of points in space or by the name of a separately defined curve.
Examples:
The first example shows usage of reference to surfaces. Note however, that there is no automatic updating, in case the geometry is changed. In
the second example, the sounding tube is defined as the curve named TUBE-T112, and the zero point is at height 0.7.
where (x,y,z) is the location of the probe and 'h' the optional reading correction.
Example:
(x,y,z) is the point from which the device is lowered and h the height (z-coordinate) of the tank bottom.
When a new compartment is selected with the COMP command, the first device (if any) will be selected as default. Other selections can be made
with the SDEV argument. Arguments GAUGE and GSTEP and result quantity GAUGE require that there is a device available.
A catalog of stored devices is obtained by command CAT. A list of compartments having devices is stored in a calculator array DEVLIST.
(The keyword DEV is optional). This command lists the devices defined for the given compartment. In order to list a set of compartments in a
single command, the name of a specific compartment can be replaced by the syntax *LIST or *:
DES *list
DES *
'list' is the name of calculator array, and the operation will be repeated for all names in the list. The bare * refers to the list DEVLIST, created by
the CAT command.
A list of sounding devices is also available formally as a property of the arrangement, quantity SDE. For example, SDE can be added to the LQ of
SM or inquired with the CPP function.
In the drawing task, graphic check of sounding devices can be done with commands
A manual sounding device is drawn as a curve, adding symbol at the high end. The default for the name of the figure used for the symbol is
MSDEVICE. A remote sounding device is represented by a symbol only (RSDEVICE). A dip device is represented by a symbol showing the
attach point and a figure (DSDEVICE) showing the weight.
type R,M,L given main type only, RS,MS,RU,MU,LS,LU: specified type, type/id: specific device.
D=d: size of figure (drawing scale), default twice the standard text height (as set with TH)
If ID NAME is set, and the figure has a text field 1, the name of the compartment (DRW) or name of device (PLOT) is written into the text field.
This information is relevant for sounding devices created before rel. 90.1. The storage format initially defined for sounding devices was suitable for
fixed sets of devices only, and in order to support a more flexible handling of devices, the storage has been revised.
Definitions according to the new format are done in subtask PAR under task CP, and can only be used in this task, in PLOT SDEV and in the
inclining test task.
Old type definitions are automatically converted into the new format when entering wither CP or LD task. A notice of the covnersion is
shown.
Calculations involving sounding device readings can be done by the calculator using the following service functions provided by CP.
The functions CP.T and CP.GAUGE convert gauge values to draughts and vice versa:
t=CP.T(comp,device,gauge,trim,heel)
gauge=CP.GAUGE(comp,device,t,trim,heel)
comp=name of compartment, device=name of device, e.g. MS, MS/V1. trim and heel are optional, default=0. NOTE: as in the VOL function, these
are given in the external form: trims in m and heel in degrees.
The draught t is the same as used when expressing the filling in volume oriented calculator functions, for example VOL:
vol=VOL(comp,t,trim,heel)
vol=CP.VOLG(comp,device,gauge,trim,heel)
gauge=CP.GVOL(comp,device,vol,trim,heel)
In all these functions, the same conventions for trim and heel are valid.
A list of devices defined for a given tank is obtained by the function CP.DEVICES. The user must reserve a string array to receive the result:
@devlist=ARR(3)
@n=CP.DEVICES(comp,devlist)
where comp=name of compartment and n=number of devices. The devices are stored using the normal conventions, e.g. MS, MS/V1.
Normally, the original input is given as a function of filling height, which is converted to a function of filling degree. The correction is defined for
zero trim and heel, for non-zero trim or heel the meaning of height is lost.
The steel reduction defined this way replaces the fixed one defined under SM in the CP task. The argument FILL is not supported for variable
steel reductions (works inexactly). The variable steel reduction is also available in the table interface of LD.
2.1. Function
q=vol/volm
red=f(q)
vnet=(1-red)*vol
where
This principle is adopted as being the most convenient when applying the correction, especially when trim or heel is non-zero. The result is likely
to remain useful even if minor changes are made to the geometry. This is the way the steel reduction is handled internally. It can be defined
directly this way or by giving a local reduction as function of height.
2.2. Definition
The steel reduction is defined in the PAR subtask using command RED. The basic form gives the local reduction as a function of z:
'comp' is the name of the compartment. z1,z2... are the z-values where the reduction is defined. red1,red2, etc. designate the reduction at the
given z. Note: the reduction is always given as a fraction (range 0...1). The parentheses are optional.
qi=fraction of volume (range=0...1) and 'red' the reduction for the part of the volume in question.
The 'I' can be read as 'internal' or 'integral'. The function defined this way can be thought of as the integral of the local steel reduction defined by
the basic form. When given the first form, the integral is generated and the result is stored in the latter form. In order to represent the integral with
sufficient accuracy, the number of arguments is increased at need so that the spacing is at most 1/20 of the height of the compartment.
If the range given does not cover the whole compartment, it is extrapolated, and a warning is given.
Alternatively, the definition can be taken from a table containing at least the quantities VOLM and VNET, with VOLM increasing. Such a table can
be made by the normal LIST command of CP, after which new values for VNET can be entered under the TAB task. The command is then
The result is stored as if the reductions had been defined the normal way.
2.4. Storing
The result is stored under the name RED*comp. It has the form of a table and can be used under table calculation (set prefix=RED*). This way it
is possible to draw the curve. The steel reduction can be defined initially as a table, provided that it has the column VREL (quantity 5344) and
RED (quantity 1520).
2.5. Updating
A steel reduction given in the internal form is independent of the compartment geometry and useful even if the geometry is changed. When given
a local reduction, the geometry is needed for generating the integral, and there is no automatic updating in case of changes in the geometry,
therefore the definition must be re-entered under PAR.
2.6. Connection to SM
The overall steel reduction defined under SM is supposed to coincide with the varying steel reduction at maximum filling. There are no automatic
transfers between CP and SM, but a warning is given when a compartment is used under CP and there is a conflict. The values obtained from SM
and CP are shown. At any time, the total reduction from CP can be inquired with the service function CP.VARRED, e.g. !CAL
CP.VARRED('T10',1).
CAT RED
The command obeys the options defined for the general CAT command (see !EXPL CAT/GEN).
This command lists the definition of the reduction defined for the given compartment.
2.8. Example
The example shows a compartment (R601 of Napaship), where a steel reduction is defined as follows
In the lower half, the local steel reduction if 50 % (exaggerated for purposes of illustration) and in the upper half it is zero. The following figure
shows the local steel reduction and the integrated one:
3. Other definitions
A reference height can be defined in subtask PAR by command
REFZ comp h
The default for the reference height is the lowest z-coordinate of the compartment. The reference height defines the meaning of argument quantity
and result quantity H.
1. Sounding table
2. Listing groups of compartments
3. Example macro for LIST .macro
4. Example of plotting
1. Sounding table
The following macro shows a number of possibilities available for handling options and decisions regarding sounding tables. The macro is here
presented as one text, in practice one might prefer to collect parts of the macro into independent parts, allowing these parts to be used in other
combinations also.
Comment: this macro was made before some features of NAPA BASIC were introduced.
1000 **
END OF TEXT
Listing example:
Main macro:
The macro CP.SND.L, run in the DO command above, contains the following:
@VT=VTYP('COMP')
@IF VT=0 THEN
!TYPE No compartment has been selected
!TYPE Use SELECT crit to select many or COMP to select one
@GOTO END
@ENDIF
@N=1
@ENDIF
@IR=LOCS(LISTPAR,'C') @@ Check for argument C
@IF IR=0 NL 'Compartment tables'
@LABEL LIST
NP
TYPE
TYPE Compartment ident: @COMP
TYPE Compartment descr: @SMDES
TYPE Contents : @SMPDES (@SMPURP, RHO = @SMRHO)
TYPE
TYPE Extreme points of comp: Aft end at frame @FMT(FR(SMXMIN),1,7))
TYPE Fore end at frame @FMT(FR(SMXMAX)),1,7)
TYPE Lowest point ~
@FMT((LL(COMP,3)),2,7) m above BL
TYPE Highest point ~
@FMT((UL(COMP,3)),2,7) m above BL
TYPE
LIST
@LABEL NEXT
@IF I=N @GOTO END
@I=I+1
COMP @CPLIST(I)
@GOTO LIST
@GOTO END
@LABEL HELP
!TYPE
!TYPE Instructions for command LIST .STD
!TYPE
!TYPE The listing gives a short header and the basic list for each
!TYPE compartment. The contents of the list is controlled by the
!TYPE arguments and the LQ and TOO. A new list named
!TYPE 'Compartment tables' is opened unless option C (continue)
!TYPE is given.
!TYPE If a selection has been given (command SELECT) all
!TYPE compartments are listed, else the current one only.
!TYPE A selection can be cancelled with command SELECT OFF.
!TYPE
@LABEL END
!VAR STD @@ Reset variables and tilde
Output example.
4. Example of plotting
This example is a macro intended to be used with the PLOT .macro command. It uses a figure named PLD1, containing a number of text fields.
After the listing, an example of output and the corresponding PQ/POO are given.
@N=0
@IF VT>0 @N=RSIZE(CPLIST)
@IF N>0 THEN
@N=RSIZE(CPLIST)
@ONERR NEXT
COMP @CPLIST(1)
@ELSE
@VT=VTYP('COMP')
@IF VT=0 THEN
!TYPE no compartment has been selected
!TYPE Use SELECT to select many or GET name to select one
@GOTO END
@ENDIF
@N=1
@ENDIF
@IR=LOCS(LISTPAR,'C')
@IF IR=0 DR;DRAWING 'TANK_DIAG';END;
@LABEL LIST
PLD POO SUB, NAME=@COMP, FIG=PLD1,
T2='Compartment ident: @COMP',
T3='Compartment descr: @SMDES',
T4='Contents : @SMPDES (@SMPURP, RHO = @SMRHO)',
T11='TANK DIAGRAM',
T14=' @DTX(DT)',
T15=' @DTX(TM)',
T16=' @DTX(YCN)',
T17=' @DTX(SGN)',
T18=' @DTX(PRV)'
@LABEL NEXT
@IF I=N @GOTO END
@I=I+1
COMP @CPLIST(I)
@GOTO LIST
@LABEL HELP
!TYPE Instructions for command PLOT .STD
!TYPE
!TYPE The command creates a PLD drawing for each tank selected,
!TYPE as subdrawings to the main drawing TANK_DIAG. An option C
!TYPE (as in continue) causes the macro not to create a new drawing
!TYPE but continue to add subdrawings to the current one.
!TYPE
!TYPE If a selection has been given (SELECT) all compartments
!TYPE are plotted, else the current one only.
!TYPE A selection can be cancelled with command SELECT OFF.
@LABEL END
!VAR STD
Output example:
Tank diagram
The example was made with the following plot quantities (PQ) and plot options (POO):
This set of options is designed to produce a reasonable plot with up to four freely selected quantities in the PQ.
1. Main task
1.1. Subtask PAR
2. Service functions
1. Main task
This command adds depth arguments to those obtained from the main argument
(STEP,H,GAUGE or GSTEP, not VOL or VSTEP).
Directly given values. These are cancelled when giving a new main argument or changing
compartment.
value: additional depth argument values, interpreted as the same quantity as the current main
argument, and in the same unit. An asterisk as prefix means a discontinuity, and two values
are added, one on either side of the given one.
ADD TE
'Tube end', add the end of the sounding tube when generating gauges from the GSTEP
argument.
ADD GMAX
Add the value corresponding to maximum fill to the gauges obtained from GSTEP, taking into
account current trim and heel.
ADD STEPS
Add steps in the volume=f(depth) curve to the arguments. This alternative is available for H and
STEP arguments only.
ADD OFF
If many different types of ADD's are given, they have to be given in different ADD commands.
An ADD command of a different type will not make the previous ones inactive.
This command lists the current calculation arguments in the form used for input. A short
explanation is added as comment.
This command selects the arrangement to be used as source of compartment data. Default is
the one registered as permanent or (if defined) a subset named by adding prefix LD (as under
LOAD).
ARR id
This command permanently converts sounding device definitions from the old format to the
new one. Old=older than rel. 87. This is now obsolete since conversion is done automatically
when old device definition is found.
CNV OLD
This command selects the compartment to be calculated. If the compartment belongs to the
current arrangement, the density of the contents (argument RHO) and the steel reduction
(RED) are assigned. A sounding devices is selected, if any (first one or as spec. with command
SDEV ... *). The compartment name is stored in the variable 'COMP'. If it belongs to the current
arrangement, the main parameters are stored in variables SMPURP=purpose, SMVOL=volume
etc. (see documents).
COMP name
This argument controls the way undefined or redundant values are listed.
DMODE option
option: string containing one or several of the following characters (other characters ignored):
EXAMPLE
DMODE VGS
The standard drawing task is entered. Return to CP is done with command CP or OK.
The calculation depths are expressed as filling i.e. fraction of total volume. Effect of varying
steel reduction not taken into account.
FILL values
As FILL, but the values are selected as a multiple of the given step.
FSTEP step
This command defines the calculation heights by sounding values. A subsequent COMP or
SDEV command will cancel the values set with this command (assumed no longer relevant).
GAUGE values
Synonym for COMP. With parameter OLD, device definitions in the old format are converted to
the new one for the duration of this task (see also CNV OLD).
This command defines sounding arguments by a step. The arguments will be selected in the
range covered by the heights of the tank and the sounding device. See also argument
TRRANGE.
trimrange: (opt) old form of giving the trim range, replaced by argument TRRANGE.
H calculation heights
This command specifies calculation depths by heights measured from the reference height
(see command REFZ). The H quantity is well defined only when the ship is upright (trim=0,
heel=0).
H values
This command defines the calculation heel. Default is zero. If a heel qualifier is used in list, it is
strongly advised to use zero heel in arguments to avoid double effect. NOTE: quantities FSM
and VCORRH should normally be calculated with initial heel 0 (=the HEEL argument), while
the additional heel argument needed is given as qualifier in the LQ (see !EXPL LQ).
HEEL heel
This command adds empty lines, either a specified number or until a specified position on the
page, see !EXPL LF/GEN.
LIST CP t-options
This gives the basic list. The quantities to be listed are specified by command LQ. CP is default
if no argument is given in the command.
LIST REF/OBJ/EXP
LIST ARG
List arguments
LIST .id
This command selects the quantities included in output started with LIST CP (or bare LIST).
For full instructions on the LQ command, use !EXPL LQ/GEN.
A numeric qualifier (not zero) is taken into account in the following cases:
With subject SM (i.e. LQ SM ...) the LQ command concerns the listing with SML.
The number of depths (=data lines in the table) is listed and stored in variable NARG.
NL new list
This command can be used to start a new list or specify parameters of the list. See !EXPL
NL/GEN. Default for the list name is 'TANK TABLES'.
NP new page
In this subtask, various permanent definitions related to NCP are made, e.g. sounding devices
are defined in this task.
This command draws a diagram showing the quantities selected with command PQ and using
the options set by command POO.
plot-options: (opt) standard plot options, see !EXP PLD/GEN. If this part is given, the keyword POO must be
added.
This command handles plot output options for diagrams drawn with command PLD. For the
syntax of the POO command, see !EXPL POO/GEN.
This command selects the quantities to be output graphically using command PLD. The first
quantity in the list is used as the argument. The available quantities and the meaning of
qualifiers are the same is in command LQ. For the general syntax of the PQ command, see
!EXPL LQ/GEN.
The steel reduction is used for calculating net volume and weight of contents. When selecting a
compartment, the steel reduction is set to the value defined in the arrangement, if any,
otherwise 0.
RED value
This command defines the reference height from which the calculation heights given by H are
counted. When a new compartment is read, REFZ is set to the reference height defined for it, if
any, otherwise the lowest z-coordinate of the tank.
REFZ h *
*: (opt) makes the height valid for subsequent comppartments also. This option is cancelled with
REFZ -.
The density of contents is used if weights or free surface moments are calculated. When
selecting a compartment, the density is set to the value defined in the arrangement, if any,
otherwise 1.
RHO rho
For more details, see !EXPL SCAN/GEN. SCAN SEND just sends the current result list to the
printer. Note: the current result list closed.
This command selects the sounding device for the current compartment or a default for
subsequent compartments.
SDEV type/id *
*: (opt) this option makes the selection default for subsequent COMP selections. Without this
option, the effect concerns the current compartment only.
This command selects a subset of compartments using the a selection criterion based on the
compartment parameters (e.g. NAME, PURP, TYPE, CLASS, XMIN etc). The selection is
stored in the calculator array CPLIST, which can be listed with !VAR LIST CPLIST. A preceding
SORT command controls the order in the list. See also the second form. Note that if COMP
argument has not been given the first compartment of the selection is assigned to the
arguments (new in Rel. 2011.1)
SELECT criterion
criterion: selection criterion in the standard form (see !EXPL SEL/GEN), based on compartment
parameters.
EXAMPLES
SELECT PURP=HFO
SELECT NAME>T TYPE=L
SELECT device-crit
This form selects a subset based on sounding devices. A select from the arrangement
(previous form) must first be made. The preceding selection is restricted to those
compartments having a sounding device of the specified type.
SDEV=type: select with given type and empty id. 'type'=MS,RS, RS,RU,LR,LU or only M, R or
L.
This is the same function as LIST under SM, and produces data for the compartments in the
current arrangement. The result can be controlled with commands SELECT and SORT. When
selecting quantities with LQ, subject SM must be added (LQ CP is the default). For more
information, see !EXPL LIST/S01.
This command specifies sorting that affects the result of the SELECT command. For sorting
the output of SML, use TOO SM ...
SORT qnt -
This command defines the calculation heights by specifying a step. The calculation heights are
selected at multiples of the step within the range covered by the compartment. Note that the
last height is omitted if it is close to the maximum height of the compartment. Additional heights
can be added with the command ADD (see !EXPL ADD).
STEP step
The command gives access to the table calculation task, to which CP data can be transferred
by generating a table with the table output option TABLE.
This is the standard command for setting table output options for controlling the layout of the
listing with LIST (subject CP) or SML (subject SM). See !EXPL TOO/GEN.
TR calculation trim
This command defines the calculation trim. Default is zero trim. If a trim qualifier is used in list,
it is strongly advised to use zero trim in arguments to avoid double effect.
The command defines a trim range, taken into account when deciding the range from which
gauge readings are selected when applying the GSTEP argument.
TRRANGE OFF
This is the standard TYPE command for adding arbitrary text to the list, see !EXPL TYPE/GEN.
This command selects the depth argument so that specified (net) volumes are obtained.
VOL volumes
This command selects the depth argument so that (net) volumes are obtained as multiples of
the given step.
VSTEP step
The command specifies whether quantities related to the surface area should be calculated by
doing sections from the object or by using the calculation sections.
WLS ON/OFF
ON: waterline section mode ON: generate sections for calculating the area related quantities. This
alternative is more accurate, but is slower and involves the risk for failed sections.
A list of sounding devices of the project is produced. The names listed are stored in an array
named DEVLIST. CAT RED gives a catalog of all tanks having a variable steel reduction
defined.
EXAMPLE
DELETE DEV T120 MS/NN
Repeat the operation for all names in the given array. DES DEV *; is shorthand for CAT;DES
DEV DEVLIST() and gives the result for all tanks in the arrangement.
Display the definition of the steel reduction for the given compartment.
This form defines a manual sounding device, where the soundings are formed by lengths
measured along a tube.
/name: (opt) name of device. Must be given when there are several devices of the same type in one
compartment. Note that device name can only have max. 12 characters.
curve: definition of the geometry of the tube, either directly or by reference to a space curve:
h: (opt) height of zero point (MS only). Defines the point from which soundings are measured,
default=startpoint of curve. h is measured in meters from the baseline, and has to be above the
lower end of the pipe.
EXAMPLES
DEV T102 MS (#BH1+0.2 2 #TTOP) (#BH1+0.2 4 #TTOP+5),
(#BH1+.02 4 #DECK1+0.4)
DEV T102 MS/F MS-T102 4.5
Defines a remote sounding device, i.e. device measuring the orthogonal distance to the liquid
surface.
comp: as above
id: type of device, RS=remote sounding, RU=remote ullage. For administrative purposes, the
symbols LS and LU can be used instead of RS,RU.
EXAMPLE
DEV T102 RS (#BH1+2, 0, #TTOP+0.1) 0.1
Defines a dip sounding device, i.e device measuring the immersed part of a line lowered from a
fixed point to the tank bottom.
comp: as above
name: as above
h: height of tank bottom (or place where the dip touches the bottom)
This command is in all respects equivalent with DES, except that the result is stored in the
editor work area and the editor is started. Within the editor, all editor commands are available,
including SAVE and REPLACE. Exit from the editor can take place the normal way (END,
OMIT), or by using the command ADD, in which case the contents of the work area will be run
as in *ADD. When EDIT is given without parameters, the editor is entered using the current
contents of the work area.
END
OK
This command defines a steel reduction that varies with the filling. It is applied in the CP task
only. See also commands DEL, DES and CAT.
r1,r2: corresponding LOCAL steel reduction, i.e. fraction of the area at the given height.
Use the given table as source for the steel reduction. The table must contain at least columns
VOLM and VNET, and the volumes must be sorted in increasing order.
ZREF t
2. Service functions
The function stores the sounding devices defined for a compartment in an array. The function
value is the number of devices defined.
CP.DEVICES(comp,array,filter)
array: array for storing the result. Previous contents are removed.
filter: (opt) restricts the devices returned by a criterion expressed by a filter (see !EXP WILD/GEN)
list=CP.DEVICES(comp,filter)
As above, but the result array is reserved internally. it will be reused at the next call.
EXAMPLES
@DEVLIST=ARR(3)
@N=CP.DEVICES('R10',DEVLIST)
The function returns the gauge reading corresponding to a filling height expressed by draught.
The reverse function is done by CP.T.
CP.GAUGE(comp,device,t,trim,heel,dens,tempv,shrt,pres,pef)
device: sounding device (MS, RS etc). For local definition, see CP.VOLG.
T: draught
tempv: (opt) vapour temperature (effective only if tape correction table defined)
EXAMPLE
CP.GAUGE('R10','MS',1.2)
The function returns the filling height expressed as draught corresponding to a gauge reading.
The reverse function is done by CP.GAUGE.
CP.T(comp,device,gauge,trim,heel,dens,tempv,shrt,pres,pef)
device: sounding device (MS, RS etc). For local definition, see CP.VOLG.
tempv: (opt) vapour temperature (effective only if tape correction table defined)
EXAMPLE
CP.T('R10','MS',0.52)
The function returns the gauge reading corresponding to filling expressed by a volume. The
reverse function is done by CP.VOLG.
CP.GVOL(comp,device,vol,trim,heel,red,dens,tempv,shrt,pres,pef,opt)
device: sounding device (MS, RS etc). For local definition, see CP.VOLG.
V: the value obtained from the varying steel reduction (as defined by RED in subtask PAR of
CP). Same as SM if not defined.
tempv: (opt) vapour temperature (effective only if tape correction table defined)
opt: options
EXAMPLE
Return the gauge reading on MS when the net volume in R10 is 30.5, applying the steel
reduction obtained from SM.
CP.GVOL('R10','MS',30.5,0,0,'SM')
The function returns the volume corresponding to a gauge reading. The reverse function is
done by CP.GVOL.
CP.VOLG(comp,device,gauge,trim,heel,red,dens,tempv,shrt,pres,pef,opt)
device:
arr: real array containing the elements type, h, x, y, z [x y z ...] where H and the coordinates
correspond to the parameters given in PAR/CP and 'type' gives the type: 1=MS, 2=MU, 3=RS,
4=RU, 5=DS.
V: the value obtained from the varying steel reduction (as defined by RED in subtask PAR of
CP). Same as SM if not defined.
tempv: (opt) vapour temperature (effective only if tape correction table defined)
opt: options
EXAMPLE
CP.VOLG('R10','MS',0.52)
CP.VOLG('R10','MS',0.52,0,0,'V')
Return the net volume when the reading of MS is 0.52, applying the varible steel reduction.
This function returns the geometry of a sounding device as a curve or point object or as three
coordinates only. The result is returned as the function value (reference number to a curve,
point object or calculator array).
p=CP.GEOM(comp,device)
Return coordinates of the device (endpoint if manual one) in the array p. NOTE: if the call is
repeated, the same array is reused.
obj=CP.GEOM(comp,device,name)
name: name of the result. A curve is returned for a manual device (RU,RS) and a point object for
others. NOTE: the curve is not stored in the data base (can be done with the DB.WRITE
function).
EXAMPLES
@p=cp.geom('T10','RS/D1')
!type Device RS/D1 located at x=@p(1) y=@p(2) z=@p(3)
@cur=cp.geom('T10','MS','TUBE')
PLOT TUBE
@l=length(cur)
The function returns the steel reduction valid for a specified filling of a given tank, when
applying the definition given by RED in subtask PAR of CP. If there is no variable steel
reduction defined, the fixed one from SM is returned with a warning,
red=CP.VARRED(comp,fill)
fill: (opt) filling degree, either as a fraction (value<=1) or volume (value>1). Default=1.
CP.COMMAND(command)
command: string representing the command to be run. Double apostrophes are converted to single ones
and upper case conversion done as in normal commands.
CP.COMMAND(id,parameters)
CP.COMMAND(id,arr)
This function runs any command available in the subtask PAR of CP, mainly definitions related
to sounding devices.
CP.PARCOMMAND(command)
command: string representing the command to be run. Double apostrophes are converted to single ones
and upper case conversion done as in normal commands.
CP.PARCOMMAND(id,parameters)
CP.PARCOMMAND(id,arr)
The functions tells whether the CP task is active or changes this state.
status=CP.STATUS()
This form inquires the status: true (>0): the task is active, false=not.
CP.STATUS('OPEN')
This form opens the CP task. No action if the task is already opened. This call normally not
needed: the task is opened if needed. NOTE: when entering the CP task from the main task
level, it is opened automatically if needed and then closed at exit. When opening explicitly this
way, the task remains open until explicitly closed.
CP.STATUS('CLOSE')
The form closes the CP task. No action if the task is not open. Closing means that any run time
data is removed and when the task accessed the next time, is is returned to the default state.
CP.STATUS('RESET')
The form is equivalent with close + open, i.e. the task is returned to the default state.
The function gets all the rooms with sounding device definitions, and optionally also a list of
defined devices. The function value is the number of devices.
n=CP.DEVROOMS(rooms, devices)
rooms: string array for receiving the room names with a device
(opt) devices: string array for receiving the info on devices in the room
The function checks that devices are correctly defined and returns a list of possible errors. The
function value is the number of found errors. Note that a device in a room that is not included in
the current arrangement is also considered as an error. Other errors are if the device is located
outside the room or a reference to a missing curve.
devicelist: string array for receiving the device names with errors
tol: (opt) tolerance for checking that device is inside room. Default tolerance is 0.01 m.
The function returns the correction to the observed gauge value, as defined in the interpolation
tables (Onboard specific standard). See also IN.INTTABLE.
corr=CP.GAUGECORR(room,device,table,value,gauge,opt)
gauge: (opt) observed gauge value in meters (for heel, trim & tape corrections)
opt: options:
F: output the result as a string obeying the quantity standard (format and unit)
1. Why are the centers of gravity zero for small volumes (close to zero)?
1. Why are the centers of gravity zero for small volumes (close to zero)?
Consider a tank which has a sharp shape towards the bottom:
Error rendering macro 'code': Invalid value specified for parameter 'lang'
CYL PCYL
X -5
YZ * <> (0 0) (5 10)
GEN X 15
OK
ROOM PRISM
LIM 0 10 0 PCYL 0 1
SYM
OK
When listing the centers of gravity in CP using a small step (0.001 m), it can be seen that the centers of gravity are listed as 0 for heights below
0.005 m:
Error rendering macro 'code': Invalid value specified for parameter 'lang'
!END
CP
COMP PRISM
RHO 1
STEP 0.001
LQ CP, H(F=5.3), VNET(F=15.6), CGX, CGY, CGZ
LIST
----------------------------------------
H VNET CGX CGY CGZ
m m3 m m m
----------------------------------------
0.000 0.000000 0.00 0.00 0.00
0.001 0.000005 0.00 0.00 0.00
0.002 0.000020 0.00 0.00 0.00
0.003 0.000045 0.00 0.00 0.00
0.004 0.000080 0.00 0.00 0.00
0.005 0.000125 5.00 0.00 0.00
0.006 0.000180 5.00 0.00 0.00
0.007 0.000245 5.00 0.00 0.00
0.008 0.000320 5.00 0.00 0.01
0.009 0.000405 5.00 0.00 0.01
0.010 0.000500 5.00 0.00 0.01
One would expect that the center of gravity in X direction would always be 5 for the given room and not 0.
The reason for the 0 values is that the center of gravity is taken as the area moment / volume. In order to avoid division by zero, NAPA applies a
limit of 0.0001 m3 on the volume and assigning a dummy values for all volumes below that limit. For the example room, this volume is exceeded
at a height of roughly 0.005m.
To create clearer lists in this respect, you can set the argument DMODE G which replaces the dummy values by a dash (-):
Error rendering macro 'code': Invalid value specified for parameter 'lang'
----------------------------------------
H VNET CGX CGY CGZ
m m3 m m m
----------------------------------------
0.000 0.000000 - - -
0.001 0.000005 - - -
0.002 0.000020 - - -
0.003 0.000045 - - -
0.004 0.000080 - - -
0.005 0.000125 5.00 0.00 0.00
0.006 0.000180 5.00 0.00 0.00
0.007 0.000245 5.00 0.00 0.00
0.008 0.000320 5.00 0.00 0.01
0.009 0.000405 5.00 0.00 0.01
0.010 0.000500 5.00 0.00 0.01
The main purpose of the loading condition subsystem (LD) is to handle definitions, administration and analyses related to loading conditions, i.e.
for the ship where components dependent on the operating conditions are defined.
Some of the analyses, such as intact stability criteria and damage stability are organized into own subsystems, accepting loading conditions
defined under LD as input. Directly under LD, the ship can be studied when given compartments are open to the sea.
The main definition function concerns loading conditions. In addition, the supporting definitions such as tank pairs, tank supports, loading
priorities, free surface calculation rules, light weight are organized under LD. The light weight can also be handled with the separate weight
calculation subsystem.
Table of Contents:
A loading condition is defined by assigning loads, which can be loads in tanks or other compartments or loads defined independently. A special
case is formed by container loads.
The light weight of the ship can be defined by giving its weight, center of gravity and a rule for its distribution, by giving separate light weight
elements or by a combination of these.
Alternatively, the light weight can be fetched from the weight calculation system.
A tank pair is formed by two tanks, the load of which can be connected so that an equal load is assigned automatically.
A tank support is a construction supporting the tank. Its role in the calculations is to modify the way the weight of the tank contents affects the load
on the hull. A tank may have several supports and the load may be distributed on the supports as desired.
Loading priorities are applied when a given load is loaded into a set of tanks in a single operation, and defines the order in which the tanks are
taken into use.
The curves define the maximum allowed shear force, bending moment, torsion moment and combined stress as a function of x.
The free surface rules control the way the effect of free surfaces is calculated.
weight and center of gravity for the total weight, for the deadweight and selected subsets
floating position and related hydrostatics
free surface corrections for each liquid load
GM and gz-curve for the loaded ship, properties of the stability curve with reference to IMO,
longitudinal distribution of weight, buoyancy, shear force, corrected shear force and bending moment
torsion moments
combined stress, i.e. sum of bending moment and torsionmoments multiplied by certain factors
deflection of the ship.
application of grain shifting moments (from GS)
behaviour when compartments are open to the sea
3. Installation
All functions of the loading condition subsystem are installed under task LOAD or LD. The main level of this task contains definition of loading
conditions, calculation, output and auxiliary functions. It contains the following functions as subtasks:
Definition of lightweights is installed as a subtask called LGDEF. (Before rel. 2001, the command was the same as that of the argument, i.e. LIG).
The general drawing task (same as task DRAW under GM) is installed as a subtask, for the purpose of allowing all drawing facilities to be used
when adding graphics to loading condition documents. The most important drawing commands (SETUP, DRW, EDR, FILL) are available directly
in the main task.
In case parameters of load types need to be listed, defined or modified, the purpose definition task PD of SM can be accessed as a subtask LPD.
The SM task itself is available (subtask SM), but only for use of listing and auxiliary functions, not changing of arrangements. The need for the SM
and LPD commands has been reduced by the possibility to access the compartment and load properties using the table editor.
The geometry definition task DEF is available as a subtask with the same name. This allows the geometry of compartments to be changed
without leaving the loading condition subtask.
This is not considered the normal context for modifying the ship geometry, but it makes it possible to test the influence of geometry
changes on loading conditions.
4.1. Summary
The geometry subsystem (GM) provides the definitions of the hull and the compartments.
The ship model subsystem (SM) collects the pieces to arrangements, where the role of the compartments and their relevant properties are
defined. The properties of the loads (substances) are also defined under SM.
The general drawing functions of the geometry subsystem are available for graphic output where loads are presented in connection with ship
geometry.
The light weight can be obtained from the weight calculation subsystem (WG).
The container arrangements used for loading of containers are handled by the container loading (CL) subsystem. This subsystem also handles
the container loads, which to some extent can be modified under LD. The central output functions are available under LD.
The grain stability subsystem provides the additional definitions needed for handling the special questions related to grain loads. Evaluation of the
grain shift criterion is available under LD.
The intact stability subsystem (CR) evaluates stability criteria for a given loading condition. The functions of CR are available by entering CR from
LD.
The damage stability subsystem (DA) has the similar function regarding damage stability.
In addition to the general functions for using tables, there is special support for treating load components in tables. This includes functions by
which loading condition related calculations are done between items in the table and functions by which loads are transferred between the table
and loading conditions.
The intact stability criteria for the loading conditions can be checked in the CR-subsystem. By referring to a loading condition in CR, the program
fetches hydrostatics and the GZ-curve and carries out calculation based on these values.
It is possible to use a loading condition as an initial condition for damage stability calculations. When a loading condition is referenced in the
definition of an initial condition, the program fetches the needed data from LD provided the results are up to date and the stability is properly
calculated and stored in the data base.
Results of the referenced initial conditions in DA are number by number copies of those in LD. When the ship starts to flood, the results calculated
in LD are no more used, only the displacement, the center of the solid mass and the amount of liquid cargo room by room, affects the behaviour
of the damaged ship.
Note that because of more accurate methods used in DA or different calculation methods used in LD, results of an initial condition defined and
calculated in DA may slightly differ from the results of a similar condition fetched from LD.
There are also connections from DA to LD: in LD one can check some properties of the GZ-curve of a selected damage case using the current
loading condition as an initial condition and GM- or KG-limit curves can be fetched from DA and plot them together with the actual GM or KG
values.
It is also possible to analyze longitudinal strength of the damaged ship. It is done by making necessary modifications to the loading condition
according to data fetched from the damage case. The analyze is carried out for the damage condition after ended flooding.
When using grain loads under loading conditions, the normal loading functions work as for ordinary bulk loads, but the following services of the
grain stability system are available:
For a load to be recognized as a grain load, the type associated with the symbol of the load, defined under PD/SM, must be GR.
A more detailed description of the connections between loading conditions and grain stability is found in the document GS.2.
Container loads can be added to a loading condition with the MASS command, where the type defined for the load symbol must be C. The
following functions of container loading can be used under LD directly:
AC, RC: (add containers, remove containers) for changing the current container load
LIST B/R/T, LIST CL ... for listing data about the current container loads
PLOT CL ... and DRW CL ... plot container objects
CLA (container load administration) for changing the target of container load commands and to store container loads.
A container load with the same name as the loading condition is treated as belonging to it. This means that it is made current or stored in the data
base at the same time as the loading condition.
A more detailed description of the connections between loading conditions and container loading is found in the document CL.2.
The weight defined under weight calculation can be transferred to loading conditions. The receiving lightweight version must be created under LD.
The weight can be modified by weight elements defined under LIG. For more information, see WG.2.
Provided as a service for the Onboard-NAPA, an in-service inclining test can be generated by a series of loading conditions to which the observed
heeling angle is added.
Table of Contents:
1. Purpose
2. Initial requirements
3. Properties of loads
3.1. The substance (LOAD)
3.2. The location of the load
3.3. The amount of load
3.4. Load types
3.5. Mass loads
4. Compartments open to sea and grounding
5. Interaction with the arrangement
6. Combined loading conditions
7. Lightweight definitions
8. Auxiliary definitions
8.1. Handling of free surface moments
8.2. Loading priority
8.3. Tank pairs
8.4. Tank supports
8.5. Permissible strength values
8.6. Permissible draughts
8.7. Shear force corrections
9. Calculation and output functions
10. Operations on sets of loading conditions
1. Purpose
The purpose of the loading condition subsystem is to define loading conditions and perform analyses regarding these. A loading condition is a
state where the varying weights of the ship are defined as to their quality, quantity and location.
The quality of a load tells, in a generalized sense, the physical substance forming it. Typical examples are fuel oil, ballast water, passengers,
lorries. In the following, the load quality is referred to simply as the 'load', unless there is risk of ambiguity.
The quantity of a load is normally expressed in tons (or as a fraction of the maximum capacity). The load can also be defined by volumes.
moments, which are not implemented.
The location is usually a compartment, but it can also be directly given by coordinates (see 'Mass loads')
As part of the loading condition concept, there are the arguments, controlling various aspects of how to apply the loading condition, e.g. what free
surface rules to apply.
As a special feature, the loading condition can include a definition of compartments open to sea and grounding.
In addition, subsystem handles the definition of some properties solely connected with loading (tank pairs, loading priorities, tank supports). The
subsystem also handles definitions related to the lightweight.
The analyses carried out in the loading condition subsystem concern the floating position, stability and longitudinal strength.
2. Initial requirements
The minimum requirement for doing something useful with the loading condition subsystem is that there is a hull form available. By defining the
location of loads with explicit coordinates (mass loads), one can do a number of analyses including floating position stability calculations and
longitudinal strength.
In order to make calculations in LD, there has also to be a lightweight version defined. If only floating position and stability calculations will be
made, it is enough to define only the weight and center of gravity of the lightweight. If strength calculations will be made, also the longitudinal
distribution of the lightweight has to be defined. See chapter 'Lightweight definitions' for details.
Most functions, however, require that there are compartments defined. Apart from making loading more convenient, the compartments provide
more information about the location and distribution of the load, and among other things the free surfaces required by stability analyses. The
properties of the loads must be defined as far as density and filling is concerned.
Full usage of the loading condition subsystem requires that the compartments are organized into an arrangement under the ship model (SM)
subsystem. The interaction between the loading conditions and the arrangement is described in more detail below. With the arrangement there
will normally also be the definition of load properties (subtask PDEF), but these can also be defined independently.
3. Properties of loads
The substance, represented by the quantity LOAD tells in a generalized sense what kind of matter the load component is formed of: cargo of a
specified type, bunker, fresh water, passengers etc. It is expressed by a symbol, which must be defined within task PDEF of the ship model SM.
The source for this information is normally the PAR* table associated with the current arrangement, but for special cases, a different one can be
assigned with !SM PAR id;
Normally the definitions are available in the system data base and need not to be done within the project. However, if the ship handles loads not
normally encountered, or if one wants to modify the standard definitions, additional definitions can be done under the project. By storing the
definitions under the project, it is guaranteed that the loading conditions are not affected by later changes in the system data base (command
SAVE or REPLACE under PD in SM). See the Ship Model (SM) for more information.
Usually, compartments are loaded with the load they are designed for, and in that case, the type of load may be omitted from the loading
command. When storing the loading condition, the type of load is always included. The loading condition is therefore self-contained in this
respect, and is independent of the arrangement.
The following properties associated with the loaded substances are relevant for the loading conditions:
type The type (quantity TYPE) defines the physical type of the load and controls the application of free surface corrections and the
determination of the center of gravity.
class The class (CLASS) can be used for grouping of loads and in the definition of free surface rules.
density The density (RHO) is used for converting volumes to mass and vice versa. It is possible to have the density as defined by the
temperature.
filling Defines the capacity (CAP) as a fraction of the net volume (i.e. moulded volume with steel reduction applied). See below for
capacity effect on definition of relative fillings.
description The description (PDES) of the load in plain text used in output lists.
These properties are considered properties of the load and not of the compartments, and are therefore taken as defined for the load type in
question (see PD in SM). An exception is a filling (CAP) defined explicitly for the compartment. In this case, the filling is supposed to be restricted
by some physical property of the compartment (e.g. overflow tube). NOTE: being defined 'for the compartment' is tested so that the value is an
exception in the sense of table calculation. This aspect is relevant for a non-standard arrangement table where the CAP parameter is obtained
otherwise than as a function of the purpose.
The steel reduction is taken into account as defined for the compartment (directly or indirectly) and is not supposed to be dependent on the
substance loaded.
When the need to change any of these properties arises, one can either redefine the symbol associated with the load type (e.g. HFO) or consider
the modified load type to be a new one, for which a new symbol should be defined. For instance, if one has loaded fuel oil identified by the symbol
HFO, and wants to change its density, the logical solution is to define a new substance, (named HFO2, for instance). For convenient replacement
of loads in the loading condition, there is the CHANGE command.
One can also redefine the density of the given substance. This should be done mainly when the change is valid consistently in the current project
(and stored in the project database). The density of a specific load component can be changed in the loading command.
The quantities listed above are those used in the permanent definitions (PAR* tables) and in SM when designating the properties of
compartments. In LD, there is need to distinguish the properties of the default loads from those of the actual load. The following table
gives a summary of the quantities used:
a compartment
a point directly given by coordinates (so-called 'mass load')
The last alternative is intended for cases when the load is not located in a compartment or when the compartment is not defined. When needed,
the extension in the x-direction can be added for the longitudinal strength calculations. A free surface correction can also be added to a mass load
(see chapter about free surface corrections)
Internally, the amount of load is always recorded as the weight in tons. In loading commands, it is also possible to express the load as a fraction
of the capacity or as a volume (VLOAD).
When a loading condition is read from the data base, it is possible that the geometry of the compartments has been changed. If a load defined
exceeds the current capacity, it is reduced. Other loads are kept unchanged. If one wants to make the correction by keeping the initial relative
loads, it can be done with command UPDATE R.
For each substance/load, there is a type associated, representing the physical properties of the substance (parameter TYPE under SM). The type
is defined in the task PD of SM for a load, or in SM with the command PAR for one single compartment. The loading condition subsystem uses
the first letter of the type symbol for separating the main types. Except for type LH, additional letters are ignored and can be used for other
purposes. The following load types are recognized by LD:
L (liquid) This type fills the compartment up to the level needed to achieve the volume of the load. The load moves when the ship
heels - it has a free surface. The center of gravity of the load (X, Y and Z), is calculated according to the real distribution of
the load in the compartment. Whether the free surface effect is taken into account only in the X direction is controlled by the
argument MODE LFIX/FREE.
B (bulk) This type fills the compartment in the same way as the liquids, but the load does not move (it has no free surface). This is
the default behaviour of loads.
H This type fills the compartment entirely, regardless of the filling degree. The center of gravity (X, Y and Z) of the load is
(homogenous) therefore always in the geometrical center of the compartment. The actual density therefore varies, and the density
associated with the load defines the maximum allowed density and hence the capacity. A load of this type does not have a
free surface. A filling defined is applied as a reduction of the volume.
LH This type is used when one wants to treat a load as if it was homogenous, while still allowing a free surface correction. It is
(homogenous, typically used for an 'unspecified liquid load'.
but with a free
surface)
D (deck load) Deck load is homogeneous solid mass that fills entirely the given volume. Part of the volume may be included as reserve
buoyancy in the stability calculations. The loaded room may not be included in the current arrangement.
A mass load is a load where the location is defined by explicit coordinates rather than being defined by a compartment. The main reasons for
using mass loads are either that the compartments needed are not yet defined, it is not necessary to distribute the load (e.g. passengers)
correctly into compartments or the load is actually not related to a compartment (e.g. deck cargo).
The central properties of a mass load are its location (center of gravity) and size (mass). Its extension in may also be relevant.
A mass load has all the other properties of loads, but these do not affect the calculations, and may therefore be undefined. However, they can be
useful for providing information in output related to the loads.
There is always a substance (quantity LOAD) defined for a mass load. Without further specifications, it is the property that distinguishes it from
other mass loads, and from it other parameters such as LDES, DENS, LTYP are derived. The following properties are used if defined:
the class associates the load with the other loads of that class
the type of the load is checked if the mass load is given a free surface moment. If the type is not L, the free surface moment will be
ignored.
the explanation text is used in result listings (LDES)
the density is used for calculating the size of the box used when representing the mass load graphically. (command DRW MASS)
There is a formal location associated with a mass load. It differs from a 'real' location in that there is no geometric object representing it. The
properties of the formal location are analogical with those of a real one:
The value of PURP is fixed (MASS) and the other ones must be given in the MASS command. The default for NAME is the name of the
substance enclosed in parentheses, e.g. '(STORES)' if the load is STORES.
In order to have several mass loads with the same substance (LOAD), different formal locations must be defined, for example
No free surface is normally calculated for mass loads, since there is no geometry on which to base the calculation. However, using the name of
the formal location, the free surface correction can be given directly in the free surface rule or in the MASS command.
In the definition of a mass load, one can specify a longitudinal extension, to be used in longitudinal strength calculations. It is also possible to
define the extension in the other directions. If not defined, it is estimated for giving a reasonable size when plotted.
'Open to sea' means that the compartment communicates with the sea. This can represent a damage or a normal state in the operation of the
ship.
Grounding means a definition of where the ship touches bottom. The possibility to define grounding is mainly intended for analyses of actual
grounding, but it can also be used to study the forces acting on the ship during launching.
However, by providing the necessary information in the loading commands, one can make exceptions to this in the following respects:
As presented above, all parameters related to a compartment are stored with the loading condition, independently of the arrangement, so that the
definition of the arrangement is not needed for interpreting the loading condition. The owner arrangement is recorded partly for information only,
partly for the purpose of selecting sets of related loading conditions.
When entering the loading condition task, the current arrangement will be assumed, unless otherwise specified.
In a ship with a fully defined geometry and ship model (SM), there may be much more compartments than needed in the loading conditions.
Handling of loading conditions can be made faster by using a subset of the arrangement containing the relevant compartments only. If the
arrangement is defined as a set of decks, the subset is easily defined by a combination of the lower decks. If such a subset is available under the
name obtained by adding prefix LD to the main one (e.g. LDA or LDB), this one is automatically used. The loading condition will still be marked as
belonging to the main arrangement. This facility can be considered obsolete because of the increased speed of current computers.
Combined loading conditions are intended to be formed by mutually exclusive sets of loading components. However, if the same location occurs
in more than one combined loading condition, the one added last is valid. One may define single load components in addition to referenced
loading conditions, in which case the directly defined loads override loads of the latter ones, if there are conflicts. The combinations are controlled
with the command ADD.
7. Lightweight definitions
A lightweight definition is a description how the solid, unchangeable masses of the ship are distributed within the ship and optionally what their
structural properties are. Regarding the calculation of the floating position and the stability of the ship, only the total weight and its center of gravity
is needed to know. Whenever longitudinal strength is calculated, the distribution of weights is required.
The lightweight definition should contain all masses which are included in the structure of the ship and permanently installed equipment: steel of
the hull, machinery, insulation, pipes, cables etc. There are three ways to distribute the lightweight:
To give the lightweight as a set of local weight elements. The total weight and center of gravity of the ship is the sum of the components.
To give part of the lightweight as local weight elements and distribute the difference of the total weight and the sum of the components
according to the selected distribution curve. The shape of the distribution curve is defined by the user or by Lloyd's distribution (see report
SR 64/17) or the curve may be sent from the weight calculation subsystem WG.
To distribute the total weight of the ship according to the selected distribution curve (alternatives as in 2.). This method comes in use if
there are no local weight elements defined in the lightweight definition.
The weight elements can be defined as an integral part of the lightweight definition or separately as table.
The structural properties, modulus of elasticity E and moment of inertia I, are needed, if the deflection of the hull is calculated.
The center of twist may be defined for calculation of torsion moments of the ship in an inclined floating position. The center of twist is a curve with
The stress concentration factors and influence factors are needed for calculation of combined stresses.
There may be several lightweight definitions stored in the data base. A lightweight definition is a calculation argument for the loading condition.
Check from the arguments that the current loading condition is using the right lightweight definition in calculations.
8. Auxiliary definitions
Each loading case can have an individual set of rules how to calculate the free surface moments. A set of groups, subgroups and rules defined
with the FRS command, control the way to calculate the free surface moments. There are different ways to calculate the moment:
IMO
REAL
R50
MAX
explicit moment
DGZREAL
LLMAX
ITREAL
REAL5
FMAX
The tanks to use in the calculation are selected by defining groups and subgroups, which in practice means that there are almost unlimited
possibilities to combine different tanks and rules.
See chapter 'FREE SURFACE HANDLING' for a thorough explanation, including detailed description of alternative free surface rules.
The loading priority is used when a substance is loaded without explicitly specifying the compartments to be loaded. A loading priority is defined
separately for each substance, and defines the order in which the compartments are loaded. In the absence of a defined priority, the order in
which the tanks appear in the arrangement is used. The list of priorities is defined by the command PRIORITY. The definition of a priority list is
independent of the loading conditions and therefore valid for all loading conditions.
Tank pairs are usually formed by two symmetrically placed tanks. By separate definition, such pairs may be defined as tank pairs (command
PAIR), which influence the function of the system as follows:
When groups of tanks are loaded, or when a special option is given in the loading command, the system automatically loads equal amounts into
the components of the tank pair.
When applying the IMO rules for free surfaces, a tank pair is counted as one tank when searching for the tank with the largest free surface
moment.
The definition of tank pairs is independent of the loading conditions and therefore valid for all loading conditions.
In calculations related to longitudinal strength, the weight of loads are normally calculated as acting on the hull according to their own distribution.
By defining tank supports, the weight of the tank contents can be transferred to the hull in different ways. The portion of the weight on each
support can be calculated, if the number of supports is less than three. If there are more than two supports, the total weight is shared equally or
according to given input. The tank supports are common for all loading conditions.
The permissible strength values, or strength limit curves, are used to show in output the limits which are not allowed to be exceeded. There may
be limit curves for shear force, bending moment, torsion moment and combined stress. There may be different curves for sagging and hogging.
Each loading condition may have specific permissible strength values.
The permissible draughts define the minimum and maximum draughts allowed at given points in the ship, which can be compared with the actual
draughts.
Shear force corrections make it possible to put out corrected shear force curves. The corrections are input for the program. Each loading condition
has specific shear force corrections.
Output from the current loading condition is possible at any time, because the system provides automatic calculation of missing or obsolete
results. The results are considered obsolete, if some of the following aspects have been changed:
Because any output command could cause calculation, it is important that the calculation arguments continuously have right values. When a
loading condition is created (command NEW), it gets a default set of calculation arguments. When a loading condition is saved or replaced in the
data base (command SAVE or REP), the calculation arguments valid at the moment of the save or replace are stored together with the calculation
results. When a loading condition is fetched from the data base (command GET), the calculation arguments stored with the results are restored
i.e. fetched with the loading case.
ARR arrangement,
HULL calculation hull,
RHO seawater density,
HEEL calculation heeling angles,
MODE calculation mode,
The current values of the calculation arguments can be checked by the command ARG. A standard set of heel arguments is maintained in the
system data base, and can be changed with command STDH.
A restricted set of results can be produced directly from the data base without making the loading condition current (commands LIS LC,
OUTPUT). This kind of output offers no up to date check nor automatic calculation of missing or obsolete results and it is possible only
if calculation has been carried out properly earlier. This is also the only way to get out results from the obsolete loading conditions and
from many loading conditions at a time.
This can be supported by defining loading condition groups: Named groups of loading conditions can be defined for the purpose of selecting
subsets. The groups thus defined can be used in the command SELECT.
1. General
2. Definition of a lightweight case
3. Lightweight distribution
3.1. Undefined distribution
3.2. Total distribution by a curve
3.3. Total distribution by elements
3.4. Distribution by elements and a curve
3.5. Distribution from weight calculation
3.6. Dimensioning undimensional distribution curves
3.7. Lightweight elements handled by a table
4. Parameters for deflection
5. Center of twist
6. Factors for combined stress
7. Auxiliary commands
8. Storing the lightweight version in the database
9. Leaving lightweight definition
1. General
The lightweight definition should contain all unchangeable masses of the ship so that the loads added to the lightweight give the total
displacement of the ship.
Nearly nothing can be done properly in LD if there is no lightweight definition available. Therefore there should be at least one lightweight version
called 'A', which defines at least the weight and the center of gravity of the lightweight. A is the default name of the lightweight version.
Lightweight versions are made or modified in a subtask of LD, which is entered by the command
LGDEF;
at the main level of LD (no parameters!). The calculation argument 'lightweight' is changed to another one by entering
LIG version;
at the main level of LD, and where version stands for the name of the lightweight definition.
Note: a lightweight version cannot be defined if the calculation hull is missing. The definition of a lightweight version does not change
the calculation argument 'lightweight'.
The command
NEW name;
creates an empty lightweight version, and the definition of it can be started. An existing lightweight version is fetched from the database to the
memory by the command
GET name;
which makes the version ready for modifications. Entering the command
RENAME name;
WHERE;
3. Lightweight distribution
There are four commands available for the definition of the lightweight distribution:
Only the total weight and its center of gravity is given; distribution is undefined.
The total lightweight is distributed according to a given curve.
The total lightweight is defined and distributed by local weight elements.
Part of the lightweight is given by local weight elements, the rest of it is distributed according to the selected curve.
The distribution is sent from the weight calculation subsystem WG.
WEIGHT w;
CG x,y,z;
without DIST and ELEM defines the total lightweight of the ship but its distribution is undefined. This is enough for the calculation of the floating
position and stability of the ship but the calculation of longitudinal strength is not possible.
WEIGHT w xa,xf;
CG x,y,z;
DIST LLOYDS, cb;
and
WEIGHT w xa,xf;
CG x,y,z;
DIST u1, v1, u2, v2, ...;
DIST USER;
without ELEM distribute the total weight w according to the given distribution curve. The first alternative makes the distribution according to
LLOYDS' diagram, 'cb' being the block coefficient of the hull in the range (0.55...0.85). The latter alternative distributes the weight by the
user-defined nondimensional curve u1, v1, u2, v2, ..., where u's are arguments in the range (0, 1) and v's are ordinates in the same range. The
optional parameters xa and xf of WEIGHT define the minimum and maximum x-limits for the distribution curves. Omitting the limits, the extreme
x-coordinates of the calculation hull are used.
The dimensional weight distribution curve, i.e. curve where coordinates are in meters and weight in tons/m, defines both the distribution and the
total weight (command WEIGHT is not accepted). The alternative
defines also all coordinates (x, y and z) of the center of the lightweight (command CG is not accepted). The alternative
defines only the longitudinal center of the lightweight; the y- and z-coordinates of the center of lightweight are read from the command CG (x
ignored but some value must be given).
If the lightweight is defined totally by local weight elements, give only the following commands:
DIST ELEM;
ELEM name weight x,y,z xa,xf text;
ELEM name weight x,y,z l text;
. . .
Each local weight element needs an ELEM command, where the parameter's name, weight and the center of gravity x, y, z must be given. The
optional parameters xa and xf define the longitudinal extent of the element. If the optional parameter l is given instead of xa and xf, the program
calculates the limits from the length l as 'xa=x-l/2' and 'xf=x+l/2'. If xa, xf and l are missing, l = 2 m is assumed. The parameter 'text' describes the
element in plain text.
Here, as in other cases, locally defined elements can be replaced by reference to a table:
WEIGHT w;
CG x,y,z;
DIST ...; (not DIST ELEM or DIST DIM)
ELEM ...;
ELEM ...;
. . .
makes the distribution according to the local elements but what is left over, when the local weights are subtracted from the total weight w, is
distributed according to the given distribution curve. The definition of the distribution curve is as in 2) and the elements are defined as in 3).
makes the total weight distribution from the given dimensional distribution curve and weight elements. This command sequence defines also the
total lightweight (WEIGHT not accepted) and (partly) the center of lightweight (c.f. Chapter 3.3.2).
It is not possible to control in LD the weight distribution which is created in WG, but you should go to the weight calculation subsystem and send
the distribution curve to LD from there.
The weight distribution according to a nondimensional curve is made dimensional by an iterative method, where the height of the curve and the
location of the arguments (x-coordinates) are varied so that the integral over the curve gives the required weight and location of the center of
gravity. Carelessly given center of gravity of the total weight CG x,y,z causes easily unreasonable results in weight distribution, for instance, if the
sum of the weight elements is nearly equal to the total weight but the centers of gravity differ much from each other. Be careful!
Lightweight elements can be treated in a table, allowing the Table Editor to be used as a tool for treating the elements. It also allows more flexible
ways of transferring element data to and from NAPA, for example, to EXCEL.
The prefix ELE* has been reserved for tables used for this purpose and they must contain the following columns:
A column LENX may also be used: if the values in XMIN, XMAX are missing, zero or out of range, the extension is taken from LENX and the
The elements can be picked directly from the table by adding a reference to it from the lightweight version:
Alternatively, the element can be copied to the lightweight version without creating a permanent dependence. The ETABLE command under
LGDEF handles the functions related to tables:
ETAB GET table get the lightweights from the given table
ETAB enter table calculation with a work area created for the purpose (prefix ELE*)
If there is no table in the ELE work area when using ETAB or ETAB P, a table named ELEMENTS is either read (if existing) or created.
Transfer of data between loading conditions and tables can also be done with the service functions LD.LIGTOTABLE and LD.TABLETOLIG.
and
E e;
where I defines the moment of inertia of the cross section of the ship as a function of x (m4) and E stands for the modulus of elasticity (N/mm2).
5. Center of twist
The center of twist is a space curve with respect to which the transversal moments for torsion are calculated. The center of twist is defined by the
command
CTW (x,y,z),(x,y,z),...
Outside the range of the polygon, the center of twist is extrapolated by its first or last point. The default curve is x-axis.
MSTOT = ABS(BM*ALF)+ABS(SUM(TMOM*FI))
where BM is the bending moment and ALF is the stress concentration factor at the frame, TMOM is the local torsion moment, FI is the influence
factor from the influence factor table for the frame and summation goes over the length of the ship (hatches).
The influence factors are given for a set of frames as a function of hatch (x), i.e. the influence factors form a two-dimensional table. The influence
factors are read into the system through a table called INFLUENCE.ACTORS, where frames are columns and hatches are rows. The table is a
normal table for the table calculation task (TAB) and it may be created and modified by the means of TAB independently of the loading condition
subsystem. However, the best way to create the table INFLUENCE.ACTORS is to let the program create a model table, and then go to TAB and
fill the table with right factors. The model table is created in the following way:
The stress concentration factors are defined by the command ALF. There must be as many stress concentration factors as there are columns in
the influence factor table. Therefore, the command ALF is not accepted before the number of frames is defined by the command IFFR or
influence factor table.
7. Auxiliary commands
The subtask LGDEF contains a set of auxiliary commands for handling the stored lightweight versions.
TEXT text
CAT;
or
CAT LIG;
DES DIST List the distr. curve defined by the user (if any).
SAVE;
REP;
or
OK;
In connection with saving or replacing the lightweight version, the program calculates the sum curve of the local lightweight elements. Sometimes
this takes time, especially if there are lots of individual elements.
SAVE
REP
OK
END
LD
The three first commands store the lightweight version in the database and leave the subtask if storing succeeded while the two last ones leave
the subtask without storing the current version.
The subject is presented in terms of the commands available in the LD task. Other ways of loading are by using a table, as presented separately,
or by using the service functions. The two latter ones are the bases for the graphical user interface provided. All forms of loading can be used
mixed.
Table of Contents:
1. General
2. LOAD command
3. Summary of LOAD command options
3.1. Specifying the load type
3.2. Specifying the amount of load
3.3. Specifying the location
4. Changing the substance
5. Changing the density in the LOAD command
6. Loading tank pairs
7. Special loading commands (MOVE, CHA and BAL)
7.1. MOVE
7.2. CHANGE
7.3. BALANCE
8. Loading message
9. Mass loads
10. Deck loads
11. Dual loads
12. Defining deadweight constants
13. Adding result quantities to the results list
13.1. Existing quantities
13.2. Quantities calculated in macros
14. Container loading GUI
14.1. Connection between a load case and a container load case
14.2. Activating the CL GUI
14.3. Layout of the CL GUI
14.4. Selection of containers
14.5. Handling of short/long container positions
14.6. Administration
14.7. Hint for handling containers with different properties
15. Grain loading GUI
15.1. General
15.2. Loading grain
16. Permissible draughts
17. Shear force corrections
18. Auxiliary functions
18.1. Commands DES and EDIT
18.2. LIST PAR
18.3. Graphic feedback and graphic input
18.4. Command WATCH
18.5. Events
1. General
A loading condition is treated as a named object, and all definitions concern the current loading condition. A loading condition is created and
made current with command NEW, while command GET gets a stored one from the database. When ready, the result is saved with command SAV
E or REPLACE. A new loading condition can also be made by modifying an existing one, for which command RENAME is available.
A loading case can be removed from the database with the command 'UNSAVE name'. CAT LOAD gives a list of stored loading conditions.
The arrangement is explicitly selected with command ARR. If none has been selected when the first NEW or GET command is encountered, the
current one (as set in SM by the command REG ... PERM) is automatically selected. The arrangement cannot be changed while the loading
condition is defined.
2. LOAD command
The central commands in the definition of load cases are LOAD and MASS. The command LOAD is used when loading into compartments, in
contrast to command MASS, by which loads are placed by directly giving the coordinates and (optionally) the extension. The general syntax of the
LOAD command is:
Normally, the load, amount and location are needed, for example:
LOAD BW 30 T123
'parameters' redefine properties otherwise obtained from the load, presently only density.
* repeat the loading for each tank given, instead of interpreting the given amount as the total load
E (evenly) distribute the given load amount into the given tanks in proportion to their net volumes, instead of filling the tanks until the total
load amount is fully used.
IP (initial purpose) in operations dependent on the purpose of tanks, apply the initial purpose (defined in the arrangement) rather the
(possibly different) current load
The first item in the LOAD command ('load-type') tells the substance loaded (e.g. ballast water, fuel oil, cargo of various types). The substance is
expressed by the symbols defined under PD in SM, for instance:
LOAD BW ...
LOAD HFO...
LOAD CARS ...
The load type is optional, and if it is omitted, the load specified as the purpose of the compartment is assumed. If the compartment has previously
been loaded with another load than the one defined as the purpose, the current load is used.
Note: a possible change of load is maintained even if the compartment is emptied (amount of load assigned zero). The default load can
be restored by option IP (Initial Purpose), for instance:
causing the locations to be loaded with the load specified in the arrangement, even if they are currently loaded otherwise.
Note that the purpose of a compartment not in the arrangement is undefined, and such a location can only be loaded by explicitly defining the
load.
The symbol used for the load type must be defined, including density and filling. If the definition is not available in the system database, it must be
provided within the current project and version or added to the set of purposes in the system database (see SM manual). These symbols can be
In a single LOAD command, only loads of the same type can be defined/modified.
The amount of load cannot be omitted. It can be given as an absolute amount in tons or as an increment with respect to the current load.
Furthermore, it may be given directly in tons or as a fraction of the capacity. If the amount is given with a + or - sign, it is interpreted as an
increment, if it is preceded by an asterisk (*), it is interpreted as a fraction of the maximum capacity (WMAX if by mass, else VNET).
Examples:
LOAD BW 100 .. load 100 tons of 'BW' into the given locations
LOAD *0.5 ... load half the capacity of the given locations.
LOAD BW 0 load no BW (i.e. remove any present BW) into the receiver, in this case all tanks designed for BW
By default, all amount mean mass (tons) and fractions a fraction of the maximum load in tons with the capacity (CAP) taken into account.
The amount can also be expressed in terms of volumes by adding the symbol V=, for example:
Note that fractions in this case mean fractions of the net volume (CAP not taken into account).
The amount can also be expressed as a load height (measured from the baseline at even keel and zero heel) by adding the symbol H=, for
example:
LOAD BW H=10 load 'BW' so that the load height is 10m above the base line
If the receivers get full before the specified amount is reached, the remaining amount will not be loaded, and a message informing about this is
printed. Analogically, when a negative amount is given, part of the reduction will not be made, if the compartments get empty before the whole
amount is removed.
In the normal case, the given amount represents the total amount to be loaded. With option *, the given amount is repeated individually for each
given location.
If the amount is zero, incremental loading has no effect, while absolute loading means that the resulting load will be zero in the given set of
locations. Occasionally, cases arise when a negative load is needed. Option ! prevents the minus sign from being interpreted as a removal and
the amount is treated as the resulting negative amount.
The most straightforward way to specify the locations is to give a list of compartments. Alternatively, the location may be omitted, in which case
the compartments designed for the given load are automatically selected. The last alternative is to select compartments with a given purpose.
Examples:
LOAD HFO +10 Add 10 tons of HFO to the tanks designed for this purpose (or currently being loaded with HFO)
LOAD HFO2 55 (HFO) Load 55 tons of 'HFO2' into tanks designed for HFO or currently containing HFO
LOAD IP HFO 50 Load 50 tons of HFO into the tanks designed for the purpose, even if they are currently containing some other load.
When many receivers are given, either directly or indirectly, they are normally filled in a given order until the given total load or change of load is
reached. Removing a load is done analogically.
This can be changed by using option E, causing the given amount to be distributed among the receivers in proportion to their volume. This way of
loading is default for homogenous loads, for which the ordinary loading must be specified with option N, if needed.
The order in which compartments are loaded is the one given in the LOAD command. If the compartments are selected on the basis of the
purpose (i.e. the list of compartments is not given), the order can be specified by a priority list (see command PRI); otherwise, they are loaded in
the order they occur in the definition of the arrangement. Unloading takes place in the reverse order. Tank pairs cause exceptions as described
separately.
Examples
LOAD HFO 120 T11 T12 load 'HFO' into tanks T11, T12, T13 in this order, until 120 tons is reached.
T13
LOAD E HFO 120 T11 T12 load 'HFO' into tanks T11, T12, T13 distributed in proportion to the tank volumes (i.e. all tanks will get the same
T13 relative filling)
LOAD * HFO 20 T11 T12 load 20 tons of 'HFO' into each one of tanks T11, T12, T13
T13
Note carefully the distinction between the parameters describing the purpose and those describing the current load:
The given density is valid for the given load component until explicitly redefined or cancelled by specifying DENS=OFF. The density is also
replaced if the substance is changed.
The tank pair logic is not applied when one of the tanks is directly specified as receiver.
7.1. MOVE
Command MOVE moves a load from one set of tanks to another. If the amount to be moved is not given, the maximum possible volume is moved.
Command syntax:
The delivering tanks are unloaded in the order they appear in the command, until no more can be moved or the specified amount is reached. The
receivers are handled analogically. When the command concerns two tanks, a special option (-) can be given in order to load in the tanks equally.
Example:
MOVE T100 -> T10 T11 T12 the load of T100 is distributed into T10, T11 and T12.
MOVE - T20SB T20BB the load in tanks T20SB and T20BB is distributed evenly.
7.2. CHANGE
The CHANGE command replaces a given load type with another one in all tanks or selected ones. The initial relative load is kept fixed.
Command syntax:
Example:
7.3. BALANCE
The BALANCE command changes designated load components in order to achieve a specified trim and heel (default 0).
The changes are done by moving loads between compartments with or without changing the total amount. By default, the amount is fixed for
other loads than BW or WB (assumed to be ballast water).
The changes allowed are specified by telling the compartments involved or by telling the load to be moved. In the latter case, all compartments
containing that load are available for the change.
When operating with specified compartments, the form of the balance command is
Loads are moved between compartments with the same load only.
BALANCE (load)...
With options in the command, the function can be modified in the following respects:
The function is handled as an optimization task, where part of the target is to obtain the given floating position. In addition, there are two
subtargets:
The relative influence of the different targets is controlled by weights which can be set in the command:
A zero value of the weight means that the aspect in question is removed from the target. For the effect of other values, practical tests are needed.
Adjusting the relative importance of trim/heel is usually more efficient by selecting the tanks involved suitably.
The degrees of freedom specified in the BALANCE command may not be sufficient to achieve the target trim. In that case, the nearest possible
value is obtained.
The message Finding a solution failed (5201) may be caused by conflicting requirements of the amounts of loads. Experience has shown that it
may also occur otherwise, and the likely reason is that the task is ill defined: there are too many load configurations giving the same effect. The
result may also be that the restrictions set on the totals are not satisfied. Unless option F has been given, the result is accepted. The tolerance for
the test can be set with option MTOL.
8. Loading message
Any time the load in a tank is redefined, a message of the following type is printed:
This means that tank T40 has been loaded with 17.5 tons of substance 'HFO1' after initially containing zero. The capacity for this load is 30.3
tons, while 'HFO' is the purpose registered in the arrangement. The last item is omitted if the current load is the same as the purpose.
9. Mass loads
Instead of placing a load into a compartment, the location can be defined by coordinates directly. This is done with the MASS command, which is
otherwise analogous with LOAD. The syntax of this command is:
The load type is expressed by the same symbols as in the LOAD command. In this case, it cannot be omitted, and serves to identify the load
component. None of its properties are used in calculations, and it may therefore be undefined. However, the explanation of the symbol is likely to
be useful in output listings, and the TYPE or CLASS may be needed in selections. The density is used for estimating the extension. It is therefore
recommended that these symbols are defined the normal way in PD of SM.
'f-loc' is optional, and stands for 'formal location'. As far as possible, mass loads are treated analogically with other loads (i.e. loads in
compartments). For this purpose, a formal location is always associated with a mass load, and the name of the formal location will occur in the
place of tank names in listings. If the name of the formal location is not given in the command, the symbol of the load type within parentheses will
be used. The purpose of the formal location may simply be for information. When several locations with the same type of mass load are needed,
these must be associated with different formal locations.
The amount is always given in tons, either as an absolute amount or an increment (with sign).
'location' is given by the coordinates of the center of gravity, given within parentheses, for example
(55, 0, 6)
(#BH3+10, 0, #DECK2+1)
(#12, 0,7)
It can be omitted if the command is given with the purpose of changing the amount only.
'extension' is optional and refers to the longitudinal extent of the mass load. The extension is relevant in strength oriented calculations. It can be
given as a length only, if the distribution is symmetric about the center of gravity, or it can be given by the extreme x-coordinates. If these are
unsymmetric, a trapezoidal distribution is used.
Normally, only the extension in the x-direction is important, and should be given in the MASS command. The y- and z-dimensions cannot be
calculated on the basis of the values given. In order to get reasonable values, they are assigned mutually equal values, giving the correct volume
when taking into account the density defined for the load in question (or RHO=1 if none defined). If the extension in the x-direction has not been
given, a value is selected by giving a cross section area 1m*BREF. The extension assigned in this way can be seen when drawing the mass load
with DRW MASS.
Without this, the free surface moment is zero unless the load component is given in the free surface rule.
As the last parameter in the MASS command, one may give the descriptive name of the formal location, corresponding to parameter DES for
compartments in arrangement definitions. Examples:
MASS PASS 120 (50, 0, 6) the weight of passengers is added as a mass load
MASS BW/TT2 35 (90, 0, 1.2) 3.4 'BW 'two mass load components of type BW are added, with given longitudinal extension and description
tank 2' of the location.
MASS CRANE 85 (20, 4) 18 26 A mass load is defined in the point (20,0,4), extending from x=18 to 26.
As in the LOAD command, the amount can be defined absolutely or as an increment. It cannot be defined as a fraction, since there is no capacity
associated with these loads. The location (the point) must not be given when defining an increment. The combination negative
amount+given location is interpreted as a negative load, which could be needed for representing a lifting force.
MASS PASS -10 The mass load component 'PASS' is reduced by 10 tons.
MASS LIFT -30 (101, 2) : A lifting force of 10 tons is placed at x=101 (Z=2).
The y-coordinate of the location may be omitted, allowing the location to be entered graphically in xz-projections. The omitted y-coordinate is
assumed zero.
Note: specifying a zero mass does not remove the mass load. In order to do this, use the command DELETE.
Adequately secured timber deck load may be allowed to be taken into account as reserve buoyancy (IMO intact stability code). The buoyant part
of the deck load is defined with two parameters:
By default, BFAC=0 and HB is not in use. Deck load is loaded to a predefined room that cannot be included in the current arrangement. The mass
is evenly distributed in the whole volume of the room.
The deck load room may not be included in the current arrangement. The buoyant part of the deck load is added to the stabhull for calculation.
Temporary objects are created for the buoyant part of the deck load and for the combined stabhull. The deck load can be removed with the
command DELETE roomname or by giving a zero mass with the load command. The deck load room may not overlap another deck load or
Similarly to container load the loaded part of the deck load is taken into account in the calculation of the lateral wind profile.
NEW DUALLOAD
LOAD CARGO1 *0.3 ROOM1#1
LOAD CARGO2 *0.4 ROOM1#2
SAVE
In the output of LIST PAR, the NAME quantity is output without the suffix. In the service function LD.LQNT the bare name gives the total for the
two components, while name#2 refers to the additional component.
The maximum capacity (WMAX, VLMAX) is defined for each component as if it was the only one. The relative loads (MREL, VREL) are defined
with respect to these. In free surface rules, the additional boundary is taken into account in the rule REAL. For example, if component #2 has
higher density, the free surface moment is:
FRSM=(1-SRED)*[IT1*DENS1+IT2*(DENS2-DENS1)]
REAL is the only rule that should be applied for dual loads. In the output, e.g. in LIST FRS, the whole free surface moment is assigned to the first
load component. In principle, it is also possible to load liquid load component on top of a bulk load. In this case the free surface moment is
determined purely for the liquid component (with the rule REAL).
Dual loads in dredgers (mud and water) are described separately in the chapter for dredger calculations. Also note that breach calculation for dual
load is handled so that the loads components are mixed if one of them does not have the density of sea water.
For this load type a separate class DWC has been reserved in the Ship Model. The loads can be divided into desired groups by the user either in
PAR*PRO (PAR*STD) or in the loading condition itself. A handy way to manage these loads is to use the added loading condition functionality in
the Loading Conditions task where the constants are loaded in a separate case which is then added to be a part of the actual design cases:
Example:
1. Add the needed purposes into the PAR* table, e.g. Stores, Crew, etc. It is recommended to have a PAR*STD table in the system database
which contains the purposes needed for the ship types that are built.
2. Create a new loading condition (e.g. by the name DWCONST) where the constants are loaded as mass loads:
3. Add this condition to all real loading conditions (except light condition) by using LD GUI or ADD command:
LQ PAR, NAME, DES, MASS, VREL(FILL), XM, YM, ZM, (LDES), (DENS),
(LCLAS)
TOO PAR, SELECT='AND(mass>0 LCLAS="DWC")', SORT=LOAD, HD=(UL,
S, U, UL), SUBT, GROU, LBG=(' ', 'CONTENTS=%LDES',
' '), TOTALS, FIELD=*2
LD?>lis par
------------------------------------------------------------------
NAME DES MASS FILL XM YM ZM
t % m m m
------------------------------------------------------------------
CONTENTS=Passengers
------------------------------------------------------------------
NAME DES MASS FILL XM YM ZM
t % m m m
------------------------------------------------------------------
CONTENTS=Stores
Normal quantities available in LD can be added using the "Edit List..." button. This opens up a window where new quantities can be added and
already selected ones can be deleted. The order of the quantities in the list can be also modified here.
In addition to existing quantities, new ones can be added using resultof macros (macros written in NAPA BASIC only that return a value in the
$RESULT variable). This macro should return the value that is to be shown. The appearance in the results list can be modified by adding
parameters to the NOTES in the macro. The NOTES editor is opened from the Edit / Notes menu-item in the text editor, and the results list
recognizes the following parameters:
These parameters are to be written on one line each and the line must start with the parameter to be recognized. Unless the parameters are set in
the NOTES, the default is: ID=name of the macro, no unit, no description.
The GUI for handling container loads is integrated into the loading condition (LD) GUI. In order to use the CL GUI the minimum requirement is that
there is a properly defined container arrangement available and that the licence for CL is active.
Please note carefully the following comments and restrictions regarding the CL GUI:
Each loading condition in LD can only refer to one (1) container load case.
If a container load is defined or modified using the CL GUI tools, the description of the CL case cannot (!) be shown with "DES L name" in
CL.
The container load defined interactively with the CL GUI can be further modified with the container loading commands ADD and RED in CL
(or AC and RC in LD) i.e. interactive and command definitions can be mixed.
Note: as said above, a container load defined or modified using the CL GUI tools, cannot (!) be shown with "DES L name" in CL. It is
recommended to rename existing CL load cases before manipulating them with the CL GUI.
There have been no changes made to the way a container load case is referred to in a loading condition. The loading condition itself in LD
contains lightweight components such as liquid loads and mass loads, and it can in addition refer to an existing named container load case. One
container load case can therefore be part of many independent loading conditions.
The reference to a container load case can be found in the text description of the loading condition as a single MASS command.
When a loading case already containing a reference to a CL case is opened, the options for handling containers are automatically activated. In
case the active loading condition has no reference to a container load case, the handling of container loading is activated from View -> Container
.
Below is a typical view of the CL GUI window, where the different components of the window are numbered and described:
Note: the selection is always made from the possible subset activated with the Bay, Row, Tier or CTP fields above the table area.
Selection of containers
The following logic is followed when selecting containers in the graphic views:
In the lower part of the graphics, i.e. in the SETUP selected by the user, entire bays, rows and tiers are generally selected. In the upper
part of the graphics only the selected bays are shown. In this upper area single containers can be selected.
When clicking at a container in any of the deck views (z-projection) of the SETUP (i.e. the lower graphic area) the entire row of containers
is selected.
When clicking at a container in any of the frame views (x-projection) of the SETUP the entire row of containers is selected.
When clicking at a container in a profile view (y-projection) of the SETUP the entire bay of containers is selected, and the bay is also
drawn in the upper part of the graphics.
When clicking at a container in the bay view of the upper graphic area, a single container is selected.
The containers can also be selected using a drag box selection. The drag box is activated by keeping the left mouse button pressed and
dragging a box on any of the graphic views. All containers that are "under" the drag box will be selected. If the selection is made in a deck
view all tiers are selected, in the frame view all bays are selected and in the profile view all rows are selected.
If the control key is pressed when using any of the above selections, the selection is expanded to also comprise the newly selected containers. If
on the other hand already selected containers are picked in this way, they will be deselected i.e. by keeping the CTRL key pressed one can toggle
between selection/de-selection.
The handling of long containers should be taken into account in the definition of the container arrangement. Each container block can have a
default short and long container type defined. Also, the so-called formal bay numbering system has to be defined in the Owner Numbering
definition of CL.
The most straightforward way to handle long containers is to select a range of containers and then "mark them" to be "long containers" by
pressing the icon "Change to Long". The next time these containers are selected and loaded, the default containers in these positions are "long
containers".
A long container can also directly be loaded into a "short" position, as long as the formal bay numbering system supports long containers in this
position. The long container has though to be loaded into the bay with the higher bay number e.g. if bays 23 & 25 form a formal long bay position
24, a long container can be loaded into bay 25. The long container will then occupy bays 23 & 25 but it has the bay number 24.
14.6. Administration
A new container load can be defined and connected to the loading condition by pressing the "New CL-case" icon.
An existing container load can be activated and connected to the loading condition by pressing the "Open CL-case" icon.
When a load case is saved, the container load case is also automatically saved. If one of the cases (LD or CL case) has been created by pressing
the "NEW" button (or NEW in the menu) the user will be prompted for a name of the cases not yet having a name.
Please note that a container load case cannot be renamed (i.e. SAVE AS ...) in this version of the GUI. If the user wants to "make a copy" of an
existing container load case, this has to be done in the CL task by e.g. giving the following commands:
CL?>GET CLTEST1
CL?>REN CLDEMO2
CL?>REP
In the table of containers in the LD GUI the user can practically only modify the type of a container and the weight of a container. Even though it is
possible to modify the weight of single containers, it is not recommended as it could become difficult to keep track of the modifications in a large
container vessel.
It is recommended that the user defines a set of container types in the so-called container type table (CNTT*name). The default container type
table is called CNTT*STD and it can preferably be stored in the system database (DB2).
15.1. General
The grain loading GUI is also part of the loading condition window. If the user have the grain loading license and the arrangement used in the
active loading condition contain grain cargo spaces, the grain loading tab is activated. Note that only the grain cargo spaces are listed in the grain
loading tab.
Any LOAD can be loaded into the grain spaces, but only loads with a TYPE GR or GRX works as a grain load. If a compartment is loaded with
grain, the compartment is automatically removed from the normal tank list and is only visible in the grain list. On the other hand, if a grain space is
loaded with something else than grain or empty, it is visible in both the normal tank list and the grain tab. Grain specific filling levels such as
FILLED, UT, UTE and SECURED can only be used in the grain tab. Loading MASS, VLOAD or VREL will automatically set the filling to PARTIAL
for grain loads.
defines the minimum and maximum permissible draughts at different positions of the ship. The permissible draughts are used in a specific list
command, LIST TLI, which shows the actual and permissible draughts. In calculation of the actual draught, deflection is taken into account
provided its calculation is possible (I and E given in the lightweight definition).
where x is the position of the correction and 'ca' and 'cf' are shear force corrections aft of x and forward of x. At the end of the ship, the correction
is zero. Between the given points, the correction is linearly interpolated. The correction may be different at different sides of the points. The
corrections are located either exactly at the given points (option FIX) or at the nearest peaks of the shear force curve (FIX omitted). The
corrections are always towards zero, i.e. they cut down the peaks (sign of the given values ignored). The x-coordinates must be in ascending
order.
With the option DAM=case the shear force correction can be allocated to a specified damage case. As a default, the shear force correction for the
loading condition is used also for damage cases (unless there is a specific correction for the damage case). This can be inactivated with the
option NODAM.
All shear force correction definitions that are associated with the current loading condition can be listed with SFC CAT.
The corrections (x, ca, cf) can also be created with a macro by using the option MAC=macro. The macro must have real array output parameters
for X, CA and CF. The fourth parameter is an input string for possible damage case name. For intact case an empty string should be used.
Special care is needed since some calculation operations cannot be performed recursively during the calculation of longitudinal strength.
The command DES has its usual function of producing the definition of the loading condition in input format. Unless otherwise specified, loads are
shown with absolute values. Option R gives the relative loads.
The command DES is applied to the current loading condition unless the name of a load case is given in the command. If one is interested in load
components of a given type, the output can be restricted to these components only. The syntax of DES:
where 'sel' is either the name of the load case or the name of a load given in brackets. One can also specify LOAD or MASS, giving those
components only that are loaded with these commands.
Command EDIT has the same function as DES, but stores the result in the editor work area.
Note: running the result of EDIT LOAD after removing lines will leave the corresponding components unchanged. In order to delete
components this way, run command EMPTY first.
Command LIST PAR serves output of results, but it can also be used for detailed information of the individual load components during definition
of load cases.
Using commands SETUP and DRW AUTO, changes in the current load case are directly shown on the drawing. DRW without parameters draws the
loads of the current load case.
If the drawings corresponding to the setup have been stored in the database with names marked (i.e. ID NAME), command DRW MENU draws the
current setup using the stored drawings, and registers the result for use as a menu. Pointing inside a compartment (graphic input with colon ':')
and pressing key M (see command !EXPL !GIN) adds the name of the compartment to the current command.
The purpose of the command WATCH is to continuously display the floating position of the ship after each loading event.
WATCH options;
The command without options displays the current state of the WATCH command. The options of the command are:
18.5. Events
Actions to done in response to load changes can also be triggered by macros tied to the following events:
LD*GCHANGE: triggered once for a load change command (which may affect several load components)
The following example shows the changed floating position by listing and graphics. The actions are defined by a macro named SHOWFLPOS:
@@!ADD
OUT FLOAT(HEEL)
ASG HYD
!CALDR.SETFLPOS(LDTR,LDHEEL,'I')
!E
DR; THI 1; COL 1; LD
DRWALL
DRW @@ current loads
DRW MASS
DR; THI 2; COL 5; LD
DRWFLPOS @LDT @LDTR @LDHEEL I
!ACTIONS LD*GCHANGESHOWFLPOS
The @@!ADD means that the macro shall be run as if started by !ADD an not in the so-called immediate mode, which is default. This is
necessary because the macro contains NAPA commands (and not only NAPA BASIC commands).
1. General
1.1. Purpose
1.2. Transfers between tables and the loading condition
2. Properties of the tables
2.1. General
2.2. Compulsory columns
2.3. Other columns
3. Dependence between quantities
3.1. Overview
3.2. Quantities related to the density
3.3. Quantities related to the amount
3.4. Load properties used
3.5. Loading time and rate
3.6. Derived load properties
3.7. Checking the amount of load
3.8. Relation to other columns in the table
3.9. The dynamic dependence management
3.10. Special questions for gauge values
3.11. Special questions for free surface moments
3.12. Compartments open to sea
3.13. Pressurised compartments (damaged)
3.14. Designing a table for mass loads
3.15. Designing a table for both mass loads and loads in compartments
4. Updating the table from the loading condition
5. Updating the loading condition from the table
6. Using the arrangement plan
7. Defining the automatic table connection
1. General
This chapter describes functions for treating loading conditions in tables. This provides new ways of dealing with load components, taking
advantage of the possibilities for processing data within tables and above all, of the user interface available for tables. The concept table loading
refers to this way of treating loading conditions.
All standard functions for calculating and outputting loading conditions use the same representation of the loading condition, regardless of
whether tables are used or not. All definition functions specific for LD (LOAD, MASS, MOVE, BALANCE) use the common representation. Load
components treated in tables have to be transferred between the two representations, which can be done automatically or at separate request.
The following paragraphs outline different ways of using the table interface.
1.1. Purpose
As indicated above, the main reason for introducing tables is to provide another user interface.
This takes advantage of all existing functions for interacting with a table, above all the table editor. This can be supported by an arrangement plan
for making/showing selections and for presenting the loadcase graphically. The table can be designed to support different ways of treating the
load components, for example entering loads by sounding device readings.
The tables can be configured different ways, depending on the behaviour desired and different sets of load components can be directed to
different tables. Most likely, mass loads and loads in compartments are handled separately.
In this mode of working, the tables are run time tools only, and have no part in storing the loading condition permanently.
Tables can also be used for extracting data for loading conditions without any role in defining them. This case resembles using LIST PAR with the
TABLE option. The main difference is that there is a receiving table which may have column definitions generating additional information.
As a special case, the table can be output as an ASCII file in the CSV format, which can be accessed by various other systems.
Tables can also be used as a permanent storage medium. However, presently there are no automatic functions for supporting this.
The main functions of LD work the same way regardless of how the loads were introduced. Similarly, the loading tables work as normal tables
according to their definition. The connection is created by the functions for transferring load data from the loading condition to the table and vice
versa.
The transfers can be started by the service functions LD.TOTABLE and LD.FROMTABLE.
Mass loads and compartment loads are handled in different transfer operations.
The table need not contain all compartments in the ship. In doing the transfers, the default is that only those compartments that are present in the
table are concerned.
The set concerned by the operation is by default the whole table (when transferring to LD) or all components of the type in question (mass/tanks).
This set can be specified differently by adding a selection criterion. For example, criterion TYPE=S and option R means that transfer only
components of the given type and remove any components of the given type in the receiver if not included in the transfer.
The quantity identifying load components is by default NAME. For mass loads, it can be replaced by LOAD (option L) or DES (option D).
The transfers can also be done automatically in both ways. This must be supported by a definition of what tables to use for different components.
The details concerning these transfers are presented in the command/function explanations.
When updating the loading condition from the table, the definition status (primary/calculated) is also relevant for how to record the result. For
example, if DENS is given as a primary value in the table, the load component is defined with fixed density (option DENS=... added). 'Primary'
means here that the value is obtained by other means than the LD formula.
2.1. General
The main contents of the tables considered here is the load components, one at each line. The columns needed for this are represented below.
The loading functions as such make no assumption about the prefix of the table. However, the prefix LOAD* is reserved for tables containing
loads in compartments while the prefix MASS* is reserved for tables that are specifically designed for handling mass loads.
As a test feature, mass loads can also be recorded in a LOAD* table. The column PURP is then necessary and should give MASS for the mass
loads.
For defining a loading condition, the following information is the minimum for compartments:
LOAD: substance
MASS: amount of load
XM,YM,ZM: location
The type of definition for the load component is recorded depending on what quantities are recorded as primary. If overdetermined, then MASS +
DENS.
NOTE: if the loading condition is stored or updated according to the standard logic, some values may be changed.
Depending on the desired behaviour, the table may contain other columns. The columns taking part in the standard calculation logic are
presented below.
When loading the table, most quantities listed by LQ PAR ALT are available. For an exact list, see below.
Any other columns can be added, but their role must be defined by the standard table calculation routines.
The calculations can be defined by the general functions of table calculation. Here, the special services provided for LD are presented. These are
obtained by giving LD as the calculation formula for a column,
The following paragraphs present the role of the quantities related to loads in compartments, mass loads are treated separately.
3.1. Overview
location: for the loads presented here, it is given by the name of a compartment, quantity NAME. From the geometry associated with
NAME, the moulded volume (VOLM) is obtained and from the SM definitions quantities such as RED (steel reduction) and CAP (loading
capacity) are obtained.
substance: the quality of the load is represented by the quantity LOAD (e.g. HFO. BW). Properties related to the substance are obtained
from SM, as defined in the PAR* tables. The properties can also be defined in directly in the table. If LOAD is missing, PURP is used.
amount: in LD, the amount is represented by the quantity MASS, but the original definition may be defined in other ways, for example
volume (VLOAD), filling (VREL) and readings of sounding devices (GAUGE).
Of the properties related to LOAD, the most important one is the density DENS. By default, the density is equal to the reference density RHO
defined in PAR*, but it may also be given directly or calculated from a given temperature. The reference density can be given using the quantities
SPG and DAPI (ObN).
The quantities listed above are those related to defining the load component. In addition, various derived properties such as GMCORR can be
declared and calculated in the table.
The numbers given in parentheses are the record number which identify the quantities internally. '(ObN)' means that the quantity is available
under the Onboard NAPA only.
In the other calculations, the density of the load is supposed to be available as the quantity DENS (5380). The density can be given directly or
derived from the reference density RHO, normally obtained as a property of the substance (in the PAR* table). The reference density can be used
as such or corrected to a given temperature.
The dependence on temperature can be given as the temperature expansion coefficient TE (383) or as the ASTM code (5384, ObN only), which
may be defined as properties of LOAD. The correction can be represented as the volume correction factor (VCORRF, 5292) (ObN).
The reference density and temperature is given by the quantity RTEMP (384) respectively. If not given, the reference temperature is set to 15
degC.
The quantities RHO, TE, ASTM and RTEMP are fetched from SM if not available otherwise. Note: SPG and DAPI are not fetched from SM, but
calculated from RHO. Thus, the SM source can only be used for providing RHO.
The quantity representing the amount of load used in LD is MASS, and must be declared in the table. However, it need not be the primary
quantity. The following quantities are available for representing the amount:
A variable steel reduction can be taken into account by adding the column LSTRED. It has no effect on other items unless gauge readings used.
If the compartment has no variable steel reduction defined, LSTRED is equal to RED.
The following supporting quantities may be needed. These are normally obtained from the geometry of from the SM definitions. All of these can
be obtained automatically by adding the LD formula.
The list above indicates the standard source of the quantity. This source is used if the quantity is omitted or its calculation rule is LD.
The quantity RATE designates loading rate in m3/s and the TTIME the time until completion (empty or full, dependent on the sign of the rate).
These quantities are supported by the LD formula, so that if one is given, the other is calculated.
When calculating the rate, the initial sign tells whether the time means time to empty or time to full.
The quantity DAT can be added and gives the absolute time when the loading is finished (NAPA internal representation). The function FTIME
converts it to a readable representation.
The following derived quantities can also be declared with the LD formula, but updated only in connection with transfers to the loading condition:
When updating the values, it is also checked whether the amount of load is within the limits set by the net volume (VNET) and the loading
capacity (LCAP). If the load exceeds the limits, it is automatically reduced. For this check to be done, the upper limit must be available in the table
as either VLMAX (maximum volume) or WMAX (maximum weight).
This check can be disabled by option F (force), assigned to the quantity OPTION:
QNT OPTION F
For the purpose of dependencies between LD quantities, any quantity present in the table and not declared with the LD formula is treated as
primary. If, however, the quantity must not be treated this way, this can be prevented by giving its quantity number as the value of the quantity
LDDT. In the following example WAIR is derived by an own formula instead of being potential input for the mass:
COLUMN MASS LD
COLUMN VLOAD LD
COLUMN ...
COLUMN WAIR 'MASS*RHX'
Because of interdependences, all columns having the LD formula are updated when the first one is encountered. This must be taken into account
if there are dependencies handled by other means. A calculated column on which an LD quantity is dependent must occur before the first
LD-column.
Within the limits presented below, the LD formula is capable of handling interdependence between the quantities involved in all directions. For
example, if MASS is given, VLOAD can be calculated and vice versa.
The dynamic dependence management concerns the following groups of quantities, so that if one item in a group is given, the others in the same
group can be calculated:
Reference density:
RHO
SPG
DAPI
Density of load:
DENS
TEMP
TEMPF
Amount of load:
MASS
MREL
WAIR
VLOAD
VREL
GAUGE (0...4 devices)
Filling time
RATE (m3/s)
TTIME (time until full or empty)
If none of the values in the reference density group is given, RHO is fetched from the SM definitions. If none of the values in the density group is
given, DENS is set equal to RHO. In the amount group, there is no external source, and one of the values must be given.
If there is no original source for a quantity, i.e. the required column is missing or the value is marked as dependent, no update can be done. If a
group is overdetermined, i.e. there are more than one source, a warning is given and the last value encountered is used. The quantity used is
indicated in the message. See also QNT LDDT presented above.
As far as the column definitions are concerned, all columns in the group are dependent, and the fixed values are recorded the normal way as
so-called exceptions.
Thus, not only the values entered are important but also their state of being primary or calculated. The table management can be engaged to take
care of the dynamic dependencies so that when a value in a group is fixed, the one originally given is automatically made calculated. This is done
by defining the groups with the DDEP command, as illustrated by the following example:
If, for example, the relative volume, VREL is given, MASS and VLOAD will be calculated.
Soundings and ullages can be included in a loading table either for output only or as a way of entering the amount of load. A column representing
these has GAUGE as the quantity. If this is also the column name, the table must contain a column SDE for providing the device name.
Alternatively, the whole column can be dedicated for a given device, in which case the column name defines the device. Thus, the column
definition can be
COLUMN SDE
COLUMN GAUGE LD
or
COLUMN MS=GAUGE LD
In the SDE column, a compartment that has no sounding device is recorded as NONE, otherwise a missing device causes an error message. In
the other columns, a missing device is disregarded without message except when it causes the amount to be undefined.
There can up to four different columns with soundings. The slash in a device name such as MS/V1 can be represented by an underline.
When converting gauge values to volumes or vice versa, the trim and heel are needed. These can be supplied by assigning them as quantities:
The TRIMX quantity can be replaced by TR, which records the trim in radians. If the quantities are missing, zero is assumed. In case both exist,
In specifying the automatic connection between loading conditions and tables, LD can be instructed to automatically update the trim and heels.
Note: changing trim or heel does not automatically trigger recalculation. Use UPDATE V or the function TP.UPDATE() if needed.
The table can be used for controlling the free surface rule, expressed by the quantity FRS:
If the FRS column is present, it is updated when transferring data from the loading condition. If the FRS column as a whole is primary, only explicit
values are recorded.
If a value in the FRS column is primary, it is recorded as given when the loading condition is updated from the table.
Defining a calculation rule LD allows both the representation of values decided from the rules (FRSV argument) and exception values given in the
table. See separate section on handling of free surface exceptions.
The table can also show or control the status of being open to sea. This is done by declaring the column ISTAT (920), having value 0=not open or
1=open to sea. The amount of flood water can be made available by adding the column WFL (6290). WFL is assigned when the loading condition
is updated from table.
Air pockets can be treated in the loading table by adding one or several of the following columns:
Any one of the three first ones can be the primary definition while the others are derived. The quantity IAIRP tells explicitly which is the fixed
quantity (A, P or V) while empty means no air pocket.
In transfers from the table to LD the definition status is relevant and defines the fixed quantity. Similarly, when updating the table the definition
status is assigned accordingly.
Update of the dependent values can only take place by updating the loading condition. Consequently, the LD formula is not useful but in order to
take advantage of the management of primary versus calculated values, the columns can be declared with formula DUMMY and their mutual
dependence declared in the DDEP command.
For removing an air pocket, the following rule is obeyed: If there is an IAIRP column, the air pocket is removed by setting IAIRP=empty.
There is presently no special support for mass loads in the LD framework. One can, however, borrow the functionality related to equipment: the
position of the load can be expressed with the syntaxes of the LOCTN quantity and the extension handled with the quantity LENX, LXCG and
similar for the other directions. The derived quantities are then declared with SME as the calculation formula.
SME expects the centers of gravity to be represented by quantities XCG, YCG and ZCG. These will be accepted instead of XM, YM and ZM when
transferring to LD.
If the table has prefix MASS* it is assumed that it is contains mass loads. Otherwise, the role of the table must be indicated in the transfer
command or by additional option M as a quantity:
QNT OPTION M
When updating mass loads otherwise than by complete replacement, the problem of identifying mass loads in the loading condition and in the
table occurs. The default is to use the quantity NAME (formal location), which is always unique. It is however, possible to use the description
(DES) or load type (LOAD) for the purpose, by assigning option D resp. L, for example
QNT OPTION ML
3.15. Designing a table for both mass loads and loads in compartments
There are various respects in which the definition of mass loads differ from that of loads in a compartment:
For this reason, it is easiest to use tables with different definition for mass loads. However, it may for other reasons be practical to have all loads
in a single table. Then it is required that the table contains column PURP, which should have the value MASS for mass loads.
When presenting the table by the table editor, the table can be placed in 'mass' or 'compartment' mode by modifying the line and column subsets.
The support for mixed tables is implemented on pilot level.
Records, grouped:
DES description
DAT date
CLASS class
XMAX maximum x
YMIN minimum y
YMAX maximum y
ZMIN minimum z
ZMAX maximum z
TYPE type
TEMP temperature
LCAP capacity
HM height of load
YM cgy of mass
ZM cgz of mass
IYM iy of surface
MOM moment
GMCORR gm-correction
LENX xmax-xmin
LENY ymax-ymin
LENZ zmax-zmin
Note that NAME is not listed, but used for identifying the receiving line. With mass loads, there is the option to have LOAD or DES for this
purpose. This is expressed by the option attached to table. The other options mentioned here concern the transfer.
As far as the values are concerned, all items that do not have a calculation rule (i.e. primary columns or exceptions) are transferred. Exceptions
are FRS, LENX, LENY, LENZ, LOCTN which are always assigned if present in the table.
If the table definition makes it possible (there is the LD formula), the definition status of the central load parameters is adjusted to match the way
they are defined in the loading condition. For example, if the amount of load is defined by the volume, VLOAD is marked as the primary item.
If TEMP is present, it is always considered given. Without TEMP, DENS is considered given if it is not a primary item. FRS must be defined as an
exception in order to be transferred (the column must be declared with rule=DUMMY).
All combinations of defining the extension are not supported by the MASS command, and the result obeys one of the following forms:
The form L=... is selected if this is explicitly given (quantities LENX, LENY, LENZ) or the center of gravity is at the center of the circumscribed box.
The lines concerned can be restricted to the current subset (option S) or to a given line number. The effect on the receiver can be controlled by a
selection criterion, with the effect that the set transferred is considered a replacement for this set. For compartments, the load is set to zero in for
those in the set that do not obtain a result from the table. For example, if the set is restricted to CLASS=C (assumed cargo), cargo tanks not in the
table are emptied. The default is that compartments not in the table are not affected.
For mass loads, the equivalent effect can also be obtained by removing the load component.
The cooperation between the table and the arrangement plan is handled with the general functions of graphics and table calculation. Here, only
some notes are added about the tools needed.
When doing input from the arrangement plan, the function GR.IDENTIFY tells the object under the cursor. This can then be used for selecting
lines in the table.
Conversely, when a line has been selected in the table, the corresponding object can be indicated in the table by the function GR.HIGHLIGHT.
If the table has been restricted to show a subset of compartments, this subset can be shown by adding a different highlight. The performance of
the highlighting may be improved by using hardware layers. The type of highlight is decided by the function GR.HLMETHOD.
Compartments can shown by highlighting the border or interior of the contours. Mass loads must be plotted separately, either by LD (DRW MASS)
or by TP.DRW. The selected mass load can be marked by colouring the symbol or by adding a frame.
The position of the mass load can be entered graphically, but there is presently no function for dragging with the cursor.
Showing the loads in the compartments must be handled by the DRW command of LD.
Each subrule has an identifier by which changes can be distinguished from new rules. If the name of rule begins with T or F, the effect is to restrict
it to transfers to or from the table respectively.
The rule can also specify whether the floating position recorded in the quantities TR (or TRIMX) and HEEL should be updated. This is indicated by
option F.
Rules are defined with the function LD.CTU or the command CTU, control table updates:
The identifier makes it possible to know whether a rule is an update to an existing one or a new one. In addition, the first letter controls the
direction concerned:
T: to table (LD->TAB)
F: from table (TAB->LD)
Transferring to the table means that a load component changed by a loading command such as LOAD, MASS, BALANCE is transferred
automatically to the table designated. This also concerns commands GET, NEW and EMPTY.
Transferring from the table means that when a line in a table is changed, the corresponding loading component in the loading condition is directly
updated.
NOTE carefully: updating the loading condition from the table is done in connection with updating the table internally because of the LD formula. If
there is no other need for a column with the LD formula, the following column must be added:
COLUMN DUMMY LD
The normal events are raised: in the first case TP*CHANGE, in the latter case LD*CHANGE and LD*GCHANGE. If the floating position is
updated, the event TP*CHGQNT is also raised.
The same function can be done with the LD.CTU service function.
1. Tank pairs
2. Priorities
3. Permissible strength values
4. Tank supports
5. Shear Force Corrections According to CSR
5.1. Definitions
5.2. Damage Cases
5.3. Output, LIST SFC
1. Tank pairs
The tank pair definition is simply a list of pairs in the form:
The given list is added to any previous pair definition. Previous pairs can be removed by
PAIR DELETE
The pairs should normally be formed by two symmetric tanks, but there is no check for this.
2. Priorities
The loading priority is defined for each load separately in the form
The priority is relevant when loading a given amount of a given load without naming the receivers explicitly. The tanks will then be filled in the
order defined until the specified amount is loaded.
Data related to permissible values are defined at the main level of LD.
There may be limit curves for shear force, bending moment, torsional moment and combined stress. If permissible values for some quantity are
not needed, you do not have to define limit curves for that quantity. The number of limit curves stored in the data base is not limited. The limit
curves are identified by names.
A limit curve defines permissible values as a function of x for one quantity, i.e. there must be separate curves for different quantities. Definition of
a limit curve is entered by the command LCUR. The quantity and the shape of the limit curve are defined by one of the commands BM, SF, TM or
MSTOT. The command BM, SF, TM or MSTOT defines both the minimum and maximum permissible values; the minimum curve may be same as
the maximum curve (with minus sign) or the curves may be different. The point syntax (x,max) is used for the common minimum and maximum
curves, the point syntax (x,min,max) for different minimum and maximum curves. Definition is terminated by OK (or SKIP). The command
sequence
define limit curves for shear force, torsion moment and combined stress. Example:
Limit curves can also be defined in a table that is linked to the limit curve. This means that if the table is changed also the limit curve values are
changed. In the following example the limit values are linked to a table LCUR*BMLIMTABLE. This table must contain the columns X, BMMN and
BMMX. In addition, values must be given at least at two x-coordinates.
The minimum and maximum permissible values can be defined in separate tables:
Similar table-based definition can also be used for shear force (SF), torsion moment (TM) and combined stress (MSTOT) limit curves. The
quantities in the columns for the limit values must correspond to the limit curve type, e.g. SFMN and SFMX for the shear force.
There is also a service function LD.LCURTOTAB that can be used for converting old limit curve definitions into a LCUR* table.
All limit curves which are used in different conditions - sea condition, harbour condition, Suez Canal condition, etc - are collected under one name
in a limit curve group. A limit curve group defines the quantities, the permissible values by referring to limit curves and the way how the limit
curves are handled: a common limit curve for all draughts or the permissible values are interpolated for the actual draught from a set of curves.
Within the group definition, the quantities are selected by the commands BM, SF, TM and MSTOT. If there is only one name after the quantity
selection command, the given curve is common for all draughts. If there are several curve names each one preceded by a draught value, the
permissible values are interpolated linearly from the given curves for the actual draught (loading condition). If the actual draught is outside the
given draught range, the first or last curve is used. Definition of a limit curve group consists of the following commands:
Commands for quantities which are not needed are omitted. If one limit curve is common for all T's, the sequence 't,cur t,cur ...' is replaced by one
name 'cur'. Example:
In this example, at T=4 m or T<4 m the permissible values for bending moment and torsion moment are fetched from the curves BMSEA4 and
TM4; at T=6 m or T>6 m the permissible values for bending moment and torsion moment are fetched from the curves BMSEA6 and TM6; for T
between 4 and 6 m the permissible values for bending moment and torsion moment are interpolated from the curves BMSEA4, BMSEA6, TM4
and TM6. The permissible values of shear force are common for all draughts. The limit curve(s) for combined stress are missing because they are
not needed.
The permissible values used in output of the current loading condition are selected by the argument command STLIM. The command references
to a limit curve group. This command is in the argument list of the loading condition, thus making it possible to use permissible values which are
specific to the loading condition. The argument STLIM is stored in the data base with the loading condition. If wanted, one limit curve group may
be marked as a default one, which means that the default group is assigned to all new loading conditions.
For administration of the permissible values, the following commands are installed:
4. Tank supports
Tank supports are used to make the weight of the tank to be distributed in the area of the supports in a desired manner. The portion of the weight
on each support can be calculated, if the number of supports is less than three. If there are more than two supports, the total weight is shared
equally or according to explicit input data.
The command SUP defines supports for one tank. Any tank or compartment may be equipped with supports. Once supports has been defined for
tanks, they are automatically taken into account in all strength calculations. The tank supports are common for all loading conditions. The
command format for supports of one tank is the following:
One support is defined by three (two) numbers: x-limits x1 and x2 and (optional) portion of the total weight on the support p (%). Within one
support, weight is shared equally. Between the supports, weight is shared according to p's, equally or, in case of two supports, the share is
calculated.
Each support may also be defined separately with a two dimensional distribution curve. The weight of the load in the tank is divided between the
supports on the basis of the areas of the curves.Error rendering macro 'code': Invalid value specified for parameter 'lang'
Example:
5.1. Definitions
For bulk carriers automatic calculation and update of the shear force correction can be defined:
The definition table should be created by using TAB*CSR_MODEL as a model table. The same table should be used for damage cases. The
cargo holds are listed in the key column NAME. The holds must be in ascending order from stern to stem. The mandatory input columns are:
The following auxiliary input data is calculated automatically, in the model table, based on the name of the cargo hold:
Also these columns are necessary for the calculation of the shear force corrections. The input data is checked before the calculation and possible
errors are informed. If the input data is erroneous the shear force corrections cannot be calculated.
Note that the XMIN and XMAX limits for the holds should form a continuous series within a tolerance of 0.01 m. If there is a larger gap
between the holds the correction is set to zero at both fore and aft end of the gap.
Partial double bottom tanks (red and green) under the cargo hold, defined in DBTCSR column
The following options are supported for analysis of homogenous loading condition:
The default option is 'DENS RATIO1.2', so a bulkhead is non-homogenous if the ratio between the highest and lowest filling ratio, corrected
with densities, is larger than 1.2.
Shear force corrections are automatically updated when the loading condition is changed. This is informed with a notification in the main window.
The following principles in the calculation of shear force corrections should be noted:
SFC=0 for bulkheads that are not between two adjacent cargo holds. In practice this applies to first and last bulkheads in each series of
consecutive cargo holds.
SFCORR is set to zero, if the calculated correction would change the sign of the shear force.
STABHULL argument must be the same hull as the stability hull (STAB) in the reference system.
The damage cases need to be defined by the user. The variable permeability (value below and above the level of the cargo) should be given in
the damage definition. An example is given below:
DAMA, IACS_HOLD1
ROOM, HOLD1, PERM=(0.3, *, 0.95)
OK
Liquid load in a damaged cargo hold is considered to flow out. for other load types the initial load mass remains.
Detailed results of the shear force correction calculation can be listed with the new LIST SFC functionality. This includes all the necessary input
data from the definition table, as well as the intermediate results, such as CSRPHI, CSRALPHA, draft in the middle of the hold (T), masses that
affect the corrections and both corrected (SFCORR) and uncorrected shear force (SHEAR), as well as the actual shear force corrections (SFC)
and the limit curve values (SHMN and SHMX).
The results can be listed also for the pre-defined damage cases:
On calculation (LD)
This section describes shortly calculation methods used in different parts of the subsystem and what kind of possibilities the user has to influence
on calculations by calculation arguments.
Table of Contents:
1. Calculation methods
1.1. Floating position
1.2. The fixed trim method
1.3. Stability curve
1.4. Free surface moments
1.5. Longitudinal strength
2. Calculation arguments
2.1. Arrangement
2.2. Calculation hull
2.3. Seawater density
2.4. Heeling angles
2.5. Calculation method
2.6. Asymmetry control
2.7. Calculation mode
2.8. Lightweight version
2.9. Free surface rule
2.10. Wave
2.11. Openings
2.12. Slack limit
2.13. Permissible strength values
2.14. Filling limits for free surface handling
2.15. Limits for longitudinal strength
2.16. Resetting arguments
2.17. Management of arguments
3. Storing results in the data base
4. Additional calculation control
4.1. Force
4.2. Calculate
4.3. Update
1. Calculation methods
After each loading operation, certain basic properties of the load case are immediately updated, including the floating position. This is done by a
normal balancing operation, unless changed by arguments as follows:
There are two methods to calculate the floating position of the ship and related hydrostatics, the free trim method and the fixed trim method. The
free trim method is default - the fixed trim method is provided for special purposes, main for comparison with old ways of calculating.
The free trim method calculates the ship as a real physical object i.e. the floating position is iterated to achieve the correct displacement at a
position where the center of gravity of displacement and buoyancy lie on the same vertical line (physical equilibrium).
keeping the ship at even keel, the program calculates a draught T0, which gives the desired displacement.
KM corresponds to draught T0 and trim 0.0
trim is calculated from the waterline of the ship as
trim = VOL * (LCG - LCB) * LREF / IX
where volume VOL, longitudinal center of buoyancy LCB and longitudinal moment of inertia of the waterline IX correspond to the draught
T0 and trim 0.0
because the trimming ship rotates around LCF, the draught is corrected as
draught = T0 + (XREF - LCF) * TAN(trim)
to keep the displacement right also in the trimming condition.
The approximative (fast) calculation mode of the free trim method resembles the fixed trim method.
The floating position is calculated the ship in the upright position (HEEL = 0.0 deg).
where KN is the horizontal distance from the center of buoyancy to the base line, YCG and ZCG are the horizontal and vertical coordinates of the
center of displacement, phi is the heeling angle and dGZ is the free surface correction of the liquid loads.
The default mode to calculate stability is that the ship is allowed to heel (YREF OFF). The other alternative is that the ship is forced upright even if
the hull form is asymmetric or that the center of gravity is not on the center line (YREF ON). In the latter case, the program assigns 0.0 to YCG
and if the hull is asymmetric, KN at heeling 0.0 is assigned to YREF. If the program works in the mode, where asymmetry is taken into account
(YREF OFF), KN and YCG are not changed.
The free surface correction dGZ is calculated according to rule(s) valid during calculation. In all cases, the free surface correction is calculated
outside the balancing process (calculation of equilibrium floating position at different heeling angles), and therefore moving of liquids in tanks
cannot be taken into account in an accurate way. Effects caused by moving liquids due to trim are not taken into account at all, except using
MODE FREE or REAL. This is the reason why the same loading (initial) condition calculated in LD and DA may differ from each other.
The calculation methods 'free trim' and 'fixed trim' are taken into account in KN: in the free trim method the ship is allowed to trim freely during the
balancing process, while in the fixed trim method the ship is kept at even keel during balancing.
The approximate (fast) calculation mode of the free trim method balances the ship (calculates KN) in the same way which was described for the
fixed trim method in connection with the floating position calculation (see previous chapter).
NOTE: if YREF=ON, stability calculations are refused if the asymmetry (deviation from 0 of YCG) is larger than the argument SYTOL.
The free surface correction is used in two ways: in the upright position (heeling = 0.0), the free surface correction IY is used to get the
GM-correction
GMcorr = IY/DISP
and in a heeled position, the free surface correction gives the inclining moment Mfs and correction for the GZ curve as
dGZ = Mfs/DISP
For a single compartment carrying liquid cargo, the free surface moments IY and Mfs can be calculated by the following alternative methods:
REAL
IMO (Res. A.749)
R50 (real moments at 50% filling)
MAX
FMAX (max within the filling ratio limits)
LLMAX
explicit constant moment
REAL5
ITREAL
DGZREAL
The real moments are calculated from the geometry of the compartment using the current filling and corresponding liquid level. Calculation is
done only for slack compartments, i.e. for compartments that have a filling that is under the given slack limit, and over 1 %.
See chapter 'FREE SURFACE HANDLING' for a thorough explanation, including detailed description of alternative free surface rules
The free surface moments according to IMO Res. A.749 are calculated from the equations (see reg. text)
where
The real moments at 50% filling are calculated using the liquid level at which half of the net volume is occupied by a liquid cargo.
IY = M0
Mfs = M0 * sin(phi)
In the approximative (fast) mode, calculation of real moments is replaced by IMO's equations.
Which one of the above mentioned methods is applied in each compartment depends on the free surface rule(s) (FRS) valid during calculation.
Calculation of longitudinal strength is made with the ship in an upright position (MODE USTR) or with the ship in an inclined floating position
(MODE ISTR). The selection is in the argument list of the loading condition.
The weight distribution of the loading condition is calculated by adding the weight distribution of the loads to the lightweight distribution (for
lightweight distribution see the chapter LIGHTWEIGHT DEFINITIONS). The load is distributed in the compartment according to the frame area
curve or, if there are tank supports for the compartment, according to the distribution defined by the supports. The mass loads are distributed
according to their longitudinal extent using trapeze forms.
The buoyancy distribution is got from the frame area curve of the hull at the current floating position.
The shear force, bending moment and deflection curves are calculated at 101 equidistant points from the aft end to the fore end. The shear force
at x, SF(x), is
where B(x) is the buoyancy distribution and W(x) is the weight distribution. The bending moment at x, BM(x), is
BM(x) = INTEGRAL(SF(x))dx
SL(x) = INTEGRAL(BM(x)/(E*I(x)))dx
where E is the modulus of elasticity and I(x) the moment of inertia of the cross section of the ship. The deflection at x, DF(x), is
DF(x) = INTEGRAL(SL(x))dx
Because of lack of calculation accuracy, the curves are not necessary zero at the fore end of the ship. Therefore the curves are adjusted so that
they become zero at the fore end of the ship.
The transverse moment distribution TMOM is the difference of the transverse moment distribution of weight and the transverse moment
distribution of buoyancy. The transverse moment distributions are calculated from the center of twist, if there is any, or from x=0.
TORS(x) = INTEGRAL(TMOM(x))dx
The combined stress at a frame, MSTOT(fr), is the absolute value of the bending moment BM(fr) multiplied by the stress concentration factor
ALF(fr) added to the sum of transverse moments TMOM(x) multiplied by the influence factors FI(x)
where summation goes over the length of the ship. See the chapter LIGHTWEIGHT DEFINITIONS for input of the stress concentration factors
and influence factors.
2. Calculation arguments
The user has an opportunity to influence on calculated results by changing the calculation arguments. Changing of any calculation argument
makes the stored results obsolete and recalculation is started when the results are needed the next time.
The function of the individual arguments are presented below Administration related to the argument set as a whole is presented separately.
2.1. Arrangement
The current arrangement is a calculation argument because the steel reduction, density of contents of the tanks, type of room and filling are
fetched from the arrangement. If the room parameters of any loaded compartment are changed since the last save of the loading condition, the
results are made out of date.
ARR arr
ARR subset/arr
Where 'arr' is the name of the main arrangement and 'subset' a part of it. The purpose of this option is to speed handling of loading conditions by
using only part of the total set.
The name of the default arrangement is defined is SM by the command REG. If the arrangement has a subset name that begins with LD, that one
is used instead of the whole arrangement.
HULL hull
RHO rho
where rho is in t/m3. Default value for seawater density is fetched from the reference system.
Calculation heeling angles for stability curves are selected by the command
The default set is fetched from the system data base and can be changed by command STDH or (from rel. 2001) by storing standard arguments.
The program uses the following logic in the calculation of stability curves:
If the range of input heeling angles reaches over zero deg.,i.e. in the angle set, there are both negative and positive values, the stability
MODE use free trim method, but do not calculate longitudinal movements in tanks (default)
LFIX
MODE use free trim method (default), alternative command FIX OFF
FREE
MODE use free trim method, the ship and liquids will trim freely
FREE
MODE this mode will generate the GZ curve including the equilibrium angle. The ship and liquids are allowed to trim freely. This mode
REAL works with the free-surface mode REAL
The calculation method for longitudinal strength in the upright floating position/in an inclined floating position is selected as
MODE USTR calculate longitudinal strength in the upright floating position (default)
To take steel reductions into account or not in the calculation of the real free surface moments is selected as
The command YREF controls whether the asymmetric hull or loading is taken into account or not:
When YREF=ON, the argument SYTOL sets an upper limit on the allowed asymmetry, i.e. deviation from zero of the y-coordinate of the center of
gravity. If the tolerance is exceeded, stability calculations cannot be done.
The calculation mode accurate/approximate (=fast) is selected by the alternatives ACC and FAST of the command MODE:
LIG version;
The default version is A. For more information about lightweights see the chapter LIGHTWEIGHT DEFINITIONS.
The free surface rule is defined by the command FRS. See the separate chapter 'Free surface handling' for more info.
2.10. Wave
Calculation of the floating position, stability and longitudinal strength is possible also in waves. A wave is defined by its height, length, position,
shape and direction. The form
WAVE name;
DIR=angle angle between the ship's and wave's moving directions. The wave comes from the port side if the angle is positive and the
orientation of the coordinate system is left-handed or the angle is negative and the orientation of the coordinate system is right
handed. Otherwise the wave comes from the starboard side. (Optional, default 0.0).
Note that a definition of a wave makes it automatically a part of the calculation arguments.
The form
WAVE OFF;
2.11. Openings
The set of relevant openings is argument for the listing functions LIS CRI, OUTPUT STAB(IMO) and the stability criterion for grain stability which
need to know the progressive flooding angle. The openings are defined by the definition function OPE and the set of relevant openings is handled
by the commands ROP and IRO Relevant OPenings and IRrelevant Openings resp.). For administration, the commands CAT OPE, DES OPE,
EDI OPE and UNS OPE are available. The listing functions LIST OPE and OUT OPE produce detailed lists about relevant openings.
Slack limit for calculation of real free surface corrections is entered by the command
SLACK lim;
where lim is in the range (0.0 1.0). Default lim is 0.98 (see the chapter FREE SURFACE HANDLING).
Selection of permissible strength values for the current loading condition is done by the command
STLIM cgroup
where cgroup is the name of a curve group generated by the command LCGR. If the option DEF is added to the name as cgroup/DEF, the curve
group is used as the default curve group, i.e. it is assigned to the new loading conditions.
The command
defines the lower and upper filling limits for tanks that will be taken into account while calculating the free liquid surfaces. Default values are 0 and
1 (all tanks).
The command
defines the x-limits for the longitudinal strength calculation. Longitudinal strength is calculated for that part of the ship which is within the given
limits. Note that the LIMIT command and results calculated for the limited ship are not stored in the data base. Note also that the floating position
of the ship is that in which the unlimited ship is floating. If you want to calculate strength for a part of the ship in that floating position in which the
part is floating, use as hull an object which is cut off at xmin and xmax.
The current argument values can be replaced by the system defaults by calling
RESET ARG;
The arguments are stored with the loading condition and when the loading condition is read from the data base, the stored arguments are made
active.
For the arguments to be applied when a new loading condition is created, there are built-in defaults, which can be modified by storing argument
sets in the data base.
Handling stored arguments is done with the ARG command. The ARG command without parameters lists the current values, the other
alternatives are
When starting a run, an argument set named STD is fetched if available. If this set is not found in the project data base, it is read from the system
the system data base if available. Thus, one can define an own default set for the whole installation. Note, however, that many of the arguments
are (at least in principle) ship specific, referring to objects or definitions in the ship. When storing to the system data base, these are automatically
omitted.
Even when storing arguments for the project, one may not want to save all arguments, and the possibility is provided to control this. For example,
fixing the seawater density in the arguments makes this argument independent of the reference system.
It is once more emphasized that all this is specifically for new loading conditions.
Note: a manually defined argument overrides an argument from the standard set. A manually changed argument remains valid until
explicitly reset by ARG RESET or when a new GET is done.
The results which are up-to-date are not recalculated. The results are up-to-date if the user has not made any loading operation (LOAD, MASS,
MOVE, CHANGE, ADD), the results are younger than the hull and all loaded rooms and the current calculation arguments are the same as the
ones in the results. The arguments which are checked are: hull, seawater density, calculation method, calculation mode, slack limit, heeling
angles, arrangement, lightweight version, free surface rule(s), wave and asymmetry mode (YREF). From the arrangement, the room parameters
steel reduction, density, filling and type of the loaded rooms are checked.
The arguments that are valid at the time of SAVE or REPLACE are stored in the data base with the results. The same arguments are restored
simultaneously with GET. The new loading conditions (NEW ...) get the default argument values.
4.1. Force
The FORCE command sets the program in a mode where recalculation of the results is forced every time the results are needed. Recalculation is
done even if the results are or are supposed to be up to date.
set the program into the forced recalculation mode and the alternative
FORCE OFF;
sets the forced recalculation mode off (default). Note that the mode is ON until it is explicitly set OFF or the subsystem is left.
In addition to forcing recalculation, the FORCE command is used for making the ship to list in the desired direction. The alternative
FORCE SB;
forces the ship to list to the starboard side and the alternative
FORCE PS;
forces the ship to list to the port side. The automatic side selection is set on by FORCE OFF.
4.2. Calculate
The results can be calculated without making output by the command CALCULATE. The command has the following alternatives:
4.3. Update
The UPDATE command updates a selected set of loading conditions stored in the data base. The command alternative concerning updating of
stored results forces recalculation of the floating position, stability and strength and replaces the recalculated loading condition(s) in the data
base. The set of loading conditions is selected by SEL LC. If no selection is made, all loading conditions belonging to the current arrangement are
updated!
1. General
2. FRS command
2.1. Parameter 'group'
2.1.1. *CLASS
2.1.2. LOAD
2.1.3. ALL
2.1.4. OTHERS
2.1.5. (T1...Tn)
2.2. Parameter 'subgroup'
2.3. Parameter 'rule'
2.3.1. IMO
2.3.2. REAL
2.3.3. DGZREAL
2.3.4. R50
2.3.5. it
2.3.6. MAX
2.3.7. LLMAX
2.3.8. ITREAL
2.3.9. REAL5
2.3.10. FMAX
2.4. Parameter 'info'
3. Free surface moment for mass loads
4. Exceptions to free surface rules
4.1. Handling of exceptions in FSDEF task
4.2. Exceptions in tables
5. Polygon definition
6. Slack limit
7. Output and check
8. Examples
9. Free surface definition subtask
9.1. Commands and definitions in the free surface definition (FSD) subtask
1. General
The free surface rules can be defined as a set of subrules independent for each loading case, as the free surface rules are stored with the loading
case arguments together with the loading case.
The rule stored with the loading case can be (and mostly is) a set of subrules that together form the rule to be applied in the calculations. As each
subrule is defined by combining a group, subgroup and a calculation rule, a great variety of possibilities can be achieved. There is practically no
limit to how complicated the free surface rule can be; the problems usually arise when the users have to decide what combination of groups and
rules to use.
The handling of free surface calculations is mainly controlled by two commands: FRS for defining the rules, and SLACK for defining the limits
when to calculate free surface moments and when not to.
Three important things should always be kept in mind when defining or calculating free surfaces:
In order to get a free surface moment for a tank, the TYPE of the purpose defined in PD of SM has to be L. This applies also for mass
load 'purposes', if a mass load is given a free surface moment.
If the loading cases are calculated in FAST mode or WATCH is switched on, all free surfaces will be calculated according to the IMO rule
(FRS 'ALL IMO') regardless of the rules defined.
As the interpretation of more complicated sets of subrules sometimes could be difficult to understand, one should always check how the
rules have been applied. See section Output and check for more information.
2. FRS command
As earlier mentioned, the free surface rule is defined as a set of subrules. The syntax of the FRS command is therefore:
As the free surface moment also can be given as a user-defined polygon the other (not very often used) syntax is
The subgroups are defined in the same way, and the subgroup syntax is
Note: if the subrules overlap i.e. a tank can be found in two or more of the subrules, the first rule where the tank is mentioned is used.
The subrules are always given in apostrophes. Of the parameters in the subrules the 'group' and 'rule' have to be given, while 'subgroup' and 'info'
are optional. Depending on the 'rule' the subgroup has a default value, but in order to avoid confusion, especially in complicated cases, it is
recommended also to give the 'subgroup'.
The current FRS rules in a loading case can be checked by giving the command 'DES FRS'.
2.1.1. *CLASS
A group of compartments belonging to the same CLASS is selected. If the group is given as e.g. *B all groups that have a CLASS beginning with
the letter B are selected. The CLASS is defined in subtask PDE of SM for each purpose (e.g. HFO, BW ...).
2.1.2. LOAD
If the 'load' is given as a group, all compartments with that load (not purpose) are selected. If many loads are selected, they have to be given in
different subrules (or they could be selected by referring to the CLASS. See CLASS).
2.1.3. ALL
If the group is given as ALL, all tanks that are defined as tanks with liquid loads (TYPE=L) are selected.
Note: ALL means all tanks that have not yet been selected with a prior subrule, as the first subrule for a tank always defines what rule
to use. (See also OTHERS).
2.1.4. OTHERS
If OTHERS is given as a group, all remaining tanks (i.e. not yet selected) are selected. This means in practice the same as ALL because of the
principle of overlapping tanks, but it is used in order to avoid confusion, and makes the subrule easier to understand.
Examples:
calculates with a free surface moment equal to zero for all tanks as the first rule defines MOM=0 for all tanks.
2.1.5. (T1...Tn)
where T1...Tn stands for a set of given tanks. Giving the group like this, a given set of tanks can be treated in a different way than the whole group
to which the tanks belong. This is also the alternative that should be used when a mass load is given a free surface moment. (See also the
section Free surface moment for mass loads.)
There are also five different possibilities to define the subgroup. By defining a subgroup only a selected part of the whole group is taken into
account in the calculation of the free surface moment. The subgroup is optional but should be given if the default subgroup is not correct, or it can
be given for information to make the FRS command easier to understand.
ALL
All tanks in the 'group' are taken into account.
SLACK
Only the slack tanks of the 'group' are taken into account in the calculation.
MAX
The tank (tank pair) that has the maximum free surface moment at 50% filling and at a 30 degree heeling angle is taken into account.
(IMO)
MAXL
The same as alternative 3) but only the loaded tanks are encountered. This alternative is usually only used when the IMO rules are
interpreted so that only loaded tanks can have free surface moments. As seen later the default for IMO is that all tanks regardless if they
are loaded or not, are taken into account.
+SLACK
This alternative takes into account the tanks that satisfy the criteria of MAX and are slack. In practice this also means that the tank has to
be loaded because a slack tank in NAPA is a tank with at least 1% filling, by default.
The free surface moments of the subset of rooms/tanks that have been selected with the above-mentioned group/subgroup combination, can be
calculated according to the following rules.
2.3.1. IMO
According to IMO Res A.749, now part of Resolution A.749, the default subgroup (see above) for this rule is MAX. This means that also a tank
that is not loaded can have a free surface moment, as the only criterion for the selection of the room is the maximum moment calculated
according to equation in paragraph 3.3.3 of the Resolution. The free surface moment of IMO also does not take into account the filling of the tank
(see chapter 'ON CALCULATION')
2.3.2. REAL
The real free surface moment is calculated for the tanks at their actual filling. The correction for different heeling angles is obtained by calculating
the real new center of gravity for the load in the heeled tank. The correction for the initial GM is determined by calculating the real moment of
inertia for the free surface in the tank. The default subgroup for REAL is ALL (slack tanks).
Note: LD does not take into account the influence of trim when calculating the free surface moments and floating position i.e. no
longitudinal free surfaces.
2.3.3. DGZREAL
GM reduction is calculated from the slope of the GZ curve GMRED = GM0 - d(GZ)/dheel, the slope calculated at a given angle (default 5 deg, see
the section below on the 'info' parameter); GZ correction is the real moment.
2.3.4. R50
The same as real but the moment is calculated for a filling of 50% regardless of the actual filling degree. The default subgroup for R50 is MAX as
for IMO.
2.3.5. it
An explicitly given initial free surface moment (ton*m) that is distributed according to SINUS(HEEL) when the GZ-curve is corrected. This
alternative is usually used when the real shape of the tank is unknown, when one does not want to use any exact method to calculate the moment
or when a mass load is given a free surface moment.
2.3.6. MAX
GZ is corrected by IYMAX*sin(heel) and GM is reduced by IYMAX/displacement, where IYMAX is the largest moment (regardless of filling) of the
inertia derived from the geometry of the tank.
2.3.7. LLMAX
(Max. acc. to Lloyd's Register for MARPOL 25A) GM corrected by the largest moment of inertia at even keel, GZ corrected by the real free
surface moment using a filling for which the real free surface moment is a maximum at a 30 degree angle of heel.
2.3.8. ITREAL
GM corrected as in rule REAL, GZ corrected as IT*sin(heel)/DISP where IT is the transverse moment of inertia of free surface used for GM
correction.
2.3.9. REAL5
Real moment for slack tanks, GM correction at 5 degree heel for 98% filling. If filling is less than 98% (in practice this limit is 97.999%), REAL will
be applied. It should be noted that the 5 degree heel is to the same direction for all tanks. Thus the result for symmetrical tanks can be different.
2.3.10. FMAX
The maximum free surface moment in the given fill range that is defined by FILLMIN and FILLMAX in the LOAD command. By default, the whole
net volume is included (FILLMIN=0 and FILLMAX=100).
The parameter 'info' has one practical meaning: by defining a value 0...1 for 'info' one can include only tanks with a moment greater than the given
fraction of the lightweight. For IMO the default for this fraction is 0.02 (i.e. 2%).
The info parameter can also be used in the free surface rule DGZREAl to specify the angle at which the GM reduction is calculated. For example:
specifies that the GM reduction is calculated using the slope of the GZ curve at a heel of 10 degrees.
It can also be given via the free surface rule. The following should be taken into account when this is done:
The purpose of the mass load has to have the TYPE=L defined in PD of SM.
The mass load has to be defined with a so-called formal location (see the chapter about mass loads
The free surface rule is defined as version 5) for the group definition, and version 4) for the rule definition. E.g:
Note that it is possible to define exception also to an empty tank by giving zero mass or volume. Mass loads with explicit free surface moments
are not considered as exceptions to the free surface rule.
The exceptions are treated as additional rules of the type '(TANK) rule' that are applied first, before the actual rule from the FRSV argument.
Thus, if exception rule is defined for one ballast tank, then this tank is not included in the group of ballast tanks for the actual rule.
The exception can be removed with the option FRS=OFF in the LOAD command. All exceptions from the current loading condition can be
removed with the command:
The exceptions can also be given in the FSDEF task with the following command:
Explicit moments can also be given directly with the FSM value as the rule: tank=value.
Alternatively, the exceptions can be generated from the current loading condition (previous exceptions are removed first):
EXCEPTION GEN
EXCEPTION OFF
The created rule and the exceptions can be saved and used in another loading condition.
Exceptions to the free surface rule can also be given through a table. The columns FRS and FRSM need to have calculation formula LD. Normally
the values in the table are fetched from the interpretation of the FRSV argument, but directly given values (either explicit FRSM or explicit FRS)
are treated as exceptions.
The columns FRSM and FRS cannot be fixed and should have the LD calculation formula.
5. Polygon definition
As earlier explained, the free surface moment can be a user-defined polygon. Normally, the free surface moment can be given as one initial
moment that is distributed according to SINUS(HEEL). If the user wants to define another distribution, it should be defined with the polygon
command. The syntax of this command is:
POLYGON name (0.0 m0), (h1 m1), (h2 m2) .... (hn mn)
where the pair (h m) stands for the given moment m at a given heeling angle h. The range of the polygon has to cover the whole range of heeling
angles given in the calculation arguments (command ARG).
Note: the moment value given for heeling angle 0.0 is used for the GM correction and it should therefore not be zero.
6. Slack limit
The slack limit given with the command SLACK defines what tanks to include in the calculations of free surface moments for the rules that have
the subgroup SLACK. The built-in default value for the upper slack limit is 0.98 and for the lower 0.01. The slack limits can be given individually for
each tank via SM, using the columns SLACK (upper slack limit) and LSLACK (lower slack limit). If defined (i.e. the column is present and the
value is >0), the slack limit from SM overrides that obtained from the argument. As the (global) slack limit is stored together with the other
calculation arguments, the slack limit can vary from one load case to another.
Note: the volume referred to in the slack limit is the moulded volume reduced by the steel reduction. This means in practice that if the
CAPACITY of the tank is smaller than the slack limit, the tank is always slack, except when loaded below the lower limit.
There are at least two good ways to check how the free surface correction is calculated.
The easiest way is to give the command 'LIST FRS' which will give a list of all tanks that take part in the free surface correction and
correction of GM. This output also gives an explanation of why the tanks are selected or not. Possible exceptions to the free surface rule
can be listed by adding the quantity EXC to the LQ FRS selection.
The other possibility is to make a list with the command 'LIST PAR'. Here it is also not enough to select only the loaded compartments,
and as it is not necessary to list all tanks, the following LQ and TOO could be defined for this purpose:
On the second line of the TOO command only the tanks that have a load (MASS>0) OR tanks that have a free surface moment (FRSM>0) are
selected.
The quantity FRULE in LQ is the code for the interpreted free surface rule. If the value is negative the correction is not taken into account for
some reason (e.g. moment less than 2% of the lightweight etc.). A detailed description of the rule interpretation is given in the quantity NOTE in
LQ. In addition, the FRULE code can be opened with the service function:
!CAL LD.FRULE(frule)
Without the frule parameter the function returns a list of all possible FRULE codes and their explanations.
A more detailed list of the free surface moments and corrections can be produced with LIST FRS.
8. Examples
The following examples show a few possibilities how the FRS rules can be used.
Tanks with CLASS starting with the letter B (bunkers), others REAL. Default subgroup for IMO is MAX, and ALL for REAL.
Rule IMO (subgroup=MAX) will be applied to all liquid load groups (same as FRS 'ALL/MAX IMO').
Rule REAL will be applied to all classes, whose name begins with the letter C (CARGO), other load groups with rule IMO.
As above but only CARGO tanks will be taken into account, other tanks will have no free surface at all.
Free surface correction will not be calculated for load BW0, other liquid load groups with rule IMO.
FRS '(BW1 BW2 BW3) 375' 'BW REAL' 'HFO/MAXL IMO','*B IMO'
Tanks BW1...BW3 are given an explicit free surface moment, while all other BW tanks are calculated according to a REAL moment. All loaded H
FO tanks according to IMO (subgroup MAX) and the rest of the CLASS=B tanks according to IMO (subgroup MAX).
Here the tanks HFO1 HFO2 are calculated with a real moment at 50% filling, all other bunker (CLASS=B) tanks according to IMO (subgroup MAX
as default), and all other (slack) tanks with a real surface moment.
For example, when the LD task is entered for the first time, the FRSV argument has the value STD. This is not one of the free surface rules and
does not have to be given in single quotes (' ') like a set of free surface rules. STD is a built-in free surface version (that cannot be edited).
For example:
FRS STD
DES FRS
gives:
9.1. Commands and definitions in the free surface definition (FSD) subtask
Commands related to the FSD subtask are explained in the chapter on Commands, service functions and events in the Loading Conditions
Manual.
FSD
The basic commands for administration are the same as with most tasks. A new free surface is created with:
NEW name
Thereafter, the definition of a free surface version is done using the commands FRS, SLACK, and LIMITS, which function in exactly the same way
as in the main LD task.
Similarly, commands SAVE, REP, GET, CAT, DES and EDIT function as in other tasks. Free surface versions are deleted in the main LD task
using the UNSAVE command. Note that by default NAPA is using project database only. To save or get the definition from system database, it
has to be addressed e.g. GET rulename/SYSDB.
OK
SKIP
Notes for a free surface version can be assigned, edited and deleted using the NOTES command of FSD.
1. General
2. Command LIST
3. Listing arguments
4. The command ASG (assign)
5. Auxiliary listing functions
6. Tailoring list outputs
1. General
The subsystem produces various kinds of lists, some for checking purposes, some for final documents.
The result lists are normally based on the current loading case, i.e. on the loading case named in the last NEW- or GET-command. In connection
with listing of the current case, missing or obsolete data are automatically (re)calculated, separate calculation commands are not needed.
Some commands can produce lists from a selected set of loading cases. Using this facility, the results must be calculated and stored in the data
base prior to the listing, simultaneous calculation is not done. There is no up-to-date control in multiple loading case listings. This is the only way
to get out lists about obsolete data.
The system offers opportunity to calculate longitudinal strength of the damaged ship. Strength is calculated for the current loading condition in the
floating position the ship has after ended flooding and the weight and buoyancy distributions of the loading condition are modified according to
data fetched from the damage case after ended flooding. Inserting in any listing or plotting command of strength, the parameter DAM=case, the
system carries out calculation of strength in the given damage case (provided the case is defined in DA).
2. Command LIST
The following table shows all alternatives of the LIST-command.
LIST LC Selected items about loading conditions tab. options SELECT LC; LQ
LC
LIST FLP Floating position alt. II. Note! Draughts measured with heeling angle NH=no header
of 0.0 degrees!
LIST ST Stability curve and related data G=add gen. data tab.options LQ ST
3. Listing arguments
Contents and layout of the lists may be controlled by a set of separate commands or by arguments of the listing commands. The arguments are
represented in connection with the output commands. Separately given control is as follows.
Scope of listing
SELECT LC selection
Select set of loading conditions for use in LIST LC commands. The produced lists consist data about all selected conditions.
SELECT selection
Select quantities
The quantities to be displayed in some lists are selected by the command LQ subject selection.
The quantity selection is available for the lists generated by the LIS PAR, LIS LC, LIS SD, LIS ST, LIS ELE, LIS OPE, LIS CST and LIS TLIM
commands. The underlying table shows the subject alternatives and the lists where they are used.
The command
offers means to control the layout of the lists LIS PAR, LIS LC, LIS SD, LIS ST, LIS ELE, LIS OPE, LIS CST and LIS TLIM.
There are two options that can be given the ASG command :
The variables that are assigned with these commands are explained later in this chapter.
The units for the variables, especially for trim and heel (radians)
The 'ASG STR' variables are array variables. Note! The results need to be calculated with CAL STR unless they are already up-to-date
before using the ASG STR command.
When the variables have been assigned, they can all be listed with the command '!VAR LIST' or '!VAR LIST name' where 'name' stands
for the name of an array.
VARIABLE EXPLANATION
LDLX I
LDLZ I
VARIABLE EXPLANATION
SCAN S;
The SELECT LC command can be used for (at least) three different purposes:
The command LIST LC lists a summary of all selected loading conditions. The layout is controllable with 'LQ LC' and 'TOO LC'.
When the SELECT LC command is given, an array called LCLIST, containing the names of all selected load cases, is defined. This array
can then be used in a so-called 'DO-loop' (see command !EXPL !DO for more info about !DO)
or
where 'macroname' is the name of a macro/add-element. The latter version should be used if the commands cannot be fitted on one line.
If the latter case is used, the macro has to start with the line 'GET @NAME' (@=the variable sign).
1. General
2. Geometry oriented drawing
2.1. Drawing the arrangement
2.2. Showing loads graphically
2.3. Drawing mass loads
2.4. Automatic plotting of changed loads
3. Using multiple views
4. Drawing diagrams with PLD
4.1. Plotting stability curves
5. Diagrams with command PLOT
5.1. Frames
5.2. Scaling
5.3. PLOT STAB
5.4. PLOT STR
5.5. PLOT LIMIT
5.6. PLOT GCR, grain criterion
5.7. PLOT WL
5.8. Plotting the ship in the actual floating position
6. Adding drawings to lists
1. General
The loading condition task provides graphic output functions for assisting the definitions and/or to be used in the result documents. The functions
include drawings involving geometry and diagrams related to the calculations. The general diagram drawing function is accessible via the table
calculation module. (command DIAG in TAB)
Using the *VIEW command, the graphic output can be divided into independent parts, allowing the graphic representation of the arrangement and
the loads to be output in one view while GZ-curves or other diagrams are output in other views.
Drawing of the arrangement is based on the general functions provided by commands SETUP and DRW. Except for the additional functions
presented below, their function under LD is the same as in the drawing task. Here, only a short summary of the basic facilities is presented (see
GM manual for info about DRW).
With the SETUP command it is told what views/intersections shall be drawn to show the arrangements. The most common alternatives are deck
plans and profile sections. The task is simplified if the arrangement has been formed by a set of decks, in which case one can refer to the decks.
For examplewh
gives the two first decks of the arrangement and the profile (Y=0.01). For examples, see next paragraph.
Drawing into the setup is done with command DRW. Under LD, the most frequently needed command is DRW ALL, for drawing the arrangement
as specified by the setup. If the current arrangement is a subset of the whole ship, but one wants to show the whole ship in the profile drawing,
one can use
DRAW ARR*A
Loading conditions can be presented graphically by showing the load with colour filling or rasters in arrangement drawings. This function can be
used for documenting the result or as an aid in the loading process. This paragraph presents plotting of loads in compartments - mass loads are
presented below.
To do this, there must be a setup specified, as described above. Command DRW without parameters will draw the current loading condition
according to the setup. Command '!SM FST id' can be used to select the colour map telling what fillings represent different loads, if another one
than the default STD is needed. (See the SM for more info about colour filling standards. )
The command
sets options controlling the drawing of loads. 'option' is a string containing a combination of the following characters:
H (hatch) this option causes partly filled compartments to be marked by an additional hatching in horizontal views, where the filling cannot
be seen otherwise. With HHH, the hatching is done in all views.
P (partial fill) this is an alternative to H for making partial filling visible in horizontal views. The filling is expressed (approximately) by the
fraction of the area filled.
T (turn) by default, the inclination of the upper surface is disregarded when plotting. With this option, the upper level in x- and y-views is
shown with its actual inclination.
W if the compartment is open to sea, show flood water rather than the load
F mark compartments having a free surface moment (z-plans only). See also DRW FRS.
Before rel. 2001, the H option was handled by command FILL SL ON. The following figures illustrate options T, H and P:
The following examples show the same load case in two ways:
Load case shown in SETUP DECK1 (X=13 X=28.4 X=46.2 X=53.2 X=99)
Mass loads can be shown graphically by marking their position and extension, and the type of load can be expressed by colours or text. The
plotting is done with DRW MASS, and the following example shows some of the options.
'size' is the size of the symbol (when not obeying the actual extension) and 'colour' when using a fixed colour. 'options' is string where the
following characters are relevant:
E mark the extension in all directions, default=plot a box withe fixed size
X mark the extension in the x-direction (the most important dimension). If the extension is less than 2*size, it is not marked.
The effect is to redraw a load component when changed. The contour of a compartment is first erased by painting with background colour.
A different way of updating the drawing (new in rel. 2001) is obtained with
This command specifies one layer for compartments and another for mass loads (may be same). The layers are created if missing. The effect is
to plot the loads in the given layers. In addition, the method for updating the plot is different: the layer is first erased and then all loads are
redrawn. The timing is also different: instead of updating the components directly when changed, the plot is updated after the loading condition,
including floating position, has been updated.
Compared with the old way, this method has the following advantages:
NOTE: for manually updating the layers, use DRW UPD;. DRW; (or DRW LOAD;) always plots the old way.
!VIEW 1
PLOT STR
LOAD ...
....
!VIEW 2
PLOT STR
These commands create two views, showing the strength curves for two load distributions. Command
!VIEW +1
For drawing diagrams, the standard PLD command is available. In addition, there are older diagram output functions run with command PLOT,
presented below.
For general information about the PLD command and the associated commands PQ and POO, see Graphics and drawing. This command is
available for drawing functions related to stability (as function of heel) and to strength (as function of x). These are installed as subject ST
(stability) and and SD (strength distribution). Thus, the commands are PQ and and POO are given as
PLD ST is a straightforward application of the PLD command. The following example shows a basic case:
For most purposes, a fixed range, e.g. RANGE=(0,2) is preferable, in order to make different plots comparable.
In the following example, a symmetric heeling range has been used and the quantity DGZ is shown in the diagram:
The argument (first quantity in the PQ command) is FR, which is the same as X but represented as frame numbers. The quantities BEND
(bending moment), SHEAR (shear force), WD (weight distribution) and BD (buoyancy distribution) are plotted as function of x. Note that there are
additional quantities mentioned in the POO. These will not drawn, but the options are ready if they should be added to the PQ.
A legend is drawn (option LEGEND) by which the meaning of the different curves is explained. For quantities BMMX and SHMX the legend is
suppressed - their role is assumed to be understood from the context and the use of the same logical pen as the corresponding actual function.
The option LGTEXT=S defines that the symbols of the quantities are to be used in the legend. Option LGTYPE=IL selects the 'in-line' layout of the
legend.
The RANGE=SYM option specifies that the range obtained from the (possible) other options shall be extended so that it is the same on positive
and negative side. Axes are drawn for the argument (FR), for the weight distribution for the bending moment and the shear force, each with an
own instruction for the location.
The option SYM given for BMMX and SHMX adds the reflected curve.If there are separate minimum limit curves, this option must be removed
and quantities BMMN and SHMN added.
The following example shows bending moments, shear forces and their allowable values:
Diagram showing bending moments and shear forces compared with the allowable values
The following example shows the distribution of the light weight and the total weight, when the cargo spaces of NAPASTAR are loaded:
SET PROF C
DRW ALL
NEW T
PQ SD FR BEND SHEAR
PLD SD POO SIZE=(-3 87 -20 20) FR: RANGE=(-3 87)
5.1. Frames
When the diagrams are to be output as independent drawings, they can be placed into a frame formed by a figure, read from project data base or
system data base. This drawing contains a frame and various additional information such as date and project.
For historical reasons, adding the figure is default. If the diagram is used for interactive work or to be included into a list, the frame has no
function, and can be omitted by option NF (no frame). A different frame can be added by option FIG.
5.2. Scaling
The diagrams are drawn into a drawing area which is defined in connection with the base drawing if one is used, otherwise it can be adjusted by
option SIZE. Default is A4. If no other scaling instructions are given, the scales are selected according to the range of the given functions. If one
wants to have a common scale in many diagrams, or if one simply wants to have a specific scale, it must be defined by one of the scaling options.
PLOT STAB produces the gz-curve and optionally ephi curve for the current load case.
PLOT STR draws functions related to the longitudinal strength. The functions available are:
WG weight distribution
The functions are drawn with argument=x. If option FRN is given, frame numbers are marked. If the option NID is given, the identification texts of
the functions are suppressed. Without options, all quantities are included. Alternatively, those needed can be named in the command, using the
symbols above. A line type can be assigned separately for each quantity, coded in the form symb=code, where code=
1000*thickness+100*colour+dash. For example, WG=302 draws the weight curve with dash=2 and colour 3.
In the same way, a line type can be given with the NET option.
Examples:
PLOT LIM produces a diagram which shows GM/KG-values versus the GM/KG-requirement curve of damage stability. If SELECT LC is given, the
GM/KG-values are taken from the selected loading conditions, otherwise the GM/KG value is taken from the current loading condition. The limit
curve from damage stability is generated and stored in the data base by the last LIST GMT, LIST KGT, PLO GMT or PLO KGT command of DA.
In LD, there is no possibility to know what is the relevant initial condition group or damage case group to generate the limit curve.
Therefore it is the responsibility of the user to be sure that the stored curve is OK.
The option KG plots KG values and KG limit curve instead of GM values and GM limit curve. The option NAME=name plots the named limit curve
(provided it is stored under the given name in DA). If this option is missing, the default curve GM-LIMIT-CURVE or KG-LIMIT-CURVE is plotted.
PLOT GCR plots a diagram showing the parameters of the grain shift criterion. This is the same function as available under grain stability and
presented in GS.2
5.7. PLOT WL
PLOT WL plots a line showing the floating position. There must be a setup active, containing a profile plan. This function should in fact be
available by DRW.
The floating position can be shown by turning the plans in the setup. The profile shows the trim and the x-sections the heeling angle. This turning
is done with the command
Here, trim and heel are expressed in the external units (trim in m, heel in degrees). Under LD, the current floating position is more conveniently
obtained by the service function DR.SETFLPOS and using the variables provided:
!CAL DR.SETFLPOS(ldtr,ldheel,'I')
where the option I tells that the input is in internal units (radians).
Drawing into the setup is done with the normal commands. In the following example, the setup has been turned according to trim. In addition, the
loads are plotted with the T option (turn):
The plan must be an x- or y-plan and is expressed as in the SETUP command. Standard plot option as in POO can be added for controlling the
drawing as a whole (SIZE, POS, FIG, ao).
Result of PLOT FLPOS X=30 L POO BOX (load unsymmetry exaggerated for demonstration)
Inserting into the list is done with the FIG command. A drawing in the data base is referred to by its name, while an asterisk (*) refers to the
drawing currently being made or just finished in the intermediate file. If the drawing has been made directly in the scale suitable for the list, no
scaling option is needed, but normally, the SIZE option is needed. If the proportions in the SIZE option are different from the figure, the tighter
dimension decides the size.
In the following example, a profile drawing and a stability curve are added to a list:
GET LC100
SETUP PROF; DRW ALL : ** draw the arrangement
DRW : ** draw the loads
EDR : ** finish the drawing (NOTE!)
FIG * SIZE 0.15 0.04 : ** adds the drawing to the list
LIS PAR : ** list load components
PLOT STAB NF
general functions related to definition of time and handling events controlling the value of quantities. These are independent of LD but
treated here because presently, this subject is relevant mainly in this context.
loading condition specific tools for treating loading conditions as a function of time
The first group is implemented as service functions of the group AD while the latter belongs to LD.
Table of Contents:
These are the only compulsory columns. If the table treats quantities the additional columns presented below are needed.
The interpretation of the event type may be wholly the subject of the application built on top of the process table. As events directly supported by
the basic functions there are those that control the value of quantities.
The column TIME is optional. If present, the wall time is recorded in this column when the table is updated.
The basic functions of table calculation do not handle logic related to processes, but these are handled by own service functions.
The time may be assigned directly to DAT but normally the original definition of the time is given in the column TIMDEF which is a syntax with the
following alternatives:
time from the reference time directly: a value followed by H, M or S standing for hours, minutes or seconds respectively, e.g. 0.5H, 45M.
wall time in the notation hh:mm optionally followed by a, p, e.g. 12:30, 4:15p.
Note: notation for spanning several days open.
relative time with respect to another event, expressed by the identifier of the event and an optional displacement, e.g. E1, E1+0.5H,
E1-10M. The units H, M and S have the same meaning as above.
the time when a given given quantity reaches a given value. This subject is treated in more detail below.
Updating the times can be started explictly with the service function AD.UPDPROCESS. All service functions relying on a process table make the
update automatically if needed. See below for the requirement concerning sorting of the table.
The process need not be specified in terms of actual clock time, but the time must still be defined so that the time increases when going to later
events, preferably by more than 1 s for each step.
3. Controlling quantities
An event can define the change of a quantity. The quantity can be string valued (e.g. LOAD), in which case the only alternative is to assign a new
value. For real valued quantities, the change may take place at a constant rate between events, and there are therefore more alternatives for
controlling the change.
The value of the quantity controlled must be available in a column in the table. The values may be recorded in the generic columns
Alternatively, the quantity may have a specific column named as the quantity. The main reason for using specific columns is when the table as
such is visible to the user, making the meaning of the values explicit and allowing quantity specific formats and units.
For real valued quantities there may be the associated columns defining the change rate and a maximum value. The corresponding generic
columns are
RAT: rate
MAXIMUM maximum value
The only specific column presently defined for the rate is RATE which is used for VLOAD if present. For the maximum value, the columns VLMAX
and WMAX are used for VLOAD and MASS respectively. If the specific column is not found, the generic one is taken.
The rate is needed for the internal management and is added automatically if not present. It must be declared as a normal column if needed for
input.
The maximum value is needed if relative values are used or if one wants to restrict changes this way.
The column INDEX is reserved for the internal management and added automatically.
If a quantity has a unique meaning in the context, it is sufficient to designate the target of the change by the name of the quantity. The quantity
may also have different values for different objects, e.g. volume of load for different compartments. In this case the column NAME is used as
additional argument so that different combinations of quantity+name mean different functions.
The event types (in column EVTYPE) controlling a quantity have the form t.qnt where 't' defines the type of change and 'qnt' is the name of the
quantity, e.g. R.VLOAD.
The events control the behaviour of the quantity in the time interval following the event, i.e. until a new event concerning the same quantity is
encountered.
The only operation available for a string valued quantity is assignment of a new value which is done by an event named S.qnt, e.g. S.LOAD. The
value is either given by the specific column (LOAD in the example) or by the generic column VALUE.
The result of this table is the same as in the first example, the only difference is that now the rate is the given value and the volume (except for the
first line) is calculated.
To emphsize the central properties of the events, the effect is summarized by the following table:
If all or most of the changes handled by a table concern the same quantity, it can be omitted from EVTYPE and replaced by the quantity QNT in
the table calculation sense, e.g.:
The basic principle of the quantity change events is that one event changes the value of one quantity. If the change is connected to another one
as when moving contents to another tank, the other change must be represented by own events. The connection can be expressed by definitions
in the table so that the times can be connected by references in TIMDEF and the rates can be coordinated by the change type P. The following
example illustrates the basic case:
In the example, the tank R1 is emptied at a rate of -15 m3/h from 12:00 to 14:30. The receiver R2 is handled by the connected events R21, R22.
The effect of the event type P is that the rate of the referenced event is applied. On the line R11, the rate -15 is an input value, on the line R21 it
is derived. There is no separate reference for supporting the P event, it is supposed to be handled by TIMDEF.
In changes controlled by a fixed rate, the time when the change ends can be expressed by the value reached. It is defined in TIMDEF in one of
the following ways:
In the following example, the tank is first filled to 50% and after a 0.5 h pause, to 100 %.
Note carefully that this is possible only when the rate is fixed (preceding event R).
The T and C events are auxiliary events related to a quantity in the same way as other quantity related events. They do not modify the quantity
but generate events that can be used for references. In the C event, the time is given and the function value is calculated, in the T event the time
is calculated.
The T event differs from a time definition of the form presented above in that it is not dependent on the way the function has been defined.
When applying rates and there is a maximum defined for the quantity, the change caused by the rate is interrupted when zero or the maximum is
reached. This also concerns connected changes. The following example is modified from the preceding one by adding a limit for the volume that
restricts the change before
In this example, the change was restricted by the receiving tank being full.
The knuckle in the time function is not available as an event unless explicitly added.
Note: there is no service related to the maintenance of maximum values. The maximum value is not tested for manually input values.
In the function AD.UPDPROCESS sorting of the table according to time can be requested. This would normally also cause the quantities to be
sorted in the correct order. However, if the times are dependent on the values, this may not work.
Having the events ordered according to increasing time is the most natural way, but it may also be useful to have events belonging to the same
quantity collected together. It is recommended that events belonging to the same quantity are identified so that at need, the table can be sorted
according to the identifiers.
constant or follows the specified rate. Thus, the value of a quantity is defined at any time and can be obtained by the function AD.PFUNCTION:
value=AD.PFUNCTION(ptable,qnt,name,time)
'ptable' is the process table, 'qnt' the quantity, 'name' the optional additional argument and 'time' the time. If 'time' is a number, it means the time in
seconds calculated from the reference time. If it is a string, it can be expressed with the same alternatives as in TIMDEF except for references to
values of quantities. Example:
@V=AD.PFUNCTION(LTABLE,'VLOAD','T10','13:10')
The function as a whole can be obtained as arrays containing the argument and the function:
AD.PFUNCTION(ptable,qnt,name,tarr,varr,iarr,funct)
'tarr' is an array for receiving the time arguments, 'varr' for the the function values. 'iarr' is optional and receives the indices (line numbers) of the
corresponding events in the table. With these, other information related to the events can be fetched. Note: some indices in 'iarr' may be zero,
corresponding to arguments added because of a discontinuity.
Example
@tarr=arr(1)
@varr=arr(2)
@AD.PFUNCTION(LTABLE,'VLOAD','T10',tarr,varr)
If it is not known in advance what functions the table handles, this can be inquired with
AD.PFUNCTIONS(ptable,qnt,qarr,narr)
'qnt' restricts the result to instances of the given function. If it is empty, all quantities are taken. 'qarr' is an array for receiving the quantity, narr for
the names, for example
@qarr=arr(3)
@narr=arr(3)
AD.PFUNCTIONS('LTABLE','',qarr,narr)
By adding a receiver for the values and a time argument, the value of all functions at the specified time can be obtained:
AD.PFUNCTIONS(ptable,qnt,qarr,narr,varr,time)
where 'varr' is a real array for receiving the values and 'time' the time as in AD.PFUNCTION.
6. Alternative scenarios
A single table can be used for recording alternative processes. In the typical case, some events in the beginning are common while later there
may be alternative sets of actions.
In the present implementation, one set of actions at time can be selected. It can be done by a parameter in AD.UPDPROCESS or by the column
INCL. If this column is present, only lines where this column has a positive value are included in the update.
When getting function values from the table, the subset used in the last update is taken into account. If the subset is controlled otherwise than by
the column INCL, one must be careful that the table is always updated explicitly with AD.UPDPROCESS.
The relation between items belonging to different subprocesses can be expressed with the column LEVEL. Within a subprocess, the values
increase 1,2... while items with the same value mean start of different subsequences. A subprocess can be designated by giving the last item.
The function AD.SUBPROCESS assigns INCL when given a subprocess this way.
If events are grouped using NODE, the logic described concerns the NODE events while others should have level=0.
The function AD.PTABLEITEMS includes selections related to the set of alternative scenarios:
This subject concerns graphic representation of alternative scenarios contined in a single table as prsented above. The actual output can be
produced with the PLD command or with a macro, but the basis for this is provided by the function AD.SUBPROCMAP, producing the following
information:
There is also the option to store the logical time as the quantity RTIME. The logical time increases with a fixed amount between events.
Result of PLD
The basic function doing this service is LD.FROMPTABLE, generating a loading condition at a given time.
With the function LD.PFUNCTION various properties of the loading condition such as floating position, GM, maximum bending moment, can be
generated as a function of time.
The function LD.UPDATEPROCESS is similar but does changes to the loading table. Its primary purpose is to support processes where the result
may be dependent on the history and not necessary on the explicit loading actions only.
This chapter addresses the question of treating values undefined because the given time is earlier than the first assignment encountered. A
quantity that does not appear at all in the table (e.g load volume of a given tank) will in no case be changed.
The default is to ignore undefined values. This will work correctly if the given loading condition is in the correct initial state with respect to these
quantites,
This can be ensured by adding the formal event INIT to the table, defining the initial loading condition.
There is the option to assign zero or empty to undefined values. The effect on the loading condition depends on the quantity: an empty value for
LOAD is ignored while a zero volume is carried out as such.
These questions can also be handled by making sure that all quantities controlled are given a value from the start.
All loading events are formally defined as the change of a quantity which in most cases belongs to a given compartment or other item (given by
column NAME). As a general property of process tables, values of a quantity can be entered in an own column or in the generic columns FV
(reals) or VALUE (strings).
A load in the compartment given by NAME can be modified by the following quantities:
DENS: density
TEMP: temperature
For a given tank, the quantity expressing the amount of load must be used consistently (either volume or mass). If outflown volues are
treated (in LD.UPDATEPROCESS), the quantity must be volume (VLOAD).
For mass loads the formal location is given by NAME. The following properties can be controlled:
MASS: amount
LOAD: substance
The quantity DES means the whole definition and is intended for introducing new mass loads. The definition should give the substance (e.g.
DEF='STORES 20 (10 0 2)') while NAME gives the formal location. If the table also defines a property the normal way (e.g. by event V.MASS) the
values defined this way override those from DEF. A mass load can be removed by giving DES=empty.
The following quantities change damage related properties of the compartment given by NAME:
7.2.4. Breaches
A breach is defined by the quantity BREACH. The value is a string as in the BREACH command. NAME specifies what breach. The breach need
not exist initially.
7.2.5. Grounding
A grounding is defined by the quantity GROUND. There is always at most one grounding definititon active and the NAME column is not used. The
value is a string as in the GROUND command.
7.2.6. Arguments
DFL deflection
WAVE wave
These events are treated in more detail in the respective contexts, here is a summary:
As an option for managing loading events, the concept of node is provided. This is a formal event with type NODE that collects a number of
individual load operations into a single event. The load operations belonging to the node are identified by having TIMDEF=the identifier of the
node and consequently forced to have the same time. The nodes do not affect the loading as such but are available in AD.PTABLEITEMS,
AD.SUBROCESS and as check points in LD.UPDATEPTABLE.
AD.PTABLEITEMS has been provided primarily for supporting manager applications. It supports the concept of node by the following
sub-functions:
Generating the loading condition at a specified time from a process table is done with the function
LD.FROMPTABLE(table,time,opt)
U as N but do calculations
C use the current state as initial state, ignore a possible INIT event
Note carefully that any property not modified by the table will not be changed.
With the function LD.PFUNCTION the behaviour of the loading condition over time can be studied. In its simplest form, it produces one quantity
into arrays provided in the call:
LD.PFUNCTION(ptable,tarr,varr,qnt)
where 'ptable' is the process table, 'tarr' an array for reciving the time arguments, 'varr' for receiving the function values and 'qnt' the quantity. All
quantities available in the functions LD.QNT or LD.SQNT can be used. Values needing an x-argument can be used by adding the x after a point,
for example BEND.14.
Example:
@tarr=arr(1)
@bmarr=arr(2)
@LD.PFUNCTION(ltable,tarr,bmarr,'BMMAX')
The result is obtained by generating load cases as when using LD.FROMPTABLE and collecting the selected result.
Since the generation of the loading condition and calculating it is the expensive part, whenever there is the need for several quantities, these
should be calculated at the same time. This is achieved by creating a table having the desired quantities as columns, including the column DAT
for the time.
LD.PFUNCTION(ltable,rtable)
The effect is to calculate all valid quantities. Columns not available for the calculation are disregarded without message.
By default, the arguments are taken according to the events in the process table. The simplest modification is to specify a fixed time step or a
number of arguments:
LD.PFUNCTION(ptable,tarr,varr,qnt,astep)
LD.PFUNCTION(ltable,rtable,astep)
The effect is to divide the whole interval covered by the process table into the given steps. With option A, the arguments obtained this way are ad
ded to those obtained from the process table. The arguments can also be defined explicitly by assigning the array tarr or the DAT column in
advance. This is signalled by option I (input).
The following examples are run with default arguments and by specifying a minimum step. The loading condition is modified by moving a single
mass load (two events only).
The loading condition may not be uniquely defined by simply setting the values controlled by the table because of outflown cargo.
It may also be that the floating position is dependent on the initial floating position, as resulting from the previous events.
In these cases loading conditions must be generated in the correct sequence and outflown cargo accounted for. This is done by the function
LD.UPDATEPROCESS and the result is recorded in the process table:
Where needed events are generated for taking into account outflown cargo (named OFLV-i). Any initial events of this type are removed.
The following loading condition properties are recorded in the table if the corresponding columns are available:
The most important one is HEEL which can be used later for giving the correct initial heeling angle for the balancing.
The calculations can be made at every time when the load changes. Because of tide or flow rates there may be the need to do this at additional
times, for which a formal event type CHECK is reserved. The process can be restricted to these events only.
After this, the loading condition can be generated at any time using the basic routine.
8. Short summary
8.1. Columns
Compulsory columns
General:
8.4. Functions
AD.UPDPROCESS(table,opt)
AD.PFUNCTION(table,qnt,name,arec,frec,irec,opt)
value=AD.PFUNCTION(table,qnt,name,time,opt)
AD.PFUNCTIONS(table,qnt,qrec,nrec,vrec,arg,opt)
AD.SUBPROCESS(table,item,opt)
array=AD.PTABLEITEMS(table,set,id,opt)
AD.SUBPROCMAP(table,rdescr,opt)
AD.SUBPROCMAP(table,opt)
LD.FROMPTABLE(table,time,opt)
LD.PFUNCTION(ptable,arg,funct,qnt,astep,x,opt)
LD.PFUNCTION(ptable,rtable,astep,opt)
LD.UPDATEPTABLE(table,time,opt)
1. Output: why are LCB and LCG not on the same coordinate when the ship trims?
2. Output: why relative strength values do not match hand calculation?
1. Output: why are LCB and LCG not on the same coordinate when the ship trims?
When the ship is in equilibrium the sum of the force vectors that are influencing the ship is 0. In practice this means, among other things, that LCB
and LCG should be "on top of each other" in the global coordinate system. When getting these quantities from LD, for example with the service
function ld.qnt():
it can be seen that these values are different when the ship is trimming. This is because NAPA outputs all hydrostatic results in the ship
coordinate system. This is depicted by 2 figures below with the help of a box ship:
The points are on different coordinates when looking in the ship coordinate system
The points are on the same coordinate in the global coordinate system
Between two points in the calculated result curve the relative value at X1+DX is:
R(X1+DX)=F(X1)/L(X1) + DX/(X2-X1)*(F(X2)/L(X2)-F(X1)/L(X1))
where F is the strength quantity (e.g. BEND) and L is the corresponding limit curve and DX < X2-X1. Thus the result matches the hand calculation
F(X1+DX)/L(X1+DX) only at the points X1 and X2. It should be noted that in the latter case the interpolation is done twice. The difference
between the two different ways of interpolation is normally very minimal. Also at locations where the limit curve is constant both approaches give
the same result. The difference in an extreme case is illustrated below. In this case the distance between the points in the strenth results is long
(10 m) and the slope of the kimit curve is high.
Error rendering macro 'toc' : [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ' '
(code 32) (expected a name start character) at [row,col {unknown-source}]: [9043,20]
The command selects/changes the current arrangement. If there is an active loading condition
it is adapted to the new arrangement. See command SKIP for removing the current loading
condition.
ARR arr
This command lists objects in the data base belonging to various categories as given by the
first parameter. Those having the parameter 'options' are based on the general catalog function
(see !EXPL CAT/GEN).
options: selection criterion or other options according to the general catalog function, see !EXPL
CAT/GEN.
options: as above
CATALOG, LGR
CATALOG, OPE
This form uses the general catalog function, but gives no information about opening status.
List catalog of limit curves and limit curve groups, first curves then groups.
CATALOG, WAVE
CATALOG SFCORR
CATALOG ENV
List of envelope curves of strength. Note that some of the listed curves may be out of date. Use
GEN ENV to make sure that results are uptodate.
This command enters the subtask handling definition of the free surface effect.
The command defines a limit curve group which may be used as argument for permissible
strength values.
Example:
The command defines a limit curve for permissible bending moment, shear force, torsion
moment or combined stress.
Example:
This command defines a named group of loading conditions, which can be used when
selecting subsets (see command SELECT). A group defined this way can also be used under
DA.
As above but the name are fetched from the (string) array 'arr'.
The loading conditions fulfilling the given selection criteria are included in the group. See
!EXPL !SEL for the selection criteria. The criterion is interpreted when given and only the the
result is stored.
LGR name
EXAMPLES
LGR MAIN 'Official cases' L10 L50 L100
@r=tp.column('TAB*LOADCASES','ID')
LGR SET1 R()
LGR RECENT SELECT AGE<10
Please note that the GROUP=() selection syntax is not upported with the LGR command.
A table based way to define all openings available in the task. The opening arrangement is a
table with prefix OPE*, each row defining an opening. If an opening arrangement is active, all
separately defined openings are ignored as well as the commands OPENING, EDI OPE, DEL
OPE and COPY OPE. The commands CAT OPE, DES OPE, ROP, IRO and OGROUP work
normally.
OPARR name
OPARR OFF
Deactivate the opening arrangement (the openings defined by the task OPEN become
available).
WT: watertightness of opening. Type of opening regarding its severity in progressive flooding. The
alternatives:
CONN: Pair of compartments connected by the opening. The syntax comp1,comp2 defines the
connection in both directions, the syntax comp1 -> comp2 defines one-directional connection
from comp1 to comp2. Either of the names may be SEA. In DA, the current relevancy of the
opening is checked by the following logic: The opening is relevant if (provided it is not
watertight)
STAGE: flooding stage where the opening is taken into account. The column defines the stage(s) where
the opening is taken into account in calculation of probabilistic damage stability for SOLAS II-1.
The factor s will be zero if the opening is immersed in the specified stage (default: the final
stage). Alternatives: 'name of stage', ALL (all stages) or FINAL (the last stage).
Tank pairs are taken into account in the loading command and when applying the IMO rule for
free surfaces.
The tank pair definitions can be checked with command DES PAIR.
(loc,loc): the name of two tanks forming a pair. A minus sign before the parentheses removes the given
pair, otherwise the pair is added to the current ones. (The parentheses are optional).
PAIR, DELETE;
This command defines the loading priority for a given load, i.e. the order in which
compartments are loaded in absence of explicit instructions. Default=in the order the
compartments occur in the arrangement.
The current priority definition can be checked with command DES PRIOR
load: as above
The command defines one or several supports for a tank. The supports are used in longitudinal
strength calculation to make the weight of the tank to be distributed in the area of the supports.
The portion of the weight on each support can be calculated if the number of supports is less
than three. If there are more than two supports, the total weight is shared equally or according
to explicit input data.
p: (optional) portion of the total weight on the support (%). If the tank has only one support, p is
ignored. If the tank has two supports and both p's are missing (or they are -), the total weight is
divided between the supports according to the center of gravity of the cargo. If the tank has
more than two supports and all p's are missing (or -), the total weight is shared equally. If p's
are given, the total weight is divides between the supports according to them (sum of p's must
be equal to 100%).
Define tank support as a polygonal curve. The weight of the load is divided between the
supports on the basis of the total area under the curves and the shapes of the curves.
p: non-dimensional portion of the total weight on the support at the given x-coordinate.
Delete the given loading condition group from the data base.
UNSAVE SUPPORTS
The name of the current arrangement, loading condition and lightweight are displayed.
The command defines a crane. Crane definition is used in longitudinal strength calculation if a
mass load is attached to it. This way the mass load affects to the weight distribution through
the crane base, whose location and length is given in crane definition.
AC add containers
This command is the same as ADD under CL (container loading), allowing containers to be
added to the current container load without entering CL. For an explanation, see !EXPL
ADD/CL4. A referenced container load with the same name as the loading condition is
automatically made current and saved when the loading condition is saved, else use command
CLA or enter the CL task.
Result: The load components of the added conditions are added to the current one, and a
reference to the loading condition stored. When later reading the current loading condition, the
adding is repeated.
If any of the load components thus added are manually redefined, the new definition will be lost
when reading the loading condition from the data base. If a location exists in several parts, the
last occurrence encountered will be used. The partial loading condition will not be changed in
any way.
Note that only one level of added loading conditions is supported. Thus the possible added
condition in the condition that is being added is ignored.
ADD -part
ADD FIX
The command imports the load components from the added loading conditions to the current
one and the link to the added conditions is removed. Note the special meaning of the syntax
ADD FIX. A loading condition to be added should therefore not be named FIX.
This command defines an airpocket, i.e. a condition regarding the air trapped in a damaged
compartment.
prop=: (opt) defines the fixed quantity: P=pressure, V=volume, A=airpocket, volume*pressure,
default=A
This command changes loads in order to obtain a given floating position. With parameters in
the command it is selected what loads can be changed and with what constraints. The result
may be inaccurate because of limitations in the method or because the result cannot be
achieved with the given degrees of freedom.
BAL loads constraints TRIM=trim HEEL=heel WTR=w WH=w WM=w WC=w MTOL=t F
(load1,load2...): name of loads by which the change is done. As default, loads are allowed to
be moved between tanks, but not changed in total amount. Prefix * allows the amount to
change. For BW or WB (assumed ballast water), permission to change the amount is default.
constraints: (opt)
FIX: keep the total amount of each load fixed, default for other loads than BW.
FREE: allow the total amount of loads change, default for BW.
load>m: set minimum for the total of the load in question. Implies FREE.
load<m: set maximum for the total of the load in question. Implies FREE. NOTE: the maximum
and minimum values concern those tanks involved in the balancing process.
TRIM=trim: (opt) balance to given the trim rather than zero trim.
HEEL=heel: (opt) balance to the given heel rather than zero heel.
WTR=w: (opt) set the weight for the trim target, default=1. An increasing value of w gives more priority to
attaining the given trim compared to the other targets. Experience has shown that influencing
on the partial targets may be easier to achieve by selecting suitable tanks for the operation.
w=0 removes the trim from the target.
WM=w: (opt) similarly for 'minimize total': if amounts may vary, part of the optimization criterion is to
minimize the total.
WC=w: (opt) similarly for 'minimize change': try to keep the changes as small as possible.
MTOL=tol: (opt) relative tolerance for testing satisfaction of mass restrictions, default 0.01.
F: (opt) do not accept a solution not satisfying the restrictions set on the amounts. Default: give
warning 5202.
Examples
BAL (BW)
BAL (HFO)
Minimize trim and heel by re-allocating and/or changing the amount of HFO.
Balance with the aid of HFO and FW, the amount of which is allowed to change, but leaving at
least 500 tons of HFO.
BREACH id definition
BREACH id OFF
BREACH OFF
BREACH ... N
As above but do not update the loading condition. Can be done separately with UPDATE
command or LD.UPDATE.
Change the type of load (substance) while keeping the initial relative load fixed.
old-load: load to be replaced. Alternatives name of load or ALL. If old-load=ALL and new-load other than
IP, only nonempty tanks are changed.
new-load: load replacing old-load, either name of load or IP. IP stands for the load initially defined as
purpose.
tanks: (opt) tanks in which to change the load, default=all currently containing old-load.
EXAMPLE
CHANGE HFO HFO1
CHANGE ALL IP
Change the load type in all tanks to be the one defined as purpose.
This command lists/selects/stores the current container load, as used in the AC and RC
functions. Without parameters, information about current container loads is listed.
CLA name
CLA REP
Create a new container load and add it to the current loading condition.
This command sets rules for automatic update of tables when the loading condition has been
changed or vice versa.
rule-id: identifier for the rule. Its purpose is to control whether subsequent CTU commands define new
rules or replace existing ones. If the name begins with T or F, it has the additional effect of
restricting the application:
F: update also the floating position (quantities HEEL, TR, TRIMX). (Note: only if present in the
table).
W: do no allow change of a component from an added loading condition (when updating LD).
WW: in addition, restore the source table line according to the loading condition.
crit: (opt) selection criterion, e.g. TYPE>L, controls transfers to the table.
EXAMPLE
CTU R1 TAB*CARGO C
CTU R2 TAB*BUNKERS C
CTU R3 TAB*MASSLOADS MA
The loads in compartments are handled by two tables with the relevant compartments already
loaded (no A option). A third table handles all mass loads.
CTU ON/OFF/DELETE
Special cases: OFF: make the set of rules temporarily inactive, ON: cancel OFF, DELETE:
delete all rules.
This command can be applied on mass loads and loads in compartments not in the
arrangement. Other loads are removed by command LOAD 0 'tank'.
DELETE load
Delete the given mass load (or tank that is not in the arrangement).
DELETE load/location
DELETE selection
selection:
DELETE MASS !
DELETE ALL !
Delete all mass loads and all load components not in the arrangements (deck loads etc.)
(load): restrict the listing to the given load, e.g. BW. Special case: MASS: loaded as mass load,
LOAD: loaded by LOAD.
options:
O: (original) display loads as tons or fraction as in the original definition (for loading conditions
made by rel. 93.2 and later)
SIZE: show the extension mass loads using SIZE (default=as originally defined.
DES, case
FRS: current rules for handling of free liquid surfaces. Filling and slack limits are listed too.
name: name of a limit curve or limit curve group. If the name refers to a group, definition of all curves
in the group is listed.
The command saves the current loading condition as a text file containing definition
commands. When run (!add ...) it redefines the loading condition current at the call.
DUMP
opt: options
Without parameters, the editor is entered. With parameters, the command is the same as DES,
except that the result is stored in the editor work area.
The current loading condition is made empty preserving its current arguments.
EMPTY opt
opt: options
GET, name/vers/proj
vers: version (optional) NOTE: SAVE/REPLACE always store under the current version.
The main loading command. This command is used for loading or unloading locations given as
compartments. For loading with the location given as coordinates, use MASS command.
P: if members of tank pairs are encountered, distribute the amount equally into both members.
(default=explicitly mentioned tanks are filled as given)
E: (equally) distribute the given load into all given (or implied) locations in proportion to their net
volume. Note that before Release 2014.2 the moulded volume was used. In 2014.2 this was
changed to the net volume which is used elsewhere in LD as the default volume of
compartments.
IP: (initial purpose) if tanks have previously been loaded with other loads than that specified as
purpose, they are normally treated as if their purpose had been changed. This option makes
the loading command use the initially defined purpose.
SEC: secured grain cargo Comment: the options are placed first in the command in order to
facilitate graphic input of the compartments.
load: (opt) type of load e.g. HFO. If omitted, the same load as the current one is assumed. If the
compartment is unloaded, the type defined as purpose is assumed.
amount: amount of load. By default, the load is expressed as mass (tons) while a value preceded by V=
means volume (m3) and H= means height from the baseline (m)
*frac: fraction of the maximum amount e.g. *1=full. Note that *frac takes the capacity CAP into
account and V=*frac means relative to VNET.
LOC Location
loc1,loc2... The location is given as a list of compartments. If there are several ones, they are
loaded in the given order until the given amount is reached. If two consecutive tanks form the
members of a tank pair, they will be loaded with equal amount.
empty: load into compartments designed for the given load. The compartments are loaded in
priority order. Tanks currently loaded otherwise than with the load specified in the arrangement
are selected acc. to the current load, unless option IP is given.
(old-load): as the preceding case, but the selection is based on tanks containing 'old-load'
instead of 'load'.
DENS=ldens: replace density provided by SM with given value. Standard value restored by
DENS=OFF.
TYPE=type: explicit definition of the load type. TYPE=OFF restores the default type.
CAP=cap: explicit definition of the load capacity. CAP=OFF restores the default capacity.
LPERM=lperm: explicit definition of the load permeability. LPERM=OFF restores the default
permeability.
FILLMIN=f: minimum fill limit (as a percentage of net volume, default=0) used in free surface
rule FMAX. Load capacity is not taken into account. This is secondary definition and it is
changed if the load volume is outside the defined range (FILLMIN and FILLMAX)
GR Loading grain
This form adds a grain load to the given compartment. For all other purposes, the command
works as the normal LOAD command, but there are special options for the amount, and the
grain shift moment will be available, as obtained from the associated grain cargo space
definition.
grain: (opt) load (substance). The given or implied load must be defined with TYPE=GR or GRX. With
GRX, ZM of the load is is taken as CGZ of the compartment for a filled condition.
amount: amount in tons or F=filled, UTE=filled with untrimmed ends, UT=filled, untrimmed.
LOAD OFLV
Special case: change the loading conding according to outflown volume (from damaged
compartments).
Examples:
E Examples
with purpose=FO1.
The purpose of this command is to add loads independently of the arrangement by directly
specifying the weight and the position.
/f-loc: (optional) formal location. It can be given as a comment only or for the purpose of
distinguishing several components with the same load. It appears as quantity NAME in listings.
When this parameter is omitted, a formal location named '(load)' is added.
location: (opt) location of the load (center of gravity). If the weight is given as an increment, the location
must be omitted.
(x,z): as above, but y=0 assumed. Can be used for showing the load in a profile drawing (see
command DRW).
extension: (opt) longitudinal extension (affects longitudinal strength calculations and graphic feedback).
NOTE: the extension is modified if the center of gravity is not between 1/3 and 2/3 of the
length. NOTE: if extension is not given, the default length is VOL/(1.0*BDWL) and the default
density is 1.0 t/m3 for calculation of VOL. This is needed for the calculation of longitudinal
strength.
FSM=mom: (opt) specifies free surface moment for this component, default=0 unless otherwise in the free
surface rule.
descr: (opt) 'room description' a text with the same function as the DES parameter of an ordinary
room.
CRA=crane: (opt) specifies the name of the crane. Used to attach the mass to a predefined crane.
Load containers.
Examples:
MASS PASS 120 (50 0 5)
passengers will be loaded onto the given point
The formal location '(PASS)' is added.
MASS PASS +40 40 tons passengers will be added (same place)
MASS PASS 100 amount of passengers will be replaced (same place)
MASS PASS 120 (50 0 7)
the whole definition will be replaced
MASS PASS 120 (50 0 7) 20 90
as above, but the extension is defined.
MASS PASS/DECK1 100 (50 0 4)
A mass load of type PASS is added with given location.
A preceding load of type PASS is replaced only if
it has the same formal location 'DECK1'
MASS LIFT -500 (150,0,0)
A lifting force is simulated by a negative load.
MASS CRANEMASS 200 (50,0,20) CRA=CRANE1
A mass is added and attached to a crane named CRANE1.
Mass affects to the longitudinal strength based
on the crane definition.
amount: (opt) amount to be moved. Default=move until delivering compartments are empty or receiving
ones full.
->: delimiter, may be omitted if there are two tanks only. A minus sign will also do.
NEW name
Define an opening in the ship through which water can run into the ship or between the rooms
connected by it. In the LD-subsystem one can list data related to immersion of the openings.
See LIST OPE and OUTPUT OPE.
This command specifies compartments that are open to sea. The effect is that the contents of
these will be seawater to the level corresponding to the calculated floating position. NOTE: the
original load is still recorded as the load in the compartment, and the effect of this command is
taken into account in calculations. Whether to show the load or the flood water is dependent on
options in output functions. In LIST PAR, the quantity VFL tells the volume of flood water.
OTS name,name...
This form lists the compartments open to sea, replacing any previous definition.
OTS +name,...
OTS -name,...
These forms change the set: compartments are added or removed depending on the sign,
while compartments not mentioned will keep their status. NOTE: the presence of a sign in the
FIRST item decides this interpretation.
OTS OFF
Outputs the current OTS definition. Compartments for which the OTS state is derived (either
from connections or BREACH) are shown in parentheses and ignored if input.
RC reduct containers
This command is analogous with AC for reducting containers. See !EXPL RED/CL4
RENAME, name !
!: (opt) allow a loading condition with same name to be replaced. NOTE: the check concerns the
run time memory only.
The current loading condition is stored in the data base, replacing a previous definition. For
options, see !EXPL SAVE.
The command defines a reduction to the permeability of a compartment The total permability
(valid in this context!) is formed by this and the steel reduction.
The current loading condition is saved in the data base. If a previous definition exists,
command REPLACE or option ! must be used.
SAVE ! U
U: (opt) update all loading conditions that refer to this one as an added loading condition
SAVE RUNTIME
The effect of this command is that when selecting a new loading (using NEW, GET or TREAT),
this one will not be removed from the run time memory, and can be reactivated by TREAT.
Relevant only if the loading condition is not saved in the data base. SAVE OFF; cancels this
command.
A copy of the current the loading condition is saved in the run time memory under the given
name.
The current loading condition is removed from the run time memory. No questions asked.
A description of the load case is defined for use as additional identification in output lists. Same
command as NOTES.
text2,...: (opt) additional texts, can be listed by selecting LQ LC ... TEXT/2 ...
This command activates a loading condition available in the run time memory (see SAVE ...
RUNTIME). If the loading condition is not available in the run time memory, the effect is the
same as in GET.
TREAT name
3. Calculation arguments
This command handles functions related to the arguments. Without parameters, the current
values are listed.
The given argument set is fetched and assigned as the current standard arguments, i.e.
arguments for new loading conditions. They are also assigned to the current loading condition.
name: name of the argument set. Special case: ARG GET BUILT-IN: same as ARG FACTORY.
/vers/proj: (opt) specifies the source: version and optionally project. Default: project data base if found,
then system data base and last NAPA data base.
The current arguments are saved under the given name in the project data base or in the
specified location. Before saving, verification is asked for. The list 'Fixed arguments' means
those arguments that will be affected, while others keep their default behaviour. For example, if
HULL is not fixed, it will be taken from the reference system.
omit-list: (opt) list of arguments not to be included, list of argument names preceded by -
text: (opt) descriptive text (apostrophes compulsory). See also ARG NOTE.
db: (opt) SYSDB or NAPADB, default=project db. Project specific arguments such as HULL are
automatically removed.
EXAMPLE
ARG SAVE SET1 -HULL -RHO -LIG 'All real modes'
Save the current arguments, excluding the arguments HULL, RHO and LIG.
ARG CAT
Catalog of save argument sets. More parameters can be given as explained by !EXPL
CAT/GEN.
ARG function
Other functions:
function:
INFO: information about the current default arguments In the output 'changed' means
arguments that have been modified manually while 'fixed arguments' means arguments defined
in the set of standard arguments.
Define angle between the stability axis and the x-axis. All stability quantities are calculated in
the plane perpendicular to the stability axis.
AZI a heel
a: azimuth angle (deg). The stability axis makes an angle 'a' with the x-axis on the xy-plane. 'a' is
positive towards the +y-axis and negative towards the -y-axis.
The command defines deformation of the hull, i.e. how much the base line deviates from the
straight line. The deformed hull will be used in calculation of the floating position, stability and
buoyancy distribution for strength. Note that deflection in output of strength and in LIST TLIM is
solely calculated result.
The deformation is defined by (at least three) measured draught values. The program sets a
smooth curve through the given points and calculates its deviation from the straight line going
through the points (AP,TA) and (FP,TF) (trim eliminated). Outside the given points the curve is
extrapolated by the line having the same slope as the smooth curve has at its ends.
DFL d
The deformation is defined by giving the deviation at XREF. The program sets a smooth curve
through the points (AP,0), (XREF,d) and (FP,0) defining the deviation. The curve is bending
upwards (hogging) if d > 0 and downwards (sagging) if d < 0.
DFL 0
No deflection.
FIX ON;
Keep the ship in even keel in calculating the floating position and stability curve. An alternative
way to give MODE FIX.
FIX OFF;
Let the ship trim freely (default). An alternative way to give MODE FREE.
There are three ways to select the method for handling of free surfaces:
Default rule is that all bunkers will be calculated according to IMO (maximum of each group)
and the rest tanks according to REAL (all tanks with real filling).
FRS name
Read the rule from the data base and take it into use.
name: name of the rule definition, definition made in the task FSDEF.
Use the given curve as the total sum of free surface moments.
This form makes direct definition of the free surface rules. The command controls the
calculation of free surface corrections by a set of subrules, each valid for a given set of tanks. If
the subrules overlap, the first rule encountered for a tank is used.
Each subrule is entered as one string of data (apostrophes usually needed), having the
following syntax:
*class: all loads, whose class begins with given letters, e.g. *B=bunkers, *C=cargo.
OTHERS: remaining tanks (in practice, same as ALL because of principle for overlapping
rules).
subgroup: subgroup inside of group (optional). The default depends on 'rule' as presented below.
ALL: all
MAX: rule IMO: maximum moment at 30 deg. heeling from each group; rule R50: maximum
moment at 50% filling from each group; rule MAX: maximum of max. moments from each
group; rule FMAX as rule MAX. Not to be used with explicit moment.
+SLACK: MAX+SLACK
DGZREAL: GM reduction is calculated from the slope of the GZ curve GMRED = GM0 -
d(GZ)/dheel, the slope calculated at the given angle (see info, default 5 deg); GZ correction as
real moment.
LLMAX: (max. acc. to Lloyd's Register for MARPOL 25A) GM corrected by the largest moment
of inertion at even keel, GZ corrected by the real free surface moment using a filling for which
the real free surface moment is a maximum at a 30 deg. angle of heel.
REAL5: real moment for slack tanks, GM correction at 5 deg heel for 98% filling. If filling is less
than 98% REAL will be applied.
FMAX: maximum free surface moment in the given fill range that is defined by FILLMIN and
FILLMAX in the LOAD command. By default, the whole net volume is included (FILLMIN=0 and
FILLMAX=100). GZ correction is based on the actual moment of fluid transfer for each angle of
heel.
info: additional calculation rule, note that only one of the following can be given.
frac: fraction rule (small tank rule). Include only tanks with greater effect than given value frac =
(frs moment)/(lightweight) (m). For subgroups MAX, MAXL and +SLACK, frs moment is
calculated at 30 deg heeling and default value for 'frac' is 0.01m. For other subgroups, frs
moment is calculated at the upright and default value is 0.0m.
angle: the angle at which the slope of the GZ curve is calculated (for the rule DGZREAL).
Default 5 deg.
GZ: use subrule for correction of the GZ curve only. If this info is given in any subrule, free
surface correction for GZ must be totally defined by subrules with info GZ. A subrule with info
GZ does not imply any free surface rule for GM, GM corrections must be defined separately by
subrules having no info GZ.
rule subgroup
--------------------
REAL ALL (=SLACK)
IMO MAX
R50 MAX
MAX MAX
others: ALL
Examples:
If you want to get detailed information of free surface corrections, select the quantities "FRSM"
'FRS' and "FRULE" by LQ and LIST PAR. The column FRSM gives the free surface correction
values for GM as they are after applying the current rule(s). The column FRULE tells you the
way of calculation and whether the FRSM-value is taken into account or not. Interpretation of
the FRULE can be listed with the service function LD.FRULE().
The negative code value means that the frs-value is not taken into account for some reason
arising from the rules. The value 0 is for the rooms not handled in this context. See also
quantity NOTE, giving the explanation as text.
The quantity FRS shows the rule name as interpreted from FRULE.
In one point grounding, the ship has one contact point with the ground. The ship may rotate
freely to all directions around this fixed point. When the grounding force becomes zero, the ship
floats off the ground.
In two point grounding, the ship has two separate contact points with the ground. When the
grounding force is positive at both contacts, the ship may rotate around the axis joining the
contact points provided the floating position is not fixed. If the grounding force becomes zero at
either point of contact, one end of the ship floats off the ground and the case changes to one
point grounding, the contact being at that point having positive grounding force. When both
ends float off the ground, the ship will float freely.
In shelf grounding, the ship has one continuous contact with the ground. The floating behaviour
of the shelf grounding case is the same as that of the two point grounding case having the
contacts at the end points of the shelf contact. Shelf grounding differs from two point grounding
in longitudinal strength calculation: in two point grounding, the grounding forces act at the
contacts and the contact lengths are symmetric with the contact points, whereas in shelf
grounding, the contact length is the length of the shelf contact and the center of grounding
force is between the end points of the contact.
There are two alternative ways to give the grounding data: the floating position after grounding
or the coordinates of the points of contact. The points of contact may be situated anywhere in
the ship and the ground may have any penetration.
xmin,xmax: (optional) range of the contact, min. and max. x (m). Range is needed to distribute the
grounding force in longitudinal strength calculations. Default range is 10% of the reference
length, xmin=x-0.05*lref, xmax=x+0.05*lref.
l: (optional) range of the contact (m). The contact length is centered at the point of contact so that
xmin=x-l/2 and xmax=x+l/2.
TIDE=td: (optional) height of tide. Depth of water at the point of contact is calculated from the floating
position and the normal depth will be (calculated depth)-(tide). Default 0.
TIME=tm: (optional) an alternative way to give tide provided the tide is defined as function of time, see
LD.DEFTIDE. Time 'tm' may be given in seconds (pure number xxx or number ending with s,
xxxs), in minutes (xxxmin) or in hours (xxxh).
x,y,z: point of contact (center of grounding force) in the ship coordinate system (m).
xmin,xmax: (optional) range of the contact, min. and max. x (m). Range is needed to distribute the
grounding force in longitudinal strength calculations. Default range is 10% of the reference
length, xmin=x-0.05*lref, xmax=x+0.05*lref.
l: (optional) range of the contact (m). The contact length is centered at the point of contact so that
xmin=x-l/2 and xmax=x+l/2.
HEEL=h: (optional) fixed heel of the ship. If the option is given, the ship is not allowed to rotate
transversally around the point of contact but its heeling angle is fixed (tranversal support
assumed).
TIDE=td: (optional) height of tide. The current depth of water at the point of contact is d+tide. Default 0.
TIME=tm: (optional) an alternative way to give tide provided the tide is defined as function of time, see
LD.DEFTIDE. Time 'tm' may be given in seconds (pure number xxx or number ending with s,
xxxs), in minutes (xxxmin) or in hours (xxxh).
x1,x2: x-coordinates of the contacts in the ship coordinate system (m). It is assumed that the contacts
have same y-coordinates and the z-coordinates are on the bottom of the ship.
l1,l2: (optional) range of the contact at x1 and x2 (m). The ranges are centered at x1 and x2. The
default ranges are 10% of the reference length, l1=l2=0.1*LREF.
TIDE=td: (optional) height of tide. Depth of water at the point of contact is calculated from the floating
position and the normal depth will be (calculated depth)-(tide). Default 0.
TIME=tm: (optional) an alternative way to give tide provided the tide is defined as function of time, see
LD.DEFTIDE. Time 'tm' may be given in seconds (pure number xxx or number ending with s,
xxxs), in minutes (xxxmin) or in hours (xxxh).
x1,x2: x-coordinates of the aft and fore end of the contact with the shelf (in the ship coordinate system
(m)). It is assumed that the contacts have same y-coordinates and the z-coordinates are on the
bottom of the ship.
l1,l2: (optional) if the ship floats off the ground at one end of the shelf and the contact moves to the
other end, these data are used as contact lengths instead of the whole shelf contact x2-x1. The
contacts are centered at x1 and x2. The default ranges are 10% of the reference length,
l1=l2=0.1*LREF.
TIDE=td: (optional) height of tide. Depth of water at the point of contact is calculated from the floating
position and the normal depth will be (calculated depth)-(tide). Default 0.
TIME=tm: (optional) an alternative way to give tide provided the tide is defined as function of time, see
LD.DEFTIDE. Time 'tm' may be given in seconds (pure number xxx or number ending with s,
xxxs), in minutes (xxxmin) or in hours (xxxh).
x1,y1,z1: coordinates of the first point of contact in the ship coordinate system (m).
x2,y2,z2: coordinates of the second point of contact in the ship coordinate system (m).
l1,l2: (optional) range of the contact at x1 and x2 (m). The ranges are centered at x1 and x2. The
default ranges are 10% of the reference length, l1=l2=0.1*LREF.
HEEL=h: (optional) fixed heel of the ship. If the option is given, the ship is not allowed to rotate
transversally around the points of contact but its heeling angle is fixed (tranversal support
assumed).
TIDE=td: (optional) height of tide. The current depth of water at the point of contact is d+tide. Default 0.
TIME=tm: (optional) an alternative way to give tide provided the tide is defined as function of time, see
LD.DEFTIDE. Time 'tm' may be given in seconds (pure number xxx or number ending with s,
xxxs), in minutes (xxxmin) or in hours (xxxh).
x1,y1,z1: coordinates of the aft end of shelf contact (coordinates in the ship coordinate system (m)).
x2,y2,z2: coordinates of the fore end of shelf contact (coordinates in the ship coordinate system (m)).
l1,l2: (optional) if the ship floats off the ground at one end of the shelf and the contact moves to the
other end, these data are used as contact lengths instead of the whole shelf contact x2-x1. The
contacts are centered at x1 and x2. The default ranges are 10% of the reference length,
l1=l2=0.1*LREF.
HEEL=h: (optional) fixed heel of the ship. If the option is given, the ship is not allowed to rotate
transversally around the shelf contact but its heeling angle is fixed (tranversal support
assumed).
TIDE=td: (optional) height of tide. The current depth of water at the point of contact is d+tide. Default 0.
TIME=tm: (optional) an alternative way to give tide provided the tide is defined as function of time, see
LD.DEFTIDE. Time 'tm' may be given in seconds (pure number xxx or number ending with s,
xxxs), in minutes (xxxmin) or in hours (xxxh).
GRW=(p,s): (optional) width of the shelf towards port side (p) and towards starboard (s) from the average of
y1 and y2
Shelf grounding defined by the contacts with the ground. As above but y1, y2, z1 and z2
assumed zero.
GRO OFF
GRO -
HEEL, SYSDB/NAPADB
Get standard heels from the system data base or the NAPA data abse
HULL,name;
name : name of the hull object The default name is the one defined for stability calculation defined in
the reference system.
The given openings are not relevant. Compare with the ROP command.
IRO op.rgoup;
IRO ALL;
This command selects the lightweight version. Use command LGDEF to enter the lightweight
definition subtask.
LIG, version;
version: use the given lightweight definition. (Initial from REF system if defined, otherwise default=A).
min,max: lower and upper filling limits of tanks. Only tanks whose fillings are between these limits will be
taken account while calculating free liquid surfaces. Default values are 0 and 1 (all tanks).
Define x-limits for longitudinal strength calculation. Longit. strength is calculated for that part of
the ship which is within the given limits. Note that the LIMIT command and results calculated
for the limited ship are not stored in the data base. Note also that the floating position of the
ship is that in which the unlimited ship is floating. If you want to calculate strength for a part of
the ship in that floating position in which the part is floating, use as hull an object which is cut
off at xmin and xmax.
xmin,xmax: x-coordinates where to cut down the weight and bouyancy distributions.
LIM, OFF;
MODE LFIX;
The ship is let trim freely but the liquid loads in tanks have the fixed trim angle 0.0. Default
mode.
MODE, FREE;
The ship is let trim freely and also all liquid loads in tanks have free trim when calculating the
floating position of the ship. The correction of the GZ curve for the tanks having the free
surface rule 'real' are calculated using the free trim mode. The GM correction for the tanks
having the free surface rule 'real' are calculated using the fix trim 0.0.
MODE, FIX;
The ship is kept in even keel in calculating the floating position and stability curve. Calculations
are done accurately.
MODE, ACCURATE;
MODE, FAST
Calculations of the floating position, stability curve and free surface corrections are done in an
approximative (a little bit faster) way. Trim is handled freely. This method was needed only in
the very slow machines and using it is no more recommended. In the fast mode free surfaces
are always calculated according to IMO.
MODE REAL
In this mode, the GZ curve is generated so that it obeys the initially calculated floating position
(as obtained from a normal balancing calculation). In the default mode, the zero point of the
gz-curve is interpolated. This mode is presently supported only when the free surface rule is
REAL.
MODE SRED/NOSRED
With mode SRED, free surface moments for the GM-correction are multiplied by steel
reductions, i.e. MOM=(1-sred)*rho*IY. (Default). The reverse option is NOSRED, i.e.
MOM=rho*IY.
MODE USTR/ISTR
In mode USTR the longit. strength of the ship is calculated with the ship being in the upright
floating position (heel = 0.0). Default. The reverse is ISTR where the calculation is done with
the actual heeling angle.
MODE EVKEEL/TRIM
In mode EVKEEL, the ship is assumed to be at even keel in the upright, i.e. the longitudinal
center of mass is assumed to be equal to the longitudinal center of buoyancy. In mode TRIM,
the ship floats with free trim at the upright (default). If MODE FIX was selected, it is changed to
MODE LFIX.
MODE TWDIR
In this mode the heeling direction during calculation of the GZ curve is varied according to the
direction along which the trim is zero for the current floating position. Additional quantities for
heeling direction, CB and CG are then available in the output for LIST ST. Also the listed
floating position is for the direction having zero trim.
By default, the properties of the substances used as loads are taken from the PAR* tables
associated with the arrangement. With this command a different table can be assigned or the
use of a separate source canceled.
PAR table
PAR SM
Specifies that the table associated with the current arrangement is used (same as if the
parameter not given at all).
PAR NONE
Specifies that no parameters table is used. In this case, it is compulsory to give the density and
indicate whether the load is a liquid. This alternative is not allowed if there is a non-empty
loading condition active.
One can replace 'tank by tank' calculation of free surface moments by an explicit moment
function. The function is polygon-shaped and it must cover the whole heeling range. The same
function defines the free surface moments for the GZ-correction (other angles than zero, at
zero the moment for the GZ-correction is assumed 0) as well as the free surface moment for
the GM-correction (value at zero heeling).
(h,m): heeling angle - moment pair. Note that the polygon must contain heeling 0.0 and the
corresponding moment is used for the GM-correction (moment for GZ-correction assumed 0)
and the rest of the curve is used for the GZ-correction! Note also that the curve is assumed
symmetric with respect to zero heeling if its range does not cover both sides (the range starts
form 0.0). The sign of the moment is ignored, i.e. it always defines reduction.
RESET, ARG;
RESET, VER
RESET, P
The change of seawater density is valid only during the session (default is the one defined in
the reference system).
RHO, density;
The command defines the openings which are relevant in this run.
ROP op.group;
ROP ALL;
Shear force correction is used for calculation of the corrected shear force curve. The corrected
curve is additional output in LIST SD and PLOT STR, it does not affect on other quantities.
CSR: define correction according to IACS Common Structural Rules. The default option is
OPT='DENS RATIO1.2'
HCSR: define correction according to IACS Harmonized Common Structural Rules. The default
option is OPT='DENS RATIO1.2'
rule=table: name of the definition table (use TAB*CSR_MODEL as model table for both CSR and HCSR).
Cargo holds, bulkhead locations etc. are defined in this table. Note that the x-coordinates must
be in ascending order.
OPT: (opt) calculation options for defining non-homogenous bulkheads. The options can be
combined into a single string e.g. GLOBALRATIO1.2
GLOBAL: treat loading condition as homogenous only if all bulkheads are homogenous. If at
least one bulkhead is non-homogenous corrections are applied to all bulkheads.
DIFFxx: difference between relative load volumes (VREL) less than limit (xx)
RATIOxx: ratio between relative load volumes is less than the limit (xx), e.g. 1.2. (see option
DENS)
NODAM: (opt) the correction is used only for the intact loading condition (see option DAM). Without this
option the corrections of the intact case are used also for damage cases without specific shear
force correction definition.
DAM=damage: (opt) the correction is dedicated for the given damage case. (see also option NODAM):
Define correction at given points. At the ship's ends the correction is zero. Between the given
points, correction is calculated linearly. The correction may be different at different sides of the
points. The corrections are located either exactly at the given points (option FIX) or at the
nearest peaks of the shear force curve (FIX omitted). The corrections are taken into account
with sign (option SIGN or ASIGN) or the corrections are always towards zero (SIGN and
ASIGN omitted), i.e. they cut down the peaks (sign of given values ignored). The x-coordinates
must be in ascending order.
SIGN: (opt) take corrections into account with sign. The positive corrections make peaks higher and
the negative corrections make peaks lower
ASIGN: (opt) take corrections into account with absolute sign. The positive corrections move the shear
force curve upwards and the negative corrections move the curve downwards regardless of the
sign of the shear force values.
NODAM: (opt) the correction is used only for the intact loading condition (see option DAM). Without this
option the corrections of the intact case are used also for damage cases without specific shear
force correction definition.
DAM=damage: (opt) the correction is dedicated for the given damage only. (see also option NODAM)
x: position of correction. Exact coordinate (FIX given) or approximative position of nearest peak
(FIX omitted)
SFC OFF
Shear force correction definitions for both intact and all damage cases are removed.
Shear force correction definitions for all damage cases are removed but not the definition for
intact condition.
SFC
SFC DAM=damage
SFC CAT
List catalog of all shear force correction definitions that are associated with the current loading
condition.
Real free surface moments are calculated only for slack tanks. A tank is considered slack if its
filling is between the slack limits. This command changes the limits.
llim: (optional) lower filling limit between 0 and 1, default 0.01. Cannot be less than 0.0001.
The command selects a set of strength limit curves for the current loading condition. The
curves define permissible values for bending moment, shear force and torsion moment.
limcur: name of a single curve or name of a curve group generated by the command LCGR.
DAM=dlim: (opt) use a separate limit curve/group dlim for damaged ship (OTS or a specified damage
case)
STLIM cgroup/DEFAULT
cgroup/DEFAULT: the curve group is used as default curve group, i.e. it is assigned to the new loading conditions.
STLIM OFF
STLIM NONE
Examples:
STLIM HARBOUR
STLIM SEA/DEF
STLIM SEA DAM=DAM
Seawater overflows are part of stability calculation of dredgers. The seawater overflows are
either in 'up' position or in 'down' position. In the position up, height of the seawater overflow is
equal to the z-coordinate of the point or opening defining the overflow. In the position down, the
seawater overflow is lowered to the level of cargo in the compartment.
SWOS UP
SWOS DOWN
This argument is relevant when YREF=ON, i.e. no heeling taken into account. SYTOL defines
the unsymmetry allowed, i.e. how much the y-coordinate of the center of gravity can differ from
zero. If SYTOL is exceeded, no stability calculations can be done.
SYTOL tol
The command defines the minimum and maximum permissible draughts at different positions
of the ship. The deflection is taken into account provided its calculation is possible (I and E
given in the lightweight definition). The actual and permissible values are listed by LIST TLI and
the quantities are selected by LQ TLI. The values are listed at the given x-coordinates.
WAVE name;
angle: angle between the ship's and wave's moving directions. The wave comes from the port side if
angle is positive and the orientation is left handed or angle is negative and the orientation is
right handed. Otherwise the wave comes from the starboard side. The rotation is done around
X=0.
pos + angle In case both a position (POS=x) and an angle (DIR=a) are given the wave is first placed at the
given x-coordinate and then rotated around X=0.
WAVE, OFF;
The command YREF controls whether asymmetry in hull geometry or loading condition is taken
into account or not in stability calculations.
YREF ON
Do not take asymmetry into account. This is normally used when doing rule oriented
calculations.
YREF OFF
(default mode) Take asymmetry into account, i.e. calculate the actual heeling angle. This is
normally used studying the actual behaviour of the ship as the result of different loadings.
In order to have a possibility to make an own output of the LD results, there is a command ASG
that assigns loading condition dependent values to a set of variables. The variables LDDESC,
LDREF, LDNAME and LDDATE are always maintained.
ASG set
HYD: the variables related to masses, volumes, floating position. The same information is
available with the function LD.QNT (see !EXPL LD.QNT).
STR: the variables that are created contain strength data Note! these variables are arrays and
the results need to be calculated with CAL STR unless they are already up-to-date. The same
information is available with the function LD.SQNT.
See the manual for the variables that are assigned with these commands.
ASG AUTO
Makes ASG HYD automatic when the load is changed. Cancelled with ASG OFF.
The command assigns loading condition dependent values to a set of variables. Use !VAR
LIST to see the variables and the corresponding values. The purpose is to give access to this
information in macros. See also !EXPL LD.QNT, LD.SQNT and LD.SQNTX.
ASG HYD
Assign the following variables: LDDISP, LDLCB, LDTCB, LDVCB, LDDWT, LDMX, LDMY,
LDMZ, LDLW, LDLX, LDLY, LDLZ, LDT, LDTR, LDHEEL, LDGM0, LDKMT, LDDGM, LDIY,
LDTRMOM.
ASG STR
Assign the following variables: LDBEND, LDSHEAR, LDSARG, LDW, LDWARG, LDBD,
LDBARG, LDLW, LDLARG.
ASG AUTO
The equivalent to ASG HYD is done whenever the load is changed. LDT, LDTR and LDHEEL
are always assigned.
This command can be used in special cases in order to start calculations normally started
automatically when needed in order to provide the results used in a LIST or PLD command.
CALC
STAB: stability
LQ: (opt) with task STR, limit the calculated quantities according to LQ SD
This command draws loads to the setup ot controls automatic plotting of changed loads.
Alternatives not recognized among those listed below are treated as parameters to the general
DRW command (see !EXPL DRW/G21).
DRW /LOAD/R/UPD/DAM/WL/WAVE/BRE/GRO/
LOAD: draw loads in comaprtments, DRW R; does the same, but first erases the previous load by
drawing the plan with background colour. If the current fill standard (!see !SM FST) is not set or
does not have PURP as key quantity, the default standard is selected. DRW without
parameters is the same as DRW LOAD.
UPD: plots the loads to the layers set by DRW LAY (NOTE!!).
DAM: mark compartments from OTS (open to sea). Options Ci=use colour i, L=add labels
WAVE: mark the wave (if calculations are done in wave), option Ci=use colour i (one digit)
BRE: plot breaches, options R=add raster, Bi=use colour i, D=use dashed line, L=add label. Note
that options need to be given as a single string, e.g. DRW BRE DB2 for drawing breach with
dashed red line.
T: mark draughts in x-plans. Options A,AA=more accuracy, H,HH=larger texts, B, BB=at larger
distance, Ci=use colour i, D=dashed lines, F=font: select font (end with space unless last),
L=add labels, V=plot the texts vertically, K=use draught below keel. Can be set permanently
with DRW TOPT option. Multiple options can be given as a single string, e.g. DRW T DHHC2
DRW AUTO/AM/OFF/?/
AUTO: automatic mode for compartments only or according to the specifications from DRW LAY, if
given. NOTE: if not layers used, O option (see below) forced.
Draw mass loads. By default, mass loads are represented by boxes at the center of gravity. In
other views than the profile, loads not in the section are omitted.
options: (separate items). If no options are given, those given by DRW MOPT are used.
FILL=opt: control filling: fill with given colour (integer) or logical fill code. +code: draw border
also. Special case: PURP: colour according to load.
L=l: size (in ship scale) of box representing the load, default=0.025*LREF (replaced by real
dimensions if E option given)
X: mark x-extension with an arrow. The arrow head obeys the text height.
R: restrict to directly added loads, omitting components from added loading conditions
TH=th: set text height. TH=*th: text height in drawing scale. Default=0.4*L.
NAME=name: select according the formal location. 'name' may contain wildcards (* and ?).
PART=part: draw to the given setup part only,part=index. A part range can be given as
PART=(p1,p2).
Assign options for showing loads in compartments. Note: options set by LD.DRWAUTO
override DRW OPT.
P: alt. to H: use partial filling in z-plans also for showing the filling degree
T: turn the upper water surface to show the actual inclination, (x- and y-plans), default=set
upper level to indicate the amount only.
L: mark the result for GR.IDENTIFY with labels LD, name and load
V: turn the (whole!) view according to the floating position, only if single setup part and DRW
LAY given
E: mark waterline, only with DRW LAY, Ei: draw with colour i (i=1...9)
W: show the inflooded water (if OTS command used), default=show load
A: if the plan is defined with an arrangement as the object, do not plot loads that do not belong
to that arrangement
E: mark the extension in all directions, default=box with fixed size given by l
X: mark the extension in x. Omitted if the extension is less than twice the size of the symbol
used.
Options controlling DRW DAM ... presently only when given LD.DRWAUTO. Concerns marking
of damaged rooms, breaches (flood water plotted in connection with loads).
options:
#nr: use raster code 'nr', default=1001 (transparent). NOTE: must be the last option.
B: include breaches, Bi: plot with colour i, default logical pen BREACH
G: include grounding, Gi: plot with colour i, default logical pen GROUND
This command controls display of loads using layers. It implies DRW ON. Can be temporaily
cancelled by DRW OFF. DRW LAY CANCEL cancels the layer definition. See !EXPL
LD.DRWAUTO for more general alternatives.
OP drawing openings
FIG: represent openings by figures given in the table. With FIG=name, use the given figure.
Default=markers.
MARKER=m: use the given marker, default=2005 (circle with red filling)
DA: take only openings for which there are calculation results
DRW CL parameters
Draw container objects. If no object is given in the command, any container loads in the current
loading condition are drawn.
parameters: (opt) parameters as in the PLOT command of CL, see !EXPL PLOT/CL1.
This command finishes the current drawing, for instance, in order to start a new figure for the
current output list.
EDR option
R: as S, but also redraw the arrangement base drawing, same effect as adding command
DRW ALL FIG.
This command allows a stored drawing or currently made graphic output to be added to the
output list.
This form inserts the last graphic component made in LOAD task. In order to make this
possible, graphic output must be be directed to the intermediate file (!GR F or !GR +F), and the
drawing concerned must be either currently open, or closed but without a new being opened.
The result from the PLOT command is always closed, while command EDR is needed for plots
made by DRW and SETUP.
This is the same function as FILL in in the drawing task, see !EXPL FILL/G22. Note the special
case FILL SL, for controlling marking of partly filled tanks with hatching:
Normally, the program recalculates the results whenever they become out-of-date and stability
is calculated to the weakest side of the ship, i.e. to the side to which the ship starts to list in the
upright. By the FORCE command one may to force the program to run in an abnormal way in
these cases.
FORCE
FORCE ON
FORCE CALC
These three alternatives force the program to recalculate all results every time they are
needed. Recalculation continues as long as the mode is set off by FORCE OFF.
FORCE SB
This alternative forces the ship to list to the starboard side whenever stability is calculated. The
automatic side selection is set on by FORCE OFF.
FORCE PS
This alternative forces the ship to list to the port side whenever stability is calculated. The
automatic side selection is set on by FORCE OFF.
FORCE OFF
The command generates the minimum and maximum envelope curves for the shear force,
corrected shear force, bending moment and torsion. Generation is based on the strength
results stored in the data base (unit 4), i.e. the needed results must be calculated and stored in
the data base for all loading conditions and/or damages and the results must be up-to-date.
The command 'CAL STR DAM=dgr' calculates and stores strength for a single damage or for a
damage group in current loading condition. The envelope curves may be used in output
commands 'LIS SD...ENV=name' and 'PLD SD...ENV=name'. Note that the corrected shear
force curves are available only if all stored results contain corrected shear force curves (i.e.
SFC was defined during calculation of the cases).
NAME=name: name of envelope curves. This name will be referred in 'LIS SD' and 'PLD SD' commands.
LOAD=ldgr: name of a loading condition group or a single loading condition. Note! The loading conditions
must not contain damage definitions (OTS, BREACH).
DAM=dgr: (option) name of a damage group or a single damage. The option will be given if the envelope
curves for all damages in all loading conditions of 'ldgr'.
L+D: (option) If the envelope curves are wanted for damages (DAM=dgr given), the intact strength
curves are added to the envelope curves if this option is given. Default: intact curves are not
added.
This command is primarily intended for use with a setup working as menu. By pointing at a
compartment or mass load, the compartment or load component is identified.
INQ name
INQ (u,v)
In the interactive mode, the distinction between the two forms is made by the system, so that
the latter interpretation is attempted in the first place.
LF line feeds
This command adds one or several empty lines. For other alternatives, see !EXPL LF/GEN.
LF n
This command starts listings of various kinds. If calculation results needed are not up to date,
the LIST command automatically starts recalculation. The command LIST LC is an exception!
Listing according to standard macro is done by LIST .id, macro alternatives are got by LIST
.CAT and
LC Loading conditions
LIST LC tab-opt
List of loading conditions. The command lists selected data for selected loading conditions. The
loading conditions are selected by SELECT LC. By default all loading conditions are included
(as with SEL LC A). The output quantities are selected with LQ LC and the standard table
output options are supported.
NOTE: the listing is based on data stored with the loading conditions. Obsolete or missing data
is not recalculated by the LIST LC command. Loading conditions containing Breach definitions
(BREACH), compartments open to sea (OTS), Grounding definitions (GROUND) and sliding
cargo (load type PMC) should not be reported with LIST LC. The reason is that these
conditions are calculated outside LD and the results are not available in the command LIST LC.
LIST PAR NH
With this command, selected quantities of selected compartments can be listed. The set of
quantities is controlled by command LQ, while the set of compartments can be controlled by
SELECT. The option NH suppresses a possible header telling the loading condition.
G1 FLOAT,FLP,LOAD,LD,TOTAL,CRI,LDD,LW,DW,WTOT,WAVE
LIST sel NH
FLOAT: floating position, option K lists draught below keel instead of moulded draught
FLP: floating position, alt. II. Option D3 gives three decimals for all items. Note! Draughts
measured with heeling angle of 0.0 degrees!
LOAD: summary of loading condition (default). The option SHIFTED lists the centers of gravity
as the are shifted by trim provided the calculation mode of the free surfaces is FREE. Option K
lists draught below keel instead of moulded draught
LDD: list three lines giving the mass and center of gravity of the lightweight, deadweight and
displacement. Option FMT makes the layout and contents coordinated with LIST PAR.
FIELD=*n in TOO not supported. Option FRS includes a column for free surface moment.
DW: list deadweight, giving the mass and center of gravity. Option FMT makes the layout and
contents coordinated with LIST PAR. FIELD=*n in TOO not supported. Option FRS includes a
column for free surface moment.
LW: list lightweight, giving the mass and center of gravity. Option FMT makes the layout and
contents coordinated with LIST PAR. FIELD=*n in TOO not supported.
WTOT: list total weight, giving the total mass and center of gravity. Option FMT makes the
layout and contents coordinated with LIST PAR. FIELD=*n in TOO not supported. Option FRS
includes a column for free surface moment.
DAM: list damage definitions in the loading condition. With option D only grounding, breach and
OTS definitions are listed and with option R only room related definitions (AIRPOCKET and
RPERM) are listed.
NSH: (opt) suppress any additional headers and subheaders (alternative to NH)
ST Stability
List the stability curve and related quantities (selectabled by LQ ST). In addition, the following
variables are assigned, for instance for extending set of quantities using formulas: LDDISP,
LDKMT, LDLCB, LDVCB, LDTCB, LDGM0.
HEEL=(values): output the result at the given arguments. Three reals means the series
(h1,h2,dh), other alternatives are interpreted as given by !EXPL VALUES/GEN.
CA: (calculation arguments) list at the set of heels where the value for gz=0 is included (for
MODE REAL).
NSH: (opt) suppress any additional headers and subheaders (alternative to NH)
List the stability curve and related quantities using alt. output module.
options:
MAXREL: lists the maximum relative shear force and bending moment instead of relative
values at the extreme points of the shear force and bending moment curve
MAXREL=SEP: lists relative values separately for positive and negative side using zero as the
reference level
MID: As a default, the relative values are calculated as SHREL and BMREL. With this option
the relative values are calculated as RELSH and RELBM (using the average of the limit curves
as a reference level)
SD Strength distribution
D=step: equally spaced values over the x-range of the current calculation object, coordinates or
frames
XCAL: list all x-coordinates where the shear force and bending moment distribution are
calculated.
ENV=curv: (opt) add envelope curve values from the stored set 'curv'. The envelope curves are generated
by 'GEN ENV NAME=curv...'.
EXAMPLES
LIST SD (#0 #100 1) (frames id the given range
LIST SD D=#1 TABLE=ONLY
G2 ELE,OPE,OPA,TLI,CST
OPE: list data related to openings. The openings are selected by ROP and IRO and the listed
quantities are selected by LQ OPE.
OPA: list openings using the opening arrangement as source. With option DA (i.e. LIST OPA
DA), list only openings for there are calculation results. The listed quantities are selected by LQ
OPA.
TLI: list data related to the permissible draughts. The quantities are selected by LQ TLI. The
x-coordinates are taken from the definition data of the permissible draughts.
CST: list combined stresses. Listing of combined stresses requires that the stress
concentration factors and influence factors are defined (see the commands IFFR, IFHA, ALF
and GEN IFTAB in LIG). The quantities are selected by LQ CST.
tab-opt: (opt) standard table output options (see !EXPL TOO/GEN). This command lists selected data
for shear force corrections when the common structural rules SFC CSR option is used. For the
quantities SHEAR, SFC and SFCORR a string qualifer AFT or FWD should be used to specify
the bulkhead. Without the qualifier the absolute maximum for the hold is listed. See !EXPL LQ
for details.
options: (opt)
LIST B/R/T/CT C
Same LIST B, LIST R, LIST T or LIST CT under container loading, see !EXPL LIST/CL1. The
list options (LQ, TOO) must be set under CL.
C: if there are many container loads, combine them into one before listing.
LIST CL ...
This command selects the quantities listed by LIST PAR, LIST FRS, LIST LC, LIST SD, LIST
ST, LIST ELE, LIST OPE, LIST TLIM, LIST CST, LIST SFC, OUT LOA and OUT STA.
LQ subj selection
selection: the syntax is the same as in the standard command (see !EXPL LQ/GEN).
In the quantities for LIST PAR, note carefully the difference between parameters of the
compartment (e.g. CGX, PURP) and parameters of the load (e.g. XM, LOAD). The following
qualifiers are available for MASS in LIST LC (summary of loading conditions):
For quantities BMMAX, BMMIN, SHMAX, SHMIN, qualifier A gives the allowed value at the
same x-coordinate as the minimum or maximum. BMREL and SHREL (percent bend or shear
with respect to allowed values) gives the larger one of the minimum and maximum values,
unless specifically selected with qualifiers MIN or MAX. NOTE! Since release 2010.1 BMREL
and SHREL are calculated as global maxima. The local maxima at the x where the minimum or
maximum of the curve occurs can be obtained with qualifier LOC (or LOCMAX and LOCMIN).
For local strength quantities (BEND, SHEAR, SFCORR and TORS) the location X is specified
with a qualifier. Note that the default is 0.
For T, TA, TF and TFIX, qualifier K gives draught below keel. In LIST PAR, qualifier N for GRM
gives moments without correction factors.
In LIST SD, the name of the limit curve can be selected by a string qualifier for the minimum
and maximum permissible values (e.g BMMN and BMMX).
In LIST SFC, qualifiers FWD and AFT can be used to select the bulkhead for quantities
SHEAR, SFCORR, SFC, SHMN and SHMX. For the quantity MASS the component can be
selected with a string qualifier LOAD, DBTCSR and FLW for mass of the load, effective mass
in double bottom tanks and mass of the floodwater. The double tank specific masses can be
listed with qualifiers DBTCSRx, where x is the number of the tank in the DBTCSR string in the
CSR definition table.
This command makes the subsequent output an independent list. It also allows a number of
options to be set regarding headers, margin etc. See !EXPL NL/GEN.
NP new page
Write out results of the current loading condition (default) or of a set of loading conditions
selected by SEL LC. Feature to be deprecated, please use LIST command instead.
OUTPUT component1,component2,...,options
Write out a list which is composed of the given components. The component list in the
OUTPUT command is any set in any order from the underlying alternatives. The parameters
attached to the component (if any) are put in parentheses, e.g. OUT
ARG,LOAD(ORD(HFO,LO),NOLIG). The list component alternatives are:
LOAD: write analysis of the loading components location by location. The quantities to be written are
selected by LQ LOA. The parameters of LOAD are:
This commands plots stability or strength data using the general diagram output module. The
quantities to be included are controlled with command PQ while the graphic result can be
controlled with command POO.
This command draws the gz-curve and related data as function of heel.
option: (opt) standard plot output options in addition to or replacing those given with command POO.
ENV=curv: (opt) add envelope curves from the stored set 'curv'. The envelope curves are generated by
'GEN ENV NAME=curv...'.
option: (opt) standard plot output options in addition to or replacing those given with command POO.
Note: option * (continue in the DIAG task) works only partially.
The old PLOT command will soon be deprecated. Please use the new diagram plotting (PLD)
instead. Note that other diagrams can be made by using option TABLE in LIST LC, LIST ST or
LIST SD commands, and then entering diagram drawing via command TAB.
PLOT .id
This command controls the graphic result produces by PLD ST and PLD SD. For the
parameters of the command, see !EXPL POO/GEN. The subject is ST (default) or SD.
This command controls the quantities to be included in PLD ST and PLD SD. The parameters
of this command are identical with those of LQ (see !EXP LQ/GEN). The subject is ST (default)
or SD. Note: for subject SD, formulas cannot be used in the PQ.
For quantities BMMX and SHMX, a string qualifier is interpreted as the name of limit curve.
SCAN L
SCAN S
Enter scanner, send the last list to the printer and return to LD.
This command selects a subset of compartments for LIST PAR or a subset of loading
conditions for use in LIST SUM or UPDATE ALL commands.
SELECT crit
crit: selection criterion in standard form (see !EXPL SEL/GEN). The selection can be based on any
valid quantities (for a list, use command LQ ALT). In the case SELECT LOAD=(....), the order
given is relevant.
EXAMPLES
SELECT PURP=HFO OR LOAD=HFO
Select compartments that are loaded with HFO or designed for HFO.
SELECT LCLAS>B
SELECT MASS>0
This form selects a set of loading conditions. In addition, the array LCLIST is assigned the
resulting list of loading conditions. This list can be used in the !DO command: "*DO
'...%NAME...' NAME=LCLIST". SELECT LC OFF cancels the effect.
A: (opt) select loading conditions belonging to any arrangement, default=to current only.
NAME>nnn: (opt) select only loading conditions, the name of which begins with nnn. The invert selection
can be done with -NAME>nnn
NAME<nnn: (opt) select only loading conditions, the name of which contains nnn. The invert selection can
be done with -NAME<nnn
GROUP=(g1,g2...): select only loading conditions belonging to one of the given groups.
EXAMPLE
SELECT LC NAME>LC
SELECT LC OFF
This is the same command as in the drawing task, and defines what views of the arrangement
shall be used for graphic display. See !EXPL SET/G20. The special option SET R; can be used
to repeat a setup after having closed a drawing.
This command controls the layout of LIST PAR, LIST LC, LIST SD and LIST ST.
This command allows addition of any other text desired to the output list.
TYPE text
text: text to be printed. It will be reproduced exactly as entered, except for special syntaxes
presented under !EXPL TYPE/GEN.
This command updates data in order to take into account changed load parameters or
geometry, made either during the current run or between a loading condition was stored and
retrieved. The command can be applied on the current loading condition or on stored ones. In
the latter case, the current loading condition is replaced.
Simply update run time data. Normally not needed, because return from tasks SM, LPD or DEF
will usually start the update automatically.
UPDATE ALL F U
This command concerns all stored loading conditions belonging to the current arrangement
and version. In the form UPDATE LC ..., the operation concerns the loading conditions
selected with SELECT LC, if given, else all.
F: (opt) Force, update all. Default=update those made obsolete by geometric changes.
U: (opt) update also all dependent loading conditions automatically without a query.
The program is commanded to display the current floating position after every loading
command.
The command YREF controls whether asymmetry in hull geometry or loading condition is taken
into account or not in stability calculations.
YREF ON
Do not take asymmetry into account. This is normally used when doing rule oriented
calculations.
YREF OFF
(default mode) This is normally used studying the actual behaviour of the ship as the result of
different loadings. Take asymmetry into account.
A Cross-sectional area
To add contribution of the shear deformation to the quantities 'slope' and 'deflection',
cross-sectional area of steel is required. If this data is missing, the shear deformation is
ignored. Shear deformation = integral(SF/(kAG))dx, where SF is the shear force, k is the shear
coefficient, A is the cross-sectional area and G is the shear modulus (G=E/2.6 for steel and
aluminium).
A a
The command defines the stress concentration factor for each frame (or column) of the
influence factor table. The number of stress concentration factors must match the number of
frames (or columns) of the influence factor table. The stress concentration factors cannot be
given before the number of frames is defined by the command IFFR or generated influence
factor table.
ALF a1,a2,...ai,...
ALF
CATALOG alt
Note that, if the lightweight distribution curve is defined by DIST DIM (user defined dimensional
distribution) or the curve comes from the weight calculation subsystem, x is calculated from the
distribution curve and lightweight elements. Also y and z are calculated from the distribution
curve and lightweight elements provided that the distribution in y- and z-direction are defined.
The data items are updated at exit from LIG.
CG, x, y, z;
The center of twist is a curve with respect to which the tranversal moments for torsion are
calculated. The default line is x-axis.
CTW (x,y,z),(x,y,z),...
Center of twist as a polygon going through the given points. Outside the range of the curve, the
center of twist is extrapolated by its first or last point.
x,y,z: point in the ship coordinate system. The x-coordinates must be given in ascending order.
List lightweight version. If version is not given the current version will be used.
List lightweight elements. If name is missing all lightweight elements will be listed.
DESC, DIST;
DISTRIBUTION , ELEM;
ELEM : sets the lightweight distribution to be calculated only from the lightweight elements defined
DISTRIBUTION , USER;
USER : The user defined undimensional lightweight distribution will be used. The distribution must
once have been defined as presented below.
DISTRIBUTION ,u ,v ,u ,v ,...;
Defines the shape of the user defined undimensional lightweight distribution curve
v : The dimensionless weight value (0...1) When the lightweight distribution curve is used the
dimensions of the curve will be calculated as follows: -the extreme ends of the curve will be set
at the extreme ends of the ships hull -the curve shape will be adjusted to correspond to the
weight and centre of the total lightweight minus the weight of the lightweight elements
DISTRIBUTION , DIM;
DIM : The user defined dimensional lightweight distribution will be used. The distribution must once
have been defined as presented below.
The commands define the shape of the user defined dimensional lightweight distribution curve.
The first alternative defines only how weight is distributed in x-direction, distribution in y- and
z-directions are undefined. The second alternative defines the distribution in all directions.
E Modulus of elasticity
Modulus of elasticity of material (N/mm2). The value is used in deflection calculation (slope =
integral of M/E*I, deflection = integral of slope). Default 207000 N/mm2.
E e;
Same as DES, except the result is stored in the editor work area.
xa,xf: (opt) aft and fore limit of the element. If the limits are not given the length of the element will be
2 meters. Alternatively, xa and xf may be replaced by (l), where l is the length of the element. In
this case the limits are placed symmetrically.
All the lightweight elements defined will always be added to the distribution curve regardless of
the type of distribution used.
Special case: use the given table as source for lightweight elements. Possible directly defined
elements will be discarded.
ELEM DIRECT
Cancels ELEM FROM table. The current element will be recorded as directly given.
Returns to the loading level without storing the current lightweight version into the data base.
This command transfers data between the current lightweight definition and tables containing
elements and/or enters table calculation.
ETAB
With no parameters, table calculation is entered with a work area named ELE and prefix ELE*.
If there is no table already current, a table named ELE*ELEMENTS is read or created.
ETAB P
As above, but the table is updated with the current lightweight elements.
ETAB G
Get the lightweight elements from the table currently in the ELE work area.
Store the elements of the current lightweight definition in the given table.
EXAMPLES
ETAB
Copy the elements of the table ELE*ELEMENTS to the current lightweight definition.
Combined stress or total equivalent moment for the given frame is calculated from the equation
MSTOT = ABS(BM*ALF)+ABS(SUM(TMOM*FI))
where BM is bending moment and ALF is stress concentration factor at the given frame,
TMOM is the local torsion moment, FI is influence factor from the influence factor table for the
given frame and summation goes over the length of the ship (given hatches). The influence
factors FI are read into the system through a table called INFLUENCE_FACTORS. The table is
normal table for the table calculation task (TAB) and it may be created and modified by the
means of TAB independently of the LIG task. This command creates a model table having the
right number of columns (defined by IFFR) and rows (defined by IFHA) and filled with zeros.
The user's task is to fill the table with right factors and save it in the data base. Note that the
commands IFFR and IFHA are used only for creating the model table, afterwards the number
of columns and rows and their order may be freely changed in TAB.
GEN IFTAB !
A given lightweight version is fetched from the data base and made current.
GET, id
I (x1,i1),(x2,i2),...;
If the function does not cover the whole length of the ship, the function is extrapolated by the
first and last values of the polygon.
The command defines a set of frames (or x-coordinates) which are used in generating columns
for the influence factor table (see the command GEN).
IFFR fr,fr,...
fr: frame number (prefix #) or x-coordinate (without #). Give frames in ascending order.
IFFR
The command defines a set of hatces (or x-coordinates) which are used in generating rows for
the influence factor table (see the command GEN).
IFHA x,x,...
IFHA
K Shear coefficient
To add contribution of the shear deformation to the quantities 'slope' and 'deflection', the shear
coefficient is required. If this data is missing, the shear deformation is ignored. Shear
deformation = integral(SF/(kAG))dx, where SF is the shear force, k is the shear coefficient, A is
the cross-sectional area and G is the shear modulus (G=E/2.6 for steel and aluminium).
K k
Same as END.
LD;
NEW, version;
Exit the lightweight definition process. The definitions made will be stored in the data base.
Replace is executed if a lightweight with the same name exists.
OK;
The current lightweight elements are plotted. Each element is represented by a trapezoid. Its
lower z-limit is taken height of the center of gravity and its height expresses the weight/m. A
drawing with default scaling is opened if none is open at the call. (Use !GR EDR if needed to
get rid of an already open drawing).
scl: (opt) scale factor for converting weight/m to ship scale, default=1
fill: (opt) string (note!) passed as parameter to the FILL command of the drawing task (!EXP
FILL/DR). Default=RND, i.e. random filling.
This command updates or lists the default lightweight version in the reference system. The
same can be done also in the REF task.
REG id PERM
REG DELETE
REG LIST
RENAME, version;
REP, vers;
vers: (optional) lightweight version. The current working version is replaced with current or given
name.
SAVE, vers !
vers: (optional) lightweight version The current working version is saved with current or given name.
TEXT,text;
Note that, if the lightweight distribution curve is defined by DIST DIM (user defined dimensional
distribution) or the curve comes from the weight calculation subsystem, the total weight and its
range are calculated from the distribution curve and lightweight elements, the data items are
updated at exit from LIG.
xa,xf: (optional) x-limits of the distribution range. Total lightweight minus lightweight elements is
distributed between these limits. Default limits are the extreme x-coordinates of the calculation
hull. Note that the total weight distribution may exceed these limits if there are lightweight
elements or loads which are partly or totally outside the range. The limits alone do not define a
distribution.
Lists catalog of definitions stored in the data base. The command is based on the general
catalog function (see !EXPL CAT/GEN).
CAT
DES, name
name: (optional) name of definition, default the current name (assigned by GET , NEW or REN).
DES name/vers/project
DES name/vers/unit
Edit definition data in input format. Note that only the current definition can be edited.
EDIT, name;
name: (optional) name of definition, default the current name (assigned by GET , NEW or REN).
END;
Define explicit exceptions to the rule or generate exceptions from the curent loading condition.
These exceptions are transferred to load properties when the rule is taken into use in LD.
rule: free surface rule (see !EXPL FRS) or explicit moment, OFF can be used to remove single
exceptions.
EXCEPTION GEN
Generate exceptions from current loading condition. Previous exceptions are removed first.
EXCEPTION OFF
Default rule is that all bunkers will be calculated according to IMO (maximum of each group)
and the rest tanks according to REAL (all tanks with real filling). Other rules may be given in
following way:
The former command controls the calculation of free surface corrections by a set of subrules,
each valid for a given set of tanks, the latter one gives the total sum of free surface moments
as an explicit function. If the subrules overlap, the first rule encountered for a tank is used.
Each subrule is entered as one string of data (apostrophes usually needed), having the
following syntax:
*class: all loads, whose class begins with given letters, e.g. *B=bunkers, *C=cargo.
OTHERS: remaining tanks (in practice, same as ALL because of principle for overlapping
rules).
subgroup: subgroup inside of group (optional). The default depends on 'rule' as presented below.
ALL: all
MAX: rule IMO: maximum moment at 30 deg. heeling from each group; rule R50: maximum
moment at 50% filling from each group; rule MAX: maximum of max. moments from each
group; rule FMAX as rule MAX. Not to be used with explicit moment.
+SLACK: MAX+SLACK
DGZREAL: GM reduction is calculated from the slope of the GZ curve GMRED = GM0 -
d(GZ)/dheel, the slope calculated at the given angle (see info, default 5 deg); GZ correction as
real moment.
LLMAX: (max. acc. to Lloyd's Register for MARPOL 25A) GM corrected by the largest moment
of inertion at even keel, GZ corrected by the real free surface moment using a filling for which
the real free surface moment is a maximum at a 30 deg. angle of heel.
REAL5: real moment for slack tanks, GM correction at 5 deg heel for 98% filling. If filling is less
than 98% REAL will be applied.
FMAX: maximum free surface moment in the given fill range that is defined by FILLMIN and
FILLMAX in the LOAD command. By default, the whole net volume is included (FILLMIN=0 and
FILLMAX=100). GZ correction is based on the actual moment of fluid transfer for each angle of
heel.
info: additional calculation rule, note that only one of the following can be given.
frac: fraction rule (small tank rule). Include only tanks with greater effect than given value frac =
(frs moment)/(lightweight) (m). For subgroups MAX, MAXL and +SLACK, frs moment is
calculated at 30 deg heeling and default value for 'frac' is 0.01m. For other subgroups, frs
moment is calculated at the upright and default value is 0.0m.
angle: the angle at which the slope of the GZ curve is calculated (for the rule DGZREAL).
Default 5 deg.
rule subgroup
--------------------
REAL ALL (=SLACK)
IMO MAX
R50 MAX
MAX MAX
others: ALL
Examples:
If you want to get detailed information of free surface corrections, select the quantities "FRSM"
and "FRULE" by LQ and LIST PAR. The column FRSM gives the free surface correction values
for GM as they are after applying the current rule(s). The column FRULE tells you the way of
calculation and whether the FRSM-value is taken into account or not. Interpretation of the
FRULE can be listed with the service function LD.FRULE().
The negative code value means that the frs-value is not taken into account for some reason
arising from the rules. The value 0 is for the rooms not handled in this context.
GET, name
GET, name/vers/project
GET, name/vers/unit
min,max: lower and upper filling limits of tanks. Only tanks whose fillings are between these limits will be
taken account while calculating free liquid surfaces. Default values are 0 and 1 (all tanks).
NEW name
NOTES
NOTES EDIT
NOTES DELETE
OK;
REN name
The command replaces the definition data in the data base. Note that as a default the definition
is saved to the current version in the project database.
REP, name;
name: (optional) name of definition, default the current name (assigned by GET , NEW or REN).
REP name/vers/unit
REP name/vers/project
unit: data base unit; project data base 1, DB1 or PROJDB; system data base 2, DB2 or SYSDB;
NAPA data base 7, DB7 or NAPADB.
The command saves definition if it is a new one in the data base. Note that as a default the
definition is saved to the current version in the project database.
SAVE, name !;
name: (optional) name of definition, default the current name (assigned by GET , NEW or REN).
SAVE name/vers/unit
SAVE name/vers/project
unit: data base unit; project data base 1, DB1 or PROJDB; system data base 2, DB2 or SYSDB;
NAPA data base 7, DB7 or NAPADB.
SKIP
Real free surface moments are calculated only for slack tanks. A tank is considered slack if its
filling is between the slack limits. This command changes the limits.
llim: (optional) lower filling limit between 0 and 1, default 0.01. Cannot be less than 0.0001.
The command deletes the given free surface defintion from the data base.
UNSAVE, name
name: (optional) name of definition, default the current name (assigned by GET , NEW or REN).
UNSAVE name/vers/unit
UNSAVE name/vers/project
7. Service functions
The function value is the name of the current loading condition if any, else empty.
The function value is the descriptive text (from command TEXT) of the current loading
condition (one line only).
LD.NOTE()
LD.NOTE(s)
LD.NOTE(text1,text2,...)
The function value is the name of the arrangement of the current loading condition.
This function give reference numbers to the descriptions of the current loading condition.
Provided for special cases. The function value is 0 if there is no current loading condition.
descr=LD.WORK(alt)
WOR: work description containing parameters of the loads, contents similar to LQ PAR
(default)
The function lists data for work records. Provided mainly as support for developers.
LD.RARR()
refnr=LD.RARR(rec)
LD.RARR(rec,0)
This function returns 1 (=true) if the given item has been changed but not stored. 0=not
changed, -1=none current.
chg=LD.STATUS(alt)
The function returns parameters of individual load components or totals of these. The totals are
calculated according to built-in sum rules. For LOAD, LTYP, LCLAS, DENS, TEMP the total is
the common value if all values are equal. See !exp Q.id/LD for more information on the quantity
'id'.
value=LD.LQNT(quantity,comp,options)
NAME: name
DES: description
XMIN: minimum x
XMAX: maximum x
YMIN: minimum y
YMAX: maximum y
ZMIN: minimum z
ZMAX: maximum z
TEMP: temperature
DENS: density
LCAP: capacity
Derived properties
IX: Iy of the surface (m4) Only for normal liquid loads, special cases like PMC not considered
MOM: ...
GMCORR: gm-correction
criterion: selection criterion in the normal syntax, e.g. LOAD=BW: return total over the subset
selection: integer array giving a list of compartments, for which the total is returned. Can be
obtained by LD.SELECT.
opt: options:
L: 'name' represents the load type (intended for mass loads), assumed to be unique.
F: for numeric values: output the result as a string obeying the quantity standard (format and
unit). Default=output as number.
EXAMPLES
@ld.lqnt('RHO','R601')
@ld.lqnt('MASS','PASS','L')
Return the load description of the tank with DES='Day tank 1'
@ld.lqnt('MASS')
@ld.lqnt('MASS','','M')
@ld.lqnt('MASS','LOAD=BW')
@nrec=ld.lqnt('NAME','','R')
The function returns an array containing a list of load components satisfying a given criterion.
The result can be used, among other things, in the functions LD.LQNT, LD.LOAD, LD.MASS,
LD.MOVE, LD.DELETE. See also LD.FITVOLUME.
arr=LD.SELECT(crit,opt)
The result is returned in an array reserved internally and reused if the call is repeated.
opt: options:
L: return LOAD
D: return DES
LD.SELECT(crit,arr,opt)
Otherwise as above, but the result is returned in the array provided in the call, which may of
type integer (for indices) or string (for names).
iarr=LD.SELECT(sarr,opt)
Special case: converts a list of names to indices. Names not in the loading condition are
omitted.
opt: options:
EXAMPLES
@LIST=LD.SELECT('','ATN')
@LIST=LD.SELECT('LOAD=HFO')
@HFOTANKS=ARR(3)
@LD.SELECT('LOAD=HFO',HFOTANKS)
@MLOADS=ARR(3)
@LD.SELECT('',MLOADS,'ML')
Return a list of all mass loads (option M), represented by LOAD (option L).
Function returns the list of loading conditions that have been selected with the SELECT LC
command. Function value is the number of selected loading conditions. volume.
n=LD.GETLCSEL(lcarr)
lcarr: string array for receiving the names of the selected loading conditions
From a given set of alternatives, the function selects one or several tanks so that the total
capacity is as close as possible to a given volume.
list=LD.FITVOLUME(tanklist,volume,nmax,fill,opt)
list: record containing the result (list of tank names). The record is reused at the next call.
Empty=the volume is too large to be loaded under the given conditions.
tanklist: string array containing the list of available tanks (tank names). The list can be generated with
LD.SELECT (option N).
fill: used if option F given: fill to the given filling degree, default=apply the currently valid VLMAX
opt: options:
F: apply 'fill'
S: prefer fewer tanks at the expense of slightly larger residue, SS, SSS=stronger. For each
additional tank, a fraction of 'volume' is added before comparing the residue. The fraction is
0.001 for S, 0.01 for SS and 0.05 for SSS.
residue=LD.FITVOLUME(tanklist,volume,nmax,fill,list,opt)
Otherwise as above, but the array for receiving the result is given in the call. The function value
tells in this case the unused volume in the resulting set.
The function returns the moments of inertia and the center of gravity of a load component or a
set of load components.
LD.MI(sel,res,x,y,z,rdesc)
index: index
res: real array for receiving the result, total if many components.
res(1...3): IXW,IYW,IZW
res(4...6): IYZW,IXZW,IXYW
rdesc: (opt) description for receiving data for the individual components. In the order listed above, the
records are 2331,2332,2333,2361,2362,2363,5401,5402,5403,5340.
EXAMPLE:
@res=arr(2)
@ld.mi(0,res)
Return total moment of inertia for all loads, reference point (0,0,0)
@ld.mi(0,res,xref,0,zdwl)
@list=ld.select('','M')
@ld.mi(list,res)
The function returns the value of a quantity representing an aspect of the current loading
condition as a whole like weight, centers of gravities, floating position, GM. See LD.ARG for
arguments, LD.SQNT for strength related quantities. Data related to criteria can be obtained by
combining the functions CR.COMMAND and CR.ASSIGN.
value=LD.QNT(quantity,opt)
DISP: total displacement=total weight. In case of damaged compartments, these values give
the state before the damage
DW: deadweight
LW: lightweight
GM0: GM (solid)
KGL: virtual KG
MOM: free surface moment for GM reduction as specified by the free surface rules (argument
FRS)
TRIMOK: TRIM compared with TRLA,TRLF: 1=ok, 0=not. If no trim limits, the MINGM is used:
0K=value obtained.
opt: options
F: output the result as a string obeying the quantity standard (format and unit)
C: (for TA, TF): return as readings on the standard draught mark curves
D: (for TA, TF and TX): take deflection into account (see command DFL).
/name: for T: return a reading on the draught mark curve 'name'. The slash may be preceded
by other options.
EXAMPLES
@gm=LD.QNT('GM')
!TYPE @LD.QNT('HEEL','F')
@LD.QNT('TA','KC')
Get the draught aft below keel (option K) and as read from the draught mark curve.
@LD.QNT('T','F/DRMC1')
The function returns the value of a quantity related to the longitudinal strength and describing
the loading condition as a whole in contrast to quantities valid at a specified x (see
LD.SQNTX).
value=LD.SQNT(quantity,opt)
BMREL: greatest relative bending moment. At both limits BMREL is 1 (100%) and at BM=0
BMREL is 0. Compare with RELBM.
RELBM: greatest relative bending moment. At both limits RELBM 1.0 (100%) and in the middle
of the limits RELBM is 0. Compare with BMREL.
RELSH: greatest relative shear force. At both limits RELSH is 1 (100%) and in the middle of
the limits RELSH is 0. Compare with SHREL.
SHREL: greatest relative shear force. At both limits SHREL is 1 (100%) and at SH=0 SHREL is
0. Compare with RELSH.
TMREL: greatest relative torsion moment, At both limits TMREL is 1 (100%) and at TORS=0
TMREL is 0
Range limit maximum of maximum absolute strength value and maximum absolute limit curve value, note
that formatting is done based on the primary quantities BEND, SHEAR and TORS.
opt: options:
F: output the result as a string obeying the quantity standard (format, unit). Default=as a
number.
The function returns the value of a quantity related to the longitudinal strength and valid at a
given x. The result can also be the whole arrays describing the function. See also LD.SQNT.
value=LD.SQNTX(quantity,x,opt)
WX: integral of weight distribution from the aft end of the ship to the given x
BX: integral of buoyancy distribution from the aft end of the ship to the given x
ESFCMAX: envelope max. corr. shear force (only with option ENV)
ESFCMIN: envelope min. corr. shear force (only with option ENV)
x: (opt) x-coordinate at which the result is returned. If this parameter is omitted, the function value
is an array containing all values. NOTE: the array must be fetched again if the loading condition
is recalculated.
opt: options
F: output the result as a string obeying the quantity standard (format, unit). Default=as a
number.
DAM=damage: calculate the quantities for the given damage. Note that the whole option must
be in apostrophes.
...
arr=LD.SQNTX(quantity,opt)
This form returns a reference to the array as a whole. NOTE: the array is in the result
description and will be removed when doing a recalculation.
quantity: as above
opt: options:
A: return the corresponding x-argument. Note: all quantities do not have the same
x-arguments.
arr=LD.SQNTX(quantity,resarr)
As above but the result is returned in the given array and all quanties have the common set of
x-arguments. The common set is the union set of all x-arguments occuring in the results. The
form LD.SQNTX('X',xarr) returns the common argument set.
EXAMPLES
@B=LD.SQNTX('BEND',45)
@BMX=LD.SQNTX('BMMX')
@XBMX=LD.SQNTX('BMMX','A')
Get the max. bending moment and the corresponding argument as arrays.
The function returns the value of a quantity related to the stability curve, either the value at a
given heeling angle or as for the whole calculated range.
value=LD.STQNT(quantity,heel,opt)
T: draught
TR: trim
heel: (opt) heeling angle at which the result is returned. If this parameter is omitted, the function
value is an array containing all values. For the unit, see options.
opt: options
F: output the result as a string obeying the quantity standard (format, unit). Default=as a
number.
I: input/output of heel and trim in internal units (radians), default: heel in degrees, trim in m.
arr=LD.STQNT(quantity)
This form returns a reference to the array as a whole. NOTE: the array is in the result
description and will be removed when doing a recalculation.
LD.STQNT(quantity,opt,arr)
options: I, as above
EXAMPLES
@T=LD.STQNT('T',20)
The function value is a reference number to record in the current set of weight elements. Zero
is returned if there are no elements.
arr=LD.ELQNT(qnt)
qnt: quantity:
W: weight
EXAMPLE
@wr=ld.elqnt('W')
!type Total weight: @sum(wr)
@idr=ld.elqnt('ID')
@i=locs(idr,'PIPES')
@if i=0 then
!type Element PIPES not found
@else
!type Weight of PIPES: @wr(i)
@endif
arr=LD.ARG(id)
Returns the value of an argument. The result is an array as stored internally, and must not be
changed. See separately cases ID, DBID. NOTE: 0 is returned for an argument that is
undefined.
RULE: free surface rule: the actual rule, only for inquiring
name=LD.ARG('ID')
In this case, the function value is the name of argument set (without DB prefix). If none has
been given, the value 'built-in' is returned. LD.ARG('DBID') returns the full data base name (i.e.
LDARG(id)) and empty if none is active.
LD.ARG(id,newvalue,opt)
arr: array containing the values. This form must be used if there are many values
N: do not update the loading condition. The update can be triggered later with LD.UPDATE.
state=LD.OTSSTATE()
list=LD.OTSSTATE('L')
The array returned contains a list of compartments open to sea. The array is reused at the next
call of the function. Adding option P or S, the list can be restricted to primary or secondary
(=because of a connection) compartments.
The function tells how the compartment was filled when loaded.
value=LD.LOADMETHOD(compartment)
return values:
1 = relative volume
2 = absolute volume
3 = relative mass
4 = absolute mass
5 = grain load, filled untrimmed
6 = grain load, filled with untrimmed ends
7 = grain load, filled and trimmed
8 = load by height
-1 = other
The function sets minimum and maximum fill for a compartment. This secondary information
can be overridden by the real volume of the load. Note that the percentages refer to the net
volume VNET of the room and thus the load capacity is not taken into account implicitely.
ok=LD.FILLRANGE(comp,fillmin,fillmax)
ind: index
subset: array containing names (type 3) or indices (type 1) of load components. The operation
will be repeated for all these.
The function returns the loads (e.g. HFO, BW) that are used in the current loading condition
into an array. The function value is the size of the array. By default whole arrangement, mass
loads, deck loads and container loads are taken into account. This can be limited with the
selection option.
n=LD.USEDLOADS(array,selection,opt)
opt: options:
LD.LOADSINGROUP() get a list of the used loads in the given group of loading conditions
The function returns the loads (e.g. HFO, BW) that are used in a set of loading conditions into
an array. By default all loads including mass loads, deck loads and container loads are taken
into account. This can be limited with the selection options. The function returns the size of the
result array. Note that possible added loading conditions are not automatically included.
n=LD.LOADSINGROUP(group,array,class,opt)
group: name of loading condition group or a string array with loading condition names
class: (opt) limit results to loads in the given load class, e.g. B for bunkers
opt: options:
LD.LOAD(comp,load,amount,dens,fill,opt)
ind: index
subset: array containing names (type 3) or indices (type 1) of load components. The operation
will be repeated for all these. Without option R (=relative), the amount is distributed into the
compartments in the given order until the total is achieved.
amount: amount of load, for interpretation see options. A number for volume, mass or relative amounts
or F,UT or UTE for filled grain loads.
fill: (opt) upper limit for filling degree (fraction of volume). 0 or omitted=ignore.
D: distribute the change: this option is relevant if the operation concerns a set of
compartments, and the effect is to load the same fraction to all of them. Default if R option.
F: fill compartments, the reverse of D: fill tanks in the order given until the given total is
obtained. Default if not R option.
N: do not finish the change (more changes coming). The effect is to omit updating of the
floating position, mass totals, raising the LD.CGHANGE event, assigning variables (for ASG
AUTO). To finish, call LD.UPDATE().
+: record an additional load component in the same compartment. This feature is considered
pilot level.
K: keep the other load in the same compartment if any. Default is to replace all loads unless a
specific part is designated by #1, #2. NOTE: also set if comp=integer array with more than one
element.
EXAMPLES
@LD.LOAD('R601','BW',100)
@LD.LOAD('R601','',10,'I')
@LD.LOAD('R601','',10,'IV')
@LL=LD.SELECT('TYPE>L')
@LD.LOAD(LL,'',0)
@LL=LD.SELECT('PURP=BW')
@LD.LOAD(LL,'BW',1,'R')
Load deck load (room not in arrangement). Part of the room may provide additional reserve
buoyancy.
LD.LOADDECK(comp,load,amount,bfac,hb,opt)
The function adds a mass load or changes its properties. See LD.DELETE for deleting them.
LD.MASS(floc,load,amount,pos,ext,des,type,fsmom,opt)
floc: formal location, identifies the load component. May be empty for a new load: assigned (load).
ind: index
parr: array containing x, y and z. May be omitted (assign 0) if the extension is given completely.
ext: (opt) extension, array containing one, two or six elements. May be omitted (assign zero).
type: (opt) load type. Default=from SM. Note that description is compulsory if type is given (at least
empty string)
opt: options, note that parameters des and type are compulsory if opt is given (at least empty
string).
L: 'floc' designates LOAD, default=NAME (only for change of existing mass load)
N: do not finish the change (more changes coming). The effect is to omit updating of the
floating position, mass totals, raising the LD.CGHANGE event, assigning variables (for ASG
AUTO). To finish, call LD.UPDATE(). Controls effect of DES, does not influence interpretation
of given coordinates.
EXAMPLES
@pos=arr(2) @pos(1)=120 @pos(2)=0 @pos(3)=10
@LD.MASS('','PASS',10,pos)
Add a mass load with 10 tons of the load PASS at the given position. Extension not defined.
This functions moves loads between compartments. The function value is the moved amount
(tons).
moved=LD.MOVE(source,receiver,amount,fill,options)
options:
E: make the amounts equal. There must be only one source and receiver
EXAMPLE
@value=LD.MOVE('T100','T110')
@value=LD.MOVE('T100','T110',10)
@value=LD.MOVE('T100','T110','E')
@source=arr(3)
@source(1)='T110' @source(2)='T111 '@source(3)='T112'
@value=LD.MOVE(SOURCE,'T1000')
rec=LD.ADD()
This form returns a list of added loading conditions in the current loading condition.
LD.ADD(name,opt)
opt: options
F: force: do the operation even if the loading condition is already registered as a part. Without
R, the effect is to update the corresponding components.
LD.ADD(list)
The effect of this form is to replace the preceding added parts with those in the list.
orig=LD.OTS(comp,state,opt)
Modify a given compartment. The function value is the state at the call, defined as 'state'
0: not open
1: open to sea
-1: toggle
opt: options
N: do not update the loading condition immediately. LD.UPDATE must be called when all
changes maded.
LD.OTS(list,opt)
This form is equivalent with the OTS command: replace any preceding definition by the given
list.
list: string or integer array: make the listed compartments open to sea
Loads are moved under specified conditions for the purpose of achieving a specified trim and
heel. The tanks to be used are specified as groups. All tanks in a group must contain the same
load (unless empty). The groups are defined by a list of compartments or by specifying all
those containing a given load. If there is no special control for the different groups, all tanks can
be given as single list (option U).
NOTE:
LD.BALANCE() is an old service function. LD.AUTOLD() is recommended
to be used instead.
LD.BALANCE(trim,heel,group1,opt1,group2,opt2,...,control,opt)
trim: target trim, -999: ignore trim (set weight=0 for trim). Interpreted as meters unless option I given.
heel: target heel, -999: ignore heel. Interpreted as degrees unless option I given.
wrec: (opt) real array containing weight factors, by which the relative importance of the following
aspects can be controlled. default values 1. See also options.
opt: general options, string combined from the alternatives below (note: compulsory item, may be
empty)
N: do not update the loading condition (more changes coming, finish by calling LD.UPDATE()).
U: all tanks given as one list, not possible to give separate options for different loads in the list
T,H,C,L: add more weight to the given aspects (see parameter wrec). Doubled (e.g. TT) gives
stronger effect. FC, FL removes the aspect.
EXAMPLES
@LD.BALANCE(0,0,'BW','')
@LD.BALANCE(2,-999,'BW','FIX','')
Balance the ship to trim=2 using ballast water as already loaded. Influence on heeling ignored.
@LD.BALANCE(0,0,TLIST,'<500','LL')
Balance the ship using the tanks T101, T102, allowing the amount to change but not exceeding
500 tons. Give more weight to the 'minimize total' aspect.
@LD.BALANCE(0,0,TLIST,'BW','')
Balance the ship using the given tanks and all tanks with ballast water (BW).
The function deletes loads from the current loading condition, either mass loads or loads not in
the arrangement, including additional loads in a compartment. Other loads can only be set to
zero.
LD.DELETE(sel,opt)
ind: index
subset: array containing names (type 3) or indices (type 1) of load components. The operation
will be repeated for all these. The options D and L are valid if string record.
opt: options:
EXAMPLES
@LD.DELETE('T123#2')
@LD.DELETE('PASS','L')
@LL=LD.SELECT('MASS=0','M')
@LD.DELETE(LL)
--------------------------------------------------------------------
LD.AUTOLD(val,target,group1,opt1,lopt1,group2,opt2,lopt2)
TR opt3: trim. If TR is not given or given without opt3 (i.e. without a '=','<' or '>' operator), then
trim limits are taken from trim limit table information as specified for target GM below. A trim
range can be given with two separate '>' and '<' targets.
HE opt3: heel
GM: minimum GM limit. The resulting loading case's GM value with free surface correction will
be within the GM limit. The KG and GM limits are interpolated from the table 'TAB*GMLIMIT' if
the attained trim is within the trim limits of the table. If only one GM limit curve is given (for one
trim), then the limit is extrapolated to cover any trim value. The table should be of the form:
NEW TAB*GMLIMIT NM
COL, T
COL, MINGM
COL, MAXKG
COL, MINGM2=MINGM
COL, MAXKG2=MAXKG
COL, MINGM3=MINGM
COL, MAXKG3=MAXKG
COL, MINGM4=MINGM
COL, MAXKG4=MAXKG
COL, MINGM5=MINGM
COL, MAXKG5=MAXKG
COL, TRLA
COL, TRLF
QNT TMAX, 6, 6, 6, 6, 6
QNT TMIN, 1, 1, 1, 1, 1
QNT TR, -2, -1, 0, 1, 2
NEW TAB*OB_LIMCURVE NM
COL, T
COL, GM1=MINGM
COL, GM2=MINGM
COL, GM3=MINGM
COL, GM4=MINGM
QNT TRIMX, -1, -0.5, 0, 0.5
NEW TAB*OB_TRIMLIMIT_HP1 NM
COL, T
COL, TRLA
COL, TRLF
NEW TAB*OB_LIMCURVE NM
COL, DISP
COL, GM1=MINGM
COL, GM2=MINGM
COL, GM3=MINGM
QNT TRIMX, -0.5, 0, 0.5
NEW TAB*OB_TRIMLIMIT NM
COL, DISP
COL, TRLA
COL, TRLF
SN opt3: shear force limit curve given in the STLIM argument of the loading task. The relative
value RELSH is used and compared against 100% of the limit by default. When compared
against a given value, a 0.1 difference in the relative value is allowed.
SHREL opt3: shear force limit curve given in the STLIM argument of the loading task. Relative value
SHREL is used and compared against 100% of the limit by default. When compared against a
given value, a 0.1 difference in the relative value is allowed.
MN opt3: bending moment limit curve given in the STLIM argument of the loading task. Relative
value RELBM is used and compared against 100% of the limit by default. When compared
against a given value, a 0.1 difference in the relative value is allowed.
BMREL opt3: bending moment limit curve given in the STLIM argument of the loading task. Relative
value BMREL is used and compared against 100% of the limit by default. When compared
against a given value, a 0.1 difference in the relative value is allowed.
FRSM opt3: Minimize the free surface moment of the loading case. The free surface rules are applied.
GRFTOT opt3: Minimize the total grounding force (GRFTOT quantity) of the loading case. When
compared against a given value, a 1%*DISP difference in the value is allowed.
TIM opt3: Maximum calculation time in seconds. This target is excluded from the 'val' output array.
Default value is 20 seconds (TIM=20).
TOLRAT opt3: Tolerance ratio. Apply finer tolerances by giving a tolrat value less than 1 (0<TOLRAT<1).
The default value is TOLRAT=1. TOLRAT has an impact on the tolerances as follows:
tolerances for trim, heel and draught are: TR: approximately 0.01*TOLRAT meters; HE:
0.1*TOLRAT degrees; T/TA/TF: 0.2*TOLRAT percent and DISP 0.01*TOLRAT percent of the
target value.
RCAP opt3: Capacity ratio. Changes the tank capacity with given ratio with repsect to the normal
capacity defined in LD. This target is excluded from the 'val' output array. The default value is
(RCAP=1).
opt3:
=amount
>amount
EXAMPLES
Load the compartments given in the string array 'TLIST' such that
the given floating position is achieved. The shear force and
bending moment limit curves defined in the current argument 'STLIM'
will not be violated:
!CAL target=ARR(3)
@target(1)='TR=0.5'
@target(2)='HE=2'
@target(3)='T=2.5'
@target(4)='SN'
@target(5)='MN'
!CAL tlist=ARR(3)
!CAL tlist(1)='R03011'
!CAL tlist(2)='R03007'
!CAL tlist(3)='R03008'
!CAL tlist(4)='R02003'
!CAL tlist(5)='R02004'
!CAL val=ARR(2)
@LD.AUTOLD(val,target,tlist,'FREE')
Load the compartments given in the string array 'TLIST' with the
given amount such that the given trim and heel is achieved.
The shear force and
bending moment limit curves defined in the current argument 'STLIM'
will not be violated:
!CAL target=ARR(3)
@target(1)='TR=0.5'
@target(2)='HE=2'
@target(3)='SN'
@target(4)='MN'
!CAL tlist=ARR(3)
!CAL tlist(1)='R03011'
!CAL tlist(2)='R03007'
!CAL tlist(3)='R03008'
!CAL tlist(4)='R02003'
!CAL tlist(5)='R02004'
!CAL val=ARR(2)
@LD.AUTOLD(val,target,tlist,'=1210.5')
Load the cargo and ballast water compartments such that the given
trim and heel is achieved. The amounts of cargo and
ballast water are kept constant.
The shear force and
bending moment limit curves defined in the current argument 'STLIM'
will not be violated:
!CAL target=ARR(3)
@target(1)='TR=0.5'
@target(2)='HE=-3'
@target(3)='SN'
@target(4)='MN'
!CAL val=ARR(2)
@LD.AUTOLD(val,target,'CA','FIX',' ','BW','FIX')
Load the cargo and ballast water compartments such that the given
trim and heel is achieved. The amount of cargo is kept constant.
The KG value is kept within the limit defined in the table
'TAB*GMLIMIT':
!CAL target=ARR(3)
@target(1)='TR=0.5'
@target(2)='HE=-3'
@target(3)='KG'
!CAL val=ARR(2)
@LD.AUTOLD(val,target,'CA','FIX',' ','BW','FREE')
The function attaches a mass load to an existing crane. Optionally, it can be used to detach a
mass load from a crane.
LD.MASSTOCRANE(floc,crane)
LD.MASSMASSTOCRANE(floc)
LD.NEW(name)
LD.GET(name)
name: name of the loading condition, may contain the data base prefix LD*CON()
LD.SAVE(opt)
LD.RENAME(name,opt)
name: name of the loading condition, may contain the data base prefix LD*CON()
opt: options
!: allow a loading condition with same name to be replaced. NOTE: the check concerns the run
time memory only.
LD.RENAME(sel,oldname,newname,opt)
Rename the given defintion (see option sel). The original definition is also kept, so the function
works like "save as".
opt: options
!: Force replace the definition if a definition with the newname already exists.
The function value is 1 if the current loading condition has been changed but not stored, else 0
LD.EXISTS(name,type)
type: (opt) type, alternatives are LOAD (default), LGR, LCUR, LCGR, LIG, ENV and WAVE
LD.DRW(set,opt,source)
list: array containing names of loads or indices, for example from LD.SELECT.
T: show liquid surfaces with real inclination. NOTE!: trim and heel taken acc. to the current
loading condition.
source: (opt) source of load data, default=current loading condition (reference number of description).
The description must contain at least the records NAME, LOAD and MASS. With option T, also
T, LTYP.
LD.DRW()
Same as LD.DRWAUTO('UPD').
EXAMPLES
@ld.drw('','HB')
Draw all loads in the current loading condition, using hatching and and erasing preceding
loads.
@ld.drw('R601')
@d=tp.dmr('TAB*TABLOAD')
@ld.drw('','',D)
LD.DRWMASS(sel,opt,source,size,col)
source: (opt) source of load data, default=current loading condition (reference number of description).
The description must contain at least the records NAME, LOAD, MASS and (XM,YM,ZM) or
(XCG,YCG,ZCG). Assign 0 if not used and parameters follow.
size: size of symbol (ship scale), default=from DRW MOPT, initially 0.1*BDWL. Not used if E option.
This function controls updating of the graphic display after load changes.
LD.DRWAUTO(sel)
sel: case:
V: return the list of views in the current control, integer array. 0=none. Similarly LL=layers for
loads, ML=layers for mass loads, DL=layers for damaged compartments, LOPT=options for
loads (string array), MOPT=options for mass loads, DOPT=options for damages.
LD.DRWAUTO(vl,lll,mll,dll,lopt,mopt,dopt)
This form defines a general case where many views may be used and where the loads are
plotted on own layers. The same layer may shared by different aspects. Other graphics in
these layers will be erased at updates (NOTE!). All arrays listed below may be replaced by a
number or string if the values are the same for all views. Where arrays are given, the number
of items must be the same as the number of views.
lll: layers for compartment loads, integer array with as many items as there are views (one if vl=0).
0=comp. loads not included in the automatic update. The caller is responsible for creating the
layers.
lopt: (opt) options for loads in compartments, values as in DRW OPT. Default: common options from
DRW OPT.
mopt: (opt) options for mass loads, values as in DRW MOPT. values as in DRW MOPT.
LD.DRWAUTO('UPD',view)
view: (opt) view number, update this view only, default=all. The given view must be in the array vl
given to LD.DRWAUTO.
EXAMPLES
@ld.drwauto('ON')
@ld.drwauto(0,2,3)
Show compartments in layer 2 and mass loads in layer 3 of the current view.
Maintain the display of loads in two views, using layer 2 in both of them.
opt=LD.DRWOPT(case)
LD.DRWOPT('L',option)
LD.DRWOPT('M',option,size,col)
General purpose function for plotting a section showing loads. The input for the loads is wholly
provided by the parameters. The result is either plotted in the current projection and scale or
into the setup (see parameter 'object'). Several loads can be plotted in a single operation by
giving multiple values of the input parameters using arrays.
LD.LDINSECTION(object,fcol,t,trim,heel,fill,opt)
curve: name or reference number. The result is plotted according to the current scale and
projection
room: name of room. There mmust be a setup active and the result is plotted according to the
setup
fcol: fill colour, either numeric code (pure colour <0) or logical fill code. If there are several loads,
this item must be given as an array and the size (max 4) decides how many loads are plotted.
t: filling height. Defines the water plane together with trim, heel. If fcol gives many values, this
item should also be an array with as many values.
fill: (opt) filling degree. Needed for options H, P. In addition. <0.001 treated as empty, >0.995
treated as full. Default=0.5, i.e. no effect unless H or P option.
opt: options
HHH: always
S: decide plotting order here, default=plot in the given order. 't' is used as sorting criterion. If
the heel or trim varies, non-moving items (heel=0, trim=0) are plotted last.
T: show liquid surfaces with real inclination. The quantity T (draught) must be available in the
source.
EXAMPLES
@ld.ldinsection('R601','C-HFO',4)
The compartment R601 is plotted in the setup with logical fill colour C-HFO to height 4.
In this example there are two loads and the ship has a general floating position. Both loads are
liquid, i.e. obey the floating position.
This function transfers/updates load components in a given table using the current loading
condition as source.
LD.TOTABLE(table,select,opt)
table: receiving table, 0=current work area. See !EXPL TP.STDPAR for complete set of alternatives.
Note: updates are not started if the receiver is not in the work area.
select: (opt) selection subset. Restricts the effect of the loading operation to loads (in the current
loading condition) that belong to the given set.
opt: options:
A: add: add new loads if needed, default=only update parameters of items already in the table
F: update also the floating position recorded in quantities HEEL, TR, TRIMX
C: compartments only
EXAMPLES
@LD.TOTABLE(0,'C')
Transfer loads from the current loading condition to the compartments listed in the table
currently in the work area.
The function updates load components of the current loading condition, using the given table
as source.
LD.FROMTABLE(table,select,opt)
table: source table, 0=current work area. See !EXPL TP.STDPAR for complete set of alternatives.
select: (opt) selection subset. Restricts the effect of the loading operation to loads (in the current
loading condition) that belong to the given set.
opt: options:
C: compartments only
LD.FROMTABLE(table,group,opt)
This form does the transfer according to the old conventions (before rel. 2001).
opt: options:
E: exclusive: assign mass=0 to load components not in the table default=assign those in table.
Obeys 'select'.
T: (mass loads) remove loads not in the table and having the same type as a load in the table,
i.e. the table is complete regarding those types occurring in it.
F: update also the floating position recorded in quantities HEEL, TR, TRIMX
EXAMPLES
@LD.FROMTABLE('TAB*TABLOAD','C')
Update the current loading conditions with the compartments of the table TAB*TABLOAD.
@LD.FROMTABLE(0,'M','E')
Update those mass loads of the current loading conditions that occur in the table currently in
the work area. Old conventions.
The function controls automatic table updates as in the command CTU. The control consists of
one or several rules, one for each table concerned. In one call, one rule can be
assigned/modified. Without parameters the function returns the current state (ON/OFF/NONE).
LD.CTU(id,table,crit,opt)
crit: selection criterion, e.g. TYPE>L, controls transfers to the table. Assign empty if not needed.
F: update also the floating position (quantities HEEL, TR, TRIMX). (Note: only if present in the
table).
W: do no allow change of a component from an added loading condition (when updating LD).
WW: in addition, restore the source table line according to the loading condition.
LD.CTU(setting)
setting:
LD.CTU(id,'OFF')
This function stores weight elements, as used in LD, to a table. The table must exist at the call
and have the columns ID, W, XCG, YCG, ZCG, XMIN, XMAX and TEXT. The standard prefix
for this type is ELE*
LD.LIGTOTABLE(table,source,opt)
table: receiving table, alternatives as in the TP service functions, see !EXPL TP.STDARG.
source: (opt) source of lightweight elements, lightweight description reference number. Default=current
lightweight under the LIG task.
This takes lightweight elements from as table and stores them in the form used by LD. The
table must have the columns ID, W, XCG, YCG, ZCG, XMIN, XMAX and TEXT. Optionally,
XMIN and XMAX may be replaced by LENX, giving only the extension in x. The standard prefix
for this type is ELE*
LD.TABLETOLIG(table,receiver)
table: source table, alternatives as in the TP service functions, see !EXPL TP.STDARG.
receiver: (opt) place where to store the result, description in the form used by LD. It must contain the
records 1610, 1620, 340, 2401, 2402, 2403, 111, 112. Default=current lightweight under the
LIG task.
This function returns the type and descriptive information on the lightweight distribution in the
given lightweight version
LD.LIGDIST(ligv,type,txt)
This function returns various data from the given lightweight version.
LD.LIGDES(ligv,arr)
arr: string array for receiving the data, the items are:
This function tells if a given lightweight has centre of twist defined and returns definition data
for centre of twist (used in torsion load calculation).
LD.LIGDESCTW(ligv)
LD.LIGDESCTW(ligv,coord,arr)
The function can be used to ask or change the status of the LGDEF task. Intended to be used
with the LD.LIGCOMMAND function. The function value 1 means that LGDEF is open and 0
means closed.
LD.LIGSTATUS(opt)
opt: option:
LD.LIGCOMMAND(command)
command: string representing the command to be run.Double apostrophes are converted to single ones
and upper case conversion done as in normal commands.
LD.COMMAND(command)
command: string representing the command to be run. Double apostrophes are converted to single ones
and upper case conversion done as in normal commands.
LD.COMMAND(id,parameters)
LD.COMMAND(id,arr)
The effect of this function is the same as entering the LD main task, as far as loading
conditions is concerned. The function is provided for test purposes, allowing loading condition
related services elsewhere than in the LD subtask. See also LD.COMMAND.
The function returns LD to the non-active state. The current loading condition (if any) is lost.
There is no warning for data not saved. Outside the LD task, the effect is to cancel LD.OPEN.
The function starts various updates. The default is to recalculate the loading position and load
total and to trigger the LD.CHANGE event. Needed after using LD.LOAD, LD.MASS or
LD.DELETE with option N.
LD.UPDATE(opt)
opt: options
The function is similar with the EDIT command, but returns the result into a macro provided in
the call. The selection obeys the current arguments. The current implementation is preliminary.
LD.GETDEF(subj,name,macro,opt)
PRI: priorities
I: stiffness distribution
name: (opt) name of the group/curve, supported only with LCUR and LCG
options:
EXAMPLE
@d=dm.create('')
@ld.getdef('PAIR',d)
The tank pair definitions are read into an unnamed description. The function LD.RUNDEF runs
definitions in a given macro.
The macro is supposed to contain the result of a preceding LD.GETDEF, which may be
modified by the user.
LD.RUNDEF(subj,macro,opt)
subj: subject, three characters relevant. The subject is relevant for deciding the context where the
definitions are run.
PRI: priorities
I: stiffness distribution
LCG: limit curve group (see !EXPL LD.GETDEF and option 'G')
The function returns an array containing the names of loading conditions belonging to a group.
The result is a pointer to the record in the original description. Do not modify. Alternatively a
receiving array can be given as an option.
list=LD.GROUPMEMBERS(name,arr,opt)
name: name of the loading condition group. May contain the database prefix.
The function returns dates related to a loading condition, default=youngest date on which it is
dependent. The components checked are hull, arrangement and lightweight. NOTE: the dates
concern stored loading conditions.
date=LD.DATE(name,opt)
opt: options:
S: return the date as a string, default=number. As a string, the accuracy is better, otherwise
minutes will be inaccurate.
Y: tell the youngest component that the loading condition depends on, symbols L,H,A or W as
above.
EXAMPLES
TYPE L100 last changed: @FDATE(LD.DATE('L100','L'))
TYPE Logical date: @FDATE(LD.DATE('L100'))
This function has been added for testing LD-related functions in the API.
value=LD.API(function,par1,par2,...)
The function value is the value returned by the API function if any, else empty.
function: name of the API function. The four first characters (N_LD) may be omitted.
par1,...: parameters of the function as in the function call. Parameters may be omitted from the end. In
the following summary, a result in square brackets concerns the service function only.
n_ldnew(name,opt)
n_ldget(name,opt)
[value=]=n_ldgetarg(arg)
n_ldsetarg(arg,value,opt)
n_ldload(name,load,amount,dens,type,cap,opt,ierr)
n_ldmass(name,load,mass,x,y,z,xmin,xmax,des,opt,ierr)
n_ldots(name,status,vlim,opt,ierr)
n_ldperm(name,perm,opt)
n_ldexport(file,opt,ierr)
n_ldimport(file,opt,ierr)
[value=]n_ldlqnt(name,qnt,opt,ierr)
value=n_ldqnt(qnt,opt,ierr)
pointer=n_ldrecord(qnt)
value=n_ldsqnt(qnt,opt,ierr)
n_ldsqntx(qnt,arec,frec,opt,ierr)
n_ldstqnt(qnt,arec,frec,opt,ierr)
n_ldopqnt(qnt,opt,ierr)
n_ldcritqnt(qnt,opt)
vcorrf=n_ldvcorrf(table,dens,temp,alfa,opt)
vol=n_cpvolg(name,device,gauge,trim,heel,red,opt,ierr)
gauge=n_cpgvol(name,device,vol,trim,heel,red,opt,ierr)
red=n_cpvarred(name,fill)
EXAMPLE
@ld.api('LOAD','R123','HFO',100,0.91)
Run the function n_ldload: load the room R123 with 100 m3 HFO, density=0.91
@gm=ld.api('QNT','GM')
The function enters the given deck load rooms to LD administration. This is needed only if the
potential deck load rooms are included in table, see !EXPL CTU. Normally the room is entered
into LD administration when loaded. The function returns the number of added rooms. This can
be smaller than the size of the input array if some rooms were already included in LD
administration.
n=LD.PREPDECKLOAD(rooms)
rooms: string array with the names of potential deck load rooms
The function returns the number of deck loads in the current loading condition. Optionally, also
names of the deck loads and buoyancy factors can be fetched to arrays.
nr=LD.DECKLOADS()
nr=LD.DECKLOADS(dl,bf,zlim)
dl: (opt) string array for receiving the names of the deck loads
zlim: (opt) check that there is no buoyant part above the given limit height from the baseline
The function returns the number of mass loads in the current loading condition. Optionally, also
names of the massloads can be fetched to an array.
nr=LD.MASSLOADS()
nr=LD.MASSLOADS(names)
names: (opt) string array for receiving the names of the mass loads
The function fetches the shear force correction definitions into arrays.
LD.SFCDEF(lcase,dam,xa,ca,cf)
ca: (opt) real array for corrections aftward from the point
cf: (opt) real array for corrections forward from the point
The function returns 0 if shear force correction is not defined for the specified loading condition
n=LD.SFCINFO(lcase,damcase,arr)
The function returns 1 if the LD task has been opened (e.g. with the funtion LD.OPEN),
otherwise the result is 0.
n=LD.TASKSTATUS()
n=LD.LCGMEMBERS(name,namearr,typarr,tarr,tabarr)
tabarr: (opt) string array for table names if curve is defined from LCUR table(s), otherwise empty string
is returned.
The function returns relevant points of the given limit curve in arrays. The function value is the
type of the curve (1=BM, 2=SF, 3=TM, 4=MS) The limit curve values are in internal units (T,
TM)
LD.LCURDES(lcur,xarr,minarr,maxarr)
minarr: (opt) real array for returning the minimum limit values
maxarr: (opt) real array for returning the maximum limit values
tabarr: (opt) string array for returning the table name(s) where the limit curve values are defined. Array
is empty if the old method is used.
The function creates/updates table(s) that contains the strength limit values as a function of x.
See table option in the LCUR definition.
LD.LCURTOTAB(lcur,table,opt)
table: table name or a string array containing max. two table names, in which case the minimum
limits are stored in a separate table.
F: Force update the limit curve description to use the table definition(s)
S: Silent mode, all existing tables are automatically updated without separate confirmation from
the user.
LD.GETDESCRTEXT(name,type)
The function returns the number of defined cranes. Optionally, also names of the cranes can
be fetched to an array.
nr=LD.CRANES()
nr=LD.CRANES(names)
names: (opt) string array for receiving the names of the cranes
The function returns the names or count of container loads in the current loading condition.
nr=LD.CONTLOADS()
name=LD.CONTLOADS(nr)
nr: index of the container load (1=first one etc). If nr is out of range, empty is returned without error
message.
The basic function is to update a the loading condition when container load has changed.
LD.UPDCONTLD(name,opt)
name: name of the container load. empty=the current one under CL (can be inquired with
CL.CURRENT).
opt: options
R: replace the given container load with the one current under CL.
The function makes draught survey. From 2...6 draught observations at the marks, the program
calculates the floating position, deflection and equivalent draught of the ship and difference
between the observed and calculated displacement and longitudinal (and optionally transverse)
center of gravity (correction mass and its longitudinal (and transverse) position). The function
assumes that the draught mark curve begins (the lowest point is) at T=0 and the curve is on
the moulded hull (the function takes into account the thickness of the keel plate). The function
returns the reference number of the result array if the survey is OK, otherwise the function
returns -1.
LD.DRSURVEY(drmarks,drobs,resarr,zcm)
LD.DRSURVEY(drmarks,drobs,resarr,zcm,xar,tar)
LD.DRSURVEY(drmarks,drobs,resarr,zcm,dfl)
LD.DRSURVEY(heel,drmarks,drobs,resarr,zcm)
LD.DRSURVEY(heel,drmarks,drobs,resarr,zcm,xar,tar)
LD.DRSURVEY(heel,drmarks,drobs,resarr,zcm,dfl)
LD.DRSURVEY(t,trim,heel,resarr,zcm)
The three first alternatives are used when the heeling angle is unknown and the next three
ones when the heeling angle is known. The last alternative does not calculate the floating
position but it is given as input and deflection is not available.
drmarks: string array containing the names of draught mark curves (2...6).
drobs: array containing the draught observations at the marks (-999 means no observation). The
number of observations is at least 2 when heeling angle is known and 3 when heeling angle is
unknown. The number of observations is at most 6.
resarr: array for output. All draughts in the array are given in the center line.
zcm: (opt) vertical location of the correction mass (m), see resarr(11) above.
xar,tar: (output) draught as function of x as used internally; xar, array for x-coordinates, tar, array for
draughts. These arrays should be used if accurate data transfer between functions is needed
(e.g. to LD.DRMARKS).
t: draught (m)
Like LD.DRSURVEY but check is made for the damaged hull. Please note that this calculation
only works in situations where no cargo outflow is taken place, i.e. the damaged displacement
remain the same as the intact one.
The function calculates the readings at the draught marks when the floating position of the ship
(draught, trim, heeling, deflection) is known. The function returns the reference number of the
result array if calculations are OK, otherwise the function returns -1.
LD.DRMARKS(t,tr,heel,defl,drmarks,readings)
LD.DRMARKS(t,tr,heel,defl,drmarks,readings,xar,tar)
LD.DRMARKS(t,tr,heel,defl,drmarks,readings,dfl)
defl: deflection at XREF (m). Positive values for hogging, negative values for sagging. If accurate
deflection is needed, use draught as function of x (see xar,tar or dfl)
drmarks: string array containing the names of draught mark curves See also LD.DRSURVEY.
xar,tar: draught as function of x as used internally; xar, array for x-coordinates, tar, array for draughts.
These arrays should be used if accurate data transfer between functions is needed (e.g. from
LD.DRSURVEY)
This function reads tank data from the on-line automation system using the general protocol.
The actual interface to the automation system is provided by a program given as parameter.
LD.RDOT(progfile,options,rdescr,nlist)
This form returns the result as such, in contrast to the next one that updates the current table.
options: string passed to the reading program. Special case: FILE: get the results directly from the file
'progfile', which is supposed to have the format produced by the reading program.
rdescr: description for receiving the result. Any contents at the call are removed.
nlist: array containing the list of tanks. It will be copied to 'rdesc' as record 1610.
LD.RDOT(progfile,options,opt)
This form updates data in the table currently in the work area. The table must contain column
1610 (name of tanks). Those columns in 'rdesc' corresponding to quantities read from the
on-line system are updated according to the options. Readings marked as in error are flagged
as having error status (the column must be at least formally dependent).
progfile: as above
options: as above
This function reads data in table form from the online automation system (header #TABLE).
LD.RDOTAB(table,progfile,options,opt)
options: string passed to the reading program. Special case: FILE: get the results directly from the file
'progfile'.
U: update: do not add new items, only update values. The table must have a key column,
which is present in the input.
I: ignore without message parts (#TABLE) that do not match the current receiver
This function reads the floating position from the on-line automation system using the general
protocol.
LD.RDOF(progfile,options,receiver,opt)
This form returns the information read in an array provided in the call.
options: string passed to the reading program. Special case: FILE: get the results directly from the file
'progfile', which is supposed to have the format produced by the reading program.
receiver: array of type 2 (real).The following values will be assigned in the given order:
t,trim,heel,ta,tf,xa,xf.
opt: (opt) options. C=convert values to the internal form of NAPA, calculate redundant values. e.g. T
if TA, TF read from the file. Default=return vales as read, -999 if not obtained. trim and heel are
then expressed in the external form).
LD.RDOF(progfile,options)
This form returns the result by updating the state of the Onboard related variables and the
display.
This functions reads arbitrary measures from the online interface, i.e. items under the
#MEASURES (default) or #TEXT flags.
LD.RDOM(progfile,options,idarr,varr,opt)
options: string passed to the reading program. Special case: FILE: get the results directly from the file
'progfile'
opt: options:
R: store repetitions of the same identifier, default=keep only the last value
LD.RDOM(progfile,options,varr,opt)
progfile: as above
options: as above
opt: options:
EXAMPLES
@list=arr(3)
@values=arr(3)
@LD.RDOM('temp/test','FILE',list,values)
@i=locs(list,'SPEED')
@speed=value(values(i))
Measures are read from the file temp/test, and from the result, the value of 'speed' is extracted.
@notes=arr(3)
@LD.RDOM('temp/test2','FILE',notes)
@n=rsize(notes)
!do 'type %notes(i)' @n
This function concerns the data related to the floating position used in the draught survey
function and in table loading (for treating gauge values), which are not necessarily the same as
obtained from calculating the current loading condition.
oldvalue=LD.OBNFLP(id,newvalue,opt)
newvalue: (opt) If given, the value is assigned to the corresponding quantity. If option S is given, the value
should be 0=undefined, 1=obtained from the online system, 2=assigned by the user.
U: update the display and dependent values (e.g. TA, TF if trim given).
EXAMPLES
@trim=LD.OBNFLP('TRIM')
Get trim in m.
@q=LD.OBNFLP('TRIM',2,'SU')
The function returns the values displayed in the fields belonging to the graphic watch float
function (for old Onboard NAPA).
value=LD.OBNWFV(id,opt)
id: identifier of the value, same as used for coding the fields:
T,TA,TF,TEQ,TK,TR,HEEL,GM,DGM,GM0,DISP,DW,MINGM,RELSH,RELBM.
opt: controls calculation: C=calculate if no field present, F=always calculate, default=use values
already calculated.
The function returns the volume correction factor for a given temperature, reference density
and table.
vcorrf=LD.VCASTM(table,dens,temp,alfa,opt)
temp: temperature
opt: options:
C: just check the parameters: function value=0 or error code (5361...5364). Alfa not needed.
Default=make normal error messages.
rhores=LD.DENSCONV(rho,repin,repout)
RHO: ton/m3
SPG: specific gravity. The conversion may be done with a built-in formula or using a table, see
below.
LD.DENSCONV(table)
This form assigns a table for converting between RHO and SPG. If a given density is out of
range, the formula is used.
table: name of table. The table must contain the columns RHO (or DENS) and SPG. Special case
OFF: remove the table. NOTE: if the source table is changed, the command must be repeated.
EXAMPLE:
spg=LD.DENSCONV(0.912,'RHO','SPG')
The function defines the table to be used for calculating the quantities MINGM, MAXKG, TRLA,
TRLF in LD.QNT.
LD.LIMDEF(case,table)
table: (opt) name of table or table reference number. If omitted, name of the current table is returned
as the function value.
The function controls the on-board mode, controlling certain aspects relevant in the onboard
context. The function value is the state at the call.
oldstate=LD.OBMODE(state)
state: (opt) new state, either 0=off, 1=on. When omitted, only the function value is returned. If DB5 is
open, DB5 mode is set (as if calling DB.DB5MODE(1)).
The function calculates the floating position of the ship in water with the specified density.
LD.FLPOS(rho,flpos)
ncnt=LD.GROSTATE()
The function returns number of contacts of the ship with the ground: 1=one point grounding,
2=two point grounding, 0=no grounding.
This function adds damage definition commands to the current loading condition. Any damage
definition command added to the loading condition causes calculation to be carried out in
damage stability environment.
LD.DAMDEF(command,command,...)
The given commands are added to the loading condition after those previouly given (if any). If
the command ends with comma (,), the next command is regarded as continuation line.
LD.DAMDEF(arr)
As LD.DAMDEF(command,command,...) but the commands are given in a string array and the
set replaces all previously given commands.
LD.DAMDEF('RESET')
LD.CALDAM(opt,scope)
Get strength related quantities of the damage calculated by the function LD.CALDAM.
LD.DSQNT(qnr,resar)
The function is primarily intended for the case that the weight distribution has been generated
automatically by weight calculation and contains so may points that the performance of
strength calculations suffer. It replaces the given distribution with one where arguments are on
every or every second frame. It is assumed that the original table contains significantly more
arguments.
LD.SIMPLIFYWB(version,spacing,opt)
opt: options
TT: as T but leave the original data in the lightweight description so that the operation can be
repeated (for experimenting with different arguments).
E: apply the function to the corresponding distribution obtained from the elements (description
LWEDIST(version)).
LD.SIMPLIFYWD(version,xarr,opt)
As above, but the new arguments are provided directly by the array xarr. With option A,
additional arguments are inserted where the spacing otherwise would be >1m.
The function returns height of the cargo and/or water level in the given compartment. Height is
represented in the same way as draught T.
LD.DLEVELH(comp,hc,hw)
The function updates the current loading condition so that those properties controlled by
process table obtain the values corresponding to a given time. Presently, the following
quantities are taken into account: VLOAD (volume of load), MASS (mass of load, may be load
in tank or mass load), DENS (density), X, Y and Z: position of mass load.
LD.FROMPTABLE(table,time,opt)
opt: options
C: ignore a possible initial condition (event type INIT). The modifications are done to the
current loading condition as such.
This function records change events in the process table such as to generate the current
current loading condition at a given time. The events are added at the place implied by the
given time unless a different place is specified with nrule or node.
LD.TOPTABLE(ptable,time,nrule,node,level,options)
time: time of the change, string, expressed as in TIMDEF or as seconds. If there are already
changes at this time, these are replaced. Empty=use the time of the replaced items (spec. by
node or nrule).
sss#.#: sss=fixed part, #=assigned the first free index so that the first # is common for items
from this operation.
sss*: replace all items beginning with sss, proceed as with rule sss#
node: (opt) assign this name to the column STEP. Without the N option items with this value will be
deleted before the operation and the new items inserted at the same place. Special case:
nnn#: replace # with first unused integer.
level: (opt) integer value (>0) to be assigned to the LEVEL column. Special case 0: if new item,
assign maximum+1, if replacement assign old value.
options:
N: new: add the events regardless of previous ones, default=replace all events with the same
time or node, if any.
V: use volumes for representing loads in compartments. Default if the table contains the
column VLOAD.
L: assign linear changes for mass or vload (default if ER option). All other changes are done as
step changes (E or S).
S: raise no TP events
EXAMPLES
@ld.toptable(0,'1:00' 'STEP#.#')
Record the current loading condition at the given time and naming the events in the form
STEPn.m.
@ld.toptable(0,'' 'STEP1.*')
Update the events recorded as STEP1.1, STEP1.2 ... with the current loading condition.
The result is one or several properties of the loading condition as a whole, calculated as a
function of time. The behaviour of the loading condition is defined by a process table. As a
special case, only the tide provides the change.
LD.PFUNCTION(ptable,arg,funct,qnt,astep,x,opt)
This form gets a single quantity into the arrays provided in the call.
qnt: name of quantity, alternatives as in the functions LD.QNT, LD.SQNT, LD.SQNTX or LD.GQNT.
In the form qnt/name a function representing a single load parameter can generated, e.g.
VLOAD/R123.
x: (opt) x-coordinate for calculating quantity dependent on x. May also be given with the quantity
in the form BEND.x
opt: options
A: apply 'astep' in addition to the arguments in the process table, i.e. add arguments where the
step otherwise would be exceeded
C: ignore a possible initial condition (event type INIT). The modifications are done to the
current loading condition as such.
F: fix, do not change the loading condition, intended for use with T
FF: as F but no process table is given (assign first parameter=0). Implies option I.
N: do not restore original loading condition, leave the last one calculated
LD.PFUNCTION(ptable,rtable,astep,opt)
This form loads all applicable columns in the given table. The table must contain the column
DAT for receiving (or providing) the time arguments. The quantites are identified by the column
names, alternatives as above. Quantities needing an x-argument can be given by column
names in the form qnt.x, e.g. BEND.90. Columns that cannot be assigned are disregarded
without message.
This function is primarily intended for cases including damaged compartments where later
stages may be modified by loss of cargo in an earlier one. It adds events expressing the loss of
cargo and updates quantities T, TR, HEEL, GM and OFLV if such columns are found in the
table. For doing this, loading conditions are generated at check points formed by events NODE
or CHECK or optionally at every change. After this, LD.FROMPTABLE will correctly generate
loading cases.
LD.UPDATEPTABLE(table,time,opt)
time (opt) restrict the update to events later than this time, expressed as seconds (numeric value) or
clock time (string).
opt: options:
T: (with A): use tolerance 5 s to distinguish betwen events at different times, default=1. TT=use
60 s tolerance.
E: raise event LD.PTABLE (50008) after generating a new load case. Allows additional actions
to be connected to the operation.
This function runs flooding simulation for the time span covered by the given process table and
adds change events so that after this, the process table contains a complete description of
changes during the time interval in question. The recordings are made at every time there is a
manual change and at the times of CHECK events. Columns T, TR, HEEL, GM and OFLV are
assigned if present. The generated events are named FLS.i.j and replace any possibly
preceding such events. At the end, the current loading condition will be the last stage of the
simulation.
LD.FLSTOPTABLE(table,time,opt)
time (opt) restrict the update to events later than this time, expressed as seconds (numeric value) or
clock time (string).
opt: options:
Cn: add check events at every n:th minute. The events are named CHECK.i and replace all
other check events except the last one which marks the the time span.
St: defined the time interval for the calculation t=seconds. Default=10.
The function defined the tide as function of time. Presently, it is relevant mainly for grounding
calculations. See also LD.TIDE.
LD.DEFTIDE(t1,h1,t2,h2)
This form defines the tide by giving the height and time at the minimum and maximum tide. The
shape of the tide curve is a sinus function.
t2: time (seconds) when high tide tide occurs. NOTE: there is no check that the period implied
(2*abs(t2-t1)) is reasonable.
h2: height of tide at t2, h2>h1. NOTE: defines also what is considered zero tide.
LD.DEFTIDE(ht,t0,rt)
This form defines the tide by giving height and a reference time. The tide curve is always
symmetric and has period=12 h.
LD.DEFTIDE(table)
Defines the tide by reference to a table. The table must contain the columns DAT (time in
seconds) and TIDE (height of tide). At times outside the range of the table, it is assumed that
the table defines one period. A change of the table is available without re-entering the tide
definition (but does not trigger updates).
LD.DEFTIDE('SAVE',name)
Save the current tide function in the data base. Not applicable if the tide is defined by a table.
The tide can be restored with LD.DEFTIDE(name).
LD.DEFTIDE('OFF')
r=LD.DEFTIDE()
Returns the current tide function. The function value is 0 if no tide defined, else the reference
number of a record containing ht,t0. If the tide is defined by refence to a table, the name of the
table is returned.
The function returns the height of tide at a specified time. It relies on the tide function being
defined with LD.DEFTIDE. If no tide has been defined, the function value is zero. It also
contains the reverse function.
h=LD.TIDE(time,opt)
time: time, seconds from midnight. May contain the complete date (multiples of one day removed
before applied).
opt: options
A: apply the tide on the current loading condition (relevant only if grounding)
time=LD.TIDE(h,rtime,opt)
This form performs the reverse function, i.e. return time when given height. -99999 is returned
if tide not defined or h out of range.
rtime: (opt) reference time, default=0. The first occurrence after the reference time is returned.
R: return the time when the tide is rising, default=first time with given h
The function returns list of all breaches defined for the current loading condition or definition
data of the specified breach.
nr=LD.BREACH()
LD.BREACH('CAT',arr)
LD.BREACH('DES',id,arr)
Get definition data of the specified breach of the current loading condition.
val=LD.GQNT(qnt,opt)
Get value of the quantity. If the quantity may have two values (there are two contacts, NR=2),
the first (aft) value is default and the second (fore) value is selected by option '2'.
TIDE: tide
GRF: grounding force. Note: if shelf grounding, only one grounding force returned even if
NR=2.
GRF2: grounding force at the fore contact if there are two contacts, otherwise 0.
GRFTOT: total gtounding force, i.e. sum of the forces at the aft and fore contacts.
XCNT: x of point of contact. Note: if shelf grounding, coordinate of the aft or fore end of the
contact depending on the option.
YCNT: y of point of contact. Note: if shelf grounding, y-coordinate at the aft or fore end of the
contact depending on the option.
ZCNT: z of point of contact. Note: if shelf grounding, z-coordinate at the aft or fore end of the
contact depending on the option.
XGRF: (only for shelf grounding) x-coordinate of the center of the grounding force.
des=LD.GROUND('DES')
tp=LD.GROUND('TYPE')
Return type of grounding. The alternatives are 1C, 1F, 2C, 2F, SC and SF.
The function returns list of compartments which are in way of damage, i.e. opened by a
penetration (breach).
n=LD.BRECOMPS(breach,comps)
Get the explanation text for the given free surface rule code FRULE. Or list all possible values
of this qunatity.
LD.FRULE()
note=LD.FRULE(code)
The function returns the number of knwon free surface rules. The rule names are listed in the
array
LD.FRSRULES(array)
The function returns the number of exceptions to thefree surface rule in the given loading
condition
LD.FRSEXCEPTIONS(loadcase)
loadcase: (opt) name of the loading condition, default is the current loading condition
LD.ENVEXT(curve,qnt,position)
Get the list of strength quantities in the given envelope curve set. Function returns the number
of quantities (size of result array).
LD.ENVQNTS(curve,array)
array string array for receiving the envelope quantities. The possible alternatives are BEND, SHEAR,
SFCORR and TORS.
8. Events
This event is raised when a component of the current loading condition has been changed. See
see also LD*CHANGE. (50001).
LD*LCHANGE(name,type)
This event is raised when the current loading condition has been changed. In contrast to
LD*LCHANGE, one event is raised for one user action, and may include several load
components. When running a macro, consequtive loading commands are treated as one
change. (50002).
LD*CHANGE(type)
type: type of change: L=by load command, M=by MASS command, B=balance, LT=compartment
loads from table, MT=mass loads from table, MV=move, A=Argument, U=update, G=group (by
macro) empty=not specified.
LD.CHANGEARG(id)
This event is raised when a loading condition has been made active by reading from the data
base (50004).
LD*GETCOND(name)
This event is raised when a loading condition has been made active by making a new one
(50005).
LD*NEWCOND(name)
The even is raised when the set of compartments being open to sea has change (command
OTS or LD.OTS). (50007)
LD*OTSCHANGE(stat)
This event is raised when the current loading condition has been written to the data base
(SAVE or REPLACE) (50006).
LD*SAVECOND(name)
This event is raised when a new roro load component is added by an RRL command. (50011).
LD*RRADD(line,lane)
line: line number in the load table where the load added
This event is raised when a lane has been affected by a change caused by an RRL command.
Note: added load signalled by LD*RRADD. (50012)
LD*RRCHGLANE(line,lane,type)
type: type of change: -1=load deleted, 1=load added, 2=load moved, 3=length of load changed.
This event is raised when the current loading condition is changed by any RRL specific action
(in addition to a possible specific event. (50013). No parameters.
This event is raised when a storo load has been changed. Note: indirect changes caused by
deleting areas or changing limits are not covered (see event LD*RRCHGSTORO). (50015).
LD*RRLOADSTORO(line,name)
This event is raised when a storo area has been created, deleted or changed. If the operation
affects loads, the event RR.CHGLOAD is also raised. (50016).
LD*RRCHGDSTORO(line,change)
change: 1=added, -1=deleted, 0=limits changed. NOTE: in case of deleting, the event is raised
BEFORE the load is deleted, and actions must be run in the immediate mode.
The event is raised when the default load (as set with RRL L) is changed (50017)
LD.RRNEWL(load)
The event is raised when a break bulk load has been changed (50018).
LD.RRLOADBRB(ind,blind)
The potential locations of containers are defined as so-called container arrangements. Their role is analogous with that of a compartment
arrangement in ordinary loading, and forms the basis for the loading of containers.
The container arrangement has a function in its own right, for assisting the design of the ship. From the container arrangement, the container
capacity can be calculated and drawings can be prepared for showing the location of containers. In generating the container arrangement, one
can take advantage of the geometry of ship structures.
The functions of container loading can be applied to other cases of objects loaded at predefined positions in a more or less regular pattern, for
example cars on a car deck.
Table of Contents:
1. Overview of functions
2. Connection to other subsystems
3. Installation
4. Handling container loads under loading conditions (LD)
5. Steps involved
6. History
1. Overview of functions
The central functions related to container loading are
Objects in the ship can be used for providing locations and for eliminating non-available positions in a container block.
Geometry (drawing):
Container arrangements and container loads can be drawn into arrangement plans or combined with ship geometry in other ways.
Loading conditions:
A container load can be added as a component in a loading condition. Some output functions of CL are available directly under the main task of
LD. For more details, see below.
Stability criteria:
3. Installation
Defining container arrangements can be considered part of the description of the ship, and belongs therefore to the ship model, while loading
containers belongs to loading conditions. However, from the practical point of view, defining arrangements and loading them have much more
mutual connections than with the main tasks mentioned, and have therefore been collected into an single subtask CL. In order to account for the
two aspects above, this subtask has been installed both under SM (ship model) and under LOAD (loading conditions). The following map is
shows how the CL subtask is accessed
A few commands belonging to container loading are available directly in the loading condition task: AC (add containers), RC (remove containers)
and CLA (container load administration).
In order to provide some shortcuts when working under LD, the following functions are provided:
the main container loading commands are available (add, remove containers)
a loading condition can have an 'own' container load that is read and stored automatically with the load case
some administrative functions of CL are available under LD
5. Steps involved
This paragraph gives a short overview of the steps involved in analyses including container loading.
Normally, the general ship geometry has been defined when container loading is done, but it becomes strictly necessary only when loading
conditions are involved.
6. History
Container loading was first introduced to NAPA in 1990. As demands on the system increased and a better understanding on how it should work
developed, the need to revise some basic solutions was recognized. In 1994, this revisions was made and the first official release to include the
revised system was 95.1.
The data structures are to a large extent incompatible, and for the transfer from pre 95.1 versions to the present one, see CL.2, chapter
Conversion.
1. Basic concepts
2. Parts of a container arrangement
3. Properties of stacks
4. Properties of blocks
5. Properties of container types
6. Numbering of container positions
7. Management of changes
8. Usage of alignment points
9. Mixed loading of long and short containers
9.1. Long and short containers
9.2. General requirements for mixed loading
10. List of quantities
1. Basic concepts
The central concepts in the subsystem are container arrangements and container loads.
A container-arrangement means a definition of the possible container positions. Its role in the loading process is similar with the compartments in
ordinary loading. This function is installed as subtask CL, which can be entered from the ship model (SM) task or the loading condition task
(LOAD).
A container load is formed by a set of stacks. meaning a vertical set of containers loaded one upon the other. A container arrangement describes
the places where such stacks can be loaded. In connection with an arrangement, the word 'stack' refers to such a place. As a way of defining
many stacks at a time, there is the concept of block as described in the next paragraph.
Container loads can be added as load components into a load case. The weight, center of gravity and weight distribution are taken into account.
Containers on deck are taken into account in criteria involving the profile. Container loads are handled under task LOAD with the MASS
command.
Except for the stacks, the bays, rows and tiers of a container arrangement need not be geometrically aligned, i.e. a fixed coordinate being
associated with a given bay, row or tier number. However, there are usually subsets with this property, and for taking advantage of this in the
definitions, the block concept is available. A block is formed by a three-dimensional matrix of spaces with fixed x-, y- and z-coordinates in each
transversal, longitudinal and vertical layer, but not necessarily with uniform spacing. Within the matrix, there may be positions not corresponding
to possible container locations, which are specified in the block definition, and taken into account when loading.
A block or a set of directly defined stacks can be used as such as arrangements. However, in most cases it is useful to collect the arrangement
from separately defined parts as a combined arrangement.
BLOCK IN-HOLD C1
X, 10, 6, 1, 6, 1, 6; Y 1.5 4; Z 0.3 5
REDUCT Y>HULL -0.4; SYMMETRIC
BLOCK ON-DECK C1, B1=4 T1=6
X, 22, 12; Y 0 4; Z 11.5 6; SYMMETRIC
COMBINE C-ARR1 IN-HOLD ON-DECK
3. Properties of stacks
The following properties are relevant for stacks. The symbols given below are the names of the quantities representing the properties.
The height of the associated container type decides the vertical spacing, i.e. the height of the tiers. These heights will be modified if the stack is
loaded with containers of differing height.
4. Properties of blocks
A block is fast way of generating a set of stacks forming a regular matrix. The basic information on which the block is dependent is a set of x-, y
and z- coordinates defining the locations of the bays, rows and tiers. By separate instructions, stack specific deviations can be defined. The
numbering is always such that consecutive layers have consecutive numbers in the internal numbering system.
Other stack properties are either derived from the default container type or common instructions in the block definition. However, individual
maximum stack weights can be defined.
Comment. Presently, the only way to more directly define individual stacks is by way of a table, which is provided as a pilot level feature.
The fill colour can be used when containers are drawn so that types are distinguished by colouring The colouring can be defined as
colour or pattern indices (FCODE) or logical fill codes (LFCODE).
alignment point (LXAL, LYAL, LZAL)
The alignment point is used for controlling the position of the upper container with respect to the lower. The lowest container in a stack
obeys the alignment point of the stack. The alignment point is defined with respect to the lower limit of the logical container.
descriptive text (DES)
The descriptive text is used for documentary purposes.
The dimensions related to the container are presented using quantities referring to x-, y- and z, according to the normal orientation of the loaded
container. However, it is possible to load a container transversally, in which case the x- and y-dimensions change place.
The properties of the container types are taken into account when generating the geometry of blocks. If the dimensions are changed, the
definitions of the blocks have to be repeated.
In the internal processing, a numbering system is used that reflects spatial relations between the bays, rows and tiers. Within this system,
containers are numbered as follows:
bays are numbered 1,2,3..., in the order the bays are encountered when moving from the bow to the stern. The numbering order can be
be reversed by defining a different convention in the installation parameters or configuration parameters (see task ADM). The numbering
range actually used need not start from 1.
rows are numbered so that the center row has number 0, if any, with numbers 1,2,...on the port side and -1, -2 ... on the starboard side. If
a left-handed coordinate system is used, the numbering is reversed.
tiers are numbered 1,2,3... from below up.
It is not necessary that all internal numbers in a given range are occupied in a given arrangement.
The numbering system used in commands and output. the so-called owner numbering. is defined separately. From the system's point of view,
this numbering system can be arbitrary, and works more like labels. However, there are the functions presented below where the numbering
system is used for distinguishing bays with long and short containers. The owner numbering is defined by associating each internal number with
an owner number. This is the only place where the internal numbering is visible to the user.
The owner numbering system has a very central role in both input and output functions, and should be carefully designed and complete
before starting with the main definitions.
The bay numbering convention (aft or forward) must also be fixed in advance.
7. Management of changes
The following categories of data are involved in the system:
This paragraph gives an overview of how the dependence between these categories are handled.
The numbering system is assumed to be fixed. At least to some extent an installation level standard should be useful. There is no support for
changes in the numbering system when the container definitions have been made. However, in many cases a change of numbering may have no
other adverse effects than that the output of the DES command is incorrect.
The geometric properties of container arrangements are decided when the arrangements are defined, and generated according to the container
dimensions valid at that time. Changes in the container dimensions can only be taken into account by repeating the definitions. Other
dependencies of the container types are dynamic, i.e. applied as valid when the system is run.
A container load is stored in a way that tells what type of container is placed in a given position, expressed by bay, row and tier numbers. If the
arrangement is changed, the positions may disappear or change place and these changes will be taken into account when the load is used. A
load belonging to a nonexistent position is removed. Changes of container types are also taken into account automatically. Note also that a
container weight given as a relative one is converted to an absolute weight and recorded this way.
If the container load has been affected by any of these changes, a message is given when reading it, telling the resulting change in weight and
container count.
This logic assumes that the alignment points on the bottom and the top of the container are the same. In other cases, the difference must be
declared in the loading command (quantities XCORR, YCORR).
This facility is primarily intended for the longitudinal direction, but for symmetry, the alignment logic is provided in the y- and z-direction also.
Alignment in the y- and z- directions is considered pilot level.
The alignment point is always measured from the lower coordinate in the current direction. There is no logic for, for example, taking into account
reflections of containers.
In the example, the two lowest containers are loaded normally. For the third container, a change of alignment is given. This will automatically be
inherited by the upper containers.