Napa Manuals 2016.3-1 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7399

NAPA for Design Manuals 2016.

NAPA for Design 2016.3 Manuals


LEGAL NOTICE

The information in this manual is subject to change without notice.

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.

Copyright Napa Ltd


All rights reserved.

Product names mentioned herein may be trademarks and/or registered trademarks of their
respective companies.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 2 / 7399


NAPA for Design Manuals 2016.3

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)
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)
Ship Model (SM)
Ship Model concepts (SM)
Compartment arrangements (SM)
Structure arrangements (SM)
Outfit (SM)
Colouring and line type standards (SM)
Commands and service functions (SM)
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)
Loading Conditions (LD)
The loading conditions subsystem (LD)
Basic concepts (LD)
Lightweight definitions (LD)
Defining loading conditions (LD)
Handling load components in tables (LD)
Auxiliary definitions (LD)
On calculation (LD)
Free surface handling (LD)
Listing functions (LD)
Drawing functions (LD)
Managing processes (LD)
Frequently Asked Questions (LD)
Commands, service functions and events (LD)
Container Loading (CL)
Container loading subsystem (CL)
General principles (CL)
Defining container arrangements (CL)
Auxiliary definitions (CL)
Loading functions (CL)
Drawing functions (CL)
Output functions (CL)
Command specifications (CL)
Damage Stability (DAM)
General (DAM)
Concepts (DAM)
General calculation methods (DAM)
Methods to fill rooms with water (DAM)
Liquid loads (DAM)
Stability criteria (DAM)
Damage analysis (DAM)
Definitions (DAM)
Calculation control (DAM)
Output of results (DAM)
Administration (DAM)
Probabilistic damage stability (DAM)
Cross-flooding (DAM)
Floodable Lengths (FL)
Flooding Simulation in NAPA (DAM)
DA Commands (DAM)
DA Service Functions (DAM)
Stability Criteria (CR)
Purpose (CR)
Scope of the subsystem (CR)
Stability Criterion (CR)

Copyright © 1992 - 2016 NAPA. All rights reserved. 3 / 7399


NAPA for Design Manuals 2016.3

Calculation and output (CR)


Data concepts (CR)
Connections to other subsystems (CR)
Restrictions (CR)
General (CR)
Definition functions (CR)
Output functions (CR)
Administrative functions (CR)
Examples (CR)
CR Commands (CR)
CR Service Functions (CR)
Dredger Calculations (CR)
DNV Verified Criteria (CR)
Second Generation Intact Stability (CR)
Grain Stability (GS)
Purpose (GS)
Concepts (GS)
User's guide (GS)
Reference manual (GS)
Command reference (GS)
Inclining Test (INC)
Introduction (INC)
Defining an inclining test (INC)
Calculations (INC)
Output functions (INC)
Commands and service functions (INC)
Launching (LAU)
General (LAU)
Organisation of data (LAU)
Permanent data (LAU)
Ship data (LAU)
Case data (LAU)
Command specifications (LAU)
NAPA Steel (ST)
General description (ST)
Basis for the steel model (ST)
Definition of stiffeners (ST)
Definition of brackets (ST)
Openings in main structures (ST)
Seams and plates (ST)
Parametric shapes (ST)
Bracket drawing raw data (not visible to customers)
Various definitions (ST)
NAPA Steel Graphical User Interface (ST)
NAPA Steel administration (ST)
General about output functions (ST)
Numeric output (ST)
Graphic output (ST)
Listing functions (ST)
Special output functions (ST)
Interfaces (ST)
NAPA Steel - Aveva Marine (Tribon Hull) link (ST)
NAPA Steel examples (ST)
Generation of FE Models (ST)
Weight Calculation (WG)
General (WG)
Constructing the weight model (WG)
Administration of weight calculation (WG)
Calculations (WG)
The weight calculation task (WG)
Output functions (WG)
Summary of table calculation functions (WG)
Simple example (WG)
Example of a weight model (WG)
Graphical User Interface (WG)
Command specifications (WG)
Resistance and Propulsion (SH)
Operation of Ship Hydrodynamics subsystems in NAPA (SH)
Presenting results (SH)
Potential Flow Solver (SH)
Validation of TAHARA task results (SH)
RANS Solver (SH)

Copyright © 1992 - 2016 NAPA. All rights reserved. 4 / 7399


NAPA for Design Manuals 2016.3

Resistance calculations (SH)


Propulsion calculations (SH)
Standard macros for speed-power prediction (SH)
Vibration excitation (SH)
Fuel consumption calculations (SH)
SH-Powering Manager (SH)
CFD Hull Form Optimization Manager (SH)
Adding of optional tasks (SH)
Commands and quantities (SH)
Propeller Geometry Manager (SH)
Seakeeping (SHS)
Introduction (SHS)
Using the SHS task (SHS)
Input of ship data (SHS)
How to define regular waves (SHS)
Solving the coefficients of eqns. of motion (SHS)
Solving the equations of motion (SHS)
Relative motions in regular waves (SHS)
Responses in irregular waves (SHS)
Use of limiting criteria (SHS)
Downtime (SHS)
Long term extreme value calculations (SHS)
Output functions (SHS)
Seakeeping Manager (SHS)
Command specifications (SHS)
Maneuvering (SHM)
General description (SHM)
Defining Input Data For Maneuvering Calculations (SHM)
Using the SH and SHS Subsystems (SHM)
Introduction to the Maneuvering Subsystem of NAPA (SHM)
Input data for maneuvering calculations (SHM)
Standard Maneuvering (SHM)
Slow Speed Maneuvering (SHM)
Stationkeeping Capability (SHM)
An Example (SHM)
Commands and data items (SHM)
SHM-Manoeuvring Manager (SHM)
Optimization
General Purpose Optimization Tools
Genetic Algorithms
Offshore Structures
Offshore Structures General
OSS Manager
Example Collection: Semi-Submersible
List Output (LIST)
Listing and documents (LIST)
General functions related to list output (LIST)
Translation function (LIST)
Output of stored lists (SCAN) (LIST)
Standard table output module (LQ, TOO) (LIST)
Documentation system (LIST)
Creating documents with DocBook (LIST)
Drawing (DR)
Graphics and drawing (DR)
General Graphics Functions (DR)
OpenGL Graphics and Tools (DR)
General drawing task (DR)
Drawing of arrangement plans (DR)
Using Drawing Tools (DR)
Making shell expansion plans (DR)
Drawing of diagrams (task DIAG) (DR)
Standard diagram output module (PQ,POO) (DR)
Device oriented service (DR)
Commands and functions of the drawing task (DRAW) (DR)
Table Calculation (TAB)
Table calculation module (TAB)
Administration of tables (TAB)
Defining a table (TAB)
Entering table values (TAB)
Data processing with tables (TAB)
Output functions for tables (TAB)
Exporting and importing tables (TAB)

Copyright © 1992 - 2016 NAPA. All rights reserved. 5 / 7399


NAPA for Design Manuals 2016.3

Collection of examples (TAB)


Work areas and service functions with NAPA tables (TAB)
Commands and functions (TAB)
NAPA BASIC
Programming macros (NAPA BASIC)
NAPA BASIC statements
Comprehensive example of a macro
NAPA Manager
Variable definition tables
Manager
How to create a NAPA Manager application
Manager application developer's guide
Optimisation in NAPA Managers
Manager Applications
Anchoring Check (ACP)
Aveva Marine / Tribon interface Manager (TRIBON)
Ballast Exchange (BALLAST)
Inner Bottom of Bulk Carrier (BCH)
Bulk Carrier Manager (BULK_CARRIER)
NUPAS-Cadmatic Export Manager (CAD)
Panelisation Manager (NPN)
CFD Manager
Contract Design Manager (CONTRACT_DESIGN)
Container Manager (CONTAINER)
Drawing Manager (DRAWING)
Dredger Manager (DREDGER)
Longitudinal Strength Analysis (ENV)
ExportDB Manager (EXPORTDB)
Finite Element Meshing (FEM)
Free Form Deformation Manager (FFD)
Insulating Manager
Flooding Angle Tables Manager (FLDANG)
Flooding Simulation Manager (FLOODING_SIMULATION)
Freeboard Manager (FREEBOARD)
HOPE Manager (HOPE)
Hull to Offset Manager (HULL_TO_OFFSET)
Hull Form Manager (HULL_TRANSFORM)
Inclining Test Manager (INCLINING)
Launching Manager (LAUNCHING)
Lightweight Manager (LIGHTWEIGHT)
MARPOL Manager (MARPOL)
Offshore Structures Stability (OSS)
Optimisation (GENERAL_OPT)
Painting Manager (PAINTING)
Probabilistic Damage (PROB)
Radius of Gyration (RADIUS_OF_GYRATION)
Scantling Evaluation Manager (SCANTLING_EVALUATION)
SH-Powering Manager (SH-POWERING)
SHM-Manoeuvring Manager (SHM-Manoeuvring)
SHS-Seakeeping Manager (SHS-Seakeeping)
Ship Model (SHIP_MODEL)
Sounding Tables Manager (SOUNDING_TABLES)
Stability Booklet Manager (STABILITY_BOOKLET)
Steel Production Cost Manager (ST.COST)
Steel Manager (STEEL)
Steel Material Manager (STEEL_MATERIALS)
Longitudinal strength limit curves (STRLIM)
Tonnage measurement (TONNAGE_1969)
Training Manager (TRAINING)
NAPA Model Verification (VERIFY)
Visibility Check (VISIBILITY)
Second Generation Intact Stability calculations Manager (SGIS)
Lloyd's Register - NAPA - Statutory Computational Manager (LR_SCM)
Interface to Rules (INTERFACE_TO_RULES)
Emergency Response (ER)
General (ER)
Administration (ER)
Graphics Area (ER)
Condition Tree and Architecture (ER)
Table Area (ER)
Working with NAPA ER (ER)
Results (ER)

Copyright © 1992 - 2016 NAPA. All rights reserved. 6 / 7399


NAPA for Design Manuals 2016.3

Output (Printing) (ER)


Customising NAPA ER (ER)
Quantity Standard (FORM)
Example Collection: Container Ship
Introduction
Establishing a new project and set up reference system
Hull Definition
Hydrostatic Calculations
Reference Surfaces
Surface Objects
Room Definition
Arrangement Definition
Container Arrangements
Container Loading
Defining Loading Conditions
Capacities
Intact Stability Calculation
Probabilistic Damage Calculations
Making a lines drawing
Drawing and printing graphics in NAPA
Selected User Meeting Workshops
General information
Administration of the NAPA system (1998)
Geometry and Hull Form
NAPA Ship Model
Damage Stability Calculations
Stability Criteria Workshops
Grain Stability Calculations (2008)
NAPA Steel
Weight and cost estimation (2002)
Macros and NAPA Basic
Resistance and CFD
Documents and reports
Optimization Workshop
Release Notes
Release Notes for older NAPA Releases
Release Notes 2016.2
Release Notes 2016.1
Release Notes 2015.4
Update Info 2015.3
Update Info 2015.2
Update Info 2015.1
Update Info 2014.4
Update Info 2014.3
Update Info 2014.2
Update Info 2014.1
Update Info 2013.4
Update Info 2013.3
Update Info 2013.2
Update Info 2013.1
Update Info 2012.2
Update Info 2012.1
Update Info 2011.3
Update Info 2011.2
Update Info 2011.1
Update Info 2010.2
Installation Instructions
NAPA Installation Instructions
NAPA Licensing Instructions
NAPA Drafting Licensing instructions
How-to articles

Copyright © 1992 - 2016 NAPA. All rights reserved. 7 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 8 / 7399


NAPA for Design Manuals 2016.3

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.

2. How to read this manual


The various font types used in this manual have the following meanings:

... normal text...

... NAPA prompt, message, list, output, etc...

Screenshots are used to illustrate the use of graphical tools. The following notations are used to denote the use of the pointer:

Click: a normal click on the left mouse button.


Right-click: a normal click on the right mouse button.
Double-click: a rapid double-click on the left mouse button.

Moving within the menu system will be presented in the following way:

Window: item on a menu bar> item in a drop-down menu

Copyright © 1992 - 2016 NAPA. All rights reserved. 9 / 7399


NAPA for Design Manuals 2016.3

For example:

Main Window: Project > New Project...

A menu bar displaying a drop-down menu

Exercise: Exercises are highlighted with blue borders.

Note! Important notes are displayed in a yellow highlighted box.

Copyright © 1992 - 2016 NAPA. All rights reserved. 10 / 7399


NAPA for Design Manuals 2016.3

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:

1. Starting a NAPA session and moving around


1.1. Creating a user name
2. Main Window
2.1. Opening a project
2.2. Moving between tasks
3. Creating a new project
4. The reference system
4.1. Defining the frame system
4.2. Coordinate system
4.3. Calculation accuracy

1. Starting a NAPA session and moving around


NAPA is started by clicking on the NAPA icon on the desktop or in the way specified by your organisation's NAPA administrator. The procedure
for starting the NAPA executable file may vary from one organisation to another.

NAPA desktop icon


After clicking on the icon, the NAPA welcome screen will appear. The screen includes copyright information and details concerning licensing.

NAPA welcome screen

Copyright © 1992 - 2016 NAPA. All rights reserved. 11 / 7399


NAPA for Design Manuals 2016.3

Next, the NAPA Login dialog box will open:

NAPA Login dialog box


The user's NAPA login initials are typed in the User ID field. The field's default value is the user's login name in the operating system.

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.

Clicking the OK button will open the NAPA Main Window.

1.1. Creating a user name

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).

INST?>USER JOHN P 'John Doe'


INST?>OK

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 12 / 7399


NAPA for Design Manuals 2016.3

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.

2.1. Opening a project

To open an existing project, select:

Main Window: Project > Open Project

or click the Open Project

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:

Main Window: Project > Open Project From File

Copyright © 1992 - 2016 NAPA. All rights reserved. 13 / 7399


NAPA for Design Manuals 2016.3

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.

2.2. Moving between 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.

A task is entered simply by giving its name as a command:

TASK?>DR
* BEGIN Definition and drawing (GM) *
--- DRAWING ---
DR?>

Alternatively, a task can be launched from the Task menu in the Main Window:

Main Window: Task > Geometry > Drawing Functions

The END command will bring you back one level in the task hierarchy:

DR?>END
GM?>END
TASK?>

The !END command, the keyboard menu shortcut Ctrl+E, or selecting

Main Window: Task > End Task

will bring you back directly to the main level.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 14 / 7399


NAPA for Design Manuals 2016.3

3. Creating a new project


To create a new project, select:

Main Window: Project > New Project...

Copyright © 1992 - 2016 NAPA. All rights reserved. 15 / 7399


NAPA for Design Manuals 2016.3

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.

Exercise: Create a new project as instructed in the above example.

4. The reference system


For every version of a project, there is the so-called reference system, providing background data and control of various functions. 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 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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 16 / 7399


NAPA for Design Manuals 2016.3

LIST List of reference dimensions.

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:

TDWL Design draught.

LREF Reference length.

BREF Reference breadth

FRAMES Initial frame spacing

The following parameters are assigned default values on the basis of the above parameters:

AP, FP Aft and fore perpendiculars.

XREF Reference x-coordinate where draught is measured.

XMID Largest section; used for calculating frame areas and CP.

XMIN, XMAX Fore and aft ends of the hull.

BMAX, HMAX The maximum breadth and height of the hull.

Below is the reference system of our example ship:

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

REF ref. surface arrangement


ARR compartments arrangement
STR structure arrangement
OPE opening arrangement

Copyright © 1992 - 2016 NAPA. All rights reserved. 17 / 7399


NAPA for Design Manuals 2016.3

EQP equipment arrangement


LIGV ref. lightweight version

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

Control and conventions


GMTO 0.000475 polygonization tolerance
GMMX max. segm. length
GMTP M2 curve generation method
GMST surface type (PATCH)
AACC 5.1168 absolute accuracy
RACC 0.005 relative accuracy
ACCL F accuracy class
COOR RIGHTHANDED coordinate system
TRIM 1 sign of trim by head
BAYN -1 bay numbering
INTO 0.001 balancing tolerance
ECO ON end corrections
LW ON abbreviation of LONG/WEB (ON)
FIG figure storage (DB4)
LST list storage (DB4)
UTC ON appl. of universal time (ON)
WLS OFF waterline sections
BMET NORMAL balancing method

Identification and background


SNAM '' ship name
YDNR '' yard number
OWNE '' owner
FLAG '' country
CLAS '' classification authority
NAVA '' navigation area
SHTY '' ship type
PRTY '' propulsion machinery

Various parameters
NPA 0 number of passengers

Copyright © 1992 - 2016 NAPA. All rights reserved. 18 / 7399


NAPA for Design Manuals 2016.3

PAYL 0 weight of payload

Copyright © 1992 - 2016 NAPA. All rights reserved. 19 / 7399


NAPA for Design Manuals 2016.3

VSS 0 service speed


PBT 0 engine power

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.

4.1. Defining the frame system

The frame system is defined by using the FRA command in the reference system. The full syntax of the command is:

FRA xfr0 dx1 fr1 dx2 fr2 dx3 ...

in which

xfr0 X-coordinate of frame 0

dxi Frame spacing from fri-1 to fri

fri Frame number where the spacing changes

The command and its interpretation are illustrated by the following figure:

FRA 0 0.6 28 0.71 106 0.6

Copyright © 1992 - 2016 NAPA. All rights reserved. 20 / 7399


NAPA for Design Manuals 2016.3

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.

4.2. Coordinate system

The coordinate system used in NAPA is:

X in the longitudinal direction.


Y in the transversal direction.
Z-coordinate representing heights.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 21 / 7399


NAPA for Design Manuals 2016.3

4.3. Calculation accuracy

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:

Fast – Good performance and adequate accuracy (Default).


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.
Offshore – Best possible accuracy, possibly slower. Intended for offshore type structures.

Copyright © 1992 - 2016 NAPA. All rights reserved. 22 / 7399


NAPA for Design Manuals 2016.3

The following tolerances are controlled with the parameter ACCL:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 23 / 7399


NAPA for Design Manuals 2016.3

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.

2. Dependencies between application subsystems


NAPA is an integrated system, meaning that all functions share a common database, and one can move between the functions without obstacles.
The division of functions into subsystems is purely an administrative aid to help the user orientate within the system and to help the developers of
the system control an otherwise overly complicated entity.

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.

3. Hull Form and Basic Geometry (GM)


The purpose of the Hull Form and Basic Geometry (GM) subsystem is to handle geometric tasks associated with ship design. These tasks
mainly concern the hull form and the ship's internal geometry. The Geometry subsystem treats curves, surfaces, and rooms as purely geometric
objects. Functions provided by the Geometry subsystem can be divided into the following five main categories.

Copyright © 1992 - 2016 NAPA. All rights reserved. 24 / 7399


NAPA for Design Manuals 2016.3

3.1. Hull definition

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.

3.2. Inner structures

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.

3.3. Drawing functions

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.

3.4. Panel Generation and Interface

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.

3.5. Link functions

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.

4. Ship Model (SM)


The ship model, the description of the ship, is the heart of NAPA. The contents of the ship model may vary from a little more than a hull form to a
complete description containing all compartments, decks, and bulkheads. The Ship Model (SM) subsystem handles the organisation of all these
elements and their non-geometric properties.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 25 / 7399


NAPA for Design Manuals 2016.3

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.

7. Loading Conditions (LD)


The Loading Conditions (LD) subsystem comprises the calculation of the ship’s floating position, longitudinal strength, and stability for different
loading conditions.

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.

7.1. Inclining Test (INC)

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.

8. Damage Stability (DA)


The Damage Stability (DA) subsystem comprises the analysis of the ship’s survivability in a damaged (flooded) condition and the calculation of
stability in accordance with the rules set by authorities.

Damage cases can be defined manually or they can be generated automatically for a specified subdivision.

The main tasks of this subsystem are to:

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.

9. Flooding Simulation (DAFS)


The Flooding Simulation (DAFS) tool calculates progressive flooding and the floating position of a damaged ship in the time domain with a given
time step. The features include progressive flooding through modelled openings (Bernoulli’s equation), calculation of air compression and airflows,
and calculation of the floating position (ship motions).

10. Stability Criteria (CR)


The Stability Criteria (CR) subsystem comprises the calculation of minimum stability requirements for an intact or a damaged ship in accordance
with the rules set by authorities.

The main tasks of this subsystem are to:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 26 / 7399


NAPA for Design Manuals 2016.3

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).

11. Launching (LN)


In the Launching (LN) subsystem, only aft-first launching is implemented (straight and cambered slipway). The calculations include speed,
distance, draught, pressure against the slipway, the anti-tipping moment, and clearances to slipway and seabed.

12. Grain Stability (GS)


The Grain Stability (GS) subsystem contains the definitions needed for the application of the grain stability rules, the calculation of grain shift
moments, and the evaluation of the grain stability criteria.

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.

13. Container Loading (CL)


The Container Loading (CL) subsystem contains functions for designing container arrangements, defining container loads, and calculating the
resulting weight, distribution, and effect on the lateral wind area.

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.

14. Freeboard Calculation (FRB)


The Freeboard Calculation (FRB) subsystem comprises functions for determining minimum freeboards in accordance with the adoption of the
amendments to the protocol of 1988 relating to the International Convention on Load Lines 1966 (MSC.143(77)). The functions include:

Definition of effective length of superstructures.


Definition of sheer.
Determination of minimum freeboards, minimum bow height, and reserve buoyancy according to the rule.

15. Offshore Structure Stability (OSS)


The Offshore Structure Stability (OSS) subsystem comprises tools required to evaluate the stability of floating structures around an arbitrary
axis subjected to an external wind force moment, in conjunction with the Stability Criteria (CR) subsystem.

16. Emergency Response (ER)


The Emergency Response (ER) subsystem comprises tools required to evaluate the stability and strength of floating structures subjected to
arbitrary damages and grounding. Graphical user interfaces have been developed for the definition and analysis of various rescue and damage
scenarios.

17. Resistance and Propulsion (SH)


The basic ship hydrodynamics and powering module, the Resistance and Propulsion (SH) subsystem, contains tasks for geometric data
handling, all important statistical and empirical resistance prediction methods, a general-purpose propeller optimiser, a versatile propeller analysis
task, and methods to predict propeller-induced vibration excitation.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 27 / 7399


NAPA for Design Manuals 2016.3

18. General Seakeeping (SHS)


The geometry routines of the General Seakeeping (SHS) subsystem contain one task to extract strip theory input data of a slender hull and
another routine to generate plane facets on a wetted surface of a hull, to be used in 3D linear diffraction calculations.

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.

19. Manoeuvring (SHM)


The Manoeuvring (SHM) subsystem can be used for all kinds of time domain studies of ship motions. It contains easy-to-use tasks for normal
manoeuvring simulations, such as turning circles, pull-out tests, zig-zag tests, and spiral and reverse spiral tests. It also includes the calculation of
directional stability and steering quantity indices.

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.

20. Seakeeping 3D Panel Method (SOUR)


The Seakeeping 3D Panel Method (SOUR) is an add-on feature of the General Seakeeping (SHS) subsystem. The functionality of the 3D Panel
Method includes:

Calculation of panels on a wet hull surface.


Motion transfer functions, by means of the 3D panel method, for zero speed.
Modelling of external springs.
Wave drift forces and moment.

21. Viscous Flow Solver (RANS)


The Viscous Flow Solver (RANS) calculates the 3D flow field around the ship hull form. This data can be used to optimise the hull form design
and provide a reliable prediction of the bare hull resistance and wake fraction. Externally generated meshes and meshes generated using the Vol
ume Mesh Generation feature (included as part of RANS) can be used as the basis for the calculation.

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.

22. Potential Flow Solver (TAHARA)


The Potential Flow Solver (TAHARA) calculates the calm water resistance due to wave formation and the wave system of a symmetric hull form
moving at constant speed. A linear Rankine source 3D panel method is used in the solution of the potential flow. The 3D panel model used must
be generated with the NAPA Panel Generation and Interface tool.

23. NAPA Steel (ST)


NAPA Steel is a system for ship structural design at the early design stages. The NAPA Steel model can be built quickly and flexibly for any ship
type, to the detail level necessary for the classification of structures.

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.

24. FEM Mesh Generation and Interface (FEM)


The FEM Mesh Generation and Interface (FEM) feature generates a FEM mesh of the NAPA structural model. The FE model is the outcome of

Copyright © 1992 - 2016 NAPA. All rights reserved. 28 / 7399


NAPA for Design Manuals 2016.3

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.

25. Optimisation (OPT)


The Optimisation (OPT) feature provides tools for carrying out optimisation studies and analyses. Optimisation can be conducted for any of
NAPA's modelling and calculation tasks and, optionally, for executing external applications within an optimisation loop. Any design that can be
created in NAPA can be optimised with the optimisation tools.

26. Weight and Cost Calculation (WG)


The Weight and Cost Calculation (WG) subsystem comprises calculation of the ship’s weight, centre of gravity, weight distribution, and
moments of inertia.

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.

A reference ship can be used as a source of data or for comparisons.

The weight distribution can be transferred for use in loading conditions.

Copyright © 1992 - 2016 NAPA. All rights reserved. 29 / 7399


NAPA for Design Manuals 2016.3

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:

1. NAPA executable file


2. Files and units
2.1. Data hierarchy
3. Projects and versions
4. User interface
4.1. Working in the Command input area
5. NAPA commands
6. Getting help with commands
7. System messages
8. Text Editor
8.1. Writing command sequences
8.2. Editing NAPA definition descriptions
9. Table Editor
10. List Window
11. Plot and Geometry Windows
12. Calculator
13. Macros and NAPA Basic
13.1. What is a macro
13.2. Identifying programmed parts in a macro
13.3. NAPA Basic

1. NAPA executable file


The NAPA system is located in an executable file. For example, napa111.exe contains the NAPA 2011.1 version of the system.

2. Files and units


Within NAPA, data are assembled into several files called units, thus making it possible to separate project-specific data from general data:

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:

napaintro.db - in the project database (unit 1)


napaintro.sd - in the secondary database (unit 4)
sysdb.db - in the system database (unit 2)
napadb111.db - in the NAPA database of Release 2011.1 (unit 7)

2.1. Data hierarchy

The currently open databases can be listed with the !OPEN LIST command, for example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 30 / 7399


NAPA for Design Manuals 2016.3

TASK?>!OPEN LIST

Currently open database units + IOF


1 pr\napastar.db (D:\Napa\pr\napastar.db)
2 pr\SYSDB.DB (D:\Napa\pr\SYSDB.DB)
4 pr\napastar.sd (D:\Napa\pr\napastar.sd)
7 pr\NAPADB112.DB (D:\Napa\pr\NAPADB112.DB)
8 pr\IOF.DAT (D:\Napa\pr\IOF.DAT)

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:

NAPA database units and their hierarchy

3. Projects and versions


One project can consist of several versions. Each version in the project database contains an independent set of data. For example, the hull

Copyright © 1992 - 2016 NAPA. All rights reserved. 31 / 7399


NAPA for Design Manuals 2016.3

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:

Project version drop-down list.

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.

4.1. Working in the Command input area

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:

Main Window: Edit > Toggle Edit Mode

or by pressing the Ctrl+M keys.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 32 / 7399


NAPA for Design Manuals 2016.3

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:

Main Window: Edit > Copy/Paste

Main Window: Command input area - right-click >

Keyboard: Ctrl+C (Copy) and Ctrl+V (Paste)

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:

Separating commands with a semicolon (;):


COLOUR RED; PLOT HULL
Finishing a line with a comma (,) to continue the command on the next line:
POLYGON (0 0) (10 0),
(10 10) (0 10) (0 0)

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:

TEXT 'Fore peak' (100,12)

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.

6. Getting help with commands


Not all of NAPA's commands are available simultaneously; only those that belong to the current task are. The !COM command produces a list of
commands available in the current task. In the following example, we will first move to the Administration (ADM) subtask and then check the list of
available commands:

Copyright © 1992 - 2016 NAPA. All rights reserved. 33 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 34 / 7399


NAPA for Design Manuals 2016.3

ADM?>!EXP DELETE

DELETE delete project(s)


--------------------------------------------------------------------------
-----
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.

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:

Main Window: Help > Help Viewer...

Copyright © 1992 - 2016 NAPA. All rights reserved. 35 / 7399


NAPA for Design Manuals 2016.3

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

fore perpendiculars, and the calculated trim range should by at least

tmin-tmax ... tmax...tmin.

Copyright © 1992 - 2016 NAPA. All rights reserved. 36 / 7399


NAPA for Design Manuals 2016.3

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.

The Text Editor is started by selecting:

Main Window: Tools > Text Editor

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.

8.1. Writing command sequences

The Text Editor works as a regular full screen editor and allows normal editing actions that can be found on the Edit menu:

Text Editor: Edit >

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 37 / 7399


NAPA for Design Manuals 2016.3

All of the plotting commands can be run by clicking the Run button on the toolbar. They can also be run by selecting:

Text Editor: File > Run

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:

Text Editor: File > Save As...

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.

To save a macro in an external text file, use the following alternative:

Text Editor: File > Save As File...

Copyright © 1992 - 2016 NAPA. All rights reserved. 38 / 7399


NAPA for Design Manuals 2016.3

To open an existing macro, select:

Text Editor: File > Open...

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.

8.2. Editing NAPA definition descriptions

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.

An example using the demo ship D-CONT111:

Text Editor: File > Get Definition...

Select HULLF:

Using the Get Definition button (>>) on the toolbar would have produced the same result.

Copyright © 1992 - 2016 NAPA. All rights reserved. 39 / 7399


NAPA for Design Manuals 2016.3

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 and all curve definitions.

>> **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:

Openings in the opening arrangement table.


Compartments in the general arrangement table.
Purposes in the compartment parameters table.
Lightweight elements.

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:

Main Window: Tools > 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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 40 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 41 / 7399


NAPA for Design Manuals 2016.3

Any table can be exported from NAPA in CSV format for use, for example, in MS Excel. This is can be done by selecting:

Table Editor: File > Export to CSV...

Existing CSV tables can also be imported to NAPA:

Table Editor: File > Import from CSV...

10. List Window


Whenever a list is created, the output is sent to the Main Window. However, the List Window can be used instead, which allows the user to
send the list to the printer easily. The List Window is opened by selecting:

Main Window: Tools > List Window

Copyright © 1992 - 2016 NAPA. All rights reserved. 42 / 7399


NAPA for Design Manuals 2016.3

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.

11. Plot and Geometry Windows


When graphical output is generated, the result is automatically sent to the open graphics area. If no graphics area is open at the time, NAPA will
open one in a pane above the command area in the Main Window:

Copyright © 1992 - 2016 NAPA. All rights reserved. 43 / 7399


NAPA for Design Manuals 2016.3

More sophisticated functionality for zooming, projections, and printing is available in the Plot and Geometry Windows, which are opened by
selecting:

Main Window: Tools > Plot Window

Copyright © 1992 - 2016 NAPA. All rights reserved. 44 / 7399


NAPA for Design Manuals 2016.3

Main Window: Tools > Geometry Window

Copyright © 1992 - 2016 NAPA. All rights reserved. 45 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 46 / 7399


NAPA for Design Manuals 2016.3

TASK?>!EXP C.SQRT

SQRT square root


--------------------------------------------------------------------------
-----

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

13. Macros and NAPA Basic


The development of what later would become the NAPA system began already in the 1970s, and the first programme code emerged in the early
1980s. At that time, no graphical user interface (GUI) was available and everything was operated with commands. Typing the same commands
over and again for repeated tasks can be time-consuming, but by automating the commonly used command sequences work can be made more
efficient. Even today, in an era of plenty of effects and nice graphics, these series of commands can accomplish the work faster than when using
the mouse to point and click.

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.

13.1. What is a macro

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

13.2. Identifying programmed parts in a macro

Each line in a macro, unless separately flagged, is considered to be a NAPA command. Programmed components, such as variables or

Copyright © 1992 - 2016 NAPA. All rights reserved. 47 / 7399


NAPA for Design Manuals 2016.3

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

13.3. NAPA Basic

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 48 / 7399


NAPA for Design Manuals 2016.3

Design process flow in NAPA


This chapter provides general information on the design process, explaining the necessary steps in defining a project from a draft to a completed
ship model, including preliminary calculations.

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.

NAPA design process and command prompts


Table of Contents:

1. Starting a new project


2. Hierarchy of geometric elements
3. Hull geometry
4. Reference system update
5. Hydrostatics
6. Reference surfaces and rooms
7. Ship model
8. Compartment capacities
9. Lightweight
10. Loading conditions
11. Damage stability
12. Criteria study

1. Starting a new project


A new project is started by giving it a name (max. 24 characters), a descriptive text, the initial main dimensions (L, B, T), and the initial frame
spacing. The information on the main dimensions is used to scale the graphics area. When the geometry is finished, the reference system is
updated according to the actual geometry.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 49 / 7399


NAPA for Design Manuals 2016.3

2. Hierarchy of geometric elements


The following figure illustrates the hierarchy of geometric elements in NAPA. The smallest components are points (definition points and point
objects) and angles. They are usually not defined separately but in connection with defining curves.

Hierarchy of geometric elements


Surfaces can be defined by using several different methods:

General patch surfaces are defined as a grid of curves.


Special surfaces, such as planes, cylinders, double cylinders, and rotation surfaces, are defined by using specific definition commands.
A surface can also be a combination of partial surfaces.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 50 / 7399


NAPA for Design Manuals 2016.3

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.

4. Reference system update


Once the hull geometry has been defined, the reference system should be updated. Instead of the initial main dimensions given when the project
was created, the actual main dimensions are measured from the hull geometry. It is the user's responsibility to check that the values used in the
reference system are selected correctly. The values from the reference system are used in different calculations later on in the design process.

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.

6. Reference surfaces and rooms


The next phase in the definition process is to define the inner geometry. The recommended method is to define first, as reference surfaces, the
topologically most important surfaces, such as watertight bulkheads and decks. The rooms will then be limited to these surfaces directly or
indirectly. The advantage of this method is that if, for example, the position of one bulkhead is altered, all rooms will follow the modification without
requiring the unnecessary manual work of redefining each room separately.

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.

10. Loading conditions


The behaviour of a loaded ship is analysed in the Loading Conditions (LD) task. Before creating loading cases at least one lightweight version
should be defined.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 51 / 7399


NAPA for Design Manuals 2016.3

11. Damage stability


The behaviour of a damaged ship is analysed in the Damage Stability (DA) task. The definitions required are the initial conditions, that is the
floating position and liquid loads before the damage. Damages are defined as independent objects. A damage case is created by combining the
initial condition with the damage definition.

12. Criteria study


Loading cases can be checked against intact stability criteria and damage cases against damage stability criteria in the Stability Criteria (CR) tas
k.

The definitions required for criteria study include openings, margin line, profile curve, freeboard deck edge, and so on.

Copyright © 1992 - 2016 NAPA. All rights reserved. 52 / 7399


NAPA for Design Manuals 2016.3

Curves and point objects


Table of Contents:

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.

Examples of a NAPA grid of curves and a hull surface


To be able to use the editor efficiently, the user needs to be aware of the curve definition syntax and some other basic principles. First, this
chapter will introduce hull surface definition made using the traditional command-based method. Then, once the curves limiting the surface have
been defined, the Hull Surface Editor is taken into use.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 53 / 7399


NAPA for Design Manuals 2016.3

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.

There are also different methods for generating curves:

M2; a spline with continuous curvature (default).


M1 (SPLINE); a spline with discontinuous curvature.
STD; polygon (older NAPA projects).

The default curve type is set as the GMTP parameter in the REF task. The GMTO parameter will set the polygonisation tolerance.

3. Curve definitions with a location surface


The syntax of a curve definition is:

CUR name 'explanatory text'


location surface
definition of the shape/projection
side condition (optional)

In other words, a curve is defined with three or four commands. They are:

Name of the curve and, optionally, a descriptive text.


The location surface of the curve.
The shape or projection of the curve on one of the main planes (xy, xz, or yz).
Optionally, a side condition.

The definition is finished off by giving the OK command if working in the command mode. For example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 54 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 55 / 7399


NAPA for Design Manuals 2016.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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 56 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 57 / 7399


NAPA for Design Manuals 2016.3

As can be seen from the above examples, a curve is defined by points. Points can be given:

Directly with coordinates as in the previous examples.


By referring to an existing curve (the intersection point).
By using point objects.

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.

4. Sorting definition points


The order of a curve's points is sorted automatically unless otherwise specified. The points are sorted according to the ascending values of the
coordinate given by the first character of the shape definition (for example, xy; .... > points will be sorted according to the ascending x). The
resulting order of the points determines the direction of the curve.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 58 / 7399


NAPA for Design Manuals 2016.3

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:

YX (2 1.5) (0 0) (1 1) ..... (original definition)

YX (0 0) (1 1) (2 1.5) ..... (sorted by NAPA)

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)

Xy (2 2) (3 4) (3.5 1) (4.5 3) as sorted by NAPA


Automatic sorting can be prevented by using the asterisk (*) option. The following example demonstrates the effect of this option. The definition
points remain the same as in the previous example, but the * option is applied:

Copyright © 1992 - 2016 NAPA. All rights reserved. 59 / 7399


NAPA for Design Manuals 2016.3

CUR EXAMPLE7
Z 0
XY * (2 2) (3 4) (4.5 3) (3.5 1)

Asterisk (*) prevents automatic sorting


Finally, let us examine the effect of changing the order of the coordinates (from xy to yx) in curve shape definition:

CUR EXAMPLE8
Z 0
YX (2 2) (3 4) (4.5 3) (3.5 1)

Yx (3.5 1) (2 2) (4.5 3) (3 4) as sorted by NAPA

Copyright © 1992 - 2016 NAPA. All rights reserved. 60 / 7399


NAPA for Design Manuals 2016.3

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).

The following curve shape is defined as:

YZ A /45 0/ B /60 C

This should be interpreted as:

Start from point A at an angle of 45 degrees.


Enter point B at an angle of 0 degrees.
Leave point B at an angle of 60 degrees.
Enter point C without any angle condition.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 61 / 7399


NAPA for Design Manuals 2016.3

Note!: 'Before' and 'after' depend on the direction of the curve.

If an angle condition is not defined, NAPA will calculate the angle using the curve generation method set in the reference system.

5.1. Free angle

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 62 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 63 / 7399


NAPA for Design Manuals 2016.3

CUR EXA3
Z 0
XY (15 55) 0/ (30 25) (55 15)

CUR EXA4
Z 0
XY (15 55) /-45 (30 25) (55 15)

Copyright © 1992 - 2016 NAPA. All rights reserved. 64 / 7399


NAPA for Design Manuals 2016.3

CUR EXA5
Z 0
XY (15 55) (30 25) /- (55 15)

CUR EXA6
Z 0
XY (15 55) -/ (30 25) /- (55 15)

Copyright © 1992 - 2016 NAPA. All rights reserved. 65 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 66 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 67 / 7399


NAPA for Design Manuals 2016.3

Points are arranged according to the ascending x value

CUR EXA12
Z 0
YX (15 55) (30 20) /- (55 15)

Points are arranged according to the ascending y value


Note particularly the difference between curves EXA11 and EXA12. The only difference between their definitions is that the shape definition part
of EXA11 begins with xy, while EXA12 has it in the reverse order. The curves, however, look completely different. Alteration of the shape
definition from xy to yx causes the points to be sorted according to the increasing y instead of the increasing x. In this case, the definition reversed
the direction of the curve, and as the free angle condition is after point (30 20), the arranging order defines which side is after.

6.1. Roundings

Rounding options are used to create roundings to curves. For more options, use !EXP ROUND/GEN in the DEF task.

Copyright © 1992 - 2016 NAPA. All rights reserved. 68 / 7399


NAPA for Design Manuals 2016.3

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.

CUR FRF; X 97.224


YZ * (0,0), -/, (12.2,0), (14.887,1.113), (16,3.8), /-,
(16,20.1)
SC , M

CUR FRF-ROUND; X 97.224


YZ * (0,0), ROUND=3.8/, (16,0), (16,20.1)
SC , M

Main frame with point definitions and using rounding option

7. Multiple intersection points between curves


When a curve refers to another curve, and there are several possible intersection points, all intersection points are used by default. If only some of
the points are needed, or if different angles need be added to the points, it is necessary to identify them.

A typical example would be a frame located in the area of the bulbous bow:

Copyright © 1992 - 2016 NAPA. All rights reserved. 69 / 7399


NAPA for Design Manuals 2016.3

STEM and FRF1 with three possible intersection points


In the case shown above, two separate frame curves are required: one for the bulbous bow and the other for the upper part.

The following syntaxes can be used to identify the intersection points:

STEM/Z=5 Use the intersection point where the z-coordinate is exactly 5 metres.

STEM/Z<5 Use the intersection point below the z-coordinate 5 metres.

STEM/Z>5 Use the intersection point above the z-coordinate 5 metres.

STEM/Z=#5 Use the intersection point closest to the z-coordinate 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

Copyright © 1992 - 2016 NAPA. All rights reserved. 70 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 71 / 7399


NAPA for Design Manuals 2016.3

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:

SC P = the limiting curve for a flat plane, same as angle /0


SC M = the main frame (defines the maximum of y)
SC -//- = a free angle in and out (knuckle), same as angle /-

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 72 / 7399


NAPA for Design Manuals 2016.3

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:

It can be used to designate a point as the intersection between two curves.


The starting angle of a curve is defined so that it shares the tangent plane implied by the referenced curves.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 73 / 7399


NAPA for Design Manuals 2016.3

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.

10. Point objects


A point object is the simplest possible geometric object in NAPA. It can be defined:

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.

The basic syntax of a point object is:

POI name (x y z)

Copyright © 1992 - 2016 NAPA. All rights reserved. 74 / 7399


NAPA for Design Manuals 2016.3

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

An existing point object can be translated to create a new one:

POINT P3 P1(Y+1 Z-2)

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.

11. The xyz curve


A curve without a location surface is defined as a group of (x y z) coordinates. Note that point objects can be used but references to other curves
always require more information than just the name as there is no location surface available to define the point on the curve. An example of the
various possibilities of giving points:

CURVE XYZ_EX
XYZ (0 1 2) P1 FRA1/TA1 FRA/Z=5

in which

(0 1 2) is the coordinate point.


P1 is a point object.
FRA1/TA1 is the intersection point between two curves.
FRA/Z=5 is the point on FRA at z=5.

Angle conditions should be also given with plane or optionally with vectors:

Copyright © 1992 - 2016 NAPA. All rights reserved. 75 / 7399


NAPA for Design Manuals 2016.3

XYZ (0,0,0) /*(0,1,0) *(1,0,0)/ (1,1,0)


XYZ (0,0,0) /Z=90 Z=0/ (1,1,0)

For more information on the xyz curve, use the !EX XYZ command at the C> prompt.

12. Using naming standards


A naming standard should be followed in curve definitions. Although NAPA does not enforce the use of a naming standard, it is highly
recommended to use one as it will help identify objects and their locations and will minimize the risk of accidental overwriting. The standard
names are usually company-specific.

The following naming standard is used in this manual:

FRM The main frame of a ship without a parallel mid body

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

DECKM The deck curve of the mid body

CLM The centre line of the mid body

FSM The flat side (side tangent) of the mid body

FBM The flat bottom (bottom tangent) of the mid body

STEM Stem curve

DECKF The deck curve of the fore body

FSF The flat side of the fore body

FBF The flat bottom of the fore body

KNFn A knuckle line in the fore body (KNF1, KNF2, ...)

FRFn A frame in the fore body (FRF1, FRF2, ...)

WLFn A waterline in the fore body (WLF1, WLF2, ...)

TFn A space curve in the fore body (TF1, TF2, ...)

STERN Stern curve

DECKA The deck curve of the aft body

TRANS Transom

FSA The flat side of the aft body

FBA The flat bottom of the aft body

KNAn A knuckle line in the aft body (KNA1, KNA2, ...)

FRAn A frame in the aft body (FRA1, FRA2, ...)

WLAn A waterline in the aft body (WLA1, WLA2, ...)

TAn A space curve in the aft body (TA1, TA2, ...)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 76 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 77 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 78 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 79 / 7399


NAPA for Design Manuals 2016.3

Open the Text Editor by selecting:

Main Window: Tools > Text Editor...

MAIN FRAME

The default name for the fore body's main frame is FRF:

Copyright © 1992 - 2016 NAPA. All rights reserved. 80 / 7399


NAPA for Design Manuals 2016.3

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.

The curve can also be plotted in the Plot Window:

Main Window: Tools > Plot Window...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 81 / 7399


NAPA for Design Manuals 2016.3

The drawing commands used:

PRO X The projection from x direction.

ID P Draw also the definition points.

PLO FRF Plot curve FRF.

!Z W Fit to window.

The result is shown in the Plot Window:

Copyright © 1992 - 2016 NAPA. All rights reserved. 82 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 83 / 7399


NAPA for Design Manuals 2016.3

The set of drawing commands needed to view both curves in the same drawing in different colours:

!E Erase the graphics area.

PRO Y The projection from y direction.

ID P Draw also the definition points.

COL BLA Change the colour to black.

PLO FRF Plot curve FRF.

COL RED Change the colour to red.

PLO STEM Plot curve STEM.

!Z W Fit to window.

Copyright © 1992 - 2016 NAPA. All rights reserved. 84 / 7399


NAPA for Design Manuals 2016.3

DECKF, FBF and FSF

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 85 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 86 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 87 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 88 / 7399


NAPA for Design Manuals 2016.3

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.

Surfaces can be classified into two groups in NAPA:

A general surface defined by a set of curves (the grid).


A special surface, such as a plane, a cylinder, or a sphere. A special surface can often be represented with a mathematical formula.

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:

1. General patch surfaces


1.1. Curve references
1.2. Patches
2. Hull definition process
2.1. Fore body - HULLF
2.2. Aft body - HULLA
2.3. Parallel mid body - HULLM
2.4. Exercise
3. Hull with skeg
4. Useful commands

1. General patch surfaces


The syntax of a general patch surface is:

SUR name 'description text'


THR curve1, curve2, curve3, ...
OUT x @@ (optional)

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 89 / 7399


NAPA for Design Manuals 2016.3

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.

The definition can be checked with the DES CSUR command:

Copyright © 1992 - 2016 NAPA. All rights reserved. 90 / 7399


NAPA for Design Manuals 2016.3

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

CUR C4; X 100


YZ C1, C2

CUR C5; X 140


YZ C1, C2

SUR, CSUR, P
THR C1, C2, C3, C4, C5
OUT, Z

1.1. Curve references

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 91 / 7399


NAPA for Design Manuals 2016.3

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:

Curves require an intersection point between each other.


Changes are much easier to handle when only the topologically most important curves need be altered

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:

Corner points (x, y, z) 3 x 4= 12


Corner derivates (dx, dy, dz) 2 x 3 x 4 = 24
Cross derivates (dx, dy, dz) 3 x 4 = 12

Copyright © 1992 - 2016 NAPA. All rights reserved. 92 / 7399


NAPA for Design Manuals 2016.3

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.

Not a good grid, the surface can't be prepared correctly

Copyright © 1992 - 2016 NAPA. All rights reserved. 93 / 7399


NAPA for Design Manuals 2016.3

Good grid, all the points are supported


In the case of triangles, patches having only three sides, there are two alternative methods for defining a surface. By default, a patch is
considered to have four corner points, two of which coincide. Optionally, a patch can be defined with a virtual corner point outside the patch area.
The patch can then be considered as a four-sided patch with a restricted area. The default method is recommended for highly-curved places,
while the genuine three-sided patch gives, in general, a better fairness in relatively flat areas. The triangle method can be controlled with option
TP in PRE command.

The default method (left) and a genuine three-sided patch (right)

2. Hull definition process


The hull is normally defined in two or three parts, depending whether it has a parallel mid body. One of the reasons is to avoid multiple references
when referring to curves, for example, if a profile curve is in one piece, there will be two possible nodes for a waterline, which should be pointed
with a special syntax. To avoid conflicts, it is better to define the aft and fore curves and surfaces separately. The default names of the hull parts
are:

HULLA - aft body.


HULLF - fore body.
HULLM - parallel mid body.

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.

2.1. Fore body - HULLF

The definition of each hull part is started with defining the surface limiting curves:

The limits of the surface: FRF, STEM, and DECKF.

Copyright © 1992 - 2016 NAPA. All rights reserved. 94 / 7399


NAPA for Design Manuals 2016.3

The border curves of plane areas: FSF and FBF.


Knuckles: KNF.

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.

Frames FRF1-FRF6 are now the primary definition curves of HULLF:

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 95 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 96 / 7399


NAPA for Design Manuals 2016.3

To generate the actual surface from the grid, preparation should be carried out before viewing the surface:

PRE HULLF
PLO HULLF

2.2. Aft body - HULLA

The definition of HULLA basically proceeds in the same way as HULLF:

The limits of the surface: FRA, STERN, and DECKA.


The boundaries of the flat areas: FSA and FBA.
Knuckle curves: KNA and TRANS.
Primary definition curves.
Secondary reference curves.
Additional (reference) space curves.

2.3. Parallel mid body - HULLM

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!

3. Hull with skeg


Hull surface with a skeg can be modelled in two ways: either to include the skeg to the hull surface grid curves or to model the skeg separately
and combine the parts with trimming. If separate parts are used, it should be carefully studied, that the intersection with the hull and the skeg is
continuous. This can be checked with command PLO HULLA/SKEG. Sometimes the problem is the inaccurate cut with the flat bottom and then it
might be needed to move the skeg 1-2mm up to make it work i.e. the skeg baseline should start from Z=0.002.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 97 / 7399


NAPA for Design Manuals 2016.3

SUR HULLA+SKEG
TRIM >HULLA >SKEG
OK

Hull trimmed with a skeg, result on the left and parts on the right

Skeg included in the grid curves

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:

1 Zooms to window, also command !Z W

2 Zooms interactive, a zoom window can be draged

3 Interactive projection, rotate the view with left click, end rotation with right click

F Sets forward projection as with command PRO F

Copyright © 1992 - 2016 NAPA. All rights reserved. 98 / 7399


NAPA for Design Manuals 2016.3

A Sets aftward projection as with command PRO A

X, Y, Z Sets X, Y or Z projection as with commands PRO X, PRO Y and PRO Z

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 99 / 7399


NAPA for Design Manuals 2016.3

Hull Surface Editor


Only a selection of the functions available in the Hull Surface Editor is introduced in this chapter. More detailed information can be found in the
Napa Manuals. See the chapter entitled Geometry, section Hull Surface Editor.

Table of Contents:

1. Purpose and implementation


2. Hull Surface Editor Window
3. Options
3.1. Visuals tab
4. Toolbar rows
5. First toolbar row, active surface
6. Second toolbar row, active object
7. Third toolbar row, active point
8. Nodes
9. Focus
10. Locator
11. Menus
12. Working with the Hull Surface Editor
12.1. Using the mouse to select and move points
12.2. Using the keyboard to change the active curve and move points
12.3. Using the keyboard to view objects in graphics windows
12.4. Using text-based representation
12.5. Creating new points and deleting existing points
12.6. Saving changes
13. Exercises: creating a hull surface
13.1. HULLF
13.1.1. Frames
13.1.2. Waterlines
13.1.3. Additional curves
13.2. HULLA
13.3. HULLM
14. Generating hull surfaces and checking results
14.1. Updating and preparing hull surfaces
14.2. Intersecting hull surfaces
14.3. Object Information Window
14.4. Updating the reference system
14.5. Standard body plan drawing
15. Getting further help

1. Purpose and implementation


The Hull Surface Editor is intended for creating and modifying general surfaces defined with a grid of curves. The surface and the curves are still
defined with normal alphanumerical descriptions, but instead of manipulating these, the Hull Surface Editor works directly with the geometric
components as they are shown in the graphics area, and the effect of each change can be seen immediately. Several alternative methods are
available for making modifications, including direct manipulation with the mouse and keys, text-based definition, and menu-driven actions.

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.

The Hull Surface Editor is opened by selecting:

Main Window: Tools > Hull Surface Editor...

The surface HULLF is opened for editing by selecting:

Hull Editor: File > Open...

or by clicking the Open button,

or by typing the name of the surface directly in the corresponding field.

2. Hull Surface Editor Window


The Hull Surface Editor Window consists of the following components:

Copyright © 1992 - 2016 NAPA. All rights reserved. 100 / 7399


NAPA for Design Manuals 2016.3

Hull Surface Editor Window


Title bar
Shows the main information concerning the current status of the Hull Surface Editor. The name of the current surface is indicated with an
asterisk (*) at the end of the name if the surface has been modified since last being saved to the database.
Menu bar
Offers access to all functions available in the Hull Surface Editor. These are logically grouped into drop-down menus.
Toolbar
Offers direct access to all central information concerning the current surface, curve, or point. The Toolbar can also be used to display
other windows, such as Text and Table Editors. It is also possible to select which tools are available in the bottom row of the Toolbar.
Graphics Area
Shows 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 by using the Zoom, View, Projection, and Print functions.
Status Bar
The message area shows a help string related to the menu item, button, or input field pointed with the mouse.
During an interactive movement action, the current coordinates are shown in the coordinates area located at the right end of
the Status bar.

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:

Hull Surface Editor: Options > View and Behaviour...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 101 / 7399


NAPA for Design Manuals 2016.3

3.1. Visuals tab

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 102 / 7399


NAPA for Design Manuals 2016.3

located on the first toolbar:


By default, the third row contains the tools needed for manipulating each node of the active curve and the tools needed for
working with the Locator. The Locator is selected by clicking the leftmost button, Point Tools.
The middle button, Click Tools, will bring up the tools controlling individual points. These tools are specially adapted for fairing
the surface.
The third button, Draw Tools, will bring up the drawing tools for controlling and generating sections and plots of the prepared
surface. This set of tools will appear as yet another toolbar.

5. First toolbar row, active surface


In the Hull Surface Editor, only one surface can be active at a time. The name of the active surface is shown in the Current Surface combo box
and in the title bar:

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.

6. Second toolbar row, active object


A curve or a point object located on a surface can be 'active'. The name of the active object is shown in the Name combo box in the middle
toolbar row. An alternative colour is used to highlight the active object in the graphics area.

An object can be activated by:

Clicking on the curve or the point object with the mouse, or


Selecting it from the drop-down selection list of the combo box.

Once the object is active, you can also:

Use the Previous and Next object buttons

, 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.

7. Third toolbar row, active point


A definition point or a referenced node (curve intersection) located on the current curve can be 'active'. The active point or node is highlighted
when selected.

A point can be activated by:

Clicking on the point with the mouse.

Once the point is active, you can also:

Use the Previous and Next node buttons

, 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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 103 / 7399


NAPA for Design Manuals 2016.3

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:

Hull Surface Editor: Node > Fix Node

Shortcut key for the same is N.

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:

Hull Surface Editor: Node > Clean Node...

Alternatively, the shortcut key C can be used.

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.

12. Working with the Hull Surface Editor

12.1. Using the mouse to select and move points

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:

Selection of the current object and possibly a point thereon.


Move the current point.
Selection and Move.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 104 / 7399


NAPA for Design Manuals 2016.3

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

> Next point on the curve.

< Previous point on the curve.

PageDown Selects the previous curve or point object.

PageUp Selects the next curve or point object.

Home Selects the first curve in the hierarchy.

End Selects the last curve in the hierarchy.

Delete, D, d Deletes the current point with the options defined in the Options dialog box.

N, n Adds a primary point in the current node.

R, r Reverses the dependency order of the curves at the node.

E, e Adds a reference from mouse pointer to the currently active curve.

Q, q Removes the reference.

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.

- Rotates the angle clockwise one step.

Space or Removes all angle conditions at the current node.


Slash(/)

Ctrl+x, X / m, Selects the next curve at the active node.


M

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 105 / 7399


NAPA for Design Manuals 2016.3

12.3. Using the keyboard to view objects in graphics windows

The following shortcut keys are valid for almost all NAPA graphics windows, such as the Plot and Geometry Windows:

Key Command

1 Fit to window (same as !Z W).

2 Interactive zooming.

3 interactive projection.

4 Real-time zooming.

X, x Sets the x projection.

Y, y Sets the y projection.

Z, z Sets the z projection.

A, a Sets the a projection.

F, f Sets the f projection.

i, I, Up arrow Zooms in at the position of the mouse.

o, O, Down arrow Zooms out at the position of the mouse.

12.4. Using text-based representation

The text definition of an active curve can be displayed by clicking the Text Window button

or by selecting:

Hull Surface Editor: Window > Text

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 106 / 7399


NAPA for Design Manuals 2016.3

12.5. Creating new points and deleting existing points

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.

12.6. Saving changes

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.

13. Exercises: creating a hull surface


We started the definition of our exercise ship's fore body with the first six curves which were collected in the partial surface HULLF. Now that we
are familiar with the Hull Surface Editor, we can continue with the definitions by using this graphical tool.

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:

Hull Surface Editor: Curve > Create New Curve...

Copyright © 1992 - 2016 NAPA. All rights reserved. 107 / 7399


NAPA for Design Manuals 2016.3

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.

Exercise: Next, define frames FRF1-FRF6 as instructed in the following examples.


Frame FRF1 is created by selecting x as the Location Plane, and the Current Point option. Point x 65, the second point on FSF, is activated
from the graphics:

Click the Apply button to add the curve to HULLF.

FRF2 is added in the same way by selecting point x 75 from DECKF.

Copyright © 1992 - 2016 NAPA. All rights reserved. 108 / 7399


NAPA for Design Manuals 2016.3

Continue in the same fashion and add the following curves:

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.

Note! Remember to click the Save button

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 109 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 110 / 7399


NAPA for Design Manuals 2016.3

Two new definition points are also added to curve FRF3:

Copyright © 1992 - 2016 NAPA. All rights reserved. 111 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 112 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 113 / 7399


NAPA for Design Manuals 2016.3

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 following figure illustrates the outcome of the above modifications:

Copyright © 1992 - 2016 NAPA. All rights reserved. 114 / 7399


NAPA for Design Manuals 2016.3

13.1.3. Additional curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 115 / 7399


NAPA for Design Manuals 2016.3

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:

Hull Surface Editor: Curve > Add Existing Curve...

Copyright © 1992 - 2016 NAPA. All rights reserved. 116 / 7399


NAPA for Design Manuals 2016.3

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 DECKF; Z 11.5

Copyright © 1992 - 2016 NAPA. All rights reserved. 117 / 7399


NAPA for Design Manuals 2016.3

XY FRF, -/, (72,6.5), (75,6.3), (84,2.5), -90/, STEM

CUR FRF5; X 82.5


ZY STEM/Z<2, /25, (1.08,2.2), 152/, STEM/Z=#4

CUR FRF6; X 83.7


ZY STEM/Z<2, (0.62,2.2), STEM/Z=#4

CUR FSF; Y 6.5


XZ FRF/Z=1.8, /0, (65,2.2), 65/, DECKF/X=72
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 WLF1; Z FSF/FRF1


XY FSF/FRF1, FRF2, FRF3, FRF4, FRF5, FRF6, -90/, STEM

CUR WLF2; Z 4.4


XY FSF, FRF2, FRF3, -32/, FRF4, -50/, STEM

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 118 / 7399


NAPA for Design Manuals 2016.3

ZX FRF3/WLF2, (81,4.9), STEM/TF4


ZY FRF3/WLF2, FRF4, STEM

SUR, HULLF, P

Copyright © 1992 - 2016 NAPA. All rights reserved. 119 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 120 / 7399


NAPA for Design Manuals 2016.3

Next, we continue with the Hull Surface Editor:

Main Window: Tools > Hull Surface Editor...

Open the HULLA surface for editing by selecting:

Copyright © 1992 - 2016 NAPA. All rights reserved. 121 / 7399


NAPA for Design Manuals 2016.3

Hull Editor: File > Open...

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:

Hull Surface Editor: Curve > Create New Curve...

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 122 / 7399


NAPA for Design Manuals 2016.3

CUR FRA1; X 0
YZ STERN, /4, (1.377,4.235), (3.05,4.851),
(4.603,5.895), KNA, DECKA

CUR FRA2; X 2.3


YZ STERN, /6, (1.588,3.82), (3.656,4.709),
(5.005,5.794), KNA, DECKA

CUR FRA3; X 2.5


ZY STERN/Z=1.15, /0, (0.35,1.5), 180/, STERN/Z=1.85

CUR FRA4; X 2.9


ZY STERN/Z<1.5, (0.5,1.5), STERN/Z=#2

CUR FRA5; X STERN/FBA


ZY STERN/FBA, (1.61,1.44), (2,2.7), (4.54,4.54),
(5.521,5.676), 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

Copyright © 1992 - 2016 NAPA. All rights reserved. 123 / 7399


NAPA for Design Manuals 2016.3

Exercise: Create and add waterline curves as explained below.


The secondary curves, that is the waterlines, are added next. Instead of waterlines with a constant z-coordinate, we will use space curves which
better follow the shape of the hull surface and water flow. Space curves can be defined manually in the Text Editor and then added to HULLA by
using the Hull Surface Editor:

Hull Surface Editor: Curve > Add Existing Curve...

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.

Let us start with WLA1:

Copyright © 1992 - 2016 NAPA. All rights reserved. 124 / 7399


NAPA for Design Manuals 2016.3

Once created, the definition of WLA1 will look as follows:

Copyright © 1992 - 2016 NAPA. All rights reserved. 125 / 7399


NAPA for Design Manuals 2016.3

Following this, we will modify the definition in the Text Window:

Next, we will create the WLA2 curve in the same way as WLA1 with the exception that the preliminary z-coordinate is 2.8:

Copyright © 1992 - 2016 NAPA. All rights reserved. 126 / 7399


NAPA for Design Manuals 2016.3

After modification your definition of WLA2 should look as follows:

We will move on to defining the waterline WLA3 which is first located in z 5:

Sometimes it may be difficult to visualise the location plane. In these cases, automatic modification can be used by selecting:

Hull Surface Editor: Curve > To Location Surface...

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 127 / 7399


NAPA for Design Manuals 2016.3

Last, we will create the waterline WLA4 which is originally located in z 6:

After modification your definition of WLA4 should look as follows:

Provided that you have successfully defined all the above curves, your HULLA surface should now look like this:

Copyright © 1992 - 2016 NAPA. All rights reserved. 128 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 129 / 7399


NAPA for Design Manuals 2016.3

Now the HULLA surface is completed and can be reopened in the Hull Surface Editor:

Copyright © 1992 - 2016 NAPA. All rights reserved. 130 / 7399


NAPA for Design Manuals 2016.3

The final definition of HULLA and its curves is presented below:

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 TRANS; X -2.4


YZ STERN, /0, (1.3,4.567), (2.55,5), (4.15,6), 80/,
(4.7,7.1), /-, DECKA

CUR FBA; Z 0
XY STERN/X=5, (11,2.8), 0/, FRA/Y=4.7
SC , P

Copyright © 1992 - 2016 NAPA. All rights reserved. 131 / 7399


NAPA for Design Manuals 2016.3

CUR KNA; Z 7.1


XY STERN, /90, -/, TRANS, /-, (15,6.5), /-, FRA
SC , -//-

CUR FRA1; X 0
YZ STERN, /4, (1.377,4.235), (3.05,4.851),
(4.603,5.895), KNA, DECKA

CUR FRA2; X 2.3


YZ STERN, /6, (1.588,3.82), (3.656,4.709),
(5.005,5.794), KNA, DECKA

CUR FRA3; X 2.5


ZY STERN/Z=1.15, /0, (0.35,1.5), 180/, STERN/Z=1.85

CUR FRA4; X 2.9


ZY STERN/Z<1.5, (0.5,1.5), STERN/Z=#2

CUR FRA5; X STERN/FBA


ZY STERN/FBA, (1.61,1.44), (2,2.7), (4.54,4.54),
(5.521,5.676), 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 FSA; Y 6.5


XZ DECKA/X=15, KNA/X=15, (15.85,5.2), 0/, FRA/Z=1.8
SC , P

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 132 / 7399


NAPA for Design Manuals 2016.3

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,

Copyright © 1992 - 2016 NAPA. All rights reserved. 133 / 7399


NAPA for Design Manuals 2016.3

FRA3, FRA4, FRA5, FRA6, FRA7, FRA8, FRA9, WLA1, WLA2,


WLA3, WLA4, TA1, TA2

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 134 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 135 / 7399


NAPA for Design Manuals 2016.3

CUR CLM; Y 0
XZ FRA, FRF

CUR FBM; Z 0
XY FRA/FBA, /-, -/, FRF/FBF
SC , P

CUR FSM; Y FRA/FSA


XZ FRA/FSA, /-, -/, FRF/FSF
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.

14. Generating hull surfaces and checking results

14.1. Updating and preparing hull surfaces

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.

14.2. Intersecting hull surfaces

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 136 / 7399


NAPA for Design Manuals 2016.3

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.

14.3. Object Information Window

Click the Info

button to open the Object Information Window:

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.

14.4. Updating the reference system

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.

Exercise: Update the reference system as explained below.

Copyright © 1992 - 2016 NAPA. All rights reserved. 137 / 7399


NAPA for Design Manuals 2016.3

Let us first have a look at the current reference values:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 138 / 7399


NAPA for Design Manuals 2016.3

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.

14.5. Standard body plan drawing

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:

Hull Surface Editor: Tools > Body Plan Window

Copyright © 1992 - 2016 NAPA. All rights reserved. 139 / 7399


NAPA for Design Manuals 2016.3

15. Getting further help


This manual presents the Hull Surface Editor on a conceptual level only. For more specific information on each button, menu item, and keyboard
shortcuts, please select:

Hull Surface Editor: Help > Help About ...

Furthermore, the Napa Manuals include an entire chapter dedicated to the Hull Surface Editor and its technical details.

Copyright © 1992 - 2016 NAPA. All rights reserved. 140 / 7399


NAPA for Design Manuals 2016.3

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:

Main Window: Tasks > Hydrostatics > Hydrostatics

Copyright © 1992 - 2016 NAPA. All rights reserved. 141 / 7399


NAPA for Design Manuals 2016.3

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

4.1. Default list of hydrostatics

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 142 / 7399


NAPA for Design Manuals 2016.3

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:

Main Window: Tools > List Window...

Note that when this window is open, all listing commands are directed to it one after the other.

Copyright © 1992 - 2016 NAPA. All rights reserved. 143 / 7399


NAPA for Design Manuals 2016.3

To erase all content from the List Window, click the New List

button.

4.2. Loading scale

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 144 / 7399


NAPA for Design Manuals 2016.3

------------------------------------------------------------------
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
------------------------------------------------------------------

4.3. Trim diagram list

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):

Copyright © 1992 - 2016 NAPA. All rights reserved. 145 / 7399


NAPA for Design Manuals 2016.3

THE DIAGRAM GIVES, AS A FUNCTION OF DRAUGHT AT PERPENDICULARS:

- TOTAL DISPLACEMENT (TON)

- DISPLACEMENT MOMENT ABOUT REF. POINT (TONM)

- METACENTRIC HEIGHT ABOVE BL (M)

- MEAN DRAUGHT ABOVE BL

Draught at perpendiculars (above BL)


Forward
Aft 1.20 2.40 3.60 4.80 6.00

1.20 968.2 1533.2 2097.2 2670.2 3241.8


953 6956 13362 19547 26009
11.668 8.405 6.959 6.228 5.823
1.20 1.80 2.40 3.00 3.60

2.40 1506.4 2064.2 2638.2 3208.3 3788.6


-3896 2090 8325 14597 20997
8.521 7.001 6.199 5.709 5.582
1.80 2.40 3.00 3.60 4.20

3.60 2045.4 2619.8 3188.4 3768.0 4340.6


-9309 -3395 3035 9030 15552
7.113 6.269 5.711 5.528 5.411
2.40 3.00 3.60 4.20 4.80

4.80 2642.1 3202.9 3786.7 4355.4 4945.4


-16264 -10040 -4112 2294 8409
6.469 5.875 5.618 5.440 5.482
3.00 3.60 4.20 4.80 5.40

6.00 3271.4 3848.1 4423.3 5003.0 5582.4


-24960 -18978 -12697 -6655 -288
6.151 5.814 5.587 5.549 5.557
3.60 4.20 4.80 5.40 6.00

5. Graphical output

5.1. Hydrostatic curves

Hydrostatic curves are created by clicking the PL CUR button:

Copyright © 1992 - 2016 NAPA. All rights reserved. 146 / 7399


NAPA for Design Manuals 2016.3

Before plotting the curves, open the Plot Window by selecting:

Main Window: Tools > Plot Window

Copyright © 1992 - 2016 NAPA. All rights reserved. 147 / 7399


NAPA for Design Manuals 2016.3

5.2. Loading scale diagram

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 148 / 7399


NAPA for Design Manuals 2016.3

5.3. Trim diagram

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 149 / 7399


NAPA for Design Manuals 2016.3

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.

This task has a task-specific window that can be accessed using

Main Window: Tasks -> Hydrostatics-> Stability Tables

Copyright © 1992 - 2016 NAPA. All rights reserved. 150 / 7399


NAPA for Design Manuals 2016.3

6.1. Using the STAB task

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

HEEL heeling angles

or

DISP displacement

LCG centre of gravity

HEEL heeling angles

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>

Copyright © 1992 - 2016 NAPA. All rights reserved. 151 / 7399


NAPA for Design Manuals 2016.3

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:

STAB?><input>t (2 5.5 0.5)</input>


STAB?><input>tr 0</input>
STAB?><input>heel 0 10 20</input>
STAB?><input>lq arg disp t tr</input>
STAB?><input>too hd=((t, disp, ' draught', 'trim'), sh, ul)</input>
STAB?><input>lis t heel</input>

Heeling: 0.0
Heeling: 10.0
Heeling: 20.0

trim 0.000 m

DISP heel argument not among calculated ones (W 2023)


T DISP draught trim
draught 0.0 0.0 10.0 20.0 0.0 10.0 20.0
-----------------------------------------------------------------
2.000 1708.0 2.000 1.956 1.795 0.000 0.000 0.022
2.500 2171.6 2.500 2.456 2.301 0.000 0.011 0.039
3.000 2638.2 3.000 2.949 2.788 0.000 0.018 0.057
3.500 3108.3 3.500 3.441 3.262 0.000 0.022 0.086
4.000 3585.0 4.000 3.932 3.729 0.000 0.029 0.116
4.500 4072.5 4.500 4.423 4.196 0.000 0.036 0.140
5.000 4572.1 5.000 4.915 4.670 0.000 0.038 0.138
5.500 5081.8 5.500 5.413 5.187 0.000 0.036 0.114

The displacement is not a function of the heeling angle and is listed for heel=0 only.

Copyright © 1992 - 2016 NAPA. All rights reserved. 152 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 153 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 154 / 7399


NAPA for Design Manuals 2016.3

Geometry Editor's interactive tools obey snap options. These can be selected from the Tools menu:

Copyright © 1992 - 2016 NAPA. All rights reserved. 155 / 7399


NAPA for Design Manuals 2016.3

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

Frames can also be used as a location:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 156 / 7399


NAPA for Design Manuals 2016.3

A plane parallel to a coordinate axis is defined by using the following commands:

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)

The following figure illustrates the basic plane definition methods:

Copyright © 1992 - 2016 NAPA. All rights reserved. 157 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 158 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 159 / 7399


NAPA for Design Manuals 2016.3

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)

4.1. Corrugated bulkheads

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:

Main Window: Tools > Vardef Editor

There are two tables for definition input: one for transversal and the other for longitudinal bulkheads. The names of these tables are

Copyright © 1992 - 2016 NAPA. All rights reserved. 160 / 7399


NAPA for Design Manuals 2016.3

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.

In the following example, the corrugated bulkhead CBH1 is created:

The parameters are explained in the figure below:

Copyright © 1992 - 2016 NAPA. All rights reserved. 161 / 7399


NAPA for Design Manuals 2016.3

The definition is run by clicking the Run

button and plotted by clicking the Plot

button:

Copyright © 1992 - 2016 NAPA. All rights reserved. 162 / 7399


NAPA for Design Manuals 2016.3

The definition can be further modified in text format, if needed:

Copyright © 1992 - 2016 NAPA. All rights reserved. 163 / 7399


NAPA for Design Manuals 2016.3

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

PLA, CBH1.PLA 'Reference plance for corr. bhd CBH1'


X, 41

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 164 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 165 / 7399


NAPA for Design Manuals 2016.3

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

Curves can be also included in a surface definition:

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 166 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 167 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 168 / 7399


NAPA for Design Manuals 2016.3

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.

In the following example, a round tube with a radius of 1 metre is defined:

CUR TUBESHAPE
XYZ (0,0,0), (5,2,0), (10,5,5)

TUB TUBE
BAS TUBESHAPE
FOR R=1

Copyright © 1992 - 2016 NAPA. All rights reserved. 169 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 170 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 171 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 172 / 7399


NAPA for Design Manuals 2016.3

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

10.2. Corrugated bulkhead

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

10.3. Longitudinal bulkheads

Copyright © 1992 - 2016 NAPA. All rights reserved. 173 / 7399


NAPA for Design Manuals 2016.3

PLA, CL
Y, 0

PLA, LBH1
Y, 5.1

PLA, LBH2
Y, 2.55

PLA, LBH3
Y, 1.7

10.4. Decks

Copyright © 1992 - 2016 NAPA. All rights reserved. 174 / 7399


NAPA for Design Manuals 2016.3

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

10.5. Thruster tunnel

Copyright © 1992 - 2016 NAPA. All rights reserved. 175 / 7399


NAPA for Design Manuals 2016.3

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)

10.7. Additional surfaces

Rudder:

CYL, RUDDERUPL
Y, -2
XZ, ><, (-2.43, 2.9), (-0.8, 3.75), (0.8, 3.5)
GEN, Y, 4

CUR RUDDERL; Z 0.1


XY (-1.2,0), /5, -5/, (0.25,0.13), -90/, (0.5,0)

CUR RUDDERU; Z 3.8


XY (-1.4,0), /5, -5/, (0.3,0.15), -90/, (0.6,0)

CNS, RUDDERCNS
BASE, RUDDERL
BASE, RUDDERU

Funnel:

Copyright © 1992 - 2016 NAPA. All rights reserved. 176 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 177 / 7399


NAPA for Design Manuals 2016.3

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.

1.1. Elementary room

The most simple type of a NAPA room is an elementary room defined by limiting surfaces in all directions.

The syntax of a room definition is:

ROOM name 'descriptive name'


LIM limits

For example:

ROOM BOX
LIM X>5, X<10, Y>0, Y<5, Z>0, Z<5

Copyright © 1992 - 2016 NAPA. All rights reserved. 178 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 179 / 7399


NAPA for Design Manuals 2016.3

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:

LIM 0 10 0 HULL HULL DECK Incorrect!

LIM 0 10 0 HULL - DECK Correct.

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:

Inside hull: <HULL


Outside tunnel: >TUNNEL

ROOM R4
LIM X>BH6 X<BH7 Y>0 <HULL Z<MAINDECK >TUNNEL

Copyright © 1992 - 2016 NAPA. All rights reserved. 180 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 181 / 7399


NAPA for Design Manuals 2016.3

1.2. Geometric combinations

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:

ROOM R02011 'HOLD2'


LIM BH2, BH4, 0, LBH1, TTOP, MAINDECK
SYM
ADD #28, #64, -5.1, 5.1, 7.09, 9.2

Copyright © 1992 - 2016 NAPA. All rights reserved. 182 / 7399


NAPA for Design Manuals 2016.3

Or:

ROOM HATCH2
LIM #28, #64, -5.1, 5.1, 7.09, 9.2

ROOM R02011 'HOLD2'


LIM BH2, BH4, 0, LBH1, TTOP, MAINDECK
SYM
ADD HATCH2

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 />

Copyright © 1992 - 2016 NAPA. All rights reserved. 183 / 7399


NAPA for Design Manuals 2016.3

1.3. Logical combinations

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.

A combined room is defined by using the following commands:

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 184 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 185 / 7399


NAPA for Design Manuals 2016.3

DEF?>LQ NAME, GSTYPE, DATE, TIME, XMIN, XMAX, REFQ, ORNT, SS, VOL
DEF?>INFO R02008

NAME GSTYPE DATE TIME XMIN XMAX REFQ ORNT SS VOL


----------------------------------------------------------------------
R02008 MOD 2012-03-.13:36 29.58 43.07 - C * 151.0

If the volume is missing, it can be concluded that the room has been defined incorrectly.

3. Examples
Example 1:

ROOM R02007 'Sidetank 5 PS WB'


LIM BH3, BH4, LBH2, HULL, -, MAINDECK
RED R02011

ROOM R02008 'Sidetank 6 SB WB'


REF R02007

Example 2:

ROOM R03007 'Sidetank 3 PS WB'


LIM BH5, BH6, LBH2, HULL, -, MAINDECK
RED R03011

Copyright © 1992 - 2016 NAPA. All rights reserved. 186 / 7399


NAPA for Design Manuals 2016.3

Example 3:

ROOM R00001 'Aftpeak tank WB'


LIM -, BH1, 0, HULL, -, DECK0
SYM

4. Exercise

Exercise: Define room STABHULL by using commands in the Text Editor as shown below.

Copyright © 1992 - 2016 NAPA. All rights reserved. 187 / 7399


NAPA for Design Manuals 2016.3

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.

5.1. Geometry Editor Window

The Geometry Editor is opened by selecting:

Main Window: Tools > Geometry Editor...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 188 / 7399


NAPA for Design Manuals 2016.3

More detailed instructions on how to use the Geometry Editor are available in the Napa Manuals: Geometry (GM) - 10 Geometry Editor.

5.2. Hierarchy tree

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 189 / 7399


NAPA for Design Manuals 2016.3

5.3. Defining elementary rooms

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.

The definition of a new room is started by clicking the New button

which will open the New Room dialog box:

Copyright © 1992 - 2016 NAPA. All rights reserved. 190 / 7399


NAPA for Design Manuals 2016.3

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.

5.3.1. Defining room limits

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 191 / 7399


NAPA for Design Manuals 2016.3

Clicking the Apply button

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.

5.3.2. Finding limits automatically

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.

5.3.3. Editing limits

There are several ways to edit selected limits:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 192 / 7399


NAPA for Design Manuals 2016.3

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.

5.3.4. Further definitions

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:

Add Adds a room or limits to the defined room.

Reduce Reduces a room or limits from the defined room.

Copyright © 1992 - 2016 NAPA. All rights reserved. 193 / 7399


NAPA for Design Manuals 2016.3

Reflect The defined room is on one side of the ship but in reality is located on the other side.

Symmetric The defined room is symmetric about the centre line.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 194 / 7399


NAPA for Design Manuals 2016.3

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.

5.4. Defining reflected rooms

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 195 / 7399


NAPA for Design Manuals 2016.3

ROOM R01031 'DH1'


LIM #4, #24, 0, DUMMY, MAINDECK, DECK2
RED ENGCAS2
SYM

ROOM R01051 'DH3'


LIM #14, #24, 0, 6, DECK3, DECK4

Copyright © 1992 - 2016 NAPA. All rights reserved. 196 / 7399


NAPA for Design Manuals 2016.3

SYM

ROOM R01041 'DH2'


LIM #14, #24, 0, 6, DECK2, DECK3
SYM

ROOM R05001 'Forepeak tank WB'


LIM BH7, -, 0, HULL, -, DECK0
SYM

ROOM R03004 'Sidetank 4 SB WB'


REF R03003

ROOM R03003 'Sidetank 4 PS WB'


LIM BH4, BH5, LBH2, HULL, -, MAINDECK
RED R03011

ROOM R02008 'Sidetank 6 SB WB'


REF R02007

ROOM R04002 'Deeptank SB WB'


REF R04001

ROOM R04001 'Deeptank BB WB'


LIM BH6, BH7, LBH3, HULL, <MAINDECK, >TUNNEL

ROOM R02004 'Sidetank 6 SB WB'


REF R02003

ROOM R02003 'Sidetank 6 PS WB'


LIM BH2, BH3, LBH2, HULL, -, MAINDECK
RED R02011

ROOM R03007 'Sidetank 3 PS WB'


LIM BH5, BH6, LBH2, HULL, -, MAINDECK
RED R03011

ROOM R00001 'Aftpeak tank WB'


LIM -, BH1, 0, HULL, -, DECK0
SYM

ROOM R02007 'Sidetank 5 PS WB'


LIM BH3, BH4, LBH2, HULL, -, MAINDECK
RED R02011

ROOM R03008 'Sidetank 3 SB WB'


REF R03007

ROOM R03011 'HOLD1'


LIM BH4, BH6, 0, LBH1, TTOP, MAINDECK, Y<HULL
RED H1RES
SYM
ADD HATCH1

Copyright © 1992 - 2016 NAPA. All rights reserved. 197 / 7399


NAPA for Design Manuals 2016.3

ROOM R02011 'HOLD2'


LIM BH2, BH4, 0, LBH1, TTOP, MAINDECK
SYM
ADD HATCH2

ROOM R02001 'DBtank 6 PS DO'


LIM BH2, BH3, 0, LBH2, HULL, TTOP

ROOM R02002 'DBtank 6 SB DO'


REF R02001

ROOM R00023 'Apparat space'


LIM -, BH2, 0, HULL, DECK0, MAINDECK
RED ENGCAS1
RED R00021
SYM

ROOM R00021 'Fresh Water'


LIM -, #0, 3.5, HULL, DECK0, MAINDECK

ROOM R00022
REF R00021

ROOM R05021 'Fore peak store'


LIM BH7, -, 0, HULL, DECK0, MAINDECK
SYM

ROOM R05031 'Forecastle'


LIM BH7, -, 0, HULL, MAINDECK, FOCSDECK
SYM

ROOM R01061 'BRIDGE'


LIM <BRIDGE, Z>DECK4, Z<DECK5
SYM

ROOM R03002 'DBtank 4 SB HFO'


REF R03001

ROOM R02005 'DBtank 6 PS HFO'


LIM BH3, BH4, 0, LBH2, HULL, TTOP

ROOM R02006 'DBtank 5 SB HFO'


REF R02005

ROOM R03005 'DBtank 3 PS HFO'


LIM BH5, BH6, 0, LBH2, HULL, TTOP

ROOM R03006 'DBtank 3 SB HFO'


REF R03005

ROOM R03001 'DBtank 4 PS HFO'


LIM BH4, BH5, 0, LBH2, HULL, TTOP

Copyright © 1992 - 2016 NAPA. All rights reserved. 198 / 7399


NAPA for Design Manuals 2016.3

ROOM R01002 'SYSTEM OIL'


LIM #14, #24, 0, 1.7, HULL, TTOP
SYM

ROOM R04003 'Deeptank fore WB'


LIM BH6, BH7, 0, LBH3, HULL, MAINDECK, >TUNNEL
SYM

ROOM RUDDER 'Rudder'


LIM Y>0, Y<RUDDERCNS, Z>0.15, Z<RUDDERUPL
SYM

ROOM R01001 'Miscellaneous'


LIM BH1, BH2, 0, HULL, -, TTOP
SYM
RED R01002

ROOM R01011 'ENGINE ROOM'


LIM BH1, BH2, 0, HULL, TTOP, DECK0
SYM

Copyright © 1992 - 2016 NAPA. All rights reserved. 199 / 7399


NAPA for Design Manuals 2016.3

ADD ENGCAS1
ADD ENGCAS2
ADD R01042

Copyright © 1992 - 2016 NAPA. All rights reserved. 200 / 7399


NAPA for Design Manuals 2016.3

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.

2. Working with the Ship Model Window


The default arrangement A is created automatically when the Geometry Editor is opened for the first time in a project containing no
arrangements.

When the Ship Model Window is opened, it will show the default arrangement:

Copyright © 1992 - 2016 NAPA. All rights reserved. 201 / 7399


NAPA for Design Manuals 2016.3

Ship Model Window

2.1. Arrangement table

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 202 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 203 / 7399


NAPA for Design Manuals 2016.3

ACC1 Accommodation deckhouse 1


ACC2 Accommodation deckhouse 2
ACC3 Accommodation deckhouse 3
BRID BRIDGE
CH1C Nr 1 cargo hold
CH2C Nr 2 cargo hold
COOL Cooling water
DO1P Diesel oil tank P
DO1S Diesel oil tank S
ER Engine room
FW1S Fresh Water S
GW1P Grey Water P
HFO1P Nr 1 heavy fuel oil db tank P
HFO1S Nr 1 heavy fuel oil db tank S
HFO2P Nr 2 heavy fuel oil db tank P
HFO2S Nr 2 heavy fuel oil db tank S
HFO3P Nr 3 heavy fuel oil db tank P
HFO3S Nr 3 heavy fuel oil db tank S
LO1C Lubricating oil
MA Machinery apparat space
RUDDER Rudder
STFC Forecastle store
STFP Fore peak store
WB1P Nr 1 water ballast wing tank P
WB1S Nr 1 water ballast wing tank S
WB2P Nr 2 water ballast wing tank P
WB2S Nr 2 water ballast wing tank S
WB3P Nr 3 water ballast wing tank P
WB3S Nr 3 water ballast wing tank S
WB4P Nr 4 water ballast wing tank P
WB4S Nr 4 water ballast wing tank S
WB5P Nr 5 water ballast deep tank P
WB5S Nr 5 water ballast deep tank S
WB5C Nr 5 water ballast deep tank C
WBAP Water ballast aft peak
WBFP Water ballast fore peak

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.

NAME Name of compartment as in room definition.

PURP Compartment's purpose.

DES Description of compartment as in room definition.

CCODE Compartment code; an alternative 'name' for the compartment used in output.

PDES Description of purpose.

CLASS Class of compartment, for example B=bunker, C=cargo.

TYPE Load type; used to determine free surface rules, for example L=liquid.

Copyright © 1992 - 2016 NAPA. All rights reserved. 204 / 7399


NAPA for Design Manuals 2016.3

RHO Default density of load in compartment.

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.

FIREINS Category of fire; used in the Insulating Manager application.

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.

2.2. Parameters associated with purposes

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.

The standard purposes table PAR*STD looks as follows:

Copyright © 1992 - 2016 NAPA. All rights reserved. 205 / 7399


NAPA for Design Manuals 2016.3

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.

PAR* tables comprise the following columns:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 206 / 7399


NAPA for Design Manuals 2016.3

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

RHO Default density of the content (t/m3).

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.

PERM Permeability as used in damage stability; replaces RED.

IPERM Variable permeability as a function of height or draught.

LFCODE Logical fill code. The filling colour/pattern is defined in the TAB*FILLCODES table for different devices.

FIREINS Fire insulation category.

ARAT Shifting law attached to sliding cargo.

Exercise: Assign each room a purpose in ARR*A. The purposes needed are listed below.

Copyright © 1992 - 2016 NAPA. All rights reserved. 207 / 7399


NAPA for Design Manuals 2016.3

NAME PURP PDES


------------------------------
ACC1 ACC Accommodation
ACC2 ACC Accommodation
ACC3 ACC Accommodation
BRID CWH Wheelhouse
CH1C CA Cargo
CH2C CA Cargo
COOL MIS Miscellaneous
DO1P DO Diesel oil
DO1S DO Diesel oil
ER MMA Machinery sp.
FW1S FW Fresh water
GW1P GWT Grey Water
HFO1P HFO Heavy Fuel Oil
HFO1S HFO Heavy Fuel Oil
HFO2P HFO Heavy Fuel Oil
HFO2S HFO Heavy Fuel Oil
HFO3P HFO Heavy Fuel Oil
HFO3S HFO Heavy Fuel Oil
LO1C LO Lubricating oil
MA MAP Apparat space
RUDDER VOID Void
STFC GST Store
STFP GST Store
WB1P BW Ballast water
WB1S BW Ballast water
WB2P BW Ballast water
WB2S BW Ballast water
WB3P BW Ballast water
WB3S BW Ballast water
WB4P BW Ballast water
WB4S BW Ballast water
WB5P BW Ballast water
WB5S BW Ballast water
WB5C BW Ballast water
WBAP BW Ballast water
WBFP BW Ballast water

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.

WHERE Informs the name of the current active arrangement.

Copyright © 1992 - 2016 NAPA. All rights reserved. 208 / 7399


NAPA for Design Manuals 2016.3

GET name Retrieves a given arrangement from the database and makes it the current work arrangement.

UNSAVE Deletes an existing arrangement.


name

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.

SAVE Saves the new arrangement.

REPL Saves the modified description of the existing arrangement.

NEW name Creates a new arrangement.

3.1. Shortcut in a new project

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.

3.2. Default arrangement

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

3.3. Combined arrangement

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 definition of a combined arrangement would look as follows:

COM EXAMPLE DECK1 DECK2 DECK3 DECK4

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 209 / 7399


NAPA for Design Manuals 2016.3

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:

SM?>SET Z=1 PROF


SM?>DRW ALL

The following is a list of commands for creating, saving, and using setups:

SET CAT Catalogues the existing setups in the database.

SET definition Defines a new setup.

SET SAVE name Saves the current setup as {name}. Note that an existing setup with the same name will be replaced without a warning.

SET GET name Activates an existing setup from the database.

SET UNS name Deletes a saved setup from the database.

Drawings can be complemented with texts, filling colours indicating rooms' purposes, the frame scale, and so on. The following commands are
available:

ID NAME Adds the rooms' names to the arrangement drawing.

ID Adds the rooms' purposes to the arrangement drawing.


(PURP)

ID (DES) Adds the rooms' descriptive names to the arrangement drawing.

ID OFF Cancels the ID option.

Copyright © 1992 - 2016 NAPA. All rights reserved. 210 / 7399


NAPA for Design Manuals 2016.3

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.

FILL OFF Cancels the FILL option.

DRW Draws all parts of the arrangement as defined in the setup.


ALL

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.

DRW Draws the frame scale to the arrangement drawing.


SCALE

DRW ID Adds the identification of plans to the arrangement drawing.

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:

SM?>SET (Z=1 X=#0) (PROF X=#20) (X=#50 X=#105 X=#110 X=#120)


SM?>DRW ALL
SM?>DRW ID

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 211 / 7399


NAPA for Design Manuals 2016.3

SM?>SET Z=1 20 PROF (X=#50 50 X=#105 X=#120)


SM?>DRW ALL

4.1. Plan Definition task

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 212 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 213 / 7399


NAPA for Design Manuals 2016.3

PLAN, D3, Z=#DECK3


SIZ, 0, #28, -, -
WIN, 0, #28, -, -

PLAN, D4, Z=#DECK4


SIZ, 0, #28, -, -
WIN, 0, #28, -, -

PLAN, FOCS, Z=9.6


SIZ, #112, #130, -, -
WIN, #112, #130, -, -

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:

PLD?>PLAN TESTPLAN Z=1


Enter possible additional definitions for the plan
Finish with OK or a main PLD command
PLAN?>RES X>#100
PLAN?>EXC WBFP/4
PLAN?>OK
PLD?>OK

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 214 / 7399


NAPA for Design Manuals 2016.3

PLD?>PLAN PROFILE Y=0.01


Enter possible additional definitions for the plan
Finish with OK or a main PLD command
PLAN?>SDT A
PLAN?>FIG CRUISERLOGO SSIZE=(2 2) LL (5.8 16.4)
PLAN?>FIG FIG.PROP SSIZE=(2.8 2.8) O (2.09 1.5)
PLAN?>FIG ENGINE SSIZE=(5 5) (8.95 0.738)
PLAN?>FIG ANCHOR SSIZE=(1.2 1.2) (81 7.3) ROT=20
PLAN?>PLO TUNNEL
PLAN?>OK
PLD?>OK

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)

Exercise: Create setup SET1 as shown below.

SM?>SET Z=0.6 Z=1 MAINDECK (D2 D3 D4 FOCS) PROF (X=#16 X=#60


X=#101 X=#110)
SM?>SET SAVE SET1
SM?>DRW ALL
SM?>DRW SCALE
SM?>ID NAME
SM?>DRW ID

Copyright © 1992 - 2016 NAPA. All rights reserved. 215 / 7399


NAPA for Design Manuals 2016.3

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.

4.2. Setup Editor

Copyright © 1992 - 2016 NAPA. All rights reserved. 216 / 7399


NAPA for Design Manuals 2016.3

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:

Main Window: Task > Capacities > Compartments

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.

The arguments are as follows:

Copyright © 1992 - 2016 NAPA. All rights reserved. 217 / 7399


NAPA for Design Manuals 2016.3

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.

ARR The arrangement to be used as the source of compartment data.

SDE Selects the sounding device for the current compartment or the default for subsequent compartments.

TR Trim used in calculation; the default is zero trim.

HEEL Heel used in calculation; the default is zero heel.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 218 / 7399


NAPA for Design Manuals 2016.3

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.

2.1. Sounding devices

There are four types of sounding devices available in NAPA:

Manual Ullage (MU)


Manual Sounding (MS)
Remote Ullage (RU)
Remote Sounding (RS)

These are illustrated in the following schematic drawing:

When defining remote sounding (RS) or remote ullage (RU) devices, the command syntax is as follows:

DEVICE comp id/name (x,y,z) h

In which:

comp Name of compartment (tank) to which the sounding device is attached.

id Type of device: RS=remote sounding or RU=remote ullage.

/name (Opt) name of device. Must be given when there are several devices of the same type in a compartment.

(x,y,z) Location of probe (point in space).

Copyright © 1992 - 2016 NAPA. All rights reserved. 219 / 7399


NAPA for Design Manuals 2016.3

h (Opt) height correction; actual value-displayed value, default=0.

Examples:

DEV ROOM1 RU (42 0 2.15)


DEV ROOM1 RS (#BH1+2 0 #TTOP+0.1) 0.1

When defining manual sounding (MS) or manual ullage (MU) devices, the command syntax is as follows:

DEVICE comp id/name curve h

In which:

comp Name of compartment (tank) to which the sounding device is attached..

id Type of device: MS=manual sounding or MU=manual ullage.

/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:

DEV ROOM3 MS (#41 2 #TTOP) (#41+0.2 4 #TTOP+5) (#41+.02 4 5)


DEV ROOM3 MS/FWD (#60 2 #TTOP) (#60+0.2 4 #TTOP+5) (#60+.02 4 5) 4.5

2.1.1. Exercises

Exercise: Define sounding devices as presented below.


To define sounding devices, we will first launch the PAR task:

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.

Let us start by defining the sounding device RS for room HFO2P:

Copyright © 1992 - 2016 NAPA. All rights reserved. 220 / 7399


NAPA for Design Manuals 2016.3

PAR?>DEV HFO2P RS (#73+0.3 1.2 0.01)

The definition of existing sounding device can now be checked with:

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.

Next, we will create a similar device to the reflected tank HFO2S:

PAR?>DEV HFO2S RS (#73+0.3 -1.2 0.01)

Also, rooms WB3P and WB3S will have manual sounding devices:

PAR?>DEV WB3P MS (#73+0.3 5 0.05) (#73+0.3 6.3 3) (#73+0.3 6.3 7.5)


PAR?>DEV WB3S MS (#73+0.3 -5 0.05) (#73+0.3 -6.3 3) (#73+0.3 -6.3 7.5)

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:

PAR?>DEL DEV WB3P RS

Copyright © 1992 - 2016 NAPA. All rights reserved. 221 / 7399


NAPA for Design Manuals 2016.3

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

2.2. Steel reductions

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:

RED name (z1,r1) (z2,r2), ...

In which:

Copyright © 1992 - 2016 NAPA. All rights reserved. 222 / 7399


NAPA for Design Manuals 2016.3

name Name of compartment.

z1,z2 Heights from the baseline.

r1,r2 Corresponding local steel reduction, that is a fraction of the area at the given height.

Let us define one variable steel reduction as an example:

PAR?>RED WB4P (0 0.06) (0.7 0.06) (0.7 0.01) (3.2 0.01),


(3.2 0.06) (3.4 0.06) (3.4 0.01) (6.9 0.01),
(6.9 0.06) (7.1 0.06)

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 223 / 7399


NAPA for Design Manuals 2016.3

PAR?>DEL RED WB4P

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 224 / 7399


NAPA for Design Manuals 2016.3

--------------------------------------------------------
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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 225 / 7399


NAPA for Design Manuals 2016.3

Preparations for stability calculations


Some particular objects are needed to perform intact and damage stability calculations properly. Those objects are presented in this chapter.

Table of Contents:

1. Hulls for stability calculations


1.1. STABHULL for intact stability
1.2. DAMHULL for damage stability
2. Openings
3. Profile
4. Margin line
5. Freeboard deck edge
6. Bilge line

1. Hulls for stability calculations


Usually, the hull surface is defined in the DEF task on the positive side of the ship. However, a closed object containing both sides of the hull and
the deck above is needed for stability calculations. Two default rooms are used in NAPA for this purpose: STABHULL for intact stability and DAM
HULL for damage stability.

1.1. STABHULL for intact stability

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.

STABHULL was created in the chapter explaining rooms as follows:

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.

Exercise: Redefine STABHULL as explained above.

1.2. DAMHULL for damage stability

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 226 / 7399


NAPA for Design Manuals 2016.3

ROOM DAMHULL
LIM -, -, 0, HULL, -, MAINDECK, >TUNNEL
SYM
ADD CH1C
ADD CH2C
ADD STFC
OK

Exercise: Define DAMHULL as presented above.

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:

Main Window: Tools > Table Editor...

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 227 / 7399


NAPA for Design Manuals 2016.3

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:

ID Name of the opening.

FR/REFX, REFY, Position of the lowest point of the opening in the ship coordinate system.
REFZ

WT Watertightness of the opening. The most important alternatives are:


UNPROTECTED: If submerged, progressive flooding through the opening may occur.
WEATHERTIGHT: May submerge during flooding, but not in the final floating position.
WATERTIGHT: Has no effect on the flooding angle or the spreading of water.
UNNOPROGRESSIVE: As UNPROTECTED but not flooding progressively in calculation modes PROGR, WEPROGR
or WEPROGR2.
WEPROGRESSIVE: As WEATHERTIGHT but flooding progressively in calculation modes PROGR, WEPROGR or
WEPROGR2.
WENOPROGRESSIVE: As WEATHERTIGHT but not flooding progressively in calculation modes PROGR, WEPROGR
or WEPROGR2.
UNSEAWATEROVERFLOW: Unprotected opening which serves also as seawater overflow in dredger calculations.

The optional colums of an opening arrangement table are:

DES Description of the opening.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 228 / 7399


NAPA for Design Manuals 2016.3

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:

DEF?>GEN PROFILE ARR*A/Y=0.01 MERGE

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 229 / 7399


NAPA for Design Manuals 2016.3

DEF?>DES PROFILE !

CUR PROFILE; Y 0.01


XZ ** (83.054, 7.09), -111.42/, (81.753, 4.7),
/-111.43, (82.077, 4.051), (83.868, 2.659), (83.553,
1.263), (81.421, 0.178), -180/, (76.38, 0), /-,
-/, (72.18, 0), /-, -/, (57.27, 0), /-, -/, (42.36,
0), /-, -/, (29.58, 0), /-, -/, (16.8, 0), /-,
-/, (14.4, 0), /-, -/, (8.4, 0), /-, -/, (5.4, 0),
/-180, 146.26/, (2.5, 1.15), /-, -/, (2.5, 1.85),
/43.27, (3.208, 2.776), (2.779, 3.277), (1.464,
3.768), 169.74/, (-2.4, 4.4), /-, -/, (-2.465,
4.7), /102.16, 92.03/, (-2.8, 7.09), /-, -/, (2.4,
7.09), /-, -/, (2.4, 9.79), /-, -/, (4.8, 9.79),
/90, 84.88/, (5.4, 19.2), /-, -/, (8.4, 19.867),
/-, -/, (8.4, 15.19), /-, -/, (9.6, 15.19), /-,
-/, (9.6, 17.39), /-, -/, (9.967, 17.94), /-, -/,
(13.833, 17.94), /-, -/, (14.2, 17.39), /-108.43,
-90/, (13.8, 15.19), /-, -/, (14.4, 15.19), /-,
-/, (14.4, 12.49), /-, -/, (14.4, 9.79), /-, -/,
(14.4, 7.09), /-, -/, (16.8, 7.09), /-, -/, (16.8,
9.2), /-, -/, (42.36, 9.2), /-, -/, (42.36, 7.09),
/-, -/, (43.78, 7.09), /-, -/, (43.78, 9.2), /-,
-/, (69.34, 9.2), /-, -/, (69.34, 7.09), /-, -/,
(76.38, 7.09), /-, -/, (76.38, 9.72), /0.35, 1.3/,
(84.594, 9.864), /-118.98, (83.054, 7.09)

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?>DES PROFILE ! TOL=0.1

The results can be plotted with the following commands:

DEF?>PRO Y
--- DRAWING ---
DR?>PLO PROFILE

Copyright © 1992 - 2016 NAPA. All rights reserved. 230 / 7399


NAPA for Design Manuals 2016.3

The profile can also be defined as a curve in the DEF task:

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

Exercise: Define the profile curve.

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:

Generated with the z-coordinate:


GEN MARGIN HULL/Z=9.924
Generated by using the location of the main deck:
GEN MARGIN HULL/MAINDECK/(Z-0.076)
By using the MARGIN command in the DAM task.

Margin line definition in the DAM task refers to the generated curve:

Copyright © 1992 - 2016 NAPA. All rights reserved. 231 / 7399


NAPA for Design Manuals 2016.3

DEF?>GEN MARGINLINE HULL/MAINDECK/(Z-0.076)


DEF?>!END

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.

5. Freeboard deck edge


Freeboard deck edge is a curve used for calculating the angle at which the freeboard deck will immerse, and for calculating residual freeboard.
The curve representing freeboard deck edge is defined in the DEF task in the same way as the margin line. The FRB command in the CR task is
used to specify which geometry curve(s) can be used as freeboard deck edge. The height of freeboard deck edge can also be given directly in the
CR task as the argument CFRB.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 232 / 7399


NAPA for Design Manuals 2016.3

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:

The analyses that can be performed in the LD task include:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 233 / 7399


NAPA for Design Manuals 2016.3

Note! At least one lightweight version is required in order to create any loading conditions.

There are six ways of defining lightweight:

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 following table summarises the alternatives:

Distribution Weight CG Elements

None Given Given -

Lloyd's Given Given Optional

User Given Given Optional

Elem Calc Calc Given

Dim Calc Calc -

WG Calc Calc Optional

The LD task uses a lightweight condition named A as the default, so it is convenient to define at least this condition.

1.1. Useful commands of the LGDE task

In the LGDE task, all definitions are done by using commands as this task is not covered by the graphical user interface.

The most important general-purpose commands in the LGDE task are:

NEW Starts the definition of a new lightweight version. For example:


NEW A

CAT Creates a catalogue of stored lightweight versions.

GET Retrieves a stored lightweight definition. For example:


GET A

RENAME Renames the current lightweight version.

WHERE Indicates the current lightweight version.

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

SAVE Saves the current lightweight version.

REPL Replaces an existing lightweight definition in the database with the current one.

OK Exits the lightweight definition process.

END Returns to LD.

Copyright © 1992 - 2016 NAPA. All rights reserved. 234 / 7399


NAPA for Design Manuals 2016.3

Four commands are available for defining a lightweight:

WEIGHT Total lightweight of a ship [ton].

CG The centre of gravity of the total lightweight. For example:


CG 34.5 0 6.23

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

1.2. Lightweight without load distribution

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

1.3. Weight and distribution defined by a curve

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 235 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 236 / 7399


NAPA for Design Manuals 2016.3

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;

Copyright © 1992 - 2016 NAPA. All rights reserved. 237 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 238 / 7399


NAPA for Design Manuals 2016.3

1.4. Weight and distribution defined by elements

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 239 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 240 / 7399


NAPA for Design Manuals 2016.3

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.

Exercise: Create the lightweight version A based on the ELE*ELEMENTS table.

1.5. Combining the distribution curve and lightweight elements

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.

The following two example lightweight definitions illustrate this method.

The first definition is with a user-defined distribution curve only:

Copyright © 1992 - 2016 NAPA. All rights reserved. 241 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 242 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 243 / 7399


NAPA for Design Manuals 2016.3

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.

1.6. Saving and replacing

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.

2. Defining loading conditions


The easiest way to define and modify loading conditions is to use the graphical user interface, which can be opened by selecting:

Main Window: Tasks > Loading Conditions > Loading Conditions

Loading Conditions Window

2.1. Loading Conditions Window

There are four main tabs in the Loading Conditions Window. These are located in the upper left area of the window:

Copyright © 1992 - 2016 NAPA. All rights reserved. 244 / 7399


NAPA for Design Manuals 2016.3

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).

There is another set of tab controls in the lower table pane:

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.

2.2. Loading compartments

A new loading case is started by clicking the New button

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.

A loading condition is saved by clicking the Save button

and naming the case. An explanatory text can be added by selecting:

Loading Conditions Window: Load > Notes

An existing loading condition can be opened by clicking the Open button

Exercise: Define the loading conditions presented below.


LOAD1

Explanatory text: 'Lightship condition'


All compartments are empty.

LOAD2

Explanatory text: 'Ballast condition'


All ballast water tanks fully loaded.
All heavy fuel oil tanks fully loaded.

Copyright © 1992 - 2016 NAPA. All rights reserved. 245 / 7399


NAPA for Design Manuals 2016.3

All fresh and grey water tanks fully loaded.


All diesel oil tanks fully loaded.

LOAD3

Explanatory text: 'Departure condition'


Cargo tanks CH1C and CH2C 70% loaded.
All heavy fuel oil tanks 70% loaded.
All fresh and grey water tanks 70% loaded.
All diesel oil tanks 70% loaded.

2.3. Mass loads

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.

Mass Loads tab


There are two columns available in the Mass Loads table for defining a loaded component, Load and Name. 'Load' is the name of the loaded
substance while 'Name' refers to the formal location of the mass load. The Name column is optional, and is used mainly for output purposes.

There are two reasons why it may be useful to define the formal location:

To obtain a meaningful value when the Name quantity is listed.


To allow several mass components of the same type.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 246 / 7399


NAPA for Design Manuals 2016.3

LD?>LIST PAR
---------------------------------------------------------------------
NAME LOAD MASS FILL XM YM ZM FRSM
t % m m m tm
---------------------------------------------------------------------

CONTENTS=Deadweight Constant (RHO=1)

CREW DWC 1.0 0.0 12.00 0.00 11.00 0.00


PROVISION DWC 1.0 0.0 10.00 0.00 6.00 0.00
---------------------------------------------------------------------
SUBTOTAL DWC 2.0 11.00 0.00 8.50 0.00

CONTENTS= (RHO=0)

(MASS1) MASS1 5.0 0.0 30.00 0.00 5.00 0.00

CONTENTS= (RHO=0)

(MASS2) MASS2 10.0 0.0 40.00 0.00 4.00 0.00

CONTENTS= (RHO=1)

PAINT1 PAINT 2.0 0.0 80.00 0.00 9.00 0.00


PAINT2 PAINT 1.0 0.0 2.00 0.00 6.80 0.00
---------------------------------------------------------------------
SUBTOTAL PAINT 3.0 54.00 0.00 8.27 0.00
---------------------------------------------------------------------
TOTAL 20.0 36.70 0.00 5.34 0.00

Exercise: Define a loading condition with mass loads as listed below.


LOAD4

Explanatory text: 'Mass loads'


All heavy fuel oil tanks half loaded.
All freshwater tanks half loaded.
All diesel oil tanks half loaded.
The following mass loads:
MASS1, weight=300, centre of gravity (25 0 4), and longitudinal extension from 20 to 30 m.
MASS2, W=200, CG=(35 0 4)
MASS3, W=100, CG=(40 0 3)
MASS4, W=400, CG=(53 0 3), EXT=43 - 63
MASS5, W=300, CG=(65 0 4), EXT=60 - 70
MASS6, W=150, CG=(27 0 12), EXT=24 - 30
MASS7, W=100, CG=(37 0 12)
MASS8, W=80, CG=(50 0 13)
MASS9, W=100, CG=(65 0 12), EXT=57 - 73

Copyright © 1992 - 2016 NAPA. All rights reserved. 247 / 7399


NAPA for Design Manuals 2016.3

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.

The most important calculation arguments are as follows:

HULL The name of the hull object, default is STABHULL.

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.

HEEL Heeling angles used in stability calculations.

ARRV and LIGV Arrangement and lightweight versions.

FRSV Free surface calculation rule(s).

SLACK Filling limits of slack tanks.

3.1. Calculation mode

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 248 / 7399


NAPA for Design Manuals 2016.3

LFIX / FIX / FREE


LFIX (default): The ship is allowed to trim freely, but the liquid loads in tanks have the fixed trim angle 0.0.
FREE: The ship is allowed to trim freely and also all liquid loads in tanks have free trim when calculating the ship's floating
position.
FIX: The ship is kept at even keel when calculating the floating position and the stability curve.
SRED / NOSRED
SRED (default): Free surface moments for the correction of GM are multiplied by steel reductions, that is MOM=(1-sred)*rho*IY.
NOSRED: Reverse option, that is MOM=rho*IY.
USTR / ISTR
USTR (default): The ship's longitudinal strength is calculated with the ship being in the upright floating position (heel = 0.0).
ISTR: Reverse option where the calculation is performed with the actual heeling angle.
TRIM / EVKEEL
TRIM (default): The ship floats with free trim in the upright floating position. If MODE FIX was selected, it would be changed to
MODE LFIX.
EVKEEL: The ship is assumed to be at even keel in the upright floating position, that is the longitudinal centre of mass is
assumed to be equal with the longitudinal centre of buoyancy.

3.2. Handling of free surfaces

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.

IMO IMO RES. A.749(18) [A.167].

REAL Real, at real filling.

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.

R50 Real, at 50% filling.

IT Given moment at zero heel, shape=sine.

MAX The largest moment at even keel; independent of loading.

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:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 249 / 7399


NAPA for Design Manuals 2016.3

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 'ALL/ALL IMO' Rule IMO will be applied to all tanks.

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.

3.3. Heeling angles

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

would be better than

HEEL 0 10 20 30 40 50

3.4. Strength limit curves

The curves limiting longitudinal strength can be created using a Manager Application called STRLIM. This application can be opened directly from
the LD Window:

Copyright © 1992 - 2016 NAPA. All rights reserved. 250 / 7399


NAPA for Design Manuals 2016.3

Loading Conditions Window: Define > Limit curves

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.

Top level of the STLIM Manager Application


The user can select whether individual limit curves are defined using one or two tables. Using two table is useful if minimum and maximum
allowable values have knuckles on different X locations. The user can specify names and descriptive texts of each individual limit curve as can be
seen in the following figure.

Copyright © 1992 - 2016 NAPA. All rights reserved. 251 / 7399


NAPA for Design Manuals 2016.3

Selections for seagoing limit curves


Bending moment limit curves for seagoing condition have been defined in the following figure using two tables.

Copyright © 1992 - 2016 NAPA. All rights reserved. 252 / 7399


NAPA for Design Manuals 2016.3

Bending moment limit curves for seagoing condition

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.

Loading Conditions Window: Load > Balance

Copyright © 1992 - 2016 NAPA. All rights reserved. 253 / 7399


NAPA for Design Manuals 2016.3

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:

Free: the amount of load in selected tanks can be changed freely.


Keep Unchanged: the total amount of load in selected tanks is kept constant but location can be changed freely.
Minimum: the amount of load in selected tanks is kept to a minimum.
Maximum: the amount of load in selected tanks is maximised.
User-defined: the amount of load in selected tanks is set as 'equal to', 'less than', or 'more than' (tons).

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 254 / 7399


NAPA for Design Manuals 2016.3

5. Loading conditions group


A group of loading conditions can be defined for specific needs. These usually relate to output, for example, preparing the stability booklet:

LGR GROUP1 ldcase1 ldcase2 ...

6. Useful commands in the LD task


There are numerous additional useful features and functionality available in the LD task which are presented in more detail in the Napa Manuals.
For instance, the following commands are available:

Command Description

CAT Catalogues of stored data, such as CAT LOAD, CAT LGR, CAT LCUR.

DEScription Definitions in input form.

DES name Description of a given loading condition.

Copyright © 1992 - 2016 NAPA. All rights reserved. 255 / 7399


NAPA for Design Manuals 2016.3

DES LOAD R Description of the current loading condition with relative values.

DES LGR name Description of a given loading condition group.

UNSave Deletes the named definition data.

UNS LOAD name Deletes the given loading condition.

UNS LCUR name Deletes the given limit curves of strength.

UPDATE ALL Updates calculated data of all loading conditions; useful after geometric changes.

ADD Adds a partial loading condition.

PAIR Defines tank pairs.

PRIority Defines loading priority for a given load.

SELect Selects a subset of compartments or loading conditions for further use.

SUP Defines tank supports.

SAVE Saves a new loading condition.

REPlace Replaces an existing loading condition.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 256 / 7399


NAPA for Design Manuals 2016.3

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:

The hull used in the calculation (DAMHULL).


The arrangement used in the calculation (ARR*).
The initial condition before the damage (INIT).
The definition of the damage (DAM).

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:

1. Calculation hull DAMHULL


2. Initial conditions
2.1. Group of initial conditions
2.2. Useful commands
2.3. Exercise
3. Damage definitions
3.1. Group of damage definitions
3.2. Useful commands
3.3. Exercise
4. Calculation arguments
4.1. Calculation options
4.2. Margin line
4.3. Relevant openings
5. Calculating damage stability
6. Output
6.1. Standard list components
6.2. Standard output macros
6.3. Standard plot diagram components
6.4. Arrangement-oriented drawings
6.5. Standard output macros
6.6. Using the case scanner
7. Probabilistic damage stability
7.1. General
7.2. Subdivision draught
7.3. Generating the B/2 surface
7.4. Checking the permeabilities of compartments
7.5. Creating the subdivision
7.6. Creating the compartment limits table
7.7. Generating single-zone damages
7.8. Generating multiple-zone damages
7.9. Initial conditions
7.10. Calculating damage cases
7.11. Calculating probabilities
7.12. Outputting results

Copyright © 1992 - 2016 NAPA. All rights reserved. 257 / 7399


NAPA for Design Manuals 2016.3

7.13. Finding the minimum GM making A=R

1. Calculation hull DAMHULL


The watertight hull used in damage calculations is defined in the DEF task. The default name of this room object is DAMHULL, and it is retrieved
from the reference system.

For more information on how to define DAMHULL, see the chapter entitled Preparations for Stability Calculations.

Note! All compartments that may be damaged must be within DAMHULL.

2. Initial conditions
The initial condition determines the ship's floating position and centre of gravity and liquid loads onboard before the damage.

The initial condition can be defined in one of three alternative ways:

By giving T, TR, GM/KG, and possible liquid loads.


By giving DISP, CG, and possible liquid loads.
By referring to a loading condition.

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:

Dam?>INIT INI1 'Initial condition No 1'


Init?>T 5
Init?>TR -1.34
Init?>GM 0.67
Init?>OK

Or:

Dam?>INIT INI2 'Initial condition No 2'


Init?>DISP 5623.4
Init?>CG (50 0.1 9.2)
Init?>OK

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 258 / 7399


NAPA for Design Manuals 2016.3

Dam?>INIT INI2 'Initial condition No 2'


Init?>DISP 5623.4
Init?>CG (50 0.1 9.2)
Init?>LIQ R1 VOL=303
Init?>LIQ R2 FILL=0.75
Init?>LIQ R3 WEIGHT=50
Init?>OK

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:

Dam?>INIT INI3 'Initial condition No 3'


Init?>LOAD LOADCASE1 IND
Init?>OK

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:

Dam?>INIT INI4 'Initial condition No 4'


Init?>LOAD LOADCASE2
Init?>OK

2.1. Group of initial conditions

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 259 / 7399


NAPA for Design Manuals 2016.3

2.2. Useful commands

CAT INI Catalogue of saved initial conditions.

CAT IGR Catalogue of saved initial condition groups.

DES INI name Description of a saved initial condition.

DES IGR name Description of a saved initial condition group.

DES INI group_name Descriptions of all the initial conditions belonging to the group.

2.3. Exercise

Exercise: Define the following initial conditions and group them.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 260 / 7399


NAPA for Design Manuals 2016.3

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.

In intermediate phases, rooms can have:

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

3.1. Group of damage definitions

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 261 / 7399


NAPA for Design Manuals 2016.3

In the above, the name of the group of damage definitions is DG and the members of the group are DAM1, DAM2, and DAM3.

3.2. Useful commands

CAT DAM Catalogue of saved damage definitions.

CAT DGR Catalogue of saved damage definition groups.

DES DAM name Description of a saved damage definition.

DES DGR name Description of a saved damage definition group.

DES DAM group_name Descriptions of all the damage definitions belonging to the group.

3.3. Exercise

Exercise: Define the following damages and group them.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 262 / 7399


NAPA for Design Manuals 2016.3

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.

Of these, the most important calculation arguments are:

HULL Name of the hull object used in the calculations; default is DAMHULL.

HEEL Heeling angles used in stability calculations.

ARRV Arrangement used when retrieving room parameters or plotting backgrounds.

OPARR Name of the opening arrangement table (without prefix OPE*).

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.

MARGIN The current margin line.

ROP Relevant openings; taken into account in calculations.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 263 / 7399


NAPA for Design Manuals 2016.3

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.

4.1. Calculation options

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.

Options PERM (default) / NOPERM

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.

Options NOPROG (default) / PROGR / WEPROGR / WEPROGR2

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.

Options LOG (default) / NOLOG

LOG Prints the whole calculation log.

NOLOG Flooded compartments and heeling angles in the calculation log are not printed.

Options CDISP (default) / VDISP

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.

Options CDIR (default) / WDIR / HDIR / TWDIR

CDIR Calculates the GZ curve in the constant direction specified by the azimuth angle in the initial condition.

Options DB (default) / MEM

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.

Options COMM (default) / INDIV

COMM Rooms open to sea fill with a common surface (provided they are not marked to flood individually).

INDIV All rooms open to sea fill individually.

Copyright © 1992 - 2016 NAPA. All rights reserved. 264 / 7399


NAPA for Design Manuals 2016.3

4.2. Margin line

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:

DEF?>GEN, MARGIN, HULL/MAINDECK/(Z-0.076)


DEF?>!END
TASK?>DAM

Dam?>MARGIN MARG
Marg?>CURVE MARGIN
Marg?>OK

4.3. Relevant openings

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:

ROP op1 op2 op3 ...

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.

5. Calculating damage stability


The two basic elements required, the initial condition (INIT) and the damage definition (DAM), are independent objects, however, stability results
are calculated for their combinations. This combination of the initial condition and damage definition is called a case.

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).

Examples of use of the CAL command:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 265 / 7399


NAPA for Design Manuals 2016.3

6. Output
The easiest way to create output is to use the Output tab in the task-specific window.

Main Window: Task > Damage Stability > Damage Stability

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.

6.1. Standard list components

The floating position of each case can be checked with LIST FLOAT ini/dam. For example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 266 / 7399


NAPA for Design Manuals 2016.3

Dam?>LIST FLOAT INI1/DAM1


FLOATING POSITION
Case INI1/DAM1...
...OK

--------------------------------------------------------------------------
------
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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 267 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 268 / 7399


NAPA for Design Manuals 2016.3

Dam?>LIST FLOAT INI1/DAM1


FLOATING POSITION
Case INI1/DAM1...
...OK

--------------------------------------------------------------------------
------
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.

6.2. Standard output macros

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:

LIST .DRES ini/dam

6.3. Standard plot diagram components

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:

Dam?>PLD GZ ini1/dam2 stage=final pha=2

Copyright © 1992 - 2016 NAPA. All rights reserved. 269 / 7399


NAPA for Design Manuals 2016.3

6.4. Arrangement-oriented drawings

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:

Dam?>SET GET SET1


Dam?>DRW FLOAT INI1/DAM1 STA=FINAL PHA=*LAST

Copyright © 1992 - 2016 NAPA. All rights reserved. 270 / 7399


NAPA for Design Manuals 2016.3

6.5. Standard output macros

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 271 / 7399


NAPA for Design Manuals 2016.3

PLOT .DAMDEF DAM2

Copyright © 1992 - 2016 NAPA. All rights reserved. 272 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 273 / 7399


NAPA for Design Manuals 2016.3

6.6. Using the case scanner

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.

In the first selection field, different LIST outputs are available.


Different PLD variations can be chosen in the second selection field.
The third selection field is reserved for setup-based DRW output.

Changing the active case will update all open Output windows.

Copyright © 1992 - 2016 NAPA. All rights reserved. 274 / 7399


NAPA for Design Manuals 2016.3

7. Probabilistic damage stability


The SOLAS 2009 rules for damage stability entered into force on 1 January 2009. This method calculates the probability that a ship will remain
afloat without sinking or capsizing as a result of an arbitrary collision in a given longitudinal position of the ship. The concept is based on statistical
data concerning what actually happens when ships collide, in terms of the sea state and weather conditions, the extent and location of damage,
the speed and course of the ship, and whether the ship survived or sank.

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

A = Attained subdivision index


pi * r i * v i * s i
R = Required index
The rule formula based on the subdivision length and the number of passengers.

In the calculation of the attained index A, the following factors are used:

Copyright © 1992 - 2016 NAPA. All rights reserved. 275 / 7399


NAPA for Design Manuals 2016.3

p = probability of a damage situation


Probability that only the compartment or a group of compartments under consideration may be flooded.
r = transversal extent of the damage
Probability that a longitudinal bulkhead will not be breached by the damage. For each longitudinal bulkhead inside the ship’s side, an r
value will be calculated.
v = vertical extent of the damage
Probability that a watertight deck above the waterline remains intact.
s = probability of the ship surviving the damage
Based on the range and maximum value of the GZ curve and the heeling angle in the final floating position.

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.

7.2. Subdivision draught

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

7.3. Generating the B/2 surface

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:

DEF?>GEN B2LIM B5 HULL 4.8 B/2 Y

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 276 / 7399


NAPA for Design Manuals 2016.3

DEF?>SUR B2LIM_NEG
S?>REF B2LIM
S?>OK

7.4. Checking the permeabilities of compartments

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

Machinery spaces 0.85

Void spaces 0.95

Spaces for liquids 0 or 0.95

In addition to the above, a variable permeability depending on the current draught is to be defined for the following compartment types:

Spaces Permeability at deepest T Permeability at partial T Permeability at lightest T

Dry cargo spaces 0.70 0.80 0.95

Container spaces 0.70 0.80 0.95

Ro-ro spaces 0.90 0.90 0.95

Cargo liquids 0.70 0.90 0.95

The variable permeability is defined in the IPERM column. PERM is ignored whenever IPERM is available. The definition syntax is as follows:

T perm1 T1 perm2 T2 perm3...

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:

T 0.95 3.75 0.9 4.5 0.7

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 277 / 7399


NAPA for Design Manuals 2016.3

7.5. Creating the subdivision

The subdivision is defined as a NAPA table, and it is mainly user input.

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:

Main Window: Task > Damage Stability > Definition of Subdivision

A limit in the subdivision table can be:

Any general, facet, or plane surface defined in the DEF task.


An explicit coordinate value or frame number.
A NAPA compartment (for example, DAMHULL).

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.

For example, zone Z1:

Note! Zones are defined in the order from aft to fore.

Copyright © 1992 - 2016 NAPA. All rights reserved. 278 / 7399


NAPA for Design Manuals 2016.3

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 (/).

For example, zone Z3:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 279 / 7399


NAPA for Design Manuals 2016.3

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.

7.6. Creating the compartment limits table

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.

The graphical user interface for compartment limits is opened by selecting:

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 280 / 7399


NAPA for Design Manuals 2016.3

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.

7.7. Generating single-zone damages

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:

GEN DAM SUB=subd WTC=clim SIDE=side PREF=pref STO=tab BLIM=lim BOX

in which:

subd Name of the subdivision table.

clim Name of the compartment limits table.

side Side of damage P/S; by default P.

pref Prefix of the damage name.

sto Name of table in which damages are stored.

lim Name of surface limiting extreme penetration.

BOX Box-shaped damage (default; should be always used with SOLAS 2009!).

Damage cases are automatically named according to the following components:

Copyright © 1992 - 2016 NAPA. All rights reserved. 281 / 7399


NAPA for Design Manuals 2016.3

<pref><side><zone>.<ls>.<hsu>-<hsd>

pref = Prefix defined in the GEN DAM command.


side = Side of the study.
zone = The number of the zone.
ls = Index of the longitudinal limit of the damage (from side towards the B/2 limit).
hsu = Index of the horizontal limit of the damage (upwards from HSD).
hsd = Index of the 'lesser extent' limiting the damage downwards.

Examples:

SDSP1.2.0 Single-compartment PS damage in zone 1, no horizontal limits.

SDSP1-2.0.0 Two-compartment PS damage in zones 1-2, no horizontal limits.

SDSP2.1.1 Single-compartment PS damage in zone 2, first horizontal limit upwards.

SDSP2.1.1-1 Same as above but with the lesser extent limit downwards.

The following should be noted:

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:

GEN DAM SUBD=ZONES WTC=CLIM SIDE=P PREF=DAM STO=DAM1 BLIM=B2LIM BOX

A total of 30 damages were generated and saved in the TAB*DAM1 table. The damage definitions were stored in the database as well.

7.8. Generating multiple-zone damages

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:

GEN DAM SUB=subd WTC=clim SIDE=side PREF=pref ADJ=nn OZD=ozd STO=tab


BLIM=lim

in which the new options are:

ozd Name of the table containing single-zone damages.

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:

GEN DAM SUBD=ZONES WTC=CLIM SIDE=P PREF=DAM ADJ=2-3 OZD=DAM1 STO=DAM2


BLIM=B2LIM

A total of 109 damages were generated and saved in the TAB*DAM2 table. The damage definitions were stored in the database as well.

Copyright © 1992 - 2016 NAPA. All rights reserved. 282 / 7399


NAPA for Design Manuals 2016.3

7.9. Initial conditions

According to SOLAS 2009, each damage should be calculated with three initial conditions:

The deepest subdivision draught (DS).


Partial subdivision draught (DP).
The lightest service draught (DL).

The needed draughts were discussed earlier when defining variable permeabilities, and now they are used in the initial conditions:

INIT DS 'Deepest subdivision draught'


T 4.8
GM 1.78

INIT DP 'Partial subdivision draught'


T 4.2
GM 2.15

INIT DL 'Light service draught'


T 3.3
TR 0.6
GM 2.65

7.10. Calculating damage cases

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:

Name of initial condition (INIT).


Name of damage table (DAMTAB).
Weight coefficient (WCOEF).
Name of subdivision table (SUBD).

In the example project, TAB*SUMMARY is defined as follows:

Copyright © 1992 - 2016 NAPA. All rights reserved. 283 / 7399


NAPA for Design Manuals 2016.3

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:

Watertight hull (DAMHULL).


Heeling angles (at least up to 50 degrees).
Possible openings (OPARR and ROP).
Possible compartment connections.
Normally, no criteria is relevant for index calculation; otherwise they set S=0 if criteria are not met.

The calculation is started with the command:

Dam?>CAL TAB=tab STO=sto

in which

tab Name of the summary table.

sto Name of table in which probability data is stored.

For example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 284 / 7399


NAPA for Design Manuals 2016.3

Dam?>CAL TAB=SUMMARY STORE=RESULT

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 selection is made with the SEL CASES command:

DAM?>SEL CASES TAB=RESULT STORE=RESULT1 ONLY=(MINS, MAXHEEL)

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

7.11. Calculating probabilities

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:

DAM?>CAL PROB TAB=RESULT1

The resulting factors of each case are added in the results table.

7.12. Outputting results

Copyright © 1992 - 2016 NAPA. All rights reserved. 285 / 7399


NAPA for Design Manuals 2016.3

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:

Dam?>LIST PSUM PTAB=RESULT1

ATTAINED AND REQUIRED SUBDIVISION INDEX

Subdivision length 87.383 m


Breadth at the load line 13.000 m
Breadth at the bulkhead deck 13.000 m

Required subdivision index R = 0.43194

Attained subdivision index A = 0.81856

INITDAMTAB T GM SUBD WCOEF ASI


m m
DL SDSD1-P 1.920 2.500 ZONES 0.200 0.10831
DL SDSD2-P 1.920 2.500 ZONES 0.200 0.04398
DP SDSD1-P 3.648 2.300 ZONES 0.400 0.21662
DP SDSD2-P 3.648 2.300 ZONES 0.400 0.12059
DS SDSD1-P 4.800 2.100 ZONES 0.400 0.21662
DS SDSD2-P 4.800 2.100 ZONES 0.400 0.11244

The LIST PRES command contains all possible quantities as a function of the calculation case. Two predefined LQs are used in the following
examples:

Dam?>LQ PRES GET PROBB


Dam?>LIS PRES PTAB=RESULT1

--------------------------------
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
--------------------------------

Copyright © 1992 - 2016 NAPA. All rights reserved. 286 / 7399


NAPA for Design Manuals 2016.3

Dam?>LQ PRES GET PROBA


Dam?>LIS PRES PTAB=RESULT1

------------------------------------------------------------------
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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 287 / 7399


NAPA for Design Manuals 2016.3

7.13. Finding the minimum GM making A=R

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 288 / 7399


NAPA for Design Manuals 2016.3

Dam?>CAL PROB TAB=RESULT1 MINGM

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 289 / 7399


NAPA for Design Manuals 2016.3

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:

CR_I for intact stability.


CR_D for damage stability.

The following figure illustrates the relations between the LD, CR, and DAM tasks:

LD, CR, and DAM task relations


The main purposes of the CR task are to:

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:

Main Window: Tasks > Intact Stability Criteria

Note! The CR_D environment does not have a task-specific window.

Copyright © 1992 - 2016 NAPA. All rights reserved. 290 / 7399


NAPA for Design Manuals 2016.3

Intact Criteria Window


Table of Contents:

1. Intact criteria check


1.1. Command-based method
1.2. Criteria check in the LD Window
1.3. The minimum GM and maximum KG limits
2. Damage criteria check
2.1. The minimum GM and maximum KG limits
2.2. Combined intact and damage stability limits
3. Predefined criteria in the CR task
4. Criteria definitions
4.1. Criterion types
4.2. Requirements
4.3. Range
4.4. Intact stability criteria examples
4.5. Damage stability criteria examples
4.6. Criteria groups
4.7. Exercises
5. External heeling moments
5.1. Independent moment curves
5.2. Dependent moment curves
5.3. Exercise
6. Useful commands in the CR task

1. Intact criteria check

1.1. Command-based method

Copyright © 1992 - 2016 NAPA. All rights reserved. 291 / 7399


NAPA for Design Manuals 2016.3

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?>

The relevant arguments are shown with the ARG command:

Copyright © 1992 - 2016 NAPA. All rights reserved. 292 / 7399


NAPA for Design Manuals 2016.3

ENV INTACT ;** environment


RCR AREA30 AREA40 AREA3040 GZ0.2 MAXGZ25 GM0.15 ;** relevant criteria
LOADS LOAD2 ;** loading
conditions
HULL STABHULL ;** hull name
T (2.88, 4.8, 0.48) ;** draught, moulded
M
TR 0 ;** trim
M
GM 0.15 ;** metacentric
height M
KG not given ;** KG
M
AZI 0 ;** azimuth angle
DEGREE
HEEL 0 1 3 5 7 10 12 15 20 25 30 35 40 50 ;** heeling angle
DEGREE
OPARR OPENINGS ;** opening
arrangement
ROP OP1P OP1S OP2P OP2S OP3P OP3S OP4P OP4S ;** relevant openings
RPO ... ;** special points
CFRB FRB ;** freeboard deck
edge
CBILGE ... ;** bilge line
CMARG ... ;** margin line
MODE FREE NOSTEP TCG0 AUTO CDISP ;** calculation mode
RHO 1.025 ;** density
T/M3
ITOL 'GM=0.01,M=0.005,DEG=0.5000002,MRAD=0.0002,RATIO=0.05'
;** iteration
tolerance
NITER 100 ;** number of
iterations
PROF PROFILE ;** profile curve
VS 0 ;** service speed
M/S
VF 0 ;** full speed
M/S
NPASS 12 ;** number of
passengers
PBAL ... ;** permanent ballast
GZCUR not given ;** GZ curve
ZCG not given ;** z of centre of
gravity M
DISP not given ;** total
displacement T

Before creating any output, it has to be ensured that the arguments have been set correctly. The most important arguments are as follows:

Copyright © 1992 - 2016 NAPA. All rights reserved. 293 / 7399


NAPA for Design Manuals 2016.3

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.

OPARR Name of the opening arrangement table.

ROP Relevant openings; determines which openings in the OPARR table are taken into account.

CFRB Freeboard deck edge.

CMARG Margin line.

PROF Profile curve.

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:

CR_I?>LQ CRT, RCR, TEXT, REQ, ATTV, UNIT, STAT, SIDE


CR_I?>LIS CRT

Loading condition: Departure Condition

-------------------------------------------------------------------
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
-------------------------------------------------------------------

CR_I?>PLD CRC AREA3040

Copyright © 1992 - 2016 NAPA. All rights reserved. 294 / 7399


NAPA for Design Manuals 2016.3

Criteria check diagram for the AREA3040 criterion

1.2. Criteria check in the LD Window

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.

Criteria tab in the Loading Conditions Window

1.3. The minimum GM and maximum KG limits

Copyright © 1992 - 2016 NAPA. All rights reserved. 295 / 7399


NAPA for Design Manuals 2016.3

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:

T Draughts for the calculation of limit curves.

TR Trims for the calculation.

LOADS Loading conditions included in the diagram.

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:

CR_I?>T (1, 5.5, 0.5)


CR_I?>TR 0
CR_I?>LOADS LOAD1, LOAD2, LOAD3, LOAD4
CR_I?>RCR V.AREA30, V.AREA40, V.AREA3040, V.GZ0.2, V.MAXGZ25, V.GM0.15

CR_I?>LQ LIM, T, TR, MINGM, MAXKG, DCR


CR_I?>LIS LIM

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.
-----------------------------------------

Copyright © 1992 - 2016 NAPA. All rights reserved. 296 / 7399


NAPA for Design Manuals 2016.3

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:

Minimum GM limit diagram

CR_I?>PQ LIM, T, GMLIMIN('GM-limit'), GM, (LCOND)


CR_I?>POO LIM, BOX=AXIS, NET=BGNET, LGTEXT=S, LEGEND, LGTYPE=IL, FONT=DIAG,

FIG=PLD1, T19='Min GM (m)',


ARG: AXIS=Z, RANGE=OFF,
GMLIMIN: AXIS=LB, PEN=F1, RMARG=*0.1, LABEL='',
GM: AXIS=LB, RANGE=GMLIMIN, PEN=F1, RMARG=*0.1, MARK=+,
NOCUR, LABEL='', TAG=LCOND

CR_I?>PLD LIM

Minimum GM limit curve


Maximum KG limit diagram

Copyright © 1992 - 2016 NAPA. All rights reserved. 297 / 7399


NAPA for Design Manuals 2016.3

CR_I?>PQ LIM, T, KGLIMIN('KG-limit'), KG, (LCOND)


CR_I?>POO LIM, BOX=AXIS, NET=BGNET, LGTEXT=S, LEGEND, LGTYPE=IL, FONT=DIAG,

FIG=PLD1, T19='Max KG (m)',


ARG: AXIS=Z, RANGE=OFF,
KGLIMIN: AXIS=RB, PEN=F2, RMARG=*0.1, LABEL='',
KG: AXIS=RB, RANGE=KGLIMIN, PEN=F2, RMARG=*0.1, MARK=+,
NOCUR, LABEL='', TAG=LCOND

CR_I?>PLD LIM

Maximum KG limit curve


More information on the PQ and POO definition options is available in the Napa Manuals (Drawing (DR): 10 Standard diagram output module),
and with the !EXP PQ/GEN and !EXP POO/GEN commands in NAPA.

2. Damage criteria check


The damage criteria check can be carried out directly in the DAM task without entering CR_D. The basic principles are similar to intact criteria
check; the most important thing is to check the arguments before creating any output.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 298 / 7399


NAPA for Design Manuals 2016.3

Dam?>LIS DCRT INI3/DAM1 STAGE=*LAST PHASE=EQ

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
--------------------------------------------------------------------------

Dam?>POO DCRC, BOX, NET=BGNET, LGTEXT=S, LEGEND, LGTYPE=IL, FONT=DIAG,


ARG: AXIS=Z, RANGE=OFF,
GZ: AXIS=LB, PEN=F1, RMARG=*0.1,
EPHI: AXIS=LB, RANGE=GZ, PEN=F2, LABEL='',
MOM: AXIS=LB, RANGE=GZ, PEN=F6, LABEL='',
GM: AXIS=LB, RANGE=GZ, PEN=F4, LABEL=''

Dam?>PLD DCRC INI3/DAM1 STAGE=*LAST PHASE=EQ CRIT=('MINAREA1.S')

Copyright © 1992 - 2016 NAPA. All rights reserved. 299 / 7399


NAPA for Design Manuals 2016.3

Criteria check diagram for the MINAREA1.S criterion


More information on the PLD command syntax can be viewed with the !EXP PLD DCRC command in the DAM task.

2.1. The minimum GM and maximum KG limits

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 300 / 7399


NAPA for Design Manuals 2016.3

Dam?>LQ DLIM, T, MINGM, MAXKG, DCRI, DAM


Dam?>LIS DLIM IGR1/DGR1

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.

Minimum GM limit diagram

Dam?>PQ DLIM, T, GMLIMDA('GM-limit'), GM


Dam?>POO DLIM, BOX=AXIS, NET=BGNET, LGTEXT=S, LEGEND, LGTYPE=IL, FONT=DIAG,

FIG=PLD1, T19='Min GM (m)',


ARG: AXIS=Z, RANGE=OFF,
GMLIMDA: AXIS=LB, PEN=F1, RMARG=*0.1, LABEL='',
GM: AXIS=LB, RANGE=GMLIMIN, PEN=F1, RMARG=*0.1, NOCUR,
LABEL=''

Dam?>PLD DLIM IGR1/DGR1

Copyright © 1992 - 2016 NAPA. All rights reserved. 301 / 7399


NAPA for Design Manuals 2016.3

Minimum GM limit curve


Maximum KG limit diagram

Dam?>PQ DLIM, T, KGLIMDA('KG-limit'), KG


Dam?>POO DLIM, BOX=AXIS, NET=BGNET, LGTEXT=S, LEGEND, LGTYPE=IL, FONT=DIAG,

FIG=PLD1, T19='Max KG (m)',


ARG: AXIS=Z, RANGE=OFF,
KGLIMDA: AXIS=LB, PEN=F2, RMARG=*0.1, LABEL='',
KG: AXIS=LB, RANGE=KGLIMIN, PEN=F2, RMARG=*0.1, NOCUR,
LABEL=''

Dam?>PLD DLIM IGR1/DGR1

Copyright © 1992 - 2016 NAPA. All rights reserved. 302 / 7399


NAPA for Design Manuals 2016.3

Maximum KG limit curve


More information on the PQ and POO definition options is available in the Napa Manuals (Drawing (DR): 10 Standard diagram output module),
and with the !EXP PQ/GEN and !EXP POO/GEN commands in NAPA.

2.2. Combined intact and damage stability limits

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 303 / 7399


NAPA for Design Manuals 2016.3

CR_I?>PQ LIM, T, GMLIMIN('GM-limit'), GM


CR_I?>PLD LIM NAME='GMLIMINT'
CR_I?>!END
TASK?>DAM

Dam?>PQ DLIM, T, GMLIMIN('GM-limit I'), GMLIMDA('GM-limit D'), GM


Dam?>POO DLIM, BOX=AXIS, NET=BGNET, LGTEXT=S, LEGEND, LGTYPE=IL, FONT=DIAG,

FIG=PLD1, T19='Min GM (m)',


ARG: AXIS=Z, RANGE=OFF,
GMLIMIN: AXIS=LB, PEN=MP13, LABEL='',
GMLIMDA: RANGE=GMLIMIN, PEN=F1, RMARG=*0.1, LABEL='',
GM: AXIS=LB, RANGE=GMLIMDA, PEN=F1, RMARG=*0.1, NOCUR,
LABEL=''

Dam?>PLD DLIM IGR1/DGR1 INLIM='GMLIMINT'

Minimum GM intact and damage criteria limit curves

Copyright © 1992 - 2016 NAPA. All rights reserved. 304 / 7399


NAPA for Design Manuals 2016.3

CR_I?>PQ LIM, T, KGLIMIN('KG-limit'), KG


CR_I?>PLD LIM NAME='KGLIMINT'
CR_I?>!END
TASK?>DAM

Dam?>PQ DLIM, T, KGLIMIN('KG-limit I'), KGLIMDA('KG-limit D'), KG


Dam?>POO DLIM, BOX=AXIS, NET=BGNET, LGTEXT=S, LEGEND, LGTYPE=IL, FONT=DIAG,

FIG=PLD1, T19='Max KG (m)',


ARG: AXIS=Z, RANGE=OFF,
KGLIMIN: AXIS=LB, RANGE=(1,7), PEN=MP23, LABEL='',
KGLIMDA: PEN=F2, RANGE=KGLIMIN, RMARG=*0.1, LABEL='',
KG: AXIS=RB, RANGE=KGLIMIN, PEN=F2, RMARG=*0.1, NOCUR,
LABEL=''

Dam?>PLD DLIM IGR1/DGR1 INLIM='KGLIMINT'

Maximum KG intact and damage criteria limit curves

3. Predefined criteria in the CR task


The NAPA database (DB7) contains a variety of predefined criteria definitions for both intact and damage stability. The predefined criteria cover
several rules, e.g. 2008 IS Code (criteria groups IS2008.x in CR_I), International Grain Code (criteria group IGC in CR_I) and MARPOL (criteria
group V.MARPOL in CR_D).

Copyright © 1992 - 2016 NAPA. All rights reserved. 305 / 7399


NAPA for Design Manuals 2016.3

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

RCR V.AREA30, V.AREA40, V.AREA3040, V.GZ0.2, V.MAXGZ25, V.GM0.15

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.

The criterion definition syntax is as follows:

CRI critname ‘Description text’


TYP type
REQ requirement
STA requirement <optional> ! only in DAM !
PHA requirement <optional> ! only in DAM !
FIN requirement <optional> ! only in DAM !
PRO requirement <optional> ! only in DAM !
RAN lim_1, lim_2 <optional>
MOM momentname <optional>
OK / SAVE SYSDB

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?>

4.1. Criterion types

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 306 / 7399


NAPA for Design Manuals 2016.3

MAXGZ The maximum height of the GZ curve.

MINGZ The minimum reserve of the GZ curve to C*sin(heel).

MAXHEEL Steady equilibrium heeling angle.

MINAREA Area under the GZ curve.

MINGM GM in the upright (default) or steady equilibrium position.

POSMAX Position of the maximum GZ.

DOWNFLD Angle of downflooding.

RANGE Range of stability.

VSTAB Angle of vanishing stability.

RESFLD Reserve to downflooding.

RESFRB Reserve to immersion of freeboard.

ARATIO1 Area ratio in wind and rolling condition.

ARATIO2 Area ratio in wind condition.

RESDYN Reserve dynamic stability.

DYNARM Dynamic stability arm.

GZRATIO Ratio of GZ to moment.

RESMRG Reserve to immersion of margin line.

SSOLAS Probability of survival s in accordance with SOLAS II-1, Part B-1.

MACRO Criterion is defined by a macro.

CRANE1 Drop of crane load; based on area ratio.

CRANE2 Drop of crane load; based on residual area.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 307 / 7399


NAPA for Design Manuals 2016.3

The command syntax is as follows:

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.

4.4. Intact stability criteria examples

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:

CRIT, AREA3040 'Area under GZ curve between 30 and 40 deg'


TYPE, MINAREA
REQ, 0.03
RANG, 30, 40
OK

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 308 / 7399


NAPA for Design Manuals 2016.3

more:

CRIT, GZ0.2, 'Max GZ > 0.2 m'


TYPE, MAXGZ
REQ, 0.2
RANG, 30, -
OK

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:

CRIT, MAXGZ25, 'Max. GZ at an angle > 25 deg.'


TYPE, POSMAX
REQ, 25
OK

Copyright © 1992 - 2016 NAPA. All rights reserved. 309 / 7399


NAPA for Design Manuals 2016.3

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:

CRIT, GM0.15, 'GM > 0.15 m'


TYPE, MINGM
REQ, 0.15
OK

Copyright © 1992 - 2016 NAPA. All rights reserved. 310 / 7399


NAPA for Design Manuals 2016.3

4.5. Damage stability criteria examples

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:

CRIT, MINAREA1.S, 'Minarea of GZ-curve'


TYPE, MINAREA
REQ, 0.015
RANG, EQ, MIN(22, FA)
OK

Copyright © 1992 - 2016 NAPA. All rights reserved. 311 / 7399


NAPA for Design Manuals 2016.3

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:

CRIT, RANGE.S, 'Range of pos. stab'


TYPE, RANGE
REQ, 15
STA, 7
PHA, 7
RANG, 0, FA
OK

Copyright © 1992 - 2016 NAPA. All rights reserved. 312 / 7399


NAPA for Design Manuals 2016.3

4.6. Criteria groups

In many cases, it is convenient to group frequently used criteria. A criteria group can be defined with the CGR command:

CR_I?>CGR EXAMPLE MINAREA1.S RANGE.S

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 313 / 7399


NAPA for Design Manuals 2016.3

CRIT, TEST1, 'Max GZ > 0.2'


TYPE, MAXGZ
REQ, 0.2
RANG, 30, -
OK

CRIT, TEST2, 'Max. GZ at an angle > 25 deg.'


TYPE, POSMAX
REQ, 25
OK

CRIT, TEST3, 'GM > 0.15 m'


TYPE, MINGM
REQ, 0.15
OK

CRIT, TEST4, 'Area under GZ curve btw. 30-40 deg.'


TYPE, MINAREA
REQ, 0.03
RANG, 30, MIN(40, FAUN)
OK

CGR TESTGROUP
CRI TEST1 TEST2 TEST3 TEST4
OK

5. External heeling moments


A ship may be subjected to different (external) forces causing the ship to heel. These forces are described by moment curves. A moment curve is
a moment experienced by the ship as a function of the heeling angle. Moments are taken into calculation by referring to them in criteria
definitions. The same moments are available in both INT and DAM environments.

There are two main types of heeling moment curves:

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.

5.1. Independent moment curves

Moment curves independent of loading conditions, initial conditions, and damage cases:

Constant moment (CURVE CONSTANT).


Cosine shape (CURVE COS).
Cosine^2 shape (CURVE COS2).
Polygon shape (CURVE POLYGON).
Smooth polygon shape (CURVE SMOOTH).
Moment by expression (CURVE EXPR).
Moment by macro (CURVE MACRO).
Moment interpolated from a table (CURVE TABLE).

Independent moments are defined in the CR task using the following syntax:

Copyright © 1992 - 2016 NAPA. All rights reserved. 314 / 7399


NAPA for Design Manuals 2016.3

MOM momentname 'description'


CUR curvetype
MOM moment
OK / SAVE SYSDB

Note! See the Napa Manuals (Stability Criteria (CR): 9.4 Heeling moments) for a more detailed explanation of moment curves.

Examples:

MOM PASS ’Passengers’


CURVE CONSTANT
MOM 200

MOM WIND ’Wind’


CURVE POLYGON
MOM (0,1050) (20,1150) (30,1210) (40,1290)

MOM LIFT
CURVE EXPR
MOM ’W*(Y*COS(HEEL)+Z*SIN(HEEL))’

5.2. Dependent moment curves

Moment curves dependent on loading conditions, initial conditions, or damage cases:

Wind moment (TYPE WIND).


Wind moment by IMO (TYPE IMOWEATHER).
Wind by USSR Rules (TYPE USSRWEATHER).
Wind moment for ship-shaped MODUs (TYPE WINDMODU).
Turning moment (TYPE TURN).
Turning moment by IMO (TYPE IMOTURN).
Turning moment by USSR Rules (TYPE USSRTURN).
Passenger moment (TYPE PASSENGER).
Moment by load shift (TYPE LOADSHIFT).
Moment by grain shift (TYPE GRAINSHIFT).

Dependent moments are defined in the CR task using the following syntax:

MOM momentname 'description'


TYP momenttype
PAR parameters
OK / SAVE SYSDB

Note! See the Napa Manuals (Stability Criteria (CR): 9.4 Heeling moments) for a more detailed explanation of moment types and
parameters.

Examples:

Copyright © 1992 - 2016 NAPA. All rights reserved. 315 / 7399


NAPA for Design Manuals 2016.3

MOM WINDMOM ’Wind moment’


TYPE WIND
PAR C=0.0732 PROF=Profile

MOM OFFSHORE ’Severe storm condition’


TYPE WINDMODU
PAR C=0.165

MOM TURN ’Turning 10 m/s’


TYPE TURN
PAR C=0.0134

5.3. Exercise

Exercise: Create the moments MOM1 and MOM2. Use the MOM2 moment in the TEST1 criterion.

MOM MOM1 ’Passenger’


CUR CONSTANT
MOM 200
OK

MOM MOM2 ’Wind’


TYP WIND
PAR C=0.0732
OK

CRIT, TEST2, 'Max. GZ at an angle > 25 deg.'


TYPE, POSMAX
REQ, 25
MOM MOM1
OK

6. Useful commands in the CR task


List of criteria and criteria groups in the databases:

CAT CRI
CAT CGR

Definition of a criterion and a criteria group:

Copyright © 1992 - 2016 NAPA. All rights reserved. 316 / 7399


NAPA for Design Manuals 2016.3

DES CRI name


DES CGR group_name
DES CRI group_name

List of moments in the databases:

CAT MOM

Definition of a moment:

DES MOM name

Deleting a criterion, a criteria group, or a moment from the database:

UNS CRI name


UNS CGR group_name
UNS MOM name

Copyright © 1992 - 2016 NAPA. All rights reserved. 317 / 7399


NAPA for Design Manuals 2016.3

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

1.1. Printer setup

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.

DocBook and WPR output


The standard Windows printer dialog box is opened from the File menu in the Main Window:

Main Window: File > Printer Setup...

Copyright © 1992 - 2016 NAPA. All rights reserved. 318 / 7399


NAPA for Design Manuals 2016.3

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?>

1.2. Taking DOCBOOK into use

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

2.1. The NAPA list concept

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:

LQ List Quantities; defines which quantities are included.

TOO Table Output Options; defines headers, subtotals, sorting, and such, in the output.

LIST Creates the output.

The following simple example illustrates the main functions:

Copyright © 1992 - 2016 NAPA. All rights reserved. 319 / 7399


NAPA for Design Manuals 2016.3

HYD?>lq hyd t disp lcb cb


HYD?>too hyd hd=(s u ul -)
HYD?>lis hyd

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.

2.2. LQ (List Quantities)

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.

The administrative LQ commands are:

LQ id Shows the current LQ. For example: LQ SM.

LQ id ALT Shows the possible quantities. For example:


LQ ALT
LQ SM ALT

LQ id ALT L As above but with explanatory texts. For example:


LQ ALT L
LQ SM ALT L

LQ id CAT [database] Catalogues existing LQs in a database. For example:


LQ CAT
LQ SM CAT
LQ SM CAT DB1

Copyright © 1992 - 2016 NAPA. All rights reserved. 320 / 7399


NAPA for Design Manuals 2016.3

LQ id GET name [database] Retrieves LQs from a database. For example:


LQ GET sound
LQ SM GET std2
LQ SM GET test SYSDB

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.

Example 1: Changing format and header components

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), ...

Example 2: Adding qualifiers

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

Example 3: Adding quantities by using formulas

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 (/ ' ').

Freeboard (height of freeboard deck=8.34) to be listed in the FREEB column:


LQ ... T, H('FREEB')/'8.34-T' ...
Void space in a tank (due to the capacity CAP in SM) is listed:
LQ ... VOL('VOID')/'VOLM*CAP*0.01' ... (VOLM) (CAP)
The void space will now have the symbol 'VOID' in the output. A symbol, in this case 'VOL', has to be a part of the command in order to
know which unit the result should have. The quantities VOLM and CAP must be included in the LQ even though they are not
printed. The parentheses indicate that they will not be included in the output. If the parentheses were omitted, then VOLM and CAP
would be listed.
If the TYPE, as defined in the PAR*PRO table, is not 'L', then the expression 'TYPE="L"' will have the value of 0 (false=0) and the result
will be 0 (zero):
LQ SM NAME, MOM/'TMY*RHO*(TYPE="L")', TMY, RHO, TYPE

2.3. TOO (Table Output Options)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 321 / 7399


NAPA for Design Manuals 2016.3

For all options and the command syntax, see !EXPL TOO/GEN.

The following list is a short summary of all TOO options:

Basic layout options:

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.

SPACE Extra empty line at given spacing:


TOO HD=(S, U), SPACE=5

SORT Output sorted according to given quantity:


TOO HD=(S, U), SORT=VNET
TOO HD=(S, U), SORT=-VNET

GROUP Groups according to sorted quantity (adds an empty line):


TOO HD=(S, U), GROUP=PURP

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

RC Repeats columns. Several sets of columns will be adjacent in narrow tables:


TOO HD=(S, U), RC

Special functions:

TOT,SUBT Adds totals and subtotals:


TOO HD=(U, UL), TOT
TOO SORT=PURP, TOT, SUBT
TOO SORT=PURP, TOT, SUBT=ONLY

SEL Selects a subset:


TOO HD=(S, U), SORT=-VOLM, SEL='volm>100'
TOO HD=(S, U), SEL='PURP="BW"'
TOO SEL='OR(PURP="BW" VOLM>100)'
TOO SEL='AND(PURP="BW" VOLM>100)'

LBG Adds line(s) of a selected string(s) between groups in a table.

LNP Adds line(s) of a selected string(s) to the beginning of a new page.

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).

MAR Adds extra margin in addition to the general margin:


TOO HD=(S, U, UL), MAR=12

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

STXT Text replacing the default 'TOTAL' in connection with sums:


TOO HD=(S, U, UL), TOT, STXT='abcde'

SBTX The same as STXT but for subtotals.

FH1 Field length reserved for the first header (horizontal output only):
TOO SEL='PURP="BW"', FH1=5, H

FH2 The same as FH1 but for the second header.

Copyright © 1992 - 2016 NAPA. All rights reserved. 322 / 7399


NAPA for Design Manuals 2016.3

FIELD Field length of columns:


TOO SEL='PURP="HFO"', FIELD=+5
TOO SEL='PURP="HFO"', FIELD=12

IND Selects a subset by indices.

UL Adds underlining to horizontally oriented tables. The line is added under the first quantity:
TOO SEL='TYPE="L"', H UL

SBC Space between columns (relevant with option RC):


TOO SEL='TYPE="L"', RC, SBC=3

RQ Repeats quantities:
TOO SEL='TYPE="L"', RQ=0

REV Reverses output order of lines.

GRDEL Character forming the group delimiter; by default an empty space:


TOO HD=(UL, S, U, UL), GROUP, SORT=PURP, GRDEL='.'

BORDER Specifies borders without implying plotting. Relevant for DocBook output.
TOO HD=(UL, S, U, UL), BORDER=HHHVVV

STYLE Defines the table's overall style:


TOO HD=(UL, S, U, UL), STYLE=S for plotting.
TOO HD=(UL, S, U, UL), STYLE=SMALL_TABLE for DocBook.

OPT Various options; mostly concern DocBook only:


TOO HD=(UL, S, U, UL), OPT=C

The syntax of the header option HD of the TOO command is:

HD=(h1, h2, h3 ... - hn ...)

in which the most usual alternatives for 'h1, h2 ...' are:

N None.

- Separator, that is, before/after the list.

S Symbol of the quantity.

SH Short header from quantity standard.

U Unit.

UL Underline formed using minus (-) signs.

(t1,t2,...) Directly given (arbitrary) text for each column.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 323 / 7399


NAPA for Design Manuals 2016.3

SM?>LQ SM, NAME, PURP, PDES, VOLM, CGX, CGY, CGZ


SM?>TOO SM, HD=N, SEL='VOLM>100', SORT=-VOLM
SM?>LIST SM
R03011 CAL Liquid cargo 2290.5 56.86 0.00 5.05
R02011 CAL Liquid cargo 2240.4 29.88 0.00 4.98
R01011 MMA Machinery sp. 584.2 10.56 0.00 4.72
R00023 MAP Apparat space 477.5 8.19 0.00 5.92
...
...
...

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:

SM?>LQ SM, NAME(F=10), PURP, PDES, VOLM, CGX, CGY, CGZ


SM?>TOO SM, HD=(UL, S, U, UL, -, UL), SEL='VOLM>100', SORT=-VOLM
SM?>LIST SM
--------------------------------------------------------------
NAME PURP PDES VOLM CGX CGY CGZ
m3 m m m
--------------------------------------------------------------
R03011 CAL Liquid cargo 2290.5 56.86 0.00 5.05
R02011 CAL Liquid cargo 2240.4 29.88 0.00 4.98
R01011 MMA Machinery sp. 584.2 10.56 0.00 4.72
R00023 MAP Apparat space 477.5 8.19 0.00 5.92
...
...
...
--------------------------------------------------------------

After that the compartments are grouped according to their purpose:

Copyright © 1992 - 2016 NAPA. All rights reserved. 324 / 7399


NAPA for Design Manuals 2016.3

SM?>LQ SM, NAME(F=10), PURP, PDES, VOLM, CGX, CGY, CGZ


SM?>TOO SM, HD=(UL, S, U, UL, -, UL), SEL='VOLM>100', GROUP=PURP
SM?>LIST SM
--------------------------------------------------------------
NAME PURP PDES VOLM CGX CGY CGZ
m3 m m m
--------------------------------------------------------------
R01031 ACC Accomodation 269.0 8.90 0.00 8.44
R01051 ACC Accomodation 194.4 11.40 0.00 13.84
R01041 ACC Accomodation 194.4 11.40 0.00 11.14

R05001 BW Ballast water 102.2 78.78 0.00 2.51


R03004 BW Ballast water 158.9 50.17 -5.42 3.19
R03003 BW Ballast water 158.9 50.17 5.42 3.19
R02008 BW Ballast water 151.1 36.33 -5.42 3.18
R02004 BW Ballast water 142.6 23.21 -5.42 3.19
R02003 BW Ballast water 142.6 23.21 5.42 3.19
R03007 BW Ballast water 213.3 65.16 4.93 2.96
R02007 BW Ballast water 151.1 36.33 5.42 3.18
R03008 BW Ballast water 213.3 65.16 -4.93 2.96

R03011 CAL Liquid cargo 2290.5 56.86 0.00 5.05


R02011 CAL Liquid cargo 2240.4 29.88 0.00 4.98
...
...
...
--------------------------------------------------------------

Following this, the subtotal values for each purpose and total values of all the compartments are added to the list:

Copyright © 1992 - 2016 NAPA. All rights reserved. 325 / 7399


NAPA for Design Manuals 2016.3

SM?>LQ SM, NAME(F=10), PURP, PDES, VOLM, CGX, CGY, CGZ


SM?>TOO SM, HD=(UL, S, U, UL, -, UL), SEL='VOLM>100', GROUP=PURP, SUBT, TOT
SM?>LIST SM
--------------------------------------------------------------
NAME PURP PDES VOLM CGX CGY CGZ
m3 m m m
--------------------------------------------------------------
R01031 ACC Accomodation 269.0 8.90 0.00 8.44
R01051 ACC Accomodation 194.4 11.40 0.00 13.84
R01041 ACC Accomodation 194.4 11.40 0.00 11.14
--------------------------------------------------------------
SUBTOTAL ACC 657.8 10.38 0.00 10.83

R05001 BW Ballast water 102.2 78.78 0.00 2.51


R03004 BW Ballast water 158.9 50.17 -5.42 3.19
R03003 BW Ballast water 158.9 50.17 5.42 3.19
...
...
...
--------------------------------------------------------------
TOTAL 7820.4 37.63 0.00 5.24
--------------------------------------------------------------

Last, only subtotal and total values are listed:

SM?>LQ SM, NAME(F=10), PURP, PDES, VOLM, CGX, CGY, CGZ


SM?>TOO SM, HD=(UL, S, U, UL, -, UL), SEL='VOLM>100', GROUP=PURP,
SUBT=ONLY, TOT
SM?>LIST SM
--------------------------------------------------------------
NAME PURP PDES VOLM CGX CGY CGZ
m3 m m m
--------------------------------------------------------------
SUBTOTAL ACC 657.8 10.38 0.00 10.83
SUBTOTAL BW 1434.0 48.39 0.00 3.07
SUBTOTAL CAL 4530.9 43.52 0.00 5.01
SUBTOTAL GST 136.0 79.33 0.00 8.52
SUBTOTAL MAP 477.5 8.19 0.00 5.92
SUBTOTAL MMA 584.2 10.56 0.00 4.72
--------------------------------------------------------------
TOTAL 7820.4 37.63 0.00 5.24
--------------------------------------------------------------

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 326 / 7399


NAPA for Design Manuals 2016.3

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
--------------------------------------

Contents: Diesel oil Rho: 0.86


R02001 26.1 23.19 1.27 0.40
R02002 26.1 23.19 -1.27 0.40
--------------------------------------
SUBTOTAL 52.1 23.19 0.00 0.40

Contents: Heavy Fuel Oil Rho: 0.94


R03002 28.8 50.21 -1.26 0.40
R02005 27.7 36.39 1.29 0.40
R02006 27.7 36.39 -1.29 0.40
R03005 30.4 64.72 1.27 0.40
R03006 30.4 64.72 -1.27 0.40
R03001 28.8 50.21 1.26 0.40
--------------------------------------
SUBTOTAL 173.8 50.88 0.00 0.40
--------------------------------------
TOTAL 225.9 44.49 0.00 0.40
--------------------------------------

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 327 / 7399


NAPA for Design Manuals 2016.3

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.

SM?>LQ NAME, PURP, VOLM, VNET


SM?>TOO HD=(UL, S, U, UL, -, UL), TABLE=COMPTABLE
SM?>LIST SM
---------------------------------
NAME PURP VOLM VNET
m3 m3
---------------------------------
R01031 ACC 269.0 263.6
R01051 ACC 194.4 190.5
R01041 ACC 194.4 190.5
R05001 BW 102.2 100.2
...
...
...
R01011 MMA 584.2 584.2
---------------------------------

Main Window: Tools > Table Editor...

Table Editor: File > Treat...

Copyright © 1992 - 2016 NAPA. All rights reserved. 328 / 7399


NAPA for Design Manuals 2016.3

2.4. Output with the List Window tool

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.

Main Window: Tools > List 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:

List Window: File > Header...

Copyright © 1992 - 2016 NAPA. All rights reserved. 329 / 7399


NAPA for Design Manuals 2016.3

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:

List Window: File > New List...

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.

List Window: File > Print List...

Copyright © 1992 - 2016 NAPA. All rights reserved. 330 / 7399


NAPA for Design Manuals 2016.3

Print preview is available for the selected printer in the Print List dialog box or by clicking the Print Preview button

in the List Window.

2.5. Exercise

Open the List Window:

Main Window: Tools > List Window...

Set the header definition:

List Window: File > Header...

Set the new list options:

List Window: File > New List...

Enter the HYD task. Set the list quantities and list output options, define the calculation arguments, and run the LIST HYD command:

Copyright © 1992 - 2016 NAPA. All rights reserved. 331 / 7399


NAPA for Design Manuals 2016.3

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

Finally, print the results list by using the DOCBOOK printer.

3. Plot Output

3.1. PQ (Plot Quantities)

The following commands are the graphical equivalents of LIST, LQ, and TOO:

PQ Plot Quantities; defines which quantities are included.

POO Plot Output Options; defines output options, such as curve colours.

PLD Plots the diagram.

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'.

3.2. POO (Plot Output Options)

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.

The following two simple examples illustrate the main functions:

Copyright © 1992 - 2016 NAPA. All rights reserved. 332 / 7399


NAPA for Design Manuals 2016.3

HYD?>PQ HYD, T, VOLM


HYD?>POO HYD, BOX, NET=BGNET, FONT=DIAG,
ARG: AXIS=LB,
VOLM: AXIS=LB, PEN=F1
HYD?>PLD HYD

Below, another function, LCB, is added to the diagram, and options are given separately for VOLM and LCB:

HYD?>PQ HYD, T, VOLM, LCB


HYD?>POO HYD, BOX, NET=BGNET, FONT=DIAG,
T: AXIS=LB,
VOLM: AXIS=LB, PEN=F1,
LCB: AXIS=UA, PEN=F2
HYD?>PLD HYD

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 333 / 7399


NAPA for Design Manuals 2016.3

F1, F2, ... (functions, the following quantities in the PQ).

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.

Axes and net

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:

L At the lower limit or at the left limit (default).

U At the upper limit or at the right limit.

Z At the zero value of the function.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 334 / 7399


NAPA for Design Manuals 2016.3

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:

PQ HYD, T, VOLM, LCB


POO HYD, BOX, NET=BGNET, FONT=DIAG,
ARG: AXIS=LB,
VOLM: AXIS=LB, PEN=F1, RANGE=(0,6000),
LCB: AXIS=UA, PEN=F2, RMARG=*0.1

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 335 / 7399


NAPA for Design Manuals 2016.3

PQ HYD, T, VOLM, VOLT


POO HYD, BOX, NET=BGNET, FONT=DIAG,
ARG: AXIS=LB,
VOLM: AXIS=LB, PEN=F1, RMARG=*0.1, LABEL='volume m3',
VOLT: AXIS=LB, PEN=F2, RANGE=VOLM, LABEL=''

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:

PQ HYD, T, VOLM, LCB


POO HYD, BOX, NET=BGNET, FONT=DIAG, LEGEND, LGTYPE=IL, ID=S,
ARG: AXIS=LB,
VOLM: AXIS=LB, PEN=F1, RMARG=*0.1, LGTEXT='Moulded volume',
LCB: AXIS=UA, PEN=F2, RMARG=*0.1, LGTEXT='LCG from x=0'

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.

3.3. Output with the Plot Window tool

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.

Main Window: Tools > Plot Window...

Copyright © 1992 - 2016 NAPA. All rights reserved. 336 / 7399


NAPA for Design Manuals 2016.3

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:

Plot Window: Print > Print with Options...

Copyright © 1992 - 2016 NAPA. All rights reserved. 337 / 7399


NAPA for Design Manuals 2016.3

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:

Output tab: LQ > Edit

Copyright © 1992 - 2016 NAPA. All rights reserved. 338 / 7399


NAPA for Design Manuals 2016.3

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.

List Layout Window: Edit > List Quantities

Copyright © 1992 - 2016 NAPA. All rights reserved. 339 / 7399


NAPA for Design Manuals 2016.3

In the TOO definition window, the previously presented TOO options (with list output) can be set, such as selection, sorting, and grouping.

List Layout Window: Edit > Table Output Options

Copyright © 1992 - 2016 NAPA. All rights reserved. 340 / 7399


NAPA for Design Manuals 2016.3

The modified LQ and TOO definitions can be named and saved in database DB1 or DB2 for future use:

List Layout Window: Layout > Save As...

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.

The concept of the Diagram Layout Window works in identical manner.

5. Documentation system (DOC)

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 341 / 7399


NAPA for Design Manuals 2016.3

!EXP .AL/DOA

5.2. Source data

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')

Manually in the Scan task, for example:

HYD?>LIST HYD
HYD?>SCAN LAST
SCAN?>SAVE AS listname NH
SCAN?>END

Figures, such as diagrams and arrangement drawings, can be stored by:

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.

5.3. Output of DOC commands

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:

Text Editor: File > Document Formatter...

Copyright © 1992 - 2016 NAPA. All rights reserved. 342 / 7399


NAPA for Design Manuals 2016.3

5.4. Basic DOC commands

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:

.C1 First level chapter header


.C2 Second level chapter header
.C3 Third level chapter header
.C2 Another second level chapter header

The results output will adopt chapter numbering automatically:

1 First level chapter header


1.1 Second level chapter header
1.1.1 Third level chapter header
1.2 Another second level chapter header

List

Copyright © 1992 - 2016 NAPA. All rights reserved. 343 / 7399


NAPA for Design Manuals 2016.3

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:

This is some free text


>which continues on the next line.

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:

.H1 /*PRO/INTACT STABILITY/*PAGE/


.H2 /*SNAM//*USER/
.H31 *YCN
.H33 *DT

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 using DOC commands in Text Editor:

Copyright © 1992 - 2016 NAPA. All rights reserved. 344 / 7399


NAPA for Design Manuals 2016.3

.H1 /*PRO/INTACT STABILITY/*PAGE/


.H2 /*SNAM//*USER/
.H31 *YCN
.H33 *DT
.C1 Example report
.R 3
.C2 Hydrostatics - list
.R 2
.AL hydrostatics
.R 2
.C2 Hydrostatics - curves
.FIG hydrostatics SIZE 0.8 0.8 FP
.R 2
This is some free text
>which continues in the next line.

Example of results output created by using the Document Formatter with DocBook:

Copyright © 1992 - 2016 NAPA. All rights reserved. 345 / 7399


NAPA for Design Manuals 2016.3

NAPA Manager applications


Table of Contents:

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

1.1. What is a Manager application?

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:

To generate complicated stability reports.


As a graphical user interface for a subsystem of NAPA that has no task-specific window.
To check that a ship meets some particular rules.

A distinction should be made between the Manager and a Manager application:

The Manager is a tool of NAPA.


A Manager application is run with the Manager tool.

1.2. How to open Manager applications

The NAPA Manager tool is opened by selecting:

Main Window: Tools > Manager...

Copyright © 1992 - 2016 NAPA. All rights reserved. 346 / 7399


NAPA for Design Manuals 2016.3

A NAPA Manager application is opened from the database. All default Manager applications can be found in the NAPA database (DB7):

Manager: File > Open...

Copyright © 1992 - 2016 NAPA. All rights reserved. 347 / 7399


NAPA for Design Manuals 2016.3

1.3. How Manager applications work

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.

Layout of the Manager Window

The Manager Window encompasses three sections:

Hierarchy tree; represents the Manager application's structure.


Input; contains the possible input fields and options for the functions behind the selected item.
Output; contains the results produced by updating an item.

Layout of the Manager Window


Toolbox buttons

The buttons on the toolbar to the left of the Manager tree perform the following commands:

Copyright © 1992 - 2016 NAPA. All rights reserved. 348 / 7399


NAPA for Design Manuals 2016.3

Properties of an item: the tables and macros behind an item.

Edit source: opens an external editor window, such as the Table


Editor, the Hull Surface Editor, or the Ship Model Window.

Copyright © 1992 - 2016 NAPA. All rights reserved. 349 / 7399


NAPA for Design Manuals 2016.3

Opens an external viewer window for the results.

Activates/Inactivates an item.

Copyright © 1992 - 2016 NAPA. All rights reserved. 350 / 7399


NAPA for Design Manuals 2016.3

Updates an item.

Forced update of an item (if already updated).

Copyright © 1992 - 2016 NAPA. All rights reserved. 351 / 7399


NAPA for Design Manuals 2016.3

Includes/Excludes an item in/from output.

or

Copyright © 1992 - 2016 NAPA. All rights reserved. 352 / 7399


NAPA for Design Manuals 2016.3

Prints the current item including all subitems included in output.

Update status of items

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.

Update status symbols indicating each item's status


Update status symbols

Copyright © 1992 - 2016 NAPA. All rights reserved. 353 / 7399


NAPA for Design Manuals 2016.3

Item is up-to-date.

Source information is newer than the result; item should be


updated!

Copyright © 1992 - 2016 NAPA. All rights reserved. 354 / 7399


NAPA for Design Manuals 2016.3

Item has not been updated yet, so the result is missing.

Item cannot be updated because some source information is


missing.

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:

Manager: Options > Output Setup

Copyright © 1992 - 2016 NAPA. All rights reserved. 355 / 7399


NAPA for Design Manuals 2016.3

1.4. Beta versions of Manager applications

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.

1.5. Manager application development

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. Available NAPA Manager applications

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.

2.2. ExportDB Manager

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 356 / 7399


NAPA for Design Manuals 2016.3

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.

ExportDB Manager application

2.3. Ship Model Manager

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 357 / 7399


NAPA for Design Manuals 2016.3

Ship Model Manager application

2.4. PROB Manager

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 358 / 7399


NAPA for Design Manuals 2016.3

PROB Manager application

2.5. Inclining Test Manager

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 359 / 7399


NAPA for Design Manuals 2016.3

Inclining Test Manager application


When input has been given and the results calculated, the output report can be generated by printing the output folder.

2.6. Offshore Structure Stability Manager

The Offshore Structure Stability Manager application guides through the stability analysis process of a vessel subject to the MODU regulations.

Copyright © 1992 - 2016 NAPA. All rights reserved. 360 / 7399


NAPA for Design Manuals 2016.3

Offshore Structure Stability Manager application

2.7. Drawing Manager

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 361 / 7399


NAPA for Design Manuals 2016.3

Drawing Manager application

2.8. Sounding Manager

The Sounding Manager application is intended for defining sounding devices and producing sounding tables by using the CP task.

Copyright © 1992 - 2016 NAPA. All rights reserved. 362 / 7399


NAPA for Design Manuals 2016.3

Sounding Manager application

2.9. Additional Manager applications

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 363 / 7399


NAPA for Design Manuals 2016.3

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:

1. Installation parameters (INST task)


1.1. Run register
1.2. User administration
1.2.1. User rights
1.2.2. Creating new users
2. Administration (ADM task)
2.1. Selecting projects
2.2. Collecting information on selected projects
2.3. Updating project data
2.4. Deleting versions
2.5. Deleting projects
3. Table of contents (TOC)
3.1. Handling database problems
3.2. Copying data between versions and projects
3.2.1. Copying between projects
3.2.2. Copying between versions
4. Quantity standard (FORM task)
4.1. Operational principles
4.2. Modifying quantities
4.3. Saving changes
4.4. !FORM command
5. Standard purposes (PAR*STD)

1. Installation parameters (INST task)


Installation parameters can be listed and changed in the INST task which is located under the ADM task (!END; ADM; INST). Installation
parameters comprise various user-dependent conventions and properties of the hardware.

The most important installation parameters can be listed with the LIST command. Some of these are listed below:

TRIMSIGN Default sign rule for trims.

ORIENTATION Default orientation of the coordinate system.

CONCERN Name of the concern.

YARD Name of the yard.

PRINTER Default NAPA printer.

TIMEOUT Timeout for licence check.

1.1. Run register

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 364 / 7399


NAPA for Design Manuals 2016.3

!LR

Nr Run id User Start Task Project Version Idle


1 R287 JSS 15:16 G NAPASTAR CLEAN 1 **
2 R288 NJSS 9:32 D-CONT102 A 2
Task specific licenses in use
Task Active Total
Naval architecture 1 4
NAPA Steel 0 2
Ship hydrodynamics 0 2
Weight and Cost calculation 0 1
RANS 0 2
Flooding Simulation 0 2
Optimization 0 4

Timeout limit: 15 minutes


Licensed number of users: 5
Time zone correction: +2:00
Name of license file: pr\napalic.txt

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.

1.2. User administration

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.

1.2.1. User rights

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.

1.2.2. Creating new users

New users are created with the USER command:

Copyright © 1992 - 2016 NAPA. All rights reserved. 365 / 7399


NAPA for Design Manuals 2016.3

INST?>!EXP USER

USER define user/list users


--------------------------------------------------------------------------
-----
This command adds/modifies a user in the user register. Without parameters,
the
currently defined users are listed.

USER id par des pswc


id: initials, max. 4 characters
par: string composed of one or several of the following options:
U: normally registered user
P: full professional
A: system administrator
des: (opt) descriptive text, default=empty

Example user definitions:

INST?>user
USER ADMI A
USER JSS P 'Joe S. Smith'
USER TT U 'Tim Tester'
USER NN U

2. Administration (ADM task)


Some general tools for project administration are available on the main level of the ADM task.

2.1. Selecting projects

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.

2.2. Collecting information on selected projects

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 366 / 7399


NAPA for Design Manuals 2016.3

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

NAME VERS DES LREF BREF TDWL HMAX


------------------------------------------------------------
NAPAMOON A Small PAX s. 80.00 16.00 4.00 27.00
NAPASTAR CLEAN Napastar JSS 82.00 13.00 4.80 22.00
NAPASTAR64A 64bit Napas. 82.00 13.00 4.80 22.00

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.

2.3. Updating project data

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

2.4. Deleting versions

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 367 / 7399


NAPA for Design Manuals 2016.3

Versions are deleted using the command RVER (remove versions):

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.

2.5. Deleting projects

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 368 / 7399


NAPA for Design Manuals 2016.3

3. Table of contents (TOC)


The TOC task provides direct access to the different databases of NAPA. In TOC, the scope is controlled with the UNIT command. A subset of a
unit's (a database) descriptions can be selected with the SELECT command. The descriptions can be listed with the CAT command, copied
between versions or different projects with the COPY command, and deleted from the database with the DELETE command. Note that also
geometry definitions can be copied in the DEF task using the COPY command.

Note! It is strongly recommended to always have proper backups made before carrying out any database administration (the TOC and
ADM tasks).

3.1. Handling database problems

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

DATA BASE ERROR, UNIT= 1


SYSTEM ERROR, EXECUTION TERMINATED
Note: Following IEEE floating-point traps enabled; see ieee_handler(3M):
Overflow; Division by Zero; Invalid Operand;
Sun's implementation of IEEE arithmetic is discussed in
the Numerical Computation Guide.

Copyright © 1992 - 2016 NAPA. All rights reserved. 369 / 7399


NAPA for Design Manuals 2016.3

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?>

3.2. Copying data between versions and projects

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.

3.2.1. Copying between projects

Copyright © 1992 - 2016 NAPA. All rights reserved. 370 / 7399


NAPA for Design Manuals 2016.3

TOC?>!OPEN d-container 6
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
6 pr\d-container.db 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?>UNI 6
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
* 6 pr\d-container.db UTF8
7 C:\Napa\20121\database\napadb.db UTF8
current unit=1
TOC?>COPY FROM 1 VER=B
COPY FROM UNIT 1 TO 6 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

3.2.2. Copying between versions

Copyright © 1992 - 2016 NAPA. All rights reserved. 371 / 7399


NAPA for Design Manuals 2016.3

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

4. Quantity standard (FORM task)


The quantity standard contains data on 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, and so on. The
FORM task allows listing and updating of quantities and units available in NAPA. The user can also define totally new quantities and units in the
FORM task.

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.

4.1. Operational principles

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.

4.2. Modifying quantities

Copyright © 1992 - 2016 NAPA. All rights reserved. 372 / 7399


NAPA for Design Manuals 2016.3

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.

4.3. Saving changes

Changes can be saved in:

Runtime memory with the OK command.


The project database (only the current version) with the SAVE PROJ command.
The system database with the SAVE USER command.

4.4. !FORM command

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.

5. Standard purposes (PAR*STD)


There are plenty of general properties that are not directly related to ship compartments, mainly the attributes attached to the purposes (PURP).
These are defined in tables that have the prefix PAR* (parameter definitions) and quantity PURP as the key column. Standard values are stored
in the system database, which requires administrator user rights, whereas project-specific values can be stored in the project database.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 373 / 7399


NAPA for Design Manuals 2016.3

Hints & tricks


Table of Contents:

1. How to find help


1.1. Napa Manuals
1.2. Help Viewer
1.3. Help commands
1.4. Command explanations
1.5. NAPA Customer Service
2. System messages
3. Emptying runtime memory
4. Transparent commands
4.1. Geometric object handling
4.2. Calculator
4.3. Running macros
5. Geometry-related hints
5.1. Getting relating descriptions of an object
5.2. Generating curves from existing objects
5.3. Converting generated and imported curves into NAPA curves
5.4. Creating new objects with translation
5.5. Checking the compartment model
6. Interface-related hints
6.1. Table import/export
6.2. DXF export

1. How to find help

1.1. Napa Manuals

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.

1.2. Help Viewer

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.

1.3. Help commands

Below is a list of helpful commands that can be used in the NAPA task window:

!COM Lists all commands available in the current task.

!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 ! Lists all transparent commands available everywhere in NAPA.

!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.

!EXP Q.xx Shows an explanation of a quantity; for example, !EXP Q.VOLM

1.4. Command explanations

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 374 / 7399


NAPA for Design Manuals 2016.3

1.5. NAPA Customer Service

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:

table read from the NAPA data base (N19738)


open section has many branches (W14005)
undefined variable (E19050)

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

3. Emptying runtime memory


It is sometimes useful, or even necessary, to empty runtime memory of tables, geometry, and variables using commands !TAB RESET, !GM
RESET, and !VAR RESET respectively. For instance, the variable reset may be useful when working with macros and the geometry reset when
encountering geometry update problems. The table reset is needed mostly in advanced use, for instance for developing Manager applications.

4. Transparent commands

4.1. Geometric object handling

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 375 / 7399


NAPA for Design Manuals 2016.3

LD?>!GM DES R03011

ROOM R03011 'HOLD1'


LIM BH4, BH6, 0, LBH1, TTOP, MAINDECK, Y<HULL
RED H1RES
SYM
ADD HATCH1

The LQ and INFO commands can also be used in any task with !GM:

LD?>!GM LQ VOL

LQ*GM*VOL read from the NAPA data base (N11053)

LD?>!GM INFO R03011

NAME XMIN XMAX ZMIN ZMAX VOL CGX CGY CGZ SS


----------------------------------------------------------------
R03011 42.36 72.18 0.80 9.20 2290.5 56.86 0.00 5.05 *

For more information, see !EXP !GM.

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

The list of all available calculator functions can be viewed with:

!COM C.F

The explanations for calculator functions can be viewed with:

!EXP C.func For example: !EXP C.XFR

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 376 / 7399


NAPA for Design Manuals 2016.3

!CALC FR(), !CALC Frame - x-coordinate conversions; for example: !CAL FR(30) returns the frame number at x=30.
XFR()

4.3. Running macros

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

5.1. Getting relating descriptions of an object

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 377 / 7399


NAPA for Design Manuals 2016.3

5.2. Generating curves from existing objects

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:

DEF?>GEN FRF1 OLDHULL/X=#95


DEF?>GEN FRF2 OLDHULL/X=#100

If the generated curves are needed to be modified, they must be modified first, as done in the next chapter.

5.3. Converting generated and imported curves into NAPA curves

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

GEN, MARGINLINE, HULL/Z=7.09

DEF?>DES MARGINLINE ! TOL=0.001

CUR MARGINLINE; Z 7.09


XY ** (-2.8, 0), (-2.784, 0.558), (-2.771, 1.033),
(-2.71, 1.885), (-2.674, 2.317), (-2.643, 2.65),
(-2.538, 3.546), (-2.467, 4.147), 82.72/, (-2.4,
4.698), /8.75, (0.315, 5.114),...

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.

5.4. Creating new objects with translation

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 378 / 7399


NAPA for Design Manuals 2016.3

SUR, SURFACE1, P
THR CURVE1, CURVE2, CURVE3, CURVE4, CURVE5, CURVE6, CURVE7, CURVE8

SUR, SURFACE2
COM SURFACE1(X+30)

For a room, the translation syntax could be

ROOM ROOM2
LIM ROOM1(X+30)

5.5. Checking the compartment model

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?>ID PTR 0.0007

DR?>DRW ALL

Copyright © 1992 - 2016 NAPA. All rights reserved. 379 / 7399


NAPA for Design Manuals 2016.3

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.

Checking for problems with the Ship Model Manager application

6. Interface-related hints

6.1. Table import/export

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.

6.2. DXF export

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 380 / 7399


NAPA for Design Manuals 2016.3

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

!VER LIST Shows a list of existing versions of the current project.

!WHE "Where am I?" Indicates the current project, version, active task, and information about the NAPA version.

!L Prints/executes the preceding commands.

!L +10 Prints the last 10 commands.

!L DES Prints the last commands starting with 'DES'.

!CAT ALL Creates a catalogue of elements in the database. All items of all versions will be included in the catalogue.

!CAT TYPE=S Catalogues all surfaces from DB1 (project database).

!CAT TYPE=C Catalogues all curves from DB1 belonging to version A.


VER=A

!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 Runs a macro.

!ADD drawing Runs the macro 'drawing'.

!ADD drawing/B Runs the macro 'drawing' from version B.

!ADD drawing/B/P1234 Runs the macro 'drawing' from version B of project P1234.

2. Database handling

!COM Prints a list of the commands available in the current task.

!COM ! Prints a list of transparent commands.

!EXP Explains a command or a message.

!EXP PLOT Explains the PLOT command.

Copyright © 1992 - 2016 NAPA. All rights reserved. 381 / 7399


NAPA for Design Manuals 2016.3

!EXP 1002 Explains the system message no. 1002.

!END Ends the current task and moves directly back to the Task level.

!REF Lists reference dimensions.

!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.

!FORM, symbol, f.d, unit, SH=header, Full syntax.


LH=header SUM=sumrule !

!FORM T 7.3 M LH='moulded draught' Should be interpreted as:


T = quantity
7 = length of a field
3 = number of decimals
M = unit
LH='..' = long header

!FORM RESET Restores standard values.

!OPEN Opens a database.

!OPEN P1234 6 Opens DB1 of project P1234 (=file p1234.db) as unit 6.

!OPEN P1234 6 AUX Opens DB4 of project P1234 (=file p1234.sd) as unit 6.

!CLOSE Closes a database.

!CLOSE 6 Closes 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

The above command with 'name<...' selection would have given:

!SEL NAME<LD*CON
!VAR LIST LIST
LD*CON(LOAD1) LD*CON(LOAD2) LD*CON(LOAD3) LD*CON(LOAD4)

4. Graphics and drawing

!ZOOM W Fit to window.

!E Erases the window.

!SEND Sends the current view from the graphics area to the printer or stores it into a database.

!SEND TO DB NAME=my_figure Saves the drawing in the secondary database (DB4).

!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

Copyright © 1992 - 2016 NAPA. All rights reserved. 382 / 7399


NAPA for Design Manuals 2016.3

!FRN Returns the frame number of a given x-coordinate or the x-coordinate of a given frame number.

!FRN 60 FRN=88.85

!FRN #88 X=59.4

!GM INFO object Information about an object.

!GM DES object Definition of an object.

!GM LQ object Sets/inquires listing quantities for the INFO command

!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.

!LR Lists data about the current runs.

Copyright © 1992 - 2016 NAPA. All rights reserved. 383 / 7399


NAPA for Design Manuals 2016.3

System and Administration

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 384 / 7399


NAPA for Design Manuals 2016.3

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.

2. Hardware and operating systems


The supported hardware and operating systems supported change with time. At the moment Napa works only on Microsoft Windows operating
systems running on PC hardware, for exact details see the latest Update Info in this manual.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 385 / 7399


NAPA for Design Manuals 2016.3

5. Summary of functions
The following summary gives a short presentation of the functions provided by the system:

hull definition: definition from scratch, modification, transformation, parametrized definition


definition of the inner geometry: compartments, decks, bulkheads
the ship model: organization of the whole
definition of structures (stiffeners, brackets, seams, etc)
hydrostatics, stability, arbitrary heeling axis
capacities: volumes, sounding tables
loading conditions
longitudinal strength, torsion, bending
stability criteria, intact
damage stability, standard and probabilistic
grain stability
container loading
resistance and propulsion
seakeeping
manoeuvring
weight calculation
inclining test
end launching
In addition, there are general functions for processing the result, adding user-defined functions and creating documents and graphics.
The functions are presented in more detail in the chapter Presentation of Subsystems.

6. Central features

6.1. Ship model

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 386 / 7399


NAPA for Design Manuals 2016.3

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.

6.4. Management of dependencies

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.

6.7. Command language

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 387 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 388 / 7399


NAPA for Design Manuals 2016.3

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.

1.1. System document

The system document presents general information concerning the system as a whole. This chapter is part of the system document.

1.2. General system functions

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.

1.3. Reference manuals for each subsystem

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.

1.4. Introduction to NAPA

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.

1.5. Update infos (UDI)

The update infos give information on changes in new releases. Their primary purpose is to present changes and new features.

2. Run time documentation


The syntax and usage of all commands and calculator functions is available at run time by using commands !COM and !EXP [command] or the
help viewer. The first command gives a list of commands available in the current context, and the second one gives the instructions for a given
command.

Copyright © 1992 - 2016 NAPA. All rights reserved. 389 / 7399


NAPA for Design Manuals 2016.3

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.

2. Dependencies between application subsystems


NAPA is an integrated system, meaning that all functions share the common database, and one can freely move from one function to another.
The division into subsystems is purely an administrative aid to help you orientate in the system and to help the developers control an otherwise
too complicated whole.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 390 / 7399


NAPA for Design Manuals 2016.3

(geometry) and SM (ship model) which create the basis for all the others. Another central set is the loading conditions defined under LD.

In the following description of subsystems, their dependencies are also presented.

3. List of subsystems

3.1. Application 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

3.2. Auxiliary subsystems

Name Abbreviation

Monitor MN

Database management DB

Dynamic memory management DM

Basic geometry GB

Integrals IN

Alphanumeric input AI

Alphanumeric output AP

Graphics GR

Error handling ER

Various functions AD

3.3. General service functions (not recorded as subsystems)

Copyright © 1992 - 2016 NAPA. All rights reserved. 391 / 7399


NAPA for Design Manuals 2016.3

Text editor
Documentation system
Calculator
Table calculation
Diagram drawing

4. Ship model subsystem (SM)


The SM subsystem comprises a definition of the ship's basic compartmentation on a product model level.

4.1. Main ship model

The following functions are included:

definition of the general arrangement


handling of compartment parameters
drawings related to the general arrangement
capacity lists
3D visualisation of surface objects

The SM is needed for most of the naval architectural calculation subsystems (CP, LD, DA, etc.).

4.2. Outfit subsystem

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.

5. Geometry subsystem (GM)


The GM subsystem comprises definitions of hull form, decks, bulkheads and compartments, as well as definition of any arbitrary geometric
objects.

The following functions are included:

definition of the hull form from a sketch or lines drawing


digitizing of hull data
interactive modification and fairing of the hull form
transformation (distortion) of hull forms (e.g. change of L, B, LCB or displacement)
definition of surface objects
definition of decks, bulkheads, and other similar surfaces
definition of tanks, cargo rooms and other compartments
lines drawings
perspective and other drawings
lofting (offset) tables

The functions for handling of surfaces, applicable for hull forms, decks, bulkheads or any other surfaces, are:

arbitrary plane and cylinder intersections of any surface


intersections of arbitrary surfaces
lines of equal inclination and curvature
colour-supported curvature indication and porcupine plots
offset surfaces, trimmed surfaces
changing of generated curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 392 / 7399


NAPA for Design Manuals 2016.3

5.1. Hull definition

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.

The hull surface can be handled in one of the following ways:

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.

5.2. Defining inner structures

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.

5.3. Link functions (interfaces)

Note: for this linkage, only the functions covered by the NAPA system are delivered by Napa Ltd.

LINKS FROM NAPA TO TRIBON

transfer of curves
transfer of surface objects
transfer of drawings

Interface from the NAPA patch surface to TRIBON

this interface makes the NAPA Patch Surface and the NAPA intersection routines directly accessible for all surface-related operations in
TRIBON

Link from NAPA to TRIBON General Design

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 393 / 7399


NAPA for Design Manuals 2016.3

Fastship, among others.


CFD PANEL GENERATION AND INTERFACE
Generates a panel representation of the hull surface, to be used by CFD systems and other systems using similar input.
FEM MESH GENERATION AND INTERFACE
Generates a FEM mesh of the NAPA surfaces representing hull form, decks or bulkheads or combinations of the above. The FEM mesh
can be produced in the following formats:

IGES
DXF
user-defined list of node points, lines and surface elements

NAPA/NUPAS HULL FORM LINK

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.

5.4. Auxiliary functions

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.

6. Definition of structures, NAPA Steel


The structure definition subsystem extends the scope of the ship model to the details of the structures, which are otherwise treated as moulded
surfaces only. Under NAPA Steel, the following properties are introduced:

plate thickness and other attributes


stiffeners
brackets
holes and openings
pillars
seams
plates

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.

7. Hydrostatics subsystem (HD)


The HD subsystem comprises calculation of hydrostatic properties of the ship's hull.

The following functions are included:

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

8. Capacities subsystem (CP)


The CP subsystem comprises calculation of hydrostatic properties and capacities of tanks, cargo spaces and other compartments.

The following functions are included:

compartment hydrostatics
capacity tables
free-surface shifting-moment calculations

Copyright © 1992 - 2016 NAPA. All rights reserved. 394 / 7399


NAPA for Design Manuals 2016.3

definition of variable steel reduction


definition of sounding and ullage devices
sounding and ullage tables for any trim and/or heel
tonnage calculations

9. Loading conditions subsystem (LD)


The LD subsystem comprises calculation of the ship's floating position, longitudinal strength and stability for different loading conditions.

The following functions are included:

explicitly defined loading conditions that can be stored and grouped


commands for interactive allocation of load components
calculation of draught, trim, heel, stability, shear force, bending moment, deflection and torsion, both in still water and in waves at any
angle of encounter
display of allowed maximum/minimum values for shear force and bending moment
result layouts of loading manual quality
check of stability against any pre- or user-defined criteria

In addition, the LD covers the evaluation of inclining test results, including:

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

10. Stability criteria subsystem (CR)


The CR subsystem comprises calculation of the minimum stability requirements for the intact or damaged ship in accordance with the most
common rules set by authorities.

The following functions are included:

user-defined criteria for practically all existing regulations


tools for variable lists and plots
calculation of the minimum GM or the maximum KG values as a function of draught and trim

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.

11. Damage stability subsystem (DA)


The DA subsystem comprises analysis of the ship's stability and unsinkability in damaged (flooded) condition, and calculation of the minimum
stability requirements in accordance with the rules set by authorities.

The following functions are included:

floodable length curves


automatic generation of damage cases
calculation of required intact stability (GM or KG) to meet various criteria for both directions of heeling
facilities for the handling of several subdivision alternatives and criteria combinations
calculations and graphics showing the actual stability and floating behavior in the given cases of damage or loading, including the
handling of progressive flooding
calculation of subdivision indexes according to the rules for both passenger and dry cargo ships (IMO Res A.265 and SOLAS 90
Regulation 25)
calculation of damage stability according to both the SOLAS 1995 Conference Resolution 14 (Water on deck) and to the so-called Nordic
Proposal annexed to it
cross-flooding pipes according to IMO Res. A. 266
printout according to the requirements of Det Norske Veritas Classification
estimation of the outflow of cargo
stability of grounded ship
user-controlled output functions for both graphics and lists

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 395 / 7399


NAPA for Design Manuals 2016.3

12. Miscellaneous functions


The subsystem named MI (miscellaneous) contains applications that have not been considered practical to be organized into their own
subsystems.

12.1. Launching

The LN subsystem comprises calculation of longitudinal launching.

The following functions are included:

way pressures
anti-tipping moment
speed
stopping point

12.2. Inclining test

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.

13. Weight calculation (WG)


The WG subsystem comprises calculation of the ship's weight, center of gravity, weight distribution and the moment of inertia.

The following functions are included:

administration of calculation rules


calculation of weight and the center of gravity for weight components and groups, including block weights
calculation of weight distribution
calculation of the moment of inertia
graphic checks

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.

14. Grain stability (GS)


The GS subsystem comprises calculation of grain stability in accordance with SOLAS 74. The hold geometry, the number of decks, girders, etc.
are not limited.

The following functions are included:

handling of untrimmed cargo


calculation of allowed grain heeling moments
link to the loading conditions (LD) to verify whether a grain loading case fulfils the criteria
definition and graphic verification of the hold structures
graphic display of grain distribution before and after shifting

15. Container loading (CL)


The CL subsystem comprises tools for designing the container arrangement and cargo space.

The following functions are included:

modeling of the container arrangement


automatic removal of container locations not inside a given limiting surface (e.g. hull surface)
analysis of container loads
user-definable owner numbering system
calculation of container load capacity

Copyright © 1992 - 2016 NAPA. All rights reserved. 396 / 7399


NAPA for Design Manuals 2016.3

automatic wind (lateral) profile generation for stability criteria calculation


graphic checks

16. Basic Ship Hydrodynamics - Powering (SH)


The SH subsystem comprises calculation of resistance, resistance prediction, speed, powering and the calculation of propulsion and propeller
induced vibration excitation.

The following functions are included:

Hull parameters

geometry-related data from the GM subsystem


statistical values for hull parameters
definition of hull appendages

Resistance

resistance calculation input data


ship resistance by Holtrop, 1984 version
resistance in accordance with Taylor-Gertler &amp; Häner-Labes
resistance in accordance with Guldhammer &amp; Harvald
power prediction method in accordance with Series 60
resistance in accordance with Keller-Lap
estimation of Great Lakes bulk carriers resistance in accordance with Fischer, Nowacki, etc.
resistance prediction for small vessels in accordance with Oortmersen
resistance calculation method for barges
ship resistance by Holtrop, 1982 version
ship resistance by Holtrop, 1978 version
arbitrary resistance curve
resistance for given CR values

Propulsion

propeller optimization
propulsion calculations
propulsion coefficients in accordance with Holtrop
propulsion merit coefficients

Excitation

propeller excitation prediction in accordance with Holden


propeller excitation prediction in accordance with Johnsson
twin screw version of the Holden method

Model test database

routines for SH database access, and a set of tools for building and maintaining model test correlation databases

17. Seakeeping (SHS)


The SHS (Ship Hydrodynamics/Seakeeping) subsystem comprises calculation and analysis of the seakeeping capabilities of ships and offshore
structures in a seaway.

Functions pertaining to the generation of transfer functions in regular waves:

strips from the hull geometry


floating position, stability and weight distribution on the basis of a given loading condition
estimation of roll damping
motion transfer functions, by means of the strip method
calculation panels on a wet hull surface
motion transfer functions, by means of a 3D panel method
modeling of external springs
treatment of the wave frequency parameters
resistance added in waves, by means of the strip method
wave drift forces and moment, by means of the panel method
non-linear roll characteristics
analysis of the roll decay test
weight of strips on the basis of a defined loading condition
hull loads in a seaway

The statistical analysis tools for response in irregular seas include:

Copyright © 1992 - 2016 NAPA. All rights reserved. 397 / 7399


NAPA for Design Manuals 2016.3

all major sea spectrum types with arbitrary spectrum parameters


both long and short crested waves
response in irregular seas
flexible definition of limiting criteria
wave height to exceed the defined limiting criteria
number of occurrences exceeding the limits
down-time analysis

The seaworthiness criteria include:

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

Database and presenting of results

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.

18. Manoeuvring (SHM)


The SHM (Ship Hydrodynamics/Manoeuvring) subsystem comprises calculation and analysis of the ship's manoeuvring properties.

The main calculation functions include:

turning circles and pull-out test


zig-zag test
spiral and reverse spiral tests
acceleration and stopping test
man-over-board
directional stability indexes
steering quality indexes
rudder response diagrams

Hull forces can be treated with several alternative ways:

statistical values for hydrodynamic derivatives


possibility to use measured derivatives and to tune the statistical derivatives according to measured data
linear and non-linear derivatives
measured current forces
wave drift forces and wave added resistance from SHS

The following manoeuvring devices can be used in the calculations:

any type of main propellers


rotatable thrusters
side thrusters
any type of rudder

All major environmental effects can be taken into account:

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.

19. Information system (IS)


The information systems provides tools to create, maintain and use 'user company' based databases for all kinds of information available on the
build and tested ships. As an example, the model test results can be collected into a database, which can later be used for correlating calculated
results for improved accuracy in project design work.

Copyright © 1992 - 2016 NAPA. All rights reserved. 398 / 7399


NAPA for Design Manuals 2016.3

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.

20. General service functions


The following functions are primarily provided in order to support the other functions of the system, but they can be used independently if their
services are needed for other purposes.

20.1. Drawing functions

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.

As a special function, there is the generation of a standard lines drawing.

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.

20.2. Text editor

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.

20.3. Documentation system

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.

20.5. Table calculation

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.

20.6. Diagram drawing function

The diagram drawing module is used internally by the output functions producing diagrams, and it is available as an independent function where

Copyright © 1992 - 2016 NAPA. All rights reserved. 399 / 7399


NAPA for Design Manuals 2016.3

data can be entered manually or fetched from applications within NAPA, above all, the table calculation module.

Copyright © 1992 - 2016 NAPA. All rights reserved. 400 / 7399


NAPA for Design Manuals 2016.3

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.

NAPADB: NAPA database (common for all NAPA users)

SYSDB: system database (common for the installation)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 401 / 7399


NAPA for Design Manuals 2016.3

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.

For more details, see chapter Common Data.

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 contents can be divided into the following categories:

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.

5. Intermediate output file


The intermediate output file is used for temporary storage of lists.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 402 / 7399


NAPA for Design Manuals 2016.3

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.

The project files are assigned as the following database units:

main project database: unit 1


auxiliary database: unit 4
protected database: unit 3

The last one is assigned only when needed.

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.

8. Context for file names


In the installation parameters, there is the parameter named ATTACH. With this parameter, the interpretation of relative pathnames can be
controlled (pathnames not beginning with a slash). If the parameter is empty, the pathnames will be interpreted as belonging to the current
working directory. If the parameter is given, it is added in front of any file name before it is presented to the operating system.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 403 / 7399


NAPA for Design Manuals 2016.3

Running the system


Table of Contents:

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.

2. Concepts related to running

2.1. Current user

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.

2.2. Current project

Copyright © 1992 - 2016 NAPA. All rights reserved. 404 / 7399


NAPA for Design Manuals 2016.3

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.

2.3. Run identification

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.

When a session is started, the following information is inquired:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 405 / 7399


NAPA for Design Manuals 2016.3

A session is finished by entering the command X at the TASK?> prompt. An emergency stop can be made by pressing Ctrl C twice.

7. Current command environment


At any given time, a certain command environment is current. This means that a specific set of commands is available. A prompt is written at
the start of the input line, indicating what is the current command environment. Any of the commands can be used - the order in which commands
within a certain command environment are used is not imposed by the system, only by the logic of the task itself.

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].

8. Division into tasks


On the top command level, the functions of the system appear as a set of so-called tasks. Inside a task, there may be subtasks that have their
own command environments. In contrast to moving between subtasks, moving between tasks involves the following operations:

When entering a task the following text is displayed:

BEGIN description (task)

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.

9. Interrupting the run


For situations where an abnormal interruption of the current task is needed, interruption can be done with the key control-. (dot) in the normal
mode and Ctrl C in the command mode. There is also the item Interrupt in the TASK menu.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 406 / 7399


NAPA for Design Manuals 2016.3

10. NAPA run without Graphical user interface


Using NAPA without the graphical user interface is useful in situations where contents of the run can be defined in a macro and there is no need
for graphical interaction. These can be cases where lot of data is generated or some calculation intensive runs. The runs can be scheduled by
using Windows Task Scheduler or by using some other scheduling method.

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

napaapi.dll and NapaRunMacro.exe files can be obtained by contacting NAPA staff

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.

Following parameters are available:

-u User name

-f Napa project directory

-l Napa licence path

-n Napa database path

-s System database path

-i IOF file path

-p Project file path

-m Name of the macro to be run (must be found in DB1, DB2 or DB7)

Example .bat file:

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%

NapaRunMacro.exe -u %USER% -f %NAPADIR% -l %NAPALIC% -n %NAPADB%


-s %SYSDB% -i %NAPAIOF% -p %PROJECT% -m %MACRO%
pause

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 407 / 7399


NAPA for Design Manuals 2016.3

11. Using NAPA efficiently in a global network

11.1. Global network and NAPA

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.

11.2. Speed of use

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.

11.3. Network configuration

The recommended network configuration has three layers:

NAPA main server


NAPA local servers
NAPA clients

The following figure shows the recommended configuration.

Copyright © 1992 - 2016 NAPA. All rights reserved. 408 / 7399


NAPA for Design Manuals 2016.3

11.3.1. NAPA main server

The company’s global system database and NAPA license file are located here.

11.3.2. NAPA local servers

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.

11.3.3. NAPA clients

Client computers will run NAPA from the main server but the NAPADB is recommended to be run from the local hard drives.

11.4. Files and locations

11.4.1. Global system database

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.

11.4.2. Local system database

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.

11.4.3. The DB5 mode

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

DB1 (project database)


DB5 (local system database)

Copyright © 1992 - 2016 NAPA. All rights reserved. 409 / 7399


NAPA for Design Manuals 2016.3

DB2 (global system database)


DB7 (NAPA database)

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.

11.4.4. Project databases

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.

11.5. Starting the system

There are few tricks to be taken into account when an optimum NAPA global network configuration is opened on the client computers.

11.5.1. The batch file

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 410 / 7399


NAPA for Design Manuals 2016.3

11.5.2. Initialization macro

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.

@@ This is an initialization macro for


@@ local and global system databases
@global

!OPEN 'K:/NAPA/PR/KSYSDB.DB' 5
!cal db.db5mode(1)
!type
!type DB5 Mode is now activated
!type
!ope lis

11.5.3. Running initialization macro already from the batch file

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

@@ This is an initialization macro for


@@ local and global system databases

!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.

11.6. ANALYSING THE NETWORK TRAFFIC

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 411 / 7399


NAPA for Design Manuals 2016.3

functionality can be activated with

!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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 412 / 7399


NAPA for Design Manuals 2016.3

Main Window and main level functions


This chapter describes the functions for handling the general conditions for running NAPA, such as assigning the relevant file environment and
starting the subsystems.

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.

2. Summary of top level commands

ADM -> various administrative functions

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.

BATCH start napa batch

A napa run is started as a batch process using the given text element as input.

BATCH input dir>prog options

input: source of input

text: name of a data element

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)

TIME=time: time, as hh:mm, at which to start

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 413 / 7399


NAPA for Design Manuals 2016.3

EDIT -> text editor

This command starts the text editor.

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.

FORM -> enter definition and listing of quantities

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.

PHM start napa phantom

A napa run is started as a background process using the given text element as input.

PHM input dir>prog

input: source of input

text: name of a data element

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)

PLOT -> output and editing of drawings

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.

PROJECT change project

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: name of project The name can contain max. 24 characters.

/version: (opt) version, default=current version

PROJECT file

Open the project available in the given file.

file: file name

REF -> handling the reference system

This program handles the reference system. Updating of main dimensions, changing of
ship-related parameters and frame system handling is done here.

RESET restart the system

The run is restarted from the place where the user's initials are inquired. The command must
be entered unabbrieved.

SCAN -> list scanner

Copyright © 1992 - 2016 NAPA. All rights reserved. 414 / 7399


NAPA for Design Manuals 2016.3

This command starts the list scanner, by which lists in the list file can be studied or sent to the
printer.

TABLE -> enter the table calculation task

TOC -> table of contents etc.

This program contains various functions for handling database files such as table of contents,
copying, mending and handling of individual descriptions.

VERSION change version

By this command, the a new version is made current. If such a version does not exist, it is
created.

VERSION version PERM

version: new version

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.

The following options can be included in the command line:

-tty run in the command mode. Cannot be combined with others.

-user user the name of the user

-project project run the given project

-project file use the given file database

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.

In the command mode, the program displays the prompt

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 415 / 7399


NAPA for Design Manuals 2016.3

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.

The following concerns the tty mode:

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:

NO SUCH PROJECT, (ERROR/CREATE/OMIT)>

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:

GIVE SHORT DESCRIPTION OF THE PROJECT:

Copyright © 1992 - 2016 NAPA. All rights reserved. 416 / 7399


NAPA for Design Manuals 2016.3

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.

GIVE REFERENCE DIMENSIONS (L,B,T):

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.

GIVE FRAME SPACING:

The purpose of this question is analogous with the one above.

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.

5. Changing/creating a new version


A new version is selected or created with the command VERSION:

VERSION version PERM

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

* BEGIN HYDROSTATICS (HYD) *

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 417 / 7399


NAPA for Design Manuals 2016.3

TASK>LD -

7. Starting a batch run


A batch run is in all other respects an ordinary NAPA run except that it is run without any user interaction and without occupying a terminal. The
data to be run must therefore be stored in advance as a macro.

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 job is started with the top level command BATCH.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 418 / 7399


NAPA for Design Manuals 2016.3

Project administration (ADM)


The data that forms the basis for project administration is maintained in the system database, where each project is registered in a description
named PROJECT*.... A copy of this description is maintained in the project database, making it possible to use the project database
independently. However, all functions concerning sets of projects rely on the projects registered in the system database.

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.

1.2. Deleting and releasing projects

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 419 / 7399


NAPA for Design Manuals 2016.3

1.3. Changing name and location of files

Under subtask UPD, commands RENAME and MOVE are available for changing the name of the project and to move the files to another directory.

1.4. Updating or listing information in the administration

The subtask UPD allows the administrative information stored in the system database to be listed or changed.

1.5. Setting a message

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.

1.6. Removing obsolete data

Under the subtask TIDY, versions no longer needed can be deleted from the project database.

1.7. Maintaining a register of current runs

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.

1.8. Access control

There are various ways by which access to projects and to various functions can be restricted.

2. Commands LIST and INFO


Commands LIST and INFO both obey the SELECT command. If none has been given, the output is done for the current project.

Without parameters, the LIST command gives the output represented by the following sample:

Project version created by stat description


D-MOON (EK) 941007 EK m/s NAPA MOON, passenger ship
D-STAR (Z-TEST) 931011 EK m/s Napastar, containerfeeder
NAPASHIP (A) 890419 JVH C napa test ship
TEST (A) 940613 JHS Test project
WGDEMO (A) 921123 JVH Demonstration of weight calc.

The alternatives for STAT are

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 420 / 7399


NAPA for Design Manuals 2016.3

Project last access nr


D-MOON 960410 162000 388
D-STAR 960324 100456 4065
NAPASHIP 960410 125509 3876
TEST 951028 143431 11305
WGDEMO 950503 102133 123

'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.

LIST F lists file names:

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:

PROJ VERS DES LREF BREF


--------------------------------------------------------------
NAPASHIP A napa test ship 99.90 20.00
D-STAR Z-TESTm/s Napastar, containerfeeder. 82.00 13.00
D-MOON EK m/s NAPA MOON, passenger ship 80.00 16.00

3. Updating/listing of project administrative data (UPD)


Data about projects is maintained in the system database, in order to be accessible independently of the projects, most importantly when opening
a project. A copy of this information is maintained in the project database for the purposes described below.

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'

Copyright © 1992 - 2016 NAPA. All rights reserved. 421 / 7399


NAPA for Design Manuals 2016.3

Other functions concern listing and changing version data.

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.

3.1. Changing name and location of files

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.

4. Tidying the project database (TIDY)


While the work on a project proceeds, a considerable amount of obsolete data tends to collect in the project database, mostly to versions that are
no longer needed. The tidying function can be used for removing selected data. As a simple precaution, it is recommended to make a back-up
copy before using this function.

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.

5. Maintaining a register of current runs


Primarily for the purpose of supporting management of current runs for licensing purposes, there is a function for maintaining a register of current
runs in the system database. Regardless of this usage, the register can be activated by setting the parameter RREG ON; in the installation
parameters (subtask INST/ADM).

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 422 / 7399


NAPA for Design Manuals 2016.3

Nr Run id User Start Project Version Idle


1 R9783 ML. 08:05 ---- 12
2 R9790 HSE 09:20 TEST HSE4 3
3 R9792 JVH 09:31 NAPASHIP A 0 **
4 R9794 AM 09:36 D-VLCC TRANS2 213

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.

6.1. Functions needing administrator privileges

The following functions need the system administrator privileges:

functions related to the installation parameters


access to the installation parameters subtask (INS/ADM)
creating a model reference system (command MODEL/REF)
storing tables with MN* prefix
access to the description editor (DED/TOC)
access to the subtask DBI/TOC
command IOF/TOC
opening a database file from another directory than TEMP, using the command !OPEN with a file name.
accessing the installation parameters with the calculator
maintenance of general data in the system database
the installation specific quantity standard
standard LQs, PQs
INIT*SYSTEM
general TINITs

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.

6.2. Functions needing full professional status

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 423 / 7399


NAPA for Design Manuals 2016.3

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).

6.3. Owner of a project

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:

storing standard LQs, PQs, TINITs and similar general data


changing the version description (VDES/ADM)

6.4. Owner of a version

The owner of a version is defined similarly as that of a project.

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.

6.5. Handling passwords

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.

6.6. Read-only versions

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.

The status is set under task UPD.

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).

6.7. Protected database

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 424 / 7399


NAPA for Design Manuals 2016.3

The protected database is presently used in weight calculations only, if so specified. The file is normally not opened except when entering weight
calculation.

When opened, the protected database is opened as database unit 3.

6.8. Protecting output in the intermediate file

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.

6.9. Access control with standard operating system functions

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

7.1. Commands under ADM

DELETE delete project(s)

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.

EDIT enter the text editor

END return to main monitor

ENTER enter project available in a file

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.

INFO collect information about selected projects

Copyright © 1992 - 2016 NAPA. All rights reserved. 425 / 7399


NAPA for Design Manuals 2016.3

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.

I: (opt) record dates in the internal form (seconds)

INST -> list/update installation parameters

This function has subcommands, available after command INST is entered.

LIST list data about the current/selected projects/runs

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

sel: selection of data:

U: data about usage

F: file name data base

omitted: name,date of creation, user, status description. The status is designated by P=private,
R=read-only, C=controlled, I=inactive.

V: list the data for versions separately

LIST RUNS option

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.

options: string containing one or several of

A: list all entries - also those registered as not active

I: record indices as stored, default=as listed

O: omit sorting - default=to sort according to start time

U: list runs belonging to current user only

In the output, ** marks the current run, !!=the entry of the current run taken over by another
one.

MESSAGE assign message

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.

PSW change password

Copyright © 1992 - 2016 NAPA. All rights reserved. 426 / 7399


NAPA for Design Manuals 2016.3

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.

PSW SET psw

psw: new password, string, max. 12 characters.

REFE update/list the reference system

This is the same function as REF on the task level. NOTE: concerns the current project and
version regardless of SELECT.

REGISTER register the current project

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.

RELEASE release project

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.

SELECT select projects

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

Select the given projects.

p1,p2...: names of projects. Special case CURRENT=current project

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

Select all projects.

SELECT crit1, crit2, .... 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).

USER: by user who created the project

DATE: date of creation

LA: date of last access (last time the project was used as the current project

Copyright © 1992 - 2016 NAPA. All rights reserved. 427 / 7399


NAPA for Design Manuals 2016.3

FILE: name of the project file (as registered in the project administration)

DIR: the name of the directory extracted from FILE

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.

NL: (opt) do not list

Only those projects are selected, that satisfy all criteria simultaneously. Dates are given in the
form YYMMDD.

Command LIST gives an alphabetic list of the selected projects.

SELECT DIR=name criterion ...

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).

DIR=name: given the name of the directory

EXAMPLES
SELECT P1234

Select the given project.

SELECT NAME>P USER=NN

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 DIR='temp' LA>060101

Select all project in the directoy 'temp' that have not been used since January 1. 2006.

SYNC synchronize data in the system data base

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.

TIDY -> removing obsolete data from the data base

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.

project: name of project from which data are to be taken

UNREG overwrite license entry

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.

UNREG runid user

runid: run identification of run to be removed, e.g. R1234 or 1234.

Copyright © 1992 - 2016 NAPA. All rights reserved. 428 / 7399


NAPA for Design Manuals 2016.3

user: (opt) user running. May be omitted if this is the current user. A different user requires
administrators rights.

UPDATE -> update/list administrative data of the project

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.

VDES change version description

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.

VDES version description

version: name of version

description: new description

7.2. Updating project data (subtask UPD)

ACC Accuracy of the data base

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

alt: accuracy, P32 (single precision) or P64 (double precision)

CHV check versions

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.

CPU list cpu usage

The command gives the weekly cpu usage in seconds

DESCRIPTION description of the project

FILE name of the project file

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.

LIST list data about the project

The data are listed in the form accepted as input.

LIST selection VER

selection: (opt) selection of data to be listed:

P: main project data (default)

V: list of versions

VS: list of version with status information

U: data about usage of the project

Copyright © 1992 - 2016 NAPA. All rights reserved. 429 / 7399


NAPA for Design Manuals 2016.3

VER: (opt) list the data separately for the versions

MOVE move files to another directory

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

directory: complete pathname of the new directory, enclosed in apostrophes, e.g.

NOTE: this feature is available only for Binary DB

OK normal finish

If changes have been made, the data in the system data base are replaced.

RENAME rename project

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

name: new project name

SHIPNAME ship name

Used as default for the reference system parameter SNAM when a new version is created.

SHTYPE ship type

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

type: string designating the ship type

SKIP finish without performing changes

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.

STAT change project status

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

stat: project status, either

PUBLIC: available without access restrictions

PRIVATE: available for the owner only

CONTROLLED: may be used without access restrictions, but certain functions are reserved for
the owner.

Copyright © 1992 - 2016 NAPA. All rights reserved. 430 / 7399


NAPA for Design Manuals 2016.3

INACTIVE: the project files are not available.

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

USER initials of the user that created the project

V enter description of version

V, id, descr

id: version identification (A, B etc)

descr: description (or text DELETE)

DELETE: version is deleted from the list. NOTE: this does not imply deleting from the data
base.

VERSION set permanent version

This command sets the permanent version, i.e. the one selected when starting a project.

VER version

version: new permanent version. Must be among the registered ones.

VSTAT change version status

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.

VSTAT version owner stat ro

version: version identification

owner: initials of owner

stat: PUBLIC or PRIVATE

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.

WHERE tell current project

7.3. Tidying the project database (subtask TIDY)

ARGS list parameters

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.

END leave the TIDY subtask

FILE select file(s) concerned

FILE file

Copyright © 1992 - 2016 NAPA. All rights reserved. 431 / 7399


NAPA for Design Manuals 2016.3

file: file to be tidied:

MAIN=main project file (the one containing primary data,

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.

PD: the protected data base

LIST list/control listing or list versions

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

Enable/disable listing of saved data.

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.

METHOD select method

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

id: method, STD or AUX (see above)

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.

OK leave the TIDY subtask

(No operation is started).

RVER remove versions

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...

v1,v2...: versions to be removed

SELECT save arbitrarily selected data

This command allows the data to be saved (=not deleted) to be selected by using the general
selection criterion.

SELECT selection

For alternatives, see !EXPL SEL/D02

Copyright © 1992 - 2016 NAPA. All rights reserved. 432 / 7399


NAPA for Design Manuals 2016.3

SKIP leave the TIDY subtask

START start operation

SVER save versions

This command is otherwise equivalent with RVER, except that the versions to be SAVED are
listed.

SVER v1,v2...

v1,v2...: versions NOT to be removed

Copyright © 1992 - 2016 NAPA. All rights reserved. 433 / 7399


NAPA for Design Manuals 2016.3

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.

Controlling the system by calculator functions is also treated.

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.

one line of input forms one command unless:

Copyright © 1992 - 2016 NAPA. All rights reserved. 434 / 7399


NAPA for Design Manuals 2016.3

the commands are separated by semicolons (;)


a comma as the last character makes the command continue on the next line
strings are converted to upper case unless prohibited by apostrophes
strings containing lower case letters, special characters or strings that can be interpreted as numbers must be enclosed in apostrophes

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.:

Give output draughts> 3,3.5,4,5

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

POINT P1 (50,0,12) point in space

GET L100/B object from other version

LIST SORT=NAME parameter and its value

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.

3.1. Command identifier

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.:

Give output draughts> 3,3.5,4,5

3.2. Items

An item can either be a number or a string:

Copyright © 1992 - 2016 NAPA. All rights reserved. 435 / 7399


NAPA for Design Manuals 2016.3

number, e.g. +12.3, -20, 0.001, 1.2E5


string, e.g. ABC, 10A, T10-SB

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:

the string contains special characters (see below), e.g.

'DOUBLE BOTTOM TANK'

the string would otherwise be considered a number, e.g.

'12.5'

the string contains lower case letters, e.g.

'Jones'

Two delimiters such as ,, or () with no item between are treated as delimiting a special item, the empty item.

3.3. Delimiters

The delimiters separate the items and influence on their interpretation.

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

The following delimiters have a special meaning:

/ (slash)

( (left parenthesis)

) (right parenthesis)

= (equal sign)

< (less than)

> (greater than)

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 436 / 7399


NAPA for Design Manuals 2016.3

The purpose of the format rules presented above is to

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:

!TYPE The \@ character flags calculator expressions.

giving

The @ character flags calculator expressions.

In the following cases, the backslash creates non-printing characters:

\A: bell, ASCII 7


\B: backspace ASCII 8
\F: formfeed, ASCII 12
\N: newline, ASCII 10
\R: carriage return, ASCII 13
\T: tabulator, ASCII 9
\V: vertical tabulator, ASCII 11

The letters can also be entered in lower case.

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.

4. Listing previous commands


Commands entered earlier in the run can be listed or repeated with command !L. The main forms of the command are presented by the following
examples.

!L list the last command

!L 10 list the 10:th last command

!L +10 list the 10 last commands (1-10)

!L 10,20 list the 10-20:th last commands

!L PLOT list all commands beginning with PLOT

Copyright © 1992 - 2016 NAPA. All rights reserved. 437 / 7399


NAPA for Design Manuals 2016.3

!L PLOT 4 list 4 last commands beginning with PLOT

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:

!L * repeat the last command

!L PLOT * repeat the last command beginning with PLOT

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.

The commands run can be fetched to the editor work area by

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.

6. Common commands and formats


This paragraph gives an overview of some standard commands and syntaxes in NAPA. This standard is far from universally implemented, and
the explanations of various contexts should therefore be consulted. A number of the most important transparent commands are also listed.

6.1. Generally used commands

Editor type commands

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.

NEW create new object

GET get stored object from the database

SAVE save object in the database

REPLACE replace object previously stored

RENAME change name of current object

UNSAVE delete object from the database

DELETE delete components of the current object

CATALOG list of stored objects

WHERE give name of current object

NOTES add descriptive text

Output commands and related control commands

DES list a definition in the input format

Copyright © 1992 - 2016 NAPA. All rights reserved. 438 / 7399


NAPA for Design Manuals 2016.3

EDIT as, DES, but enter editor

PLOT start plot output

PLD plot diagram

SELECT select subset

SORT control sorting

NL start new list

NP start new page

TYPE enter line of text to the result list

FIG add figure

LQ select listing quantities

TOO table output options

PQ select plot quantities (for PLD)

POO plot output options

!FORM formatting of numbers, also information about symbols

!PAGE set page size

SCALE set scale

Calculation related commands

HULL name of floating object

T,TRIM,HEEL argument draught, trim and heel.

<name of quantity> value of other quantity controlling the calculation (e.g. CGX, cgx).

ARGS list current arguments

CALC start calculation

STORE, FETCH store, retrieve calculation results (in contrast to definitions)

Transfer of control

OK, END exit from the current subtask to the next upper level

SKIP as OK, but ignore any definitions

!END forced exit directly to TASK level

Various commands

!WHERE give current project, version etc.

!EXP, !COMMANDS explanations of commands and error numbers

!REF values of current reference system

!CAT catalog of selected data from the database

Commands related to graphics

!GR select graphic device and some other functions

!E erase the screen

!GIN coordinate system and accuracy for graphic input

Copyright © 1992 - 2016 NAPA. All rights reserved. 439 / 7399


NAPA for Design Manuals 2016.3

!VIEW handling of multiple drawings

!ZOOM zooming

6.2. Generally used syntaxes

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 ()

The general meaning of parentheses is grouping of items, e.g.

SELECT VER=(A,B,C)

Special cases:

(u,v): point in a plane


(x,y,z): point in space
(q1,q2,dq): set of equally spaced values

The form id(....) is used for array indices or parameter lists for functions or macros. Note the special cases

id(): designates a whole calculator array (in certain commands)


id(*): designates the set of strings contained in the array 'id' (generally)

Slash /

The slash delimits an item and (often optional) qualifiers.

Common cases are:

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

Smaller, greater sign <, >

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 -&gt; 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.
&lt; and &gt; 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.

A macro can refer to another one by !ADD commands in up to 100 levels.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 440 / 7399


NAPA for Design Manuals 2016.3

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.

A macro can refer to another one by !ADD commands in up to 100 levels.

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.

8. Commands related to input and running macros

8.1. Starting a macro (command !ADD)

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:

!ADD macro/version from the given version

!ADD macro/vers/project from the given project

!ADD macro//DB2 from the system database

!ADD DB2>macro same as above

!ADD macro//DB7 from the NAPA database

!ADD directory>file from text file

Part of a macro can be run by adding a line number range:

!ADD macro line1 line2

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 441 / 7399


NAPA for Design Manuals 2016.3

as on own line, literally as given above.

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.

8.2. Other ways of running macros

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.

8.3. Immediate mode

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.

8.4. Standard list and plot macros

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

finding the relevant macros


outputting instructions for use of the macros
using parameters

This service must be supported by the local LIST and PLOT commands, which must recognize the syntax

Copyright © 1992 - 2016 NAPA. All rights reserved. 442 / 7399


NAPA for Design Manuals 2016.3

LIST .macro parameters


PLOT .macro parameters

The syntax .macro refers to a macro named

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:

NAPA data base:


ALL @@ Comprehensive output of damage cases
DRES @@ Short summary of all damages and STAGES
LIM @@ GM (KG) limiting values as function of draught
SUM @@ Damage GM-reg. summary list for all STAGES/PHASES
SUM2 @@ Short damage GM-req. summary list
SUM3 @@ Damage GM-reg. summary list for all STAGES

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 443 / 7399


NAPA for Design Manuals 2016.3

@@ Plot points used in hull


definition
@global listpar list
@i=locs(listpar,'?')
@if i>0 @goto help
@id=locs(listpar,'id')
@onerr end
@n=rsize(listpar)
@if n=0 then
!type name of surface not given
@goto end
@endif
def
sel **@listpar(1) p
@n=rsize(list)
@if n=0 then
!type no points referenced
@goto end
@endif
!do 'plot %pname' pname=list
@if id>0 !do 'text %pname %pname (20)' pname=list
@end
@label help
!type
!type PLOT .POINTS surface ID
!type
!type used in the surface entered as the first parameter.
!type The optional parameter ID adds the point names

There is similar service tied to the task in general and provided by the !ADD command:

!ADD .macro parameters

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).

8.5. Repeating commands with !DO

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

!DO commands repetion

where 'commands' represent the command to be run by either the name of a macro or commands given within apostrophes, for example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 444 / 7399


NAPA for Design Manuals 2016.3

!DO PLOT ... run the macro PLOT

!DO 'PLOT %NAME' ... run the PLOT command

The apostrophes distinguish the two forms.

The !DO command must be entered on an own line.

The repetition can be expressed in one of the following ways

control variable and range, for example X=(0,100,10)


control variable and calculator array, for example: NAME=LIST
using the set created by a preceding !SELECT

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.

The repetition can be expressed by a number only:

!DO commands n

which is shorthand for

!DO commands I=(1,n,1)

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:

!DO '!TYPE ASCII code %I = %CHAR(I)' I=(32,92,1)

This command lists a table of ASCII codes, beginning with

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:

!SELECT NAME>FR TYPE=C

!DO 'PLOT %NAME' NAME=LIST

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 445 / 7399


NAPA for Design Manuals 2016.3

!DO CP.LISTTABLE NAME=CPLIST

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.

8.6. Controlling the data echo

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):

!CDE 0 no data echo


!CDE 1 data echo to the screen

In a macro, the data echo can also be controlled by

@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.

9.1. Input from digitizer or screen

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.

9.2. 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.

10. Data echo and log


All commands entered are written as a data echo. Normally, the data echo is not sent to the terminal but added to the run log, containing also
output such as error messages. This way, the log will tell in chronological order what has been done and with what success. In the log, commands
are flagged in a way that makes it possible to list or store them separately.

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.

11. Block mode

Copyright © 1992 - 2016 NAPA. All rights reserved. 446 / 7399


NAPA for Design Manuals 2016.3

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.

12. Various functions


This paragraph presents some services which are provided by the input system, and therefore not dependent on the current task.

12.1. Transparent commands

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.

12.2. Using frames or reference coordinates of objects

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.

#20, #-4 #12.5

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

For the meaning of reference coordinates, see the Geometry Manual.

In all cases, an increment can be added to the coordinate, e.g.

#10+0.2

meaning the x-coordinate of frame 10 + 0.2 m.

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.

12.3. Running a macro in step mode

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'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 447 / 7399


NAPA for Design Manuals 2016.3

12.4. Accessing previous commands

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.

13. Variable replacement and programming

13.1. Variable replacement

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.

13.2. Programming and NAPA BASIC

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.

13.3. Service functions

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.

14. General check function


The tool described here is intended to provide a way of doing error checks in way that is general enough to be used by standard functions while
still offering more than formal checks. Above all, this is intended to help the programming of input functions for the graphic user interface.

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 following information can be included in the data description.

14.1. Main data type

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 448 / 7399


NAPA for Design Manuals 2016.3

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

The alternatives for 'type' are:

Basic data types:

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

R*N arbitrary number of reals, e.g. series

R/HEEL real representing heeling angle

I integer

S arbitrary symbol

S/G string, name of geometric object

S/DATA* string, name of macro

S/DAMCASE() damage case

14.2. Specification of allowed values

In addition to the main category, additional restrictions on the possible values can be defined.

For integers and reals, a range can be given, syntax min...max.

For integers and strings, sets of allowable values can be defined the following ways:

directly given, syntax (v1, v2, ...) NOTE: commas as delimiters


alternatives with wildcards, syntax *(v1, v2, ...)
by calculator array, syntax id() or refnr()
reference to table column, syntax column/table
test by macro, syntax DATA*name, returning 0 (OK) or &gt;0: error number
test by macro, syntax LIST*name, returning an array with allowed values
provided by subsystem service function

For strings, a filter can be given, syntax /filter/, given last.

Examples:

'R 0...%LREF' real, range 0...LREF

'S/R *(R*,T*)' string, room name, beginning with R or T

'I (1,2,3,5,7,11)' integer, one in the list

Copyright © 1992 - 2016 NAPA. All rights reserved. 449 / 7399


NAPA for Design Manuals 2016.3

'S %MN.TASKSTACK() string, name of active task

'S PURP/PAR*PRO' string, purpose available in PAR*PRO

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.

14.3. Acceptance test by macro

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.

Example: test that the given number is the x-coordinate of a frame:

@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')

14.4. Optional items

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.

@ad.check('S PURP/PAR*PRO O',S)

Without the O, S is rejected if empty (not found in the given column).

14.5. Adding service functions to the criterion

Copyright © 1992 - 2016 NAPA. All rights reserved. 450 / 7399


NAPA for Design Manuals 2016.3

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)

function returning 0 or error code, i.e. it only does the check

ss.id(parameters)

function returning list of values in an array provided by the caller

A=ss.id(parameters)

function returning a list of values as function value

'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)

14.6. Variable replacement in the check criterion

Given items in the criterion can be replaced by reference to variables or calculator expressions by flagging the expression with %:

Examples:

'R*N %RMIN... %RMAX'

reals in the range given by RMIN,RMAX

'S %LIST'

string from the set given by array LIST

'R 0...%VOL(HULL)'

a value smaller than the volume of the hull.

Copyright © 1992 - 2016 NAPA. All rights reserved. 451 / 7399


NAPA for Design Manuals 2016.3

14.7. Access to the check function

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')

No other check than that the value is a real.

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')

The value must be an integer that is either 1,2,3 or 10.

AD.CHECK('S
(LREF,BDWL,ZDWL,HMAX,XMIN,XMAX)','BDWL')

The value must be one of the given strings.

AD.CHECK('S %LIST','A')

The value must be a string contained in the array LIST.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 452 / 7399


NAPA for Design Manuals 2016.3

AD.CHECK('S A=AD.FORM(Q)','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...

15. Command specifications

!ADD run macro

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.

!ADD name/vers/proj n1,n2 var=value var=value ... S L!

name: name of the macro. If the source is not specified by the other parameters, the following sources
are attempted in this order:

project data base, current version


project data base, version COMMON
system data base
NAPA data base

/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.

n1,n2: (opt) add only lines n1...n2

var=value: (opt) assign the given value to the given variable

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.

L!: (opt) make use local variables default in the macro

!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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 453 / 7399


NAPA for Design Manuals 2016.3

!ADD directory>name ...

This form allows text to be added from text files.

directory: name of directory

name: name of file in the directory.

...: options as above

!ADD FILE=path

As above, but the path is given as one string.

!ADD *name ...

The asterisk means that the text is fetched from the system data base even if present in the
project data base.

...: options as above

!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

Run the macro named LINESDRAWING

!ADD *STDHYD

Run the macro named STDHYD from the system data base.

!ADD TEMP>T

Run the file T in directory TEMP as a macro.

!ADD HULL/B/DB6

Run the macro HULL from project P1234, version B.

!ADD PLOT('HULL')

This form runs the macro PLOT with the parameter 'HULL'.

!ADD PLOT('HULL')/A

This form runs the same macro from a different version.

!ADD .macro options

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.

.macro: name as presented above

options: see !EXPL MAC/GEN

EXAMPLES
!ADD .CBH

Assuming that the task is DEF, the macro DEF.CBH is run.

!ADD .CAT

In same case as above, the macros named DEF.xxx are listed.

!ADD *

Copyright © 1992 - 2016 NAPA. All rights reserved. 454 / 7399


NAPA for Design Manuals 2016.3

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:

empty: continue (in step mode)


C: continue cancelling step mode
Q: interrupt the execution of the macro
!...: various commands
HELP list all available commands
other: interpreted as the name of a variable, the
value of which is printed

The step mode can be set inside a macro by adding a line

ENTER STEPMODE

(literally as presented)

!DO repeat commands

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.

!DO 'commands' loop-control

commands: commands to be performed. NOTE 1: The commands MUST always be enclosed in


apostrophes. Double quotes can be used for apostrophes belonging to the commands. NOTE
2: Variable references to be performed in the repetition loop must be identified by percent signs
(%), otherwise they are resolved before the DO command is interpreted. NOTE 3: the
command must be entered on one line, without other commands on the same line (same
restriction as for command !ADD). If the available space is not sufficient, the commands must
be collected into an *ADD element.

loop-control: controls the repetition of given commands

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=(min,max,step): as above, but the range of values is given by the

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).

n: shorthand for I=(1,n,1)

!DO name loop-control

This form is otherwise equivalent with the one above, but the commands are given using an
add element. The effect is equivalent with

!DO '!ADD name' loop-control

name: name of a data element or *=current editor work area (Note that with *, exit from the editor must
usually be done separately).

Copyright © 1992 - 2016 NAPA. All rights reserved. 455 / 7399


NAPA for Design Manuals 2016.3

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.

!DO 'SEL +1; OK; SEND' 5


Repeat the given commands five times (useful under PLOT).

Copyright © 1992 - 2016 NAPA. All rights reserved. 456 / 7399


NAPA for Design Manuals 2016.3

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.

3. Intermediate output file


Alphanumeric output may be saved within the computer in the so-called intermediate output file (IOF) and the actual output on paper or screen is
done using the list scanner (task SCAN ). The purpose of the list file is to avoid unnecessary printing of lists and to add extra flexibility. Most of
what is listed to the screen will never be needed on paper, and the list file allows the printing decision to be made later.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 457 / 7399


NAPA for Design Manuals 2016.3

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.

7. Controlling alphanumeric output


The list output can be controlled regarding destination (command !LINK) and page size (command !PAGE). This control is applied by listclass,
meaning that only output belonging to different listclasses can be controlled separately. Normally, the standard list control set by the monitor
produces the desired result, and you do not need to concern yourself with list control nor with listclasses.

The standard rules for control of alphanumeric output are:

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.

10. Controlling the page size


Most of the list formats are adapted to the current page format, obeying the width or height of the page or both. The default for the page size is
taken from the size registered for the standard printer. A different page size can be specified by adding record 151 to the installation parameters
(see the Monitor Manual).

The page size can be inquired or modified with the command !PAGE.

11. Controlling the formatting of numbers


In many lists, the presentation of quantities occurring in output lists can controlled regarding unit, number of decimal places and field length
(=space reserved). The standard formatting parameters are fetched from the quantity standard, which can be accessed with command FORM on
the top command level. The formatting parameters can be inquired and temporarily modified in any task with command !FORM.

12. Output in different languages


The standard list functions and some other lists do translation of the output to a different language if separately specified. For a given language,
this is possible if the required translations are stored in the system database. The language must also be registered (presently Russian, Finnish,
Swedish, German and French). The selection of the language for output is done by using the command !LANG. The translation facility is also
available in the calculator (the TRAN function). This is not a genuine translation facility, but one to one replacement of texts with the specified
alternatives. Presently, this facility is not supported consistently. See the LIST OUTPUT Manual.

13. Standard commands


The following standard commands relate to list handling:

NL (new list) starts an independent list and allows the setting of some options, e.g. list name.

TYPE addition of arbitrary text

NP new page

Copyright © 1992 - 2016 NAPA. All rights reserved. 458 / 7399


NAPA for Design Manuals 2016.3

LF line feed

FIG insert figure

See also the command LQ, TOO presented below.

14. Standard table output module


A number of listings are based on the so-called standard table output module. The purpose is to add a maximum of flexibility regarding quantities
to be included, formatting and various other aspects.

The following additional facilities are provided by the table output module:

sorting and grouping


adding totals, subtotals
adding quantities that can be derived from the standard ones by calculator expressions
output as drawing
transfer to the table calculation module, for further processing, e.g. input to the diagram drawing 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.

The function is presented in more detail in the LIST OUTPUT Manual.

15. Documentation system


A function is provided for creating formatted documents from a freely formatted source text. The documents can also contain figures. This can be
used for documents prepared by directly writing the source text, but it can also be used as tool for collecting partial documents, e.g. listings from
an application, into a larger collections.

16. List in HTML format


Lists stored in the IOF the can be output as HTML files.

Copyright © 1992 - 2016 NAPA. All rights reserved. 459 / 7399


NAPA for Design Manuals 2016.3

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.

3. Windows, drawings, layers, zooming


The output of graphics on the screen is to specially designated drawing areas of which there may be several.

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.

4. Selecting the device


Unless otherwise specified, the workstation or terminal from which the system is run is used for graphic output, provided that it has graphics
capabilities. Otherwise, the graphic output is stored in the output file.

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:

!GR selection of output device and various other operational options

Copyright © 1992 - 2016 NAPA. All rights reserved. 460 / 7399


NAPA for Design Manuals 2016.3

!GIN control related to graphic input, including definition of coordinate system

!VIEW creation and use of multiple views and segmentation

!LAY control of layers

!ZOOM temporary enlargement

!E erase the graphic screen

More information is given in the Drawing (DR) manual.

Copyright © 1992 - 2016 NAPA. All rights reserved. 461 / 7399


NAPA for Design Manuals 2016.3

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:

X-axis: length coordinate, positive in the direction of the bow

Y-axis: breadth coordinate, positive direction depending on the orientation of the coordinate system (right-handed: port side - left-handed:
starboard side)

Z-axis: height coordinate, positive upward, zero at the baseline

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.

Coordinate system and angle in a plane


If the plane represents a principal plane, where x, y or z is constant, the remaining axes correspond to u and v as follows:

xy-plane: (u, v) = (x, y)

Copyright © 1992 - 2016 NAPA. All rights reserved. 462 / 7399


NAPA for Design Manuals 2016.3

xz-plane: (u, v) = (x, z)


yz-plane: (u, v) = (y, z)

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:

x-view: from stern to bow


y-view: from starboard side
z-view: from above

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

area square meter

volume cubic meter

angle radians (degree in commands)

weight metric tons (kg in SH)

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 463 / 7399


NAPA for Design Manuals 2016.3

Reference dimensions and coordinates

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).

5. Draught, trim and heel


The definitions of draught, trim and heel used in commands and listings are defined by the following figures:

Copyright © 1992 - 2016 NAPA. All rights reserved. 464 / 7399


NAPA for Design Manuals 2016.3

T = mean draught, at the reference point (x=XREF, at baseline)


Ta = draught at aft perpendicular AP
Tf = draught at fore perpendicular FP
Trim = TF - TA (if trim by head is positive, see below)

Whether trim by head is considered negative or positive is defined in the installation parameters.

The heel is positive when the +y side of the ship immerses.

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

Date: YY-MM-DD, e.g. 97-05-10


Time: HH.MM, e.g. 12.23

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 465 / 7399


NAPA for Design Manuals 2016.3

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

'formal error in the input (E 11)'

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:

formal error in the input (E 11)


The command given violates the general syntax rules,
for instance, a parenthesis is missing.
Check for typing errors

These longer messages are obtained by using the command

!EXPLAIN errornumber

Copyright © 1992 - 2016 NAPA. All rights reserved. 466 / 7399


NAPA for Design Manuals 2016.3

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:

WL10A curve missing (E 1003)

indicating that the curve WL10A is missing.

3. Catching errors in macros


If one wants to interrupt a macro or change the flow of control when a command raises an error, the command

@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

is useful. For more information, see the Monitor Manual.

4. Operating system level errors


Napa has received error codes from 29001 to 29099 for conveying error originating from the underlying operating system. The NAPA error
messages and explanation texts for these errors are typically on a rather general level as in the example below.

Error 4 29019 11003


System error, execution terminated

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 467 / 7399


NAPA for Design Manuals 2016.3

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.

This chapter presents the calculation of these quantities.

Table of Contents:

1. Calculation of volume oriented quantities


1.1. Control of calculation sections
1.2. Administration of calculation sections
1.3. End corrections and waterline quantities
2. Calculations involving the hull
3. Other quantities calculated for volumes
3.1. Wall area
3.2. Bottom areas
4. Areas of surfaces

1. Calculation of volume oriented quantities


Objects classified as boxes are calculated analytically; otherwise, all volume oriented calculations are done with so-called calculation sections.
The calculation sections are x-sections selected so that sufficient accuracy is obtained when values derived from the sections are integrated
longitudinally. For boxes, the quantities are calculated directly from the mathematical shape.

Calculation sections are described in more detail in the Geometry Manual. Here only the most important principles are presented.

Example of calculation sections

1.1. Control of calculation sections

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.

1.2. Administration of calculation sections

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 468 / 7399


NAPA for Design Manuals 2016.3

1.3. End corrections and waterline quantities

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.

2. Calculations involving the hull


In many calculations, a central role is played by the hull, i.e. the object responsible for the buoyancy. In all calculation tasks, there is an argument
by which one can specify what object to use for this purpose, but usually the object is selected automatically on the basis of a name rule recorded
in the reference system.

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.

3. Other quantities calculated for volumes


For objects representing volumes (usually defined as rooms, in the sense of the geometry subsystem), the bottom area and the wall area are
available.

3.1. Wall area

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.

3.2. Bottom areas

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 469 / 7399


NAPA for Design Manuals 2016.3

Short introduction to data management


This chapter deals with general principles on which the data management in NAPA is based and with related system functions.

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.

2. Storing in the database


The description is also the unit of data stored in the database, and normally, only whole descriptions are transferred between the database and
the so-called free storage, i.e. the run time memory reserved for storing of descriptions. In the database, the version identifier is added to the
description name, so that descriptions from different versions can be distinguished.

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.

UNIT 2 The system database, assigned at the start of a run

UNIT 3 The protected database (optional)

UNIT 4 The auxiliary project database

UNIT 7 NAPA database, assigned at the start of a run

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.

3. Tools related to descriptions

Copyright © 1992 - 2016 NAPA. All rights reserved. 470 / 7399


NAPA for Design Manuals 2016.3

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.

4. Calculator functions related to data management


Description components can also be directly accessed by calculator functions. The function DB reads a description from the database and the
function REC selects a record from a description. The arrays of the calculator are in fact records in the sense of the data management, and all
functions related to arrays can be applied to any records.

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:

DM: functions concering data in the run time memory


DB: functions related to the database

5. Some name rules


The main way of keeping order in the database is the rules by which names of descriptions are formed.

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

DATA* texts created by the editor

LIST* list store with command SAVE under task SCAN

ARR* arrangements

DRAW* stored drawing

FIG* standard figure

TAB* table created under the table calculation module

HYD* result descriptions of hydrostatics

LD* various loading condition oriented data

LD*CON loading condition

LQ* selection of quantities

HEADER* standard header

INIT* data element to be run at start of NAPA

SECTION calculation sections for object

DA* various data related to damage stability

ERnnn error explanations (full)

ESnnn error explanations (short)

Copyright © 1992 - 2016 NAPA. All rights reserved. 471 / 7399


NAPA for Design Manuals 2016.3

EXPL&xxx explanations of commands

The function AD.SUBJECT provides service regarding the name rules.

Some fixed names are

INSTALLATION*PARAMETERS installation parameters

TERMINALS description of terminals

COM*DATA the reference system

#SYSTEM the frame system

*OBJECTS* the object administration

*QUANTITIES* the quantity standard

6. Examples of description specifications

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 472 / 7399


NAPA for Design Manuals 2016.3

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

the NAPA database


the system database
version COMMON in the project database (supported only partially)

In addition, some items may be stored in the current version of the current project.

If no NAPADB (DB7) is assigned, the system database (DB2) is used instead.

Table of Contents:

1. Data read from the NAPA database only


2. Data read from the system database or NAPA database
3. Read from the system database only
4. Read from all sources
5. Macros, figures and tables
6. SH subsystems optional tasks, quantities and explanation texts
7. Sharing data between versions in a project
8. Special questions for releases older than 94.1

1. Data read from the NAPA database only


This category contains data delivered by Napa Ltd not intended to be tailored. The names in the list below indicate the name rules for the items
concerned.

EXPL*...: explanations of commands (translated ones are read from DB2, SH uses also DB2 and project db)

ER...: explanations of errors

ES...: explanations of errors (1. line only)

TOC*...: tables of contents for !DOC function

NAPA*QUANTITIES* standard quantity definitions

*EQUATIONS* equations for derived quantities

2. Data read from the system database or NAPA database


This category contains data for which a default is provided by Napa Ltd, but can be tailored on the system level by the user organization. The
system database is checked first, and if the item is not found, the NAPA database is checked.

FIG*... standard figures

CMAP*id colour maps

FONT*id software fonts

ENGL*... keyword lists for the translation function

TRAN*.../ver: translations

STDRDPARAM special curves for lines drawing

LD*STDLIST named list formats (for OUT command/LD)

LLOYDSDATA definition of Lloyds distribution

DAM*HEELS standard heel for task DAM

*STD*CRITERIA* standard criteria (old)

LN*PARAM water resistance coefficients

nn*DEFAULTS SH subsystems default values

Copyright © 1992 - 2016 NAPA. All rights reserved. 473 / 7399


NAPA for Design Manuals 2016.3

3. Read from the system database only


This category contains data specific for a given user organization.

INSTALLATION*PARAMETERS installation parameters

TERMINALS device definitions

PROJECT*... project administration

INIT*SYSTEM commands run when starting NAPA (common)

INIT*user commands run when starting NAPA (user-specific)

....FMT: initial control data for printers

USER*QUANTITIES* local modifications to the quantity standard

USER*QUANTITIES_SH*
: local modifications to the SH quantity standard

DXF*TYPES control for DXF link

SLIPWAY(...) definitions for launching

DRAG(...) ''

BBOX(...) ''

4. Read from all sources


This category contains data that can be tailored for a given project (and version) but otherwise read from the system database or NAPA database
(in this order).

HEADER*id list headers

LQ*... selection of list quantities, output options

PQ*... selection of plot quantities, plot options

POO*... separately stored plot output options

TEXT*... source for special text output function (e.g. TEXT*NEWS..., TEXT*ERR...)

STAB*HEELS standard heels (task STAB)

LD*HEELS standard heels (task LD)

CRIT(...) criteria (CR, DA)

CRIGROUP(...) criteria groups (CR, DA)

MOMENT(...): moments (CR, DA)

CONTAINER*... definition of container type (CL)

CINIT*START_... SH START macros

CINIT*CALC_... SH CALC macros

5. Macros, figures and tables


Macros, figures and tables can be used for varying purposes, some of which are clearly project specific while others have more the role of
common data. Since it is difficult to distinguish these purposes in the basic functions, the reading takes place according to the same rules in all
cases: first the project database (current version), then the system database and last the NAPA database.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 474 / 7399


NAPA for Design Manuals 2016.3

TAB*... arbitrary tables

ARR*... arrangements (SM)

PAR*... properties of purposes and substances (SM)

STR*... sets of structures (SM)

STT*... parameters of structure types (SM)

EQP*... sets of equipment (SM)

EQT*... parameters of equipment types (SM)

COLOUR*... filling standards (SM)

PEN*... line type standards (for structures) (SM)

WG*... weight tables (WG)

Special cases of TAB*:

TAB*FILLCODES definition of logical fill codes

TAB*PENCODES definition of logical pen codes

TAB*FONTCODES definition of logical font codes

Note that special rules can be defined under WG.

6. SH subsystems optional tasks, quantities and explanation texts


SH subsystems have several options to define local additions and modifications to the data items and calculation tasks.

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.

The names and other details can be found in SH manual.

7. Sharing data between versions in a project


A facility for sharing data between versions has been partially implemented. 'Partially' means that it concerns the categories listed below only, and
there is no special support in functions such as CATALOG. The common source must be a version named COMMON. If this version exists, an
attempt to read from version COMMON is done after testing the current version for items of the following categories:

macros
figures
LQs
project specific quantities
CINIT and data item macros in SH

8. Special questions for releases older than 94.1


The NAPA database was introduced in release 94.1. Previously, the information contained there in was read from the system database.
Therefore, as long as older versions are used, the categories read from the NAPADB only must be retained in the system database. but need not
(should not) be updated. The older releases will use the system database while the newer ones use the NAPA database. When older releases are
no longer used, the system database can be tidied.

Regarding other categories, there ought to be no reason for making any changes in the system database.

Copyright © 1992 - 2016 NAPA. All rights reserved. 475 / 7399


NAPA for Design Manuals 2016.3

System maintenance functions


This group of functions concerns the creation or updating of data used by the system for various general purposes, not related to specific projects.
With partial exception for task FORM, these tasks are not used in the routine usage of the system.

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:

1. Summary of installation data


1.1. Installation parameters
1.2. Quantity standard
1.3. Model reference system
1.4. Initial commands
1.5. Control of table and diagram output
1.6. Macros
1.7. Figures
1.8. Definitions of the ship model
1.9. Tables in general
1.10. Data related to graphics
1.11. Standard headers
1.12. Translations
1.13. Standard heels
1.14. Data used by the run time help functions
2. Installation parameters
2.1. General about the INST subtask
2.2. Declaration of devices
2.3. About graphic device types
2.4. Device definitions stored as tables
2.4.1. Modifications to the tables
2.4.2. Entering table calculation
2.4.3. DEVICES table
2.4.4. ANTYPES table
2.4.5. PRTYPES table
2.4.6. GRTYPES table
2.4.7. Example of generated table
2.5. Fonts under Xwindows
2.6. User-specific tasks
2.7. List of users
2.8. Aspects not accessible under the INST subtask
3. Quantity standard
3.1. Operational principles
3.2. Making changes and additions
3.2.1. Listing current definitions of quantities
3.2.2. Making changes
3.2.3. Checking of quantities
3.2.4. Storing the changes
3.3. Units
3.4. !FORM command
3.5. Replace one unit by another
3.6. Viewing quantity subgroups
3.7. Explanations of the related commands
4. Standard figures and overlays
5. Logical fill codes, pen codes and font codes
6. Creating colour maps
7. Conversion tables for line type parameters
8. Tailoring of output devices
8.1. Handling of proportional fonts
8.2. Format file for CaPSL
8.3. Format file Postscript
8.4. Format file for PCL
8.5. Test print

Copyright © 1992 - 2016 NAPA. All rights reserved. 476 / 7399


NAPA for Design Manuals 2016.3

9. Creating text fonts (task DFN/DEF)


10. Explanations to commands and error messages
11. Command specifications
11.1. Installation parameters
11.2. Quantity standard (task FORM)
11.3. Definition of fonts

1. Summary of installation data


The following summary covers common data in general, not only those handled by the functions presented in this chapter.

1.1. Installation parameters

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.

1.2. Quantity standard

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.

1.3. Model reference system

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.

1.4. Initial commands

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:

Macro name run location

INIT*SYSTEM when starting the system (common) DB2

INIT*UI.user when starting the system (user specific) DB2

PINIT*project when starting a project DB1 (version A), DB2

VINIT*version when starting a version DB1

TINIT*task when entering a task DB1, DB2

The version used in DB1 depends on the macro as follows:

PINIT*project version COMMON, then version A


VINIT*version version to be entered
TINIT*task current version, then version COMMON

When starting the system, INIT*SYSTEM is run before the user-specific macro.

1.5. Control of table and diagram output

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 477 / 7399


NAPA for Design Manuals 2016.3

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.

1.8. Definitions of the ship model

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*... .

1.9. Tables in general

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.

1.10. Data related to graphics

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.

1.11. Standard headers

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.

1.13. Standard heels

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.

1.14. Data used by the run time help functions

The command explanations are stored named as EXPL&xxx, where 'xxx' is the identifier that can be listed with !EXPL G/GEN.

Explanations of calculator functions are stored as texts named

EXPL.C general calculator functions

EXPL.ss service functions of subsystem ss

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 478 / 7399


NAPA for Design Manuals 2016.3

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.

2.1. General about the INST subtask

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.

2.2. Declaration of devices

'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:

input capability: e.g. terminal or terminal window on a workstation


printer capability: output of text on paper
graphics capability: output of graphics

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:

1111 (S): the device is to be run via the spooler


2222 (A): the device needs the opening of a separate connection
9999 (F): the device is a formal one, by which a certain device type is designated, not a specific physical device

The symbols S, A and F are used in the table version.

2.3. About graphic device types

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 479 / 7399


NAPA for Design Manuals 2016.3

2.4. Device definitions stored as tables

From Release 95.1 on, the following tables can be used for replacing the information in TERMINALS:

MN*DEVICES devices, terminals, workstations, printers


MN*ANTYPES terminal types
MN*PRTYPES printer types
MN*GRTYPES graphic device types

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

FORMAT NEW PERM

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.

2.4.1. Modifications to 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.

2.4.2. Entering table calculation

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.

2.4.3. DEVICES table

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 table DEVICES contains the following compulsory columns:

EXTID: the name of the device used in commands


INTID: the name of the device by which it is identified internally
ANTYPE: 'alphanumeric type', defined for keyboard devices, refers to the ANTYPES table
PRTYPE: 'printer type', defined for devices capable of outputting text, refers to the PRTYPES table
GRTYPE: 'graphic type', defined for devices capable of outputting graphics, refers to the GRTYPES table
CONFIG: assign S for spooled devices, F=for formal devices, A=device needing opening of a separate connection. For other cases,
assign empty.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 480 / 7399


NAPA for Design Manuals 2016.3

EXTID DES INTID ANTYPE PRTYPE GRTYPE CONFIG

----------------------------------------------------------------------
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

2.4.4. ANTYPES table

The ANTYPES table defines the properties of keyboard devices. The command AND enters table calculation and activates this table. The columns
are:

ANTYPE: type identifier, as used in the DEVICES table


TYPE: integer, type code
NCHAR: number of characters/line
NLINES: number of lines/PAGE

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:

ANTYPE TYPE NCHAR NLINES AMTYPE


-------------------------------------------------
A 1 79 20
TDV 21 79 20 TANDBERG
TDVS 421 79 20 TANDBERG
TEK 33 79 20 TEKTRONIX
VT200 96 79 24 VT200

Copyright © 1992 - 2016 NAPA. All rights reserved. 481 / 7399


NAPA for Design Manuals 2016.3

2.4.5. PRTYPES table

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:

PRTYPE TYPE NCHAR NLINES PMTYPE


-------------------------------------------------
P1 1 90 64
P1H 1 112 44
PS 20 92 64 Postscript
CA 30 92 65 CaPSL

2.4.6. GRTYPES table

The GRTYPES table defines properties of graphic devices. It contains the following compulsory columns:

GRTYPE: type identifier, as used in the DEVICES table


TYPE: main type, integer
SUBTYPE: subtype, integer
USIZE: size of the drawing area, horizontally
VSIZE: size of the drawing area, vertically
MARGIN: margin applied in the PLOT task
OPT: (character string) various options

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:

PRTYPE TYPE NCHAR NLINES PMTYPE


-------------------------------------------------
P1 1 90 64
P1H 1 112 44
PS 20 92 64 Postscript
CA 30 92 65 CaPSL

Note: for workstations under VMS the following special interpretations of the main type are made for historical reasons:

5: subtype 1...4: interpreted as UIS graphics, converted to 16 at run time

15: (Xwindows, old standard) converted to 5 at run time

16: UIS graphics according to new standard

When defining logical codes (see below), the converted types are used for designating devices.

2.4.7. Example of generated table

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 482 / 7399


NAPA for Design Manuals 2016.3

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

Name Type Description


----------------------------------------------
C1 CaPSL Canon, printer rack
CC1 CaPSL Colour Canon
NC CaPSL Canon, US char. set
O1 Canon,old Canon, old driver
P1 Postscript Postscript, market
P1B Postscript Postscript, bold
P1I Postscript Postscript, italics
PS Postscript Same as P1

2.5. Fonts under Xwindows

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.

2.6. User-specific tasks

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.

2.7. List of users

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:

U: user registered with normal rights

P: full professional user

A: system terms= administrator/>administrator

G: use translations

For example, PG means a professional-user, to which explanations are given translated.

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.

2.8. Aspects not accessible under the INST subtask

Copyright © 1992 - 2016 NAPA. All rights reserved. 483 / 7399


NAPA for Design Manuals 2016.3

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).

Geographic-coordinates of the user site

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.

Control of translated explanations

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).

Example of changing installation parameters:

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:

symbol used for the quantity


It is intended that the symbol should be consistently used in both commands and listings. However, symbols occurring as command
identifiers are always fixed, and they are not necessarily the same as registered in the standard. Regarding the symbols used for
parameters in commands, the standard is implemented only partly, mainly in standard functions such as LQ.
output unit
All quantities are internally stored with standardised SI units (meter for lengths, radians for angles, etc). The only difference to SI units is
the mass which is stored in metric tons instead of kg in most of the NAPA systems. The unit registered in the quantity standard defines
the unit used in output documents and in most of the input.
formatting parameters
The quantity standard defines the defaults used for the number of decimals and the space reserved for outputting values of a quantity.
standard headers
The headers are used where needed to explain the quantities in text form. A short (max. 12 characters) and a long header (24 char) can
be defined. The headers are supposed to be useful for outputting in vertical and horizontal format respectively. The long header is also
used in other contexts (e.g. LQ ALT L), for providing a description of the quantity.

The following information is stored for selected quantities only, using the commands indicated:

Copyright © 1992 - 2016 NAPA. All rights reserved. 484 / 7399


NAPA for Design Manuals 2016.3

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.

3.1. Operational principles

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.

3.2. Making changes and additions

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.

3.2.1. Listing current definitions of quantities

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 485 / 7399


NAPA for Design Manuals 2016.3

DES
ALL PROJ

To list all quantities with the identification where a quantity definition is coming from give the command:

DES ALL SEL

To list all quantities modified in the current run, give the command:

DES ALL MOD

See the explanation of the command DES to see all options and the definition of the selection criteria.

3.2.2. Making changes

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.

3.2.3. Checking of quantities

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.

3.2.4. Storing the changes

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

Please note the following:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 486 / 7399


NAPA for Design Manuals 2016.3

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)

m: mass dimension, e.g. tons=100

t: time dimension, e.g. seconds=10

l: length dimension, e.g. m=1, m2=2.

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.

To view a definition of the unit KW, give the command:

DES UNIT KW

and to see all units with the same dimension, give:

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

FR, frame number -1

WEB, web number -2

LONG, longitudinal -3

VERT, vertical -4

FI, feet and inch -41

FIP, feet, inch, part -42

MM.SS, minutes and seconds -11

HH.MM, hours and minutes -12

MM.DD, month and day -21

3.4. !FORM command

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.

3.5. Replace one unit by another

In case you want to replace some unit with another for all quantities under one project, you can make it as follows:

FORM ;** go to FORM task

Copyright © 1992 - 2016 NAPA. All rights reserved. 487 / 7399


NAPA for Design Manuals 2016.3

!FORM (M) FEET ;** change the unit and format for

3.6. Viewing quantity subgroups

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.

For example, to view user-specific definitions give the command:

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*.

3.7. Explanations of the related commands

The commands in the FORM TASK:

4. Standard figures and overlays


Standard figures are drawings stored in the system database for various purposes. The most frequent examples are

logos and similar figures, used for the identification of output


overlay, used in combination with text (.ovl under DOC or OVL option in the SEND command under SCAN). A figure used as overlay is
output in the scale in which it is made, with the drawing origin at the lower left corner of the drawing area. When output in landscape
format, the lower left is interpreted before turning.
frames and header fields for drawings. The standard lines drawing function uses the figure DRWLAB.
frames for diagrams. A number of diagram plotting tasks use a figure into which the diagram is placed. For frames used in connection
with the PLD command, see chapter Graphics and drawing.
various: the figure MIDSYMB is used by the lines drawing for marking the place of largest frame. The figure ARROW is used by the AXES
command under DRAW. The figures MSDEVICE, RSDEVICE and DSDEVICE as used when plotting sounding devices.

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.

Command STDF under task PLOT stores a drawing as a standard figure.

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.

5. Logical fill codes, pen codes and font codes


The logical codes are symbols that will be translated to device codes when a drawing is output to a specific device. The purpose is to make it
possible to prepare drawings that will automatically adapt to differences in the capabilities of different devices (e.g. colour/no colour).

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 488 / 7399


NAPA for Design Manuals 2016.3

* the main type preceded by T, e.g. T1 for the main type 1


* DEFAULT
In most cases it is enough to specify the device codes for the main type, but the other alternatives allow more specific definitions to be
made. The column DEFAULT (if present) is used when no alternative matches the current device.
For logical pen codes, the values are interpreted as

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:

4: thickness 4, other aspects not specified


14: thickness 4, dash 1 explicitly specified
3000: colour 3
4020: colour 4, dash 2, thickness not influenced

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.

Note the following special colour codes:

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:

C: (for fill code) the number used as a colour


R: (for fill code) the number used as a raster index
P: (for pen code) the number used as presented above

6. Creating colour maps


A colour map defines the connection between a colour index and the resulting colour on the graphic device. Colour maps are stored in the system
database using the name CMAP*id, where 'id' is the name used in the !GR-CMAP command. The following colour maps are used internally:

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 colour index defined


1:

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 489 / 7399


NAPA for Design Manuals 2016.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.

7. Conversion tables for line type parameters


For use with command !GR-CONV id; conversion tables providing values to be substituted for the initial colour, dash ao codes are stored in the
system database in descriptions named GR*CONV*id. This service was created before the logical codes and it is now considered obsolete.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 490 / 7399


NAPA for Design Manuals 2016.3

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.

8. Tailoring of output devices


The function of printers can be tailored by storing a set of (printer-specific) commands in the system database. With these commands, such things
as resetting, selecting font or character set can be done. The commands are stored as macros named

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:

U0=u0 start point of text from left border, default=0.002

V0=v0 start point of page from lower limit, default=0.277

TH=th text height, default=0.0025

LSP=d line spacing, default=0.0042

PH=n number of lines/page

PW=n number of characters/line

OVL=fig overlay added automatically

TYPE=t type, t=C (CapSL) or P (Postscript), H=HPGL2/PCL

(allows check of correct usage)

!ADD name insert other format file at the given place

NOLANDSCAPE inhibit automatic change to landscape format

(as done when implied by page size)

TAB=factor set proportional font handling

for the meaning of 'factor', see below

LCORR=factor correction factor for proportional fonts

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 491 / 7399


NAPA for Design Manuals 2016.3

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:

PW=92/140 portrait=92, landscape=140

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.

\027< /* soft reset

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.

Some device-specific considerations are presented in the following sections.

8.1. Handling of proportional fonts

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.

8.2. Format file for CaPSL

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:

\027; /* Return to ISO


\027P40J\027\092 /* Job start
\027< /* Soft reset
\027[1p /* colour mode declaration
\027[11h /* size unit mode
\027[?6 I /* Select size unit 1/100 mm
\027(C /* graphic set ISO./F
\027[4&z /* paint memory moded

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 492 / 7399


NAPA for Design Manuals 2016.3

state is assumed to be ISO. If VDM commands are given, they must be surrounded by commands

\027[0&} /* Change to vector mode


}p\030 /* Change to ISO mode

The following commands may provide useful variations:

\027c \027< hard-reset, soft-reset


\027[0p \027[1p set portrait, $$landscape-format
\027(C select primary graphic set ISO.F
\027(K select primary graphic set ISO.ER
\027(E select primary graphic set ISO./D
\027(R select primary graphic set ISO.RC
\027[;66 G compress 10 char/inch to 12 char/inch
\027(%$2\027[4y\027[?0\032K\027[0m set swiss font (proportional)
\027[350\032C select character size, unit=0.01 mm, see abov

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.

8.3. Format file Postscript

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 493 / 7399


NAPA for Design Manuals 2016.3

LINSIZ scalefont setfont } def


% default graphics font 5
/tb { /Times-Bold-ISOLatin1 findfont
LINSIZ scalefont setfont } def
% default graphics font 6
/hh { /Helvetica-ISOLatin1 findfont
LINSIZ scalefont setfont } def
% default graphics font 7
/hb { /Helvetica-Bold-ISOLatin1 findfont
LINSIZ scalefont setfont } def
% default graphics font 8
/hi { /Helvetica-Oblique-ISOLatin1 findfont
LINSIZ scalefont setfont } def
% default graphics font 9
/where { /v exch def /u exch def } def cc
/sc { [/Pattern [/DeviceRGB]] setcolorspace } def
/lc { cc } def % default text font
/lb { cb } def % default bold font
/li { ci } def % default italic font
% define endcoding used
/Courier findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Courier-ISOLatin1 exch definefont pop
/Courier-Bold findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Courier-Bold-ISOLatin1 exch definefont pop
96-04-04
2
/Courier-Oblique findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Courier-Oblique-ISOLatin1 exch definefont pop
/Times-Roman findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Times-Roman-ISOLatin1 exch definefont pop
/Times-Bold findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall

Copyright © 1992 - 2016 NAPA. All rights reserved. 494 / 7399


NAPA for Design Manuals 2016.3

/Encoding ISOLatin1Encoding def


currentdict
end
/Times-Bold-ISOLatin1 exch definefont pop
/Times-Italic findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Times-Italic-ISOLatin1 exch definefont pop
/Helvetica findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Helvetica-ISOLatin1 exch definefont pop
/Helvetica-Bold findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Helvetica-Bold-ISOLatin1 exch definefont pop
/Helvetica-Oblique findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict

Copyright © 1992 - 2016 NAPA. All rights reserved. 495 / 7399


NAPA for Design Manuals 2016.3

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

/lc { hh } def % default text font


/lb { hb } def % default bold font
/li { hi } def % default italic font

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:

BoundingBox: extension of the drawing in Postscript units

Title: name of drawing or name given in the SEND command

Creator: sign of user + concern + yard (from inst. parameters)

CreationDate: date of output

The following commands define letter size format:

%%BeginFeature: *PageSize Letter


&lt;&lt;/DeferredMediaSelection true /PageSize [612 792]
%%EndFeature

8.4. Format file for PCL

/* PCL5 Graphic type 4, subtype 31


\027%-12345X /* language reset
/* \027E /* reset - if above command not valid
/* \027&k3G /* Line Termination CR=CR-LF LF=CR-LF
\027&l0E /* set top margin (lines)
\027&l0C /* vertical motion index 0 =no vert.
movement
\027*p0Y /* cursor to y=0 (upper edge)
\027(s0P /* fixed spacing 1=proportional
\027(s12H /* 12 char/inch
\027(s10V /* character height unit 1/72 inch
\027(s0S /* character style 0=upright, 1=italic
\027(s0B /* stroke weight 0=medium, 3=bold
-----------------------
\027E
\027%-12345X

For using proportional fonts, the font change is done with

Copyright © 1992 - 2016 NAPA. All rights reserved. 496 / 7399


NAPA for Design Manuals 2016.3

\027(s4T

For other fonts, test by changing the 4. In addition, the s0P command must be changed to s1P.

The following command defines letter size format:

@PJL SET PAPER = LETTER

8.5. Test print

In order to make it easier to manage the options regarding the formatting of printer output, a test print function is available, started by

!PRINT TEST name

The result is a page showing the following properties:

definition in the installation parameters


parameters from the format file
sample of italic and bold text
sample of the character set
The rest is filled with numbers showing the extent and placement of the text.
A format file in the editor work area is used even if it is not stored.

9. Creating text fonts (task DFN/DEF)


New text fonts can be created by defining the symbols as curves.

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 &amp;
&amp;D=0.14 ** spacing
DFN
EL
HEI 1
SPA 1
SYM A (A,A0) (A1,A2) &amp;(1.56+D)
SYM B (B,B0,B00) (B1,B2) &amp;(1.35+1.1*D)
SYM C C &amp;(1.27+1.1*D)
SYM D (D,D0) (D1,D2) &amp;(1.34+1.2*D)
SYM E E &amp;(1.12+1.4*D)
SYM F F &amp;(1.06+1.2*D)
SYM G G &amp;(1.28+1.2*D)
SYM H H &amp;(1.26+1.4*D)

Copyright © 1992 - 2016 NAPA. All rights reserved. 497 / 7399


NAPA for Design Manuals 2016.3

SYM I I &amp;(0.30+1.4*D)
SYM J J &amp;(1.00+1.2*D)
SYM L L &amp;(1.02+D)
SYM M M &amp;(1.68+1.4*D)
SYM N N &amp;(1.40+1.4*D)
SYM O (O,O0) (O1,O2) &amp;(1.36+1.4*D)
SYM P (P,P0) (P1,P2) &amp;(1.21+1.2*D)
SYM Q (Q,Q0) (Q1,Q2) &amp;(1.47+D)
SYM R (R,R0) (R1,R2) &amp;(1.20+1.2*D)
SYM K K &amp;(1.27+D)
SYM S S &amp;(1.22+1.2*D)
SYM T T &amp;(1.20+D)
SYM U U &amp;(1.23+1.4*D)
SYM V V &amp;(1.44+D)
SYM W W &amp;(2.10+D)
SYM X X &amp;(1.48+D)
SYM Y Y &amp;(1.44+D)
SYM Z Z &amp;(1.20+D)
SYM ] (A,A0,]0,]00) (A1,A2,]1,]2) &amp;(1.56+D)
SYM [ (A,A0,[1,[2) (A1,A2,[1,[2) &amp;(1.56+D)
SYM \ (\,\3,\1,\2) (\4,\5,\1,\2) &amp;(1.76+D)
sym 'a' (LA,LA0) (LA1,LA2) &amp;(0.93+1.2*D)
sym 'b' (LB,LB0) (LB1,LB2) &amp;(1.00+1.2*D)
sym 'c' LC &amp;(0.93+1.2*D)
sym 'd' (LD1,LD2) (LD1,LD2) &amp;(1.00+1.2*D)
sym 'e' (LE,LE0) (LE1,LE2) &amp;(0.93+1.2*D)
sym 'f' LF &amp;(0.65+D)
sym 'g' (LG,LG0) (LG1,LG2) &amp;(1.00+1.2*D)
sym 'h' LH &amp;(0.93+1.2*D)
sym 'i' (LI,LI0) &amp;(0.25+1.2*D)
sym 'j' (LJ,LJ0) &amp;(0.37+1.2*D)
sym 'k' LK &amp;(0.93+D)
sym 'l' LL &amp;(0.25+1.2*D)
sym 'm' LM &amp;(1.55+1.2*D)
sym 'n' LN &amp;(0.93+1.2*D)
sym 'o' (LO,LO0) (LO1,LO2) &amp;(1.00+1.2*D)
sym 'p' (LP,LP0) (LP1,LP2) &amp;(1.00+1.2*D)
sym 'q' (LQ,LQ0) (LQ1,LQ2) &amp;(1.00+1.2*D)
sym 'r' LR &amp;(0.85+D)
sym 's' LS &amp;(0.88+1.2*D)
sym 't' LT &amp;(0.84+D)
sym 'u' LU &amp;(1.00+1.2*D)
sym 'v' LV &amp;(1.12+D)
sym 'w' LW &amp;(1.54+D)
sym 'x' LX LX &amp;(1.00+D)
sym 'y' LY LY &amp;(1.00+D)
sym 'z' LZ LZ &amp;(0.85+D)
sym '{' (LA,LA0,L[1,L[2) (LA1,LA2,L[1,L[2) &amp;(0.93+1.2*D)
sym '}' (LA,LA0,L]1,L]2) (LA1,LA2,L]1,L]2) &amp;(0.93+1.2*D)
sym '|' (LO,LO0,L\1,L\2) (LO1,LO2,L\1,L\2) &amp;(1.00+D)
SYM '1' N1 &amp;(0.75+D)
SYM '2' N2 &amp;(1.10+D)
SYM '3' N3 &amp;(1.10+D)

Copyright © 1992 - 2016 NAPA. All rights reserved. 498 / 7399


NAPA for Design Manuals 2016.3

SYM '4' (N4,N40) (N41,N42) &amp;(1.10+D)


SYM '5' N5 &amp;(1.10+D)
SYM '6' (N6,N60) (N61,N62) &amp;(1.10+D)
SYM '7' N7 &amp;(1.10+D)
SYM '8' (N8,N80,N800) (N81,N82) &amp;(1.10+D)
SYM '9' (N9,N90) (N91,N92) &amp;(1.10+D)
SYM '0' (N0,N00) (N01,N02) &amp;(1.10+D)
SYM '/' KAUT
SYM '+' PLUS
SYM '-' VIIVA
SYM '(' SUL1
SYM ')' SUL2
SYM '.' PISTE
SYM ',' PILKKU
SYM '!' (HUUTO,HPISTE) &amp;(0.44+2*D)

Copyright © 1992 - 2016 NAPA. All rights reserved. 499 / 7399


NAPA for Design Manuals 2016.3

SYM '?' (KYSY,KYSYP) &amp;(1.05+2*D)


SYM '~' (LU LI0 DY0) &amp;(1.00+D)
OK

By using the same naming system, this definition can be used for other fonts almost as such.

10. Explanations to commands and error messages


The explanations to error messages and commands are created as ordinary texts by the editor. If the texts obey the name rules described below
and the storing takes place in the system database, the necessary additional processing is automatically done when storing.

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.

11. Command specifications

11.1. Installation parameters

ANDEV define alphanumeric device types

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.

ANDEV typeid type nchar nlines

typeid: symbol used for designating the type

type: 100*t+10*m+s, where:

m: main type, 0=undefined or terminals, 2=TANDBERG, 3=TEKTRONIX, 6=WYSE, 8=Motif,


9=VT200 or For printers 2=Postscript, 3=CANON/CaPSL, 5=HP driver 6=LN03, 9=MS
Windows printer.

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.

nchar: number of characters/line

nlines: number of lines/page

ANDEV, typeid, DEL

Copyright © 1992 - 2016 NAPA. All rights reserved. 500 / 7399


NAPA for Design Manuals 2016.3

This command deletes the given type.

ATTACH set default directory

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.

The attach can be temporarily changed with command !ATTACH.

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.

BATCHQ batch queues available

Defines what batch queues are available for starting batch runs. Entered as one string, with
different names separated by commas.

CONCERN name of concern

Defines larger context of the yard. Assigned empty if not relevant. The change will take effect
only after re-starting NAPA.

DATES set type of date representation

This parameter controls the way dates are represented in output functions. See also !EXPL
!DATE.

DATES type

type: type of date representation

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.

NS: date as YY-MM-DD, time as hh.mm.

LOCAL: local convention as registered by the operating system

LL: local convention, long form

E: dates: DD.MM YYYY, times HH:MM

US: dates: MM/DD/YY times HH:MMd d=a or p

DELETE delete terminal

The command deletes a terminal in the old format. In the new format, use command TERM; +
DELETE under table calculation.

DELETE, extid

extid: the external identifier of the terminal to be deleted.

Copyright © 1992 - 2016 NAPA. All rights reserved. 501 / 7399


NAPA for Design Manuals 2016.3

To delete a GRDEV or ANDEV see commands GRDEV and

ANDEV.

EXT set file name extension

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: the new extension, 2 or 3 characters.

EXT OFF

Make the extension undefined (the default 'db' is restored).

FFEED by spooler (obsolete)

This parameter has values YES or NO and tells whether the spooler forces the last page of a
list out by adding a formfeed.

FIG default data base unit for figures

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

dbunit: the data base unit, DB1 or DB4

FNTH heights of hardware fonts

This command concerns the heights of the hardware fonts registered for use under Xwindows.

FNTH h1 h2, ...

hi: height of the i:th font. The number of heights given imply the number of fonts available.

FORMAT select format for device declarations (obsolete)

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.

FORMAT NEW PERM

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.

GRDEV define graphic device types

Copyright © 1992 - 2016 NAPA. All rights reserved. 502 / 7399


NAPA for Design Manuals 2016.3

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

TYPE main type

type: main device type (=driver used)

1: TEKTRONIX

2: CALCOMP or device using a CALCOMP type driver, depending on library linked, y-axis
horizontal.

3: As 2, but y-axis vertical instead of horizontal.

4: HPGL plotter

5: Xwindows graphics

6: PostScript

7: links to other systems

8: CANON

9: MS Windows printer

10: Xwindows graphics/OpenGL

11: SB

13: REGIS graphics

14: graphics output with Phigs

15: DECwindows/Motif graphics

SUBT subtype

subtype: the subtype defines variations to the basic type. The following subtypes are defined for different
main types:

TEKTRONIX (main type 1):

1...9: TEKTRONIX 4010 type devices, 2=basic type, 4=TANDBERG 6=WYSE, 7=LN03 laser printer

10...19: 4114 and similar

20...29: colour terminals, 20=4107,4109, 21=4115,4125, 22=4691 (hardcopy)

CALCOMP (main types 2,3):

The subtype is primarily dependent on the type of CALCOMP library linked into the program
(fixed in a given program):

1...6: F77 based library, 4=colour device, >2=own dash function

>6: FTN based library. 11=drum plotter 6,8,11=device with input unit 1 cm,(others 0.25 cm)

HPGL (main type 4):

2: input unit m others mm

3: device requiring no handshaking to be set by the software

>4 device capable to do filling and dashing in hardware (almost all)

6,16,26: set paper size to be the same as u and v size (long plots)

Copyright © 1992 - 2016 NAPA. All rights reserved. 503 / 7399


NAPA for Design Manuals 2016.3

>10 HP-GL/2 plotters

>20 PCL plotters (HP-GL/2)

31-34 PCL printers black and white

>34 PCL printers color

>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)

Xwindows (main type 5):

On VMS: subtype<5 means UIS graphics. NOTE: releases older than 95.1 will always interpret 5
as UIS)

Postscript (main type 6):

>4: colour devices

Interfaces (main type 7)

6: SVG format

Canon, CaPSL driver (main type 8):

0: black and white, level I

1: black and white, level II

2: black and white, level III

3,4: black and white, level IV

5...9: colour (implies level 4) Subtypes 0...3 and 5 use the internally defined line widths.

>10 y-axis vertical instead of horizontal

REGIS driver (main type 13):

20: VT340 or other colour terminal

PHIGS (main type 14):

1: Suntool, indirect colour

2: Suntool, direct colour

41: VAXSTATION

211: VAXSTATION with DEC-windows

1000+i: (i as above): do not delete the window at exit from the task.

O other parameters

usize: size of drawing area in the horizontal direction

vsize: size of drawing area in the vertical direction

gintyp: graphic input capability, 0=none

1: builtin alternative (e.g. thumbwheels)

2: tablet

scpr: scaling/positioning default used in PLOT task:

1: each drawing drawn separately, scaled to the available size (usually defined for graphic
screens)

Copyright © 1992 - 2016 NAPA. All rights reserved. 504 / 7399


NAPA for Design Manuals 2016.3

2: automatic positioning using predefined scale (typically drum plotter or other paper device
with large drawing area)

3: each drawing separately, using predefined scale (other paper devices)

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)

GRDEV, typeid, DEL

This command deletes the given type.

LIST list installation parameters

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;

sel: (opt) selection of data, default general data

T: terminals

P: alphanum. device types (terminals,printers)

G: graphic device types

LST default data base unit for lists

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

dbunit: the data base unit, DB1 or DB4

LW allow abbreviation for LONG/WEB

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

MAXTIME maxtime of batch runs

NOTE: must be given within apostrophes.

OK finish

Exit from this function. If changes have been made, the changed parameters are written back
into the system data base.

ORIENTATION orientation of coordinate system

This command defines the default for the orientation of the coordinate system.

ORIENTATION ornt

ornt: orientation, alternatives:

R: righthanded (port side has positive y-coordinates)

Copyright © 1992 - 2016 NAPA. All rights reserved. 505 / 7399


NAPA for Design Manuals 2016.3

L: lefthanded (starboard side has positive y-coordinates)

PRDEV define printer types

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.

PRDIR directory for new project files

The command defines the directory where project file are placed when new projects are
created. It can be overridden by the environmental parameter NAPAPR.

PRFPASSW password for !PRF F

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.

PRGFILE name of program file

This command gives the name of the NAPA program file. This name is used when batch runs
are started.

PRINTER assumed printer

This command defines the default for printer to be used for paper output. It can be changed at
run time with the !PRINTER command.

RREG keeping run register

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

SKIP finish without updating

The command has the same effect as OK, but possible changes made are ignored.

TERM define terminals

The command enters data for terminals (including printers). When the terminal identifier is the
only parameter, the properties of the given terminal are listed.

TERM, extid, intid, aitype, prtype, grtype, config

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.

prtype: as above, but for usage as printer

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.

TILDE character replacing tilde

Copyright © 1992 - 2016 NAPA. All rights reserved. 506 / 7399


NAPA for Design Manuals 2016.3

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

char: character replacing tilde.

TIMEOUT timeout for license check

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

time: time in minutes (minimum 15), default=15

TRANSLATIONS activate translated explanations (obsolete)

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 rule for trims

It is defined whether trim by head is considered positive or or negative.

TRIMSIGN sign

sign: +1 or -1, sign of trim by head.

TTYPE default terminal type

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.

USER define user/list users

This command adds/modifies a user in the user register. Without parameters, the currently
defined users are listed.

USER id par des pswc

id: initials, max. 4 characters

par: string composed of one or several of the following options:

U: normally registered user

P: full professional

A: system administrator

G: use translated explanations as default

des: (opt) descriptive text, default=empty

pswc: (opt) password control, default=no change

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).

NPSW: as above, but force resetting of the password to PSW.

-: remove password

USER EDIT

Copyright © 1992 - 2016 NAPA. All rights reserved. 507 / 7399


NAPA for Design Manuals 2016.3

Enter definition of users to the editor work area

USER id DEL

Delete user.

USER SORT

Special case: sort according to 'id'. Similarly SORTS=according to status, SORTD=according


to description.

VARIABLE set variable flag (obsolete)

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.

YARD yard name

This command gives the yard name (used in list headers). The change will take effect only
after re-starting NAPA.

11.2. Quantity standard (task FORM)

CHECK -> and list quantity definitions

Enter the quantity check functions, where all quantity standard groups can be verified and
examined. More commands available in the subtask.

DELETE delete quantity or unit

DELETE, symb

symb: symbol of quantity

DELETE, UNIT symb

This form deletes a unit. The unit must not be in use (see LOC UNIT).

symb: symbol of the unit

DES display data for selected quantities

Data for given quantities are displayed in the form used for input.

For a description of the data displayed, see command QUANTITY.

DES, qnt, REC S SEL cri

qnt: either symbol of quantity, record number, record number range or ALL

REC: (opt) list by record numbers (in conn. with ALL)

S: (opt) Print only Short header text

SEL: (opt) List the source of the quantities with the identification according to the criteria given
below:

cri: selection criteria:

SEL Show selection criteria

NAPA quantities delivered by Napa Oy

PROJ quantities to be stored into PROJ*QUANTITIES* in DB1

USER quantities to be stored into USER*QUANTITIES* in DB2

Copyright © 1992 - 2016 NAPA. All rights reserved. 508 / 7399


NAPA for Design Manuals 2016.3

MOD quantities modified in the current session

NEW_P new quantities in PROJ*QUANTITIES*

MOD_P modified quantities in PROJ*QUANTITIES*

NEW_U new quantities in USER*QUANTITIES*

MOD_U modified quantities in USER*QUANTITIES*

DES UNIT symbol *

Print the definition of the given unit(s).

symbol: symbol of unit or ALL=all units

*: opt: add the dimension, repeat for all units with the same dimension.

LIST compressed listing of the symbols

A list of symbols defined for quantities or units is given.

LIST UNITS

UNITS: (opt) list units instead of quantities

LOCATE search for quantity

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

string: string to be searched for. The wild-card character ~ is obeyed.

LOCATE UNIT unit

Lists all quantities using the given unit.

LT define long explanation

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

quant: quantity concerned

text: the explanation. If omitted, the current text is displayed.

LT quant DEL

Delete the long text for the given quantity.

OK exit from this function

QUANTITY define/update data for a given quantity

A new quantity is defined or the parameters of an existing one are updated.

QUAN, symb, recnr, unit, field, ndec, header1, header2

symb: symbol by which the quantity is identified

recnr: standard record number

n number for the quantity

Copyright © 1992 - 2016 NAPA. All rights reserved. 509 / 7399


NAPA for Design Manuals 2016.3

* select next free number from the upper end

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.

field: number of characters reserved for printing

ndec: number of decimals

header1: short header (max 12 char)

header2: long header (max 24 char). See also command LT.

REC update quantity spec. by recnr

The command is otherwise equivalent with QUANT, except that the quantity is given by the
record number.

REC, recnr, symb, unit, field, ndec, header1, header2

With this command, it is possible to change the symbol used. However care should be taken
that the symbols are uniquely defined.

SAVE save changes to data base

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

cri (opt) defines the criteria for quantities to be stored:

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*

SORT sort the quantities

This command sorts the quantities in alphabetic order. Sorting makes it faster to identify a
quantity.

SORT UNIT

UNIT: (opt) make the operation concern units, default=quantities

SUM define summing method

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.

SUM quant rule

quant: quantity concerned

rule: summing rule. If omitted, the current value is displayed.

D: (direct) normal sum

A: average

quant: weighted sum over the given quantity (for instance, volume to get center of gravity of
total volume)

MIN: minimum value

MAX: maximum value

N: (none) delete rule if stored

Copyright © 1992 - 2016 NAPA. All rights reserved. 510 / 7399


NAPA for Design Manuals 2016.3

TRL quantities to be rendered translitterated

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 ...

TRQ translating quantities

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:

TRQ PDES LDES

UNIT define unit

This command defines/redefines a unit (such as M, MM). The current definition is displayed by
command DES UNIT symbol;

UNIT symbol coeff lsymbol dim

symbol: symbol of the unit (used in commands)

coeff: coefficient by which the value in internal units is multiplied in order to give a value in the given
unit.

lsymbol: (opt) symbol to be used in listings. If undefined, 'symbol' is used.

dim: (opt) dimension: L+10*S+100*M+1000*A+10000*D+100000*C. L,S,M,A,D and C are the


exponents of the length, time, mass, angle, money and temperature components. Negative
exponents are represented by 10+e (e.g. -1 -> 9). May be undefined. Allows checks of correct
usage of units, e.g. not a weight unit where a length unit is needed.

EXAMPLE
UNIT MM 1000.0 'mm' 1
UNIT RAD*M 1.0 'rad*m' 1001

11.3. Definition of fonts

HEIGTH nominal height

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

OK finish and store

SKIP finish without storing

SPACING spacing between characters

Copyright © 1992 - 2016 NAPA. All rights reserved. 511 / 7399


NAPA for Design Manuals 2016.3

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 define symbol

This command defines an individual symbol.

SYMBOL id c1 c2 sp

id: identifier of the symbol

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)

TYPE type of font

This command defines whether the symbols are defined with thickness or not.

TYPE type

type: either

L: line (no thickness) (default)

B: bar (with thickness)

Copyright © 1992 - 2016 NAPA. All rights reserved. 512 / 7399


NAPA for Design Manuals 2016.3

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

1.1. Why 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.

1.2. Requirements for running the 64bit version of NAPA

The following computer requirements should be noted before taking the 64bit version into use:

64bit Windows Operating System


Windows 7, 64bit
Windows Vista 64bit
Exceed version 14

1.3. Handling project databases with 32/64bit program versions

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.

1.3.1. Requirement for mixed use

Copyright © 1992 - 2016 NAPA. All rights reserved. 513 / 7399


NAPA for Design Manuals 2016.3

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.

1.3.2. Macro to find projects which are not in UTF-8 format

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.

1.3.3. Opening a 32bit project with the 64bit version

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 514 / 7399


NAPA for Design Manuals 2016.3

1.3.4. Copying descriptions between 32 and 64bit project databases

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 515 / 7399


NAPA for Design Manuals 2016.3

Third Party Licenses


NAPA (hereinafter 'the product') may include parts of the following software or following software may be included in the distribution media of the
product.

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:

Cairo is licensed under the LGPL 2.1 license.

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 origin of this source code must not be misrepresented.


Altered versions must be plainly marked as such and must not be misrepresented as being the original source.
This Copyright notice may not be removed or altered from any source or altered source distribution.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 516 / 7399


NAPA for Design Manuals 2016.3

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:

version 1.2.2, October 3rd, 2004

Copyright © 1995-2004 Jean-loup Gailly and Mark Adler

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.

Jean-loup Gailly [email protected]

Mark Adler [email protected]

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

Copyright © 1999-2007 Norman Walsh


Copyright © 2003 J. Kosek
Copyright © 2004-2007 Steve Ball
Copyright © 2005-2008 The DocBook Project

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 517 / 7399


NAPA for Design Manuals 2016.3

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.

4.3. Contacting the author

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:

Cairo is licensed under the MPL 1.0.

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:

DOCBOOK-psmi is licensed under the LGPL license.

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:

EPPlus is licensed under the LGPL license.

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:

Json.NET is licensed under the MIT License.

8.1. The MIT License (MIT)

Copyright (c) 2007 James Newton-King

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 518 / 7399


NAPA for Design Manuals 2016.3

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:

Copyright (c) 2012 Terence Parr and Sam Harwell

All rights reserved.

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.

10. StringTemplate v3, v4 License


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:

[The BSD License]

Copyright (c) 2012 Terence Parr

All rights reserved.

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.

11. XMLmind XSL-FO Converter


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:

XMLmind XSL-FO Converter Copyright © 2002-2009 Pixware SARL

Copyright © 1992 - 2016 NAPA. All rights reserved. 519 / 7399


NAPA for Design Manuals 2016.3

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:

Xerces-C++ is licensed under the Apache License, Version 2.0.

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:

IronRuby is licensed under the Apache License, Version 2.0.

14. Pratt algorithm for circle fitting


The Pratt algorithm used for fitting circular arcs to point sets is ported to C# from a MatLab function licensed under the following license:

Copyright (c) 2009, Nikolai Chernov


All rights reserved.

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 University of Alabama at Birmingham 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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 520 / 7399


NAPA for Design Manuals 2016.3

15. Math.NET Numerics


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:

Copyright (c) 2002-2015 Math.NET

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 521 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 522 / 7399


NAPA for Design Manuals 2016.3

Project administration general


Table of Contents:

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.

2. Current project and version


All applications in NAPA require that there is a current project (= project file) available, and within it a version defined as the current version. With
standard commands, data can be fetched from another project if specially requested, but writing is always done to the current project.

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

Main Window: Project > New Project...

With the PROJECT command on the task level, an already existing project can be opened.

4. Storing of project data


For each project, two files are reserved. One is the main project database, into which all data of a permanent nature is stored. This means
above all such data that is directly given by the user (various definitions, macros, etc). In the second file, the auxiliary project database, data
generated by the system is stored. This data is less critical, because it can be regenerated any time by repeating the calculations. This data
frequently becomes obsolete anyway, for reasons such as changes of the hull form.

In the weight calculation task, one has the option to use a separate file for weight data, the so-called protected database.

Copyright © 1992 - 2016 NAPA. All rights reserved. 523 / 7399


NAPA for Design Manuals 2016.3

5. Information stored about a project


The following information is maintained in the system database about a project:

Name of the project file

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

User who created the


project (owner)

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).

This data can be listed and changed under task UPD/ADM.

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.

The reference system is presented in more detail in the Monitor Manual.

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.

8. Automatically started macros


When entering a project, it is checked whether a macro named PINIT*project is stored in the project database (version A) or in the system
database, and if found, the macro is run.

Similarly, a macro named VINIT*version is run when entering a version.

Copyright © 1992 - 2016 NAPA. All rights reserved. 524 / 7399


NAPA for Design Manuals 2016.3

9. Functions related to project administration


Operational instructions for the functions described below are found in Monitor Manual.

9.1. Functions under task ADM

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.

9.2. Functions under task TOC

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.

10. Entering a project with existing files


In order to introduce a project not registered but existing as files on a tape or other medium, a new project is created the normal way. The given
files can then be copied to the files created for the new project, or the latter can be deleted and the names registered in the system database
changed to the names of the given files (subtask UPD/ADM).

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.

11. User register

Copyright © 1992 - 2016 NAPA. All rights reserved. 525 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 526 / 7399


NAPA for Design Manuals 2016.3

Reference system (REF)


For every version of a project, there is the so-called reference system, providing background data and control of various functions.

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:

1. Purpose of the reference system


2. Overview of parameters
3. Most important parameters
4. Reference dimensions
4.1. Size of the ship
4.2. Description of parameters
4.3. States of the reference dimensions
4.4. Calculation of the reference dimensions
4.5. Listing the reference dimensions
4.6. Range for unlimited planes
5. Frame system
6. Names of key objects
6.1. Description of parameters
6.2. Installation defaults
6.3. Listing the names
7. Control and conventions
8. Background and identification
8.1. Description of parameters
8.2. Defining associated parameters
8.3. Standardization
9. Various parameters
10. Definition function (task REF)
10.1. Entering values
10.2. Listing data
10.3. Finishing commands
10.4. Accessing reference values
10.5. Effect of changes
10.6. Initial reference system
11. Model reference system
12. Storing of the reference system
13. Calculation accuracy
13.1. General
13.2. Accuracy Class (ACCL)
13.3. Default tolerances
14. Command specifications
15. Service functions related to the reference system

1. Purpose of the reference system


Depending on the piece of information concerned, the purpose is one or several of the following:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 527 / 7399


NAPA for Design Manuals 2016.3

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.

3. Most important parameters


The parameters of the reference system are of varying importance, and this section has been added in order to stress the importance of some of
them.

The reference parameters can be roughly divided into the following groups:

necessary parameters that require user attention


necessary parameters that are normally assigned useful values automatically
parameters that are optional or used under user control only

The following parameters are absolutely necessary.

AP, FP: fore and aft perpendiculars


LREF: reference length
BREF: reference breadth
TDWL: design draught
XREF: x-coord. of midpoint (where draught defined)

The following parameters are necessary for most calculations:

shell thickness (SHELL)


seawater density (RHO)

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.

The frame system is not strictly necessary, but it is normally used.

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.

4.1. Size of the ship

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).

4.2. Description of parameters

Copyright © 1992 - 2016 NAPA. All rights reserved. 528 / 7399


NAPA for Design Manuals 2016.3

Illustration of some reference dimensions

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

HMD height of main


deck

HSD subdivision
height

Copyright © 1992 - 2016 NAPA. All rights reserved. 529 / 7399


NAPA for Design Manuals 2016.3

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.

4.3. States of the reference dimensions

For the reference dimensions, the following states are recorded and shown in the listings:

undefined: possible only for some of the less important parameters


initial: the values assigned when creating the version, either default values or the values inquired
calculated: calculated from the hull geometry
given: directly defined.

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.

4.4. Calculation of the reference dimensions

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, FP, XMIN, XMAX, BREF, BMAX, XMID

while the following ones are calculated from those above:

LREF, XREF, LOA

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 530 / 7399


NAPA for Design Manuals 2016.3

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.

4.5. Listing the reference dimensions

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:

TDWL 5 design draught given


AP 0 aft perpendicular given (HULL/TDWL->0.12)
FP 100 fore perpendicular calculated HULL/TDWL
LREF 100 reference length calculated FP-AP
XREF 50 midship calculated (FP+AP)/2
XMID 50 largest frame calculated HULL/TDWL
XMIN -5 aft end calculated HULL
XMAX 108 fore end calculated HULL
LOA 113 length all over calculated XMAX-XMIN
BREF 20 reference breadth given (HULL/TDWL ->20)
BMAX 20 maximum breadth calculated HULL
KEEL 0.025 keel given
RHO 1.025 seawater density initial

4.6. Range for unlimited planes

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

where h is the larger one of bdwl or 4*tdwl.

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.

The format of the frame system definition is

Copyright © 1992 - 2016 NAPA. All rights reserved. 531 / 7399


NAPA for Design Manuals 2016.3

FRAMES x0 dx1 n1 dx2 n2 ...

where

x0: x-coordinate of frame 0

n1,n2...: frame numbers where the spacing changes

dx1,dx2...: frame spacing in the interval concerned

Example:

FRAMES 0 0.6 10 0.8 117 0.65

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).

6. Names of key objects


This group of parameters defines default names for geometric objects representing various features of the ship.

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.

6.1. Description of parameters

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 532 / 7399


NAPA for Design Manuals 2016.3

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

6.2. Installation defaults

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.

6.3. Listing the names

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.

Listing example (LIST N):

STRN STERN stern curve


STEM STEM stem curve
FRM FRM midship section missing
HLID HULL hull label
MOUL HULL moulded hull
HYDR STABHULL hydrostatic hull (HULL)
STAB STABHULL stability hull
DAMA DAMHULL damage hull
TONN TONHULL tonnage hull missing

7. Control and conventions


The parameters of this group control various functions or allow the redefinition of sign and other conventions.

Copyright © 1992 - 2016 NAPA. All rights reserved. 533 / 7399


NAPA for Design Manuals 2016.3

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.

8. Background and identification


This group contains information telling what ship is defined within the current project and version, including information about the owner and
classification society. All parameters are strings. None of these affects any present system function.

8.1. Description of parameters

SNAM: ship name


YDNR: yard number
OWNE: the initial owner
These parameters are intended for information in output documents and when archiving a project.
CLAS: classification authority
Anticipated use: selection of stability criteria.
FLAG: country of registration
Anticipated use: selection of stability criteria.
NAVA: navigation area
Anticipated use: selection of stability criteria.

Copyright © 1992 - 2016 NAPA. All rights reserved. 534 / 7399


NAPA for Design Manuals 2016.3

SHTY: ship type


Ship type (passenger, cargo, container, etc). Anticipated use: automatic choice of stability criteria, standards for weight calculation, for
information.
PRTY: type of propulsion machinery
Anticipated use: for information, weight calculation.

Listing example (LIST ID +; +=undefined also):

SNAM 'm/s Napaship' ship name


YDNR '1' yard number
OWNE '' owner
FLAG 'SF' country
CLAS 'LR' classification authority
NAVA '' navigation area
SHTY 'DEMO' ship type
PRTY 'M' propulsion engine type

8.2. Defining associated parameters

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'

the value of the function call REF('CLAS','EXPL') is 'Lloyd register'.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 535 / 7399


NAPA for Design Manuals 2016.3

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 following parameters are registered automatically:

NPA: number of passengers


PAYL: weight of payable cargo (tons)
VSS: service speed (m/s)
PBT: propulsion machinery power (kW)

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.

10. Definition function (task REF)


This section presents the functions under task REF.

10.1. Entering values

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.

10.2. Listing data

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:

DIM reference dimensions

FRAMES frame system(s)

NAMES names of key objects

CC conventions and control

ID background and identification

VAR various

ALL all

Command LIST GROUPS gives the list of groups.

With option VER=ver, the values of another version can be listed.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 536 / 7399


NAPA for Design Manuals 2016.3

A special command is provided for frames: FRTABLE produces a table of frame numbers and distances to frame 0.

10.3. Finishing commands

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.

10.4. Accessing reference values

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')

gives the total length.

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.

10.5. Effect of changes

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.

10.6. Initial reference system

When a new version is created, an initial reference system is created. Most parameters get default values, but the following ones are inquired:

LREF: reference length

BREF: reference breadth

TDWL: draught at the design water line

In addition, the frame spacing is inquired.

AP is set to zero as default, and LREF gives the value of FP.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 537 / 7399


NAPA for Design Manuals 2016.3

the main dimensions (as above) or copy the whole reference system.

When the system asks

Copy reference system from existing version?

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.

11. Model reference system


The properties of the initial reference system can be controlled by storing a model in the system database. Since there is no point in storing
ship-specific values in the model, the relevant groups are standard names, control and conventions and added parameters. In the last case, the
purpose is to provide a standard set of parameters, not their values, which should be zero or empty. Creating and modifying the model reference
system is done with the normal commands of the task REF, with the limitation that some functions are not available.

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

12. Storing of the reference system


The frame system is stored in a description named #SYSTEM, while the rest of the parameters are stored in a description named COM*DATA.

The model reference system is named COM*MODEL.

13. Calculation accuracy

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.

13.2. Accuracy Class (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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 538 / 7399


NAPA for Design Manuals 2016.3

3. Offshore – Best possible accuracy, possibly slower. Intended for offshore type structures.

The following tolerances are controlled with the Accuracy Class:

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:

WLS ON - Waterline Sections are switched on.


BMET Inertia - Balancing with the Inertia method.

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.

13.3. Default tolerances

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

GMTOL *(L+B) 5e-6 1e-6 1e-6 5e-4 *Bdwl

RACC 5e-3 1e-3 1e-4 1e-3

INTOL 1e-3 5e-4 2e-4 1e-3

BTOL GMTOL*10 GMTOL*10 GMTOL*10 1e-3

LTOL GMTOL GMTOL GMTOL 2e-3

Comparison of the new default tolerances in a ship with the main dimensions L=300m and B=40m.

Tolerance F A O 2009.2

GMTOL 0.0017 0.00034 0.00034 0.001

RACC 0.005 0.001 0.0001 0.001

INTOL 0.001 0.0005 0.0002 0.001

BTOL 0.017 0.0034 0.0034 0.001

LTOL 0.0017 0.00034 0.00034 0.002

14. Command specifications

ADD add parameter

This command adds a parameter to the group 'various'. The group can contain max. 140
parameters.

ADD n id value expl

n: (opt) index at which to add (see LIST VAR). Default = at end.

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.

value: value of the parameter

expl: explanation text. This text is optional if the parameter is registered as a quantity in the quantity
standard.

CALCULATE make parameter calculated

Copyright © 1992 - 2016 NAPA. All rights reserved. 539 / 7399


NAPA for Design Manuals 2016.3

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

id: identifier of the parameter to be made calculated

CANCEL cancel the changes made

The reference system is restored to the state at entry to the task.

COPY copy the reference system of another version

The current reference system is replaced by that of another version.

COPY ver

ver: version from which to copy

DELETE delete parameter

This command can only be applied to the group 'various', the content of which can be extended
or reduced.

DELETE id

id: identifier of the parameter to be deleted

EDIT -> enter editor

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.

END exit from the task

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.

FRT print frame table (old version)

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.

FRT, (#min, #max, step) X t-options

(#min #max step): series of frame numbers

X: (opt) show x-coordinates instead of distance to frame 0.

t-options: (opt) table output options, see !EXPL TOO/GEN.

LIST list data

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).

LIST sel VER=ver

Copyright © 1992 - 2016 NAPA. All rights reserved. 540 / 7399


NAPA for Design Manuals 2016.3

sel: (opt) selection of data, default=reference dimensions

ALL: all groups

group-id: given group

DIM: reference dimensions(default)


FRA: frame system(s)
NAMES: standard names
CC: control and conventions
ID: identification and background
VAR: various

G: list the groups and the group id:s

VER=ver: (opt) list from the given version

LIST FRT (#min, #max, step) t-options

This form prints a table showing the quantities selected by the current LQ command. The
alternatives quantities FRN (frame number), DFR (frame step)

FRT, (#min, #max, step) t-options

(#min #max step): series of frame numbers

t-options: (opt) table output options, see !EXPL TOO/GEN.

LIST FRT, (#Wmin, #Wmax, step) t-options

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.

LQ quantities for the frame table

This is the standard LQ command (subject=FRT), controlling the output of command FRT.

MODEL model reference system definition

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

Cancels model mode without storing.

MODEL UNSAVE

Delete the model system from the system data base.

NL open new list

This command opens a new result list, see !EXPL NL/GEN. Default for the list name is 'FRAME
TABLE'. Concerns the output from FRT.

Copyright © 1992 - 2016 NAPA. All rights reserved. 541 / 7399


NAPA for Design Manuals 2016.3

OK exit from the task

The changes made are written to the data base. Same as END.

RANGE define geometry range

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 xmin xmax ymin ymax zmin zmax

RANGE;

Show the current values.

RANGE OFF;

Reset RANGE back to default values.

SKIP exit without storing changes

Exit from the task without storing changes.

TOO table output options for the frame table

This is the standard TOO command (subject=FRT), controlling the output of command FRT.

UI update installation parameters

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.

UPDATE recalculate values dependent on the geometry

This command concerns those reference dimensions that can be calculated from the ship
geometry, and do not have the state 'given'.

15. Service functions related to the reference system


Primarily for supporting the graphical user interface, the reference system can also be handled with the service functions listed below.

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.

Reference system parameters

AD.REFSYSTEM() get reference system description

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.

AD.ASGREFSYSTEM() assign new reference system

The function replaces the current reference system with the one provided as parameter.

AD.ASGREFSYSTEM(descr)

Copyright © 1992 - 2016 NAPA. All rights reserved. 542 / 7399


NAPA for Design Manuals 2016.3

descr: reference number of the reference system

AD.REFVALUE() value from the reference system

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.

source: (opt) source reference system, default=current.

AD.REFVALUE('ALL',source,receiver)

This form gets all values at a time to a given description.

source: (opt) as above

receiver: description for receiving the result. Previous contents are removed. The following records are
created:

1: name of the parameters

2: type, 2=real, 3=string

3: explanation of the parameters

4: value as string

5: group (integer), 1=dimensions, 3=standard names, 4=control and conventions,


5=identification and background, 6=various

6: definition value (string)

AD.ASGREFVALUE() assign value to reference system parameter

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'.

source: reference number of the reference system (from AD.REFSYSTEM)

value: new value as string or real, special case *: make the parameter calculated.

expl: (opt) explanation text for a new parameter.

AD.UPDREFSYSTEM() update calculated reference system parameters

The function updates those parameters of the reference system that are defined by calculation
from geometry or other parameters.

AD.UPDREFSYSTEM(descr,opt)

descr: reference number of the reference system (from AD.REFSYSTEM)

opt: options

C: make all parameters calculated that can be so

G: update also parameters derived from the geometry, default=update only those dependent
on other parameters

AD.REFRANGE() handle RANGE parameter of the reference system

Copyright © 1992 - 2016 NAPA. All rights reserved. 543 / 7399


NAPA for Design Manuals 2016.3

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.

descr: description containing the reference system, as obtained with AD.REFSYSTEM.

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.

descr: description containing the reference system.

arr: real array contain the six values

AD.REF() return/add value to the reference system

The funtion returns the value of a reference system parameter and optionally adds if originally
undefined.

value=AD.REF(id,default,expl)

id: identifier of the parameter, max 4 char.

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')

Return the value of 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')

As above, but if undefined, record the value in the reference system.

Frame systems

AD.FRAMESYSTEMS() get description of 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)

vers: (opt) version

AD.ASGFRSYSTEMS() take frame system definition into use

The function stores the given frame system description for use by the current version and
makes the definitions active at run time.

Copyright © 1992 - 2016 NAPA. All rights reserved. 544 / 7399


NAPA for Design Manuals 2016.3

AD.ASGFRSYSTEMS(descr)

descr: description as obtained by AD.FRAMESYSTEMS.

AD.GETFRSYSTEM() get definition of frame system.

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)

descr: source description as obtained by AD.FRAMESYSTEMS.

type: frame system concerned, either FRAME, WEB, LONG or VERT.

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.

ref: 0=not available, else record containing the definition.

type: as above

AD.REPFRSYSTEM() replace definition of frame system.

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)

descr: source description as obtained by AD.FRAMESYSTEMS.

type: frame system concerned, either FRAME, WEB, LONG or VERT.

rec: record (real) containing the definition, a set of reals as in the FRAMES command under REF).

C: (opt) 0=normal case (default), 1=webs defined by frame numbers

Copyright © 1992 - 2016 NAPA. All rights reserved. 545 / 7399


NAPA for Design Manuals 2016.3

Legacy Text Editor

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.

In the following cases, the work area is erased:

a new text is initiated (command NEW)


a text is copied into the work area (command GET)
when changing a project or a version
the Editor is re-entered with a text name given in the ED command

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.

3. Editing text in the work area


The lines of text are always numbered and ordered so that the line numbers are increasing. However, the line numbers need not be contiguous.

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:

100 This is the first line


110 this is the second line

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.

Other editing commands are

CHANGE replace given characters by others

DELETE delete lines

MOVE move lines inside the text

DUPLICATE copy lines inside the text

Copyright © 1992 - 2016 NAPA. All rights reserved. 546 / 7399


NAPA for Design Manuals 2016.3

APPEND add text from another source

MERGE insert text from another source

Command LOCATE is useful for finding things in the current text.

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

P 100,200 print lines 100...200

P 200+ print from line 200 to the end

P +20 print 20 lines from the current one

P '!ADD' print the first line containing !ADD

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,...

4. Handling of various text sources


The Editor can use the following alternative places for storing and retrieving texts:

the project database


This is the default. Unless otherwise is specified, the current version is used. If the name given does not contain an asterisk, the prefix
DATA* is added before reading from the database. This prefix distinguishes macros from other database objects. See below for the
possibility to use additional prefixes for separating macros belonging to different subjects.
the database of another project
This is possible for reading only (command GET)
the system database

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.

Names referring to files under the operating system are entered as

Copyright © 1992 - 2016 NAPA. All rights reserved. 547 / 7399


NAPA for Design Manuals 2016.3

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

5. User-defined prefixes for macros


This section describes the use of a prefix as a tool for organizing macros. When there is a prefix active, it is automatically added in front of names
given in Editor commands and included as a selection criterion when doing catalogs. The effect is to make only macros with the current prefix
visible. Assuming, for example, that the current prefix is DA., then

GET RESULTS1

gets the macro DA. RESULTS1 (complete database name DATA*DA.RESULTS1) and

CATALOG

will list only macros named DA.xxxx while

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 548 / 7399


NAPA for Design Manuals 2016.3

would list the macro OPENINGS (from the project database).

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.

Note also the command DOC, by which formatting of documents is started.

The SCAN command makes catalogs or other operations on texts in a directory.

For more information, see command lists and explanations below.

8. Summary of Editor commands


Administration of texts

NEW create a new text

Copyright © 1992 - 2016 NAPA. All rights reserved. 549 / 7399


NAPA for Design Manuals 2016.3

GET get text

SAVE save text

REPLACE replace text

UNSAVE delete text

RENAME rename the text

SEND send text to the printer

ATTACH make directory or db-unit the default source

DOC output of documents

Modifying the work area

CHANGE replace strings

DELETE delete lines

MOVE move lines

DUPLICATE duplicate lines

RESEQUENCE resequence line numbers

APPEND append text to the work area

MERGE merge text into the work area

TRANSLATE translate

EVALUATE evaluate variables and expressions

NUMBER enter number mode

DIVIDE divide line

Listing and information

PRINT print lines

LAST print the last line

LOCATE locate string

CAT catalog

LIST list text

WHERE give name of current text

SCAN perform functions on files in a directory

functions related to system development

CMP compile

LOAD load programs

RLD generate library

PHANTOM start phantom

MDR update module register

MDL list data from a module register

MDA date administration of modules

Copyright © 1992 - 2016 NAPA. All rights reserved. 550 / 7399


NAPA for Design Manuals 2016.3

Various functions

BATCH start batch run

ETR (->) enter a subtask for updating translations

Exiting from the Editor

END exit from the Editor

OMIT exit from the Editor without replacing or saving

ADD run contents of work area as macro

9. Editor commands

ADD run contents of work area as macro

This command runs the lines in the editor as a macro. Before the commands are run, the editor
is exited.

ADD lines parameters S

lines: (opt) selection of lines, syntax as in PRINT, default=all

parameters: (opt) parameters for the macro

S: (opt) run the macro in step mode. Alternatives SS, SSS as in the !ADD command

EXAMPLE
ADD ('HULL')

Run the current work area, needing one string parameter.

APPEND append text to the work area

A text or part of it is inserted into the work area after the current contents.

APPEND name lines

name: name of text to be appended Alternatives as in command GET.

lines: (opt) selection of lines as in command PRINT

ATTACH make directory or db-unit the default source

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.

BATCH start napa batch

A napa run is started as a batch process using the current work area or a given text element as
input.

Copyright © 1992 - 2016 NAPA. All rights reserved. 551 / 7399


NAPA for Design Manuals 2016.3

BATCH input dir>prog options

input: source of input (optional, default is the work area)

text: name of a data element

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.

CAT ver sort n #

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.

ver: (opt) selection of version, default=current version, ALL=all

sort: (opt) * = sort alphabetically (otherwise acc. to date)

n: (opt) list only the first n names

#: (opt) list first line of each text (NAPA texts only)

CAT options GEN NP

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.

options: standard options for the catalog

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.

CHANGE replace strings

One or several occurrences of a given string are replaced with another.

CHANGE /string1/string2/lines R (col1,col2) Q NL

string1: string to be replaced. Special cases:

empty: beginning of the line

E$: the (assumed) spaces at the end of the line.

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.

string2: replacing string. Special cases:

~: will be replaced by the characters in original line, mathed by corresponding fill characters in
'string1'.

Q$: stands for the question mark

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'

Copyright © 1992 - 2016 NAPA. All rights reserved. 552 / 7399


NAPA for Design Manuals 2016.3

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.

Q: (opt) ask permission to change for each line separately

NL: (opt) (no list) do not list the changed lines

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

Change all occurrences of FR1 to FR1A.

C /FR1/FR1A/1,9999

Change the first occurrence of FR1 to FR1A on all lines.

C / /*/# (73,73)

Put an asterisk in column 73 on each line obtained in the preceding LOCATE.

C -/~, --A

Removes combinations such as '/0, ' or '/-, '.

C /~/L$/A

Changes the whole text to lower case.

C /E$/;/1,999

Adds a semicolon after each line.

CLIST list map of subroutine calls

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.

LIST CALLS dir mod level E S

(If a directory is attached, add a point after CALLS)

dir: directory concerned

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.

E: (opt) 'exclusive', do not list calls to modules outside the directory.

S: (opt) 'short' list only the modules occurring at end of the reference chains (or at the specified
level)

EXAMPLES
LIST CALLS LOAD LDA

Complete map of references from module LDA

LIST CALLS LOAD LDA 1

List modules directly referenced from LDA

Copyright © 1992 - 2016 NAPA. All rights reserved. 553 / 7399


NAPA for Design Manuals 2016.3

LIST CALLS LOAD LDA S

List modules upon which LDA is dependent.

LIST CALLS LOAD SM1 -99

Complete backwards map of modules referencing SM1.

LIST CALLS LOAD SM1 -1

List modules directly referencing SM1.

LIST CALLS LOAD SM1 -99 S

List modules dependent on SM1.

LIST CALLS LOAD ALL 1

List all 'top level' modules. Some modules may appear on top level because they are not used.

DELETE delete lines

This command deletes lines from the work area.

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).

!: (opt) do the operation without questions

DELETE, *

This command erases the alternate text.

DIVIDE divide line

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.

DIVIDE div line

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.

line: (opt) line number of line to be divided, default=current line.

Copyright © 1992 - 2016 NAPA. All rights reserved. 554 / 7399


NAPA for Design Manuals 2016.3

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:

Given text line:


XY STERN (12.5, 0.12) (20.8 1.323) (30.5 2.112) (39.5 3.013),
DIV 23),
XY STERN (12.5, 0.12) (20.8 1.323),
(30.5 2.112) (39.5 3.013),

DOC output of documents

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.

DOC text TO printer options

This form is used when the source text is in a file.

text: name of the text:

name: name of text in the project data base (no ATTACH given) or in the directory given by
ATTACH.

dir>file: file in the given directory

TO: optional delimiter before 'printer'

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)

L: list the result on the screen. Default if printer not given.

T: store the result in TEMP and spool it to the printer

N: store the result in TEMP, do not spool it

NF: (no figures) omit figures, but reserve the space. In HTML output, the effect is not generate
the picture files.

IF: (ignore figures) skip .FIG commands

TOC: only create table of contents

FTOC: (fast table of contents) as TOC, but omit all text processing (page numbers will be
incorrect)

NTOC: do not create table of contents

TOCF: write the table of contents before the text. The text will be processed twice (error
mesages may come twice)

IND: only create keword index (can be combined with TOC)

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.

DOC lines TO printer options

Copyright © 1992 - 2016 NAPA. All rights reserved. 555 / 7399


NAPA for Design Manuals 2016.3

This form is used when the source text is in the work area.

lines: (opt) lines selection

TO: delimiter before 'printer'

printer: (opt) as above

options: as above, in addition:

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.

DOC lines AS printer options

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.

DOC SYSDOC>USE TO PR1 N


As above, but the result is only a file in temp.

DUPLICATE duplicate lines

The command is otherwise equivalent with MOVE, but the given lines will not be erased.

see command MOVE

END exit from the editor

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.

ETR (->) enter subtask for updating translations

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.

EVALUATE evaluate variables and expressions

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 *

Copyright © 1992 - 2016 NAPA. All rights reserved. 556 / 7399


NAPA for Design Manuals 2016.3

lines: (opt) line selection as in other editor commands. Default=all lines.

*: (opt) save the initial lines as comments. In this case it is possible to repeat the evaluation with
new values of the variables.

GET get text

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: data element in the given version

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.

directory>name: a file in the given directory.

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 textid lines

As above, but restricting the lines fetched.

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

As above, but the text is read from version X.

GET SYSDOC>STEXT

The file STEXT is read from directory SYSDOC.

GET DB2>INIT*NN

The text INIT*NN is read from the system data base.

GET NOTES/TAB*PENCODES/SYSDB

GET *

This command restores a text rescued from overwriting, when

Examples assuming PREFIX DEF.:

Copyright © 1992 - 2016 NAPA. All rights reserved. 557 / 7399


NAPA for Design Manuals 2016.3

GET ROOMS

The macro DEF.ROOMS is read.

GET PLOTGM.BODYPLAN

The name PLOTGM.BODYPLAN is used as given (contains a point). entering the editor with
EDIT <curve> or similar.

HELP enter help subtask

KRM set kyrillic mode

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

mode: current representation of kyrillics:

L: latin translitteration (1)

T: coding system of TANDBERG (2)

K: kyrillic representation as used by the terminal

P: kyrillic representation as used by the current printer

F: coding system of FACIT (3)

I: NAPA internal representation (99)

LAST print the last line

LIST list text

A given text is listed without disturbing the work area.

LIST text lines

text: name of the text, alternatives as in GET

lines: (opt) line selection as in PRINT

EXAMPLES:
LIST LD-DATA

List the whole data element LD-DATA

LIST LD-DATA/A 1+12

List the first 13 lines of data element LD-DATA of version A.

LIST DM>DM10 TO '***'

List module text DM10 from the start to the line containing asterisks.

LOCATE locate string

Locate a given string in the text.

LOCATE string lines (c1,c2)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 558 / 7399


NAPA for Design Manuals 2016.3

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.

(c1,c2): (opt) restrict the search to columns c1...c2

MAP map of macro

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.

MERGE merge text into the work area

The command is otherwise the same as APPEND, but the the text will be inserted after the
current line.

see command APPEND

MODE set text/command mode (obsolete)

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 move lines

Given lines are moved within the text.

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 ... *

The lines will be taken from the alternate text

NEW create new text

This command creates a new, initially empty text in the work area. Previous contents of the
work area will be erased.

NEW name

name: name of the new text Alternatives as in GET.

NOTES add descriptive text

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.

NUMBER enter number mode

Copyright © 1992 - 2016 NAPA. All rights reserved. 559 / 7399


NAPA for Design Manuals 2016.3

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

n1: (opt) initial line number, default=after last line

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.

OMIT exit from the editor without replacing or saving

Same as command END, except that no warning about missing SAVE or REPLACE is given.
See command END.

PHANTOM start phantom

A phantom (separate process) is started using an existing command file.

PHA dir>file args

dir>: (opt) directory, default=TEMP

file: name of command file

args: (opt) argument to the phantom (PRIME only)

PHM start napa phantom

A napa run is started as a background process using the current work area or a given text
element as input.

PHM input dir>prog

input: source of input (optional, default is the work area)

text: name of a data element

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)

PREFIX set task specific prefix

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: the new prefix. It must end with a point.

PREFIX OFF

Cancels the prefix.

PREFIX AUTO ON/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

Sets the standard prefix, same as set in the automatic mode.

Copyright © 1992 - 2016 NAPA. All rights reserved. 560 / 7399


NAPA for Design Manuals 2016.3

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 print lines options

Specified lines of the work area will be printed on the screen.

PRINT, lines

lines: (opt) selection of lines to be printed, default=current line.

n1: print the given line

n1,n2: print lines n1 to n2

+n: print the next n lines

+: print the remaining lines

n1+n: print line n1 and the next n lines

TO,n: from current line to n

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).

N: omit line numbers

>: make control characters visible

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 *

The lines will be printed from the alternate text.

EXAMPLES:
P 12,30

Print lines 12 to 30

P +12

Print the next 12 lines.

P TO '***'

Print from the current line to the first line containing three asterisks.

P '.C2' '.C2' (1,3)

Print from the first line containing .C2 in columns 1...3 to the next one identified similarly.

RENAME rename the text

Copyright © 1992 - 2016 NAPA. All rights reserved. 561 / 7399


NAPA for Design Manuals 2016.3

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

newname: new name of the text, see command GET

REPLACE replace text

This command is otherwise equivalent with SAVE, but it must be used when an existing text is
overwritten.

parameters as in command SAVE, except:

REPLACE *

This command replaces the current text if any changes have been done, otherwise the
message REPLACE NOT NEEDED is given.

RESEQUENCE resequence line numbers

The numbering of the lines is changed by this command.

RESEQUENCE, n1,dn,*

n1: (opt) new line number of the first line, default 100

dn: (opt) increment, default n1, if n1<10, else 10

*: (opt) correct line numbers in @GOTO and @IF statements. This is done automatically if the
text begins with a comment line ** PROG.

As a result, the line numbers will be n1, n1+dn, n1+2*dn, ....

SAVE save text

The text in the work area will be stored. If a text with the given name already exists, the
command REPLACE must be used.

SAVE textname lines !

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.

!: (opt) save even if the text already exists

SCAN perform functions on files in a directory

Files are selected from a directory and some action is performed on each one of them.

SCAN directory function subset maxnr sort

directory: name of directory to be scanned or * = current directory (from ATTACH command)

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:

>xxx: only texts beginning with xxx

<xxx: only texts ending with xxx

=criterion: name criterion with wildcards

Copyright © 1992 - 2016 NAPA. All rights reserved. 562 / 7399


NAPA for Design Manuals 2016.3

dir>modlist: select only files listed in the module list The criteria above can be reversed by
adding a minus sign, e.g. ->xxx

>date: select files newer than given date (YYMMDD)

<date: select files older than given date

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

SCAN TEMP CAT =T*DXF

G1 CAT,LOC,SEL

The following alternatives are available for the function:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 563 / 7399


NAPA for Design Manuals 2016.3

SEND send text to the printer

The text in the work area or in a given file will be printed on paper.

SEND lines TO printer options

lines: (opt) selection of lines as in PRINT. Default=all lines.

TO printer: (opt) specifies printer, default=current printer

options:

N: omit line numbers

M: add margin (10 char)

M=n: add margin (n char)

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.

SEND directory>file TO printer

Send the given file in the given directory.

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.

SORT sort lines

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).

SORT lines options

lines: line selection as in other commands (A=all).

options:

I: ignore leading spaces

C: case insensitive

(c1,c2): restrict the sorting criterion to columns c1...c2

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.

lines: (opt) selection of lines, default=all

*: (opt) list only

TRANSLATE lines r1 r2

This form changes the representation of kyrillics between different coding systems or between
kyrillics and the sound-equivalent latin representation.

lines: (opt) as above

Copyright © 1992 - 2016 NAPA. All rights reserved. 564 / 7399


NAPA for Design Manuals 2016.3

r1: current representation of kyrillics:

L: latin translitteration

T: coding system of TANDBERG

F: coding system of FACIT

C: kyrillic representation of CANON

I: NAPA internal representation

r2: new representation, coded as above.

UNSAVE delete text

UNSAVE name

name: name of text to be deleted. The same alternatives as in the GET command can be used.

WHERE give name of current text

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 565 / 7399


NAPA for Design Manuals 2016.3

Database functions (TOC)


Table of Contents:

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:

preparing (formatting) files


making tables of contents
copying data between files
detecting and optionally deleting damaged descriptions
dumping descriptions in alphanumeric form
loading descriptions available in alphanumeric form
examining and changing files on word level

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

2.1. Preparing files

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.

2.2. Table of contents

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.

2.3. Copying between files

Copyright © 1992 - 2016 NAPA. All rights reserved. 566 / 7399


NAPA for Design Manuals 2016.3

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.

2.4. Reading and writing descriptions in ASCII format

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.

2.5. Mending files

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.

2.6. Removing obsolete data

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.

2.7. Description editor

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.

2.8. Inspecting and changing files on word level

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.

2.9. Progress indicator

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

@DB.INDICATOR('ON') always show

@DB.INDICATOR('OPT'): show if long operation

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
%.

3. Selecting the database unit


Files used are referred to as file units 1...7 as in other contexts. One of these is the current unit, and it is the object of most functions. Initially,
this will be the lowest unit available, but other units can be selected by the command UNIT. Thus, if a project is active, the default unit is 1 (project

Copyright © 1992 - 2016 NAPA. All rights reserved. 567 / 7399


NAPA for Design Manuals 2016.3

database), otherwise 2 (system database).

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.

The output from UNIT can look as follows:

Currently open database files


unit file name
* 1 /n/hw/nps12/d-star-k.db
2 /n/hw/nps12/sysdb WS
4 /n/hw/nps12/d-star-k.sd
7 /n/hw/nps12/napadb WS
current unit=1

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.

The following output example is obtained by

SELECT VER=A NAME>FR


CATALOG SB U

(show size in bytes, user)

Copyright © 1992 - 2016 NAPA. All rights reserved. 568 / 7399


NAPA for Design Manuals 2016.3

Name Date Time User Size


FRA 30.11.1993 18:11 960
FRA1 30.11.1993 18:11 912
FRA2 30.11.1993 18:11 924
FRA3 30.11.1993 18:11 1016
FRA4 30.11.1993 18:11 1212
FRA5 30.11.1993 18:11 1104
FRA6 30.11.1993 18:11 952
FRA7 30.11.1993 18:11 788
FRA8 18.5.1996 8:30 JVH 812
FRA9 29.10.1998 12:37 NAM 808
FRF 30.12.1993 13:02 972
FRF1 30.12.1993 15:05 1064
FRF2 30.12.1993 15:05 1116
FRF3 30.12.1993 15:05 1272
FRF4 30.12.1993 13:02 836
FRF5 30.12.1993 13:02 748
FRF6 30.12.1993 15:05 740

(Descriptions written with earlier releases than 95.1 do not have the user registered).

6. Copying descriptions

6.1. Copying between files

Transfer of descriptions between databases is done in the following steps:

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 569 / 7399


NAPA for Design Manuals 2016.3

UNIT 6
CAT

UNIT 1 (restore the original unit)

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.

6.2. Copying inside the current project

Data can be copied from one version to another within a given file. This is done in the following steps:

select the correct file unit


set the selection criterion. This should normally include a VER=... criterion.
check the selection if desired (CATALOG)
do the copying with COPY TO

As an example, all geometry in version A is copied to version B in the current project:

UNIT 1

SELECT VER=A TYPE=G

COPY TO B

The options D and K have the same meaning as in the preceding case.

7. Reading and writing the ASCII format


The purpose of the ASCII dump is to provide a machine independent format for NAPA data, allowing terms= transfer between machines/>transfer
between machines of different type. Creating file is done in the following steps

select the unit (UNIT)


assign a selection criterion if needed (SELECT)
give the DUMP command, for example

DUMP temp>p1234.dump

The file name in DUMP/LOAD can be given in form FILE='path'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 570 / 7399


NAPA for Design Manuals 2016.3

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).

The reverse operation is done with LOAD:

select the unit (UNIT)


enter the LOAD command, for example

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.

8. Common options in COPY and LOAD


In the COPY and LOAD operations, where descriptions are written into a database, the following options are available for improving safety.

E: do not overwrite existing descriptions


Y: do not overwrite a younger description

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.

Before the operation is carried out, the following information is displayed:

database units and file names involved


a possible selection criterion
version option if given

Based on this information, an opportunity is given to cancel the operation.

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.

9. Rescuing damaged files


Occasionally, a software or hardware error causes the database to be damaged. By this is meant that there are errors in the database structure
such as missing records or incorrect internal check numbers. The current solution when encountering a database error is to interrupt the run.

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.

10. Deleting descriptions


In most applications, there is the UNSAVE command by which objects belonging to the application, for example, geometric objects, loading
conditions can be deleted. The main reason for doing these deletions is to avoid possible confusion caused by objects having no purpose or being
somehow inconsistent with other data.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 571 / 7399


NAPA for Design Manuals 2016.3

Under TOC, the following functions for deleting are available:

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.

11. Description editor


Individual descriptions can be listed and changed by commands available in a separate command environment accessed by the command DED.
Some main principles are described here; otherwise, see the command explanations.

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.

12. Specification of commands

CATALOG make table of contents

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.

U: show the user who last wrote the description

K: mark encrypted descriptions. K=description encrypted.

A: show access rights (of the current user): r=read, w=write, e=execute. Capital letter=from
explicit restriction.

B: suppress the description type

D: show deleted description (only), +D: show also deleted ones.

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.

STRIP: mark stripped geometric objects

TABLE: generate a table named TAB*CATALOG (not stored).

CATALOG prefix options

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 572 / 7399


NAPA for Design Manuals 2016.3

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 (.

options: options as explained by !EXPL CAT/GEN.

EXAMPLES
CATALOG

Start the short (old) catalog function.

CATALOG VER=A NAME>TAB* SB TAB

Use the general catalog function. Record the size in bytes and store the result in a table.

CATALOG 'LD*CON(' NAME

List loading conditions having LD in the name, e.g. LD*CON(LD100).

CHECK check data base structure

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 directory.

CHECK *

This form concerns descriptions.

*: (opt) more complete check (additional check of string records)

COMPARE compare with reference descriptions

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).

NOTE: only descriptions of the current version will be treated.

Differences found will be reported in the log:

Integers and strings are supposed to be exact, all differences shown.

The tolerance for reals is 0.01% of the abs. extreme in the record.

Absolute differences smaller than this tolerance are neglected.

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 '$ $ $'

COPY copy data base contents

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.

COPY FROM unit VER=version options

This form starts copying from another file.

Copyright © 1992 - 2016 NAPA. All rights reserved. 573 / 7399


NAPA for Design Manuals 2016.3

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

NL: do not list names of descriptions transferred

E: omit if a description with the same name exists

Y: omit if a description with the same name exists that has the same or younger date.

A: list also descriptions not copied because of the E or Y option

Q: ask for permission to copy for each description separately.

K: keep date and user as recorded in the origin. Default except when overwriting an existing
table or geometric object.

D: assign current date and user, reverse of K

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.

READ=sel: set reading rights, for alternatives see !EXP RIGHTS

WRITE=sel: set writing rights, for alternatives see !EXP RIGHTS

EXECUTE=sel: set execute rights, for alternatives see !EXP RIGHTS

COPY TO ver options

This command copies data within the current unit to a given version.

ver: receiving version.

options: as above NOTE: In this case, SELECT VER=v ... ; must usually be specified in order to make a
meaningful operation (not checked).

CRYPT change encryption

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

DBI -> enter word level inspection environment

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.

DED -> enter editing of descriptions

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.

DELETE delete descriptions

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 574 / 7399


NAPA for Design Manuals 2016.3

DELETE NOQUERY

NOQUERY: (opt) when given, the deleting takes place without asking for verification of each description
separately.

DUMP dump descriptions to text file

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.

DUMP receiver VERS=ver options

receiver: file to receive the result:

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)

VERS=ver: (opt) store descriptions as if belonging to this version,

default=the version recorded in the dump. NOTE: normally this option is reasonable only if a
single version has been dumped (SEL VER=...).

options: none or several of the following alternatives, entered as separate items:

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.

NL: do not list names of descriptions dumped

EXAMPLES
DUMP TEMP>T.DUMP
DUMP 'temp/t.dump'

Dump the selected contents to the given file.

DUMP FILE='temp/t.dump' VER=A NL

As above, but change version to A and do not list the transferred descriptions.

ENCODING change character encoding

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.

ENLARGE enlarge file

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

factor: enlargement factor (1<factor<3)

HEADER update file header

Copyright © 1992 - 2016 NAPA. All rights reserved. 575 / 7399


NAPA for Design Manuals 2016.3

the items given by the parameters are written into the file header

HEADER, project, version, identification;

INFO information about the file

the information stored in the file header is displayed

IOF prepare the intermediate file

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)

LOAD load description from text file

Descriptions stored as card images in a file (command DUMP) are read and written into the
current DB unit.

LOAD source VERS=ver options

source: file from which to 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 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:

NL: do not list names of descriptions loaded

E: omit if a description with the same name exists

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

A: list also descriptions not stored because of the E or Y option

S: omit descriptions not satisfying the criterion set by the SELECT command, default=ignore
SELECT.

O: use old format, see command DUMP.

Q: ask for permission to copy for each description separately.

K: keep date and user as recorded in the origin. Default except when overwriting an existing
table or geometric object.

D: assign current date and user, reverse of K

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)

LOAD TEMP>TTT.DUMP VER=A Y

Copyright © 1992 - 2016 NAPA. All rights reserved. 576 / 7399


NAPA for Design Manuals 2016.3

As above, but store the result under version A, omit if a description with same or younger date
exist.

LOAD TEMP>TTT.DUMP Y CHECK

List the contents of TTT.DUMP and report according to the Y option.

MAX maximum number of descriptions to select

This command restricts the number of descriptions treated in connection with functions
controlled by SELECT (CATALOG, CHECK, MEND, etc.)

MAX, n;

n: upper limit for the number of descriptions

MEND restore data base structure

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.

*: (opt) more complete check (int. struct. of string records also)

NQ: (opt) noquery - delete without asking for permission.

PREP prepare file

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.

PREP, unit PRO=project VER=version ID=id DIR=size FORM=format !

unit: file unit to be prepared

project, version, ident: (opt) information written in the file header

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.

format: (opt) binary format, U=unix, W=windows, default=current.

!: must be added if unit=1, 2 or 7

RIGHTS assign access rights

The command modifies the access rights of the currently selected set of descriptions.

RIGHTS READ=rgroups EXECUTE=egroups WRITE=wgroups NL

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).

EXECUTE=egroups: analogically for execute right

WRITE=wgroups: analogically for write right

Copyright © 1992 - 2016 NAPA. All rights reserved. 577 / 7399


NAPA for Design Manuals 2016.3

NL: (opt) omit listing of processed descriptions

EXAMPLE
SELECT TYPE=G
RIGHTS READ=NONE EXECUTE=ALL WRITE=NONE

RSC rescue file

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).

L: (opt) list names of selected descriptions

NQ: (opt) (no query): without this option, permission to continue is asked after the descriptions to be
saved have been selected.

SELECT select subset

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.

SELECT criterion options

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.

options: special selection options:

K: select only encrypted descriptions, -K: exclude encrypted ones

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 data elements with version=A.

SELECT, VER=(A,B,C), NAME>HULL -R

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, DATE>860101 TYPE=(1001...1004)

Select descriptions newer than the given date and with type in the given range (1001=curves,
1003=surface,1004=rooms).

SELECT NAME>DATA -VER=(A,B)

Select data elements from any version except A and B

SELECT TYPE=G USER=NN

Select geometry created by the user NN.

SORT define sorting

Copyright © 1992 - 2016 NAPA. All rights reserved. 578 / 7399


NAPA for Design Manuals 2016.3

The command specifies the order in which the descriptions are to be listed by the CATALOG
command. Default is no sorting.

SORT, sel

sel: sorting principle, default=alphabetically

D: sort according to ascending dates

N: sort according to descending dates

OFF: no sorting

TIDY remove descriptions

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.

See also command RSC.

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).

L: (opt) list names of selected descriptions

NQ: (opt) (no query): without this option, permission to continue is asked after the descriptions to be
saved are selected.

UNDELETE cancel deleting

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

UNIT select unit

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:

unit 1: the main project file (if a project is opened)


unit 2: the system data base
unit 4: the auxiliary project file (if a project is opened)
unit 7: the NAPA data base
units 3, 5 and 6 are free for other use, and can be
assigned with the *OPEN command.

When listing the open units, a file created in a foreign environment is marked: PC (INTEL), WS
(SUN. HP ao), VMS.

Copyright © 1992 - 2016 NAPA. All rights reserved. 579 / 7399


NAPA for Design Manuals 2016.3

WHERE tell current unit and file name

Copyright © 1992 - 2016 NAPA. All rights reserved. 580 / 7399


NAPA for Design Manuals 2016.3

Server Database (ServerDB)


Preface
Introducing the ServerDB Concept
How to install ServerDB?
Working with Server Project Type
Working with Server SYSDB Type
New/Modified Service Functions and Limitations
Release Note

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.

2. Introducing the ServerDB Concept

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.)

3. How to install ServerDB?


As mentioned above the recommended configuration is to deploy a separate master database server in the corporate intranet. Thus the
first step is to decide where to have the master and then install it with the installer available to be downloaded from NAPA Net. The next
step is to install the local database servers in each workstation intended to execute NAPA with serverProjects; the same installer as for
the master can be used. Successful installation will create a new local Windows Service called “NAPAServerDB”. Napa will then start

Copyright © 1992 - 2016 NAPA. All rights reserved. 581 / 7399


3.
NAPA for Design Manuals 2016.3

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.

Detailed installation instructions can be be found from here

4. Working with Server Project Type


a. Adding a new master server
NAPA can be connected to a master server by adding its name (URI) as one of the know master servers. This can be done
either from the Project Administration menu or from the New Project menu under the Project menu when creating a new project.
In order to add it from the administration menu
i. Go to NAPA main window and open 'Project'
ii. Select 'Project Administration.' This will open Project Administration dialog.
iii. In the Project Administration dialog, open the folder Remote Servers.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 582 / 7399


NAPA for Design Manuals 2016.3

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'

Copyright © 1992 - 2016 NAPA. All rights reserved. 583 / 7399


NAPA for Design Manuals 2016.3

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'

Copyright © 1992 - 2016 NAPA. All rights reserved. 584 / 7399


NAPA for Design Manuals 2016.3

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.

f. Changing the Master Server for a project

Changing the Master Server for a project can be done from the same user interface as Open Project.

Copyright © 1992 - 2016 NAPA. All rights reserved. 585 / 7399


NAPA for Design Manuals 2016.3

There are couple of situations when this might be useful:


i. If the project is local only you can change the Master Server URI to point to a Master Server.
ii. If the URI or the IP address of the Server that runs the Master Server has changed, you need to update the URI pointing
to the master. Note: The new Master Server URI provided to the command must be valid and the new master server
must already contain the project.
iii. If you want to change a Project so that it does not point to a Master Server, you can change it to be "Local Only".
g. Synchronization
Synchronization was already mentioned above when discussing opening a project from Master Server. The following lists the
commands available via Project/Synchronization submenu.

i. Project -> Synchronization -> Start Sync from Master


Selecting this retrieves all the descriptions of the currently open project that are in Master Server
(modified/deleted/added by other users) and updates/deletes/inserts them into Local Server. This operation is
done for all Server Project Types Databases opened at that moment and is done continuously by Napa once
you start it.
ii. Project -> Synchronization -> Stop Sync from Master
This option stops the synchronization from Master. This can be useful when there are several concurrent users
working with the same project and you wish to temporarily prevent any possible modifications entering your
local copy of the project data.
iii. Project -> Synchronization -> Start Sync into Master
This selection synchronizes all your local modifications (modified/inserted/deleted descriptions) in the Master
Server since the last time Sync Operation was performed. This operation is done for all Server Project
Databases opened at that moment and is done continuously by Napa once you start it.
iv. Project -> Synchronization -> Stop Sync into Master
This operation stops the synchronization to Master
v. Project -> Synchronization -> Show Log
This operation shows the log file, listing all synchronization operations done.

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.

5. Working with Server SYSDB Type


NAPA System database (SYSDB) can also be stored in master database server and thus synchronized as up to date local copies in the
client computers. Unfortunately this is a bit more complicated than sharing the ship projects. Due to backward compatibility, also a binary
version of the system database is still required. NAPA uses it for both maintaining a so called run-registry as well as for certain internal
book keeping purposes. A further requirement in this setup is that the network location of the master server containing the sysdb and the
binary sysdb has to be the same NAPA would still require binary sysdb to be present at the same location as mentioned in the floating
license (see example of such a configuration in figure below). Note that, as mentioned, the binary database is needed for book keeping
only; all the relevant SYSDB data and macros etc. will be accessed via the database server and thus there is no requirement to somehow
keep the server sysdb and binary sysdb synchronized.

Copyright © 1992 - 2016 NAPA. All rights reserved. 586 / 7399


NAPA for Design Manuals 2016.3

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.

6. New/Modified Service Functions and Limitations

Functions that are not valid for Server Project Types* Modified Functions New Functions**

DB.BUFFER NEWPROJECT MN.COPYPROJECTTOSERVER

Copyright © 1992 - 2016 NAPA. All rights reserved. 587 / 7399


NAPA for Design Manuals 2016.3

ADM -> UPD -> CHECK ADM->UPD->REN MN.COPYPROJECTTOBINARY

ADM -> UPD -> ENLARGE MN.SETMASTERSERVERURI

MN.GETSYNCSTATUS

* The Server Database Type doesn’t need these functions any more

** Please check the explanation text for more details.

Release Note

ServerDB works only with x64 bit NAPA.


Any suggestions are most welcome. Please report it to customer service.

Copyright © 1992 - 2016 NAPA. All rights reserved. 588 / 7399


NAPA for Design Manuals 2016.3

How to start using ServerDB

This tutorial will give you step step by instructions on how to start using ServerDB.

Step-by-step guide to Master Installation


Step-by-step guide to Local Installation and Usage
Related articles

Step-by-step guide to Master Installation

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.

Step-by-step guide to Local Installation and Usage

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 589 / 7399


NAPA for Design Manuals 2016.3

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. Enter project name you want it to be as in the Local Server


d. Select Server. This means selecting the master server, if you do not have it then you can enter the full name of the master server
and press enter.
e. Click on Convert and wait for a while till you get a message the Files have being converted successfully.
3. Open a ServerDB project
a. Project -> Open project
b. Select Local Server as shown in the image

Copyright © 1992 - 2016 NAPA. All rights reserved. 590 / 7399


NAPA for Design Manuals 2016.3

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

c. Now close the window


d. Click Project -> Open Project and select Remote servers. You should see the Master server you added.
e. Click the Master server you want to connect to and select the project you want to open

Copyright © 1992 - 2016 NAPA. All rights reserved. 591 / 7399


NAPA for Design Manuals 2016.3

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

b. When you want to send changes to master server


i. Click Project -> Synchronization -> Start Synching into Master (image above)
6. Create a new ServerDB project
a. Project -> New project

Copyright © 1992 - 2016 NAPA. All rights reserved. 592 / 7399


NAPA for Design Manuals 2016.3

b. Select where your Master Server is located.


c. If you want the project to be local only then select "<< local only >>"
d. If you do not have the master server listed then you can start editing the box and enter your master server address or name and
press enter
e. After filling all other required details press Create

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 593 / 7399


NAPA for Design Manuals 2016.3

Related articles

Content by label
There is no content with the specified labels

Copyright © 1992 - 2016 NAPA. All rights reserved. 594 / 7399


NAPA for Design Manuals 2016.3

Uninstall ServerDB
Its very simple to uninstall ServerDB

1. Un-install using the Installer (Recommended way)


a. Download the installer from NAPA Net and run ServerDBSetup.exe
b. If you have already installer ServerDB you should see the following screen
c.

d. Select uninstall and click Next


2. Un-install from Programs and Features
a. On opening Control Panel -> Programs and Features
b. You should find for NAPA ServerDB
c. Click Uninstall
d. Note: This only will stop the ServerDB service and deletes the service. For complete uninstall use the ServerDBSetup.exe, it can
be any version.

Copyright © 1992 - 2016 NAPA. All rights reserved. 595 / 7399


NAPA for Design Manuals 2016.3

General Tools and Functions

General Tools and Functions


General Service Functions and Events
Graphical user interface
User Profile
Calculator
Various general functions

Copyright © 1992 - 2016 NAPA. All rights reserved. 596 / 7399


NAPA for Design Manuals 2016.3

General Service Functions and Events


This chapter presents service functions and events related to general system functions. For graphics, table calculation and applications, see the
respective documents.

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.

1.1. Information related to the current run

MN.TASK() current task

The function value is the name of the current task, e.g. DEF, LD.

MN.TASKSTACK() list of active tasks

The function value is an array containing all active tasks, the current one at the highest index.

MN.CHGTASK() change task

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 597 / 7399


NAPA for Design Manuals 2016.3

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:

L: list the commands.

R: store the commands an an array returned as the function value. The array is reused at the
next call.

N: prevent running of INIT*task macros at entry to main tasks

EXAMPLES
@MN.CHGTASK('DR')

Change the current task to DR

@CMNDS=MN.CHGTASK('DEF',0,'R')

Store the commands in the array CMNDS

MN.ENV() value of environmental variable

MN.ENV(name,opt)

name: name of the variable

opt: (optional) S=silent, no error message if environmental variable undefined.

MN.ATTACH() current source set for the editor

The value is the db/directory set with the editor command ATTACH.

MN.EDITORWA() file/element name of the current editor

The file/element name of the current editor area is returned as in the output from WHERE.

MN.CD() return/change current directory

The function concerns the current directory, i.e. the implied path when relative file names are
given.

dir=MN.CD()

Return the current directory.

stat=MN.CD(dir)

Change the current directory.

stat: 0=failure, 1=success

dir: name of directory

1.2. Project administration

MN.VERSIONS() list of versions or version properties

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 598 / 7399


NAPA for Design Manuals 2016.3

sel: (opt) selection, default=ID

ID: name of version

ID+: as D, but mark the default version by adding '(default)'

DATE: date of creation

OWNER: owners

DES: description

STAT: state 1=public, 2=controlled, 3=private, 10+i=read only.

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.

MN.VERSION() current version

The function returns the current version, properties of the current version or properties of a
given version (in the current project).

MN.VERSION()

Return the current version.

MN.VERSION(aspect)

Return the given aspect of the current version.

aspect:

ID: identification

DES: descriptive text

OWNER: owner

DATE: date of creation (internal form)

FDATE: date of creation (formatted as from function FDATE)

STATUS: status: PUBLIC, PRIVATE or CONTROLLED

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

MN.PROJECT() current project

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)

Return the given property of the current project or given project.

Copyright © 1992 - 2016 NAPA. All rights reserved. 599 / 7399


NAPA for Design Manuals 2016.3

aspect:

ID: the name of the project

DES: description

VER: default version

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.

EXT; file extension (db or db64)

FDATE: date of creation (formatted as from function FDATE)

DATE: date of creation (internal)

STATUS: status, PUBLIC or PRIVATE

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() properties of projects

The function returns properties of a set of projects.

MN.PROJECTS(options,projects)

options: list of property options

Q: status (0=inactive, 1=active, 450)

D: date (internal, 430)

Y: date (formatted, 420)

H: time (formatted, 421)

V: default version (1690)

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....

MN.PROJECTEXISTS() test existence of a project

The function returns 1 or 0 depending on whether the project exists or not.

@test=mn.projectexists(project,version)

Copyright © 1992 - 2016 NAPA. All rights reserved. 600 / 7399


NAPA for Design Manuals 2016.3

where

project: is the name of the project

version: is the id of a version (optional).

MN.NEWPROJECT() create project

The function creates a project and makes it the current project.

MN.NEWPROJECT(name,descr,status,dir,version,dim)

name: name of project

descr: description of the project (text)

status: project status PUBLIC (same as empty), PRIVATE or CONTROLLED

dir: directory where to create the project, empty=use default rules

version: initial version

dim: array, dimensions for the initial version: lref, bdwl, tdwl, dx.

MN.PROJECTFROMFILE() create project when given file

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)

file: name of file (syntax acc. to current operating system)

project: (opt) name of project, default=acc. to the file.

opt: options

F: force, do even if one with the given name exists

S: silent, suppress messages to the log

R: register only, do not open the project

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() change project

The function changes the current project.

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).

version: (opt) version, default=default version

EXAMPLES
@MN.CHANGEPROJECT('P1234','B')

Change to project P1234, select version=B

@MN.CHANGEPROJECT('/napa/projects/p1234.db')

Open the project, the main project data base of which is the given file,

MN.CLOSEPROJECT() close the current project

Copyright © 1992 - 2016 NAPA. All rights reserved. 601 / 7399


NAPA for Design Manuals 2016.3

The current project is closed without opening a new one. The function can only be run on the
task level.

MN.DELETEPROJECT() delete project

A given project is deleted. The effect concerns the registration in the system data base and the
project files.

ok=MN.DELETEPROJECT(name,opt)

ok: 1=project deleted, 0=not

name: name of project

opt: options

F: force: delete even if there are problems with opening data base

MN.SELECT() select projects

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

list: string array for receiving the result (names of projects)

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

V: include also data for versions

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

I: record dates in the internal form, default=text form

D: return complete path names (directory included). Relevant when 'directory' given.

P: return project names, default when directory not given.

MN.SELECT(list,directory,table,opt)

Otherwise as above, but the selection of projects is already available in an array.

list: string array containing a list of projects.

EXAMPLES
@list=arr(3)
@mn.select('USER=NN','',list)
@mn.select('LA<060101','temp',list)

Copyright © 1992 - 2016 NAPA. All rights reserved. 602 / 7399


NAPA for Design Manuals 2016.3

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() create version

The function creates a new version and makes it current.

MN.NEWVERSION(name,descr,dim)

name: name of version

descr: description of the version (text)

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)

As above, but fetching the reference system from an existing version.

name: name of version

descr: description of the version (text)

rvers: version (in the current project) from which the the reference system and frame system are
copied.

MN.CHANGEVERSION() set current version

MN.CHANGEVERSION(name)

name: name of the new version.The version must exist.

MN.DEFAULTVERSION() set/inquire the default version of the project

MN.DEFAULTVERSION()

The function value is the current default version.

MN.DEFAULTVERSION(vers)

This form changes the default version.

vers: name of version (must exist)

MN.DEFAULTDIR() default directory for new projects

The functions returns the directory into which new projects are created by default.

MN.PRFLAG() change-of-project flag

The function returns an integer that is increased by one each time the project is changed or the
project is closed.

MN.ADMDES() create, modify administration description

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)

This form creates the project description.

Copyright © 1992 - 2016 NAPA. All rights reserved. 603 / 7399


NAPA for Design Manuals 2016.3

admdes: pointer to description for receiving the result. Previous contents erased.

project: name of project

description: description of the project (text)

version: default version

status: (opt) status: PUBLIC or PRIVATE. Default=public.

MN.ADMDES(admdes,'V',version,description,status)

This form stores or updates data for a version.

V: option marking this case. Additional options:

F: force, accept even if there is no reference system as checked in the current unit 1 (NOTE!).

N: new version, reject the call if exist

U: update, reject the call if the version does not exist

version: name of the version

description: description of the version (text)

status: (opt) status: PUBLIC or PRIVATE. Default=public.

MN.ADMDES(admdes,'FILE',file)

This form records the file name.

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.

1.3. Run-time error functions

MN.ERR() return the error category

The function returns the category of the last error message after the previous
MN.CLEARERR() call.

@category=mn.err()

where

category: is the error category (output):

0: no error

1: notification

2: warning

3: error

4: fatal.

MN.XERR() return the max error category

The function returns the category of the most serious error message after the prvious
MN.CLEARERR() call.

Copyright © 1992 - 2016 NAPA. All rights reserved. 604 / 7399


NAPA for Design Manuals 2016.3

@category=mn.xerr()

where

category: is the error category (output, see MN.ERR()).

MN.ERRCODE() return the error code

The function returns the code of the last error message after the previous MN.CLEARERR()
call.

@code=mn.errcode()

where

code: is the error code (output).

MN.XERRCODE() return the max error code

The function returns the code of the most serious error message after the previous
MN.CLEARERR() call.

@code=mn.xerrcode()

where

code: is the error code (output).

MN.CLEARERR() clear the current error/release error events

The function clears the current error and/or releases the events related to error messages
(100021...100025).

@mn.clearerr()

Reset the error state and release all events.

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() invoke an error message

The function invokes a new error message.

@mn.seterr(category,code,string,end)

where

category: is the error category (see MN.ERR())

code: is the error code

string: is the error string (optional)

end: is the end condition (optional).

MN.NEWERR() invoke and pop up an error message

The function invokes and pops up a new error message.

@mn.newerr(wid,category,code,string,end)

where

wid: is the id of the widget from which to pop up the message

Copyright © 1992 - 2016 NAPA. All rights reserved. 605 / 7399


NAPA for Design Manuals 2016.3

category: is the error category (see MN.ERR())

code: is the error code

string: is the error string (optional)

end: is the end condition (optional).

MN.POPERR() pop up an error message

The function pops up the current error message.

@mn.poperr(wid,category,string,end)

where

wid: is the id of the widget from which to pop up the message

category: is the error category (0 = current, see MN.ERR())

string: is the error string (optional)

end: is the end condition (optional).

MN.SETCONTEXT() set context info for error messages

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)

text: the additional text, empty=remove the preceding setting.

MN.SETCONTEXT('-')

Same as empty=remove the preceding setting.

MN.SETCONTEXT('--')

Remove all such texts.

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('-')

If the given hull was missing, the message could be

Calculating speed: SPEEDHULL object missing (E1002)

MN.XERRMACROSTACK() return the macro stack.

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.

MN.XERRNATIVESTACK() return the macro stack.

The function returns the macro stack of the most serious error message after the previous
MN.CLEARERR() call.

Copyright © 1992 - 2016 NAPA. All rights reserved. 606 / 7399


NAPA for Design Manuals 2016.3

NOTE: available only in _DEBUG binnaries (Eg.: TNAPA - Test NAPA)

MN.XERRNATIVESTACK(receiver)

receiver: (opt) string record that will be populated with stack trace's lines.

1.4. Various

MN.COMMAND() run transparent command

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)

As above, but the command identifier is given separately.

id: command identifier. '!' is optional.

parameters: string containing the parameters.

MN.COMMAND(id,arr)

As above, but the parameters are fed by a string array.

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

MN.CONTROLEDIT() modify function of EDIT command

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)

c: 0=normal function, 1=generate result internally

MN.FETCHEDIT() get result of EDIT command

This function returns the reference number of the description created by an EDIT command
after setting MN.CONTROLEDIT(1).

MN.FETCHEDIT()

MN.FILES() return list of files in a directory

MN.FILES(directory,filter,receiver,opt)

directory: name of directory, as used by the operating system

filter: filter for selecting a subset. Empty=not used. Case insensitive (before 2006.1 case sensitive).

receiver: either

Copyright © 1992 - 2016 NAPA. All rights reserved. 607 / 7399


NAPA for Design Manuals 2016.3

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:

F: take files only

D: take directories only. Can be given together with F.

S: sort by name. If a receiver is given for types, the sorting is first by type, then by name

N: sort by date, newest first

T: the receiver is a table, just update the values. Default=remove original contents.

P: return the whole path, default=file name only

M: add f: before the result (convention applied in the manager)

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)

File names and dates are available in arrays filnam, fildat.

MN.GENEVENT() generate event

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,...)

id: name or number of the event

par1,par2,...: parameters, as specified for the event.

EXAMPLE
MN.GENEVENT('TP.CHANGE',0,4,3)

This triggers possible actions defined for changing a table element by input from the user.

MN.EVENTMASK() set/get event mask

Events can be masked with the function

oldm=MN.EVENTMASK(newm)

oldm: current event mask (output)

newm: new event mask (optional)

0: remove the mask

Copyright © 1992 - 2016 NAPA. All rights reserved. 608 / 7399


NAPA for Design Manuals 2016.3

-1: mask all events

ss: mask events of the specified subsystem

nnnnnn: mask the event with the specified id

MN.COMMANDS() list of commands from explanation group

The function returns the same information as !COM in a record or description.

MN.COMMANDS(group,receiver,options,len)

group: explanation group (=source text)

&xxx: command explanations of group &xxx

ss.: service functions of subsystem 'ss'

ss*: events of subsystem 'ss'

ss_: help texts of subsystem 'ss'

ss-: quantities of subsystem 'ss'

C.: calculator functions

B.: NAPA BASIC commands

receiver: (opt) refnr of record or description, default=output on listclass 4.

options: A=add to the contents of 'receiver', default=replace

len: (opt) line length, default=as currently defined (listclass 5 if receiver given)

MN.EXPLAIN() explanation of command, function or a help text

The function returns the same information as !EXPLAIN in a record or description.

MN.EXPLAIN(group.id,receiver,options,len)

group.id: name of command or function, preceded by the group id

&xxx.id: explanation of command 'id' in group &xxx

ss.id: service function 'id' of subsystem 'ss'

ss*id: event 'id' of subsystem 'ss'

ss_id: help text 'id' of subsystem 'ss'

ss-id: quantity 'id' of subsystem 'ss'

C.id: calculator function

B.id NAPA BASIC command

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.

receiver: (opt) refnr of record or description, default=output on listclass 4.

options:

A: add to the contents of 'receiver', default=replace

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() parameters of command, function or a help text

Copyright © 1992 - 2016 NAPA. All rights reserved. 609 / 7399


NAPA for Design Manuals 2016.3

The function returns the same information as !PARAMETERS in a record or description.

MN.PARAMETERS(group.id,receiver,options,len)

group.id: name of command or function, preceded by the group id

&xxx.id: explanation of command 'id' in group &xxx

ss.id: service function 'id' of subsystem 'ss'

ss*id: event 'id' of subsystem 'ss'

ss_id: help text 'id' of subsystem 'ss'

ss-id: quantity 'id' of subsystem 'ss'

C.id: calculator function

B.id NAPA BASIC command

receiver: (opt) refnr of record or description, default=output on listclass 4.

options:

A: add to the contents of 'receiver', default=replace

C: the item should be a calculator function or NAPA BASIC command, C. or B. implied if 'group'
omitted.

S: single, return the first line as the function value

len: (opt) line length, default=as currently defined (listclass 5 if receiver given)

MN.ERRTEXT() return text associated with error number

text=MN.ERRTEXT(nr)

This form returns the short error text as the function value.

nr: error number

MN.ERRTEXT(nr,rec)

This form returns the complete error text in a record or description.

nr: error number

rec: receiver, either string array or description

MN.ECHO() control data echo

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

The function makes a pause of given length.

MN.PAUSE(time)

time: length of pause in seconds

MN.PREPARETEXT() apply conventions for explanation text

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 610 / 7399


NAPA for Design Manuals 2016.3

errcode=MN.PREPARETEXT(name,text,unit)

The function value is 0=ok or error number.

name: name of the text

text: description containing the text

unit: destination unit (normally 7)

1.5. Program and user information

MN.PROGID() program identification

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.

MN.BUILDNR() build number of 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

MN.PROGDT() linking date

The function value is the linking date of the current program (internal representation).

Example
!TYPE Program date @fdate(mn.progdt())

MN.RUNID() current runid

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()

Returns the short customer id.

MN.CUSTID(1)

Returns the customer name.

MN.MACHID() machine identification

The function value is the machine identification as used in the license file.

MN.MACHID(address)

address: ip-address of the machine (optional, Windows NT only, default is local)

MN.RUNS() load data about current runs to a table

This function produces the same output as !LR but to table, i.e. data about currently registered
runs.

MN.RUNS(descr,options)

Copyright © 1992 - 2016 NAPA. All rights reserved. 611 / 7399


NAPA for Design Manuals 2016.3

descr: receiving description. For use as a table, its name and type must conform to table conventions,
see example.

options: (opt) on or several of

A: include entries marked as inactive

O: omit sorting: output as stored rather than sorted according to start date.

U: take only entries belonging to the current user

EXAMPLE
@D=DM.CREATE('TAB*RUNS',1970)
@MN,RUNS(D)
TAB; GET RUNS

MN.LASTNAPARUN() date of last NAPA run

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.

MN.USERID() return the initials of the current user

user=MN.USERID(opt)

opt: (opt) D=get description

MN.USERS() get/change data concerning users

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)

idarr: array for receiving/inputting names of users

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:

1: use data base unit 1 as storage place, similarly 2...6, default=2.

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.

U: update properties given in the arrays statarr,pswarr

D: delete the users listed in 'idarr'

EXAMPLES

Just get a list of users:

@idarr=arr(3)
@mn.users(idarr)

Copy users from the file unit 5 to the standard unit 2:

Copyright © 1992 - 2016 NAPA. All rights reserved. 612 / 7399


NAPA for Design Manuals 2016.3

@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')

MN.USERSTATUS() set/inquire the user status

status=MN.USERSTATUS()

status:

0: user without special rights

1: normal so-called professional user

2: so-called full professional user.

3: administrator. If there is no administrator defined in the installation, level 2 gives


administrator rights.

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.

status: either codes 0...2 as above or:

OFF: removes all special rights

ON: set normal professional user

F: sets full professional mode if there is no password set

psw: same as F when psw=the password set in the installation parameters

1.6. Printing. macros, lists

MN.PRINTER() tell name of printer

The function value is the name of the current printer.

MN.WPR() check Windows printer

The function checks whether the given printer is a supported Windows printer.

@test=MN.WPR(prn)

test: >0 if the printer is a Windows printer, otherwise 0 (output)

prn: name of the printer to test

MN.NEWLIST() open result list

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)

name: (opt) name of list, default=empty

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() send text to the printer

Copyright © 1992 - 2016 NAPA. All rights reserved. 613 / 7399


NAPA for Design Manuals 2016.3

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.

printer: (opt) name of printer, default=current printer

options: combination of

N: add line numbers

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')

The file 'testä in directory 'temp' is sent to the current printer.

@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.

MN.DOC() run the document processor

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.

printer: (opt) name of printer, default=current printer, -=to command window

options: (opt) DOC options, see !expl doc/m10.

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')

Run the document formatter for the file 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.

MN.GETLIST() get list to a description

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)

selection: selects the list

Copyright © 1992 - 2016 NAPA. All rights reserved. 614 / 7399


NAPA for Design Manuals 2016.3

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.

criterion: criterion as in SCAN.

options: (opt) options, as in the SAVE AS command, e.g. NH=no headers.

d=MN.GETLIST(name,options)

This form gets the list with the given name from the data base.

name: name of list including the prefix LIST*

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')

Get the last list of listclass 1 with option NH.

@D=MN.GETLIST('NAME=HYD')

Get the last list named HYD...

.AL @MN.GETLIST('NAME=HYD USER=NN','NH')

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')

Get the stored list HYD, actual list contents only.

MN.SENDLIST() send list

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)

selection: selects the list

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.

criterion: criterion as in SCAN.

options: (opt) options, as in the SEND command, e.g. TO printer.

EXAMPLES
@MN.SENDLIST(1)

Send the last list of listclass 1 to the current printer.

@MN.SENDLIST('NAME=HYD','TO P1 OVL=OVL-NAPA')

Send the last list named HYD... to the given printer and with an overlay.

MN.SAVELIST() save list in the data base

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.

ok=MN.SAVELIST(selection, name, options)

ok: 1=save successful, 0=not

Copyright © 1992 - 2016 NAPA. All rights reserved. 615 / 7399


NAPA for Design Manuals 2016.3

selection: selects the list

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.

criterion: criterion as in SCAN.

name: (opt) name of the result (without prefix). Default=the list name as recorded in the IOF.

options: (opt) options, as in the SAVE AS command, e.g. NHD, NPB.

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

MN.LICENSE() license related inquiries

The function provides information about the current license.

stat=MN.LICENSE()

Tests whether the number of users is exceeded, 0=ok, 1=not

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.

task: (opt), task, only ST, CL, GS, FEM supported.

n=MN.LICENSE('N')

Return number of free licenses. 9999=no restriction.

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.

MN.GETLICENSE() try to get license

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.

MN.UNREG() remove license from from another run

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 616 / 7399


NAPA for Design Manuals 2016.3

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.

MN.FEATURE() inquire availability or license expiration date of feature

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)

nr: feature number, see output of !USER MN900.

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

MN.RELEASE() tells the version of the program

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

MN*TASKENTER() enter task

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)

task: the name of the task entered.

MN*TASKEXIT() exit task

This event is raised at exit from a subtask. The action is run immediately (NAPA BASIC
commands only). (100002).

MN*TASKEXIT(task)

task: the name of the task from which exit is made.

MN*TASKRETURN() return from subtask

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)

task: the name of the task returned to. Task level=TASK.

MN*NEWPROMPT() change prompt

This event is raised when the prompt is changed. The action is run immediately (NAPA BASIC
commands only). (100004).

MN*NEWPROMPT(prompt)

prompt: the new prompt

MN*MAINTASKEXIT() exit to main task level

Copyright © 1992 - 2016 NAPA. All rights reserved. 617 / 7399


NAPA for Design Manuals 2016.3

This event is raised at exit to the main task level (100014). No parameters.

MN*EXITVERSION() exit version or project

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.

MN*EXITPROJECT() exit version or project

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() change project

This event is raised when changing the project (100005).

MN*OPENPROJECT(project, version)

project: name of the new project

version: name of the new version

MN*OPENVERSION() change version

This event is raised when changing the version (100006).

MN*OPENVERSION(version, project)

version: name of the new version

project: name of the current project

MN*RESET() reset system

This event is raised when resetting the system (100007). Its actions are executed immediately.

MN*RESET()

MN*EXIT() exit system

This event is raised when exiting the system (100008). Its actions are executed immediately.

MN*EXIT()

MN*NOLICENSE no license obtained when starting

No parameters. The action cannot contain NAPA commands.

MN*LOSELICENSE() license taken by another run

MN*LOSELICENSE(task)

task: MAIN=general license, else for given task

MN*GETLICENSE() license recovered

MN*LOSELICENSE(task)

task: MAIN=general license, else for given task

MN*PROGRESS() progress of task

This event gives progress information about the current task (100012).

Copyright © 1992 - 2016 NAPA. All rights reserved. 618 / 7399


NAPA for Design Manuals 2016.3

MN*PROGRESS(info)

info: progress (0 - 100 %) of the current task

MN*READY() task is ready

This event is raised when the task is ready (100013).

MN*READY()

MN*NOTICE() notice given

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

number: error number

info: text, additional info added to the message (not the text from db7)

date: date in the internal form as a string (NOTE!)

MN*WARNING() warning given

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

number: error number

info: text, additional info added to the message

date: date in the internal form as a string (NOTE!)

MN*ERROR() error given

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

number: error number

info: text, additional info added to the message

date: date in the internal form as a string (NOTE!)

MN*FATAL() system error occurred

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

number: error number

Copyright © 1992 - 2016 NAPA. All rights reserved. 619 / 7399


NAPA for Design Manuals 2016.3

info: text, additional info added to the message

date: date in the internal form as a string (NOTE!)

MN*ALARM() alarm given

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

number: error number

info: text, additional info added to the message

date: date in the internal form as a string (NOTE!)

3. Functions of group AD
This group contains various functions related to quantity standard, LQ, PQ, date handling, reference system.

3.1. Functions related to quantities and units

AD.FORMAT() formatting properties of a quantity

The function returns various properties of a quantity fetched from the quantity standard.

AD.FORMAT(qnt,property)

qnt: quantity, given symbol or record number

property: property to be returned:

FORM: format in the form f.d (real)

FS: format in the form f.d (string)

F: field length (f from f.d)

D: decimals (d from f.d)

U: unit

UO: unit, output form

DIM: dimension, integer

C: unit conversion factor, -1=frame number For integers, unit=INT and for strings CHAR.
Dimension and conversion factor are 0.

S: symbol

SH: short header

LH: long header

SUM: sum rule, empty=none

NR: record number

arr=AD.FORMAT('','?')

Return an array giving set of available properties. If needed permanently, make a copy of the
array.

Copyright © 1992 - 2016 NAPA. All rights reserved. 620 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
@f=FORMAT('VOLM','FORM')

AD.FMT() format a value

The function returns a given number formatted according to the quantity standard.

s=AD.FMT(value,qnt,opt)

value: given value

qnt: quantity

opt: (opt) options:

N: return a number. The only change to 'value' is unit conversion.

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"

AD.FORM() return record from the quantity standard

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)

record: record to be returned:

S: symbol

SH: short header

LH: long header

NR: record number

FORM: format in the form f.d

U: unit, index in records US,UC and UD (see below), -1=integer, -2=string quantity

US: list of units (symbols)

UC: coefficients for units in US

UD: dimension for units in US

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

AD.UNITS() list of units

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)

This form returns a list to the array containing all units.

type: (opt) 0=use the command form, 1=use the printing form (default)

n=AD.UNITS(arr,model,type)

Copyright © 1992 - 2016 NAPA. All rights reserved. 621 / 7399


NAPA for Design Manuals 2016.3

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.

3.2. Standard syntaxes

AD.VALUES() interprete value set syntax

The values corresponding to a syntax as defined in !EXPL VALUES/GEN are returned in an


array.

AD.VALUES(s,arr)

s: the syntax defining the values.

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)

3.3. Functions treating LQ,PQ,TOO,POO

AD.LQ() information about the current LQ

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)

subject: subject, as given in the LQ command, e.g. LQ HYD, ...

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.

aspect: type of data to return:

ALT: list of alternatives (symbols)

ALTE: list of alternatives (explanation texts).

Q: list of selected quantities (standard symbols)

P: printable (0) or non-printable (1) (integers)

NQ: numeric qualifiers (real or string)

SQ: string qualifiers

F: formulas

FORM: formats (real or string)

U: units

Copyright © 1992 - 2016 NAPA. All rights reserved. 622 / 7399


NAPA for Design Manuals 2016.3

S: symbols (as printed)

SH: short headers

LH: long headers

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.

FORM.S, U.S, S.S, SH.S, LH.S: status, 0=not given, 1=given.

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:

2: symbol of the quantity (as aspect D)


6: printability (P)
7: formulas (F)
11: numeric qualifiers (NQ)
12: string qualifiers (SQ)
13: symbols for printing (S)
14: short headers (SH)
15: long headers (LH)
16: formats (FORM, as strings)
17: units (U)

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, ...)

AD.PQ() information about the current PQ

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',...).

AD.TOO() return table output options

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, ...

Copyright © 1992 - 2016 NAPA. All rights reserved. 623 / 7399


NAPA for Design Manuals 2016.3

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')

Create backup copy, used with option RESTORE or REMOVE as in AD.LQ.

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)

subject: subject as given in the LQ command

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() update table output option

The value of a given table output option is changed.

AD.LOADTOO(subject,option,value,value2)

subject: TOO/LQ subject as in other similar functions

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.

ALL: all quantities

xx.PQ: as xx, but applying the current PQ

Example:
@STAT=AD.LOADTOO('SM','GROUP','PURP')
@STAT=AD.LOADTOO('CP',''RC','')

AD.POO() return plot output options

Copyright © 1992 - 2016 NAPA. All rights reserved. 624 / 7399


NAPA for Design Manuals 2016.3

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.

subject: as in the PQ,POO command, e.g. POO HYD ...

option: identifier of option (e.g. PEN), special cases:

ALL: all options (quantity specific), expressed as id=value

ALL-O: as ALL, but only identifier of option

ALL-V: as ALL, but only value of option See also 'array2'.

C: common options related to quantities. C-O, C-V as above.

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

set: set of options concerned:

ALL: all quantity specific options

ALL-A: as ALL, but common options transferred to the quantities.

M: only main options (SIZE, FIG etc)

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')

Create backup copy, used with option RESTORE or REMOVE as in AD.LQ.

AD.LOADPOO() assign plot output options

Copyright © 1992 - 2016 NAPA. All rights reserved. 625 / 7399


NAPA for Design Manuals 2016.3

The function assigns/updates plot output options.

AD.LOADPOO(subject,option,quantity,value-spec,opt)

subject: as in PQ,POO command, e.g. POO HYD ...

option: identifier of option, special cases:

ALL: all options (quantity specific). Implies replacement of preceding options.

quantity: quantity or category

name of quantity or ARG. The option concerns the specified quantity. May be given as F1, F2
(maintained in this form).

ALL: all quantities, value-spec must be a description.

C: common option (e.g. PEN, given without quantity specified)

M: main options (for whole diagram, e.g. SIZE, FRAME). Relevant if the source is a
description.

ALL+M: both quantity specific and main options.

value-spec: value(s) given in one of the following ways

value: string representing the value of the specified option (must be a specified option)

values: string containing options in the form id=value, needed if option=ALL

array: array containing strings of the form 'opt=val'

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).

descr: description in the form returned by AD.POO

opt: (opt) options for this function.

R: replace, remove all existing options for the quantity in question. Default if OPTION=ALL.

3.4. Check and information of data items

AD.CHECK() apply general check criterion

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
").

value: value to be checked

criterion: 'type/qual restriction /filter/ opt ERRNR=nr'

type: main data type: I=integer, R=real, S=string, ST=text string, T=time, D=date

/qual: qualifier:

G: geometric object or more specifically by C,S,R,SO,P.

T: a table

D: any description existing in the data base (main project db).

prefix*xxx: data base object with prefix separated by *. The optional xxx restricts the effect
further.

Copyright © 1992 - 2016 NAPA. All rights reserved. 626 / 7399


NAPA for Design Manuals 2016.3

prefix(): data base object with prefix separated by (

F: a file

:dir: a file from the given directory (first colon belongs to the syntax). This form supports
AD.ALTERNATIVES.

restriction (opt) acceptance check:

min...max: range (numbers only)

(v1,v2,...): listed values. NOTE: commas as delimiters. Double quotes can be used for
enclosing items with commans.

*(v1,v2,...): as above, but the values may contain wildcards.

id(): set of values given by calculator array

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).

1: for data base objects: check only unit 1. Similarly 2,...

Copyright © 1992 - 2016 NAPA. All rights reserved. 627 / 7399


NAPA for Design Manuals 2016.3

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.

Service functions are represented by a template, showing the parameters. *=parameter


assigned by AD.CHECK.

Components can be replaced by the syntax %name, where 'name' is the name of a variable
(NOTE!).

EXAMPLES
AD.CHECK('R','12')

No other check than that the value is a real.

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')

The value must be an integer that is either 1,2,3 or 10.

AD.CHECK('S (LREF,BDWL,ZDWL,HMAX,XMIN,XMAX)','BDWL')

The value must be one of the given strings.

Copyright © 1992 - 2016 NAPA. All rights reserved. 628 / 7399


NAPA for Design Manuals 2016.3

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 PURP/PAR*PRO PURP/PAR*STD','HFO')


The value must be found in column PURP of either PAR*PRO or PAR*STD.

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.

AD.CHECK('R 0...1 ERRNR=11111',1.1)


Use the (hypothetical) error number 11111 in case the test value is
outside the given range.

AD.ALTERNATIVES() list allowable values according to check criterion

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)

criterion: criterion as in AD.CHECK

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')

Copyright © 1992 - 2016 NAPA. All rights reserved. 629 / 7399


NAPA for Design Manuals 2016.3

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.

criterion: the criterion

3.5. Arguments, report control

AD.ARGS() list of arguments or argument properties

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

aspect: (opt) property to be returned, default=symbol of the argument.

ID: symbol (default)

EXPL: description

UNIT: unit

VALUE: value in input format

STATUS: status, 1=given or has default, 0=not given

source: (opt) argument description: default= apply task specific rule.

AD.ARG() return value of argument

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)

id: name of argument, e.g. HULL, T

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.

AD.SETARG() assign value to arguments

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)

id: name of argument

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')

AD.VARFROMTABLE() assign variables using VARDEF* table

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 630 / 7399


NAPA for Design Manuals 2016.3

AD.VARFROMTABLE(table,opt)

table: source table, alternatives as in !EXPL TP.STDPAR.

opt: options:

L: obey current locality rules, default=create global variables

A: take all variables regardless of value in the select column, default: take only selected
variables.

AD.VARTOTABLE() assign variables in a VARDEF* table

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)

table: receiving table, alternatives as in !EXPL TP.STDPAR.

opt: options:

L: obey current locality rules, default=use global variables

S: silent: make no error messages for missing or incorrect variables.

N: raise no events

AD.SELECT() select data

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)

source: source of data

0: use default source for the data type in question (decided from prefix), if no identifiable prefix,
DB1

1...7: the given data base unit

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.

receiver: receiver of the result

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.

array: (string array) only the list of selected names is returned.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 631 / 7399


NAPA for Design Manuals 2016.3

1610, NAME: names (always added)


1690, VERS (V): versions (added if multiple versions)
430, DAT (D): dates, integer, internal form
420, DATE (Y): dates, strings yy-mm-dd
421, TIME (H): times, strings, hh.mm
450, GEOMT (Q): types, integers
470, NR (B): size of descriptions in bytes
440, RNR (R): size of descriptions in records
1710, ID (U): sign of user
472, NL (E): see option E
1616, TEXT (T): descriptive text

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.

filter: (opt) filter for selecting names. May be empty.

options: (opt) string containing a combination of the following letters:

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.

SN: sort by name

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.

K: keep the records existing in the receiver at the call

X: select only from the contents of the source description.

Z: append the new selection to the receiver.

1,3,4: explicit db unit for a project name as the source.

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:

db-criterion: criterion involving NAME, VER, DATE (integer) and type.

quantity-criterion: criterion involving description contents acc. to SH conventions

user-criterion: criterion acc. to user who wrote: USER=list

reference-criterion: select objects according to reference, REF=list

location-criterion: select objects according to occurrence of string: LOC=list, LOC>list.


list=name, (name1,name2...) or array(). A criterion is reversed by -, e.g. -USER=NN. See
!EXPL !SELECT for more information.

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 632 / 7399


NAPA for Design Manuals 2016.3

Returns in array LIST a list of all curves.

@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 x-coordinate of each selected curve is stored in the given description.

AD.SUBJECT() interprete name rule

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)

This form does an interpretation of a data base name.

dbname: data base name, eg. ARR*A, DAMCASE(D1)

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)

This form converts a name rule to a description or vice versa.

aspect: aspect to be returned, P=prefix, T=text, TL=text in lower case.

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.

array: receiving array, type 3.

Copyright © 1992 - 2016 NAPA. All rights reserved. 633 / 7399


NAPA for Design Manuals 2016.3

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

AD.DBNAME() apply name rule

The function returns the dbname of the description. See AD.NAME for the reverse function.

dbname=AD.DBNAME(prefix,name)

dbname: data base name (output)

prefix: prefix

name: name without 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

list: string array containing list of names without prefix

EXAMPLES
!CAL AD.DBNAME('DAMCASE(','C1') -> DAMCASE(C1)
!CAL AD.DBNAME('ARR*','DECK1') -> ARR*DECK1

AD.NAME() extract plain name from the data base name

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)

dbname: data base name

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.

list: string array containing list of names without prefix

EXAMPLES
!CAL AD.NAME('LD*CON(L100)') -> L100

3.6. Various

AD.WEEKDAY() return day of week

The function value is 1 for Monday, 2 for Tuesday etc.

AD.WEEKDAY(idate)

idate: given date in the internal form

EXAMPLE
@IF AD.WEEKDAY(IDATE)>5 !TYPE This is not a working day

Copyright © 1992 - 2016 NAPA. All rights reserved. 634 / 7399


NAPA for Design Manuals 2016.3

AD.WEEK() return week number

The function value is the current week (1...53).

AD.WEEK(idate)

idate: given date in the internal form

AD.DATE() return formatted date

The function returns a formatted date string.

AD.DATE(idate,opt)

idate: given date in the internal form, can be given in a string to preserve accuracy (optional):

NOW: current date and time (default)

secs: seconds in an integer or string

opt: format (optional):

0: current default (default)

1: locale's short date representation

2: yyyy-mm-dd

3: yy-mm-dd

4: dd.mm yyyy

5: mm/dd/yy

8: locale's long date representation

AD.TIME() return formatted time

The function returns a formatted time string.

AD.TIME(idate,opt,sign)

idate: given date in the internal form (optional):

NOW: current date and time (default)

secs: seconds in an integer or string

opt: format (optional):

0: current default (default)

1: locale's time representation without seconds

2: napa's represenation (hh.mm)

3: same as 2?

4: hh:mm (24 hours)

5: hh:mm (12 hours and a/p indicator)

8: locale's time representation with seconds

sign: include sign (optional):

0: include sign only if idate<0 (default)

1: include sign also for positive idates

AD.IDATE() return internal date

Copyright © 1992 - 2016 NAPA. All rights reserved. 635 / 7399


NAPA for Design Manuals 2016.3

The function returns the internal date in seconds.

AD.IDATE(date,opt)

date: given date in a string format specified with opt (optional, default is the current date)

opt: format (optional):

0: current default (default)

1: locale's short date representation

2: yyyy-mm-dd (or yy-mm-dd)

3: yy-mm-dd (or yyyy-mm-dd)

4: dd.mm yyyy

5: mm/dd/yy

AD.SDATE() return internal date in a string

The function returns the internal date in seconds stored into a string to preserve accuracy (see
AD.IDATE).

AD.SDATE(date,opt)

AD.ITIME() return internal time

The function returns the internal time in seconds since 00:00:00.

AD.ITIME(time,opt)

time: given time in a string format specified with opt (optional, default is the current time)

opt: format (optional):

0: current default (default)

1: locale's short time representation

2: hh.mm (or hh.mm.ss)

3: hh.mm.ss (or hh.mm)

4: hh:mm:ss (24 hours)

5: hh:mm:ss (12 hours and a/p indicator)

8: locale's long time representation

AD.UTC() difference between local time and the universal 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()

AD.PAUSE() wait a specified time

The function waits for the specified number of milliseconds or until an interrupt signal. Events
are processed during the wait.

AD.PAUSE(msecs)

msecs: number of milliseconds to wait

AD.GETNOTES() get notes of object

Copyright © 1992 - 2016 NAPA. All rights reserved. 636 / 7399


NAPA for Design Manuals 2016.3

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)

descr: reference number of the object

line: part of notes:

>0: line number (record index)

0: all

<0: the given line and following ones

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)

Returns the first line as the function value.

!TAB GET ARR*DECK1 D


@S=ARR(3)
AD.GETNOTES(D,0,S)

Get all notes into the array S.

AD.SETNOTES() assign notes of object

The function assigns or updates notes of an object.

AD.SETNOTES(descr,line,arr,id,type)

descr: reference number of the object

line: part of notes:

>0: line number (record index)

0: all

<0: replace the given line and following ones

arr: array containing the input. A single line can be given as string parameter.

id (opt) see AD.GETNOTES.

type: (opt): see AD.GETNOTES.

AD.PROPS() properties

The function returns properties of a description.

@n=AD.PROPS(name,vers,uni,proj,sarr)

n: number of properties (output)

name: description name

vers: version (optional)

Copyright © 1992 - 2016 NAPA. All rights reserved. 637 / 7399


NAPA for Design Manuals 2016.3

unit: db unit (optional)

proj: project (optional)

sarr: string array to be filled with properties:

sarr[1]: data base name

sarr[2]: notes

sarr[3]: user

sarr[4]: version

sarr[5]: date

sarr[6]: time

sarr[7]: internal date

sarr[8]: db type

sarr[9]: size in bytes

sarr[10]: size in records.

AD.CSCOPE() control scope of variables generated internally

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

3.7. String functions

AD.STRREP() replace substrings

Occurrences of a given substring in a string are replaced.

result=AD.STRREP(string,s1,s2)

string: string to be modified

s1: substring to be replaced

s2: replacing string

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')

Occurrences of 'HULL' in COMMAND are replaced by '@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.

!cal AD.STRREP('AABCD', 'A~C' 'X~C') -> AXBCD

AD.STRCOMP() compare strings

Copyright © 1992 - 2016 NAPA. All rights reserved. 638 / 7399


NAPA for Design Manuals 2016.3

Two strings are compared, with the possibility to use wildcards. The function value is 1 (match)
or 0 (no match).

AD.STRCOMP(s1,s2)

s1: first string to compare

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

AD.STRCLEAN() remove/replace invalid characters

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)

The function value is the string after the checks.

string: string to be checked

check1: (opt) characters to be checked only if they occur at the start.

repl1: (opt) characters by which matches from 'check1' are replaced. x=omit. Compulsory if 'check1'
is given.

check2: (opt) characters to be checked anywhere in the string

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

There is no separate rule for characters at the start.

@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')

Copyright © 1992 - 2016 NAPA. All rights reserved. 639 / 7399


NAPA for Design Manuals 2016.3

'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

AD.READ() generic read operation

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,...)

descr: reference number of the description or 0 if not found

subsys: subsystem specification:

MN: read a data element

DB: read any description (DB.READ)

TP: read a table (TP.READ)

UI: read a widget definition (UI.READ)

...: the rest of the parameters, specifying the description, are passed to the subsystem specific
read function (see their documentation for more details)

AD.WRITE() generic write operation

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,...)

subsys: subsystem specification:

MN: write a data element

DB: write any description (DB.WRITE)

TP: write a table (TP.WRITE)

UI: write a widget definition (UI.WRITE)

...: the rest of the parameters, specifying the description, are passed to the subsystem specific
write function (see their documentation for more details)

3.9. Functions related to the reference system

AD.REFSYSTEM() get reference system description

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.

AD.ASGREFSYSTEM() assign new reference system

The function replaces the current reference system with the one provided as parameter.

Copyright © 1992 - 2016 NAPA. All rights reserved. 640 / 7399


NAPA for Design Manuals 2016.3

AD.ASGREFSYSTEM(descr)

descr: reference number of the reference system

AD.REFVALUE() value from the reference system

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.

source: (opt) source reference system, default=current.

AD.REFVALUE('ALL',source,receiver)

This form gets all values at a time to a given description.

source: (opt) as above

receiver: description for receiving the result. Previous contents are removed. The following records are
created:

1: name of the parameters

2: type, 2=real, 3=string

3: explanation of the parameters

4: value as string

5: group (integer), 1=dimensions, 3=standard names, 4=control and conventions,


5=identification and background, 6=various

6: definition value (string)

AD.ASGREFVALUE() assign value to reference system parameter

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'.

source: reference number of the reference system (from AD.REFSYSTEM)

value: new value as string or real, special case *: make the parameter calculated.

expl: (opt) explanation text for a new parameter.

AD.UPDREFSYSTEM() update calculated reference system parameters

The function updates those parameters of the reference system that are defined by calculation
from geometry or other parameters.

AD.UPDREFSYSTEM(descr,opt)

descr: reference number of the reference system (from AD.REFSYSTEM)

opt: options

C: make all parameters calculated that can be so

G: update also parameters derived from the geometry, default=update only those dependent
on other parameters

AD.FRAMESYSTEMS() get description of frame systems

Copyright © 1992 - 2016 NAPA. All rights reserved. 641 / 7399


NAPA for Design Manuals 2016.3

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)

vers: (opt) version

AD.REFRANGE() handle RANGE parameter of the reference system

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.

descr: description containing the reference system, as obtained with AD.REFSYSTEM.

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.

descr: description containing the reference system.

arr: real array contain the six values

AD.ASGFRSYSTEMS() take frame system definition into use

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)

descr: description as obtained by AD.FRAMESYSTEMS.

AD.GETFRSYSTEM() get definition of frame system.

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)

descr: source description as obtained by AD.FRAMESYSTEMS.

type: frame system concerned, either FRAME, WEB, LONG or VERT.

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.

ref: 0=not available, else record containing the definition.

type: as above

AD.REPFRSYSTEM() replace definition of frame system.

The functions does the reverse of AD.GETFRAMESYSTEM, i.e. stores a frame system given
in the definition format.

Copyright © 1992 - 2016 NAPA. All rights reserved. 642 / 7399


NAPA for Design Manuals 2016.3

AD.REPFRSYSTEM(descr,type,rec,c)

descr: source description as obtained by AD.FRAMESYSTEMS.

type: frame system concerned, either FRAME, WEB, LONG or VERT.

rec: record (real) containing the definition, a set of reals as in the FRAMES command under REF).

C: (opt) 0=normal case (default), 1=webs defined by frame numbers

AD.REF() return/add value to the reference system

The funtion returns the value of a reference system parameter and optionally adds if originally
undefined.

value=AD.REF(id,default,expl)

id: identifier of the parameter, max 4 char.

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')

Return the value of 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')

As above, but if undefined, record the value in the reference system.

3.10. Functions related to process tables

AD.UPDPROCESS() perform updates in a process table

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)

table: designates the table, normal options

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

N: suppress table change events

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 643 / 7399


NAPA for Design Manuals 2016.3

A: take all lines regardless of the column INCL (the columns must be formally dependent, use
formula DUMMY).

AD.PFUNCTION() function value(s) from process table

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).

table: designates the table, normal options

qnt: name of quantity

name: additional argument (in column NAME), assign empty if not needed.

arec: array for receiving the time argument, may be real or integer

frec: real array for receiving the function values

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

H: return the time argument as hours, the argument must be integers

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)

This form returns the function value at a specified time.

time: time argument, either

t; time in seconds

hh:mm : wall time as syntax, e.g. 12:30.

opt: options

S: the quantity is a string quantity

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)

Get VLOAD in T10 as a function of time in records arec, frec.

@vload=ad.pfunction(0,'VLOAD','T10','11:30')

Get the value of the same function at 11:30.

AD.PFUNCTIONS() get list of functions from process table

Copyright © 1992 - 2016 NAPA. All rights reserved. 644 / 7399


NAPA for Design Manuals 2016.3

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)

table: designates the table, normal options

qnt: name of quantity, empty=all quantities

qrec: (opt) string array for receiving the names of quantities, assign 0 if not used.

nrec: (opt) string array for receiving corresponding names

vrec: (opt) real array for receiving the function values.

time: (opt) time argument for vrec, either

time in seconds

time as syntax, same as used in TIMDEF, e.g. 12:30.

Example
@nrec=arr(3) @vrec=arr(2)
@ad.pfunctions(0,'VLOAD',0,nrec,vrec,'12:30')

AD.PFEVENTS() events related to specified function

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.

table: the process table

qnt: quantity

name: (opt) name associated with the quantity

opt: options

I: return the result as identifiers (value of ID), default=line numbers

list=AD.PFEVENTS(table,line,'!',opt)

As above, but the function is the one set by a given line.

line: line number or identifier of that line

!: needed to distinguish this case if line=identifier

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.

table: the process table

line: line number or identifier of the given line

+: specifies this case, similarly - for preceding event.

opt: options

I: return identifier, default=line number

EXAMPLES
@list=AD.PFEVENTS(0,'VLOAD','R123')

Return a list of all events controlling VLOAD of R123.

Copyright © 1992 - 2016 NAPA. All rights reserved. 645 / 7399


NAPA for Design Manuals 2016.3

@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.

AD.SUBPROCMAP() map of alternative sequences

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)

In this form, the result is stored in a separate description.

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.

rdescr: (opt) result description The following records are stored:

497: (quantity PREC) pointer to the preceding event

713: (quantity FRACTION): a value between 0 and for use as coordinate in the graphic display

431: (quantity RTIME) time, see option L. Only if option T or L.

1710: (quantity ID) identifier of the event, only if option I

opt: options:

L: store logical time: incremented by 100 between each event, default=real time as recorded in
the source table

I: include ID in the result

T: include time in the result , default if L option

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.

E: check for inconsistent times

AD.SUBPROCMAP(table,opt)

In this form, the result is stored in the given table.

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).

opt: options: T, N, E as above.

AD.SUBPROCESS() mark subprocess

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)

table: the process table

item: last item in the subprocess, line number or key value

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 646 / 7399


NAPA for Design Manuals 2016.3

AD.PTABLEITEMS() select items from a process table

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.

table: the process table

task: defines subset to be selected:

B: branching points

A: alternative branches at the given place

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.

id: identifier of item, needed for tasks A, S and N

4. Functions of group DB
This group contains functions concerning data in the database.

4.1. Function related to objects in the data base

DB.READ() read from the data base

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)

name: name of the description

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)

-: ignore -> use current project

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.

S: silent, make no error message for missing description

E: replace an existing description with the same name, default: cancel the operation if the
description exists in the free storage (return 0)

Copyright © 1992 - 2016 NAPA. All rights reserved. 647 / 7399


NAPA for Design Manuals 2016.3

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).

V: set permanence same as version, default=deleted at exit from task

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')

Read from version B in the current project.

@D=DB.READ('STEM','A',1,'NAPASHIP','U')

Read STEM from version A of NAPASHIP into an unnamed description.

DB.EXISTS() test existence of description

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.

DB.DATE() date of description in the data base

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.

DB.TYPE() type of description in the data base

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.

DB.WRITE() write description to the data base

The given description is written to the data base. The function value is an empty string.

DB.WRITE(descr,name,version,unit,project,options)

descr: reference number of the description

name: (opt) name for the description, default=its current name

version: (opt) version, default=current version (DB1,DB3,DB4), empty for others

Copyright © 1992 - 2016 NAPA. All rights reserved. 648 / 7399


NAPA for Design Manuals 2016.3

-: ignore -> use default version

unit: (opt) data base unit (1...7), default=1

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)

-: ignore -> use current project

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.

R: (replace) write if exists only

S: (save) do not write if exists

number: defined the type of description. Ignored unless the name is also given.

!: remove restrictions on writing to DB2

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.

DB.UNSAVE() delete description from the data base

The given description is removed from the data base. The function value is an empty string.

DB.UNSAVE(name,version,unit,project,options)

Parameters as in DB.READ, except for parameter options

options (opt), only one valid option:

!: remove restrictions on deleting from DB2

DB.LASTDU() date of last directory update

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)

unit: data base unit (1...7)

c: (opt) result returned, default=0.

0: return the complete internal date in seconds. The last 2...3 digits are irrevelant because of
the internal accuracy.

1: return the seconds since the start of the year

2: return the year

4.2. Functions related to file management

Copyright © 1992 - 2016 NAPA. All rights reserved. 649 / 7399


NAPA for Design Manuals 2016.3

DB.ACCESS() check write access

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).

DB.INDICATOR() control progress indicator

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)

sel: OFF=do not show, ON=show always, OPT=show if large operation

EXAMPLE
DB.INDICATOR('OPT')

Show the indicator when considered useful.

DB.FILENAME() name of open data base file

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)

unit: data base unit (1...7) or 8=IOF

DB.FREENAME() find unused name according to template

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)

unit: data base unit, 1...7

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)

The names checked are WL10A, WL11A, etc.

DB.DB5MODE() use DB5 as source of general data

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 650 / 7399


NAPA for Design Manuals 2016.3

oldmode=DB.DB5MODE(mode)

The function value is the mode at the call, coded as 'mode'.

mode: (opt) new mode, 0=off, 1=on. To set mode=1, the DB5 must be open.

DB.OPEN() open data base file

The function opens a file and makes it available as a data base unit.

DB.OPEN(name,unit,opt)

name: file name

unit: data base unit, 1...7

opt: options:

!: do the operation even there is already a file open as the given unit.

DB.CLOSE() close data base unit

The function closes a given data base unit.

DB.CLOSE(unit)

unit: data base unit, 1...7

DB.OPENED() inquire whether data base unit open

The function returns 1 if the given file unit is open, else 0. See DB.FILENAME for inquiring the
file name.

DB.OPENED(unit)

unit: data base unit, 1...7

DB.ENCODING() set/inquire character coding used in the data base

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.

unit: data base unit (1...7)

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.

unit: data base unit (1...7)

coding: new coding, either LAT1 or UTF8.

DB.ERRORLEVEL() set errorlevel for data base errors

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 651 / 7399


NAPA for Design Manuals 2016.3

3: normal error

4: system error (run aborted). Default.

level=DB.ERRORLEVEL()

Inquire current error level.

4.3. Functions related to files in general

DB.READFILE() read text file

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

descr: receiving description

options:

A: append, default=remove previous contents

B: convert normal slashes to backslash in the file name

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.

DB.WRITEFILE() write text file

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

descr: description containing the text

options:

R: replace, the file must exist, default=write only if the file does not exist.

!: write regardless of previous existence

B: convert normal slashes to backslash in the file name

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).

DB.FILEDATE() date of file

The function returns the date of a file in the standard form (seconds). 0=file missing.

date=DB.FILEDATE(file)

file: file name

Copyright © 1992 - 2016 NAPA. All rights reserved. 652 / 7399


NAPA for Design Manuals 2016.3

DB.FILESIZE() size of file

The function returns the size of a file in bytes. 0=missing.

date=DB.FILESIZE(file)

file: file name

4.4. Functions related to data access and security

DB.PROTECT protect macro in database

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)

descr: macro to be protected

ver: version where macro is located (if relevant)

unit: database unit of macro

project: project, if unit (if relevant)

keyname: name of the key. (opt)

key: Encryption key. Integer array with 8 elements

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).

NOTE: Always keep unprotected copies of your macros available.

DB.ENCRYPTION() specify encryption method for the file

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)

unit: data base unit concerned, cannot be 2 or 7

sel: different ways of handing the encryption key:

F: key read from specified file

LM,LC: encryption connected to the current license: LM: machine id, LC: customer id.

G: testing mode

OFF: remove encryption specification

keyspec: key specification, depending on setting:

F: name of file

L: specified items, delimited by comma

G: not used

Copyright © 1992 - 2016 NAPA. All rights reserved. 653 / 7399


NAPA for Design Manuals 2016.3

options: (opt) additional options

F: fixed: the encryption cannot be changed, concerns also copying

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:

T: (default) encryption type, empty=no encryption

K: key specification.

O: additional options.

R: lowest release useful (e.g. '2007')

DB.ENCRYPT() encrypt/decrypt given description

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)

unit: data base unit

name: name of description encryption can be opened.

version: (opt) version, default=current version

newstate: ON or OFF

state=DB.ENCRYPT(unit,name,version,'I')

As above but inquire the current state.

state:

MISSING: description not found

ON: description encrypted

OFF: description not encrypted

UNREADABLE: description encrypted and the encryption cannot be opened

empty: encryption in defined for the given unit

DB.SETRIGHTS() assign access rights

The function assigns or modifies read, execute and write rights for a given description.

DB.SETRIGHTS(unit,name,version,read,execute,write)

unit: data base unit

name: name of description

version: version, empty=default version

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 654 / 7399


NAPA for Design Manuals 2016.3

write: similarly for write access

DB.GETRIGHTS() inquire rights to description

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.

unit: data base unit

name: name of description

version: version, empty=default version

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

rexecute: similarly for execute rights

rwrite: similarly for write rights

DB.LOCK() set/inquire lock against changes

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)

unit: data base unit

name: name of description

version: version, empty=default version

function:

L: set permanent lock

E: set lock for editing

OFF: remove permanent lock

R: release editing lock

timeout: (opt) timeout time in seconds. For lock on editing only.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 655 / 7399


NAPA for Design Manuals 2016.3

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

DB.WATERMARK() add or list water mark

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)

This form adds a watermark.

unit: data base unit (1...7)

text: description (pointer) containing the 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.

unit: data base unit (1...7)

opt: (opt) options

L: list the contents, no text created

EXAMPLES
@db.WATERMARK(1,EDTEXT)

Add the contents currently in the (old) text editor as a new watermark part

@db.WATERMARK(1,'L')

List the watermark(s) of the unit 1

@d=db.WATERMARK(1)

Get the contents as a text.

4.5. Various

DB.STATISTICS() statistics of db accesses

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 656 / 7399


NAPA for Design Manuals 2016.3

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.

OFF: discontinue monitoring. The data is not removed.

RESET: empty the collected data

DB.BUFFER() control buffering of read/write operations

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)

Set the buffer to the specified size (default=10. max. 10).

b=DB.DBUFFER()

Inquire the current buffering.

DB.MAKELONGNAME() make a long name from name components

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

lname: is the long name (output)

name: is the name of the description

vers: is the name of the version (optional)

unit: is the database unit (optional)

proj: is the name of the project (optional).

DB.GETNAMECOMPS() get name components from the long name

The name components of the long name of a description is returned by the function

@unit=db.getnamecomps(lname,sarr)

where

unit: is the database unit (output)

lname: is the long name

sarr: is a string array to be filled with name components:

sarr[1]: is the name without the prefix

sarr[2]: is the name with the prefix

sarr[3]: is the name of the version

sarr[4]: is the name of the project.

5. Functions of group DM
This group contains functions concerning data in the run time memory.

DM.INFO() information about data object

Copyright © 1992 - 2016 NAPA. All rights reserved. 657 / 7399


NAPA for Design Manuals 2016.3

The function returns information about an array or description.

DM.INFO(object,info)

object: reference number of the object (as returned by the REC, ARR, DB and similar functions) or
name of description

info: information required

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.

SIZE: number of elements (arrays) or records (descriptions)

NAME: record number (arrays) or name (descriptions)

OWNER: description to which an array belongs. Not applicable for descriptions.

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

DTYPE: description type

DATE: description date

WORD: size of record or description in words (1 word = 4 bytes)

arr=DM.INFO('?')

Return the list of symbols (TYPE...LAST) in an array.

DM.WHAT() check reference number

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.

refnr: given reference number

5.1. Operations with descriptions

DM.CREATE() create description in the free storage

Function value=reference number of description created.

DM.CREATE(name,type,options)

name: name of description, may be empty

type: (opt), type integer, default=0. Assign 1970 for tables.

options: combination of:

E: existing description with the same name allowed to be replaced

V: permanence same as version, default=deleted at exit from task

R: permanence same as run, i.e. not deleted at change of project or version

Copyright © 1992 - 2016 NAPA. All rights reserved. 658 / 7399


NAPA for Design Manuals 2016.3

EXAMPLES
@D=DM.CREATE('TEST')

Create a description named TEST, provided that one with this name did not already exist.

@D=DM.CREATE('','R')

Create an unnamed description which will remain until explicitly deleted.

DM.GET() get description existing in the free storage

Function value=reference number of description found, 0=found.

DM.GET(name,opt)

name: name of description

opt: options

S: silent, make no message if description not found

DM.EXISTS() tell whether description exists in the free storage

Function value: 1=description exists, 0=does not exist.

DM.EXISTS(name)

name: name of description

DM.DELETE() delete description from the free storage

DM.DELETE(descr)

descr: reference number of description to be deleted

DM.DELETE(name)

Same function with the description given by its name.

DM.REC() get record in description

Function value=reference number of record, 0=not found.

DM.REC(descr,recnr,n)

descr: reference number of description. It may also be that of a record.

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:

0: get the first record ('n' not given)

-1: get the last record

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)

Get record 1001 from description TEST.

@R=DM.REC(D,1001,2)

As above, but get the second record 1001.

@R=DM.REC(D,0,2)

Get the 2. record totally.

Copyright © 1992 - 2016 NAPA. All rights reserved. 659 / 7399


NAPA for Design Manuals 2016.3

DM.NEWREC() create record

Function value=reference number of record created.

DM.NEWREC(descr,recnr,rtype,options)

descr: reference number of description or record.

recnr: record number

record type, 1=integer, 2=real, 3=string

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)

Add an integer record (type 1) with record number 100.

@R=DM.NEWREC(D,10,3,'F')

Add a string record 2 as the first one.

DM.DELREC() delete record

Delete record from a description.

DM.DELREC(descr,rec)

descr: reference number of description

rec: reference number of record to be deleted

DM.EMPTY() empty description

The function removes all records in a description

DM.EMPTY(descr)

descr: description to be removed

DM.RECORDS() records in a description

The function returns a list of records or a record count. in a given description.

DM.RECORDS(descr,recnr)

This form returns a count of records.

descr: reference number of description

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)

This form returns a list of records.

descr: reference number of description

arr: integer array, into which the record numbers of the records are stored.

Copyright © 1992 - 2016 NAPA. All rights reserved. 660 / 7399


NAPA for Design Manuals 2016.3

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() rename description

DM.RENAME(descr,name,type,options)

descr: reference number of description to be renamed.

name: new name

type: (opt) type (integer), default=keep the original type

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.

DM.FINGERPRINT() check number from description

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)

start: reference number of description or record

end: (opt) record where to end, located after the start record. Default='start' alone if it is a record,
else the whole description.

DM.DUMP() output a description in the dump format

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)

descr: reference number of the given description

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.

opt: (opt) file options as in !OPEN, default N

N: create a new file

O: overwrite if the file exists, else create new

DM.LOAD() load description from dump file

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 661 / 7399


NAPA for Design Manuals 2016.3

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.

5.2. Operations with arrays

DM.INSERT() insert elements into array(s)

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.

n: (opt) number of elements to insert, default=1

value: (opt) value assigned to the new element. Not available for a whole description.

DM.REMOVE() remove elements from array(s)

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.

DM.MOVE() move element in array(s)

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.

index1: index of the element to be moved.

index2: new index of the element (=index after the operation)

DM.REMOVEDUPL() remove duplicates

The function removes duplicates from an array of any type.

@n=DM.REMOVEDUPL(arr,arr2)

The function value is the number of items after the operation.

arr: given array

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 662 / 7399


NAPA for Design Manuals 2016.3

@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).

arr: given array

arr2: integer array for receiving the result

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)

As above but the result is returned in s.

@ia=arr(1)
@n=dm.removedupl(s,ia,'I')

ia contains 1,2,5,8.

DM.SORT() sort array(s)

The function changes the order of the elements in an array or set of arrays.

n=DM.SORT(array,dir)

n: the array size.

array: array to be sorted.

dir: (opt) sorting direction, A=ascending (default), D=descending.

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.

array2...: (opt) additional arrays to be sorted the same way

dir: (opt) sorting direction, A=ascending (default), D=descending.

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.

DM.OPERATE() operation on array

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)

Perform an arithmetic operation between the given operands.

operand1: the first operand, either an array or a constant.

arithop: aritmetic operator, string, either

Copyright © 1992 - 2016 NAPA. All rights reserved. 663 / 7399


NAPA for Design Manuals 2016.3

+: addition

-: subtraction (operand1-operand2)

*: multiplication

/: division The operator can also be given as an integer 1...4.

operand2: the second operand, must be an array

result: (opt) receiving array, default=operand 2

DM.OPERATE(operand1,'CNC',operand2,nc,result)

Concatenate the elements of operand1 with those of operand2.

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)

Multiply all elements in R1 with 10 and store the result in 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)

All elements in the array R are replaced by their inverse value.

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('?')

Return list of operator symbols in an array.

DM.COPY() copy array or description to another

DM.COPY(arr1,arr2)

arr1: array or description to be copied (not modified).

arr2: receiver of the result. It must be of the same type as arr1.

DM.APPEND() append array or description to another

With arrays, the array elements are appended, with descriptions, the records.

DM.APPEND(arr1,arr2,opt)

Note role of operands: 'arr1' is appended to 'arr2'.

arr1: array or description to be appended to arr2 (not modified).

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)

DM.DIFF() compare arrays

Copyright © 1992 - 2016 NAPA. All rights reserved. 664 / 7399


NAPA for Design Manuals 2016.3

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)

arr1: first array to be compared

ind1: starting index of the first array (optional)

arr2: second array

ind2: starting index of the second array (optional)

n: number of items to compare (optional, default=all)

tol: tolerance for real arrays (optional, default=0.0001)

DM.LOCATE() locate items in an array

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)

arr: array from which to search

data: data to search for

ind: index from which to start (optional)

0: search all indexes (default)

>0: search items above the given index

<0: search items below the given index

opt: match option (optional), default=find item containing 'data'

tol: matching tolerance for real arrays, special cases:

0: (reals) return also intermediate values, the function value can contain a fraction.

0: (strings) match strings containing 'data' (default)

1: match strings starting with 'data'

2: match strings equaling 'data'

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.

DM.RPART() get part of array

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)

arr1: source array

arr2: receiver. May be same as 'arr1'.

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.

DM.SUM() sum of two functions

Generate the sum of two functions that need not have common arguments. The functions are
represented a polygons described by two arrays.

Copyright © 1992 - 2016 NAPA. All rights reserved. 665 / 7399


NAPA for Design Manuals 2016.3

DM.SUM(x1,f1,x2,f2,x3,f3,tol)

x1: array forming the argument of the first function

f1: array providing the function values of the first function

x2,f2: similarly for the second function

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.

DM.SUBSEL() select matching subset of array

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)

arr: array from which to search

data: data to search for

res: integer array receiving the matching indices

ind: index from which to start (optional)

>0: search items above the given index

<0: search items below the given index

opt: match option (optional):

0: match strings containing data from string arrays

1: match strings starting with data from string arrays

2: match strings equaling to data from string arrays

3: match strings when wildcards interpreted in DATA (string arrays). 'ind' not used.

>: (reals & integers) match items greater than data

<: (reals & integers) match items less than data

<>: (reals & integers) match items not equal to data

tol: matching tolerance for real arrays (optional)

DM.SUBSET() get subset of array

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)

source: array from which the subset is taken

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:

D: remove duplicates (string arrays only)

Copyright © 1992 - 2016 NAPA. All rights reserved. 666 / 7399


NAPA for Design Manuals 2016.3

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.

DM.SETOP() set operations

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)

arr1: first operand record

arr2: second operand

result: record for receiving the result. May be same as 'arr1' but not 'arr2. All records must be of the
same type.

op: operation:

U: union, take all items occurring in arr1 OR arr2

I: intersection, take all items occurring in arr1 AND arr2

D: difference, take all items occurring in arr1 but not in arr2

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() add subset of an array

The function adds a subset of an array to another one

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.

arr1: first array

arr2: second array

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() copy subset of an array

Copies a subset of an array to another one

DM.COPYSUBSET(arr1,arr2,sel,opt)

Copy selected items from arr1 to arr2.

Copyright © 1992 - 2016 NAPA. All rights reserved. 667 / 7399


NAPA for Design Manuals 2016.3

arr1: delivering array

arr2: receiving array

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.

'RE': If arr(i)=0, omit the item rather than add.

'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() insert a record (array) to another

Inserts a record (array) to another after the given index.

DM.INSREC(rec1,ind,rec2,result)

rec1: the receiving record

rec2: record to be inserted

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

DM.LIST() list of descriptions in memory

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)

Return complete list.

@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 *.

DM.SECURE() save description at tidying

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)

descr: given description

Copyright © 1992 - 2016 NAPA. All rights reserved. 668 / 7399


NAPA for Design Manuals 2016.3

opt: options

V: set scope=current version, i.e.allow delete at change of version or project, default=save over
version changes also.

DM.UDM() information about unnamed descriptions in memory

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).

DA: deactivate the register

R: return a record containing the list of unnamed descriptions.

N: return the total number of unnamed descriptions

T: return the total size (nr of words)

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)

L: similarly for the last record

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

The function returns 0 if the register in not activated.

@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() check type of data item

The function returns 1 if the given value is of a given type, else 0.

AI.VERIFY(string,type)

string: string to be checked

type: type of item:

10...19: integer

20...29: real

30: arbitrary string (always satisfied)

Copyright © 1992 - 2016 NAPA. All rights reserved. 669 / 7399


NAPA for Design Manuals 2016.3

31: symbol, string not containing delimiters

32: name, string not containing delimiters or special characters, * allowed.

33: name, as 32, but * not allowed

AI.SYNTAX() apply syntax analyzer

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)

string: the given string

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.

opt: options, string containing one or several of

U: convert strings not in apostrophes to upper case

A: convert quotes (") to apostrophes (')

S: mark strings in apostrophes with code 201 rather than 200.

AI.ADD() run macro (general)

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).

par1,par2,...: (opt) parameters to the macro

'L!': (opt) make use of local variables default

AI.ADD(macro,plist,'()','L!')

In this form, parameters are entered as one string.

plist: string containing the parameters.

(): flag to separate this case

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',...)

Otherwise as in the other forms, but the macro is started in stepmode.

EXAMPLES
@AI.ADD('MACRO1')

Run the macro name MACRO1.

@D=DB.READ('MACRO2','A','P1234')
@AI.ADD(D,'test')

Copyright © 1992 - 2016 NAPA. All rights reserved. 670 / 7399


NAPA for Design Manuals 2016.3

Run the macro MACRO2 from version A in project P1234, with one parameter.

AI.RUN() run macro (NAPA BASIC)

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).

par1,par2,...: (opt) parameters to the macro

'L!': (opt) make use of local variables default

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')

The macro returns a function value. This is essentially the same

AI.POPUP() popups on/off

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)

POP: current value of the popup setting:

0: popups are disabled

1: popups are enabled

NEW: new popup setting (see POP, optional)

AI.LASTCOMMANDS() return executed commands

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)

The result is stored in a receiver provided in the call.

descr: (opt) description, receiver for the result. Old contents are removed.

AI.EVENTLOCK() suppress checking for events

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 671 / 7399


NAPA for Design Manuals 2016.3

AI.EVENTLOCK(state)

Sets the state of the lock.

state: 1=set lock, 0=release lock.

state=AI.EVENTLOCK()

Inquire the current state.

AI.LEVEL() inquire level of nested macros

The function value is height of the macro call stack.

AI.MACRO() information regarding running macros

value=AI.MACRO(property,level)

property: (opt)

NAME: name of the macro (default). May be empty, depending on how the macro was started.

DATE: date (internal form)

LINE: next line to be executed (string)

LNR: line number of the next line

REFNR: reference number of the description containing the the macro

LEVEL: (opt) nesting level, default=current (=highest). AI.LEVEL() tells the current level.

AI.PARAMETERS() get parameters of macro

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).

idarr: string array for receiving the parameter names

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.

exparr: (opt) string array for receiving the explanations.

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'.

AI.VARDEF() add references to VARDEF tables to a macro

Copyright © 1992 - 2016 NAPA. All rights reserved. 672 / 7399


NAPA for Design Manuals 2016.3

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)

macro: reference number of macro, can be fetched with the

vardef: specification of vardef table(s) to be used:

name: name of VARDEF tables, prefix optional

list: string array containing a list of table names

EXAMPLE
@m=macro('test')
@ai.vardef(m,'VDEF)
@ai.add(m)

The macro 'test' is equipped with variables from the table VDEF and started.

AI.COORD() interprete general coordinate expression

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)

expr: string representing the coordinate

arr: (opt) string array for receiving the result. The result is stored in the record elements as follows:

1: type of value: empty=bare coordinate, #=frame number, #W=web, #L=long, #V=vert,


N=name of object, E=Error

2: frame, web, long or vert number or name of surface

3: additional displacement (e.g. #n+d)

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)

In the result, r(1)=#L, r(2)=12, r(3)=0.4, r(4)='Y'

AI.RETURNADDRESS() line of return from the last jump

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

AI.CACHE() manage macro cache

Copyright © 1992 - 2016 NAPA. All rights reserved. 673 / 7399


NAPA for Design Manuals 2016.3

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:

ON: activate the service for any macros

L1: as ON, but only for macros used by the calculator and similar (e.g. function RESULTOF)

L2: as L1 but also for macros used by the manager

L3: also macro run by AI.ADD, AI.RUN, excluding only macros run with !ADD.

OFF: cancel the macro cache service

RESET: remove any macros currently in the cache

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() terminate macro execution

AI.ABORT()

AI.MACROLINES() creates a macro description using function's arguments as lines in macro

AI.MACROLINES('LINE1','LINE2',...)

AI.MACROLINES('MACRO_NAME=macro_name','LINE1','LINE2',...)

AI.MACROLINES(LINES)

AI.MACROLINES('macro_name',LINES)

AI.MACROSTRING() creates a macro description from a string or array of strings

AI.MACROSTRING('MACRO_AS_STRING')

AI.MACROSTRING('MACRO_NAME','MACRO_AS_STRING')

AI.MACROSTACKTRACE() retreives the current macro stack trace.

AI.MACROSTACKTRACE(receiver)

Copyright © 1992 - 2016 NAPA. All rights reserved. 674 / 7399


NAPA for Design Manuals 2016.3

receiver: (opt) string record that will be populated with stack trace'slines.

7. Events of group AI

AI*INTERRUPT() interrupt signal

This event is raised when an interrupt signal is encountered (150001).

AI*INTERRUPT()

AI*DIGINPUT() input received from digitizer

This event is raised when a button on the mouse of the currently active digitizer is pressed
(150002).

AI*DIGINPUT(arr,str)

arr: real array, containing the following elements:

1: u-coordinate as measured on the device (m)

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.

4: v-coordinate, analogically with 3.

5: button number

str: equivalent command component, as would otherwise be added to the current command

AI*ENDMACRO() end of macro

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)

level: nesting level of the macro (1,2,..)

name: name of macro. Depending on how the macro was started, the name may not be available
(=empty).

AI*TERMINATE() macro execution terminated

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

AP.LINK() set/return listclass destinations

The function does the same as command !LINK. The listclasses and destinations are coded as
integers (!see EXPL !LINK).

AP.LINK(lc,d,dest)

The function value is the current destination of the given listclass.

Copyright © 1992 - 2016 NAPA. All rights reserved. 675 / 7399


NAPA for Design Manuals 2016.3

lc: listclass, 1...8

d: 1=first destination, 2=second destination

dest: (opt) new destination

AP.LINK(lc,0,dest1,dest2)

This form sets both destinations without returning a function value.

EXAMPLE
@old1=AP.LINK(1,1,11)
@old2=AP.LINK(1,2,-1)

The effect is the same as !LINK 1 11 -1.

@AP.LINK(1,0,old1,old2)

Restore the initial values.

AP.PAGEW() set/return page width of listclass

The function returns the page width (characters/line) applied for the given listclass and
optionally changes it.

oldpw=AP.PAGEW(lc,pw)

lc: listclass, 1...8

pw: (opt) new page width (characters/line)

AP.PAGEH() set/return page height of listclass

The function returns the page height (number of lines) applied for the given listclass and
optionally changes it.

oldph=AP.PAGEH(lc,ph)

lc: listclass, 1...3

ph: (opt) new page height (numer of lines)

AP.TYPE() output text

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.

AP.DUMPOPT() controlling table interface

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 676 / 7399


NAPA for Design Manuals 2016.3

opt: (additional options):

C: use comma as decimal point

D: create file DOS: add carriage returns and control-Z.

L: use LATIN1 encoding. Default UTF8 unless otherwise set with AP.ENCODING.

U: use UTF8 encoding

EXAMPLES:
@AP.DUMPOPT('T')

Change the delimiter to the tabulator character.

@AP.DUMPOPT('D','CD')

Keep the built-in delimiter, set options C=comma as decimal point, D=DOS format.

AP.ENCODING() control encoding of input/output of text files

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()

Inquire the current encoding.

AP.TYPECONTROL() special functions for DocBook/HTML

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)

This form controls the degree of freedom for the layout.

sel: selects the alternative

ON: completely fixed (-> monospaced font in the result)

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')

Cancels the table mode. The effect is the same as 'FIX','ON'.

9. Events of group AP

Copyright © 1992 - 2016 NAPA. All rights reserved. 677 / 7399


NAPA for Design Manuals 2016.3

AP*OPENLIST Open listclass

This event is raised when a listclass is opened. (160001). See alse AP.OPENRLIST.

AP*OPENLIST(lc,name)

lc: listclass

name: list name

AP*CLOSELIST Close listclass

This event is raised when a listclass is closed. (160002) See alse AP.CLOSERLIST.

AP*CLOSELIST(lc)

lc: listclass

AP*OPENRLIST Open listclass 1...3

This event is raised when listclass 1, 2 or 3 is opened (160003).

AP*OPENRLIST(lc,name)

lc: listclass

name: list name

AP*CLOSERLIST Close listclass 1...3

This event is raised when listclass 1, 2 or 3 is closed. (160004)

AP*CLOSELIST(lc)

lc: listclass

AP*ENDOFPAGE() end of page

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

pagenr: page number

lnr: current line number

AP*TOPOFPAGE() top of page

This event is raised after a page break. (160006)

AP*TOPOFPAGE(lc,pagenr)

lc: listclass

pagenr: page number

10. Functions of the group OS


These functions give access to various operating system services, such as file operations.

OS.ABOUT() about OS service functions

The operating system interface of NAPA provides a set of service functions with which to
communicate with the local environment.

Copyright © 1992 - 2016 NAPA. All rights reserved. 678 / 7399


NAPA for Design Manuals 2016.3

The service functions provide access to dynamic memory allocation, file system operations and
terminal I/O.

10.1. Dynamic memory functions

OS.ARR() collect parameters into an array

Parameters of any type can be collected into an array with the function

@os.arr(pari,...,arr)

where

pari: are a set of parameters of any type

arr: is a reference number of an array or data element.

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.

OS.REF() collect parameters into a string handle

Parameters of any type can be collected into a string handle with the function

@res=os.ref(pari,...)

where

res: is a string handle (output)

pari: are a set of parameters of any type.

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.

OS.NUM() collect parameters into a number

Parameters of any type can be collected into a number with the function

@num=os.num(pari,...)

where

num: is a number (output)

pari: are a set of parameters of any type.

The function concatenates the parameters to one string and converts that string into a number.
A data type error will cancel the operation.

OS.STR() collect parameters into a string

Parameters of any type can be collected into a string with the function

@str=os.str(pari,...)

where

Copyright © 1992 - 2016 NAPA. All rights reserved. 679 / 7399


NAPA for Design Manuals 2016.3

str: is a string (output)

pari: are a set of parameters of any type.

The function concatenates the parameters to one string and returns that string.

OS.APPEND() append a data item after a string handle

A data item of any type can be appended after a string handle with the function

@os.append(ref,item,delim)

where

ref: is a string handle

item: is the data item to append

delim: is the delimiter between the items (optional).

OS.INSERT() insert a data item into a string handle

A data item of any type can be inserted into a string handle with the function

@os.insert(ref,item,ind,delim)

where

ref: is a string handle

item: is the data item to insert

ind: is the index into which to insert

delim: is the delimiter between the items (optional).

OS.REPLACE() replace a data item in a string handle

A data item in a string handle can be replaced with the function

@os.replace(ref,item,ind,delim)

where

ref: is a string handle

item: is the new data item

ind: is the index of the data item to replace

delim: is the delimiter between the items (optional).

OS.DELETE() delete a data item from a string handle

A data item can be deleted from a string handle with the function

@os.delete(ref,ind,delim,count)

where

ref: is a string handle

ind: is the index of the data item to delete

delim: is the delimiter between the items (optional)

count: is the number of items to delete (optional, default=1).

Copyright © 1992 - 2016 NAPA. All rights reserved. 680 / 7399


NAPA for Design Manuals 2016.3

OS.ITEMS() return the number of data items in a string handle

The number of data items in a string handle can be calculated with the function

@num=os.items(ref,delim)

where

num: is the number of data items (output)

ref: is a string handle

delim: is the delimiter between the items (optional).

OS.GETARR() return a data item as an array

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

ref: is a string handle

ind: is the index of the data item to pick

delim: is the delimiter between items (optional).

arr: is a reference number of an array or data element.

OS.GETREF() return a data item as a string handle

A data item can be picked from a string handle as a string handle with the function

@res=os.getref(ref,ind,delim)

where

res: is a string handle (output)

ref: is a string handle

ind: is the index of the data item to pick

delim: is the delimiter between the items (optional).

OS.GETNUM() return a data item as a number

A data item can be picked from a string handle as a number with the function

@num=os.getnum(ref,ind,delim)

where

num: is a number (output)

ref: is a string handle

ind: is the index of the data item to pick

delim: is the delimiter between the items (optional).

OS.GETSTR() return a data item as a string

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 681 / 7399


NAPA for Design Manuals 2016.3

str: is a string (output)

ref: is a string handle

ind: is the index of the data item to pick

delim: is the delimiter between the items (optional).

OS.FREE() free a string handle

A string handle is freed with the function

@os.free(ref)

where

ref: is a string handle.

OS.FREEALL() free all string handles

All string handles are freed with the function

@os.freeall()

Be careful!

OS.SEARCH() search for a string

A string item can be searched from a string handle with the function

@ind=os.search(ref,str,delim,case)

where

ind: is the index of the found item or 0 (output)

ref: is a string handle

str: is the string to search

delim: is the delimiter between items

case: is the case specification:

0 = case insensitive search

1 = case sensitive search.

OS.UPPER() convert to uppercase

A parameter of any type can be converted to uppercase letters with the function

@res=os.upper(par)

where

res: is a string or number parameter in uppercase (output)

par: is the parameter to convert.

Note that array and string handle parameters are converted themselves and a result value is
not returned.

OS.LOWER() convert to lowercase

A parameter of any type can be converted to lowercase letters with the function

@res=os.lower(par)

Copyright © 1992 - 2016 NAPA. All rights reserved. 682 / 7399


NAPA for Design Manuals 2016.3

where

res: is a string or number parameter in lowercase (output)

par: is the parameter to convert.

Note that array and string handle parameters are converted themselves and a result value is
not returned.

OS.TOSTR() convert to a string

A parameter of any type can be converted to a string without evaluating it with the function

@str=os.tostr(par)

where

str: is the parameter as a string (output)

par: is the parameter to convert.

This function is used to convert array and string handle parameters themselves to strings, not
their contents.

OS.TOREF() convert to a reference

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

ref: is the parameter as a reference (output)

par: is the string parameter to convert.

This function is used to convert strings representing references, not their contents.

OS.ISNUM() test if a number

A string parameter can be tested before converting it to a number with the function

@test=os.isnum(par)

where

test: is the result of the test (output)

0: not a number

1: is a number

par: is the string parameter to test.

OS.IS() test

A string parameter can be tested with the function

@test=os.is(par,test)

where

test: is the result of the test (output)

Copyright © 1992 - 2016 NAPA. All rights reserved. 683 / 7399


NAPA for Design Manuals 2016.3

0: did not pass the test

1: passed the test

par: is the string parameter to test

test: is the test to perform (optional):

0: alphabetic (default)

1: alphanumeric

2: graphic (any printing character except space)

3: printing (any printing character including space)

4: digit

5: hexadecimal digit

6: punctuation (any printing character except space and alphanumeric characters)

7: space (CR, FF, HT,NL, VT, space, etc)

8: control

9: lower case

10: upper case.

OS.MEMTOTAL() total amount of virtual memory

The total amount of available virtual memory is checked with the function

@total=os.memtotal()

where

total: is the total amount of virtual memory (output).

OS.MEMUSED() used amount of virtual memory

The used amount of available virtual memory is checked with the function

@used=os.memused()

where

used: is the used amount of virtual memory (output).

OS.MEMLOAD() used blocks

The number of used memory blocks is checked with the function

@n=os.memload()

where

n: is the number of used memory blocks (output).

10.2. File I/O functions

OS.OPENDEVICE() open device

Devices can be opened with the function

@fnr=os.opendevice(name)

where

Copyright © 1992 - 2016 NAPA. All rights reserved. 684 / 7399


NAPA for Design Manuals 2016.3

fnr: is handle to the open device (output)

name: is the name of the device.

OS.OPENFILE() open file

Files can be opened with the function

@fnr=os.openfile(name,mode,encoding)

where

fnr: is handle to the open file (output)

name: is the name of the file

mode: is the access mode (optional):

0: read/write access (default)

1: read only access.

2: append file.

encoding: encoding of the file (optional, default 'utf-8'):

'binary': read the bytes in the file as they are

'default': use platform default encoding

For a list of encodings, see e.g.


http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx

OS.CREATEFILE() create file

Files can be created with the function

@fnr=os.createfile(name,trunc,encoding)

where

fnr: is handle to the open file (output)

name: is the name of the file to create

trunc: tells whether to truncate existing files (optional):

0: invoke an error if the file exists already (default)

1: truncate an existing file.

encoding: encoding of the file (optional), see os.openfile for details

OS.CLOSEFILE() close file

Files and devices can be closed with the function

@os.closefile(fnr)

where

fnr: is a handle to the open file or device.

OS.DELETEFILE() delete file

Files can be deleted with the function

@os.deletefile(name)

Copyright © 1992 - 2016 NAPA. All rights reserved. 685 / 7399


NAPA for Design Manuals 2016.3

where

name: is the name of the file.

OS.FILEEXISTS() test file

Files can be tested with the function

@test=os.fileexists(name)

where

test: is the result of the test (output):

0: file does not exist

1: file exists

-1: file's existence can't be determined (e.g. due to insufficient access rights or inaccessible
network drive)

name: is the name of the file.

OS.READ() read file

Data can be read from a file or device with the functions

@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

ref: is a result string handle (output)

num: is a result number (output)

str: is a result string (output)

fnr: is a handle to the open file or device

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):

EOL: until end of line (default)

EOF: until end of file

EOT: until end of text (line breaks are converted to single line feeds)

SB: read a signed byte from a binary file

UB: read an unsigned byte from a binary file

SS: read a signed short from a binary file

US: read an unsigned short from a binary file

SI: read a signed integer from a binary file

UI: read an unsigned integer from a binary file

SL: read a signed long from a binary file

Copyright © 1992 - 2016 NAPA. All rights reserved. 686 / 7399


NAPA for Design Manuals 2016.3

UL: read an unsigned long from a binary file

FLT: read a float from a binary file

DBL: read a double from a binary file

timer: is timeout in milliseconds to wait for a device (optional, default is forever).

OS.WRITE() write file

Data can be write to a file or device with the function

@os.write(fnr,data,delim)

where

fnr: is a handle to the open file or device

data: is the data to write

delim: is the delimiter character to append after data or one of special delimiters (optional):

EOL: end of line (default)

EOF: end of file

EOT: end of text (line feeds are converted to local line breaks).

SB: write a signed byte to a binary file

UB: write an unsigned byte to a binary file

SS: write a signed short to a binary file

US: write an unsigned short to a binary file

SI: write a signed integer to a binary file

UI: write an unsigned integer to a binary file

SL: write a signed long to a binary file

UL: write an unsigned long to a binary file

FLT: write a float to a binary file

DBL: write a double to a binary file

OS.SEEKFILE() seek file

The current position of the file can be moved with the function

@pos=os.seekfile(fnr,offset,base)

where

pos: is the resulting position (output)

fnr: is a handle to the open file or device

offset: is the number of characters to move the position (optional, default is 0)

base: is the base position for the offset (optional):

0: start of file (default)

1: end of file

2: current position.

OS.TRUNCKFILE() truncate file

Copyright © 1992 - 2016 NAPA. All rights reserved. 687 / 7399


NAPA for Design Manuals 2016.3

Files can be truncated with the function

@os.truncfile(fnr,size)

where

fnr: is a handle to the open file or device

size: is the number of characters to leave to the file (optional, default is 0).

OS.FILETYPE() file type

Type of the file can be checked with the function

@info=os.filetype(name)

where

info: is the type of the file (output):

1: file

2: directory

3: device

4: pipe

name: is the name of the file.

OS.FILESIZE() file size

Size of the file can be checked with the function

@info=os.filesize(name)

where

info: is the size of the file (output)

name: is the name of the file.

OS.FILECDATE() file creation date

Creation date of the file can be checked with the function

@info=os.filecdate(name)

where

info: is the creation date of the file (output)

name: is the name of the file.

OS.FILEMDATE() file modification date

Modification date of the file can be checked with the function

@info=os.filemdate(name)

where

info: is the modification date of the file (output)

name: is the name of the file.

OS.COPYFILE() copy file

Files can be copied with the function

Copyright © 1992 - 2016 NAPA. All rights reserved. 688 / 7399


NAPA for Design Manuals 2016.3

@os.copyfile(source,target)

where

source: is the name of the source file

target: is the name of the target file.

OS.MOVEFILE() move file

Files can be moved with the function

@os.movefile(source,target)

where

source: is the name of the source file

target: is the name of the target file.

OS.MAKEPATH() make pathname

Full pathnames of files can be made with the function

@path=os.makepath(file,direc)

where

path: is the resulting pathname (output)

file: is a full or partial pathname of a file

direc: is a full or partial pathname of a directory (optional).

OS.FILENAME() get file name

File names can be retrieved from pathnames with the function

@file=os.filename(path)

where

file: is the name of the file (output)

path: is the pathname of the file.

OS.DIRECPATH() get directory path

Directory paths can be retrieved from pathnames with the function

@direc=os.direcpath(path,delim)

where

direc: is the path of the directory (output)

path: is the pathname of the file

delim: delimiter option (optional):

0: drop off the last path delimiter (default)

>0: include the last path delimiter.

OS.SETLINEOI() set line i/o mode on

The communication device can be set to line i/o mode with the function

@os.setlineio(dnr,timeout)

Copyright © 1992 - 2016 NAPA. All rights reserved. 689 / 7399


NAPA for Design Manuals 2016.3

where

dnr: is a handle to the open device

timeout: is the timeout to wait for the device during read operations (optional, default is forever (-1))

OS.MKDIR() create directory

A new directory can be created with the function

@os.mkdir(path)

path: pathname of the directory

10.3. Other functions

OS.ID() operating system id

The id of the current operating system and hardware can be obtained with the function

@osid=os.id()

where

osid: is the id (output):

WNT: Windows NT, 2000, XP, Vista or 7

OS.MSECS() milliseconds

Elapsed process time in milliseconds is returned by the function

@msecs=os.msecs()

where

msecs: is the elapsed time (output).

OS.PATTERN() search pattern

Search patterns are interpreted with the function

@ptrn=os.pattern(str)

where

ptrn: is the interpreted pattern (output)

str: is the string to interprete.

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 (\).

OS.MESSAGE() message string

Messages are interpreted with the function

@msg=os.message(str,par)

where

msg: is the interpreted message (output)

str: is the string to interprete

Copyright © 1992 - 2016 NAPA. All rights reserved. 690 / 7399


NAPA for Design Manuals 2016.3

par: is a parameter (optional).

The string can contain one ambersand (&) which is replaced by the parameter, if given.

OS.SIGNAL() signal handling

Signal handling can be controlled with the function

@os.signal(onOff)

where

onOff: controls signal handling:

0: sets signal handling off

1: sets signal handling on

2: sets signal handling on and aborts FPEs

Copyright © 1992 - 2016 NAPA. All rights reserved. 691 / 7399


NAPA for Design Manuals 2016.3

Graphical user interface


This chapter contains a short introduction to implementation to the graphical user interface, including a presentation of the related service
functions.

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.

4. Functions of the group UI


This group contains functions supporting the graphical user interface.

UI.ABOUT about UI 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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 692 / 7399


NAPA for Design Manuals 2016.3

Arr return the result as a calculator array given as the last parameter to the function

Ref return the result as a string handle

Num return the result as a number

Str return the result as a string.

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.

The highest level of the interface is implemented as transparent commands available


everywhere in NAPA and having a '!!' prefix. These commands provide a simple command line
interface to NAPA/Motif widgets. The list of the commands can be displayed with the command

!COMMANDS GUI

4.1. Widget definition descriptions

UI.BUILD() build widgets in a widget definition description

Widget definition descriptions are built with the function

@wid=ui.build(des,pid,name,resi,vali,...,state)

where

wid: is the id of the first created widget (output)

des: is the name or ref.nr. of the widget definition description

pid: is the id or pathname of the parent of the first widget

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 693 / 7399


NAPA for Design Manuals 2016.3

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'.

UI.REBUILD() rebuild widgets in a widget definition description

Widget definition descriptions are rebuilt with the function

@wid=ui.rebuild(des,pid,name,resi,vali,...,state)

The function calls first ui.release() and then ui.build().

UI.DESTROY() destroy widgets in a widget definition description

Built widget definition descriptions are destroyed with the function

@ui.destroy(des)

where

des: is the ref.nr. of the widget definition description.

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() release a widget definition description

Built widget definition descriptions are released with the function

@ui.release(des)

where

des: is the ref.nr. of the widget definition description.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 694 / 7399


NAPA for Design Manuals 2016.3

UI.UPDATE() update resources of built widgets

Resources of built widgets are updated with the function

@ui.update(des,opt)

where

des: is the ref.nr. of the widget definition description

opt: specifies the type of resources to update (optional):

D: default (strings, numbers, Booleans, constants and widgets)

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() retrieve resources of built widgets

Resources of built widgets are retrieved with the function

@ui.retrieve(des,opt)

where

des: is the ref.nr. of the widget definition description

opt: specifies the type of resources to retrieve (optional):

D: default (strings, numbers, Booleans, constants and widgets)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 695 / 7399


NAPA for Design Manuals 2016.3

4.2. Widget manipulation

UI.CREATE() create a new widget

New widget instances are created with the function

@wid=ui.create(pid,name,class,resi,vali,...,state)

where

wid: is the id of the new widget (output)

pid: is the id or pathname of the parent of the new widget

name: is the instance name of the new widget

class: is the widget class of the new widget

resi,vali: are an optional set of resource/value pairs

state: is the opening state option.

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() delete a widget

Widget instances can be deleted with the function

@ui.delete(wid)

where

wid: is the id or pathname of the widget.

Possible children of the widget are also deleted.

UI.SET() specify widget resources

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 696 / 7399


NAPA for Design Manuals 2016.3

wid: is the id of the widget

resi,vali: are a set of resource/value pairs.

A new value always replaces the existing value of the resource.

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.

UI.QUERY() query widget resources

Values for widget resources can be queried from the resource files with the function

@ui.query(wid,sblng,resi, ...)

where

wid: is the id of the widget

sblng: is the name of the sibling widget which resources are queried (can be empty)

resi: are a set of resources.

The found resources are set for the specified widget.

UI.ADDCB() add a callback

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

wid: is the id or pathname of the widget

callback: is the name of the callback or event to specify

value is the command/macro to send/evaluate during the callback.

UI.REMOVECB() remove a callback

Callbacks can be removed from the widget with the function

@ui.removecb(wid,callback,value)

where

wid: is the id or pathname of the widget

Copyright © 1992 - 2016 NAPA. All rights reserved. 697 / 7399


NAPA for Design Manuals 2016.3

callback: is the name of the callback or event to remove

value: is the command/macro to remove (if not given, all callbacks with the specified name are
removed).

UI.OPEN() open a widget

Widgets can be opened with the function

@ui.open(wid,mode)

where

wid: is the id or pathname of the widget

mode: is an optional mode:

0 = modeless (default)

1 = modal (exclusive)

2 = modal (non-exclusive)

9 = modal (spring loaded).

UI.CLOSE() close a widget

The command

@ui.close(wid,mode)

where

wid: is the id or pathname of the widget

mode: is an optional mode:

0 = modeless (default)

1 = modal (exclusive)

2 = modal (non-exclusive)

9 = modal (spring loaded)

closes a widget or, if the mode parameter is not 0, restores its mode.

UI.SHOW() show a widget

Widgets can be shown (mapped) with the function

@ui.show(wid)

where

wid: is the id or pathname of the widget.

UI.HIDE() hide a widget

The function

@ui.hide(wid)

where

wid: is the id or pathname of the widget

Copyright © 1992 - 2016 NAPA. All rights reserved. 698 / 7399


NAPA for Design Manuals 2016.3

hides (unmaps) widgets.

UI.GET() get a widget resource

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

wid: is the id or pathname of the widget

res: is the name of the resource

arr: is a ref.nr. of a calculator array into which to store the resource value

ref: is a handle to a string containing the resource value (output)

num: is the resource value as a number (output)

str: is the resource value as a string (output).

EXAMPLES

The command
@w=ui.getnum(0,'width')

assigns the width of the 'napa' widget to the variable w.

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.

UI.IS() status of a widget

The status of a widget can be tested with the function

@test=ui.is(wid,prop)

where

test: is the result of the test (0/1, output)

wid: is the id or pathname of the widget

prop: is the property to test:

not given = test existance (default)

open = test status

popped = test status

visible = test visibility

Copyright © 1992 - 2016 NAPA. All rights reserved. 699 / 7399


NAPA for Design Manuals 2016.3

widget = test class

gadget = test class

shell = test class

composite = test class

primitive = test class.

UI.WID() id of a widget

The id of a widget is returned by the function

@wid=ui.wid(path,pid)

where

wid: is the id of the widget (output)

path: is the pathname of the widget

pid: is the id or pathname of the parent of the widget (optional).

UI.PID() id of the parent of a widget

The id of the parent of a widget is returned by the function

@pid=ui.pid(wid)

where

pid: is the id of the parent of the widget (output)

wid: is the id or pathname of the widget.

UI.NAME() name of a widget

The name of a widget is returned by the function

@name=ui.name(wid)

where

name: is the name of the widget (output)

wid: is the id or pathname of the widget.

UI.PATH() pathname of a widget

The pathname of a widget is returned by the function

@path=ui.path(wid)

where

path: is the pathname of the widget (output)

wid: is the id or pathname of the widget.

UI.SETTITLE() set title of a widget

The title of a shell or a dialog widget is set with the function

@ui.settitle(wid,title,spec)

where

wid: is the id or pathname of the widget

Copyright © 1992 - 2016 NAPA. All rights reserved. 700 / 7399


NAPA for Design Manuals 2016.3

title: is the new title

spec: is an additional specifier to the title (optional).

By default, the specifier contains the current version, project and run identification.

UI.GETTITLE() get title of a widget

The title of a shell or a dialog widget is returned by the function

@title=ui.gettitle(wid)

where

title: is the title (output)

wid: is the id or pathname of the widget.

UI.MAKELONGNAME() make a long name from name components

This function is obsolete. Use DB.MAKELONGNAME

UI.GETNAMECOMPS() get name components from the long name

This function is obsolete. Use DB.GETNAMECOMPS

UI.ACTIVATE() activate a widget

The function

@ui.activate(wid,sel,'\f','parj',...)

where

wid: is the id or pathname of the widget

parj: are optional parameters to callback macros invoked by the action

can be used for calling the activate action of widgets belonging to ArrowButton,
CascadeButton, DrawnButton, PushButton, ToggleButton, Text, TextField or List classes.

UI.INVOKE() invoke a user callback

The function

@ui.invoke(wid,'\f','parj',...)

where

wid: is the id or pathname of the widget

sel: is the optional selector of the callback

parj: are optional parameters to callback macros invoked by the action

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.

UI.ASK() open a modal dialog

Copyright © 1992 - 2016 NAPA. All rights reserved. 701 / 7399


NAPA for Design Manuals 2016.3

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

wid: is the id or pathname of the widget

def: is default data for the widget (optional)

arr: is a ref.nr. of a calculator array into which to store the result value from the widget

ref: is a handle to a string containing the result value (output)

num: is the result value as a number (output)

str: is the result value as a string (output).

UI.ANSWER() build a modal dialog

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

des: is the name or ref.nr. of the widget definition description

pid: is the id or pathname of the parent of the first widget

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

def: is default data for the widget (optional)

arr: is a ref.nr. of a calculator array into which to store the result value from the widget

ref: is a handle to a string containing the result value (output)

num: is the result value as a number (output)

str: is the result value as a string (output).

UI.REQUEST() open a modal widget with embedded callbacks

To open modal widgets with embedded callbacks, the following function can be called.

@ui.request(wid,'\f','pari',...)

where

wid: is the id or pathname of the widget

pari: is a list of parameters to the callbacks of the widget

Copyright © 1992 - 2016 NAPA. All rights reserved. 702 / 7399


NAPA for Design Manuals 2016.3

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.

UI.MODAL() open a modal widget with full callback capability

To open modal widgets with full callback capability, the following function can be called.

@ui.modal(wid,'\f','pari',...)

where

wid: is the id or pathname of the widget

pari: is a list of parameters to the callbacks of the widget

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

UI.MERGE() merge custom resources

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

overr: tells whether to override existing resources (optional):

0: do not override resources already specified (default)

1: override existing resources with the new ones.

UI.FLUSH() flush output buffers

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.

UI.MSG() display a status message

Status messages can be displayed in the status bar with the function

@ui.msg(wid,message)

where

wid: is the id or pathname of the widget of interest

message: is the message to display.

UI.OPENMSG() open a status bar

Copyright © 1992 - 2016 NAPA. All rights reserved. 703 / 7399


NAPA for Design Manuals 2016.3

Status bar can be opened with the function

@ui.openmsg(wid,message)

where

wid: is the id or pathname of the widget of interest

message: is a message to display in the status bar (optional).

UI.CLOSEMSG() close a status bar

Status bar can be closed with the function

@ui.closemsg(wid,message)

where

wid: is the id or pathname of the widget of interest

message: is a message to display in the status bar (optional).

UI.SETCURSOR() change the cursor

The shape of the cursor can be changed with the function

@ui.setcursor(wid,cursor)

where

wid: is the id or pathname of the widget

cursor: is the name of the cursor (if not given, the default cursor is used).

UI.BEEP() beep

The system beep can be played with the function

@ui.beep()

UI.FIND() find a widget description

To find a named widget description, either a collection or a definition, the following function can
be called.

@des=ui.find(name)

where

des: is the reference number of the description (output)

name: is the name of the description

UI.EXIT() exit from NAPA

To exit from NAPA, the following function can be called.

@ui.exit()

UI.SWITCHLOG() switch the command log widget

The current command log widget can be changed with the following function can be called.

@ui.switchlog(wid)

where

wid: is the id or name of the new command log widget.

Copyright © 1992 - 2016 NAPA. All rights reserved. 704 / 7399


NAPA for Design Manuals 2016.3

UI.AUX() auxiliary input device

Auxialiary input devices, like tablets, can be controlled with the function

@ui.aux(function,id,param1,param2,...)

where

function: can be

CON(FIG): for configuring the input port

OPE(N): for opening the port

CLO(SE): for closing the port

DEL(ETE): for closing the port and deleting its configuration

SEN(D): for sending data to the port

ENA(BLE): for enabling input from the port

DIS(ABLE): for disabling input from the port (events are sent)

id: is the id of the device (0=default)

parami: are additional parameters for the functions.

The CONFIG function accepts the following parameter pairs:

'NAME',inputportname

'BAUD',baudrate (1200 - 38400)

'PARI',parity (1=none, 2=even, 3=odd)

'STOP',stopbits (1 - 2)

'BITS',bitsperbyte (5 - 8)

'FLOW',flowcontrol (1 = on, 2 = off)

'TIME',timeouttowait (milliseconds).

The SEND function takes the data to send as a parameter.

4.4. Internal

UI.NEW() create a widget definition description

@des=ui.new()

UI.FREE() free a widget definition description

@ui.free(des)

UI.READ() read a widget definition description

@des=ui.read(name,vers,unit)

UI.WRITE() write a widget definition description

@ui.write(des,name,vers,unit)

Copyright © 1992 - 2016 NAPA. All rights reserved. 705 / 7399


NAPA for Design Manuals 2016.3

UI.EXISTS() test a widget definition description

@test=ui.exists(name,vers,unit)

UI.REMOVE() remove a widget definition description

@ui.remove(name,vers,unit)

UI.NEWDEF() create a widget definition

@def=ui.newdef(des,pos,class,name,st,f)

UI.READDEF() read a widget definition

@def=ui.readdef(des,pos)

UI.WRITEDEF() write a widget definition

@ui.writedef(def,class,name,st,f)

UI.REMOVEDEF() remove a widget definition

@ui.removedef(def)

UI.COPYDEF() copy a widget definition

@def=ui.copydef(def,ind,des)

UI.MOVEDEF() move a widget definition

@def=ui.movedef(def,ind,des)

UI.NEWRES() create a resource

@rec=ui.newres(def,res,typ)

UI.READRES() read a resource

@rec=ui.readres(def,res,ind)

UI.WRITERES() write a resource

@ui.writeres(rec,val)

UI.REMOVERES() remove a resource

@ui.removeres(rec)

UI.MOVERES() move a resource

@rec=ui.moveres(rec,ind)

UI.NEWSEL() create a resource selector

@rec=ui.newsel(rec)

UI.READSEL() read a resource selector

@rec=ui.readsel(rec)

UI.WRITESEL() write a resource selector

@ui.writesel(rec,sel,name)

Copyright © 1992 - 2016 NAPA. All rights reserved. 706 / 7399


NAPA for Design Manuals 2016.3

UI.REMOVESEL() remove a resource selector

@ui.removesel(rec)

UI.DEFLIST() list of widget definitions

@ref=ui.deflist(des,typ)

UI.DEFID() definition id

@id=ui.defid(def)

UI.DEFIND() definition index

@ind=ui.defind(def)

UI.RESLIST() list of resources

@ref=ui.reslist(def,typ)

UI.RESID() resource id

@rid=ui.resid(res)

UI.RESNR() resource number

@rnr=ui.resnr(res)

UI.RESTYPE() resource type

@typ=ui.restype(res,spec)

UI.READPOS() read a resource position

@rec=ui.readpos(def,pos)

UI.COLLECT() make a widget collection description

@des=ui.collect(des,type)

UI.LOAD() load a widget description

@ui.load(des,name,unit)

UI.UNLOAD() unload a widget description

@ui.unload(name,unit)

5. Events of the group UI

UI*WINDOWCREATED() new window created

This event is raised when a new top level shell window to be registered in the window menu is
created (280001).

UI*WINDOWCREATED(wid)

wid: id of the window

UI*WINDOWDELETED() window deleted

Copyright © 1992 - 2016 NAPA. All rights reserved. 707 / 7399


NAPA for Design Manuals 2016.3

This event is raised when a top level shell window registered in the window menu is deleted
(280002).

UI*WINDOWCREATED(wid)

wid: id of the window

UI*WINDOWUPDATED() window updated

This event is raised when a top level shell window registered in the window menu is updated
(280003).

UI*WINDOWUPDATED(wid)

wid: id of the window

UI*DRSETUPAPPLIED() setup applied

This event is raised when the updated setup is applied in the setup definition widget (282120).

UI*DRSETUPAPPLIED(vnr,drw)

vnr: view number

drw: setup drawing

UI*DRSETUPOPENED() setup loaded

This event is raised when a new setup is opened in the setup definition widget (282121).

UI*DRSETUPOPENED(wa,stp)

wa: name of the work area

stp: reference number of the setup description or 0 for a new one

UI*DRSETUPCLOSED() setup closed

This event is raised when the setup is closed in the setup definition widget (282122).

UI*DRSETUPCLOSED(wa)

wa: name of the work area

UI*DRSETUPUPDATED() setup updated

This event is raised when the setup is updated in the setup definition widget (282123).

UI*DRSETUPUPDATED(wa)

wa: name of the work area

UI*DRSETUPSELECTED() setup part seletected

This event is raised when a part of the setup is selected in the setup definition widget (282124).

UI*DRSETUPSELECTED(vnr,ind)

vnr: view number

ind: index of the part

UI*DRPROPERTIESOPENED() drawing properties opened

This event is raised when the drawing properties dialog is opened (282128).

UI*DRPROPERTIESOPENED(wid)

wid: widget id

Copyright © 1992 - 2016 NAPA. All rights reserved. 708 / 7399


NAPA for Design Manuals 2016.3

UI*DRPROPERTIESCLOSED() drawing properties closed

This event is raised when the drawing properties dialog is closed (282128).

UI*DRPROPERTIESCLOSED(wid)

wid: widget id

UI*TPCHANGE() table contents changed

This event is raised when the contents of a table in the table widget is changed (281907).

UI*TPCHANGE(twa,ref)

twa: name of the work area

ref: reference number of the table

UI*TPCHGDEF() table definition changed

This event is raised when the definition of a table in the table widget is changed (281915).

UI*TPCHGDEF(twa,ref,c)

twa: name of the work area

ref: reference number of the table

c: 0 = old table 1 = renamed table 2 = new table

UI*TPUNLOADWA() table closed

This event is raised when a table in the table widget is closed (281927).

UI*TPUNLOADWA(twa)

twa: name of the work area

UI*CUROBJECTCHANGED() current object changed

This event is raised by GUI (impl. in Steel) when current object is changed (281930).

UI*CUROBJECTCHANGED(wid,object,subobject)

wid: id of the window

object: new current object

subobject: new current subobject

UI*STDRAWINGCREATED() Steel drawing created

This event is raised by GUI (impl. in Steel) when drawing is created by the 2d plot macro
(281931).

UI*STDRAWINGCREATED(mode,axis,sec)

mode: drawing mode

axis: the projection axis x,y or z

subobject: the section coordinate

UI*STSKETCHEDIT() Edit parametric object

This event is raised by GUI (impl. in Steel) when edit of parametric object is started (281932).

UI*STSKETCHEDIT(rid,name)

Copyright © 1992 - 2016 NAPA. All rights reserved. 709 / 7399


NAPA for Design Manuals 2016.3

rid: root widget id

name: name of the object

UI*STSKETCHCOPY() Copy parametric object

This event is raised by GUI (impl. in Steel) when copy of parametric object is started (281933).

UI*STSKETCHCOPY(rid,name)

rid: root widget id

name: name of the object

UI*STSKETCHDELETE() Delete parametric object

This event is raised by GUI (impl. in Steel) when copy of parametric object is started (281934).

UI*STSKETCHDELETE(rid,name)

rid: root widget id

name: name of the object

6. Functions of the group MTF


This group contains basic functions provided by Motif. As a general rule, user macros should rely on functions from the UI group rather than
directly on MTF.

MTF.About() about Mtf 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

Ref return the result as a string handle

Num return the result as a number

Str return the result as a string.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 710 / 7399


NAPA for Design Manuals 2016.3

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.

The highest level of the interface is implemented as transparent commands available


everywhere in NAPA and having a '!!' prefix. These commands provide a simple command line
interface to NAPA/Motif widgets. The list of the commands can be displayed with the command

!COMMANDS GUI

MTF.PromptDelimiter() set/get XuiNpromptDelimiter resource

@res=Mtf.PromptDelimiter(wid{, val})

res: current value of the resource (output)

wid: id of any widget (typically 0)

val: string resource value used as a delimiter between the prompt and user input (optional)

MTF.CallbackEcho() set/get XuiNcallbackEcho resource

@res=Mtf.CallbackEcho(wid{, val})

res: current value of the resource (output)

wid: id of any widget (typically 0)

val: Boolean resource value specifying whether to echo names of callback functions during
run-time (optional)

MTF.FlushInterval() set/get XuiNflushInterval resource

@res=Mtf.FlushInterval(wid{, val})

res: current value of the resource (output)

wid: id of any widget (typically 0)

val: numeric resource value specifying in milliseconds the interval between flushings of
alphanumeric output buffers (optional)

MTF.ExposeInterval() set/get XuiNexposeInterval resource

@res=Mtf.ExposeInterval(wid{, val})

res: current value of the resource (output)

wid: id of any widget (typically 0)

val: numeric resource value specifying in milliseconds the interval between flushings of graphic
output buffers (optional)

MTF.UnitOfWidgets() set/get XuiNunitOfWidgets resource

@res=Mtf.UnitOfWidgets(wid{, val})

res: current value of the resource (output)

Copyright © 1992 - 2016 NAPA. All rights reserved. 711 / 7399


NAPA for Design Manuals 2016.3

wid: id of any widget (typically 0)

val: numeric resource value specifying the database search order of widget descriptions (optional):

0: napadb, sysdb (default)

1: projdb, sysdb, napadb

2: sysdb, napadb

4: auxdb, sysdb, napadb

7: napadb

MTF.ShowTips() set/get XuiNshowTips resource

@res=Mtf.ShowTips(wid{, val})

res: current value of the resource (output)

wid: id of any widget (typically 0)

val: Boolean resource value specifying whether to show tip windows (optional)

MTF.EnableTip() enable toolbar tips for the given widget

@Mtf.EnableTip(wid)

MTF.DisableTip() disable toolbar tips for the given widget

@Mtf.DisableTip(wid)

MTF.ShowTip() show a toolbar tip for the given widget

@Mtf.ShowTip(wid)

MTF.HideTip() hide the toolbar tip for the given widget

@Mtf.HideTip(wid)

MTF.SwitchLog() change command log

@Mtf.SwitchLog(wid)

MTF.LockEvents() lock event handling

@Mtf.LockEvents(wid)

MTF.UnlockEvents() unlock event handling

@Mtf.UnlockEvents(wid)

MTF.CloseImages() close all images of the widget

@Mtf.CloseImages(wid)

MTF.GetImage() get the image id of the widget

@id=Mtf.GetImage(wid)

MTF.GetRGB() get the indexed colour in RGB format

@rgb=Mtf.GetRGB(wid,ind)

MTF.GetImageBuffer() get the contents of the image as a bitmap

Copyright © 1992 - 2016 NAPA. All rights reserved. 712 / 7399


NAPA for Design Manuals 2016.3

@str=Mtf.GetImageBuffer(wid, spec)

MTF.LoadImageBuffer() load the contents of the image to a cache

@Mtf.LoadImageBuffer(wid, spec{, pname})

MTF.ErrorMessageTimeout() set/get XuiNerrorMessageTimeout resource

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})

MTF.ErrorReportLevel() set/get XuiNerrorReportLevel resource

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})

MTF.DiscardedErrorCodes() set/get XuiNdiscardedErrorCodes resource

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})

MTF.AutoUpdateTables() set/get XuiNautoUpdateTables resource

@res=Mtf.AutoUpdateTables(wid{, val})

MTF.CreateWidget() see UI.CREATE()

@wid=Mtf.CreateWidget(pid, name, class{, resi, vali, ...}{, state})

MTF.DeleteWidget() see UI.DELETE()

@Mtf.DeleteWidget(wid)

MTF.SetResource() see UI.SET()

@Mtf.SetResource(wid, resi, vali{, ...})

MTF.GetResource() see UI.GET()

@str=Mtf.GetResource(wid, res)

MTF.AddCallback() see UI.ADDCB()

@Mtf.AddCallback(wid, res, val)

MTF.RemoveCallback() see UI.REMOVECB()

@Mtf.RemoveCallback(wid, res{, val})

MTF.SetClientEventFilter() set filter for client events

@Mtf.SetClientEventFilter(wid, event{, filter})

Copyright © 1992 - 2016 NAPA. All rights reserved. 713 / 7399


NAPA for Design Manuals 2016.3

MTF.SetTitle() see UI.SETTITLE()

@Mtf.SetTitle(wid, title)

MTF.GetTitle() see UI.GETTITLE()

@title=Mtf.GetTitle(wid)

MTF.QueryResource() see XrmGetResource()

@val=Mtf.QueryResource(wid, child, res)

MTF.QuerySetResource() see UI.QUERY()

@Mtf.QuerySetResource(wid, sblng, resi{, ...})

MTF.OpenWidget() see UI.OPEN()

@Mtf.OpenWidget(wid{, mode})

MTF.CloseWidget() see UI.CLOSE()

@Mtf.CloseWidget(wid{, mode})

MTF.ShowWidget() see UI.SHOW()

@Mtf.ShowWidget(wid)

MTF.HideWidget() see UI.HIDE()

@Mtf.HideWidget(wid)

MTF.EnableHelp() enable help tips for the given widget

@Mtf.EnableHelp(wid)

MTF.DisableHelp() disable help tips for the given widget

@Mtf.DisableHelp(wid)

MTF.ShowHelp() show a help tip for the given widget

@Mtf.ShowHelp(wid{, text})

MTF.HideHelp() hide the help tip of the given widget

@Mtf.HideHelp(wid{, text})

MTF.WaitForWidget() wait for a modal widget

@Mtf.WaitForWidget(wid)

MTF.ActivateWidget() see UI.ACTIVATE()

@Mtf.ActivateWidget(wid{, '\f', 'pari', ...})

MTF.InvokeMacro() see UI.INVOKE()

@Mtf.InvokeMacro(wid{, '\f', 'pari', ...})

MTF.Iconify() see XIconifyWindow()

@Mtf.Iconify(wid)

Copyright © 1992 - 2016 NAPA. All rights reserved. 714 / 7399


NAPA for Design Manuals 2016.3

MTF.ToTop() see XRaiseWindow()

@Mtf.ToTop(wid)

MTF.ToBottom() see XLowerWindow()

@Mtf.ToBottom(wid)

MTF.RestackChildren() see XRestackWindows()

@Mtf.RestackChildren(pid, namei{, ...})

MTF.PopupMenu() see XmMenuPosition()

@Mtf.PopupMenu(wid)

MTF.SetCursor() see UI.SETCURSOR()

@Mtf.SetCursor(wid{, cursor})

MTF.Interrupt() raise an interrupt signal

@Mtf.Interrupt(wid)

MTF.NextEvent() process the next event

@Mtf.NextEvent(wid)

MTF.ParentWidget() parent of a widget

@parent=Mtf.ParentWidget(wid)

MTF.ShellWidget() shell of a widget

@shell=Mtf.ShellWidget(wid)

MTF.WidgetClass() class of a widget

@class=Mtf.WidgetClass(wid)

MTF.WidgetName() see UI.NAME()

@name=Mtf.WidgetName(wid)

MTF.WidgetPath() see UI.PATH()

@path=Mtf.WidgetPath(wid)

MTF.Id() widget id

@id=Mtf.Id(wid{, name})

MTF.Quark() widget quark

@quark=Mtf.Quark(wid{, string})

MTF.Is() see UI.IS()

@test=Mtf.Is(wid{, prop})

MTF.ResourceId() id of a resource

@name=Mtf.ResourceId(wid, rnr)

Copyright © 1992 - 2016 NAPA. All rights reserved. 715 / 7399


NAPA for Design Manuals 2016.3

MTF.Pointer() pointer status

@test=Mtf.Pointer(wid{, oper{, param}})

MTF.WidthOfScreen() width of the screen

@w=Mtf.WidthOfScreen(wid{, unit})

MTF.HeightOfScreen() height of the screen

@h=Mtf.HeightOfScreen(wid{, unit})

MTF.XToScreen() local x-coordinate to screen coordinates

@xg=Mtf.XToScreen(wid, x{, unit})

MTF.YToScreen() local y-coordinate to screen coordinates

@yg=Mtf.YToScreen(wid, y{, unit})

MTF.Fail() invoke an error

@Mtf.Fail(wid{, category{, number}})

MTF.GenEvent() generate an event

@Mtf.GenEvent(wid, event{, params})

MTF.NamesOf() names of resources

@list=Mtf.NamesOf(wid{, group})

MTF.ResourceType() type of a resource

@type=Mtf.ResourceType(wid, res{, spec})

MTF.CallCallbacks() see XtCallCallbacs()

@Mtf.CallCallbacks(wid, res)

MTF.HasCallbacks() see XtHasCallbacks()

@test=Mtf.HasCallbacks(wid, res)

MTF.AugmentTranslations() see XtAugmentTranslations()

@Mtf.AugmentTranslations(wid,translations)

MTF.OverrideTranslations() see XtOverrideTranslations()

@Mtf.OverrideTranslations(wid, translations)

MTF.IsTraversable() see XmIsTraversable()

@test=Mtf.IsTraversable(wid)

MTF.ProcessTraversal() see XmProcessTraversal()

@Mtf.ProcessTraversal(wid{, direction})

MTF.GetFocusWidget() see XmGetFocusWidget()

Copyright © 1992 - 2016 NAPA. All rights reserved. 716 / 7399


NAPA for Design Manuals 2016.3

@focus=Mtf.GetFocusWidget(wid)

MTF.GetVisibility() see XmGetVisibility()

@visibility=Mtf.GetVisibility(wid)

MTF.TrackingEvent() see XmTrackingEvent()

@xid=Mtf.TrackingEvent(wid, cursor, confine)

MTF.UpdateDisplay() see XmUpdateDisplay()

@Mtf.UpdateDisplay(wid)

MTF.StringExtent() see XmStringExtent()

@width=Mtf.StringExtent(wid, string)

MTF.MainWindowSetAreas() see XmMainWindowSetAreas()

@Mtf.MainWindowSetAreas(wid, mbar, cmd, hscroll, vscroll, work)

MTF.ScrolledWindowSetAreas() see XmScrolledWindowSetAreas()

@Mtf.ScrolledWindowSetAreas(wid, hscroll, vscroll, work)

MTF.List...() see XmList...()

Copyright © 1992 - 2016 NAPA. All rights reserved. 717 / 7399


NAPA for Design Manuals 2016.3

@Mtf.ListAddItem(wid, item, pos{, tag})


@Mtf.ListAddItems(wid, items, count, pos{, tags})
@Mtf.ListAddItemUnselected(wid, item, pos{, tag})
@Mtf.ListAddItemsUnselected(wid, items, count, pos{, tags})
@Mtf.ListDeleteAllItems(wid)
@Mtf.ListDeleteItem(wid, item{, tag})
@Mtf.ListDeleteItems(wid, items, count{, tags})
@Mtf.ListDeleteItemsPos(wid, count, pos)
@Mtf.ListDeletePos(wid, pos)
@Mtf.ListDeletePositions(wid, poslist, count)
@Mtf.ListDeselectAllItems(wid)
@Mtf.ListDeselectItem(wid, item{, tag})
@Mtf.ListDeselectPos(wid, pos)
@item=Mtf.ListGetItem(wid, pos)
@pos=Mtf.ListGetKbdItemPos(wid)
@poslist=Mtf.ListGetMatchPos(wid, item{, tag})
@poslist=Mtf.ListGetSelectedPos(wid)
@test=Mtf.ListItemExists(wid, item{, tag})
@pos=Mtf.ListItemPos(wid, item{, tag})
@test=Mtf.ListPosSelected(wid, pos)
@bounds=Mtf.ListPosToBounds(wid, pos)
@Mtf.ListReplaceItems(wid, olditems, count, newitems{, tags})
@Mtf.ListReplaceItemsPos(wid, newitems, count, pos{, tags})
@Mtf.ListReplaceItemsPosUnselected(wid, newitems, count, pos{, tags})
@Mtf.ListReplaceItemsUnselected(wid, olditems, count, newitems{, tags})
@Mtf.ListReplacePositions(wid, poslist, items, count{, tags})
@Mtf.ListSelectAllItems(wid)
@Mtf.ListSelectItem(wid, item, notify{, tag})
@Mtf.ListSelectPos(wid, pos, notify)
@Mtf.ListSelectMorePos(wid, pos, notify)
@Mtf.ListSetAddMode(wid, mode)
@Mtf.ListSetBottomItem(wid, item{, tag})
@Mtf.ListSetBottomPos(wid, pos)
@Mtf.ListSetHorizPos(wid, pos)
@Mtf.ListSetItem(wid, item{, tag})
@test=Mtf.ListSetKbdItemPos(wid, pos)
@Mtf.ListSetPos(wid, pos)
@Mtf.ListUpdateSelectedList(wid)
@pos=Mtf.ListYToPos(wid, y)

MTF.Text...() see XmText...()

Copyright © 1992 - 2016 NAPA. All rights reserved. 718 / 7399


NAPA for Design Manuals 2016.3

@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)

MTF.ScrollBar...() see XmScrollBar...()

@value=Mtf.ScrollBarGetValue(wid)
@Mtf.ScrollBarSetValue(wid, value{, slidersize{, increment{,
pageincrement}}}, notify)

MTF.ToggleButton...() see XmToggleButton...()

@state=Mtf.ToggleButtonGetState(wid)
@Mtf.ToggleButtonSetState(wid, state, notify)

MTF.InputField...() see XuiInputField...

@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})

MTF.Browser...() see XuiBrowser...()

Copyright © 1992 - 2016 NAPA. All rights reserved. 719 / 7399


NAPA for Design Manuals 2016.3

@Mtf.BrowserAddItem(wid, item, pos{, type, tag})


@Mtf.BrowserAddItems(wid, items, count, pos{, type, tags})
@Mtf.BrowserAddChild(wid, item, pos{, type, tag})
@Mtf.BrowserAddChildren(wid, items, count, pos{, type, tags})
@Mtf.BrowserAddItemUnselected(wid, item, pos{, type, tag})
@Mtf.BrowserAddItemsUnselected(wid, items, count, pos{, type, tags})
@Mtf.BrowserAddChildUnselected(wid, item, pos{, type, tag})
@Mtf.BrowserAddChildrenUnselected(wid, items, count, pos{, type, tags})
@Mtf.BrowserDeleteAllItems(wid)
@Mtf.BrowserDeleteItem(wid, item{, tag})
@Mtf.BrowserDeleteItems(wid, items, count{, tags})
@Mtf.BrowserDeleteChildren(wid, pos)
@Mtf.BrowserDeleteSiblings(wid, pos, count)
@Mtf.BrowserDeletePos(wid, pos)
@Mtf.BrowserDeletePositions(wid, poslist, count)
@Mtf.BrowserDeselectAllItems(wid)
@Mtf.BrowserDeselectItem(wid, item{, tag})
@Mtf.BrowserDeselectChildren(wid, item{, tag})
@Mtf.BrowserDeselectPos(wid, pos)
@item=Mtf.BrowserGetItem(wid, pos)
@items=Mtf.BrowserGetChildren(wid, pos)
@item=Mtf.BrowserGetOpenItem(wid, pos)
@pos=Mtf.BrowserGetKbdItemPos(wid)
@poslist=Mtf.BrowserGetMatchPos(wid, item{, tag})
@poslist=Mtf.BrowserGetOpenPos(wid)
@poslist=Mtf.BrowserGetSelectedPos(wid)
@test=Mtf.BrowserItemExists(wid, item{, tag})
@pos=Mtf.BrowserItemPos(wid, item{, tag})
@test=Mtf.BrowserPosExpanded(wid, pos)
@test=Mtf.BrowserPosOpen(wid, pos)
@test=Mtf.BrowserPosSelected(wid, pos)
@bounds=Mtf.BrowserPosToBounds(wid, pos)
@type=Mtf.BrowserPosType(wid, pos)
@Mtf.BrowserReparentAllItems(wid)
@Mtf.BrowserReparentPos(wid, pos, parent{, tag})
@Mtf.BrowserReparentPosChildren(wid, pos, parent{, tag})
@Mtf.BrowserReplaceItems(wid, olditems, count, newitems{, tags})
@Mtf.BrowserReplaceItemsPos(wid, newitems, count, pos{, tags})
@Mtf.BrowserReplaceItemsPosUnselected(wid, newitems, count, pos{, tags})
@Mtf.BrowserReplaceItemsUnselected(wid, olditems, count, newitems{, tags})
@Mtf.BrowserReplacePositions(wid, poslist, items, count{, tags})
@Mtf.BrowserSelectAllItems(wid)
@Mtf.BrowserSelectItem(wid, item, notify{, tag})
@Mtf.BrowserSelectPos(wid, pos, notify)
@Mtf.BrowserSetBottomItem(wid, item{, tag})
@Mtf.BrowserSetBottomPos(wid, pos)
@Mtf.BrowserSetHorizPos(wid, pos)
@Mtf.BrowserSetItem(wid, item{, tag})
@test=Mtf.BrowserSetKbdItemPos(wid, item{, tag})
@Mtf.BrowserSetPos(wid, pos)
@Mtf.BrowserSetPosPixmap(wid, pos, pixmap{, type})
@Mtf.BrowserUpdateDisplay(wid)
@pos=Mtf.BrowserYToPos(wid, y)
@lbl=Mtf.BrowserGetPosLabel(wid, pos)
@Mtf.BrowserSetPosLabel(wid, pos, lbls{, tag})
@Mtf.BrowserSetPosLabels(wid, pos, lbls, count{, tags})
@Mtf.BrowserRemovePosLabel(wid, pos)
@Mtf.BrowserRemovePosLabels(wid, pos, count)

MTF.Kn...() see Knvas... and Kn...

Copyright © 1992 - 2016 NAPA. All rights reserved. 720 / 7399


NAPA for Design Manuals 2016.3

@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.Clipboard...() clipboard functions

@Mtf.ClipboardCopy(wid, str)
@str=Mtf.ClipboardRetrieve(wid)
@Mtf.ClipboardUndoCopy(wid)

Copyright © 1992 - 2016 NAPA. All rights reserved. 721 / 7399


NAPA for Design Manuals 2016.3

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:

1. What is the User Profile?


1.1. Widgets and widget names
1.2. Resources and resource settings
2. Resource files and User Profiles
3. Useful resources
3.1. NAPADB resource files
3.2. Key bindings
4. Example

1. What is the User Profile?


A User Profile is a text in NAPA that specifies the resource settings for widgets used in the NAPA GUI. This text is created using the
NAPA Text Editor and saved (usually in the System database) with the prefix RES*. The specification of resources follows the standard Motif
notation.

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.

1.1. Widgets and widget names

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 722 / 7399


NAPA for Design Manuals 2016.3

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 Draw button in any Hull Surface Editor window


the Draw button in the Ship Model window
the Draw button in any Body Plan window

The hard bindings (specified with a period in the name) are used to avoid this effect.

1.2. Resources and resource settings

As mentioned above, every widget has resources, or characteristics which determine its appearance or behavior. Examples of resources could
be:

the background color


the text on a button
the text in a text field
the size of a graphic area
the font used for text
switches (True/False) to control whether or not something is visible.

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.

2. Resource files and User Profiles


The User Profile text is a normal text in the NAPA sense, stored in the SYSDB (DB2). The text is most easily created in the Text Editor (Main
Window, Tools menu, Text Editor). It is saved with the prefix RES*, which stands for Resource Specification. An example of a User Profile is
shown in the Text Editor below.

Copyright © 1992 - 2016 NAPA. All rights reserved. 723 / 7399


NAPA for Design Manuals 2016.3

Example of a resource specification, i.e. a User Profile, in the Text Editor

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 724 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 725 / 7399


NAPA for Design Manuals 2016.3

Select Colour Dialog


The list given below is thought to be useful for those settings for which the default values may not be exactly as the user desires. Other resource
settings were considered to have little use for any setting other than the default.

Resource Purpose Possible Values Default

napa*background Background colour of all windows in NAPA See colours above Grey

napa*foreground Foreground colour See colours above Black

napa*Main.title Title in title bar of the Main Window Any string NAPA

napa*UI_Show_CommandArea.set Controls display of the command area True,False False

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*MainW*MB*ViewMP*ShowSB.set Show Status bar in the Main window 0,1 1

napa*MainW*MB*ViewMP*ShowTb.set Show Toolbar in the Main Window 0,1 1

napa*MainW*MB*ViewMP*Echo.set Turn on/off data echo 0,1 0

napa*MainW*MB*OptionsMP*UndoSupport.set Turn on/off undo support (functions in text areas) 0,1 0

napa*GR_PltWn*GR_DrawTools*Plot.set Plot surface in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*PO.set Plot Point Objects in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*X.set X sections in the GM window 0,1 0

Copyright © 1992 - 2016 NAPA. All rights reserved. 726 / 7399


NAPA for Design Manuals 2016.3

napa*GR_PltWn*GR_DrawTools*Y.set Y sections in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*Z.set Z sections in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*Incl.set Constant inclination curves plotted in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*Curv.set Curvature curves plotted in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*Porc.set Poscupine plot plotted in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*Radi.set Radius of curvature plotted in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*Sym.set Set Symmetry on in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*Net.set Draw Background net in the GM window 0,1 0

napa*GR_PltWn*GR_DrawTools*Clear.set Clear before drawing in the GM window 0,1 0

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.

Widget Name Window Widget Collection Name

TxtEdit Text Editor Window MN_TEXTEDITOR

TabEdit Table Editor TP_TABLEEDITOR

StpEdit Setup Editor DR_SETUPEDITOR

GME_HullEdtr Hull Surface Editor GME_HULL_EDITOR

WgtEdit Widget Editor UI_WIDGETEDITOR

GR_PltWn Geometry Window GR_GEOMWINDOW

GR_PltWn Plot Window GR_TEMPLATEWINDOW

ListWn List Window MN_LISTWIN

Manager Manager MN_MANAGER

Explorer Explorer MN_EXPLORER

HD_Quick Object Info HYD_QUICK

Gr_PltWn Body Plan Window GR_BODY_PLAN_WIN

VarDef Vardef Editor AD_VARED

SM_MW Ship Model Window SHIP_MODEL

ST_MW NAPA Steel MW_ST

OF_MW Outfit MW_OF

WG_MW Weight Calculation WEIGHT_CALCULATION

MW_LD Loading Conditions LOADING_CONDITIONS

DA_SUBD Subdivision Definition DA_SUBD

Note: the Widget Collection name is usable as the SOURCE TOOL in the Manager. See the chapterManager in the NAPA Monitor
Manual.

Copyright © 1992 - 2016 NAPA. All rights reserved. 727 / 7399


NAPA for Design Manuals 2016.3

3.1. NAPADB resource files

There are several resource specification files stored in the NAPADB which are intended to be used in user profiles. These are:

Resource file Purpose


(RES*)

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

SMALLLAYOUT The same for SMALLFONTS, SMALLFONTS2 and SMALLMARGINS

MEDIUMLAYOUT The same for MEDIUMFONTS, MEDIUMFONTS2 and MEDIUMMARGINS. This is the default NAPA layout.

LARGELAYOUT The same for LARGEFONTS, LARGEFONTS2 and LARGEMARGINS

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.

3.2. Key bindings

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.

The special keys, called modifiers, are:

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 728 / 7399


NAPA for Design Manuals 2016.3

Syntax for key bindings


This example is the resource specification file RES*FUNCTIONKEYS in the NAPADB.

Note the following:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 729 / 7399


NAPA for Design Manuals 2016.3

Resource specification file EXAMPLE

Resource specification file EXAMPLE2


We first login using the first example file EXAMPLE:

Copyright © 1992 - 2016 NAPA. All rights reserved. 730 / 7399


NAPA for Design Manuals 2016.3

The resulting Main Window of NAPA looks like this:

Copyright © 1992 - 2016 NAPA. All rights reserved. 731 / 7399


NAPA for Design Manuals 2016.3

Result of EXAMPLE resource specification


Then we use the RESET command at the TASK?> prompt and login again using the resource file EXAMPLE2. The result is this time:

Copyright © 1992 - 2016 NAPA. All rights reserved. 732 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE2 resource file specification

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 733 / 7399


NAPA for Design Manuals 2016.3

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):

Copyright © 1992 - 2016 NAPA. All rights reserved. 734 / 7399


NAPA for Design Manuals 2016.3

!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.

2. Run time information


Most of the information needed in daily work can be obtained online by the commands !COMMANDS and !EXPLAIN. In order to distinguish the
calculator oriented subjects from normal commands, the following syntaxes have been selected:

!COM C.F list of standard calculator functions

!EXP C.id explanation of calculator function 'id'

!COM ss.F list of service functions from subsystem ss

!EXP ss.id explanation of service function 'id' of subs. ss

!COM B.F list of NAPA BASIC statements

!EXP B.id explanation of statement 'id'

!COM ss*E list of events provided by subsystem ss

!EXP ss*id explanation of event 'id' of subsystem ss

Examples:

!COM GR.F: list of functions provided by GR


!EXP GR.COLOUR: use of the function GR.COLOUR
!COM C.F: list of standard calculator functions
!EXP C.WLPOS: explanation for the function WLPOS
!COM B.F: list of NAPA BASIC commands
!EXP B.ONERR: explanation for the command @ONERR
!EXP GM*CHANGE explanation of the event GM*CHANGE

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 735 / 7399


NAPA for Design Manuals 2016.3

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 calculator operations are available in a variety of ways:

directly accessible in command !CALC


in column and other definitions of the table calculation module
extending the standard set of quantities in table output (command LQ)
substituting fixed components by variables and expressions in macros
providing logic for decisions in macros
providing additional flexibility in various other functions

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:

operators: + - * / = > < >=,<=,<>


The first four ones are the normal arithmetic operators, while the last six ones are logical operators that will be presented later.
parentheses: ( )
The parentheses have their normal function of changing the precedence of operations. They also delimit function parameters.
functions (e.g. SQRT, SIN)
A function is formed by a function name followed by a parameter list in parentheses. Functions are used for all operations not expressed
by the operators above. The parameter list is formed by one or several expressions, separated by commas.
constants
The constants can be
numeric constants, e.g. 12, 0.75
string constants, e.g. 'ABC'

A string constant is any set of characters enclosed in apostrophes.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 736 / 7399


NAPA for Design Manuals 2016.3

5. Variables and arrays


A variable represents a numeric or string value. When used in an expression, the variable is replaced by its value before the expression is
evaluated.

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:

X=ARR(2) an array named X is created for decimal values

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):

Copyright © 1992 - 2016 NAPA. All rights reserved. 737 / 7399


NAPA for Design Manuals 2016.3

@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:

= equality (numbers and strings)

> greater than (numbers), begins with (strings)

< smaller than / not equal

>= greater than or equal / contains

<= smaller than or equal / ends with

<> not equal

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'

A>B -> 0 (false)


(A+1)=B -> 1 (true)
A+1=B -> 3 (1=B ->0, A+0 -> 3)
NOT(A>B) -> 1
OR(B=0,A<B) -> 1
AND(B=0,A<B) -> 0
S='HULL' -> 0
SBS(S,1,4)='HULL' -> 1
10+(A>0)*A -> 13
10+(A>B)*A -> 10
'BA'>'A' -> 0 (BA does not begin with A)
'BA'<'A' -> 0 (BA is not equal to A)
OR(0,0,1) -> 1
AND(A>5,1) -> 0

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 738 / 7399


NAPA for Design Manuals 2016.3

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.

A list of all calculator functions is obtained by

!COM C.F

A presentation of a given function is obtained by

!EXPL C.id

for !EXPL C.AREA

The explanations obtained under !EXPL !CALC are not maintained since 97.1.

8. Subsystem service functions


The number of services provided via the calculator has grown steadily and in release 96.1 a new type of functions has been introduced, called
subsystem service functions. They differ from other functions in the administrative sense only. The idea is that within each subsystem, as many
functions as desired can be added without burdening the set of reserved words and the functions can be implemented independently by the
person responsible for the subsystem in question.

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.

For a list of service functions in a subsystem, use

!COM ss.F

where ss=the subsystem name. For an explanation of a given function use

!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)

AI functions related to input, macros

Copyright © 1992 - 2016 NAPA. All rights reserved. 739 / 7399


NAPA for Design Manuals 2016.3

AP some functions related to text output

CP functions related to sounding devices

CR some functions related criteria

DA various functions related to damage stability

DB functions related to database and file access

DM general functions for handing data in the free storage

DR drawing functions, handling of setups

GM various functions related to geometry

GME the functions of the Hull Editor

GR functions related to graphics

GRE the marking functions

GS some functions related to grain stability

IN some functions related to volume calculations

INC functions related to the inclining test (mainly for ObN)

LD functions related to loading conditions (defining, getting information, plotting, ObN related)

MGR the basic functions of the Manager

MN various functions of the Monitor (project adm., run control, printing, licenses)

MTF the functions providing the interface to Motif

NPN the functions of the new panel definition task

OGL controlling OpenGL

OS services of the operating system, various general data manipulation

RR roro/break bulk loading (ObN)

SB functions supporting the TRIBON interface

SHN functions supporting the power module of ObN

SM some functions related to the arrangement, outfit and routes

SP SECPRO functions

SQL temporary implementation of the SQL interface

ST NAPA Steel functions

STP functions implementing the STEP interface

TP interface to table calculation

TPL topology functions

UI basic functions of the graphical user interface

WPR Windows printer

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 740 / 7399


NAPA for Design Manuals 2016.3

9.1. Mathematical functions

SQRT square root

SQRT(a)

EXAMPLE
SQRT(2) -> 1.4142

EXP exponentiation

EXP(a)

Natural exponent function, e**a.

EXAMPLES
EXP(1) -> 2.71828
EXP(LN(5)) -> 5

EXP(base,a)

Arbitrary exponent function, base**a. Base>=0 unless a an integer.

LN natural logarithm

LN(a)

EXAMPLE
LN(2.71828) -> 1

LOG Brigg's logarithm

EXAMPLES
LOG(2) -> 0.30103
LOG(EXP(10,1.5)) ->1.5

LOG(a)

SIN sinus of angle

SIN(a)

a=angle in radians

EXAMPLES
SIN(0.1) -> 0.099833
SIN(45*RO) -> 0.70711

COS cosinus of angle

COS(a)

a=angle in radians

EXAMPLES
COS(0.1) -> 0.995
COS(45*RO) -> 0.70711

TAN tangent of angle

TAN(a)

a=angle in radians

EXAMPLES
TAN(0.1) -> 0.1003

Copyright © 1992 - 2016 NAPA. All rights reserved. 741 / 7399


NAPA for Design Manuals 2016.3

ATAN arcus tangent

ATAN(a)

Arcus tangent of a, result in radians.

ATAN(a,b)

Arcus tangent of a/b, result in radians, b can be zero.

EXAMPLES
ATAN(1) -> 0.7854
ATAN/1)/RO -> 45
ATAN(-1,1) -> -0.7854
ATAN(1,0)/RO -> 90

ACOS arcus cosinus

The result is returned in the interval (-pi/2,pi/2)

ACOS(c)

ASIN arcus sinus

The result is returned in the interval (0,pi)

ASIN(s)

MIN minimum of set of values or array

MIN(a,b,c,...)

Minimum of the values a,b,c...

MIN(arr)

Minimum of the array 'arr'

MIN(arr,'D')

As above but disregard dummy values -99999, -99998.

EXAMPLE
@MIN(21.4,17.5,12.1) -> 12.1
@N=PARSE('21.4 17.5 12.1',A)
@MIN(A) -> 12.1

MAX maximum of set of values or array

MAX(a,b,c,...)

Maximum of the values a,b,c...

MAX(arr)

Maximum of the array 'arr'

MAX(arr,'D')

As above but disregard dummy values -99999, -99998.

EXAMPLE
@MAX(11.4,17.5,12.1) -> 17.1
@N=PARSE('11.4 17.5 12.1',A)
@MAX(A) -> 17.1

ABS absolute value

ABS(a)

Copyright © 1992 - 2016 NAPA. All rights reserved. 742 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
ABS(-1.5) -> 1.5

INT round to integer (truncate)

INT(a)

The function value is the value of a number after removing decimals.

EXAMPLES
INT(10) -> 10
INT(10.78) -> 10
INT(-2.45) -> -2

ROUND round a number

The function rounds a value to the nearest multiple of a given one.

ROUND(value,fact)

value: value to be rounded

fact: (opt) factor, round to the nearest multiple of 'fact',, default=1

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

MOD modulo, division remainder

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 random value

RND(range)

Random value from a given range, different at each call.

range: upper limit of the range, lower limit=0.

RND(range,key)

Random value from the range 0...range, fixed for given value of a given key.

range: upper limit of the range

key: string deciding the value

Copyright © 1992 - 2016 NAPA. All rights reserved. 743 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
RND(100) -> 78
RND(100) -> 14
RND(100) -> 45
...
RND(100,'R601') -> 58
RND(100,'R601') -> 58
RND(100,'R40') -> 93

9.2. Logical functions

NOT logical NOT

The function value is 1 if the argument is not true, 0 if the value is true.

NOT(l)

l: logical value or expression, true=1, false=0 (more generally true=>0.5, false=<0.5).

EXAMPLES
A=77, L=0
NOT(L) -> 1
NOT(A>100) -> 1
NOT(A=77) -> 0

OR logical OR

The function value is 1 if at least one of the arguments is true, else 0.

OR(l1,l2,...)

l1,l2..: logical values or expressions

EXAMPLE
A=77, B=50
OR(A>100,B>100) -> 0
OR(A>100,B>100,A>B) -> 1

AND logical AND

The function value is 1 if all of the arguments are true, else 0.

AND(l1,l2,...)

l1,l2..: logical values or expressions

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

EQUAL test equality (with tolerance)

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)

a: first value to compare

b: second value to compare

tol: tolerance

Copyright © 1992 - 2016 NAPA. All rights reserved. 744 / 7399


NAPA for Design Manuals 2016.3

EXAMPLES
EQUAL(12.12,12.13,0.001) ->0
EQUAL(12.12,12.13,0.02) ->1

9.3. Date functions

DATE date as yymmdd from internal date

The function value is the given date as integer YYMMDD. Note: Dates from year 2000 have
extra 1 preceding the integer value.

DATE(idate)

idate: internal date, seconds from 640101.

EXAMPLES
DATE(IDATE)

Current date as yymmdd, e.g. 960912

DATE(1513375200)

The function value is 1111216 -> Date 111216

TIME times as hhmmss from internal date

The function value is the given time as integer HHMMSS.

TIME(idate)

idate: internal date, seconds from 640101.

EXAMPLE
TIME((IDATE+3600))

Time as hhmmss 1 hour from the current time.

IDATE give/convert to internal date (seconds)

The functions returns the current date (no parameters) or the given date converted to the
internal form.

IDATE (no parameters)

Return the current date.

IDATE(date)

Internal date from date in the form YYMMDD.

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 745 / 7399


NAPA for Design Manuals 2016.3

FDATE date as yymmdd from internal date

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)

Date in the default format.

FDATE(idate,repr)

Date in the specified representation.

repr: representation

1: as defined in the operating system

2: yyyy-mm-dd

3: yy-mm-dd until end 1999, then as 2

4: dd.mm yyyy

5: mm/dd/yy

FTIME times in printing form

The function otherwise similar with TIME, but the result is a string formatted for output.

FTIME(idate)

Time in the default representation (see FDATE)

FTIME(idate,repr)

Time in the specified representation.

repr: representation

1: as defined in the operating system

2: hh.mm

3: hh.mm

4: hh:mm

5: hh:mmx x=a or p, hh=0...12.

9.4. String handling

FMT convert number to string, format number

The functions converts a number to a string.

FMT(value,dec,field)

value: given value. The value can also be given as a string.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 746 / 7399


NAPA for Design Manuals 2016.3

EXAMPLES
FMT(12.314) -> '12.314'
FMT(12.314,2) -> '12.31'
FMT(12.314,2,8) -> ' 12.31'

FMT(value,dec,field,',')

As above, but with comma as decimal point

FMT(value,unit)

Returns value with unit shown and perform unit conversion.

unit: M, MM, T, DEGREE, MM.DD, FRD etc.

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: controls application of the unit:

empty: do no unit conversion

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).

+: apply and show the standard unit

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).

VALUE convert string to number

The function value is the string interpreted as a number. The string may contain additional
characters. See also VALUEOF.

VALUE(string)

string: given string

EXAMPLES
VALUE('12.5') -> 12.5
VALUE('R601') -> 601
@S='12'
S+1 -> error 19033
VALUE(S)+1 -> 13

SBS substring

The given string is truncated or extended to the given length.

SBS(string,start,end)

string: given string

Copyright © 1992 - 2016 NAPA. All rights reserved. 747 / 7399


NAPA for Design Manuals 2016.3

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 length of string or length to substring

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 concatenate strings

The result is one string, formed by combining the operands.

CNC(s1,s2,...)

s1,s2,...: operand strings

EXAMPLE
CNC('AA','B','CCC') -> 'AABCCC'
CNC('FRAME',FMT(2)) -> 'FRAME2'

CHAR convert character codes to character or vice versa

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)

Convert Unicode, ASCII or UTF-8 code of a character to corresponding character.

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;'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 748 / 7399


NAPA for Design Manuals 2016.3

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

LCASE case conversions

The function converts a string to lower case or upper case.

s=LCASE(string,c)

string: given string

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

PARSE parts of strings to array

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.

PARSE(string, array, options)

string: given string

array: receiving array. If the array is a numeric array, only numeric elements are returns, else all
elements.

options: (opt) string containing one or several of the following characters:

E: empty the receiver first, default=add the new items

C: apply comma as delimiter in addition to spaces (as in NAPA commands)

N: do not treat spaces as delimiters

A: obey apostrophes so that commas and spaces inside are not treated as delimiters (the
apostrophes are kept).

D: treat the following character as delimiter

EXAMPLES
@S=ARR(3)
@N=PARSE('10 M: 10.2 23.5 (estimated)',S)

The elements of S are '10', 'M:', '10.2', '23.5' '(estimated)'.

@A=ARR(2)
@N=PARSE('10 M: 10.2 23.5 (estimated)',A)

The elements of A are 10, 10.2, 23.5.

@N=PARSE('THR, C1,C2,C3',S,'C')

The elements of S are THR, C1, C2 and C3

@P=ARR(2)
@N=PARSE('T*200*8*100*15',P,'D*')

Get the numbers delimited by * into the array P.

TRIM remove blanks from string

This function removes blank (space) characters from the beginning or/and end of the given
string.

Copyright © 1992 - 2016 NAPA. All rights reserved. 749 / 7399


NAPA for Design Manuals 2016.3

TRIM(string, options)

string: given string

options: (opt) string containing one or several of the following characters:

B: removes blanks only from the beginning

E: removes blanks only from the end

EXAMPLES
@S=' ABCABC '
@S=TRIM(S)

--> S='ABCABC'

REPLACE replace specified string with another string

This function replaces occurences of the string1 with string2 within the given string.

REPLACE(string, s1, s2, options)

string: given string

s1: substring to be replaced within string

s2: replacing string

options: (opt) one of the following integers:

0: replace only the first occurrence

1: replace all occurences (default)

EXAMPLES
@S='ABC ABC'
@S=REPLACE(S 'A' 'XXX')

--> S='XXXBC XXXBC'

9.5. Data management

DB operations with descriptions

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.

name: name of description

unit: (opt) data base unit, default 1

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')

Write to the data base.

Copyright © 1992 - 2016 NAPA. All rights reserved. 750 / 7399


NAPA for Design Manuals 2016.3

refnr: reference number as returned by the DB function. This may place because of some system
action or exit from the task.

DB(-refnr)

Remove the given description from the free storage.

REC get record from a description

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)

descr: reference number of description as returned by DB.

recnr: record number, quantity or table column name.

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

RSIZE give/change record size

size=RSIZE(rec)

Returns the number of values in the given record.

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

RVAL get record value

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)

LOCS locate element in record

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

ARR create array/create array reference

Copyright © 1992 - 2016 NAPA. All rights reserved. 751 / 7399


NAPA for Design Manuals 2016.3

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)

Create an array of the given type: 1=integers, 2=reals, 3=strings.

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.

9.6. Volume oriented functions

VOL calculate volume

The function returns the volume of a room or surface.

VOL(name,t,trim,heel,x)

name: name of object

t: (opt) draught, default=whole object (open surfaces to TDWL)

trim: (opt) trim, m (NOTE!). Default=0.

heel: (opt) heeling angle, degrees (NOTE!), default 0.

x: (opt) x-coordinate where draught measured, default XREF

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.

MOM calculate moment

The function returns the moment of the volume of a room or surface around a given axis.

MOM(name,axis,t,trim,heel)

name: name of object

axis: 1=x, 2=y , 3=z

t: (opt) draught, default whole object

trim: (opt) trim, m, default 0

heel: (opt) heeling angle, degrees, default 0

x: (opt) x-coordinate where draught measured, default XREF

CG center of gravity of object

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 752 / 7399


NAPA for Design Manuals 2016.3

CG(name,axis,t,trim,heel,x)

name: name of object

axis: 1=x, 2=y , 3=z

t: (opt) draught, default whole object

trim: (opt) trim, m, default 0

heel: (opt) heeling angle, degrees, default 0

x: (opt) x-coordinate where draught measured, default XREF

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.

UL upper limit of object

The function returns the upper limit of an object in a given coordinate direction (also for
curves).

UL(name,axis)

name: name of object

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'

LL lower limit of object

The function returns the lower limit of an object in a given coordinate direction (also for curves).

LL(name,axis)

name: name of object

axis: axis for which the extension is given, 1=x, 2=y, 3=z.

INQNT arbitrary quantity for volume

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)

name: name of object

quantity: name of quantity as registered in the quantity standard, e.g. WLA, KMT. The available
quantities are:

VOLT total volume

LMV longit. moment of tot. volume

TMV transv. moment of tot. volume

VMV vert. moment of tot. volume

VOLM volume moulded

DISP total displacement

LMD longit. moment of displacement

TMD transv. moment of displacement

Copyright © 1992 - 2016 NAPA. All rights reserved. 753 / 7399


NAPA for Design Manuals 2016.3

VMD vert. moment of displacement

LCB longit. center of buoyancy

TCB transverse center of buoyancy

VCB vertical center of buoyancy

WLAT waterline area total

LMWA longit moment of tot. wl area

TMWA transv moment of tot. wl area

WLA waterline area (synonym of WLAT)

LMA longit. moment of waterline area (synonym of LMWA)

TMA transv. moment of waterline area (synonym of TMWA)

WCGX longit. center of waterline area

WCGY transverse center of waterline area

WLAM waterline area moulded

WIX longit. moment of inertia of waterline area about CGX

WIY transverse moment of inertia of waterline area about CGY

IX longit. moment of inertia of wl area (synonym of WIX) about CGX

IY transv. moment of inertia of wl area (synonym of WIY) about CGY

TMY transv. moment of inertia of waterline area at 50% filling

IYMAX Max. transv. moment of inertia of waterline area

TIYMAX T where max. IY

IXY moment of inertia Ixy of waterline area

WSA projected wetted surface area

KMT transverse metacenter height

KML longitudinal metacenter height

TCP immersion/m (t/m)

MCT moment to change trim (tm/m)

IXXV moment of inertia of volume Ixx about center of volume

IYYV moment of inertia of volume Iyy about center of volume

IZZV moment of inertia of volume Izz about center of volume

IXYV moment of inertia of volume Ixy about center of volume

IXZV moment of inertia of volume Ixz about center of volume

IYZV moment of inertia of volume Iyz about center of volume

TMAX maximum draught below keel

LOS length below waterline

LWL length of waterline

AREA wall area, calculated (approximatively) from the calculation sections. See AREA for the
area calculated using the boundary surface.

t,trim,heel: (opt) restriction as in VOL.

Copyright © 1992 - 2016 NAPA. All rights reserved. 754 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
@INQNT('HULL','KMT',5) -> KMT of HULL at t=5

BJDATA bon-jean data

The function returns area and moments for cross sections.

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.

name: name of object

x: x-coordinate

t: draught

trim: (opt) trim

heel: (opt) heel

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)

TRF trim factors

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)

name: name of objects

t: draught

ta: (opt) variable (NOTE), to which the draught change at the aft perpendicular is stored.

tf: (opt), analogically for fore perpendicular

WLPOS find floating position

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.

name: name of object

vol: volume

trim: (opt) trim,m, default 0.

heel: (opt) heeling angle, degrees, default 0.

x: (opt) x-coordinate where to be given, default XREF

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 755 / 7399


NAPA for Design Manuals 2016.3

name: name of object

vol: volume

x: x-coordinate of the center of gravity

y: y-coordinate of the center of gravity

z: z-coordinate of the center of gravity

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)

Draught at which the volume of HULL is 5000

@R=ARR(3)
@V=VOL('HULL',5,10)
@X=CG('HULL',1,5,10)
@WLPOS('HULL',V,X,0,0,R)

The result should be R(1)=5, R(2)=10, R(3)=0.

9.7. Functions for curves and surfaces

AREA area of curve, surface or room

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)

Returns the whole area.

object: name of object or (for curves) reference number (e.g. from SECT).

AREA(object,laxis,lim1,lim2)

Returns an area delimited by coordinate limits.

object: object as above

laxis: (opt) axis of limitation, 1=x, 2=y, 3=z

lim1,lim2: (opt) lower and upper limits on 'laxis'

EXAMPLES
@AREA('FRA') total area between centerline and FRA
@AREA('FRA',3,-1,5) area of FRA under z=5

CGA center of gravity of curve or surface

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.

curve: name of curve or reference number (e.g. from SECT, DB)

Copyright © 1992 - 2016 NAPA. All rights reserved. 756 / 7399


NAPA for Design Manuals 2016.3

axis: axis of the result, 1=x, 2=y, 3=z

laxis: (opt) axis of limitation, 1=x, 2=y, 3=z

lim1,lim2: (opt) lower and upper limits on 'laxis'

CGA(surface,axis,laxis,lim1,lim2)

Center of gravity of surface.

surface: name of surface

axis: axis of the result, 1=x, 2=y, 3=z

laxis: (opt) axis of limitation, 1=x, 2=y, 3=z, default=whole surface.

lim1,lim2: (opt) lower and upper limits on 'laxis'

MOM2 moments of inertia

The function returns moments of inertia of closed curves or surfaces.

mi=MOM2(object,i,sel,point)

object: name of object (curve or surface) or reference number of curve

i: selection of quantity from the list ix,iy,iz,ixy,iyz,izx. ix=moment of inertia around x-axis etc.

sel: (opt) reference point:

0: return moments around origin (default)

1: return moments around the center of gravity.

2: return moments around the given point

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)

All moments for the object DECK1

POINT return point on curve

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)

curve: name of curve or reference number

axis: axis on which the point is defined

q: coordinate on 'axis' of the point to be found

n: (opt) get n:th point with the given coordinate, default 1.

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 757 / 7399


NAPA for Design Manuals 2016.3

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.

Q: distance from the reference plane given by 'plane'

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 coordinate on curve or point object

A coordinate on a curve is returned when given the point number.

COORD(curve,axis,point)

curve: name of curve or reference number

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)

x-coordinate of the endpoint of 'stem'

@p=plength('FR1',3)
@y=coord(FR1,2,p)

y-coord. of the point 3 m from the start of FR1.

LENGTH length of curve

LENGTH(curve,point)

curve: name of curve or reference number

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.

PLENGTH find point at given length

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)

curve: name of curve or reference number

l: length from start to the given point.

qaxis: (opt) shortcut to get a coordinate as in POINT.

INCL inclination of curve

INCL(curve,point,vector,method)

curve: name of curve or reference number

Copyright © 1992 - 2016 NAPA. All rights reserved. 758 / 7399


NAPA for Design Manuals 2016.3

point: point where to give the inclination, as defined in POINT.

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.

method: (opt) calculation method

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)

IBC intersection between curves

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)

curve1: reference number (not name) of the first curve

curve2: reference number of the second curve

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)

CPART get part of 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)

This form (n>0) returns the n:th branch,

curve: name of curve or reference number

n: branch number (1,2 ...)

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)

This form creates the part by cutting at the given limits.

curve: name of curve or reference number

axis: limitation axis

lim1,lim2: lower and upper limit on 'axis'

name: (opt) name of the result, default PART.

CPART(curve,0)

Special case: return a curve with one branch only. If the original curve contains several
branches, these are connected.

curve: name of curve or reference number

name: (opt) name of the result, default PART.

Copyright © 1992 - 2016 NAPA. All rights reserved. 759 / 7399


NAPA for Design Manuals 2016.3

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

SECT generate curve by intersection

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)

object: name of room or surface

axis: intersection axis: 1=x 2=y 3=z

coord: intersection coordinate

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)

Otherwise as above, but the intersection is done 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.

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

DIST distance between objects

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.

object2: second object, alternatives as for object1.

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

p2: (opt) array for receiving the nearest point on object2.

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.

INTERS intersection between curves given as arrays

This function gives the intersection point between two curves available as polygons stored in
arrays.

Copyright © 1992 - 2016 NAPA. All rights reserved. 760 / 7399


NAPA for Design Manuals 2016.3

INTERS(u1,v1,u2,v2,u,v)

u1 v1: arrays representing the first curve

u2 v2: arrays representing the second curve

u v: arrays for receiving the intersection points

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)

DVSG point for developable surface

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.

c2: reference number of the second curve

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.

9.8. Functions related to the arrangement

CPP compartment parameter

The function returns the value of a compartment parameter as obtained from the current
arrangement (ARR*...).'

CPP(name,par)

name: name of compartment

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)

id: purpose or substance

par: parameter, quantity defined in the PAR* table, e.g. PDES, RHO.

Copyright © 1992 - 2016 NAPA. All rights reserved. 761 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
@PP('BW','RHO') -> 1.025

FCODE fill code for purpose or substance

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)

purp: name of load or purpose

EXAMPLE
@FCODE('BW') -> 3

9.9. Various functions

REF value from the reference system

The function returns the value of a reference system parameter.

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 value of dynamic text

The function returns the value of a so-called dynamic text.

DTX(id)

id: identifier of the text. For alternatives see command !DTX.

EXAMPLE
@DTX('PRV') -> NAPASHIP/A (project/version)

FR frame number corresponding to a given x

FR(x)

x: x-coordinate

EXAMPLE
@FR(12) -> 20

FR(q,s)

Returns a number in other systems:

s: 1=frames, 2=webs, 3=longitudinals, 4=verticals

EXAMPLE
@FR(12.5,2)

Returns the web number at x=12.5

XFR x-coordinate corresponding to a given frame number

XFR(frame)

frame: frame number. Can be fraction.

@XFR(20) -> 12

Copyright © 1992 - 2016 NAPA. All rights reserved. 762 / 7399


NAPA for Design Manuals 2016.3

XFR(frame,s)

Returns a coordinate in other systems:

s: 1=frames, 2=webs, 3=longitudinals, 4=verticals

EXAMPLE
@XFR(5.5,3)

Returns the y-coordinate of longitudinal 5.5.

INPUT read line from a text file

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)

unit: file unit as used in !OPEN (11...13)

EXAMPLE
!OPEN temp>test 11
@S=INPUT(11) (first line)
@S=INPUT(11) (next line)

GLOBAL value of global variable

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)

name: name of the variable (string constant)

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.

QUANTITY reference to quantity

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)

name: name of quantity (string constant)

EXAMPLE:
@RH=QUANTITY('HEEL')
!type @rh(1)

Output the first (or only) value of the quantity HEEL.

TRAN translate text

This function applies the translation function on a given text.

TRAN(text,lang)

text: text to be translated

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 763 / 7399


NAPA for Design Manuals 2016.3

9.10. Support functions for the calculator

VTYP tell existence and type of variable

If a given variable does not exist, the function returns 0, else

1=numeric variable
2=string variable
11=numeric quantity (SH)
12=string quantity (SH)
21=numeric array
22=string array
26=description

VTYP(name)

name: name of variable (string constant)

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)

name: name of variable (string constant)

EXAMPLE
!SEL TYPE=R
@A=GLOBAL('LIST')
!VAR LIST A

ASSIGN assign value to a variable

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)

name: name of variable

value: value to be assigned.

EXAMPLES
@assign(varlist(i),q(i))
@assign(caseid,'This case')

VALUEOF value of expression

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)

expr: given expression

Copyright © 1992 - 2016 NAPA. All rights reserved. 764 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
@A='B'
@B=100
@S='SQRT(B)'
@VALUEOF('A'): 'B' (same as @a)
@VALUEOF(A): 100
@VALUEOF(S): 10 (same as !calc @s)

RESULTOF value created by macro

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.

par1,par2...: (opt) parameters that will be passed to the macro

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')

Run the macro stored in the specified file.

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.

MACRO get macro

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')

Gets the macro saved as the given file.

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 765 / 7399


NAPA for Design Manuals 2016.3

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. )

9.11. Functions operating on arrays

SUM sum over array

SUM(arr)

arr: array, numeric

SUM(arr,'D')

As above but disregard dummy values -99999, -99998.

EXAMPLE
@A=ARR(2)
@PARSE('1 2 3 4 5',A)
@SUM(A) -> 15

AVR average of array

ARR(arr)

arr: array, numeric

AVR(arr,'D')

As above but disregard dummy values -99999, -99998.

EXAMPLE
@A=ARR(2)
@PARSE('1 2 3 4 5',A)
@AVR(A) -> 3

PSUM sum over product of two arrays

The function value is a(1)*b(1)+a(2)*b(2)+... where a and b are two arrays.

PSUM(arr1,arr2)

arr1: first operand array

arr2: second operand array

EXAMPLE
@V=.... (array with volumes)
@X=.... (array with corr. xcg)
@XCG=PSUM(V,X)/SUM(V)

INTEGR integral from arrays

The function returns the integral when given two arrays, one representing the argument, the
other a function.

INTEGR(arg,funct,d1,d2)

Copyright © 1992 - 2016 NAPA. All rights reserved. 766 / 7399


NAPA for Design Manuals 2016.3

arg: argument array

funct: function array

d1: (opt) derivative at the start. Causes smooth interpolation to be done between the given points.
-99: dummy value for getting smooth interpolation only.

d2: (opt) derivative at the endpoint.

EXAMPLE
@D=DB('FRF')
@Y=ARR(D,'Y')
@Z=ARR(D,'Z')
@AREA=INTEGR(Z,Y)

INTERP interpolate from function

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)

argarr: argument array

funct: function array

arg: argument: value on 'argarr', for which the corresponding value of 'funct' is returned.

d1: (opt) -99: use smooth interpolation

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 sort array

SORT(array)

array: array to be sorted

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)

9.12. Functions available under table calculation

CTOT total of table column

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 767 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
COLUMN VOL
!CAL CTOT(VOL)

CSUM sum over table column

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 reference number of column

This function allows a column to be treated as a calculator array.

COLR(column)

column: name of 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

9.13. For container loading

CLINFO data for container loads and arrangements

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.

quantity: tells what information to return:

NL: number of containers loaded

NR: number of container positions

MASS: weight of load

XM: x-coordinate of the center of gravity

YM: y-coordinate of the center of gravity

ZM: z-coordinate of the center of gravity

LIM: extension, returns xmin,xmax,ymin,ymax,zmin,zmax in 'arr'

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

ROWS: analogically for rows

TIERS: analogically for tiers

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 768 / 7399


NAPA for Design Manuals 2016.3

LIST: list of all containers, returned in 'arr' (strings) expressed as the container id of the form
Cbbrrtt.

arr: (opt) receiving array for the cases presented above

arr2: (opt) receiving array for the cases presented above

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')

Total weight of the container load 'LOAD1'

@N=CLINFO('CNTA*B1','NR')

Number of container positions in the arrangement B1.

@limits=arr(2)

@CLINFO('ARR1','LIM',LIMITS) Return the extension of ARR1 in the array 'limits' (note: type
2).

@range=arr(1)

@CLINFO('ARR1','NI',RANGE) Return the bay/row/tier range of ARR1 in the array 'range'.


Note: type 1 (integers).

@TYPE=CLINFO('C120204','CTP')

Return the type of container loaded in the position bay=12, row=2, tier=4 in the current
container load.

EVAL evaluate table function

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)

qnt: quantity, name of column in the source 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.

10. Parameterless functions and constants


The following symbols are available as constants or parameterless functions:

LREF reference length

Copyright © 1992 - 2016 NAPA. All rights reserved. 769 / 7399


NAPA for Design Manuals 2016.3

BDWL reference breadth

ZDWL depth of design waterline

XREF x-coordinate of reference point

PI pi (=3.14159)

RO pi/180, 0.0174533

For conversion from degrees to radians.

SPD seconds/day, 86400

For converting internal date differences (in seconds) to days or vice versa.

RELEASE current release

The release is expressed as a number in the form 2001. (Before rel. 99.1, the output was 98.1
etc).

GUIMODE graphical user interface mode

3=Windows Presentation Foundation, 2=Ext/Java, 1=X Window System, 0=TTY, -1=batch


mode, -2=CORBA. For decisions dependent on the kind of user interface.

PROFM professional mode

0=standard, 1=professional, 2='full' professional

SCL current scale

A drawing must be open. Does not include effect of !ZOOM or window resize.

CLINE current line in result list

Intended for decisions regarding page feed. Header lines not included. A list must be open.

CPAGE current page number in result list

A list must be opened.

UINPUT u-coordinate of last graphic input

Considered obsolete - use the GR.INPUT function in macros reading graphic input.

VINPUT v-coordinate of last graphic input

See UINPUT.

PINPUT last graphic input in point syntax

The function value is a string (u,v) representing the point last input.

INPUTKEY key used for last graphic input

-1,-2 and -3 mean buttons 1...3 on the mouse, >0 ASCII code of keyboard key. >1000 special
key.

EDTEXT reference number of current editor work area

Copyright © 1992 - 2016 NAPA. All rights reserved. 770 / 7399


NAPA for Design Manuals 2016.3

Allows access to the current text with calculator functions, for example REC(EDTEXT,200)
gives the reference number of line 200.

EDLINE reference number of the current line in the editor

CDIR current SH directory

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.

11. Multiply defined symbols


A common source of confusion is the fact that a calculator symbol can stand for different things and therefore become multiply defined.

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:

a calculator function with parameters


an array element
the value of a quantity with an index (under SH)
a table value from another line than the current line

These interpretations are attempted in the order presented.

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)

!VAR CHECK gives

Symbols without parameters


variable LREF overrides function/const. LREF
Symbols with parameters
function VOL overrides array VOL

With option

Copyright © 1992 - 2016 NAPA. All rights reserved. 771 / 7399


NAPA for Design Manuals 2016.3

!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.

12. Detailed presentation of functions


This presentation may not be up-to-date in all respects. The most up-to-date information is found in the online explanations provided by !COM
C.F and !EXP C.id.

12.1. Mathematical functions

SQRT(x), EXP(x), LN(x), LOG(x)


Square root, exponent, natural logarithm and Brigg's logarithm of x. The function EXP(x,a) means x raised into power a.
SIN(phi),COS(phi),TAN(phi),ATAN(tan)
The normal trigonometric functions, where phi must be in radians and the arcus tangent is returned in radians. ATAN(y,x) means
ATAN(y/x), with the quadrant selected according to the sign of x and y and with x=0 possible.
The built-in constant RO=PI/180 can be used for converting degrees to radians or vice versa, e.g SIN(90*RO) gives 1.
MIN(x1,x2,...), MAX(x1,x2,...)
These functions return the smallest or largest value of the parameters, the number of which may be any value >1. (One value will be
interpreted as a reference to an array, see below).
INT(x), ROUND(x,d) Truncation and rounding. For example, INT(12.8)=12, ROUND(12.8)=13, ROUND(12.82,0.1)=12.8.
MOD(x,d): Division remainder, for example, MOD(127,10)=7, MOD(82.32,1)=0.32.
ABS(x): Absolute value, for example, ABS(12.5)=12.5, ABS(-12.5)=12.5.

12.2. Logical functions

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.

12.3. Date functions

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.

For more date functions, see service functions of AD.

12.4. String handling

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 772 / 7399


NAPA for Design Manuals 2016.3

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,

FMT(1.24,'CM') -> 124 cm

'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

FMT(6546,'MCT') -> MCT = 65.4 tonm/cm

With an asterisk added, the long header is fetched from the quantity standard:

FMT(DISP,'*DISP') -> displacement 4557.8 ton

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.

12.5. Various functions

Copyright © 1992 - 2016 NAPA. All rights reserved. 773 / 7399


NAPA for Design Manuals 2016.3

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)

12.6. Data management

DB(name,unit,version): description from the database.


The function value is the so-called reference number, by which the description is referred to other calculator functions. 'version' is
optional, default is the current version except for unit 2, where it is empty. 'unit' means database unit. It can be omitted if the version is
also omitted. Default for the unit is 1 (normally project database). (Command !OPEN can be used for getting access to any existing file).
Special cases are DB(d,'WRITE') for writing the description given by reference number d to the (project) database, DB(-d) for deleting
from the run time memory, DB(name,0) for creating a description in the run time memory, and DB(d) for returning the name of a
description.
Note: all this functionality is also available in the group of service functions belonging to DB.
REC(descr,recid,n): get record in description.
The function value is the reference number analogously with the preceding function. When assigned to a variable, the variable defines an
array. 'descr' is the reference number of the description, 'recid' specifies the record by either record number, quantity symbol or name of
table column. The optional n specifies which record to take if there are several with the same number.
The parameter 'descr' may also be given by the reference number of a record, in which case the result is fetched among the records
following the given one. In the form REC(rec,0), the next record after 'rec' is returned.
With n=-1,-2, or -3, a record of type 1,2 or 3 is added. See also functions DM.GETREC, DM.NEWREC.
RSIZE(rec, size): returns or defines the number of elements in the given record or array. The function value is the size at the call. With
the optional parameter 'size', the size is adjusted to the given size. For example, RSIZE(A,0) empties the array A.
RVAL(rec,index): returns the value of the given record at the given index. The same effect is achieved by an array reference of the form
'rec(index)', but this cannot be used if 'rec' is specified by an expression.
LOCS(rec,value): returns the index of a string or number in the given record. Zero is returned if the string or number is missing. When
used with a number, the result may contain a fraction. For example, if the array contains the numbers 10,20 and 30, and value=25, the
result is 2.5
ARR(type, id): create array. Type 1=integers, type 2=reals, type 3=strings. For the optional 'id', see paragraph about arrays. A special use
of the ARR function is to inform that a variable refers to a an array. This need may occur if the symbol has obtained its value in a way that
does not normally give arrays, for example:
MACRO(name,receiver): get macro using the same identification as in the !ADD command, e.g. @mac=MACRO('MYPLOT/A'),
@MAC=macro('temp>test'). The result is a reference number that can be used in AI.ADD, AI.RUN. With the optional parameter 'receiver',
the result is stored in given string array.

@A=ARRLIST(I)
@A=ARR(A)

Copyright © 1992 - 2016 NAPA. All rights reserved. 774 / 7399


NAPA for Design Manuals 2016.3

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.

12.7. Functions related to objects with a volume

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:

axis, 1=x, 2=y or 3=z, default 1


t: draught, default whole object
tr: trim in meters (the normal NAPA input form), default 0
heel: heel in degrees, default 0.

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

where trsign is +1 or -1 and tells whether trim by head is positive or negative.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 775 / 7399


NAPA for Design Manuals 2016.3

@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

AREA wall area

DISP total displacement

IX longit. moment of inertia of waterline area (synonym of WIX) about CGX

IXXV moment of inertia of volume Ixx about center of volume

IXY moment of inertia Ixy of waterline area

IXYV moment of inertia of volume Ixy about center of volume

IXZV moment of inertia of volume Ixz about center of volume

IY transv. moment of inertia of waterline area (synonym of WIY) about CGY

IYYV moment of inertia of volume Iyy about center of volume

IYZV moment of inertia of volume Iyz about center of volume

IZZV moment of inertia of volume Izz about center of volume

KML longit. metacenter height

KMT transv. metacenter height

LCB longit. center of buoyancy

LMA longit. moment of waterline area (synonym of LMWA)

LMD longit. moment of displacement

LMV longit. moment of total volume

LMWA longit moment of total waterline area

LOS length below waterline

MCT moment to change trim

TCB transv. center of buoyancy

TCP immersion/cm

TK draught below keel

TMA transv. moment of waterline area (synonym of TMWA)

TMD transv. moment of displacement

TMV transv. moment of total volume

TMWA transv. moment of total waterline area

TMY transv. moment of inertia of waterline area at 50% filling

VCB vertical center of buoyancy

VMD vert. moment of displacement

VMV vert. moment of total volume

VOLM volume moulded

VOLT total volume

WCGX longit. center of waterline area

Copyright © 1992 - 2016 NAPA. All rights reserved. 776 / 7399


NAPA for Design Manuals 2016.3

WCGY transv. center of waterline area

WIX longit. moment of inertia of waterline area about CGX

WIY transv. moment of inertia of waterline area about CGY

WLA waterline area (synonym of WLAT)

WLAM waterline area moulded

WLAT waterline area total

WSA projected wetted surface area

IYMAX maximum transv. moment of inertia of waterline area

TIYMAX T at which IYMAX occurs

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.

12.8. Functions for surfaces and surface objects

AREA(name,laxis,l1,l2): area of surface


CGA(name,axis,laxis,l1, l2): center of gravity of surface

@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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 777 / 7399


NAPA for Design Manuals 2016.3

@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).

Functions UL and LL can also be used for surfaces.

12.9. Functions related to arrangements

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.

12.10. Intersecting an object

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)

12.11. Functions operating on curves

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.

AREA(curve,laxis,l1, l2): area enclosed by the curve


CGA(curve,axis,laxis ,l1,l2): center of gravity of the area

Copyright © 1992 - 2016 NAPA. All rights reserved. 778 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 779 / 7399


NAPA for Design Manuals 2016.3

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)

12.12. Functions operating on arrays

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 780 / 7399


NAPA for Design Manuals 2016.3

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.

Effect of smoothing (thin line)


The function SORT sorts an array or tells the order in it. When the array is given alone, the result is returned by modifying the array, e.g.

!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

The function value is not used (assigned 0).

The calculator function SOLVE solves a system of linear equations as expressed by

A x = b

where x and b are vectors of size n and A a matrix of size n*n. The function call is

<index terms="SOLVE(op,a,b,x)" />

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 781 / 7399


NAPA for Design Manuals 2016.3

Effect of parameter op in the SOLVE function


The following examples show how to solve the equation system of the example using all the four possible ways of representing the matrix A:

Using a single array for A:

@a=arr(2) @b=arr(2) @x=arr(2)

@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

Using separate arrays for the columns/rows of A:

@aa=arr(1) @b=arr(2) @x=arr(2)


@b(1)=12 @b(2)=6

@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:

1: no result because the matrix is


singular
2: no result because the arrays have incorrect type or size

13. Handling of upper case and lower case


Names of variables, functions and quantities are internally stored in upper case, and any names encountered in an expression are converted to

Copyright © 1992 - 2016 NAPA. All rights reserved. 782 / 7399


NAPA for Design Manuals 2016.3

upper case.

The same concerns such string constants that are known to represent data handled in upper case (e.g. names of objects).

When needed, case conversions can be done with function LCASE.

14. Current source description


In the SH subsystem and in some functions elsewhere in NAPA, there is a current source of data, from which data can be designated by the
names of quantities. Such a source description can be assigned with !VAR ASD name.

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:

!CAL RHO display value of RHO

!CAL VOL(5)*RHO multiply the 5. element of VOL with RHO

!CAL CGX(3)=12 assign a value to the 3. element of CGX.

Note: if the source is a table in the sense of the table calculation module, the quantities are designated by the column names.

Copyright © 1992 - 2016 NAPA. All rights reserved. 783 / 7399


NAPA for Design Manuals 2016.3

Various general functions


This chapter presents functions that provide services of general nature and that are available everywhere or in all relevant contexts.

Most of the functions described here are available as so-called transparent commands. It is characteristic for these commands that

they are available everywhere


they are carried out without the current application program knowing it (which is why they are called transparent).

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.

The functions have been grouped as follows:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 784 / 7399


NAPA for Design Manuals 2016.3

6.5. Database prefix


6.6. General selection syntax
7. Functions related to the calculator
7.1. Command !CALC, evaluate expression
7.2. Command !VAR, services related to the calculator
7.3. Output function
8. Control related to calculations and geometry
9. Functions related to file i/o and management
9.1. Opening and closing files
9.2. Reading and writing environmental variables
9.3. Other commands
10. Commands related to system development
11. Various functions
11.1. Output to the log
11.2. Pause
11.3. Command !BELL
11.4. Assigning full profession mode
11.5. Creating private lists
11.6. Assigning actions to events
11.7. Assigning terminal properties
12. Transparent services for GM, SM and TAB
13. Command specifications
13.1. Help functions
13.2. Commands producing information
13.3. Catalogs and selections
13.4. Functions related to the calculator
13.5. Control of calculations and geometry
13.6. Functions related to file i/O
14. Commands for development and maintenance
14.1. Various commands
14.2. Transparent services from GM, SM, TAB

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

For example, !COM PAIR gives in LD the following output

PAIR define tank pairs


LOAD load/unload compartments +
DESCRIPTION list definitions in input form
POLYGON Definition of polygon-formed free surface moment

The list of transparent commands is obtained by

!COMMANDS !

The complete explanation of a command is obtained by

!EXPLAIN command

Copyright © 1992 - 2016 NAPA. All rights reserved. 785 / 7399


NAPA for Design Manuals 2016.3

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.

As short presentation of the command format(s) is obtained by

!PARAMETERS command

The !EXPLAIN command also gives the explanation of an error number:

!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:

!COMMANDS C.F list of standard calculator functions

!EXPLAIN C.id explanation of calculator function 'id'

!COMMANDS ss.F list of service functions from subsystem ss

!EXPLAIN ss.id explanation of service function 'id' of subs. ss

!COMMANDS B.F list of NAPA BASIC statements

!EXPLAIN B.id explanation of statement 'id'

!COMMANDS ss*E list of events provided by subsystem ss

!EXPLAIN ss*id explanation of event 'id' of subsystem ss

!COM ss.Q: list of quantities of subsystem ss

!EXP Q.id: explanation of quantity 'id'

!EXP Q.id/ss: quantity id of subsystem ss

Examples:

!COM GR.F list of functions provided by GR


!EXP GR.COLOUR: use of the function GR.COLOUR
!COM C.F: list of standard calculator functions
!EXP C.WLPOS: explanation for the function WLPOS
!COM B.F: list of NAPA BASIC commands
!EXP B.ONERR: explanation for the command @ONERR
!COM Q.HD: quantities used in HYD
!EXP Q.DISP: all explanations for DISP
!EXP Q.DISP/HD: explanation of DISP in HD

The explanations of quantities are only partially implemented.

This information is also available with the Help Viewer.

2. Functions producing information


This section presents commands producing information of general nature, without influencing the run. Some of these have some other function as

Copyright © 1992 - 2016 NAPA. All rights reserved. 786 / 7399


NAPA for Design Manuals 2016.3

their main purpose, which is described in the respective contexts.

!WHERE

gives information about the current run, as illustrated by the following example:

In run R4298*JVH treating the ship D-STAR-K/A


Active task is T-CALC 96-03-19 19.06 (T)
JvH Test program

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:

TODAY IS WEDNESDAY 96-03-20


WEEK 12
TIME IS 10.42
TIME OF SUNRISE IS 6.29
TIME OF SUNSET IS 18.27

!REF

lists the most important reference dimensions:

LREF= 82.00 BDWL= 13.00 TDWL= 4.80


XREF= 41.00 XMID= 41.00 APP= 0.00

!NEWS, !ERR

list information about new features and known bugs. The commands are context sensitive and give information related to the current task.

!FRN

converts x-coordinates to frame numbers and vice versa

!FRN 6 -> FRO=10

!FRN #10 -> X=6

!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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 787 / 7399


NAPA for Design Manuals 2016.3

USER=JVH SGN =SIGN JVH PRO =D-STAR-K


VER =A PRV =D-STAR-K/A CPV =A
DATE=96-03-20 DT =DATE 96-03-20 TIME=10.50
TM =TIME 10.50 PRD =96-03-19 RUN=R4298*JVH
PROG=T-CALC SPR =NAPA/T-CALC SYSL=D
CSID=NAPA/D/T-CALC/96031YARD=Helsinki CONC=Napa Oy
YCN =Napa Oy Helsinki LREF= 82.00 BDWL= 13.00
ZDWL= 4.80 XREF= 41.00 YDNR=
SNAM=Napastar

!CATALOG

produces a catalog from the database. For details, see below.

!VERSION LIST

This command gives a list of versions in the current project:

Version created by stat description


A 950901 JVH initial version
B 951210 JVH length=120 m

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):

Currently open database units


1 /n/hw/nps12/d-star-k.db
2 /n/hw/nps12/sysdb
4 /n/hw/nps12/d-star-k.sd
7 /n/hw/nps12/napadb
8 /n/hw/nps12/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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 788 / 7399


NAPA for Design Manuals 2016.3

nr name vis. proj. auto mode dest seg window upd


1 (BODYPLAN) X . 2D - 1
RS
==> 25 * 2D - 1
-

For more information, see chapter Graphics.

Other commands that produce information when given without parameters are

!PRINTER: current printer


!GR: current graphic output control (whether device or file)
!PAGE: current page size
!GRP: size of current drawing area
!ZOOM: zoom state

3. Commands related to input and running macros


The functions related to input are presented more closely in a separate chapter, and here is only a short summary.

3.1. !ADD, run macro

The !ADD command runs a macro:

!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.

3.2. !DO, repeat commands

The !DO command runs a macro or given commands repeatedly. The main variations are

!DO commands var=(l1,l2,d) repeat for the given range

!DO commands n repeat n times, the same as i=(1,n,1)

!DO commands var=list repeat for elements in an array

!DO commands obey previous !SELECT (SH)

'commands' can be the name of a macro or commands within apostrophes.

3.3. !L, list or run previous commands

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

list the n last commands

Copyright © 1992 - 2016 NAPA. All rights reserved. 789 / 7399


NAPA for Design Manuals 2016.3

!L PLOT 5

list the five last PLOT commands

!L 5 *

rerun the five last commands

!L SIZE *

rerun the last SIZE command

4. Commands related to list output


General functions related to listing are presented in chapter Listing and documents. Here is a short summary of the most important transparent
commands.

4.1. !PRINTER, default printer

Command !PRINTER selects the default printer:

!PRINTER name

The !PRINTER command also starts, ends direct hardcopy:

!PRINT ON/OFF

4.2. !PAGE, select page size

!PAGE sets the page height and width, according to which output is formatted:

!PAGE characters lines explicit size

!PAGE P according to the current printer

!PAGE A4H, A4V horizontal or vertical A4

4.3. !Header, control page headers

The !HEADER command selects the page headers to be output on every page.

4.4. !FORM, formatting of numbers

The !FORM command lists or changes the formatting of quantities: field length, number of decimals, unit, for example:

!FORM X 7.0 MM

Copyright © 1992 - 2016 NAPA. All rights reserved. 790 / 7399


NAPA for Design Manuals 2016.3

Sum rules and standard headers can also be changed with !FORM.

4.5. !LINK, redirect list output

The way to output a given listclass can be changed with command !LINK:

!LINK listclass dest1 dest2

'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.

5. Functions related to graphics


The function of graphics and the use of the commands listed below is presented in more detail in chapter Graphics and drawing. Here, only a
summary is given.

5.1. !GR, various control functions

The primary purpose of the command !GR is to select the output device and control the use of the IOF:

!GR device, !GR F, !GR +F, !GR HERE

In addition, it provides various other service functions, of which those most likely to be needed are

!GR CLOSE finish graphics, close windows

!GR DRAW name; !GR EDR


: open, close drawing

!GR UNDO remove the result of last output operation

5.2. !E, screen erase

Both the screen and the internal store are emptied.

5.3. !GIN, control of graphic input

The main functions related to graphic input are

!GIN DEC=nr control the accuracy of numbers obtained by graphic input

!GIN GRID more general way of controlling the accuracy

!GIN (u1,v1),(u2,v2),... define coordinate system on a tablet

!GIN ON/OFF special function needed for VAXSTATION

!GIN !ECHO immediate echo of items input graphically

5.4. !VIEW, management of views

The !VIEW command handles functions related to the creating, deleting, visibility and properties of views, i.e. independent parts of graphic output.

Copyright © 1992 - 2016 NAPA. All rights reserved. 791 / 7399


NAPA for Design Manuals 2016.3

!VIEW nr create/select view

!VIEW 3D allow for automatic change of projection

Other aspects that can be controlled are storing of result, way of reacting to changed window size, and the selection of the window.

5.5. !LAYER create/change layer

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.

5.6. !ZOOM, !PAN

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.

5.7. !SEND output of current graphics

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.

5.8. !GRPAGE, drawing area

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.

6. Doing catalogs and selections


There is a general function for doing selections of objects in the database. The bare selection function is available as the !SELECT command,
which returns the result as an array that can be used by macros. The same functionality is available by the service function AD.SELECT. The
general selection function is also the basis for the CATALOG function, available in most applications. The main output of this function is a list of
the selected objects, but an array is also created.

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.

6.1. !SELECT command

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 792 / 7399


NAPA for Design Manuals 2016.3

!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:

selection based on database attributes: NAME, VERSION, DATE and TYPE


special criteria
occurrence of given strings
reference to given objects
user who wrote
selection based on arbitrary quantities in the descriptions

The last alternative is consistently available in SH only. This so-called quantity criterion is entered after the others separated by a minus sign.

6.1.1. Database criterion

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:

!SELECT VER=(A,B,C) NAME>FR


!SELECT TYPE=G DATE>960101
!SELECT NAME>LD*CON

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.

6.1.2. LOC criterion

Occurrence of given strings can be tested for with the LOC criterion.

The LOC criterion can be applied in three ways

Copyright © 1992 - 2016 NAPA. All rights reserved. 793 / 7399


NAPA for Design Manuals 2016.3

LOC=string equality

LOC>string begins with

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:

!SELECT NAME>DATA* LOC<PLOT


!SELECT NAME>ARR* LOC=(R112,R113)

6.1.3. REF criterion

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:

!SELECT TYPE=R REF=(HULL,HULLA,HULLM,HULLF)

6.1.4. USER criterion

Objects can be selected on the basis of the user who wrote it by the USER criterion:

USER=sign

The following example selects all curves last changed by JVH:

!SELECT TYPE=C USER=JVH

Common properties of the LOC, REF and USER criteria:

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()

LIST is an array produced by SELECT, containing HULL and its parts.

The criteria can be negated by adding a minus sign in front of the identifier, for example

!SELECT NAME>DATA* -LOC<HULL

selecting all macros not involving the text HULL.

Copyright © 1992 - 2016 NAPA. All rights reserved. 794 / 7399


NAPA for Design Manuals 2016.3

Note: there can be only one subcriterion of each kind.

6.1.5. Quantity criterion

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

!SELECT NAME>SHM* - PE>8000 L=(100...200)

Note the minus sign that separates this criterion from the database criterion.

6.1.6. Options telling how to return the result

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:

!SELECT TYPE=R ->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

!SELECT NAME>HULL ->HULLS ALL

giving arrays HULLS and VHULLS.

Additional information in own arrays is obtained by the following options:

U sign of user in array ULIST

D dates in array DLIST

T types in array TLIST (integers)

The name component LIST is changed if the -> option is given.

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:

!SELECT NAME>FR D U TABLE=FRAMES


TAB
GET FRAMES
P A

Copyright © 1992 - 2016 NAPA. All rights reserved. 795 / 7399


NAPA for Design Manuals 2016.3

NAME DAT VERS ID


--------------------------------------------
FRA 999381409 A JVH
FRA7 999381413 A JVH
FRA4 999381411 A JVH
FRA1 999381413 A JVH
FRF5 999381411 A JVH
FRF3 1016959101 A JVH
FRA6 1016928194 A JVH
...
FRA2 999381413 A JVH
FRA3 999381408 A JVH
FRF4 999381411 A JVH

The date is here in the internal form. The calculator functions DATE, TIME and FDATE, FTIME convert the internal form to more readable forms.

6.2. General CATALOG function

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 following is an example of output, taken from CAT LOAD in LD:

Name Description Date Time


LOAD1 Light Ship (A) 95-09-01 22.03
LOAD2 Ballast Condition 95-09-01 22.03
LOAD3 Grain Cargo 95-09-01 22.03
LOAD4 Mass loads 95-09-01 22.03
T One mass load 96-01-01 19.22

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:

CAT NAME>B SORTN SB GEN

Copyright © 1992 - 2016 NAPA. All rights reserved. 796 / 7399


NAPA for Design Manuals 2016.3

BJTAB 96-02-28 22.40 1252


B-PROFILES 95-11-23 15.42 552
BRACKETS 95-11-23 15.41 796
BULBPROF 95-11-23 13.41 1708
Size total: 4308

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.

CAT NAME>B SORTN PROJECT=D-STAR-K REX

Catalog from project D-STAR-K


=============================
Name Version Date Time Exist
BJTAB A 96-02-28 22.40 *
B-PROFILES A 95-11-23 15.42 -
BRACKETS A 95-11-23 15.41 -
BULBPROF A 95-11-23 13.41 -

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.

6.3. Copying data from other projects and versions

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:

CAT NAME>B VER=A PROJECT=D-STAR-K COPY

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.

6.4. !CATALOG command

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:

!CAT VER=A NAME>FR

The database unit can be given as the first parameter.

Copyright © 1992 - 2016 NAPA. All rights reserved. 797 / 7399


NAPA for Design Manuals 2016.3

6.5. Database prefix

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

FIG* figure (sysdb, NAPADB)

TAB* table (in general)

ARR* arrangement

PAR* purpose definitions

STR* collection of surface objects

LD*CON( loading condition

DAMCASE( damage case

CRIT( stability criterion

If the prefix ends with (, the name rule includes a ) at the end.

The service function AD.SUBJECT returns information on registered database prefixes.

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:

!CAL AD.SUBJECT('TL','ARR*') -> arrangement

Get list of prefixes and explanations:

@PLIST=ARR(3) @TLIST=ARR(3) ceate receivers


@n=AD.SUBJECT('P',PLIST) get list of prefixes
@n=AD.SUBJECT('T',TLIST) list of explanations

6.6. General selection syntax

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 798 / 7399


NAPA for Design Manuals 2016.3

ZMIN>5 larger than

ZMIN<2 smaller than

ZMIN=2.5...4 range

For string quantities, the operators are interpreted as follows

NAME=HULL equality

NAME>HULL begins with

NAME<HULL contains

Several alternatives can be given as a list in parentheses, for example

NAME=(HULL,HULLA,HULLM,HULLF)

The alternatives can also be given by an array:

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

*: matches any number of characters (also 0)


?: matches one, arbitrary character

Examples:

SELECT NAME=HULL* begins with HULL


SELECT NAME='*HULL*' contains HULL
SELECT NAME=HULL? e.g. HULLA, HULLF

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

A subcriterion can be reversed by adding a minus sign:

-NAME>HULL name does NOT begin with HULL

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 799 / 7399


NAPA for Design Manuals 2016.3

The whole criterion can be reversed by starting it with NOT:

NOT NAME>HULL OR TYPE=R

7. Functions related to the calculator


The calculator and NAPA BASIC are presented in more detail in their own chapters. For more information, please refer to the following chapters:
Calculator, Programming macros (NAPA BASIC) and NAPA BASIC commands. Here, only a short presentation of the related commands is given.

7.1. Command !CALC, evaluate expression

The central command is !CALC, which evaluates an expression, for example

!CALC TAN(10.5/LREF)

!CALC VOL('HULL',2.5)

The result can be assigned to a variable, for example

!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 *

This gives the value of the variable I in the interrupted macro.

7.2. Command !VAR, services related to the calculator

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 800 / 7399


NAPA for Design Manuals 2016.3

!VAR NSD=n alternative to DEC, set number of significant digits

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.

The currently defined variables can be listed with

!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:

!VAR LIST ZREC

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

!VAR LIST ZREC FORM=8.3 COL=7

0.000 0.000 0.000 0.000 0.000 0.000 0.007


0.026 0.058 0.101 0.156 0.222 0.297 0.383
0.477 0.580 0.691 0.809 0.934 1.066 1.203
1.346 1.493 1.645 1.800 2.770 3.740 4.710
5.680 6.650 7.620 8.590 9.560 10.530 11.500

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 801 / 7399


NAPA for Design Manuals 2016.3

Symbols without parameters


variable NAME overrides table symbol NAME
Symbols with parameters
function VOL overrides array VOL

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.

There is also the option

!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.

7.3. Output function

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.

8. Control related to calculations and geometry


The commands !TOL, !GMTP, SECWL INTOL and !ECO allow the setting of various operation modes or tolerances concerning geometry and
calculations. For more information on their meaning, see the documents on geometry and calculations. These commands are usually not needed
in normal work and some parameters (!ECO, !GMTP) have been provided mainly for compatibility with older releases. See also the reference
system. Occasionally one may need

!TOL polygonization tolerance

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.

9. Functions related to file i/o and management

9.1. Opening and closing files

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:

!OPEN directory>file unit

!OPEN project unit

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).

The following options may be needed:

NEW: create a new file. Default=the command refers to an existing file

OVR: (overwrite) create a new file if it does not exist before

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.

Copy a version to a temporary file

This need may occur when a project is sent to another company.

Copyright © 1992 - 2016 NAPA. All rights reserved. 802 / 7399


NAPA for Design Manuals 2016.3

TOC
!OPEN TEMP>P1234.DB 5 NEW
SELECT VER=A
UNIT 5
COPY TO 5
!CLOSE 5

Copy figures from another project

TOC
!OPEN P1234 5 AUX
SELECT NAME>DRAW* VER=A
UNIT 4
COPY FROM 5
!CLOSE 5

Write macro output to an ASCII file

!OPEN TEMP>TEST 11 OVR


!LINK 3 11
@@ 3=listclass 3, used by !OUTPUT, 11=file unit
@FOR I=1,10
!OUTPUT Line @i
@NEXT
!CLOSE 11

The resulting file will be

Line 1
Line
...
Line 10

Access an ASCII file in a macro

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 803 / 7399


NAPA for Design Manuals 2016.3

9.2. Reading and writing environmental variables

Command !ENV handles environmental variables:

$$(!ENV) !ENV name print the value of the given variable

!ENV name=value assign a value to the given variable

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).

9.3. Other commands

The following commands are less likely to be needed, but they are listed here for information.

!IOC i/o control for databases

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.

!ATTACH file attach point

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.

!VERSION change version

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.

!ENL enlarge database

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.

10. Commands related to system development


The main purpose of the following commands is to assist in system development and they are listed here for information only.

!TRACE set trace parameter

The trace parameter provides a way for the system developer to switch on and off various output functions or alternative operating modes.

!DML list description

This command lists a description, i.e. a database object in terms of its own structural components.

!MAP list contents of the free storage

Copyright © 1992 - 2016 NAPA. All rights reserved. 804 / 7399


NAPA for Design Manuals 2016.3

The free storage is the place where descriptions are held at run time. !MAP gives a short summary of its named contents.

!STATUS list the state of usage of the free storage

!TEST set test mode

In the test mode, the internal error messages between subroutines are visible and a system error does not interrupt the run.

11. Various functions

11.1. Output to the log

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 !PAUSE makes the system wait for a specified time.

11.3. Command !BELL

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.

11.4. Assigning full profession mode

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.

11.5. Creating private lists

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.

11.6. Assigning actions to events

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

LD.CHANGE: the loading condition has been changed

The INQ option in the !ACTION command gives a list of registered events, all of which are not implemented.

11.7. Assigning terminal properties

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 805 / 7399


NAPA for Design Manuals 2016.3

12. Transparent services for GM, SM and TAB


Some functions of GM (geometry), SM (ship model) and TAB (table calculation) are available as transparent commands, in order to make them
generally available. Most of these are intended for special cases only. The following commands are the most important ones; for the rest, see the
command explanations.

!SM (no parameters) Tells the current arrangement.

!GM DES name Lists the definition of the given object.

!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.

!TAB WA LIST Lists all work areas.

13. Command specifications


The command explanations related to the subjects of this chapter are collected separately for practical reasons. They are grouped the same way
as the subjects in the text. Transparent commands not presented in this chapter are mentioned.

13.1. Help functions

!COMMANDS print list of available commands

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 !

!: (opt) print a list of transparent 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

List all events defined for the subsystem ss.

Copyright © 1992 - 2016 NAPA. All rights reserved. 806 / 7399


NAPA for Design Manuals 2016.3

!EXPLAIN explain error message, command or function

!EXPLAIN nr lang

nr: error number

lang: (opt) language, E=English, G=German. Default as defined in installation parameters or by


command !LANG ... D. The English version is used if a translation in the given language is not
available in the system data base.

!EXPLAIN ident part

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

This form allows other than current commands to be explained.

ident: command identifier

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

The first explanation of the command THR found in GM is given.

!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

Explanation for then event 'name' of subsystem 'ss'.

!EXPLAIN *id

Explanation for then event '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.

!PARAMETER display parameters of command

The parameters of a command are displayed. (Subset of the output from the EXPLAIN
command).

!PARAM, command;

command: identifier of command

Copyright © 1992 - 2016 NAPA. All rights reserved. 807 / 7399


NAPA for Design Manuals 2016.3

13.2. Commands producing information

!WHERE display current project,version, program

!DATE current date and time/set date representation

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).

!DATE REP type

type: type of date representation

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.

NS: date as YY-MM-DD, time as hh.mm.

LOCAL: local convention as registered by the operating system

LL: local convention, long form

E: dates: DD.MM YYYY, times HH:MM

US: dates: MM/DD/YY times HH:MMd d=a or p

!FRN inquire frame number

The frame number of a given x-coordinate or the x-coordinate of a given frame number is
returned.

!FRN x;

x: x-coordinate. The frame number is returned.

!FRN #fr;

fr: frame number. The x-coordinate is returned.

!REF list reference dimensions

!DTX list dynamic texts

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.

!ERR list errors

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.

!NEWS new functions

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.

13.3. Catalogs and selections

!SELECT select objects

Copyright © 1992 - 2016 NAPA. All rights reserved. 808 / 7399


NAPA for Design Manuals 2016.3

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

!SELECT source prefix db-criterion - quantity-criterion ->array options

This is the complete basic form, presented first as a short overview. The parts are described
more closely below.

source: (opt), data base unit or directory, default=PROJDB

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.

prefix: (opt) data base prefix, e.g. ARR*

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)

->array: (opt) array for receiving the result, default LIST

C Main selection criteria

!SELECT ... prefix db-criterion - quantity criterion ...

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.

-: separator, may be omitted if there is no quantity criterion.

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).

S Special selection criteria

!SELECT ... db-crit ref-crit loc-crit user-crit - ...

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-crit: locates texts in string records:

LOC=(str,str,...): locate a string EQUAL to a given one

LOC>(str,str,...): locate a string BEGINNING with a given one

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 809 / 7399


NAPA for Design Manuals 2016.3

!SELECT ... ->array 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: sort according to names

SORTD: sort according to dates (newest first)

SORTN: sort according to dates (newest lasst)

SORTV: sort according to versions

SORT=qnt: sort the result according to the given quantity as found in the descriptions
(SH-based subsystems only).

L: list names of selected descriptions

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.

T: similarly for description types, array Txxxx (integer values)

D: similarly for description dates, array Dxxxx (internal form)

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.

SUB Subset from previous selection

!SELECT FROM array1 db-crit. quantity-criterion ->array options

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.

db-crit: (opt) as db-criterion, but restricted to alternatives NAME>nnn and VER=vers.

quantity-criterion: (opt) as above

array: receiving array

options: as above

!SELECT FROM array

This form simply restores the selection stored in 'array'

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 TYPE=R REF=HULL

Select descriptions of type R (room), containing a reference to the object HULL.

Copyright © 1992 - 2016 NAPA. All rights reserved. 810 / 7399


NAPA for Design Manuals 2016.3

!SELECT NAME>LD*CON LOC<(DEPARTURE ARRIVAL)


!SELECT 'LD*CON(' LOC<(DEPARTURE,ARRIVAL)

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.

!SEL SYSDB NAME>FIG* NAME


!SEL SYSDB FIG* NAME

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>SH - P=1000...2000

Selection with a range given for quantity P.

!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.

!SELECT NAME>SHS*STRIP_ - HEADING=3.14159

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.

SELECT select subset

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.

SELECT criterion options

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.

options: special selection options:

K: select only encrypted descriptions, -K: exclude encrypted ones

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 data elements with version=A.

SELECT, VER=(A,B,C), NAME>HULL -R

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, DATE>860101 TYPE=(1001...1004)

Select descriptions newer than the given date and with type in the given range (1001=curves,
1003=surface,1004=rooms).

SELECT NAME>DATA -VER=(A,B)

Select data elements from any version except A and B

SELECT TYPE=G USER=NN

Select geometry created by the user NN.

Copyright © 1992 - 2016 NAPA. All rights reserved. 811 / 7399


NAPA for Design Manuals 2016.3

!CATALOG catalog of data base contents

This command produces a catalog of data base contents as in task TOC.

CATALOG unit prefix selection SORT U

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.

SORT: (opt) sort in alphabetic order

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.

K: mark encrypted descriptions (K)

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...

CATALOG make table of contents

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.

U: show the user who last wrote the description

K: mark encrypted descriptions. K=description encrypted.

A: show access rights (of the current user): r=read, w=write, e=execute. Capital letter=from
explicit restriction.

B: suppress the description type

D: show deleted description (only), +D: show also deleted ones.

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.

STRIP: mark stripped geometric objects

TABLE: generate a table named TAB*CATALOG (not stored).

CATALOG prefix options

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 (.

Copyright © 1992 - 2016 NAPA. All rights reserved. 812 / 7399


NAPA for Design Manuals 2016.3

options: options as explained by !EXPL CAT/GEN.

EXAMPLES
CATALOG

Start the short (old) catalog function.

CATALOG VER=A NAME>TAB* SB TAB

Use the general catalog function. Record the size in bytes and store the result in a table.

CATALOG 'LD*CON(' NAME

List loading conditions having LD in the name, e.g. LD*CON(LD100).

13.4. Functions related to the calculator

!CALC calculate expression

The value of an expression is returned. The expression can be an ordinary arithmetic


expression or anything involving the functions presented below. The result can be stored in a
variable or a whole array can be calculated. Explanations for the basic calculator functions are
obtained by !EXPL c.xx (function xx) and a list is obtained by !COM C.F. Similarly, explanations
for service functions are obtained by !EXPL ss.xx. Examples: !EXPL C.SQRT, !EXP GM.DATE.

!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.

-: (opt) do not print the result (default if assignment in macro)

!CALC array()=expression

This form repeats the calculation for a whole array.

array: name of array. Be careful with adding the syntax (); otherwise the array name becomes
redefined to be an ordinary variable.

expression: expression to be assigned. If it contains references to whole arrays (syntax as above) or to SH


quantities, the assignment is done as many times as there are values available, otherwise it is
done as many times as there are elements in the array at the call. The symbol CI can be used
for referring to the current index, which runs from 1 upwards. The simplest case is copying an
array:

!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 ...)

The following special symbols can be used as operands: ZDWL,BDWL,LREF,XREF,PI


(=3.14159), RO (=PI/180), SPD=86400 (seconds/day), CLINE (current line on the list), SCL
(current)scale), CI (current index), CDIR (current directory in the SH sense), PROFM
(professional mode), EDTEXT (refnr. of editor work area), EDLINE (reference number of the
current line), UINPUT,VINPUT,PINPUT, INPUTKEY (coordinates, key from last graphic input)
RELEASE (current release), GUIMODE (1/0 graphic user input mode on/off).

Copyright © 1992 - 2016 NAPA. All rights reserved. 813 / 7399


NAPA for Design Manuals 2016.3

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

!OUTPUT output command for NAPA BASIC

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.

!VAR handling of variables

This command controls the function of the calculator and handles some related services.

MAIN main function

!VAR control

Set various options related to the function of the calculator.

control: one of the following:

&: make & the variable flag, similarly .

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.

RDC reset, delete, check

!VAR RESET T

Copyright © 1992 - 2016 NAPA. All rights reserved. 814 / 7399


NAPA for Design Manuals 2016.3

Delete variables.

T: (opt) delete only those variables ADDED after last task entry, default=delete all.

!VAR DEL name

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.

!VAR CHECK ON/OFF

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.

LIST listing of variables or array

!VAR LIST name options + *

List variables or values of array.

name: (opt) name of array. If omitted, the values of all variables are listed.

options: options for listing of array:

FORM=form: specify format in the form f.d. Default=7.2, i.e. field=7, number of decimals=2.

COL=n: number of columns, default=as many as fits into the line.

MARG=n: margin, default=0

RES: write into the result list (listclass 1), default=log (4)

O: write with listclass 3 as in the !OUTPUT command

I1=i1: start index, default=1

I2=i2: last index, default=last value in the table

+: (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.

SPEC special functions

Special functions.

!VAR BSL ON/OFF Controls interpretation of backslashes: OFF=backslash treated as ordinary


character, ON=backslash marks that the next character is to be treated as given. Default=ON.
NOTE: GUI macros deliverd by Napa Oy will require !VAR BSL ON. This command does not
affect the role of backslashes in NAPA BASIC commands.

!VAR ASD refnr

Set the current source description for SH type quantities.

refnr: the value returned by function DB.

13.5. Control of calculations and geometry

!TOL set/list polygonization tolerance

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 815 / 7399


NAPA for Design Manuals 2016.3

!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.

!ECO set end correction mode on/off

The command sets the end correction mode of integration on/off. The default mode is assigned
in the reference system.

!ECO ON

!ECO OFF

!GMTP set curve generation method

The command is used for temporary changes of the curve generation method permanently
stored in the reference system.

!GMTP sel

STD: generate polygons only

SPLINE: generate spline representation

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

!INTOL change iteration tolerance

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.

!INTOL tol TRACE ON/ALL/OFF

Change the tolerance and/or the tracing alternative.

tol: (opt) tolerance between 0.02 and 0.00005.

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).

ON: show the achieved accuracy at the end of each balancing.

ALL: show the accuracy in every iteration step of balancing.

OFF: (default) do not show the achieved accuracy.

!INTOL

Show the current tolerance and the tracing alternative.

!SECWL calculation from waterline sections

Copyright © 1992 - 2016 NAPA. All rights reserved. 816 / 7399


NAPA for Design Manuals 2016.3

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

13.6. Functions related to file i/O

!CLOSE close file

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

unit: close file unit, interpreted as in the command !OPEN

!OPEN open file

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.

!OPEN file unit options

file: name of file or project:

project: means the data base of the given project

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.

FILE='path': equivalent with the preceding alternative

unit: file unit, decides also the type of file:

1...7: unit number in the DB sense. The file will be made available as data base file

10...: FORTRAN unit number. The file is supposed to be a text 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.

OVR: (overwrite): open file regardless of preceding existence

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 the database file of project P1234 as unit 5.

!OPEN P1234 5 AUX

Open the auxiliary file of project P1234 as unit 5.

!OPEN TEMP>T$0001 11

Copyright © 1992 - 2016 NAPA. All rights reserved. 817 / 7399


NAPA for Design Manuals 2016.3

Open (existing) file TEMP>T$0001 to be used as FORTRAN unit 11.

!OPEN PROG>STSYSDB 5

Open file PROG>STSYSDB to be used as DB unit 5

!OPEN 'c:/napa/pr/projectx.db' 6

Open the given file. (Backslashes may be entered as ordinary slashes).

!OPEN LIST

Special case: list currently open data base files. The IOF appears as unit 8.

!ENV print/set environmental variable

The command concerns environmental variables as set with command SET.

!ENV name

Print the value of the given variable.

!ENV name=value

Set the value to the given variable.

!IOC input/output control (*)

This command changes the association between dataclasses and files, and the versions used
(not for normal use).

!IOC, dc, ur, vr, uw, vw;

dc: dataclass. If dc<1000, it concerns ranges of dataclasses, as for instance dc=22 concerns
dataclasses 2200...2299

ur: unit used for reading (1...4)

vr: version used for reading

uw: unit used for writing

vw: version used for writing

A minus sign instead of a parameter leaves the current value unchanged.

!ATTACH change system attach point

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

name: name components to be added, including all delimiters.

!VERSION change version (*)

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;

ver: new version

!VERSION LIST

List the versions in the current project. The default version is flagged with an asterisk.

Copyright © 1992 - 2016 NAPA. All rights reserved. 818 / 7399


NAPA for Design Manuals 2016.3

14. Commands for development and maintenance

!DML list description

A given description or record is listed in the general format for description listing.

!DML, descr/vers/unit

descr: name of description

/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.

/unit. (opt) data base unit (DB1...DB6), default DB1.

!DML refnr

refnr: reference number of description or record

!MAP list contents of the free storage

A list is produced, giving the descriptions and records currently in the free storage.

!MAP options

options:

+: list record numbers also

-: list names, types, dates and reference numbers only

>name: only named descr. beginning with 'name'

!STATE state of the free storage

Data telling the extent of the free storage usage are displayed.

!STAT sel

sel: (opt)

C: include check that the free storage is structurally correct

G: produce statistics for categories of data: geometry=geometry handled by the object


administration, geometry+=named geometry descriptions, tables,tables+=analogically,
tab-undo=backup data for table undo, csect=calculation sections, conn=connections between
objects, figures=drawing contents, arrays=created by the ARR function, steel=NAPA Steel
generated data, unnamed=unnamed descriptions not covered by the preceding groups,
other=other named. Own categories can be added by reserving an array named DMGROUPS,
giving the groups by the start of the name.

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).

!TEST control related to testing

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.

trace: (opt) same as in the TRACE command

!TEST FPE sel

Copyright © 1992 - 2016 NAPA. All rights reserved. 819 / 7399


NAPA for Design Manuals 2016.3

Special case: controls the action in case of arithmetic exceptions:

OFF: apply IEEE standard silently (default)

ON: print ARITH$, results undefined after exceptions

ABORT: abort the run after arithmetic exceptions

!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.

!TRACE set trace parameter or other check function

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: value assigned to the TRACE variable.

!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 MET ON/OFF

Sets/cancels reporting of macro execution times. Concerns only named macros.

!TRACE OFF

Cancels all settings made by *TRACE.

14.1. Various commands

!TYPE write the input record

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

text: text that shall be written

!BELL activate bell

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

The command makes the program wait a specified time.

PAUSE time

time: (opt) time in seconds, default=5

PAUSE ONERR W

Copyright © 1992 - 2016 NAPA. All rights reserved. 820 / 7399


NAPA for Design Manuals 2016.3

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.

!PRF professional mode on/off

This command controls the so-called professional mode.

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:

ON: turn normal professional mode on

OFF: turn professional mode off

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.

!PRL private list and plots

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

ON: mark as private, OFF=do not

!SPAWN run external functions

The commands starts a subprocess for running a command under the operating system.

!SPAWN command arguments option

command: command with optional arguments (one string). Special case: !: exit and enter commands
manually.

arguments: arguments, appended to 'command' unless option B given.

option: (opt)

W: wait until the process is finished, default=do not.

P: open a command prompt window (Windows only), do not wait

B: store the command in script, run the script, default: present the given command directly.

EXAMPLES
!SPAWN 'fgrep abc temp/*'

Run the above command.

!SPAWN '/programs/myprog' 'file1 file2'

Run the given executable file with the given arguments.

!SPAWN !

Exit to the operating system for manual entering of commands. Return by typing 'exit'.

!SPAWN PROCESS 'file'

file: name of program to be started

Copyright © 1992 - 2016 NAPA. All rights reserved. 821 / 7399


NAPA for Design Manuals 2016.3

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).

14.2. Transparent services from GM, SM, TAB

!GM auxiliary functions for object handling

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

!GM operation parameters

------------------------

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

LQ: set/inquire listing quantities for INFO command

INFO: info about object(s), as controlled by LQ

DES: list definition of object

GET: get given object into memory

NR: give number of objects in memory

parameters: name of object(s) for GET, DES, INFO, normal LQ parameters for LQ; none for other
alternatives.

TOL tolerances

!GM tolname tol

---------------

Change tolerances used in intersections.

GTOL is used in sections of rooms, surface objects and combined objects.

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.

RTOL is used when curves are combined in the room sections.

tolname: name of the tolerance

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.

GTOL: gap detection tolerance in combination of curves.

ATOL: angle tolerance used in knuckle detection (in degrees)

CTOL: curvature tolerance used in knuckle detection.

BTOL: gap detection tolerance in combination of segments

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 822 / 7399


NAPA for Design Manuals 2016.3

OPT various options

!GM property parameter

Sets various control parameters.

property: property controlled

DEC,n: Sets maximum number of decimals used for the projection in DES <curve>. n=number
of decimals, default=3.

FSEC,method: Define method of facet/plane-sections. method=O (old) or N (new, default since


REL951)

GMTP,method: Define/inquire the curve generation mode. The changes are valid for current
run only or until task REF has been used.

STD: generate polygons only


SPLINE: generate spline representation
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

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.

DBWATCH,opt,time: controls the dbwatch function, see !EXPL GM.DBWATCH.

RSEC method of room sections

!GM RSEC options

----------------

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.

options: control parameters

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.

C: calculate with N and O and show the differences

C2: calculate with N and O and show the results

Copyright © 1992 - 2016 NAPA. All rights reserved. 823 / 7399


NAPA for Design Manuals 2016.3

D: dump the operands related to the cases shown by C or C2 into the listclass 3

M1: (default) accept self overlapping facet boundaries

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

RESET: set defaults of the program

FSEC method of facet sections

WSEC wireframe sections

!GM WSEC option alternatives

----------------------------

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).

option: (opt) identifier of the option

LIMIT: limiting box

EX: endpoints of x-sections

EY: endpoints of y-sections

EZ: endpoints of z-sections

GRID: use of the grid near the intersection points

EC: forcing intersections into the box of extreme coordinates

SORT: ordering data

DEBUG ON: debug intersections

DEBUG OFF: cancel debugging (default)

SCOPE W: intersect only wireframe surface by the wireframe routines

SCOPE G: intersect also grid and patch surfaces by wireframe routines

RESET: set back the default value

LIST: show current values of the options

empty: show options that have been defined by !gm wsec

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

ARCTOL tolerance for arc generation

!GM ARCTOL tol1 tol2

--------------------

Copyright © 1992 - 2016 NAPA. All rights reserved. 824 / 7399


NAPA for Design Manuals 2016.3

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)

OVERLAP intersection of self overlapping surfaces

!GM OVERLAP method

------------------

Handling of overlapping branches in intersection curves is defined here. As a default NAPA


assumes that the patches of a surface are not overlapping. Overlapping branches are not
expected in the intersection curve unless it goes along the common boundary of two patches.
This is noticed by the intersection routines, and an elimination of the overlap is asked if
needed. However, in some special case a NAPA surface can contain overlapping patches. In
order to use such a surface in calculations the command !GM OVERLAP M3 is recommended.

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

M3: as M2, but a more detailed method is used.

GET fetch object from different version

!GM GET name/vers/project !

---------------------------

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

/project: (opt) fetch from different project, default=current one.

!: allow reading even if already in memory

!GM CSE object array

List x-coordinates of calculation sections. Step discontinuities are returned as two sections 4
mm apart. Similarly !GM DISC: list discontinuities.

object: name of object

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 825 / 7399


NAPA for Design Manuals 2016.3

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.

!SM various arrangement related operations

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.

!SM (no parameters)

Tells current and registered arrangements.

!SM GET arr

Makes given arrangement current. Normally, the ARR command of the current task should be
used.

arr: name of arrangement

!SM FST target table/column source

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.

target: (opt) COMP=for compartments (default), STR=for structures

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.

!SM PST target table/column source

Defines pen control table (see also PEN/DR).

target: (opt) COMP=for compartments, STR=for structures (default).

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.

!SM REF name

Make the given reference surface arrangement current. The reference surface arrangement is
a new concept in rel 2006.

!SM REF name

name: name of the table representing the reference surface arrangement.

!SM OPARR name

Make the given opening arrangement current.

Copyright © 1992 - 2016 NAPA. All rights reserved. 826 / 7399


NAPA for Design Manuals 2016.3

name: name of the table representing the opening arrangement.

!SM RESET

Clears all SM data in memory.

!SM STR name

Make structure arrangement current. The only function presently using this information is
selecting filling or pen code according to structure properties.

name: name of structure arrangement (as defined under STR/SM).

!TAB auxiliary functions related to table calculation

!TAB LIST >nn

List tables in memory.

>nn: (opt) list only names beginning with nn (prefix included)

!TAB GET name/vers/DBn var O F !

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.

name: name of table

/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)

F: (opt) freeze: read the table as stored without updates

!: (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.

!TAB UPDATE name name ...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 827 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 828 / 7399


NAPA for Design Manuals 2016.3

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:

Geometric objects in geometry subsystem

Copyright © 1992 - 2016 NAPA. All rights reserved. 829 / 7399


NAPA for Design Manuals 2016.3

1.1. Surface objects

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:

2.1. Direct definition

Direct definition means entering a description of an object as a text, for instance

ROOM BOX
LIMITS 0 10 0 5 0 8

2.2. Modification of existing objects

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.

2.3. Drawing functions

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 830 / 7399


NAPA for Design Manuals 2016.3

grid).

2.4. Listing functions

The listing functions provide information about geometric objects in various forms (dimensions, coordinates, catalogs etc). A special case is the
lofting tables.

2.5. Link functions

The link functions produce descriptions of geometric objects that can be transferred to other systems.

2.6. Generating FEM models

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.

2.7. Generating panel models for CFD calculations

This function is analogical with the preceding one, but the models generated and the target systems are different.

3. Organization into tasks


The geometry functions are collected into the following command environments:

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'

TRANSFORM transformation of hull surfaces

LOFT lofting tables

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.

4. Overview of the user's instructions


The geometry subsystem is a rather large one, and the document has been divided into parts as follows

4.1. Hull definition

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.

4.2. Special surfaces

'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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 831 / 7399


NAPA for Design Manuals 2016.3

4.3. Rooms

A 'room' is the object type by which the geometry of compartments is represented. Rooms are defined by their bounding surfaces.

4.4. Surface objects

A 'surface object' is a surface obtained by topological relationships between surfaces. Surface objects are used for representing the geometry of
structures.

4.5. Commands and service functions

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.

4.6. Functions for exporting geometry

The following subjects include various forms of producing data for use outside NAPA.

general link functions


This chapter presents all pure geometric links.
panel models for CFD calculations. In addition to the main varsion, there is an older function, still available and presented in a separate
chapter.
finite element models

5. Separately priced functions


Some of the functions presented in this document are optional features, meaning that they do not automatically belong the NAPA version
distributed, but must be acquired according to special agreements.

Copyright © 1992 - 2016 NAPA. All rights reserved. 832 / 7399


NAPA for Design Manuals 2016.3

General about geometric objects (GM)


This chapter presents some principles concerning geometric objects in general. The objects concerned can be space curves, surfaces, rooms or
surface objects.

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.

2. Storing objects in the database


Each object is stored as a so-called description in the database. These descriptions are named as the object, i.e. no prefix is added as in the case
of other data. Thus, the object names are used directly in commands such as

!CAT NAME>HULL

When making selections, it may be useful to know that the description types assigned to the descriptions of geometric objects are

1010 point objects P

1001 curves C

1002 tangent functions

1003 surfaces S

1004 rooms R

1005 surface objects SO

The symbols P, C, etc are the values accepted for TYPE in database selection, instead of the integers.

Copyright © 1992 - 2016 NAPA. All rights reserved. 833 / 7399


NAPA for Design Manuals 2016.3

3. General about definition functions


All definitions start with a command telling the type and name of the object defined, for example

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

ANY: allow overwriting of any object


STD: the default rule
MAC: from macro, same as STD, else NONE
NONE: never allow overwriting

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 !:.

Object-specific overwriting protection can be assigned with the command LOCK.

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:

UNDO L: just list the names and types


UNDO D: list the definitions
UNDO E: enter the definition 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.

5. Dependence between objects


An essential feature in the definition of objects is the possibility to use already defined objects when creating new ones, for example, placing a
curve through an existing one or defining a room by using the surfaces forming its sides. Objects become therefore dependent of each other, and
the dependencies are handled differently for different types of objects.

Copyright © 1992 - 2016 NAPA. All rights reserved. 834 / 7399


NAPA for Design Manuals 2016.3

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.

6.1. Definition date

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.

6.2. Logical date

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.

6.3. Database date

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 835 / 7399


NAPA for Design Manuals 2016.3

8. Connections to the calculator and NAPA BASIC


There are a number of calculator functions operating on geometric objects. For example, the inclination or coordinates of points on a curve, the
area of a surface or the volume of a room can be accessed by calculator functions:

@P=POINT('STEM',3,ZDWL) locate point on stem at z=zdwl

@X=COORD('STEM',1,P) get the x-coordinate of the given point

@A=AREA('DECK1') the area of surface

@V=VOL('T14',4.5) the volume of room to a given level

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:

@NAME=.... the name of the cube

@X=... lower x

@Y=... lower y

@Z=... lower z

@L=... the length of side

ROOM @NAME

LIMITS @X @X+L @Y @Y+L @Z @Z+L

See also the object type PMO, parametric macro object, presented under special definitions.

9. Orientation and sides


Orientation is a concept that applies to surfaces and surface objects. Where possible, the system tries to classify a surface as transversal,
longitudinal or horizontal, meaning that the surface is more or less oriented as a plane normal to the x-, y or z-axis respectively. The symbol of the
axis is used when designating the corresponding orientation. How far the surface is allowed to differ from such a plane, while still being
considered as having that orientation is based on heuristic rules. If needed, the orientation can be specified explicitly in the definition.

Examples of objects with different orientation


The orientation may be undefined, if no axis qualifies. A special case is a closed surface.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 836 / 7399


NAPA for Design Manuals 2016.3

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.

10. Reference coordinate


A surface may have a so-called reference coordinate. For coordinate planes, it is automatically defined to be the coordinate of that plane. For
other surfaces, the reference coordinate defines a kind of a nominal plane, which must be selected by the user. The reference coordinate can only
be defined for the coordinate corresponding to the orientation of the surface.

With the reference coordinate, it is possible to designate locations with respect to surfaces (or surface objects) in one of the following ways:

#name, #name+d, #name-d, #name+#n

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: translation distance q in the direction of 'axis', for example, Z+2

axis/q: reflection about the plane axis=q, for example, Y/0 (=about the center plane)

+axis/q: symmetry operation about axis=q

angle/(x,y,z): rotation about an axis, that is parallel to a coordinate axis

The transformations are attached to the object by adding this syntax in parentheses directly after the name, for example:

DECK1(Z+2.5)

Several transformations may be combined within the parentheses.

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.

12. Handling objects at run time


Surfaces, rooms and surface objects are connected to each other by relationships needing special support at run time.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 837 / 7399


NAPA for Design Manuals 2016.3

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.

13. Command !GM


The transparent command !GM offers some service regarding geometric objects in contexts where the auxiliary functions in the GM task are not
available. The main functions are clearing of the run time memory (allowed on task level only), listing object definitions (the same as the DES com
mand) and giving information as in the INFO command.

14. Pilot level functions


The following functions are implemented on pilot level. 'Pilot level' means that the function has not been extensively tested and it is not
necessarily supported in all connections. The existence is documented so that interested users can experiment with it, and if the function is found
serving a useful purpose, the implementation can be made complete.

Sharing objects between versions


An object can be defined to the same as in another version. A typical application could be to share the hull form between two versions.
Temporary definitions
A definition can be made for the run time only, but not stored in the database. Generated data such as calculation sections are also kept
in the run time memory only. One purpose is to allow testing the effect of various changes without doing permanent changes.
The instructions are found under 'auxiliary functions'.

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.

15. Fetching objects from other projects and versions


The command COPY under DEF is provided for permanently copying objects from another project or version. It has options for getting referenced
objects and if the objects should be in use in the current run, it records the result in the object administration.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 838 / 7399


NAPA for Design Manuals 2016.3

Definition of curves (GM)


Table of Contents:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 839 / 7399


NAPA for Design Manuals 2016.3

'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).

1.1. Curve types

The space curves can be divided into four types:

principal plane curves which are curves located in coordinate planes


general plane curves, or curves located in arbitrary planes
general space curves defined with a location surface
general space curves defined by points in space

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.

1.2. Parts of the curve definition

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:

The parts of a curve definition with a location surface

1.3. Location surface

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 840 / 7399


NAPA for Design Manuals 2016.3

Examples of location surfaces


Usually, the location surface is a very simple surface, most frequently a plane.

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.

1.4. Definition of the shape

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.

The points may be given as

explicit points given by two coordinates


points represented by point objects
points obtained by intersecting other curves with the location surface
points obtained from another curve by various special instructions.

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.

Defining points on already defined curves


The corresponding definition is given by

ZY, WL0F, (3.1,1.5), WL3F, WL6F, (7.5,8), KN1F, DECKF

Copyright © 1992 - 2016 NAPA. All rights reserved. 841 / 7399


NAPA for Design Manuals 2016.3

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:

explicit angle in the projection


free angle
instruction concerning the inclination of the surface
instruction concerning the interpolation between adjacent points.

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:

Effect of free angle


If the tangent to the surface is known (in addition to the location surface), the direction of the curve can be determined. Controlling the curve
direction via the inclination of the surface can be done in the following ways, available in connection with a curve reference:

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:

Selecting the appropriate multiple of 180 degrees


Except for the explicit angle in the projection, the angle conditions have their counterparts among the side conditions. A side condition given with
the referenced curve is taken into account without special mentioning, unless overridden by explicit angle conditions.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 842 / 7399


NAPA for Design Manuals 2016.3

...(u,v)(u,v)...

equivalent with

... -/ (u,v) /- ...

The latter syntax is used in the output of the DES command.

The double point syntax has been added in order to make digitizing easier: by pressing the P-button twice, a knuckle is obtained.

Duplicated curve references are also converted into knuckle points.

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.

1.7. Interpolation between given points

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.

1.8. Curve through space points

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 843 / 7399


NAPA for Design Manuals 2016.3

use this type mainly follows from the following considerations.

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.

The XYZ curve is presented in more detail below.

2. Syntaxes

2.1. General format

The definition of a space curve has the following general form:

CURVE, name 'description'


location surface
projection
SC, side conditions

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.

2.2. Definition of the location surface

The different types of location surfaces are defined as follows.

2.2.1. Principal plane

Depending on the plane in question, one of the records X, Y or Z is used; X, q, Y, q or Z, q

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 844 / 7399


NAPA for Design Manuals 2016.3

CURVE WL2
Z 2

CURVE FR6
X FSF/WL2F

2.2.2. General plane

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:

THROUGH, (0, 0, 0), (20, 0, 10), (20, 5, 15)

THROUGH, (-, 0, 8), (-, 10, 6)

or

THROUGH, X (0, 8), (10, 6)

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:

XZ (0 10) -/ (60 10) (100 12)

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.

2.3. Definition of the curve shape

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 845 / 7399


NAPA for Design Manuals 2016.3

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:

XY, p1, p2, .... pn;

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

This form copies the projection from the curve '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.

2.4. Definition of points

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 846 / 7399


NAPA for Design Manuals 2016.3

ZY (0 0) (6 1.2) (8 3.73) (10 6)


XY STERN (10, 1.23) (20, 4.21) FRM
XY STERN FR2 FR3 FR4 FRM

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.

2.5. Handling multiple intersection points

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.

Selecting between multiple intersection points


Different curve references on the frame marked with the solid line will result in the following points being included:

ZX, STEM, ... gives A, B, C

ZX, STEM/Z<2, ... gives A

ZX, STEM/Z<5, ... gives A, B

ZX, STEM/Z=#4 ... gives B

ZX, STEM/Z>12 ... gives none

The selection is also available with the curve/curve syntax, for example

Copyright © 1992 - 2016 NAPA. All rights reserved. 847 / 7399


NAPA for Design Manuals 2016.3

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:

Using point object for unambiguous curve reference

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

XZ, ... FRM/Z=3.2, ...


XZ, ... FRM/Z<6, ...

(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.

2.6. Referencing definition points

Copyright © 1992 - 2016 NAPA. All rights reserved. 848 / 7399


NAPA for Design Manuals 2016.3

A curve reference can be made to a specified definition point:

name/DP/n any definition point

name/KN/n a knuckle

name/TP/n a tangent point

name/RP/n a rounding point

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).

2.7. Sorting the definition points

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:

Example of case needing general sorting method ZY ** ...


It may be necessary to tell the end points in order to get the desired result. Ordering specified by *** keeps the end points, i.e. the points given
first and last will be first and last in the result also:

X- Same point set ordered with ** (left) and *** (right)


The way the points are sorted defines the direction of the curve. Among other things, this determines the meaning of 'before' or 'after' a point.

The following figure illustrates the control of sorting and the meaning of the curve direction.

Copyright © 1992 - 2016 NAPA. All rights reserved. 849 / 7399


NAPA for Design Manuals 2016.3

Effect of curve direction


In the figure, the solid line results from the definition

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.

2.8. Referencing a curve grid

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:

XY, *HULLA, ... ;

The resulting curve is stored as if the references had been given directly. The record can also contain points given otherwise.

Note: the curve will not be added to the surface description.

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.

2.9. Removing dependencies

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:

XY, ... (TX1), (TX2), .... ;

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 850 / 7399


NAPA for Design Manuals 2016.3

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:

XY, ... (10, 2.341), (20, 3.179), ... ;

Multiple intersection points are not allowed as the result of this type of curve references.

2.10. Angle conditions

The following alternatives are available for angle conditions.

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.

2.10.1. Explicit angle in the projection

This is given by an angle in degrees, for example:

.... -90/, ....

2.10.2. Explicit angle in the surface

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:

XY, STERN, /*X=12.5, ... ;<index terms="plane, angle condition" />

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 851 / 7399


NAPA for Design Manuals 2016.3

M/

defines that the surface is parallel with the x-axis, as is the case at a normal midship section.

2.10.5. Free angle

A free angle is indicated by a minus sign:

..., -/, ...

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:

The curve part between points P1 and P2 shall be straight:

XY, .... P1, /-, -/, P2, ... ;

2.10.6. Tangent function

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:

..., */, name, ...

2.10.7. No angle condition

This alternative may occasionally be needed in order to prevent side conditions to be applied. Two minus signs stand for 'no angle condition':

..., --/, name, ...

2.10.8. Free angle at all points

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:

XY, <>, ...

Example:

A square with side 1 is defined by the following data:

XY, *, <>, (0,0), (1,0), (1,1), (0,1),


(0,0);

Angle conditions at the points override the '<>' specification (before Rel. 2001 these were ignored).

Copyright © 1992 - 2016 NAPA. All rights reserved. 852 / 7399


NAPA for Design Manuals 2016.3

2.11. Creating roundings

With the ROUND option, a knuckle is replaced by a rounding, as shown in the following figure:

Example of rounding

XY (0, 6) (5 5) ROUND=1/ -/ (9 2.8) /-, -90/ (9, 0.6)

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:

Example of rounding to the nearest definition point

XY (0, 6) (5 5) -/ (9 2.8) /-, /ROUND -90/ (9, 0.6)

In this case, the side on which the condition is given is relevant.

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:

POI ROUNDP fra/RP/1

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 853 / 7399


NAPA for Design Manuals 2016.3

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

The curve C4 has a 26 degree inclination.

Effect of RN option shown in 3D


In the case above, the radius depends on the given points, most importantly of the halfsiding curve. An end rounding can also be created without
the halfsiding curve by specifying the radius directly. In this case, the ROUND or RN option is attached to the end point, for example:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 854 / 7399


NAPA for Design Manuals 2016.3

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.

2.11.1. Example of the rounding function

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 855 / 7399


NAPA for Design Manuals 2016.3

The end rounding surface HULLF_R


HULLF_R is defined between the stem and the touching line curve with waterlines or space curves including the rounding functions. The curves
should be defined through the nodes of HULLF in touching line to get all the continuities. That way, the partial surfaces will be joined together with
the same continuities and without any gaps.

CUR RADIUS; X 186


ZY (0.3,0), (0.5,3), /-, -/, (0.5,7), (0.3,9.5), /-, -/,
(0.3,11), (7.8912,21.9238)

CUR ANGLE; X 185


ZY (0,0.5), (0.4,3), /-, -/, (0.4,7), (0.3,9.5), /-, -/,
(0.3,11), (0.4,21.9238)

CUR DECKF_R; Z FTCH/DECKF


XY FTCH/DECKF, /*R, RN=RADIUS*ANGLE/, STEM

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 856 / 7399


NAPA for Design Manuals 2016.3

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

2.12. Controlling the curve shape between the given points

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=r p2 ...

... 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:

Definition of positive and negative radius


In the latter form, it is only specified that the interval is to be filled by a circle. At the point opposite to the point where the /C syntax is given, the
angle must be defined by an angle condition, while the angle at the /C syntax is determined by the circle condition. Note that the effect is obtained
by controlling angles. For a function creating new definition points, see option ROUND presented below.

Effect of /C specification

Copyright © 1992 - 2016 NAPA. All rights reserved. 857 / 7399


NAPA for Design Manuals 2016.3

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)

2.13. Specifying the curvature

The curvature at a definition point can be specified by the R=r option:

Effect of changing the curvature

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)

Note: this option is implemented with the M2 type curve only.

Copyright © 1992 - 2016 NAPA. All rights reserved. 858 / 7399


NAPA for Design Manuals 2016.3

3. Curve through space points


As an alternative to defining a curve where the location in space is given by the location surface, a curve can be defined directly through a set of
points in space. The geometry of the curve is defined by a single record XYZ only:

XYZ point1 point2 ...

where the points can be either

(x,y,z): point given by three coordinates

(u,v): third coordinate given separately

point: by name of point object

curve/axis=q: curve at a given point, e.g. STEM/Z=2

curve1/curve2: intersection between two curves

curve/RP/n: rounding point, similarly other definition points

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 through space points

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

XYZ SORT=X ...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 859 / 7399


NAPA for Design Manuals 2016.3

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

axis=angle inclination of the given projection, e.g. X=90

*(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.

P=(vx,vy,vz): make the curve have the


given tangent plane

P=surface. get the tangent plane from


the given surface

The following angle conditions must be given with a point obtained from a curve or in combination with another one:

* apply tangent function

P obey the plane of the referenced curve

M make the tangent plane parallel with the x-axis

*axis=angle select the direction so that intersections from the surface have the given direction in the given section plane, e.g. *X=90

Example of angle conditions - angle in projection

CURVE SPC11
XYZ (0, 0, 0), /X=30, (2, 4, 5), X=-60/, (4, 8, 0)

Directions given by vectors

Copyright © 1992 - 2016 NAPA. All rights reserved. 860 / 7399


NAPA for Design Manuals 2016.3

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.

Side conditions at curve

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.

The data is given in the record SC in one of the following forms:

SC, sc

SC, sc1/side selection/sc1

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 861 / 7399


NAPA for Design Manuals 2016.3

axis (X,Y or Z) the sides are identified as +x/-x etc. Example: SC, -/Z/*X=90

P: the sides are identified as left/right as seen in the projection plane

empty: the sides are identified as left/right in the surface.

If there is need to define the inside/outside of the surface locally, this can be done in the SC command:

SC, ... O=outside

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.

The following example shows the definition of outside, attached to a curve.

Local specification of outside: SCC FRM O=R


The specifications given in the record SC can be given independently of the curve definition by using the record SCC:

SCC, name, sidecond

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;

cancels any previously given side conditions.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 862 / 7399


NAPA for Design Manuals 2016.3

Illustration of the information provided by a tangent function


If the owner curve is a knuckle, the definition of a tangent function must indicate on which side of the curve it is valid.

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.

The main purposes of tangent functions are to:

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.

5.2. Defining a tangent function

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.

The general format of a tangent function definition is the following:

TGF, name

XT, inclination data;

'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

The alternatives for 'side' are:

Copyright © 1992 - 2016 NAPA. All rights reserved. 863 / 7399


NAPA for Design Manuals 2016.3

+axis, -axis: the side is identified by the given coordinate half-axis e.g. KNA/-Z: valid below the curve

R, L: the side is identified as right/left in the projection plane.

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:

XT, (30, 0), (Z=4, 10), (35, *Z=-30), (Y=12, *Z=-40);

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.

Note: only explicit intersection points can be referenced.

A tangent function defined on the basis of existing data only can look like the following example:

TGF FR2

ZT WL1 WL2 WL3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 864 / 7399


NAPA for Design Manuals 2016.3

5.3. Storing a tangent function

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:

T*WL3, T+KNUCKLE1, T-KNUCKLE1.

These names are used in the UPDATE and DES commands.

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.

A curve is made the object of editing by the command EC (Edit Curve):

EC, curve

where 'curve' is the name of the curve in question.

Unless specially indicated (command REPEAT), it is assumed that one change only will be done, and exit from the EC subtask is done directly.

Examples of typical use are:

Adding a curve reference:

EC WL10; ADD FR8.5

Changing a point using graphic input:

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.

7. Automatic fairing of a curve


The FAIR command performs an adjustment of the points on a curve within a given tolerance, in order to improve fairness. This function can be
used for instance on the result of digitizing. It is, however, usually better to do the same thing simply by removing unnecessary points.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 865 / 7399


NAPA for Design Manuals 2016.3

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:

Example of automatic fairing

FAIR FDEMO 0.5 N M

N=make the moves at right angles to the curve

M=mark the tolerances

8. Auxiliary functions

8.1. Listing 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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 866 / 7399


NAPA for Design Manuals 2016.3

CURVE FR10; X, 102.5


ZY STEM, 90/, WL3F, SN, WL9F, KNF, (3.8, 10), DECKF
LIST OF CURVE: FR10
**************************************
X Y Z T SC REF.CURVE
102.500 0.000 1.274 6.15 STEM
1.101 2.500 90.00 90/ WL3F
0.000 3.553 151.56 (STEM)
0.000 7.187 28.68 (STEM)
0.275 7.333 30.65 SN
0.735 7.700 42.22 WL9F
3.153 9.366 28.99 (-/) KNF
41.21 (/-)
3.800 10.000 41.49
6.096 12.000 42.36 DECKF

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.

8.4. Finding errors

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 867 / 7399


NAPA for Design Manuals 2016.3

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.

8.5. Controlling the internal accuracy

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 ...

8.6. Spline representation

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:

definition of curves (CUR)


drawing of curves (PLOT and GRID)
listing of curves (LIST curve N)
preparation of patch surfaces (PRE)
conversion of facet surfaces into the patch representation (GEN)
intersection between a curve and a surface (GEN and PLOT)

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 868 / 7399


NAPA for Design Manuals 2016.3

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.

Curves with conic sections can be used in surface definition

8.7. Reconstructed curve definitions

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.

TOL=tol: Tolerance for conversion, default GMTOL.

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).

LOC=pla: Definition plane of location surface (pla=1,2, or 3)

SHAPE=pla: Plane of shape definition (pla=1,2, or 3)

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)

9.1. Definition of point objects

The basic definition of a point is

POINT name 'description' (x,y,z)

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 869 / 7399


NAPA for Design Manuals 2016.3

(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)

-p: point p reflected about y=0

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

9.2. Use of point objects

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 curve definitions, point objects can be used as follows:

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

X point x-coordinate taken

THR X p1 p2 y- and z-coordinates taken

THR p1 p2 p3 all coordinates taken

In other contexts than curve definition, there are the following places where point objects can be used:

AXIS p1 p2 cylinders, rotation surfaces

GENERATOR p1,p2 cylinders

FAC p1,p2,... arbitrary facet surfaces

TOP P1 pyramids

In the drawing task, point objects can be used in

TEXT text P1 position of text

POL P1,P2... points in polygon

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

(P,0,4) x-coordinate from the point P

9.3. Plotting point objects

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 870 / 7399


NAPA for Design Manuals 2016.3

Examples of plotting points

PLOT P1
TEXT #15 P2; TEXT P2 P2 (20)
TEXT #12 P3; TEXT P3 P3 (24)

9.4. Managing dependencies

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 871 / 7399


NAPA for Design Manuals 2016.3

Definition of general surfaces (hull definition) (GM)


Table of Contents:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 872 / 7399


NAPA for Design Manuals 2016.3

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.

Example of a simple grid

Example of a more complicated grid


There is no restriction on the type of curves to be used in the grid (frames, waterlines, verticals, diagonals or more general curves), as long as the
grid contains all special curves such as borders, knuckles, and it gives sufficient control between these.

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.

The definition of a general surface contains the following partial tasks:

The definition of the surface as a whole


Usually, this part consists simply of giving a list of the participating curves.
The definition of the curves
Most of the work with definition and modification concerns the curves.
The preparation of the surface
When the curves are defined or changed, the operation called preparation must be carried out before the surface can be used. In the
preparation, the internal surface description is created from the components.

This is illustrated by the following example, giving a complete, although trivial surface definition:

Copyright © 1992 - 2016 NAPA. All rights reserved. 873 / 7399


NAPA for Design Manuals 2016.3

Illustrating the parts of a surface definition

CURVE C1; Z, 0; XY (0 2) (10 3)


CURVE C2; Z 10; XY (0, 5) 0/, (10, 10)
CURVE C3; X 10; ZY C1 90/ C2
CURVE C4; X, 0; ZY C1 90/ C2
SURFACE S1; THROUGH C1 C2 C3 C4
PREP S1

3. Patch, NURBS, grid and wireframe surfaces


A general surface can be defined as a patch surface, a NURBS surface, a grid surface or a wireframe surface. The difference between these
concerns the internal processing only, and it does not affect the definition as far as syntaxes are concerned, except for the option telling what type
to use. With a NURBS surface the boundary curves have to be defined in addition.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 874 / 7399


NAPA for Design Manuals 2016.3

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.

Recommended surfaces, patch and NURBS

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.

NURBS (left) and patch (right) grids above, surfaces below

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 875 / 7399


NAPA for Design Manuals 2016.3

surfaces) to generate the surface equations.

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.

The date assigned to the surface is that of preparation.

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.

6. Deciding inside and outside


As for surfaces in general, one side of a general surface is called the inside and the other side the outside. Furthermore, a general surface is
usually considered having a certain orientation.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 876 / 7399


NAPA for Design Manuals 2016.3

Example of a surface where the outside is locally reversed


This problem can be corrected by starting the surface definition with curves in a well-behaving part, or by specifying the inside/outside for a curve
in the surface.

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.

Example of surface parts with inconsistently defined outside


The orientation of a combined surface is defined as that of the parts, provided that the parts all have the same orientation. Otherwise, it is
undefined unless separately defined by the command OUTSIDE. This may occasionally be needed, for example, if the transom has been defined
as an independent surface with outside -X.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 877 / 7399


NAPA for Design Manuals 2016.3

8.1. Special considerations for patch surfaces

8.1.1. Subdivision to obtain four sided patches

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.

8.1.2. Triangular patches

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:

PREP HULLFP TP=5

This criterion means that triangle patches shall be used in patches where the normal changes less than 5 degrees.

8.2. Determining the surface border

Copyright © 1992 - 2016 NAPA. All rights reserved. 878 / 7399


NAPA for Design Manuals 2016.3

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.

8.3. Missing intersection points

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.

8.4. Surfaces with common curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 879 / 7399


NAPA for Design Manuals 2016.3

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.

8.5. Parallel curves

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.

Finishing the softnose

8.7. Defining a partial surface

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 880 / 7399


NAPA for Design Manuals 2016.3

SURFACE HULLF2
THROUGH STEM FBF WL1F, .... FR12 /E, ....

Example of restricting a surface:

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).

8.8. Wireframe surfaces

A wireframe surface is defined as follows

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 881 / 7399


NAPA for Design Manuals 2016.3

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

or afterwards in the DEF task by the command

WO surface option alternatives

A temporary control of the wireframe sections is defined by the command

!GM WSEC 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

Copyright © 1992 - 2016 NAPA. All rights reserved. 882 / 7399


NAPA for Design Manuals 2016.3

!GM WSEC LIST

The defaulted set of options is shown below:

!GM WSEC LIMIT OFF ;** default

!GM WSEC EX
SYM UMIN VMAX ;** default

!GM WSEC EY VMAX US/VMAX ;** default

!GM WSEC EZ SYM VMIN US/VMIN ;**


default

!GM WSEC DEBUG OFF ;** default

!GM WSEC SCOPE W ;** default

!GM
WSEC GRID ON ;** default

!GM WSEC EC ON ;** default

!GM WSEC SORT OFF ;** 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.

OFF : no additional endpoints

Copyright © 1992 - 2016 NAPA. All rights reserved. 883 / 7399


NAPA for Design Manuals 2016.3

SYM : points at the plane u=0

UMIN : point with the minimum u-coordinate

VMIN : point with the minimum v-coordinate

napacmd>UMAX : point with the maximum u-coordinate

VMAX : point with the maximum v-coordinate

US : point at extreme u-coordinate of the surface

VS : point at extreme v-coordinate of the surface

UMIN/VMIN : if the primary criterium UMIN results in

many points, select a unique one by VMIN.

etc.

The following defaults are used:

WO EX SYM UMIN VMAX

WO EY VMAX US/VMAX

WO EZ SYM VMIN US/VMIN

The defaulted definition WO EC ON; is used to force all intersections within the box of extreme coordinates of the surface. The definition curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 884 / 7399


NAPA for Design Manuals 2016.3

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:

c1,c2,...,cN : curve c2 is after c1 etc.,

but there can be other grid curves between the given ones.

* c1,c2,...,cN : curve c2 is connected to curve c1 etc..

No other grid curve can be 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.

9.1. Number of curve elements in a surface element

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.

9.2. Restriction on topology

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 885 / 7399


NAPA for Design Manuals 2016.3

Example of topology where inside/outside cannot be defined


If such a surface is needed, it must be defined as a combined one.

9.3. Convex surface elements

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'.

Example of convex and non-convex shapes


Note that a node point is by definition the place where two curves intersect. Non-convex elements may be created when a intersection point is not
found.

9.4. Restrictions on the shape of a surface element

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.

9.5. Closed curves

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.

9.6. Coinciding curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 886 / 7399


NAPA for Design Manuals 2016.3

10. Syntaxes
The following sections provide the details about the commands by which the definitions are made.

10.1. Simple general surface

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:

SURFACE, name type


THROUGH, curve, curve, ..... curve
OUTSIDE, axis
PO prep.options

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

...., sc1/, curve, /sc2, ....

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:

THROUGH, E/, FRM, /M, FR6, ...

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.

SCC FRF O=R

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 887 / 7399


NAPA for Design Manuals 2016.3

PREP name U TP=6

(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

10.2. Combined surface

A combined surface is defined as combined objects in general:

SURFACE name<index terms="COMBINE" />

COMBINE part1 part2 ...

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 888 / 7399


NAPA for Design Manuals 2016.3

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

axis+d translation, e.g. X+10

axis/q reflection, e.g. Y/0

angle/(x,y,z) rotation, e.g. 90/(0,0,-)

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)

Preparation options for NURBS surfaces only:

TTOL: (Topological tolerance)


If the distance between two points is less than this, the points are treated as one. It is recommendable to set this option close to
polygonization tolerance (!TOL).
KTOL: (Edge curve knuckle tolerance)
Defines how sharply a boundary curve can turn at a point before the point is considered as a knuckle point. Please notice that if you are
exporting the surface, the receiving program might have some limitations, in many cases only 1 degree.
KTOL2: (Knuckle line tolerance along the edge)
If a curve that intersects another curve has an angle discontinuity greater than this value, the curve is identified as a knuckle line. Please
notice that if you are exporting the surface, the receiving program might have some limitations, in many cases only 1 degree.
BTOL: (Tolerance for boundary/edge curves)
Defines the number of nodes in the equiparameter curve i.e. how much the shape of the boundary can differ from the original curve when
preparing the surface. Can be given either as tolerance (<0) or exact number (>0) that defines the number of segments.
TSC: (Type of smoothing)
Select the type of smoothing. By default not in use (TSC=0).
WSC: (Weight of smoothing)
By increasing this value the result will be smoother but the difference from the original data also increases.
ERED: (Reduction of points in internal curves)
Is related with ETOL option. Increasing this number can remove some unwanted bumps from the surface. If the given tolerance is very

Copyright © 1992 - 2016 NAPA. All rights reserved. 889 / 7399


NAPA for Design Manuals 2016.3

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.

11. Common definition commands


The following commands are available for all surfaces:

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.

12. Updating a surface


When a curve in a surface is changed, there are usually curves dependent on this curve, the shape of which must be recalculated. This is most
conveniently done with the command

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 890 / 7399


NAPA for Design Manuals 2016.3

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.

13. 'Description' command


The command DES has its normal function of listing the alphanumeric definition of the object given. By adding one asterisk before the surface
name, the function is repeated for the curves of the surface. With two asterisks, also indirectly referenced curves are included, and the output is
sorted in the order of dependence. Thus, the command

DES **HULL

produces the complete definition of the surface. So two stars show the definition with two levels back. With fours stars

If the surface is combined, it may be preferable to store the parts separately.

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.

14. Drawing functions


The drawing functions are presented in more detail in the chapter about drawing. Here, a short overview is given over the functions useful in
connection with hull fairing.

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.

15. Using surfaces in volume calculations


Normally, volumes are calculated for closed objects only. Thus, if the surface is closed, the volume is automatically available, while volumes are
not available for open surfaces.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 891 / 7399


NAPA for Design Manuals 2016.3

draught argument is supplied, is to the design draught.

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.

16. Asymmetric hull forms


This section gives some advice regarding the definition of asymmetric hull forms.

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.

This is fairly straightforward, but one must remember that

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.

Parts directly defined (from above)


The total hull can be defined by using the reflection syntax in the COMBINE command:

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).

For calculations, a room defined as follows must be used:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 892 / 7399


NAPA for Design Manuals 2016.3

17. Hints for fairing


This section gives some hints for how to build a good grid and how to fair it. See also the next chapter Best practices for NURBS surface.

17.1. Purpose of the hull definition

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.

17.2. Selecting the curves of the grid

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 893 / 7399


NAPA for Design Manuals 2016.3

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.

17.3. Selecting well behaving areas

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.

17.4. Location of definition points

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 894 / 7399


NAPA for Design Manuals 2016.3

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.

17.5. Selecting the order of definition

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 895 / 7399


NAPA for Design Manuals 2016.3

Simple example of curves supporting each other. The primary points are shown and the numbers show
the definition order.

17.6. Usage of tangent functions

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.

17.7. Intersections between 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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 896 / 7399


NAPA for Design Manuals 2016.3

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, ....

ZY STEM /*Z=-32.1, ...

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.

17.8. Curves to check fairness

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.

18. Best practices for NURBS surfaces

18.1. How to choose boundary curves

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 897 / 7399


NAPA for Design Manuals 2016.3

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.

First, the natural boundaries should be selected:

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

Avoid collinear or degenerated edges


The number of surface patches affects both directly and indirectly the size of the final product model. The minimum number of surface patches is
thus recommended. From a mathematical point of view it is perfectly acceptable to have a different parameterization for the neighbours as long as
the curves representing the edges of the two patches are geometrically identical. However, due to numerical inaccuracies involved in the data
processing and due to conversions in file transfer, inconsistent parameterization should be avoided.

Copyright © 1992 - 2016 NAPA. All rights reserved. 898 / 7399


NAPA for Design Manuals 2016.3

Avoid inconsistent parameterixation if possible


T-shape patch topology is NOT allowed, nor edge misalignment like in the figure below.

Edge misalignment is not accepted in NAPA


The end of a boundary curve can be loose i.e. it does not have to be connected to other boundaries. This way the curvature of the definition curve
can be continuous at the edge. Also, creating four node surfaces is easier. Please see the following two figures.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 899 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 900 / 7399


NAPA for Design Manuals 2016.3

Boundary curves have been cut to create four node patches

Example of two node surface and degenerated patch distribution

Copyright © 1992 - 2016 NAPA. All rights reserved. 901 / 7399


NAPA for Design Manuals 2016.3

Boundary curve cut to avoid a triangle patch

An example of a proper patch layout resulting in a good distribution of equiparameter lines


To avoid discontinuity problems between fore, middle and aft parts, stop waterlines at the flat of side and buttocks at the flat of bottom and
continue up the deck line and centre line with boundary auxiliary curves. This requires adding new, straight curves from the waterline and flat side
crossing to the deck line, see the figure below.

Copyright © 1992 - 2016 NAPA. All rights reserved. 902 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 903 / 7399


NAPA for Design Manuals 2016.3

Waterline curves taken to one point on the deck line when flat side curve has straight part

18.2. Role of primary and secondary curves

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.

18.3. Selected preparation options

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 904 / 7399


NAPA for Design Manuals 2016.3

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.

18.4. Hull surface to one with the Text Editor

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 905 / 7399


NAPA for Design Manuals 2016.3

___

Copyright © 1992 - 2016 NAPA. All rights reserved. 906 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 907 / 7399


NAPA for Design Manuals 2016.3

19. Modified surfaces


The main part of this chapter describes creating a surface from a set of curves. A surface can also be created from another one by various
operations. Translations, reflections and rotations have been described in connection with COMBINE. Two more possibilities are available:
trimmed surfaces and offset surfaces.

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.

A trimmed surface is also available as a normal surface definition:

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.

20. Exporting surfaces


This chapter explains some principles to be applied while exporting the surface to other formats. The requirements of the receiving programs vary.

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.

20.1. Patch topology

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 908 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 909 / 7399


NAPA for Design Manuals 2016.3

Slightly better grid is gained when the triangle patches are arranged into a more flat area with the aid of an auxiliary space curve.

Copyright © 1992 - 2016 NAPA. All rights reserved. 910 / 7399


NAPA for Design Manuals 2016.3

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:

20.2. Preparing patch surface to be used in general CAD systems

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 911 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 912 / 7399


NAPA for Design Manuals 2016.3

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.

21. Check list


If there are holes in the surface (omitted surface elements) or other problems, the reason may be that

There are missing intersection points.


If the curves do not intersect, the curves must be corrected. If an implicit intersection point has not been detected, it must be made
explicit.
There are non-convex surface elements.
If so, extend or shorten some of the curves.
The number of curve elements in a surface element exceeds 15.
In this case, the surface element must be divided by extending some curve.
The inclination of the surface is undetermined in one of the corners (the curves are parallel).
The problem is corrected by making the curves intersect with an angle, by adding a third curve or a side condition that provides the
inclination.
The restriction on the shape of a surface element is violated.
If the reason is definition errors (wrong coordinates or angles), these are corrected; otherwise, the surface element must be divided.
The surface topology violates the restrictions.
This may be the result of definition errors or the surface element should be divided.
There are gaps between hull parts
The curves are not continuous through the surfaces. The patches should be aligned meaning that in some cases the curves, e.g.
waterlines should be continuous through the surface.

For NURBS surfaces, the reason might also be that

The patch element has more than four sides.


If there are more than four sides in the patches limited by boundary curves, it has to be divided by adding new boundary curves.
There is not enough support for the surface.
If the surface is unfaired or there are unwanted bumps, it might help to add more support to that part i.e. to add more primary or
secondary curves.
Preparation options are not optimal.
If the surface is unfaired, it might be that the preparation options should be altered. Check the values of BTOL, ETOL, TTOL, GTOL and
G2.
Boundary curves are not faired.
The NURBS surface follows exactly the boundary curves so at least the boundary should be smooth and faired. Check also the shape of
the patches.
There are problems with surface preparation.
Check the tolerances of the project. Polygonization tolerance should not be too large nor too small. General tolerance is GMTOL in REF
and local change can be done in the DEF task with !TOL.
Surface is not continuous.
Uniform parametrization is not in use. Check the preparation options.
Combined hull surface is not continuous
Check that all the curves are continuous through the surface borders. If the parametrization is not continuous, it might be necessary to
define the hull surface under one surface definition and not to use combined surface. This can be easily done e.g. with the Text Editor.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 913 / 7399


NAPA for Design Manuals 2016.3

Hull Surface Editor (GM)


Table of Contents:

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...

Copyright © 1992 - 2016 NAPA. All rights reserved. 914 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 915 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 916 / 7399


NAPA for Design Manuals 2016.3

12.4. Space curve to check fairness

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.

2. Opening a surface in the Hull Surface Editor

2.1. Starting the Hull Surface Editor

The Hull Surface Editor is activated by

Main Window: Tools -> Hull Surface Editor…

Copyright © 1992 - 2016 NAPA. All rights reserved. 917 / 7399


NAPA for Design Manuals 2016.3

Hull Surface Editor Window


When the Hull Surface Editor is started at the TASK level, control is switched to the DEF task. The Hull Surface Editor does not directly use
editing commands. Only when work is saved, the information is stored in the project database. However, for safety reasons exiting the DEF task
will close the surface that is active in the Hull Surface Editor. The user is asked if the changes made should be stored into the database and the
current work area is closed.

2.2. Hull definition using templates

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

DATA*SURF_HULL HULLA, HULLM and HULLF combined

DATA*SURF_HULLA Edge curves

DATA*SURF_HULLA1 Fast single screw ship

DATA*SURF_HULLA2 Container ship aft body

Copyright © 1992 - 2016 NAPA. All rights reserved. 918 / 7399


NAPA for Design Manuals 2016.3

DATA*SURF_HULLA3 Edge curves

DATA*SURF_HULLA_CONT1 Container ship aft body

DATA*SURF_HULLF Edge curves

DATA*SURF_HULLF1 General slender fore body with bulbous bow

DATA*SURF_HULLF2 Container ship fore body with bulbous bow

DATA*SURF_HULLF3 Edge curves

DATA*SURF_HULLF_CONT1 Container ship fore body

DATA*SURF_HULLM General parallel mid body

DATA*SURF_HULLM_CONT1 General parallel mid body

For example, the simple fore body definition under the name DATA*SURF_HULLF in the NAPADB is a short definition macro as follows:

@xmin=... X-coordinate of fore end of parallel mid body


@X=REF('LREF')
@x=... Length between perpendiculars LPP
@y=... Beam of ship
@z=... Design draught
@br=... Bilge radius
@zdeck=... height of deck

CUR FRF ; X @xmin


YZ * (0 0) -/ (@y/2-br 0) (@y/2 @br) /- (@y/2,@zdeck)
SC , M

CUR FBF ; Z 0
XY frf/y>1 /0 (@.9*x,0)
SC , P

CUR CLF ; Y 0
XZ FRF, FBF

CUR FSF ; Y @y/2


ZX FRF/z<@z, /0, (@.8*x,@zdeck)
SC , P

CUR DECKF ; Z @zdeck


XY * FRF, FSF -90/ (@1.1*x 0)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 919 / 7399


NAPA for Design Manuals 2016.3

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.

2.3. Opening an existing surface in the Hull Surface Editor

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.

2.4. Supported curve format

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 920 / 7399


NAPA for Design Manuals 2016.3

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.

2.5. Administration of the work area

2.5.1. Saving changes

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.

2.5.2. Working with backups

Using the Create backup

and the Restore backup

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.

2.5.3. Undoing changes

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 921 / 7399


NAPA for Design Manuals 2016.3

3. Main concepts of the Hull Surface Editor

3.1. Hull Surface Editor Window

Hull Surface Editor Window


The Hull Surface Editor Window consists of the following, standard window components:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 922 / 7399


NAPA for Design Manuals 2016.3

3.2. Toolbar rows

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.

3.3. Active surface, object and point

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.

The second toolbar shows the active curve or point object.

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:

click on the curve or the point object


select it from the drop-down list
click the Previous Object or the Next Object buttons on the far left side of the tool bar
use the keyboard shortcuts PgUp or PgDn

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.

A point can be activated by:

clicking it with the mouse


using the Previous Node and the Next Node buttons (shown on the far left of the toolbar)

Copyright © 1992 - 2016 NAPA. All rights reserved. 923 / 7399


NAPA for Design Manuals 2016.3

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.

Hull Surface Editor: Node -> Fix Node

If the definition point should be removed, the node can be set free.

Hull Surface Editor: Node -> Free Node

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.

Hull Surface Editor: Node -> Clean 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.

3.5. Keyboard focus

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 924 / 7399


NAPA for Design Manuals 2016.3

Locator fields show coordinates, from L to R: X, Y, Z


In many functions, the position of the Locator is only relevant as seen in the current view. The functions of the Point Tools toolbar buttons are
described in the table below.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 925 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 926 / 7399


NAPA for Design Manuals 2016.3

button.

The Options dialog is divided into different tabs according to functions.

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.

4.1. Curvature tab

Under the Curvature tab you can set different options related to the display of the curvature in the graphic screens.

The curvature representation is implemented as follows:

In projections X, Y, Z, the curvature of the projected curve is drawn


In other projections, the amplitude of the main curvature is shown in the direction of the main normal vector

Note: by default no curvature is shown in the graphic display.

Geometry Editing Options - Curvature tab

Copyright © 1992 - 2016 NAPA. All rights reserved. 927 / 7399


NAPA for Design Manuals 2016.3

Different curvature representations with Weighted Average

Different curvature representations without Weighted Average

The display of curvature distribution in the Hull Surface Editor is handled as per the Weighted Average from NAPA Release 2014.1.

4.2. Visuals tab

Copyright © 1992 - 2016 NAPA. All rights reserved. 928 / 7399


NAPA for Design Manuals 2016.3

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.

Geometry Editing Options - Visuals tab

4.3. Edit tab

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 929 / 7399


NAPA for Design Manuals 2016.3

Geometry Editing Options - Edit tab

4.4. Mouse 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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 930 / 7399


NAPA for Design Manuals 2016.3

Geometry Editing Options - Mouse tab

4.5. Keys tab

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 931 / 7399


NAPA for Design Manuals 2016.3

Geometry Editing Options - Keys tab

4.6. Tools tab

Under the Tools tab you can set different options regarding the deleting of points and fairing.

Copyright © 1992 - 2016 NAPA. All rights reserved. 932 / 7399


NAPA for Design Manuals 2016.3

Geometry Editing Options - Tools tab

4.7. Fixing tab

Under the Fixing tab you can set different options regarding fixing and adding points and angle conditions.

Copyright © 1992 - 2016 NAPA. All rights reserved. 933 / 7399


NAPA for Design Manuals 2016.3

Geometry Editing Options - Fixing tab

4.8. File tab

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 934 / 7399


NAPA for Design Manuals 2016.3

Geometry Editing Options - File tab

5. Working with the grid in Hull Surface Editor

5.1. Using the mouse to select multiple curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 935 / 7399


NAPA for Design Manuals 2016.3

5.2. Using the mouse for selecting and moving points

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 of the current object and possibly a point thereon


Move the current point
Selection and Move

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

Home First curve in the dependency order

Page Down Next curve in the dependency order

Page Up Previous curve

End Last curve

> Next point on the current curve

< Previous point on the current curve

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 936 / 7399


NAPA for Design Manuals 2016.3

views may be used for moving the points as well, but the direction of motion is predefined as follows:

Alt + Up and Down keys will always work on Z coordinates


Alt + Left and Right will increase and reduce Y coordinates by default, but in case the Alt key is not pressed down, the action will affect
the X coordinate

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.

5.4. Using the text based representation

The text definition can be displayed for the active curve by clicking the Text button

or by selecting Text from the Window menu.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 937 / 7399


NAPA for Design Manuals 2016.3

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.

5.5. Working with the dialogs

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:

OK will do the operation and close the dialog


Apply does the operation but leaves the dialog open
Cancel just closes the dialog without the operation

5.6. Modifying curve with the mouse clicks

Copyright © 1992 - 2016 NAPA. All rights reserved. 938 / 7399


NAPA for Design Manuals 2016.3

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:

5.7. Creating new points and deleting existing points

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.

5.8. Fixing and changing angles and angle conditions

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.

5.9. Adding new curves to the surface

Adding existing curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 939 / 7399


NAPA for Design Manuals 2016.3

Add Curve dialog


Creating new curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 940 / 7399


NAPA for Design Manuals 2016.3

Create a New Curve dialog


The first two selections (type and referenced curves) should be changed from default only in case of a NURBS surface. For a patch surface the
default values are enough and the other options are not applicable. In the referenced curves section, the option Primary Curves relates even to
boundary curves, as boundary curves are treated as subset of primary curves.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 941 / 7399


NAPA for Design Manuals 2016.3

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.

5.10. Re-Attaching curves to a target surface

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.

Fit Curve to Surface Dialog


SurfaceName: It is the name of the target surface, The target surface may have been created (e.g. by the Free Form Deformations of NAPA).
When the reattached grid is prepared, it should give a surface that resembles the target surface. The degree of similarity depends greatly on the
structure of the grid and on the deviation between the target and the original surface. Because the function e.g. does not change the location
surfaces of the curves, large deviations may result in a grid that requires some manual work before the required accuracy is obtained.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 942 / 7399


NAPA for Design Manuals 2016.3

Re-Attached curves to a target surface


In the above figure, the surface plotted in black is the current original surface on which the Free Form Deformations is applied & the colored
surface plotted is the target surface to which the curves are re-attached along with the nodes fixed.

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.

5.11. Removing a curve from a surface

A curve can be removed from the active surface with Remove Curve dialog.

Copyright © 1992 - 2016 NAPA. All rights reserved. 943 / 7399


NAPA for Design Manuals 2016.3

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.

5.12. Adding references to a curve

References can be added to a curve by selecting Add References from the Curve Menu.

References can be added by:

From locator: Showing the curve to be added with the locator


Grid curves: Adding all references from the existing grid. References to be added can be selected according to curve type, e.g. to add
only references from frames and waterlines but to ignore buttock lines.
User defined: Adding the references by typing in the name of the curve or the node.

Copyright © 1992 - 2016 NAPA. All rights reserved. 944 / 7399


NAPA for Design Manuals 2016.3

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.

5.13. Viewing curves

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.

5.14. Fairing of points

5.14.1. Fairing with the arrow keys

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 945 / 7399


NAPA for Design Manuals 2016.3

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.

5.14.2. Fairing by clicking

When the Click Tools button

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

The Move nearest button

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.

Automatic fairing of active point on the active curve

When the button Fair a point

is clicked, automatic fairing of the current curve is selected.

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.

A more advanced method is available when the Fair All button

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 946 / 7399


NAPA for Design Manuals 2016.3

5.14.3. Using the Fairing Window

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 947 / 7399


NAPA for Design Manuals 2016.3

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.

Before and after Relax


The input columns are A1 - the angle before the point, DEF - the definition of the point, and A2 - the angle condition after the point. The other
columns are only for information.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 948 / 7399


NAPA for Design Manuals 2016.3

5.15. Using the clipboard for graphical input

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.

Clicking the Clear button

clears the clipboard buffer.

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:

Clear the clipboard buffer by clicking the Clear button


Click with the middle mouse button at the nodes through which you want to pass the curve
Activate the curve you want to change
Move to the combo box called Location Surface where the current value is something like "Z 12.4"
Select the current value by painting it with the mouse button 1 and type "XZ"
Press the middle mouse button or press Ctrl+V from the keyboard
Finish with the Enter key

5.16. Cleaning nodes and references

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 949 / 7399


NAPA for Design Manuals 2016.3

Clean Node or Nodes dialog

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.

5.17. Locking objects

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 950 / 7399


NAPA for Design Manuals 2016.3

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.

6. Checking the surface in the Hull Surface Editor

6.1. Updating and preparing the surface

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 951 / 7399


NAPA for Design Manuals 2016.3

Preparation Diagnostics Window

Missing curve parts


The result of the surface preparation is shown both alphanumerically and graphically every time the surface is updated. A message window pops
up showing the diagnostics of the preparation operation. In case there are curve parts left out of the surface preparation, the missing curve parts
are drawn with a thick yellow line. These are shown only for a patch surface, not a NURBS surface.

It is also possible to use the automatic redraw

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.

6.2. Preparation options for a NURBS surface

Special preparation options can be used for a NURBS surface. Preparation Options Window can be opened from the Options menu or by using

button.

Copyright © 1992 - 2016 NAPA. All rights reserved. 952 / 7399


NAPA for Design Manuals 2016.3

Preparation Options Window

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.

6.3. Plotting and intersecting the surface

The surface can be plot and intersected using the drawing tools available in the Draw Tools toolbar, shown by clicking the Draw Tools

button. The Draw Tools toolbar will then appear:

After selecting the drawing options from the drawing tools, and setting the drawing properties by clicking the Drawing Properties

Copyright © 1992 - 2016 NAPA. All rights reserved. 953 / 7399


NAPA for Design Manuals 2016.3

button, the drawing can be created in the active drawing area by clicking the Draw

button.

Note: there is a difference with 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.

Surface and boundary curves plotted with openGL

Copyright © 1992 - 2016 NAPA. All rights reserved. 954 / 7399


NAPA for Design Manuals 2016.3

Surface X-sections plotted with section curvature


Checking the x-, y- or z-sections gives an idea of the quality of the surface but quite often it is maybe too sensitive. It sets unrealistically high
quality expectations and it takes sometime to make the sections perfect. Therefore, you should also be aware of what is good enough instead of
spending hours on something that does not make any difference in the end.

6.4. Debug tool

The debug tool can be opened with

button.

Copyright © 1992 - 2016 NAPA. All rights reserved. 955 / 7399


NAPA for Design Manuals 2016.3

The Show surface topology option plots the boundaries of the generated patches with different colours depending on the number of sides:

Green indicates that the patch has four sides


Generally produces the best possible result.
Red colour shows the areas with more than four sides
These need to be subdivided so that each area has four sides.
Blue colour shows the areas with less than four sides.
The result is accepted but a subdivision could improve the surface quality. If the surface is exported, some programs do not accept
triangle patches.

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.

Show surface topology

6.5. Surface Offset Table

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 956 / 7399


NAPA for Design Manuals 2016.3

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.

6.6. Accuracy Check Between Surfaces

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.

Accuracy Check Tool Between Surfaces


And it follows the same layout & behaviour as of Surface Offset Table in terms of plotting the collected values in the graphics. Addition to that, the
points which has the distance more than the minimum tolerance is plotted in highlighted color.

Copyright © 1992 - 2016 NAPA. All rights reserved. 957 / 7399


NAPA for Design Manuals 2016.3

The Minimum tolerance between Surfaces is set in Options--> View and Behaviour -->File tab as shown in figure below:

Accuracy Check Tool Tolerance

6.7. Using the Object Information window

By clicking the Info button

the Object Information window will open.

Copyright © 1992 - 2016 NAPA. All rights reserved. 958 / 7399


NAPA for Design Manuals 2016.3

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.

6.8. Viewing the standard body plan drawing

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 959 / 7399


NAPA for Design Manuals 2016.3

6.9. Automatic Fairing of Surface

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...

Surface Automatic Fairing Tool


With the Surface Fairing Tool NAPA uses the NURBS control points and adjusts them to achieve a smoother surface. The fairing can be applied
either to the whole surface, or only to a part of it. You can control the maximum allowed change from the original surface. By default, the fairing
keeps the inclination of the surface along the boundaries fixed, but it is also possible to let the boundary normal distributions vary.

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.

7. Exporting a surface from the Hull Surface Editor

7.1. Export to IGES

Copyright © 1992 - 2016 NAPA. All rights reserved. 960 / 7399


NAPA for Design Manuals 2016.3

The current surface can be exported to IGES with File -> Export to IGES dialog, please see the following figure.

Export to IGES dialog


The dialog contains all the same default options as the manual command TOIGES. For more information please see the chapter about Link to
IGES or manual command !EXP TOIGES.

7.2. Export to DXF

The current surface can be exported to DXF with File -> Export to DXF dialog, please see the following figure.

Copyright © 1992 - 2016 NAPA. All rights reserved. 961 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 962 / 7399


NAPA for Design Manuals 2016.3

8.1.2. New from template

Please see the chapter about using templates.

8.1.3. Open...

Please see the chapter Opening an existing surface.

8.1.4. Open from backup...

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

Closes the active surface.

8.1.6. Save

Saves the currently active surface.

8.1.7. Copy from...

Please see the chapter about opening a surface.

8.1.8. Backup...

The same function as the backup button.

8.1.9. Restore

The same function as the restore button.

Copyright © 1992 - 2016 NAPA. All rights reserved. 963 / 7399


NAPA for Design Manuals 2016.3

8.1.10. Export to IGES format...

Please see the chapter Export to IGES.

8.1.11. Export to DXF format...

Please see the chapter Export to DXF.

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

Please see the chapter Undoing changes.

8.2.2. Redo

Please see the chapter Undoing changes.

8.2.3. Update and Prepare

Please see the chapter about Update and Prepare.

8.2.4. Previous Object

Copyright © 1992 - 2016 NAPA. All rights reserved. 964 / 7399


NAPA for Design Manuals 2016.3

Activates the previous object. The same function as pushing the Previous Object button in object toolbar or the keyboard shortcut Page Down.

8.2.5. Next Object

Activates the next object. The same function as pushing the Next Object button in object toolbar of the keyboard shortcut Page Up.

8.2.6. Next Node

Activates the next node. The same function as pushing the Next Node button in node toolbar of the keyboard shortcut v or V.

8.2.7. Previous Node

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...

Please see the chapter about Locking objects.

8.2.9. Notes...

8.3. Curve

8.3.1. Add Existing Curve...

Please see the chapter about Adding new curves.

8.3.2. Create New Curve...

Please see the chapter about Adding new curves.

Copyright © 1992 - 2016 NAPA. All rights reserved. 965 / 7399


NAPA for Design Manuals 2016.3

8.3.3. Re-Attaching Curve

Please see the chapter aboutRe-Attaching curves

8.3.4. Remove Curve...

Please see the chapter about Removing curves.

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.

8.3.6. Add References...

Please see the chapter Add references.

8.3.7. Connect Grid...

Please see the chapter Add references.

8.3.8. Clean References

This cleans all the unnecessary references from the current curve i.e. references, where the node or point is not obtained.

8.3.9. Clean All References

This cleans all the unnecessary references from all the curves in the active surface.

8.3.10. Automatic Fairing...

Please see the chapter Automatic fairing.

Copyright © 1992 - 2016 NAPA. All rights reserved. 966 / 7399


NAPA for Design Manuals 2016.3

8.3.11. Move Plane

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).

8.3.12. Move Plane & Nodes

The same as moving the plane but also nodes are included.

8.3.13. To General Plane...

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.

8.3.14. To Location Surface...

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.

8.3.15. To XYZ Curve

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.

8.3.16. To Primary Curve

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.

8.3.17. To Secondary Curve

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 967 / 7399


NAPA for Design Manuals 2016.3

8.3.18. Clean Locations Surface

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.

8.3.19. Curve Interpolation Method

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

8.4.1. Fix 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.

8.4.2. Free Node

Removes the definition point (the coordinate value) from the definition and only the reference is left.

8.4.3. Clean Node...

Please see the chapter about cleaning nodes.

8.4.4. Reverse Order

Changes the definition point and reference between the curves. This is not possible if cross referencing happens because of this.

8.4.5. Remove Reference

Removes the reference from the curve definition.

Copyright © 1992 - 2016 NAPA. All rights reserved. 968 / 7399


NAPA for Design Manuals 2016.3

8.4.6. Relax Node

8.5. Point

8.5.1. Move Interactively

8.5.2. Round Points...

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.

8.5.3. Fair Point

The same function as Fair in the Fairing window, please see the chapter about fairing.

8.5.4. Delete Point

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.

8.5.5. Delete Primary Point

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.

8.5.6. Delete Location Point

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 969 / 7399


NAPA for Design Manuals 2016.3

8.5.7. Delete Any

Deletes the active point object whether it is a point or reference.

8.5.8. Convert to Point Object...

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.

8.5.9. Convert to Primary Point

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.

8.6.2. Rotate After

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 -.

8.6.3. Delete Angle

Deletes all the angle conditions defined to active point or node. The same operation can be performed with the keyboard space key.

8.6.4. Fix Angle Before

Fixes the angle before the active point or node.

Copyright © 1992 - 2016 NAPA. All rights reserved. 970 / 7399


NAPA for Design Manuals 2016.3

8.6.5. Fix Angle After

Fixes the angle after the active point or node.

8.6.6. Fix Angle in Project

8.6.7. Free Angle Before

If the angle is defined on both sides of the point or node, only the angle before is removed.

8.6.8. Free Angle After

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.

8.6.10. Angles Default...

A shortcut to perpendicular angles and rotations for ±1 and ±5 can be found here.

8.6.11. Angles After...

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 971 / 7399


NAPA for Design Manuals 2016.3

View or hide all the toolbars below menu items.

8.7.2. Status Bar

View or hide the status bars on the bottom of the window.

8.7.3. Drawing Mode

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.

8.7.5. Clipping Planes

Applicable only in the openGL mode. The drawing can be limited according to different coordinates.

8.7.6. Select Lighting

The surface can be viewed on different lightings. This works only with openGL.

8.7.7. Edit Lighting

The lighting schemes can be modified here. This has only effect on openGL.

8.7.8. Show Command Area

Not applicable in the Hull Surface Editor.

8.7.9. Immediate Update

Copyright © 1992 - 2016 NAPA. All rights reserved. 972 / 7399


NAPA for Design Manuals 2016.3

Not applicable. The Hull Surface Editor updates the drawing area automatically.

8.7.10. Erase View

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.13. Line numbers

Not applicable in the Hull Surface Editor.

8.7.14. Titles

Not applicable in the Hull Surface Editor.

8.7.15. Totals

Not applicable in the Hull Surface Editor.

8.8. Window

8.8.1. Text

Opens the curve definition window, the same as >> button.

Copyright © 1992 - 2016 NAPA. All rights reserved. 973 / 7399


NAPA for Design Manuals 2016.3

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

8.9.1. Interactive 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.

8.9.2. Realtime Zoom...

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.

8.9.3. Zoom On/Off

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 974 / 7399


NAPA for Design Manuals 2016.3

8.9.5. Fit to Window

Sizes the current surface to fit the graphics area. The same as the shortcut key 1.

8.9.6. 3D Size and Zoom...

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...

Not applicable in the Hull Surface Editor.

8.10.3. 3D Perspective

The projection can be set manually by giving values.

8.10.4. X (Forward)

Sets the forward projection in x-direction. The same as shortcut key x.

8.10.5. Y (Side view)

Copyright © 1992 - 2016 NAPA. All rights reserved. 975 / 7399


NAPA for Design Manuals 2016.3

Sets the side view projection in y-direction. The same as shortcut key y.

8.10.6. Z (Waterlines)

Sets the waterline projection in z-direction. The same as shortcut key z.

8.10.7. A (Aft end)

Sets the aft projection in 3D view. The same as shortcut key a.

8.10.8. F (Fore end)

Sets the fore projection in 3D view. The same as shortcut key f.

8.10.9. Parallel

A selection of predefined special projections.

8.10.10. Special

A selection of predefined special projections.

8.11. Print

8.11.1. Printer...

Select the printer to be used.

8.11.2. Print

Quick print. Prints the active view as it is seen.

Copyright © 1992 - 2016 NAPA. All rights reserved. 976 / 7399


NAPA for Design Manuals 2016.3

8.11.3. Print Turned

The same as Print but the paper is turned 90 degrees.

8.11.4. Send view to IOF

Sends the view to Intermediate Output File.

8.11.5. Print with Options...

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

8.12.1. Text Editor...

Opens NAPA Text Editor.

8.12.2. Table Editor...

Opens NAPA Table Editor.

8.12.3. Geometry Window...

Opens NAPA Geometry Window. In practice the same tools are available in the Hull Surface Editor Draw Tools.

8.12.4. Body Plan Window...

Opens Body Plan Window. See the chapter about body plan.

Copyright © 1992 - 2016 NAPA. All rights reserved. 977 / 7399


NAPA for Design Manuals 2016.3

8.12.5. Panel Task Window...

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.

8.12.6. Surface Offset Table...

Please see the chapter Surface Offset.

8.12.7. Accuracy Check Between Surfaces...

Please see the chapter Accuracy Check Between Surfaces

8.12.8. Surface Automatic Fairing...

Please see the chapter Automatic fairing.

8.12.9. End Rounding Window...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 978 / 7399


NAPA for Design Manuals 2016.3

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:

Keeping the reference to the box curve

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:

Circular End Rounding, definition ROUND is applied to the box curve


Elliptic End Rounding, definition RN is applied to the box curve
Elliptic end rounding with continuous curvature, definition RS is applied to the box curve
Elliptic end rounding with continuous curvature and given smoothness, definition RS with given q is applied to the box curve. Note:
applying is automatically done when the smoothness value is changed so that you can concentrate on the graphics and the effect of the
change.

Remove box curve reference

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

Fixing angle at touching curve and removing the box 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:

Angle is fixed at the touching curve


The box curve reference is removed from the curve
The rounding method is applied to the end curve

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.

Available rounding methods are:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 979 / 7399


NAPA for Design Manuals 2016.3

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.

8.12.10. Plot End Rounding Along Profile...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 980 / 7399


NAPA for Design Manuals 2016.3

8.13. Options

8.13.1. Preparation Options...

Please see the chapter Preparation options.

8.13.2. View and Behaviour...

Please see the chapter about Setting options.

8.13.3. Hide Boundary Curves

Hides the curves whose class is defined as boundary.

8.13.4. Hide Primary Curves

Hides the curves whose class is defined as primary.

8.13.5. Hide Secondary Curves

Hides the curves whose class is defined as secondary.

8.13.6. Hide Referred Curves

Hides the curves that are referred in the surface definition but are not included in the surface.

8.14. Help

General NAPA help menu.

Copyright © 1992 - 2016 NAPA. All rights reserved. 981 / 7399


NAPA for Design Manuals 2016.3

8.14.1. Show Tips

When Show tips is selected, the button names/descriptions are shown while the mouse cursor is moved on the button.

8.14.2. Help About...

Opens a general help text about the Hull Surface Editor. This information window is quite limited though.

8.14.3. Online Manuals

Opens Napa Manuals in a separate browser.

8.14.4. Help Viewer

Opens NAPA Help Viewer where all the windows, commands, quantities, functions and events are collected.

8.14.5. About NAPA...

Opens a window which shows which NAPA release is in use.

9. Keyboard input and shortcuts


The area of the window having the keyboard focus is highlighted with borders. Focus defines where the keyboard input will be directed. The focus
can be directed to the graphical areas most easily by selecting one with the mouse. Since Release 2007.2, standard graphics keyboard shortcuts
have been available in the Hull Surface Editor. Actions available from the keyboard are listed in the following table.

Key Action

> Next point on the curve

< Previous point on the curve

PageDown Selects the previous curve or point object

PageUp Selects the next curve or point object

Home Selects the first curve in the hierarchy

End Selects the last curve in the hierarchy

Delete Deletes the current point with the options defined in the Options dialog

Ctrl+d,D Does the same as the Delete key

Copyright © 1992 - 2016 NAPA. All rights reserved. 982 / 7399


NAPA for Design Manuals 2016.3

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.

n,N Adds a primary point in the current node

r,R Reverses the dependency order of the curves at the node

c,C Cleans the current node

e,E Adds a reference from mouse pointer to the currently active curve

q,Q Removes the reference

+ 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.

Ctrl+ Rotates with five times larger step

- Rotates the angle clockwise one step

Ctrl- Rotates with five times larger step

Space or Slash (/) Removes all angle conditions at the current node

Ctrl+x,X/m,M Selects the next curve at the active 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.

I, I, Up Arrow Zooms in at the position of the mouse

o, O, Down arrow Zooms out at the position of the mouse

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

x,X Sets X projection

y,Y Sets Y projection

z,Z Sets Z projection

a,A Sets aft projection

f,F Sets forward projection

1 Zooms window

2 Zooms interactive

3 Interactive projection

4 Realtime zoom

10. Creating a NURBS surface with the Hull Surface Editor


Basically the process of creating a NURBS surface is quite a similar to creating a patch surface. As the Hull Surface Editor handles only surfaces,
it is a good idea to define a couple of main curves first manually. It is also possible to create an empty surface, open that and start creating and
adding curves in the Hull Surface Editor. For more information about choosing the boundary curves, please check the chapter about best
practices.

If there is already an existing patch surface, with some of the curves the class should be changed to boundary.

Copyright © 1992 - 2016 NAPA. All rights reserved. 983 / 7399


NAPA for Design Manuals 2016.3

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.

11. Parametric hull surfaces in the Hull Surface Editor


The graphical user interface to edit parametric hull forms is integrated into the existing Hull Surface Editor. This section presents the working
principles of the parametric hull form GUI. The following figure presents the main window of the Hull Surface Editor with a parametric container
ship hull, where the curve 'STEM' is chosen with the mouse to view its definition.

Copyright © 1992 - 2016 NAPA. All rights reserved. 984 / 7399


NAPA for Design Manuals 2016.3

Main window of the Hull Surface Editor


By clicking the table widget button in the Hull Surface Editor's main window a table view window (the figure below) can be opened to view and edit
the curve or point definitions in table form.

Table view window


The table view window shows also information of the curve's point coordinates and angles. By selecting the Parameters tab, access to the
appropriate parameter tables (PDEF*) is provided as shown below.

Copyright © 1992 - 2016 NAPA. All rights reserved. 985 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 986 / 7399


NAPA for Design Manuals 2016.3

Hull Surface Editor's main window with the original hull form

Copyright © 1992 - 2016 NAPA. All rights reserved. 987 / 7399


NAPA for Design Manuals 2016.3

Hull Surface Editor's main window with an interactively modified bulb


In the case that a definition point's coordinate is defined with a formula using one or several parameters, the extra coefficient is added directly to
the coordinate formula in the curve or point definition (the figure below). This enables interactive and smooth operation with the hull surface while
maintaining the parametric definition.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 988 / 7399


NAPA for Design Manuals 2016.3

Curves defined with the selected parameter 'Y1.BLB' in the table view are automatically highlighted

12. Hints & Tricks of the Hull Surface Editor

12.1. Adjusting the Hull Surface Editor

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.

For production level fairing it is recommended to use at least these settings:

View & Behaviour: Curvature


Select a curvature of the selected curves to be something else than none.
View & Behaviour: Mouse
Select motion accuracy to Very accurate. This reduces the actual movement of the mouse making more accurate working with the mouse
easier.
View & Behaviour: Keys
Set the step of change to at least 1mm i.e. 0.001. Also set the step of the angle to at least 0.1 degrees.

Copyright © 1992 - 2016 NAPA. All rights reserved. 989 / 7399


NAPA for Design Manuals 2016.3

12.2. Viewing the active curve

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.

12.3. Checking the equiparameter curves

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

button under Plot & Grid tab.

Copyright © 1992 - 2016 NAPA. All rights reserved. 990 / 7399


NAPA for Design Manuals 2016.3

12.4. Space curve to check fairness

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 991 / 7399


NAPA for Design Manuals 2016.3

Copyright © 1992 - 2016 NAPA. All rights reserved. 992 / 7399


NAPA for Design Manuals 2016.3

Hull Surface Editor technical details (GM)


This chapter presents the basic functions of the Hull Surface Editor, the tool for doing modifications to a general surface.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 993 / 7399


NAPA for Design Manuals 2016.3

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.

1.2. Object of the Hull Surface Editor

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.

1.5. Graphic display

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.

1.6. Current curve and point

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.

1.7. Degrees of freedom

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 994 / 7399


NAPA for Design Manuals 2016.3

Normally, a definition point obtained by a curve reference is not marked unless it is the current point.

1.8. Geometric principles

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.

1.9. Interactive changing of points

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.

1.10. Handling angles

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.

1.11. Dependence order

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.

1.12. Editing functions

As a short summary, the following editing functions are available:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 995 / 7399


NAPA for Design Manuals 2016.3

- convert a primary point to a point object or vice versa


- rename a curve and all references to it

1.13. Creating a new surface or curve

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

The present implementation is limited in the following respects:

tangent functions are not handled


point objects are supposed to be primary, i.e. not dependent on other points or on curves
handling of general location surfaces is not complete. Definition points not having a counterpart in the shape projection cannot be
handled graphically.
the function for removing cross referencing is a very preliminary one

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

2.1. Work area

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.

Back-up curves for the UNDO function are stored unnamed.

2.2. Graphic display

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.

Point objects are plotted by markers, see options.

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.

GME.PLOTOLD and GME.PLOTPOINTS add information temporarily.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 996 / 7399


NAPA for Design Manuals 2016.3

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.

2.5. Current curve and point

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 997 / 7399


NAPA for Design Manuals 2016.3

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

3.1. Some principles

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.

3.2. Adding, removing and changing primary points

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.

3.3. Changing the location of a point

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 998 / 7399


NAPA for Design Manuals 2016.3

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.

The following considerations concern the interactive form MOVEI:

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 smallest movement recognized can be set with option MTOL.

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.

3.4. Changing the location surface

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.

GME.MOVELSI is the interactive version of GME.MOVELS.

There are no functions for modifying general planes as location surfaces.

3.5. Changing general location surfaces

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:

GME.FIX('L'): add a primary point at the current definition point


GME.ADD('L'): add a primary point as shown by the locator
GME.DELETE('L'): delete a primary point

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 999 / 7399


NAPA for Design Manuals 2016.3

3.6. Special functions for point objects

GME.POINTOBJECT creates a point object replacing a primary point in a curve.

GME.DELETEPOINT does the reverse operation.

3.7. Functions related to curve references

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.

3.8. Changing angles

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).

There are no functions for changing angles in the location surface.

3.9. Automatic fairing function

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:

C: use the current point only

Copyright © 1992 - 2016 NAPA. All rights reserved. 1000 / 7399


NAPA for Design Manuals 2016.3

K: keep the current point unchanged, otherwise apply the default

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.

3.10. Relaxing curve points

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.

3.11. Creating a new surface

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).

3.12. Creating a new curve

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.

The final shape is then constructed by the standard functions.

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.

A general plane is created similarly using GME.GENPLANE for the conversion.

An xyz-curve is created by beginning with any one of the operations above and then calling GME.CONVERTXYZ.

GME.NEWCURVE with option P creates a point object. See also GME.POINTOBJECT.

3.13. Adding/removing curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1001 / 7399


NAPA for Design Manuals 2016.3

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.

3.14. Renaming a curve

GME.RENAME assigns a new name to the current curve. References to the curve are corrected in the surface and other curves.

3.15. Changing the curve role

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.

3.16. Locking curves and surfaces

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.

3.17. Rounding points

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.

3.18. Updating, preparing

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.

3.19. Input in alphanumeric form

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.

The function GME.RUN runs a definition macro.

4. Options
Options are assigned with GME.SETOPTION and inquired with GME.GETOPTION.

4.1. Options related to management

SAVE: 0/1 automatic save OFF/ON

Copyright © 1992 - 2016 NAPA. All rights reserved. 1002 / 7399


NAPA for Design Manuals 2016.3

UPD: ½ update extent after changes


1=given operand only
2=whole grid

UPDI: ½/3 update extent during real time operation (MOVEI, etc)
1=current operand only
2=immediately affected operands (default)
3=whole grid

DEC the number of decimals from graphic input (default 3)

BKI back-up interval. If >0, an implied GME.BACKUP is done after every BKI:th change

ILS include location surface: imply L option in MOVEs

4.2. Options related to the graphic display

CC curve colour

ACC auxiliary curve colour

BCC boundary curve colour

SCC secondary curve colour

LCC locked curve colour

CHL curve highlight colour

PHL point highlight colour

LC locator colour

Marking definition points

Aspect symbol size colour on/off

Point objects POS POH POC

Primary points DPS DPH DPC

Referenced points RPS RPH RPC RPO

Location points LPS LPH LPC LPO

Points with angles APS APH APC APO

Referencing ILS ILH ILC ILO

Angles or vectors IAS IAH IAC IAO

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1003 / 7399


NAPA for Design Manuals 2016.3

operations.

4.3. Showing the curvature

The following options relate to showing the curvature:

CRV: type: 0=none, 1=colour *, 2=porcupine

CRVI: as CRV, but for interactive operations

CRVS: scale for porcupine representation

CRVC: colour for porcupine representation

CRVR: type of porcupine: 1=vectors, 2=vectors+envelope, 3=envelope

CRVR+10: fixed scaling, default=relative

CRVO: application of porcupine:


1=current curve only
2=current curve and second curve at a node
3=all curves

4.4. Other options

ITOL tolerance for identifying objects in the display unit 0.1 mm, drawing
scale

MTOL interactive move resolution, unit as ITOL

DPAU pause after update in real time operations, milliseconds

MXDX: max. change in X when using MOVE, ship 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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1004 / 7399


NAPA for Design Manuals 2016.3

5.1. Edge control parameters

BTOL: approximation tolerance for boundary curves. Negative values specify


a fixed subdivision for the boundary segments.

KTOL: knuckle tolerance for points. Unit in degrees

K2TOL: knuckle tolerance for curves. Unit in degrees

G: type of grouping

5.2. Detail options

ERED: reduction of control points in equiparameter curve approximation.

ETOL: approximation tolerance for the equiparameter curves of the surface

TTOL: topology tolerance. If the distance between two points is less than
this, they are treated as being one single point.

NTOL: approximation tolerance for the boundary normals. Unit in degrees

IMAX: number of iterations in the surface fitting

5.3. Smoothing options

TSC: type of smoothing

WSC: weight of smoothing

5.4. Preparation diagnostics

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1005 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1006 / 7399


NAPA for Design Manuals 2016.3

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.

There are two types of output from the transformation program:

internal representation of the hull form


definition data element.

The transformed internal geometry is not exactly equivalent to the transformed definition data (=geometry after EDI **HULL; ADD). To make these

Copyright © 1992 - 2016 NAPA. All rights reserved. 1007 / 7399


NAPA for Design Manuals 2016.3

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.

2.2. Affine transformation

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.

2.3. Displacement transformation

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.

2.4. Combined affine and displacement transformation

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.

2.6. Piecewise linear transformation

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.

2.7. Transformation of frame area curve

A transformation that is defined by a modified frame area is a special case of the piecewise linear transformation.

2.8. Copy of parent objects

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1008 / 7399


NAPA for Design Manuals 2016.3

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.

3.1. Change of dimensions

The following dimensions can be changed:

L: Length between the perpendiculars (LREF from the reference system)


B: Breadth of the design water level (BREF from the reference system)
T: Draught at the design water level (ZDWL from the reference system)
D: Moulded volume at the design water level
CB: Block coefficient
LCB: Longitudinal center of buoyance
PA: Length of the parallel afterbody (options D,CB or LCB needed)
PF: Length of the parallel forebody (options D,CB or LCB needed)

The changes are defined by the command DIMENSIONS:

DIMENSIONS L=val B=val T=val D=val CB=val LCB=val, PA=val PF=val;

where

val new dimension.

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.

There are two equivalent ways to give a new dimension:

a value without a sign is an absolute dimension


a value with a sign is a change to the old dimension

Examples:

DIM L=123 The new length is 123 m.

DIM L=+12 Length is increased 12 m.

DIM L=-12 Length is decreased 12 m.

3.2. Translation

Translation is defined by the command MOVE:

MOVE axis amount;


MOVE restriction amount;

where

axis coordinate axis (X, Y or Z)

restriction axis>val or axis<val


move the given part only

amount amount and direction of the translation

Examples:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1009 / 7399


NAPA for Design Manuals 2016.3

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.

3.3. Piecewise linear transformation

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

coord coordinate X,Y or Z

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.

3.4. Piecewise linear displacement transformation

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:

PLX (x1,...,xn) -> (x1t,...,x,...,x,...,xnt);

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).

3.5. Transformation of frame area distributions

Transformation of a frame area distribution is defined by the command

PLX fad1 (x1,...,xn) -> fad2 options;

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1010 / 7399


NAPA for Design Manuals 2016.3

3.6. Copy of parent objects

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.

3.7. Keeping stem and stern constant

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.

CONST, invariant plane types, location;

where

invariant (opt) principal plane curves whose type is not changed


plane
types FW: frames and waterlines (=default)
VW, verticals and waterlines

location (opt) With option FW a region can be given, where the change is required to be small. The following options are available:

A: small change in afterbody


M: small change in midship (=default)
F: small change in forebody
AF: small change in after-, and forebody
AMF=val:

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:

ABOVE CDA=val1 CDF=val2

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.

CDF (opt) the same as CDA, but used for forebody

3.8. Definition of the parent version

The parent version is given by the command PARENT. It is defaulted to the current version.

PARENT project/version;

where

project (opt) the name of the parent project

version the name of the parent version

Copyright © 1992 - 2016 NAPA. All rights reserved. 1011 / 7399


NAPA for Design Manuals 2016.3

The special command PARENT RUNTIME; means that the parent data is fetched from the free storage and not from the database.

3.9. Definition of the parent objects

Objets of the transformation can be curves and general surfaces of the parent version. They are defined by the command TRANSFORM:

TRANSFORM objects -> result;

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).

The optional definition of the result is done as follows

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'.

DATA/element (opt) only the definition data is stored to 'element'.

For an alternative definition of the result, see the commands RESULT and DATA.

3.10. Definition of the parent hull for integration

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;

The hull surface is expressed as

surface /version /project

where

surface the name of the parent hull

version parent version. Default: current version

project parent project. Default: current project

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.

3.11. Definition of the result version

The destination of the transformation in the current project is given by the command RESULT:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1012 / 7399


NAPA for Design Manuals 2016.3

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.

3.12. Overwriting an existing result version

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.

3.13. Transformation of the frame system

Transformation of the frame system is defined by the command

FRAMES option;

where

option the mode of operation


ON: frame system is transformed
OFF: frame system is not transformed (default)
COPY: frame system is copied

The command NOFRA is equivalent to FRAMES OFF.

3.14. Transformation of the reference system

Transformation of the reference system is defined by the command

REFERENCE option;

where the alternatives of option are:

ON reference system is transformed (=default)

OFF reference system is not transformed

The command NOREF is equivalent to REF OFF.

3.15. Transformation of the preparation results

The transformation of the preparation results is defined by the command

PREPARE option;

where the alternatives of option are:

ON preparation results are transformed (=default)

OFF preparation results are not transformed

Copyright © 1992 - 2016 NAPA. All rights reserved. 1013 / 7399


NAPA for Design Manuals 2016.3

ONLY only the preparation results are transformed

3.16. Transformation of the data element

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.

3.17. Canceling a command

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).

3.18. Accuracy of a displacement transformation

The required accuracy of a displacement transformation (D,CB or LCB changed) is set by the command ACCURACY.

ACCURACY, D=da, LCB=lcba, MAX=maxite;

where

da,lcba required accuracies

maxite the maximum number of iterations (default=5)

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.

3.19. Check of input data

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.

3.20. Information about transformation

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1014 / 7399


NAPA for Design Manuals 2016.3

Information about the parent, or about the already done transformation is shown by the command INFO.

INFO sel;

where option sel is one of the following:

REF reference dimensions of the parent version

HULL reference dimensions and integrals of the parent hull.


If the case of the PLX-transformation, the integrals are calculated over the defined pieces. Otherwise, the two parts divided by XMID
are used.

TRA information about the transformation done. (The names of the transformed and stored objects)

STORE objects stored into the result version

AMF AMF-values corresponding to the options A,M,F and AF of the command CONST FW.

4. Examples

4.1. Affine transformation

The reference length of Napaship is increased by 20 meters. The transformation is defined by the following commands:

ARGS; RESULT B; DIMENSION L=+20

The variables of the task are displayed by the command ARGS:

PARENT NAPASHIP/A ;** project/version


RESULT B ;** version
TRANSFORM HULL ;** object(s) to transform
DESTROY OFF ;** overwriting not allowed
DIMENSION L=+20 ;** change of dimensions
FORCE OFF ;** input data checked
DATA OFF ;** no data element
PREPARE ON ;** preparation results also
REF ON ;** reference system is transformed
FRAMES OFF ;** frame system not transformed

The transformation is started by the command OK.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1015 / 7399


NAPA for Design Manuals 2016.3

Affine transformation

4.2. Piecewise linear 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.

Piecewise linear transformation

4.3. Piecewise linear displacement transformation

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.

Piecewise linear displacement transformation - example 1


If PLX (40,60) -> (40,X) was used instead, the part D<40 would remain unchanged, D is increased due to the scaling of the forepart and LCB is
increased respectively.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1016 / 7399


NAPA for Design Manuals 2016.3

Piecewise linear displacement transformation - example 2


In the first example, the parts x<40 and x>60 are translated so that they are connected to the enlarged midship region. By the definition PLX
(0,40,60,100) -> (0,X,X,100) the parts are scaled so that the points x=0 and x=100 remain unchanged.

Piecewise linear displacement transformation - example 3

4.4. Transformation of frame area curves

The command PLX c1 -> c2 defines the transformation by the frame area distributions of the parent (=c1) and the result (=c2) hull.

Transformation of frame area curves - example 1


The figure above shows the internal geometry before and after the transformation together with the original and the required frame area curves.
There are discontinuities in the transformed hull. This is because the required frame area curve is not a smooth curve. In this case, the
transformed definition data differs from the internal geometry. The command UPDATE hull F is needed. The next figure shows the grid after the
update. Frame area curves are also plotted together with the requirement.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1017 / 7399


NAPA for Design Manuals 2016.3

Transformation of frame area curves - example 2


The internal piecewise linear transformation is shown by the command ARGS !. There are so many pieces as there are polygon segments in
curve1. A smaller number of pieces can be defined explicitly by, for example, PLX c1 (0,40,60,100) -> c2.

If the curves are not in the current version, the syntax curve/version must be used.

4.5. Creating a hull from several parts

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:

TRA HULL/VERSA/PROJA -> RESULT


DIM L=185 B=28 T=6.6
HULL HULL/VERSF/PROJF;
NOREF
TRA HULLF -> RESULT
MOV X +1.619

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.

4.6. Keeping stem and stern constant

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

4.7. Moving a curve

A curve, named windcur, is moved in the current version 1 meter downwards without any change in reference system.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1018 / 7399


NAPA for Design Manuals 2016.3

HULL hull
DES
NOREF
TRA windcur
MOV Z -0.5

5. Free Form Deformation (FFD)


The methods presented above are all global transformations effecting on the whole surface. Free Form Deformation (FFD) is a local
transformation which can be applied only to the user defined part of the surface. This was first introduced in NAPA 2012.1.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1019 / 7399


NAPA for Design Manuals 2016.3

Special surfaces (GM)


'Special surface' means a surface with some geometric regularity, by which the definition and handling of the surface can be simplified, in contrast
to the so-called general surfaces, capable of representing arbitrary shapes. In a ship, most of the internal limiting surfaces can usually be
represented as special surfaces, while general surfaces are needed for the hull form only.

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

1.1. Facet/patch surface representation

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1020 / 7399


NAPA for Design Manuals 2016.3

1.2. Sides and orientation

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 following example illustrates the decision made:

Surfaces for illustrating decisions about outside and orientation


The surface S1 is classified according to its overall property of a transversal surface and gets the same classification as a plane with x constant,
i.e. orientation X and outside in the direction of the positive x-axis.

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.

Seen from the output of INFO, the result is

Copyright © 1992 - 2016 NAPA. All rights reserved. 1021 / 7399


NAPA for Design Manuals 2016.3

NAME GSTYPE DATE TIME XMIN XMAX REFQ ORNT SS


------------------------------------------------------------------
S1 CYL 96-04-19 19.31 -2.00 0.00 - X
S2 CYL 96-04-19 19.25 -7.00 0.00 - -X
S3 CYL 96-04-19 19.22 0.00 23.00 -

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.

1.3. Discontinuities for calculation sections

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.

1.4. BASE and FORM commands

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.

1.5. Management of dependencies

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.

The update can be requested explicitly with command UPDATE.

If cross referencing occurs between objects in memory, the update order may not be correct.

Dependencies created by reference coordinates (i.e. #name) are not handled.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1022 / 7399


NAPA for Design Manuals 2016.3

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.

The definition of an unrestricted plane starts with command PLANE:

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

defining a plane with x constant=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

THROUGH X (0, 2) (10, 5)

The latter form is more convenient if graphic input is used. The latter point can be replaced by an angle:

THROUGH X (0, 2) 16.7

A plane can be defined by one point and a normal vector:

THROUGH (0, 5, 2) (0.5 0 -0.9)

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:

THROUGH (0, 5, 2) - (10 5 -7)

The following form gets the plane containing the given curve:

THROUGH *curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1023 / 7399


NAPA for Design Manuals 2016.3

A plane representing the water plane at a given floating position can be defined by

THROUGH draught trim heel

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.

In all syntaxes, explicit coordinates can be represented by point objects.

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.

Example of restricted plane:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1024 / 7399


NAPA for Design Manuals 2016.3

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.

4.1. Cylinder with base fixed

The definition is started by command CYLINDER, followed by commandsBASE and GENERATOR.

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1025 / 7399


NAPA for Design Manuals 2016.3

Cylinder with fixed base


The command CLOSE may be added if the base curve is closed. It means that the bases shall be added as part of the surface, making it closed. A
closed surface can be used for the same purposes as a room.

The base curve is defined by reference to a curve:

BASE name

Instead of the BASE command, the definition of the curve can be directly inserted. For this and alternative forms, see below.

The generator can be defined in one of the following ways:

GENERATOR (x,y,z) axis L1=l1 L2=l2


GENERATOR (x,y,z) phi/theta L1=l1 L2=l2
GENERATOR (x1,y1,z1) (x2,y2,z2) L1=l1 L2=l2

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.

4.2. Cylinder with axis fixed

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

CYLINDER name<index terms=" AXIS" />

AXIS ...
BASE ...

The following figure illustrates the function of the axis and the base:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1026 / 7399


NAPA for Design Manuals 2016.3

CURVE B2
Z 0
XY (0 0) (7 2) (14 -3) (20 0)

CYLINDER CYL2
AXIS (9,4,0) (12,4,12)
BASE B2

Cylinder with axis fixed


The AXIS command has the same syntax as the GENERATOR command, but now, the location in space is relevant. In this case, the curve given
by BASE moves with its origin (note!!) along the axis. Note that it is always the first record following CYLINDER that places the surface in the
coordinate system.

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.

Effect of L1, L2 in the AXIS command:

below: AXIS (0 0 0) (10 0 0)- above: AXIS (0,0,0) (10,0,0) L1=3, L2=9
Examples:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1027 / 7399


NAPA for Design Manuals 2016.3

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

The following example could be the wall of a deck house:

Wall of a deck house

Copyright © 1992 - 2016 NAPA. All rights reserved. 1028 / 7399


NAPA for Design Manuals 2016.3

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:

Difference between axis and base

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.

A double cylinder is defined by reference to two curves as follows:

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.

Principle of double cylinder:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1029 / 7399


NAPA for Design Manuals 2016.3

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.

The following example shows a deck with camber and sheer.

Deck defined as double cylinder

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1030 / 7399


NAPA for Design Manuals 2016.3

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.

Command CLOSE can be used as for cylinders.

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.

Effect of L1, L2 in the axis command:

below: AXIS (0 0 0) (8 0 0) - above: AXIS (0,0,0) (8,0,0) L1=3, L2=7


Note that a cone is special case of the pyramid, where the base curve is a circle. Examples:

Pyramid - con

PYRAMID, CONE
AXIS X 0 7
FORM R=3
CLOSE

Copyright © 1992 - 2016 NAPA. All rights reserved. 1031 / 7399


NAPA for Design Manuals 2016.3

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:

ROT name<index terms="AXIS" />


AXIS ....<index terms="BASE" />
BASE base

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.

AXIS (x1,y1,z1) (x2,y2,z2) ANGLE=angle DIV=n


AXIS (x,y,z) axis ANGLE=angle DIV=n

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1032 / 7399


NAPA for Design Manuals 2016.3

Rotation surface - boss

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

Rotation surface - pipe bend

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)

Placement of the FORM curve with respect to the axis

Copyright © 1992 - 2016 NAPA. All rights reserved. 1033 / 7399


NAPA for Design Manuals 2016.3

Rotation surfaces using the FORM command

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:

Example of connection surfac


Without the patch option, the connection surface is treated as a facet surface, formed by plane faces although the faces may not be plane. The
surface will work well in most cases in spite of this, but there may be inaccuracies, for instance between sections in different directions. The
problem can be avoided by adding the TRIANGLE command as the last one, having the effect that the faces are subdivided into triangles. The
result is likely to be less good looking.

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.

The CLOSE command can be used as for cylinders.

Examples:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1034 / 7399


NAPA for Design Manuals 2016.3

Connection surface

CNS CNSEX1
Z 0; XY (0, 0), (3, 2), /-, -/, (5, 2), (8, 0)
Z 6; XY, (0, 0), (8, 0)

Connection surface - using base curves

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:

Example of effect of MDP command (left)

9. Tube

Copyright © 1992 - 2016 NAPA. All rights reserved. 1035 / 7399


NAPA for Design Manuals 2016.3

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

Example (base represented by locally defined curve):

Example of tube object

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.

As an example, the following figure shows a tube defined by

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=

Example of tube object

Copyright © 1992 - 2016 NAPA. All rights reserved. 1036 / 7399


NAPA for Design Manuals 2016.3

10. Arbitrary facet surface


An arbitrary facet surface is defined by giving the corner points directly. The syntax provided requires that the corner points form an n*m matrix.
Each FAC command in the format below gives the points in one row of the matrix and the minimum number of FAC commands is 2.

FCS name
FAC * (x1,y1,z1) (x2,y2,z2), ...
FAC ...
FAC ...
...

Simple facet surface

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1037 / 7399


NAPA for Design Manuals 2016.3

Arbitrary facet surface - platform leg

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:

Configuration of FCS made possible by the BREAK command

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)

11. Facet surface through set of planes


Another way of creating a surface directly from facets is to represent the faces by planes. The surface is defined by an ordered set of planes so
that each plane contributes with the part between the surrounding ones in the set. In the other direction, the surface is delimited by constant

Copyright © 1992 - 2016 NAPA. All rights reserved. 1038 / 7399


NAPA for Design Manuals 2016.3

coordinates. The surface is defined by FCS + THROUGH:

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

Example of facet surface through planes

12. Example of defining bridge and front bulkhead surfaces


In the following example a few tips are given for defining complicated and/or non-planar surfaces. A typical parent surface of this kind of shape is
defined using a Connection Surface (CNS). See the figure below.

Bridge and front bulkhead defined with connection surfaces

Copyright © 1992 - 2016 NAPA. All rights reserved. 1039 / 7399


NAPA for Design Manuals 2016.3

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):

i. SUR ...; PATCH ... P=...


ii. SUR ...: TRIM ... limits

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.

12.2. Connection 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.

An example of a bridge wall surface defined using a Connection Surface:

Bridge wall surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1040 / 7399


NAPA for Design Manuals 2016.3

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

12.3. Surface object or Trimmed Patch surface?

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).

An example definition of surface A (Surface Object - requires building with planes):

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):

Copyright © 1992 - 2016 NAPA. All rights reserved. 1041 / 7399


NAPA for Design Manuals 2016.3

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

Bridge surface created using a Trimmed patch surface


Notice the syntax SUR ...; TRIM .... With this syntax the surface is updated every time the parent surface S.DH11 is updated. Another option
is to use a GENERATE definition (see DEF?>!EXP GEN), which looks very similar. At first it creates a similar surface, but the created surface is
independent and can only be updated by running the GEN command again.

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.

12.4. Creating openings

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.

12.5. Mirroring the surface

The syntax for mirroring a Trimmed patch surface is as follows:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1042 / 7399


NAPA for Design Manuals 2016.3

SUR, DHST11_8S
REF DHST11_8P

12.6. Testing planarity

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

Testing the planarity of a surface


The black lines in the resulting plot show the areas that are not planar, and therefore cannot be used as Surface Object parent surfaces. For
instance, we can see in the above example, that although the face next to the curved face looks planar, it is not.

12.7. Dividing a Patch surface

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.

Let us examine, as an example, the top of the bridge:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1043 / 7399


NAPA for Design Manuals 2016.3

SUR, DST12_5; TRIM, DH12F, X>#278

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.

Surface divided into three independent parts


If the the three surfaces are intended to be selected as one surface, the definition would be of the form:

SUR DH12_53
PATCH DH12_5 P=(2,3,4)

12.8. CADMATIC link

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.

13. Alternative forms of the BASE command


In all syntaxes above, a curve provided in a BASE command can be expressed by reference to another cylinder or pyramid by using the syntax

Copyright © 1992 - 2016 NAPA. All rights reserved. 1044 / 7399


NAPA for Design Manuals 2016.3

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.

14. FORM command


The FORM command can be used in the definition of cylinders, pyramids and tubes to define the cross section of the object. In rotation surfaces it
gives the rotated shape.

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:

FORM ... V=axis+psi

Copyright © 1992 - 2016 NAPA. All rights reserved. 1045 / 7399


NAPA for Design Manuals 2016.3

'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)

Effect of rotation options in the FORM command


The first example shows the default V=Z. In this case V=Z is equivalent with U=Y, but this is not true with inclined axes.

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

Example of cylinder with patch option

15. Sphere
A sphere with the center in the point (x,y,z) and radius R is defined by the following data:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1046 / 7399


NAPA for Design Manuals 2016.3

SPHERE, name<index terms="CENTER" />


CENTER, (x, y, z), R=r axis>q

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.

Examples of spheres SPH:

SPH1
CENTER (0,0,0) R=5

SPH SPH2
CENTER (0,12,0) R=5 Z>0

16. Additional definitions


Where needed, the following definitions can be added:

CSECT control of calculation sections

RC defining the reference coordinate

SYM assume symmetry in area calculations

RP define reference point

The surfaces presented here are likely to be useful in parametric macro objects (PMO): see special definitions.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1047 / 7399


NAPA for Design Manuals 2016.3

Definition of rooms (GM)


Table of Contents:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1048 / 7399


NAPA for Design Manuals 2016.3

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.

2. Overview of room types

2.1. Elementary rooms

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.

2.2. Nonelementary rooms

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.

Combination of parts by union or difference


Reflection operations can be performed about the center plane, either as a pure reflection or by combining the reflected part with the unreflected
one, giving a symmetric result:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1049 / 7399


NAPA for Design Manuals 2016.3

2.3. Combined room

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.

2.4. Modified room

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

3.1. Standard topology

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:

lower x-limit A (aft)

upper x-limit F (fore)

lower y-limit S (starboard)

upper y-limit P (port)

lower z-limit B (bottom)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1050 / 7399


NAPA for Design Manuals 2016.3

upper z-limit T (top)

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.

Examples of rooms with standard topology

3.2. Definition of an elementary room

An elementary room is defined by the commands

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.

3.3. Limiting surfaces

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 defining a coordinate plane, there are a number of possibilities as follows:

q: directly given coordinate

#fr: frame number

#WEBnr web number

#LONGnr long number

#surface reference coordinate of surface

curve/axis=q: point on curve intersected as specified

In the #-syntaxes, a displacement can be added in the form +d or -d, for example

Copyright © 1992 - 2016 NAPA. All rights reserved. 1051 / 7399


NAPA for Design Manuals 2016.3

#12-0.1, #BH1+2.3

d must be smaller than 10.

In connection with surfaces, the displacement can also be given as a number of frame spacings in the form

#surface+#n or #surface-#n

for example, #BH1-#1, meaning one frame spacing aft of BH1.

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.

3.4. Designating the side

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

X<name on the -x side of the surface

X>name on the +x side of the surface

Y<name... Z>name:
: similarly

Example:

LIMITS X=10 X>BH2 Y=0 <HULL Z<TTOP

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:

LIMITS X>... X<... Y>... Y<... Z>... Z<...

Thus, if the side selection symbol is omitted, the implicit side selection is applied. For example, the following definitions are equivalent:

ROOM BOX; LIMITS X>0 X<10 Y>0 Y<5 Z>0 Z<8


ROOM BOX; LIMITS 0 10 0 5 0 8

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1052 / 7399


NAPA for Design Manuals 2016.3

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:

LIMITS #20 #40 0 HULL Z<TTOP


LIMITS #20 #40 0 HULL - TTOP

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.

3.5. Special syntaxes in the limits command

References to surfaces in a LIMITS command can be modified by the following syntaxes:

-name the surface reflected about the center plane

+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.

(q) dummy limit given by coordinate.

(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.

Usage of the reflection syntaxes

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:

Use of reference coordinate and translation of surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1053 / 7399


NAPA for Design Manuals 2016.3

LIMITS #CBH-10 CBH 0 HULL 2 6 @@ left


LIMITS CBH(X-10) CBH 0 HULL 2 6 @@ right

A transformation may also be used to define a room as a transformation of another room:

Defining a room as a transformation of another.

ROOM R1
LIMITS #15 #25 -1 1 0 2

ROOM R2
LIMITS R1(X+10)

3.6. Deviations from standard topology

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1054 / 7399


NAPA for Design Manuals 2016.3

Two sides covered by the same surface

LIMITS 20 40 0 HULL - 3

Only port and starboard sides can be recognized:

Highly non-standard topology

LIMITS Y>-HULL Y<HULL <TUNNEL

Additional side:

Standard topology modified by additional surface

LIMITS 20 40 0 HULL 1 6 Z<PL1

The last example becomes complete standard topology if the top is formed by one surface, e.g.

LIMITS 20 40 0 HULL 1 DECK2

It helps the system to interpret the definition correctly if the surfaces are presented in a way that reflects their role.

3.7. Interpreting the standard topology

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,

Copyright © 1992 - 2016 NAPA. All rights reserved. 1055 / 7399


NAPA for Design Manuals 2016.3

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.

3.8. Dummy surfaces

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).

A coordinate in parentheses gives the limit in one direction, for instance:

LIMITS 20 30 0 HULL (0) 4

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

LIMITS 20 30 0 HULL (HULL) 4

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.

3.9. Determining the extension of a room

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1056 / 7399


NAPA for Design Manuals 2016.3

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:

Example of room where a dummy limit can be useful


Without a dummy limit, the initial estimate for the upper x-limit is 100 (upper x-limit of the hull). Adding a dummy limit can be done in one of the
following ways:

ROOM R1; LIMITS 79 (93.85) 0 HULL 2 7

or

ROOM R1; LIMITS 79 STEM/Z=7 0 HULL 2 7

Note: sections may fail because of too inaccurate dummy limits.

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.

The general format of the definition of a nonelementary room without transformations is

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1057 / 7399


NAPA for Design Manuals 2016.3

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:

Example of a non-elementary room

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 with a hole


The logical definition of this example is

ROOM R04001
LIM BH6 BH7 LBH3 HULL - DECK
RED TUNNEL

but the following definition also works:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1058 / 7399


NAPA for Design Manuals 2016.3

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

The addition/removal can be partial, by adding a factor, for example

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

which is equivalent with

ROOM R1S
COMBINE R1P(Y/0)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1059 / 7399


NAPA for Design Manuals 2016.3

6. Adding a description text


In the ROOM command, a text can be added, giving a description of the room, for example:

ROOM R100 'Main engine room'

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.

7. Bottom and bottom area


For many rooms, typically rooms of accommodation type, the bottom area is an important quantity. In the absence of other definitions, the bottom
is defined as the outline obtained as the section between the room and the surface given as lower z-limit in the LIMITS record. For most rooms
with the standard topology, this rule works. However, if this surface is a general one (patch or grid surface), or if it for some other reason is not
useful, a different section can be defined with the H command, for example

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:

name1: name2 ... message ...

This means (normally) that the error is in the object 'name1', connected somehow to the component 'name2'.

8.1. 'Debugging' aids

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1060 / 7399


NAPA for Design Manuals 2016.3

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.

Testing the reason for a section failure with option !

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:

Example of output from section check with option !!

LIMITS 10 40 - +HULL - 6 Y>LBH (left)


LIMITS 10 40 - +HULL - 6 Y<LBH (right)

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.

8.2. Incorrectly determined limits

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1061 / 7399


NAPA for Design Manuals 2016.3

8.3. Wrong side selection

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

NAME GSTYPE DATE TIME XMIN XMAX REFQ ORNT SS

------------------------------------------------------------------
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.

8.4. Geometric problems

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.

A common case is an overdefined limit as in

ROOM R1
LIMITS 20 40 0 HULL 0 5

where the limit Z>0 is redundant and can be omitted:

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.

8.5. Error 'intersection of elementary room failed'

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1062 / 7399


NAPA for Design Manuals 2016.3

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

intersection of elementary room failed (W 1058)


R123 PART 2 X=22

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.

9. Handling calculation sections


Volume oriented quantities of rooms are calculated using so-called calculation sections. These are sections with constant x, of which areas and
moments are obtained, which then are integrated longitudinally. The system keeps record of the definition of rooms and referenced objects and
generates new calculation section when needed.

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:

controlling the number and location of the sections


drawing the sections for graphic check
generating the sections by shortcuts

The plate thickness, if any, is added to the calculation sections and consequently, instructions concerning calculation sections may also involve
the plate thickness.

9.1. Selection of calculation sections

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:

*x (or bare x) discontinuity in the slope of the frame area curve

**x jump in the frame area curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1063 / 7399


NAPA for Design Manuals 2016.3

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:

CSECT (n) specifies a fixed number

CSECT >n specifies a minimum number

CSECT (n1,x1,n2,...xn,m) separately for given x-intervals

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:

Example of local discontinuities


For accurate results, the x-coordinates marked should be defined as discontinuities.

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.

9.2. Graphic check of calculation sections

In the drawing task, calculation sections are drawn by PLOT CSE object.

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).

9.3. Instructions regarding the plate thickness

The geometry resulting directly from the room definition represents the so-called moulded form and where required, the plate thickness is added

Copyright © 1992 - 2016 NAPA. All rights reserved. 1064 / 7399


NAPA for Design Manuals 2016.3

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:

CSECT ... PT=p

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

CSECT ... PT=(p1,z1,p2,z2,...pn)

where p1, p2 are plate thicknesses and z1, z2 the heights where it changes. The z-values must be increasing.

Example of (somewhat exaggerated) varying plate thicknesses

CSE PT=(0.15 2, 0.08, 6, 0.05)

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

t0, t1, t2,... are thicknesses

s1, s2, s3,... are separators

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1065 / 7399


NAPA for Design Manuals 2016.3

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 following separators are available in the given order of priority:

3D regions defined by any combination of axis>q, axis<q


z-coordinates (equivalent to a 3D region Z>coordinate)
name of object
axis=q
STR*model

If 3D regions are used as separators, the following should be noted:

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1066 / 7399


NAPA for Design Manuals 2016.3

9.4. Volumes of open surfaces

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

9.5. Reliability of calculation sections

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:

Estimated limit adjusted:

This is normal in cases where a room ends otherwise than at a plane, but may also be caused by geometric errors.

'intersection of elementary room failed'

(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

failed section occurred while searching for end

or

failed section occurred inside object

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).

9.6. Box approximation

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1067 / 7399


NAPA for Design Manuals 2016.3

The box approximation can be controlled with the following parameters in the REF task:

RACC relative accuracy


--------------------------------------------------------------------------
-----
Used in generating calculation sections. The box approximation is accepted
for
an object only if the object differs relatively less than RACC from the
surrounding box. The set of calculation sections is made denser if local
inaccuracy is greater than RACC. Built-in default=0.001.

AACC absolute accuracy


--------------------------------------------------------------------------
-----
Used in generating calculation sections. The box approximation is accepted
for
an object only if the object differs absolutely less than AACC m3 from the
surrounding box. Built-in default=0.001*LREF*BDWL*ZDWL. It is stored with
RACC
(CANCEL deletes always both).

9.7. Accept failed partial sections

Option AFPS in the CSECT command.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1068 / 7399


NAPA for Design Manuals 2016.3

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).

Note: the associated error messages are not suppressed.

10. Hints for room definitions


The same geometric shape can often be defined in many different ways. This section presents some examples of this.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1069 / 7399


NAPA for Design Manuals 2016.3

10.1. Using named limiting surfaces

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).

Example of using reference to a surface instead of coordinate

ROOM R1
LIMITS BH1 BH2 0 HULL DECK1 DECK2
REDUCT R2
ROOM R2
LIMITS #BH2-3 BH2 0 5 DECK1 DECK2

10.2. Simple surfaces or simple rooms

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.

Simplification of room definition using a surface

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1070 / 7399


NAPA for Design Manuals 2016.3

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.

10.3. Using add or reduct

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.

10.4. Simplification for run time efficiency

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:

Avoiding redundant surface in a REDUCT part


Alternative definitions:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1071 / 7399


NAPA for Design Manuals 2016.3

10.5. Extending the limits command instead of using reduct

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:

Adding a surface to LIMITS command or using REDUCT

ROOM CA1
LIMITS BH1 BH2 0 HULL TTOP MDECK >WTSURFACE
ROOM CA1
LIMITS BH1 BH2 0 HULL TTOP MDECK
REDUCT WINGTANK

11. Dynamically created rooms


Rooms representing compartments in the ship are organized into so-called arrangements, and stored in tables with the prefix ARR*. As an
experimental feature, the possibility to define rooms directly in the ARR* table has been added. Only the size and location are available, but it is
still possible to relate these rooms to other geometric components and to use them in plans and listings.

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:

NAME PURP LOCTN LENX LENY LENZ ...


DEF R1234 STORE 'R12 FA' 2.2 1.0 0

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.

The DES command gives for the example

Copyright © 1992 - 2016 NAPA. All rights reserved. 1072 / 7399


NAPA for Design Manuals 2016.3

** generated from ARR*TEST


** LOCTN R12 FA'
ROOM R1234
LIMITS 31.0 33.2 -0.5 0.5 3.3 5.12

Copyright © 1992 - 2016 NAPA. All rights reserved. 1073 / 7399


NAPA for Design Manuals 2016.3

Geometry Editor (GM)

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1074 / 7399


NAPA for Design Manuals 2016.3

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.

3. Geometry Editor Window


The Geometry Editor is opened from NAPA Main Window: Tools -> Geometry Editor...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1075 / 7399


NAPA for Design Manuals 2016.3

Geometry Editor Window

3.1. Main operations

There are two work modes available, the Room mode and the Surface mode, which can be changed by the buttons presented below.

Buttons for selecting the mode


The purpose of each mode is, as the names imply; the definition of rooms in the Room mode and surfaces in the Surface mode. The Surface
mode handles both the interactive creation of reference surfaces and surface objects.

3.2. Active arrangement

The arrangement that is opened for editing is selected in both modes in the middle of the upper toolbar:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1076 / 7399


NAPA for Design Manuals 2016.3

Active arrangement selection

3.3. Hull surface

The hull surface that is used is taken from the reference system parameter MOUL (moulded hull).

3.4. Handling arrangement tables

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

Button Shows the reference surface arrangement.


3

Copyright © 1992 - 2016 NAPA. All rights reserved. 1077 / 7399


NAPA for Design Manuals 2016.3

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.

4.1. Reference Surface Arrangement

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.

4.2. Interactive definition of surfaces

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1078 / 7399


NAPA for Design Manuals 2016.3

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.

4. Choose Snap Settings

5. Place the surface at the


desired location

4.3. Editing surfaces

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'.

4.4. Snap settings

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

4.5. Objects shown in the graphics

Copyright © 1992 - 2016 NAPA. All rights reserved. 1079 / 7399


NAPA for Design Manuals 2016.3

The graphics area of the Geometry Editor consists of four views; one for each principal plane and one for a 3D view.

Graphics areas of the Geometry Editor


The sections to be shown are selected by moving the cross-hair to the desired location.

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

button. By default, the following layers are created:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1080 / 7399


NAPA for Design Manuals 2016.3

Default layers

Layer Description

Compartment Sections of the current compartment arrangement


Arrangement

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.

Frame Scales Frame scales

All Reference All reference surfaces in the current reference surface arrangement
Surfaces

Hull Surface Hull Surface

Hidden Objects Objects that are not active in the limit finder.

4.5.1.1. Creating customized layers

Copyright © 1992 - 2016 NAPA. All rights reserved. 1081 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1082 / 7399


NAPA for Design Manuals 2016.3

Making an Explicit Selection

4.6. Definition of surface objects

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.

New, Open and Save buttons


Clicking the New button opens a dialog for the definition of the method to be used and the initial attributes of the object.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1083 / 7399


NAPA for Design Manuals 2016.3

New Surface Object dialog


The structure types available are taken from the STT*PRO table. If this table has a column NAME that contains the prefix for the objects of the
given type, a default name is generated for the new object. The arrangement selection defines the arrangement table into which the new object
should be written when saved. The alternative for arrangements is the active arrangement. If this table is combined, the parts are listed. If the
Create Reflected Object option is selected, a reflected object will be created automatically when saving the defined one. The name is generated
by adding a suffix to the name of the first object (index will be updated if it happens that an object with the same name exists). For a ship with a
right-handed coordinate system, the suffix is S, for a left-handed P.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1084 / 7399


NAPA for Design Manuals 2016.3

or

SO TBH6;
X #30 LIM -, -, -, -, S.DK1, S.DKM, <+HULL
OK

Surface Object defined in a cylinder surface

4.6.1.1. Definition of the owner surface

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1085 / 7399


NAPA for Design Manuals 2016.3

Selecting the owner surface


The owner surface defines the location of the surface object which either in this case can be an existing surface as depicted in the figure above:
Surface Object defined in a cylinder surface (yellow surface) or a coordinate plane. In the Geometry Editor, the owner surface can either be
inserted in the input field shown in the figure above or from the available surfaces in the graphics:

The available owner surfaces are listed when clicking in the graphics

4.6.1.2. Defining limits, additions and reductions

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1086 / 7399


NAPA for Design Manuals 2016.3

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:

The limit can be selected from a list of alternatives


Automatic Limit Finder

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1087 / 7399


NAPA for Design Manuals 2016.3

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 definition of an extruded surface object

Definition method extruded


After assigning the initial data, the geometry tree opens in the following appearance:

Geometry tree of an extruded object

4.6.2.1. Cross section shape

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1088 / 7399


NAPA for Design Manuals 2016.3

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:

The defined Cross Section Shape


The nearest reference surfaces along the normal of the section where the curve is defined.

Relevancy of Snap Settings

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1089 / 7399


NAPA for Design Manuals 2016.3

Principles of defining an extruded surface object

4.6.3. Definition in series

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1090 / 7399


NAPA for Design Manuals 2016.3

The series tool


When using this tool, the objects are stored directly into the database and into the selected table, i.e. no run-time versions of the resulting objects
are done.

Resulting surface objects created in series

5. Defining a new room

Copyright © 1992 - 2016 NAPA. All rights reserved. 1091 / 7399


NAPA for Design Manuals 2016.3

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.

New Room dialog


An elementary room is a room defined by only one set of limiting surfaces.

A reflected room is a mirrored elementary room (i.e. an existing room is mirrored over the center line).

5.1. Tree hierarchy

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1092 / 7399


NAPA for Design Manuals 2016.3

Room definition components

5.2. Defining an elementary room

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.

5.2.1. Finding limits automatically

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.

5.2.2. Defining limits manually

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1093 / 7399


NAPA for Design Manuals 2016.3

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.

Selecting limits and toolbar for defining elementary room


A toolbar with several possible selections for room definition is located on the left side of the hierarchy tree. The Apply

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

button or by selecting File > Save or File > Save As....

5.2.3. Editing limits

There are several ways to edit the limit selection.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1094 / 7399


NAPA for Design Manuals 2016.3

5.2.4. Further definitions

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.

Toolbar button Description

You can add a room or limits to the room defined so far.

Add

Copyright © 1992 - 2016 NAPA. All rights reserved. 1095 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1096 / 7399


NAPA for Design Manuals 2016.3

The room, defined so far, is symmetric over the center line.

Symmetric

The selected item (like Add or Reduce) is deleted. This does not
delete a room or a limit item.

Delete

Copyright © 1992 - 2016 NAPA. All rights reserved. 1097 / 7399


NAPA for Design Manuals 2016.3

The selected item is moved one step upwards in the tree


hierarchy.

Move Up

The selected item is moved one step down in the tree hierarchy.

Move Down

Copyright © 1992 - 2016 NAPA. All rights reserved. 1098 / 7399


NAPA for Design Manuals 2016.3

This finds automatically the closest limits from the point where
the cross-hairs is located and applies these limits.

Find Limits

This creates a temporary room and calculation sections for it


which are plotted in the 3D view.

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.

5.3. Defining a reflected room

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1099 / 7399


NAPA for Design Manuals 2016.3

source room is selected, the Apply

button or the Save

button can be clicked to check the result.

5.4. Automatic room generation

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.

Rooms created automatically based on the selected Surface Arrangement

Copyright © 1992 - 2016 NAPA. All rights reserved. 1100 / 7399


NAPA for Design Manuals 2016.3

The final names and purposes are defined in the table


Rooms are created and presented in the second dialog once the Generate button is clicked. It is now possible to input the actual names and
purposes of the rooms. Rejection of rooms that are not wanted is done by deleting the line from the table by right-clicking and selecting Delete
Rows.

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1101 / 7399


NAPA for Design Manuals 2016.3

Selecting an existing room for editing


If the focus is not on the top level in the hierarchy tree, the opening possibility is behind the right mouse button. The definition of a new room is
started either by clicking the New button in the Main toolbar or by selecting File > New.

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).

8. Graphics in the Geometry Editor


Handling and using graphical possibilities can be divided into two parts: 2D views and the 3D view. In the Geometry Editor, the graphical
possibilities can be used efficiently to support the creation and editing of rooms and surfaces.

8.1. Graphics in 2D views

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1102 / 7399


NAPA for Design Manuals 2016.3

This button shows all the selected surfaces with View > View
surfaces... which is described earlier in section Selecting visible
surfaces.

Show Surfaces

This button shows all the compartments defined to be in the


active arrangement.

Show Rooms

Copyright © 1992 - 2016 NAPA. All rights reserved. 1103 / 7399


NAPA for Design Manuals 2016.3

This button shows all the rooms which are not part of the active
arrangement.

Show Auxiliary Rooms

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1104 / 7399


NAPA for Design Manuals 2016.3

Tooltips and highlight in 2D side view (projection Y)


Each user will get his or her own settings into a table called SETTINGS*ROOMEDITOR

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.

Active Room: compartment in the active arrangement.


Highlight of Rooms: opened compartment.
Auxiliary Rooms: rooms outside the active arrangement.
Reference Surfaces: reference surface (room boundary) which is currently selected in the limits item or the limits item of add or reduce
(below the room's tree hierarchy).
Highlight of Reference Surfaces:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1105 / 7399


NAPA for Design Manuals 2016.3

Controlling colours of 2D section drawings

There are two more ways to influence the graphics in 2D views. These are buttons for Fill Purpose

and Use viewing limits

. 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.

8.2. Graphics in 3D view

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1106 / 7399


NAPA for Design Manuals 2016.3

Controlling 3D OpenGL plotting


Each user will get his or her own settings into a table called SETTINGS*ROOMEDITOR when general settings are modified for the first time. The
table is saved into the system database (DB2).

The filling colours, transparencies and the colours of contours of the following items can be controlled.

Active Room: the current room as a whole.


Additional Rooms: added and reduced room which is currently selected in the room's tree hierarchy.
Reference Surfaces: reference surface (room boundary) which is currently selected in the limits item or the limits item of add or reduce
(below the room's tree hierarchy).
Hull: hull surface and contours mean hull definition curves.

9. Buttons and menus


Short explanations for all the buttons and menus are described in the following sections.

9.1. Buttons always available

Buttons that are available both in the Room mode and the Surface mode are described in the following table:

Button or input field Description

Copyright © 1992 - 2016 NAPA. All rights reserved. 1107 / 7399


NAPA for Design Manuals 2016.3

Opens the Object Information dialog which shows compartment


information (volume, center of gravity, ...) about the saved and
active room.

Info

Opens a dialog for editing a room definition in text format as it is


saved into the database.

Edit Room Definition

Shows an active arrangement and clicking the arrow button


opens a drop-down list of all the available arrangements.

Active arrangement

Copyright © 1992 - 2016 NAPA. All rights reserved. 1108 / 7399


NAPA for Design Manuals 2016.3

Plots active reference surfaces (selected with View Surfaces or


just defined).

Show surfaces

Plots compartments defined to be in the currently active


arrangement.

Show rooms

Copyright © 1992 - 2016 NAPA. All rights reserved. 1109 / 7399


NAPA for Design Manuals 2016.3

Plots rooms that are not part of an active arrangement.

Show auxiliary rooms

Plots calculation sections of an active room in 3D view.

Plot Calculation Sections

Copyright © 1992 - 2016 NAPA. All rights reserved. 1110 / 7399


NAPA for Design Manuals 2016.3

Plots OpenGL plot of an active room in 3D view.

Plot OpenGL

Changes the mode to the Room mode.

Room mode

Changes the mode to the Surface mode.

Surface mode

Copyright © 1992 - 2016 NAPA. All rights reserved. 1111 / 7399


NAPA for Design Manuals 2016.3

Fills compartments that are part of an active arrangement with


their purpose colours, when the Show rooms button is selected.

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.

Activates the selected set of viewing limits.

Use viewing limits

Shows coordinates of X, Y and Z sections. Coordinates can be


given also manually.

Section coordinates

9.2. Buttons only in the Room mode

The following buttons are available only in the Room mode:

Button or input field Description

Copyright © 1992 - 2016 NAPA. All rights reserved. 1112 / 7399


NAPA for Design Manuals 2016.3

Starts the definition of a new room.

New

Opens the Open room dialog for opening any room from the
database.

Open

Copyright © 1992 - 2016 NAPA. All rights reserved. 1113 / 7399


NAPA for Design Manuals 2016.3

Saves the active room into the database.

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

Undoes the latest action in the room definition process.

Undo

Copyright © 1992 - 2016 NAPA. All rights reserved. 1114 / 7399


NAPA for Design Manuals 2016.3

You can add a room or limits to the room defined so far.

Add

You can reduce a room or limits from the room defined so far.

Reduce

Copyright © 1992 - 2016 NAPA. All rights reserved. 1115 / 7399


NAPA for Design Manuals 2016.3

The room, defined so far, is on one side of the ship but actually it
is located on the other side.

Reflect

The room, defined so far, is symmetric over the center line.

Symmetric

Copyright © 1992 - 2016 NAPA. All rights reserved. 1116 / 7399


NAPA for Design Manuals 2016.3

The selected item (like Add or Reduce) is deleted. This does not
delete the room or the limit item.

Delete

The selected item is moved one step upwards in the tree


hierarchy.

Move Up

Copyright © 1992 - 2016 NAPA. All rights reserved. 1117 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1118 / 7399


NAPA for Design Manuals 2016.3

This creates a temporary room and calculation sections for it


which are plotted in 3D view.

Apply

9.3. Buttons only in the Surface mode

The following buttons are available only in the Surface mode:

Button or input field Description

The name of the reference surface which is to be defined next or


which is selected. The field can also be used to define a name
for the next surface.
Object name

Gets the definition of an active reference surface to the Text


Editor where it can be modified and applied.

Edit object

Copyright © 1992 - 2016 NAPA. All rights reserved. 1119 / 7399


NAPA for Design Manuals 2016.3

Prefix for the next defined surface or surfaces.

Prefix for surface

Creates principal planes in the X direction (X is constant).

X Planes

Copyright © 1992 - 2016 NAPA. All rights reserved. 1120 / 7399


NAPA for Design Manuals 2016.3

Creates principal planes in the Y direction (Y is constant).

Y Planes

Creates principal planes in the Z direction (Z is constant).

Z Planes

Copyright © 1992 - 2016 NAPA. All rights reserved. 1121 / 7399


NAPA for Design Manuals 2016.3

Principal planes where either X, Y or Z is constant. Select the


location with one click in one view.

Principal plane

The plane whose distance to one axis is constant. Select two


coordinate points with two clicks in one view.

Plane with two coordinates

Copyright © 1992 - 2016 NAPA. All rights reserved. 1122 / 7399


NAPA for Design Manuals 2016.3

Creates a cylinder surface whose shape is defined by clicking in


one view. The surface is generated according to the start and
end coordinate values given before the shape definition.

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.

Cylinder with form

9.4. Menus

The alternatives under different menus are the following:

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1123 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1124 / 7399


NAPA for Design Manuals 2016.3

Definition of surface objects (GM)


Table of Contents:

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1125 / 7399


NAPA for Design Manuals 2016.3

Introducing the surface object


The definition of the owner surface is in this case

CYLINDER TTOP-SURFACE; Y 0
XZ <> (0 3) (20 3) (25 1) (80 1) (90 2) (100 2)
GENERATOR Y -12 12

and that of the surface object (drawn with filling):

SO TTOP-DECK; IN TTOP-SURFACE; LIMITS <+HULL

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.

2. Surface objects and trimmed patch surfaces


Surface object and trimmed patch surfaces are essentially the same concepts, but for historical reasons, they are treated as different object types.

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.

3. Defining a surface object


The definition of a surface object contains two parts:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1126 / 7399


NAPA for Design Manuals 2016.3

surface, see below.


the limitation. The limitation is defined by surfaces using the same syntaxes as for rooms.

The definition of the surface object is started by the command SO:

SO name

Then follow the owner surface and the limitation, as presented below.

3.1. Defining the owner surface

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:

SO BH1; X #14; ...

The owner surface can also be defined by another surface object. In that case the objects will share the owner surface.

3.2. Defining the limitation

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.

3.3. Special limitation options

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1127 / 7399


NAPA for Design Manuals 2016.3

REDUCT ... D=d


REDUCT ... R=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.

The R option defines a rounding at the corners.

The following figure shows these features combined in a simple example:

ROOM BOX; LIMITS 0 10 1 9 1 9


SO DEMO; X 0
LIMITS - - 0 10 0 10
RED BOX D=0.5 R=1

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.

The translation can be defined for individual borders in the form

name(P+d)

for example

RED - - LBH1 HULL(P=0.5) D1 D2

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1128 / 7399


NAPA for Design Manuals 2016.3

illustrated by the following example:

Example of surface object bounded by a curve


The curve can be given by a reference or explicitly in the definition. Thus, the object in the example can be defined either by

CURVE WEB12C; X #12


ZY <> (5,4.5), (7,8), (6.5,11)
SO WEB12; X #12
LIM - - *WEB12C HULL DECK2 DECK3

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.

3.4. Generalized rounding functions

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1129 / 7399


NAPA for Design Manuals 2016.3

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.

3.5. Surface object derived from bracket shapes

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.

Object defined with reference to a bracket

SO EXAMPLE2; X 0
LIMITS Y>0 Z>5 R=R2S*3000*2000

These features can be combined as in the following example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1130 / 7399


NAPA for Design Manuals 2016.3

Objects defined with reference to a bracket added to another

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

3.6. Selecting whole faces

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.

X selects parts with constant x (any x)

X=x0 selects parts constant x=x0

XX selects parts with orientation x

X<x0 selects parts wholly at x<x0

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

The result is the parts satisfying all partial criteria.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1131 / 7399


NAPA for Design Manuals 2016.3

steps in the owner surface are removed.

4. Examples
Surface object in a plane:

SO BH1
X #120
LIMITS <+HULL Z<MAINDECK

Surface object in a non-plane surface:

SO BH4
IN BH4.S
LIMITS <+HULL z<MAINDECK

Surface object with openings:

SO MAINDECK
IN MDECK.S
LIMITS <+HULL
RED HATCH1
RED HATCH2
RED CASING

Copyright © 1992 - 2016 NAPA. All rights reserved. 1132 / 7399


NAPA for Design Manuals 2016.3

Longitudinal surface objects:

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.

Openings in several decks:

SO DECK1
Z 3
LIMIT <+HULL
RED CASING
RED SHAFT

SO DECK2
Z 8
LIMIT <+HULL
RED CASING
RED SHAFT

Copyright © 1992 - 2016 NAPA. All rights reserved. 1133 / 7399


NAPA for Design Manuals 2016.3

Rounding and margin in openings:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1134 / 7399


NAPA for Design Manuals 2016.3

Deck and bulkheads

5. 'Nonelementary' surface objects


Analogically with rooms, a surface object defined using add, reduct or reflect operations can be called 'nonelementary'.

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.

6. Combined surface objects


A combined surface object can be defined in the same way and for similar purposes as a combined room, either to represent a single object
formed by separate parts or a collection of objects.

The combination is defined by the same syntax as in other cases:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1135 / 7399


NAPA for Design Manuals 2016.3

6.1. Combining surface objects geometrically (merge)

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 difference between COMBINE and MERGE is illustrated by following figures:

Objects as a bare combination

The same objects combined with MERGE


The same geometry could be obtained by a normal surface object definition with ADD commands. The MERGE command has been provided in
order to have the parts available as independent objects.

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.

7. Restrictions on the owner surface


Presently, surface objects can only be defined in facet surfaces. In order to define a general surface with a specific extension, it must be defined
so directly. If it is part of a larger surface, there are the possibilities for defining partial surfaces, described in connection with general surfaces. If,
however, a general surface is given as the owner surface, it will be accepted with a warning, and a facet surface approximation is used. This
approximation is better for a patch surface than a grid surface, but in both cases, the faces are usually not plane.

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.

8. Calculating the shape


In order to do something with the surface object (calculate, draw, intersect), the facet surface representing the shape must be generated. Since
this may be the result of a time consuming operation, the result is stored. When fetching the stored shape, it is checked that it is up-to-date, and if
not, it is recalculated. For a combined object, the shape is stored separately for the parts. From the shape, the area and the center of gravity of
the area are calculated and they can be listed with the command INFO.

8.1. Main method

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1136 / 7399


NAPA for Design Manuals 2016.3

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.

8.2. Open limitation

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:

Bad limitation caused by open limit


This problem may occur less obviously than in the example. To correct, an additional limit must be added or the limit extended.

9. Usage of surface objects


The geometric form corresponding to a surface object is equivalent with a facet surface, and all operations available for facet surfaces can be
used on surface objects.

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.

10. Usage of surface objects as room limits


In contrast to the owner surfaces, surface objects usually represent identifiable objects in the ship, and one may for this reason prefer to use them
in room definitions. If such a limit is taken literally, the room definition will in most cases be unnecessarily complex, both regarding the probability
of difficult geometric special cases and the complexity of the system of dependencies. Therefore, a surface object used as a room limit will be
replaced by its owner surface. In practically all cases, this has no effect on the resulting room geometry. If it should be necessary to actually use
the delimited surface, this can be done by using the GENERATE command by which the shape of a surface object can be converted into what is
equivalent with the result of a normal surface definition.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1137 / 7399


NAPA for Design Manuals 2016.3

references, as exemplified below:

ROOM R101; LIMITS BH2 #BH2+5 -4 4 2 5


SO BH2; X 20
LIMITS Z>2 Z<9 <+HULL
RED R101

Example of cross referencing allowed because of owner surface substitution

11. Administering the ship components


When doing a complete ship model with rooms, decks and bulkheads, the number of components becomes easily very large (thousands), and
maintaining control over these is a non-trivial task. The central means by which this task is handled are adopting suitable name rules and
standardizing the way the definitions are made.

This section presents some aspects on this problem, by pointing out typical questions, without trying to provide a set of ready answers.

11.1. Naming objects

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.

The following examples illustrate some possibilities to construct name rules:

R203: room on deck 2

BH3.4 fourth bulkhead on deck 3

BH3.4.3 third part of fourth bulkhead on deck 3

BH3.4.S the owner surface of the bulkhead

D4: surface object representing the floor of deck 4

R-D4: room, representing the whole deck 4

SH4: shaft 4 (special naming for shafts)

BH-D4: the collection of bulkheads on deck 4.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1138 / 7399


NAPA for Design Manuals 2016.3

11.2. Organizing into combined objects

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.

11.3. Hierarchy between objects

Essentially, the relation between bare surfaces, rooms and surface objects is the following:

surface objects

bare surfaces - >

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:

bare surfaces -> surface objects -> rooms

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.

11.4. Division into individual objects

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.

These questions should also be addressed by the standard.

11.5. Building the geometry

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.

Example of handling a deck with steps


A step, as presented above, is an example of a place where ambiguities may occur, for example, when delimiting a bulkhead. The easiest rule to
adopt for these cases is to make a nominal change in either the location of the step or the bulkhead.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1139 / 7399


NAPA for Design Manuals 2016.3

Bulkhead formed by combining parts


The SELECT command gives new possibilities to handle these cases.

12. Parametric curves and sketch tool

12.1. Introducing the concept

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:

Example of shape containing a parametrically defined part.


The parametric curve is defined by data related to the segments rather than corner points on the curve. This is supported by functions for
presenting the parameters graphically and for editing the values of the parameters.

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)

12.2. Parametric curves as part of surface object definitions

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1140 / 7399


NAPA for Design Manuals 2016.3

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:

Example of hole generated as a parametric shape.

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:

LIMITS ... REF=name

The intersection with the surface given by REF is generated an made available as reference with syntaxes presented below.

12.3. Usage of parametric objects

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

PLOT PAR name opt th

12.4. Direct definition of parametric limits

Direct definition means using the syntaxes presented above, rather than using a sketch.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1141 / 7399


NAPA for Design Manuals 2016.3

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.

12.4.1. General syntax

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:

LIMITS ... PCUR=((segment1) R=r (segment2) R=r ... )

Each segment is defined by a syntax in parentheses.

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.

12.4.2. Defining a segment

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1142 / 7399


NAPA for Design Manuals 2016.3

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 reference may be to part of the boundary or to an adjacent element:

>side : part of the boundary selected by main directions

>A : the auxiliary reference curve (from the REF=... option)

#I : part of the boundary selected by index

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1143 / 7399


NAPA for Design Manuals 2016.3

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:

the segment is defined by the distance to another one


the segment is defined by a fixed coordinate (X=.. etc)
the definition involves two points, either explicitly or indirectly via the neighbors

In the remaining cases, the direction must be defined explicitly in one of the following ways:

value : direction in degrees

P : parallel with the referenced element

N : at right angles to the referenced element

UP : vertical, going up (90 degrees)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1144 / 7399


NAPA for Design Manuals 2016.3

DOWN : vertical, going down (-90 degrees)

RIGHT : horizontal, going right (0 degrees)

LEFT : horizontal, going left (180 degrees)

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.

12.4.5. Position by absolute coordinates

The position can be defined by absolute coordinates. This alternative normally implies the direction and therefore the distinction between
backward/forward must be made.

Absolute coordinates are entered in the form

XP=x : given x-coordinate, direction to positive x

XN=x : given x-coordinate, direction to negative x

y- and z- coordinates are entered analogically.

12.4.6. Defining the position as a distance

The position of a segment can be defined by a distance to the referenced element:

(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.

A simple example containing a position measured along a curve and a distance.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1145 / 7399


NAPA for Design Manuals 2016.3

SO TEST; X 0; LIM Y>0 Z>0 PCUR=((>B, S=5, N),R=1,(>B, D=1.5,


P))

NOTE: the distance is always measured at right angles to the


segment.

When diving a distance, it implies that the direction is


parallel
to the referenced element. The backward/forward decision is
normally handle correctly, but when referring the opposite side
the direction must be reversed by specifying the direction as
DR. The following figure illustrates the case:

If the measures 1000 and 4000 would be interpreted


automatically
but the measure 2000 would have to be given as DR=2.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1146 / 7399


NAPA for Design Manuals 2016.3

12.4.7. Specifying a point on the boundary

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

S: start of the element


E: end of the element
A: intersection with the auxiliary surface

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1147 / 7399


NAPA for Design Manuals 2016.3

SS=1.5: 1.5 m from the start of the element


SEU=2.1: 2.1 m horizontal difference from the end of the
element
SA=-3.8: 3.8 m before the auxiliary point

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

PCUR=(('>B SE=3, ...), ... )

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)

'ref' must be given explicitly to this option.

TO defines a point after the segment and FROM a point before it.

Example of object using the TO and FROM options.

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))

Copyright © 1992 - 2016 NAPA. All rights reserved. 1148 / 7399


NAPA for Design Manuals 2016.3

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.

Example of lengths given in different ways

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1149 / 7399


NAPA for Design Manuals 2016.3

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))

Middle element implied by the lengths of the neighbors.

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))

12.4.10. Auxiliary reference object

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:

LIMITS ... REF=name

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)

means at distance 1.5 from the auxiliary curve.

Points on the boundary can be measured from the auxiliary reference curve using A as the reference point. For example,

(>B SA=1.2)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1150 / 7399


NAPA for Design Manuals 2016.3

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.

Example of references to the auxiliary surface.

SO EXAMPLE9; X 0
LIMITS Z>0, REF=PL21,
PCUR=((>B, SA=-3, N+30),(>B, D=3),(>B, SA=4, –30))

12.4.11. Segments with radius

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:

The possible combinations are given by the following table:

Radius given

No endpoint fixed tangency at both ends

One endpoint fixed tangency at the fixed end

Both endpoints fixed error

Radius not given

No endpoint fixed error

One endpoint fixed tangency at both ends

Both endpoints fixed tangency at one end

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

No end fixed right angles at both ends

One end fixed right angle at this end, tangency at the other

Both ends fixed error

Radius not given

No end fixed error

One end fixed right angle at this end

Both ends fixed normal at one of the ends

Copyright © 1992 - 2016 NAPA. All rights reserved. 1151 / 7399


NAPA for Design Manuals 2016.3

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;

PCUR=((>L, SE=4, R=1.5), ... )

Presently, the sketch function supports only one arc.

12.5. Creating holes

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.

12.6. Parametric curve from sketch

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:

near horizontal or vertical lines are defined as exactly horizontal or vertical


angles almost parallel or perpendicular to the parts of the reference curve are made exactly so
measures are made from suitable reference points rather than using absolute coordinates
the measures are rounded
at the boundary between arcs and straights, tangency or right angles is forced if possible
fillets are added between the segments

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1152 / 7399


NAPA for Design Manuals 2016.3

SO...
LIMITS ... PPOL=((u,v),(u,v),...) or

SO ...
LIMITS ... PPOL=I,
(u,v), (u,v), ...

The same applies to creating a hole:

RED PPOL=((u,v) .... ) or


LIMITS ...
RED PPOL=I (u,v) .... or

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.

An arc is indicated by an additional point, flagged by *:

PPOL=( ... (u1,v1), *(ua,va), (u2,v2) ....

The points (u1,v1), (ua,va), (u2,v2) define an arc of circle that indicate the desired result.

Before the points, options controlling the interpretation may be entered:

R=r : initial value for the fillet radius, default=1

RND=d : controls rounding of lengths, default=0.01

ARND=da : similarly for rounding of angles (5 degrees)

ATOL=atol : tolerance for angles, see below (10 degrees)

TOL=tol : tolerance (m), additional test for angle rounding

NTOL=ntol : for extrapolated measures, see below (45)

QTOL=qtol : for extrapolated measures, see below (0.5)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1153 / 7399


NAPA for Design Manuals 2016.3

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.

12.7. Transferring a definition to another object

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:

... PCUR=(REFV,(...) ...

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))

PCUR=(REFV (>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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1154 / 7399


NAPA for Design Manuals 2016.3

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)

12.8. Editing parametric objects

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

1 : index of segment to which the parameter belongs (index in record 1607)

2 : type of parameter, the same values as above

Copyright © 1992 - 2016 NAPA. All rights reserved. 1155 / 7399


NAPA for Design Manuals 2016.3

3 : value of the parameter (m or degrees)

4...7 : two points, u1,v1,u2,v2 indicating where the parameter can be measured

8 : part number to which the segment belongs

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

3 : index in the associated output description

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.

12.9. Procedure when editing

As a summary, editing a parametric curve contains the following steps:

extract properties with GMT.EXTRACT (name,edescr)


get the parameters using GMT.PCURVEPAR (done directly from the object in question)
plot the parameters, either by the standard function built in GMT.PCURVEPAR or by fetching the details and using an own plotting
routine
identify the parameter selected by the user. From the standard plot, the 3. level label gives the index of the list of parameters in the result
from GMT.PCURVEPAR (rec=dm.getrec(rdescr,17000,parnr). From the associated record, the index of the segment and the type of
parameter can be obtained.
inquire the new value of the parameter from the user
update the result by calling GMT.UPDPSEGMENT (edescr,part,segnr,partype,newvalue).
update the object by calling GMT.DEFINE

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.

12.9.1. More general editing

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:

1701: type of parameter, see the list below


1702: reference point or other information
1703: value of the item

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1156 / 7399


NAPA for Design Manuals 2016.3

Type Property Usage of ref Usage of value

1701 1702 1703

1: direction axis/ref dcorr

2: distance ref/axis+s dist

3: pos. on refcurve bare S ref+100000*refp dist

4: pos. on refcurve FROM ref+100000*refp dist

5: pos. on refcurve TO ref+100000*refp dist

6: length of segment u/v/l length

10: fillet radius 0 radius

11: radius of segment connection radius

Pres. the values in rec. 1 contain 1000+ .... (25.2)

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.

12.10. More general owner surfaces

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))

Example of object in an inclined plane


A parametric object in a general facet surface is presently supported only when the curve is wholly contained in a single facet. This facet provides
the plane in which the curve is defined according to the same principles as above.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1157 / 7399


NAPA for Design Manuals 2016.3

>(x,y,z)

Example of object in a general facet surface

SO TESTFACS; IN BH1.S
LIM PCUR=(>(13,6,6.5),(>B,SE=8.94,N,L=3), R=0.1, &#169;),
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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1158 / 7399


NAPA for Design Manuals 2016.3

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))

Copyright © 1992 - 2016 NAPA. All rights reserved. 1159 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1160 / 7399


NAPA for Design Manuals 2016.3

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))

Copyright © 1992 - 2016 NAPA. All rights reserved. 1161 / 7399


NAPA for Design Manuals 2016.3

Special definition functions (GM)


The preceding chapters describe the main definition functions. This chapter presents some other functions by which geometric shapes can be
generated or modified.

Table of Contents:

1. Special curve definition functions


1.1. Subtask MC (modify curve)
1.1.1. Translation, reflection, rescaling
1.1.2. Rotation
1.1.3. Offset curve
1.1.4. Combination of open curves
1.1.5. Combination of closed curves
2. Making a space curve from a text
3. Command GENERATE
3.1. Plane sections
3.2. Intersection between objects
3.3. Restricting surfaces, overview
3.4. Restriction with planes
3.5. Restricting patch surfaces (Trimmed surfaces)
3.6. Conversion of general surfaces to facet surfaces
3.7. Conversion of facet surfaces into the patch representation
3.8. Curves of constant inclination or constant curvature
3.9. Offset surface
3.10. Surface from wave
3.11. Generating the B/5 surface
3.12. Combining surfaces
3.13. Minimum/maximum curves
3.14. Boundary of surfaces
3.15. Subset of patch surface, subdivision of patches
4. Special surface definitions
4.1. Numeric object from sections
4.2. Room from BON-JEAN curves
5. Parametric objects (from macro)
6. Features and reference points
6.1. Reference points
6.2. Features
7. Converting NAPA surfaces into nurbses
7.1. Combine patches into larger nurbs entities
7.2. Modifications based on the topology model of the nurbses
7.3. Fit nurbs surface to point set
7.4. Select a uniform point set from a surface
7.5. Auxiliary check functions

1. Special curve definition functions


The following functions can be used for creating or modifying curves for various purposes, e.g. for drawing, but in most cases not for hull
definition. See also command GENERATE, the result of which may be a curve or a surface.

1.1. Subtask MC (modify curve)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1162 / 7399


NAPA for Design Manuals 2016.3

1.1.1. Translation, reflection, rescaling

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.

Example of translation and scaling

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

Using DES on the result can give something like

Result of modify curve:


@@
@@ CUR FRA; X, 22
@@ YZ (0, 0), -/, PFRA1, PFRA2, /-, (6.5, 10)
@@ SC , M
@@ MC TEST
@@ AXIS (22,0,0),Z
@@ ROT 22.5

1.1.3. Offset curve

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):

Copyright © 1992 - 2016 NAPA. All rights reserved. 1163 / 7399


NAPA for Design Manuals 2016.3

Example of offset curve - PTR 0.5

1.1.4. Combination of open curves

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.

Combination of curves - GET TT1; COMB TT2

1.1.5. Combination of closed curves

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.

2. Making a space curve from a text


Command FTC (font to curve) creates a space curve representing a text, allowing texts to be drawn in the space coordinate system. For example,
this way it is possible to draw a text on the ship side in a perspective projection.

Example:

FTC TEXT DEMOSHIP Y=10 P=(40 6) H=2 REF FILL FONT=EL

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1164 / 7399


NAPA for Design Manuals 2016.3

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).

The form of the GENERATE command is

GENERATE name operation options

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 following paragraphs describe the operations available.

3.1. Plane sections

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:

GENERATE PROFILE STABHULL/Y=0

3.2. Intersection between objects

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:

GENERATE HOLE HULL/TUNNEL

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1165 / 7399


NAPA for Design Manuals 2016.3

FTC N-CL N Y=0 P=(98.5, 1.5) H=2


GEN N-HULL HULLFP/*N-CL

Result of commands above


If the intersection object is a curve name without prefix, the result is the intersections point(s) between the object and the curve. The result is
stored as a curve, equal to the cross presented under PLOT. The actual intersection point is found as the second element in records 1001,1002
and 1003 (x, y and z). The object must be a patch surface or a facet surface.

The following example illustrates the difference between intersecting the volume or walls of a room:

GENERATE S1 BOX/TTOP (left)


GENERATE C1 BOX/TTOP C (right)

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.

3.3. Restricting surfaces, overview

A restricted surface is generated by the command

GEN name keyword surface limits options

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.

PLIMIT A set of plane limits is applied to a facet surface.

TRIM A trimmed patch surface is calculated from the patch representation of the original surface.

CTRIM A surface is restricted by a closed curve

PATCH A set of patches is selected from the surface.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1166 / 7399


NAPA for Design Manuals 2016.3

The different alternatives are described in more detail below.

3.4. Restriction with planes

From surfaces, a partial surface can be generated by restricting with planes:

GEN name keyword surface lim1 lim2 ....

The keywords LIMIT, PLIMIT and TRIM can be used.

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:

GEN HULL-P1 LIMIT HULL X>12 X<33 Z<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.

Example of restriction by planes:

GENERATE PART1 TRIM HULLF X>70 Z>5


GENERATE PART2 TRIM HULLF X>70 Z<5

3.5. Restricting patch surfaces (Trimmed surfaces)

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 general form of the command is:

GENERATE result TRIM surface restrictions options

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1167 / 7399


NAPA for Design Manuals 2016.3

axis<name, axis>name at the given side, e.g. Z>TTOP, X<BH1

axis<q, axis>q at the given side of a coordinate plane, e.g. Z>21, X<#15, Y>1

Trimmed patch surface, example 1:

GENERATE HULLBELOWTTOP TRIM HULL Z<TTOP

Trimmed patch surface, example 2:

GENERATE HULL-HOLE TRIM HULLF >CYL1


GENERATE HOLE TRIM HULLF <CYL1 (not shown)

Trimmed patch surface, example 3:

GENERATE TUBE TRIM CYL1 <HULLF <HULLF-SB


(CYL1 is the same as in the preceding example)

There is no reflection option, therefore HULLF-SB has been made to give the reflected side: SUR HULL-SB; COMBINE HULLF(Y/0).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1168 / 7399


NAPA for Design Manuals 2016.3

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.

Surface formed by several operands:

left: parts of S1 and S2 included - right: only S2 contributes


Skeg and hull formed by combined trimming:

GENERATE HULLA TRIM >SKEG >HULLA NOSKEG

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:

DEBUG=ALL check all patches

DEBUG=ONERR check all detected errors

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.

The latter case is illustrated by the following example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1169 / 7399


NAPA for Design Manuals 2016.3

Example of ill defined restriction


The limiting surfaces can also be curves lying on the original surface. For example the command GEN HULLA2 TRIM HULLA Z<WL10 could be
used. If the curve is a closed one , an alternative method is available, by using the command

GEN surface2 CTRIM surface curve options

Trimming of surfaces is also available as a normal surface definition:

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.

3.6. Conversion of general surfaces to facet surfaces

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

GENERATE HULLFC FACET HULL

For patch surface, a tolerance can be added as above.

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.

3.7. Conversion of facet surfaces into the patch representation

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 conversion is done by the following command

GENERATE name PATCH facet-surface

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1170 / 7399


NAPA for Design Manuals 2016.3

Patch surface from double cylinder

3.8. Curves of constant inclination or constant curvature

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

IX,IY,IZ inclination measured in the section designated by the second symbol.

DX,DY,DZ curvature measured in the section designated

M mean curvature

G gaussian curvature

Example:

GENERATE CX0 HULL/DX=0

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.

3.9. Offset surface

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

GENERATE name OFFSET surface D=distance

'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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1171 / 7399


NAPA for Design Manuals 2016.3

Example of offset surface

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

3.10. Surface from wave

The shape of a wave, as used in the calculations, can be made available as a geometric object by the command

GENERATE name WAVE wave-name t (n)

'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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1172 / 7399


NAPA for Design Manuals 2016.3

Example of wave and hull delimited by it

WAVE WAVE6 H=6


DIR=23
GENERATE WAVESURF WAVE WAVE6 4

3.11. Generating the B/5 surface

A surface representing the b/5 limit can be generated by the command

GENERATE name B5 hull t

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.

Example of B/5 surface

GENERATE B5SURF B5 HULL S

3.12. Combining surfaces

The command

GENERATE name COMB part1 part2 ...

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1173 / 7399


NAPA for Design Manuals 2016.3

Transformations can be applied to operands in the same way as in the standard COMBINE command.

3.13. Minimum/maximum curves

The minimum or maximum of a curve set can be generated with options MIN or MAX:

GENERATE name MAX axis curve1 curve2, ...

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:

GENERATE MAXCURVE MAX TT1 TT2 TT3 TT4

Example of maximum curve


Option MIN works analogically.

3.14. Boundary of surfaces

The boundary curve of a surface object is created by the command

GEN curve BOUNDARY surface

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.

3.15. Subset of patch surface, subdivision of patches

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:

GENERATE name PATCH surface P=selection

The result 'name' contains the patches selected by one of the following alternatives:

P=i patch i

P=-i all patches except patch i

P=ALL all patches

P=(i/n) n*n subpatches of the patch i.

Several criteria can be given within parentheses, e.g. P=(1,4,5).

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1174 / 7399


NAPA for Design Manuals 2016.3

more patches in the surface.

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:

GENERATE TRANSOM PATCH HULLA P=(1/2,2,3,4)

4. Special surface definitions


This subject contains presently two types of numeric objects. Numeric objects are available for calculation but have no normal geometry
definitions.

4.1. Numeric object from sections

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.

These objects are defined by either

SURFACE HULL; CSC FR1, FR2, ...


ROOM T1; CSC CT1, Ct2, ...

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.

4.2. Room from BON-JEAN curves

A numeric object can be created from a set of Bon-Jean curves:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1175 / 7399


NAPA for Design Manuals 2016.3

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.

The following example is the forebody of the NAPASTAR:

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

Z A66.6 A71.6 A75.7 A80.3 A84.9


1 0.000 0.0 0.0 0.0 0.0 0.0
2 1.267 14.6 12.5 8.1 2.7 0.0
3 2.533 30.8 26.8 17.6 6.4 0.0
4 3.800 47.3 41.8 27.6 9.9 0.0
5 5.067 63.8 57.4 38.3 12.9 0.0
6 6.333 80.2 73.4 50.0 16.7 0.0
7 7.600 96.7 89.6 63.0 22.8 0.0
8 8.867 113.2 106.1 77.3 31.6 0.0
9 10.133 129.6 122.5 92.2 41.8 0.0
10 11.400 146.1 139.0 107.5 53.2 2.0

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1176 / 7399


NAPA for Design Manuals 2016.3

5. Parametric objects (from macro)


New object types can be introduced by macros to which the variable dimensions are given as parameters. This can be done with no other support
than the general functions for using variables and running macros. However, the original parameters will not be recorded in the result, and the
result of DES will usually not be informative or useful for updating the object. The purpose of the parametric macro object (PMO) is to remove this
shortcoming and make the object more resemble ordinary objects. The present implementation (rel. 2001) is considered pilot level and covers
only surfaces.

A parametric macro object is defined in the DEF task by the command PMO:

PMO name macro(parameters)

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):

PMO MYCUBE CUBE(1,5,0,3)

The macro CUBE could be:

@@ 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

PMO HELP macro

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1177 / 7399


NAPA for Design Manuals 2016.3

There is no automatic update in case the macro should change.

6. Features and reference points


Features and reference points are additional properties that can be added to geometric objects. Their use in standard functions of NAPA is
presently very limited, but with the service functions provided, they can be used for user defined purposes.

6.1. Reference points

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.

7. Converting NAPA surfaces into nurbses


The function GM.CONVERT is available to convert patch surfaces into collection of nurbses in a controlled way. It can be used to modify the
structure or the geometry of the surface so that the transfer to other systems via IGES is more reliable. In the default transfer each patch is
converted into a single nurbs independently without taking into account its connections to the neigbbors.

The function GM.CONVERT creates a topology model of the connections. It can be used for the following purposes:

combine patches into larger nurbs entities.


force same structure of knots and control points between the connected nurbses.
modify the surface so that at most one nurbs is connected to an edge of a nurbs
rebuild nurbses so that the internal knots have multiplicity one
improve tangent plane continuity between the nurbses
fit nurbs surfaces into a point sets

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.

7.1. Combine patches into larger nurbs entities

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1178 / 7399


NAPA for Design Manuals 2016.3

the optional user defined nurbs boundaries are taken into account
the 4 edges of each nurbs are free of knuckles

The function is used as follows

GM.CONVERT(NAME1,NAME2,'G', BREC,OPT), where

NAME1: name of the preparable simple patch surface


NAME2: name of the resulted nurbs surface
BREC: (opt) string array containing names of curves that are boundaries
the nurbses. 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.
K: allow knuckles in nurbs boundaries

Patches combined into larger nurbses

7.2. Modifications based on the topology model of the nurbses

Copyright © 1992 - 2016 NAPA. All rights reserved. 1179 / 7399


NAPA for Design Manuals 2016.3

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.

The function is used as follows:

GM.CONVERT(SUR,TOP,'TOP',OPT,SUR2), where

SUR: name of the original surface


TOP: topology description
OPT: options
I: insert knots to obtain same knots and control points
along the connection lines
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 distibution
of parameters and 3d-points obtained from the original surface
B: set g1-continuity at the connection lines
P: plot curves where g1-continuity is not required
S: store SUR2 into DB1 also
SUR2: name of the result surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1180 / 7399


NAPA for Design Manuals 2016.3

Surface modified with OPT='I'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1181 / 7399


NAPA for Design Manuals 2016.3

Surface modified with OPT='II'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1182 / 7399


NAPA for Design Manuals 2016.3

Surface modified with OPT='IIR2B'

7.3. Fit nurbs surface to point set

The function GM.CONVERT with the keyword INT interpolates a nurbs surface into a two dimensional N*M array of 3D-points.

The interpolation is used as follows

GM.CONVERT(POINTS,SUR,'INT', OPT), where

POINTS: name of a description containing the points


SUR: name of the result surface
OPT: options
S: save the result into DB1 also
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
R2: the points are created by TPL.CONVERT with keyword SP
i.e. POINTS=REF from GM.CONVERT(SUR1,TABLE,'SP',REF)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1183 / 7399


NAPA for Design Manuals 2016.3

7.4. Select a uniform point set from a surface

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.

The function is used as follows

GM.CONVERT(SUR1,TABLE,'SP',REF, SUR2)

SUR1: original surface


TABLE: name of the result table for the points
REF: boundary description

The following input data should be given by the user:


- number of rows: N
- number of columns: M
- row 1: curve R1 limited by KR11 and KR1M
- row N: curve RN limited by KRN1 and KRNM
- column 1: curve C1 limited by KC11 and KC1N,
- column M: curve CM limited by KCMN and KCMN)

The input data is stored in REF as follows:


integer record 1: N,M
integer record 2: R1,RN,C1,CM
real record 3: KR11,KRN1,KC11,KCM1
real record 4: KR1M,KRNM,KC1N,KCMN

The following output record is created:


real record 5: points as an array of dimensions
(3,N,M) stored so that a preceding
index runs faster than the latter.
SUR2: (opt) name of the result surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1184 / 7399


NAPA for Design Manuals 2016.3

Uniform 30*100 array of points selected from HULL

Surface fitted to the point set

Copyright © 1992 - 2016 NAPA. All rights reserved. 1185 / 7399


NAPA for Design Manuals 2016.3

Intersections from HULL compared to those of the fitted surface

7.5. Auxiliary check functions

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1186 / 7399


NAPA for Design Manuals 2016.3

Parametrization of geometric definitions (GM)


Table of Contents:

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

2.1. Parameter sets

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1187 / 7399


NAPA for Design Manuals 2016.3

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.

2.2. Attributes of parameters

A parameter has the following attributes:

name symbol

definition expression that defines the value

type (optional) type of the parameter

description (optional) descriptive text

rule (optional) feasibility rule

2.3. Definition in the DEF-task

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.

The general manner of proceeding is

PDEF name options ;** options: <parent, I, N


PAR ...
PAR ...
...
OK

Options of the PDEF command:

<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

I the set is an independent one

N the set is a new one

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.

The parameters are defined by the command

PAR name def type des rule

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1188 / 7399


NAPA for Design Manuals 2016.3

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

des (optional) descriptive text.

rule (optional) feasibility rule

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';

The following special definitions are available definition type

'(x,y,x)' P

'(u,v)' PX,PY,PZ

'(x,y,z) (x,y,z)' LINE

'(u,v) (u,v)' LINEX,LINEY,LINEZ

'p1 p2' LINE,LINEX,LINEY,LINEZ

'coeff**line' P,PX,PY,PZ

where coeff is a parameter of the line (0<=coeff<=1)

'INC: p1 p2' AX,AY,AZ

p1 and p2 are either point parameters or explicitly defined (u,v) points.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1189 / 7399


NAPA for Design Manuals 2016.3

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.

'IP: p1 p2 a1 a2' PX,PY,PZ

'IP1: p1 p2 a1 a2 r' PX,PY,PZ

'IP2: p1 p2 a1 a2 r' PX,PY,PZ

For example,

PAR PR 'IP: (0,5) (5,2) -20 -60 1' PY 'intersection line/line'

PAR PR1 'IP1: (0 5) (5 2) -20 -60 1' PY 'start of rounding'

PAR PR2 'IP2: (0 5) (5 2) -20 -60 1' PY 'end point of rounding'

CUR C1; Y 0; XZ (0,5) -/ PR /- (5,2) ;** sharp corner

CUR C2; Y 0; XZ (0 5) -/ PR1 PR2 /- (5,2) ;** rounded corner

2.4. Definition under table calculation

Because the parameter sets contain data in the table format, they can be modified in the TAB-task or by the table editor also.

The following should be noted:

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;.

3. Use of parameters in geometric definitions

3.1. Supported objects

The parametrization has been installed in the definition of the following objects:

point objects
curves
tangent functions
planes

Copyright © 1992 - 2016 NAPA. All rights reserved. 1190 / 7399


NAPA for Design Manuals 2016.3

3.2. Activation of parameters

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

FV value (real number)

NAME symbol

FORMULA definition

TYPE type

DES descriptive text

RULE feasibility rule (logical expression)

LOCTN plotting instructions

VALUE value (string)

3.3. Replacing items by parameters

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.

Examples of valid expressions are

expression value

LREF 100 (value of parameter LREF)

-LREF -100

0.5*LREF+1 51

'0.5*LREF+1' 51

'LREF*SIN(I*DA)' 1.234

Copyright © 1992 - 2016 NAPA. All rights reserved. 1191 / 7399


NAPA for Design Manuals 2016.3

'REF(''LREF'')' 100 (value from reference system)

'100+1' 101

POINT1 (50,10,0) (point parameter)

POINT2 (60,10,0) (point parameter)

LINE (50,10,0),(60,10,0) (line parameter)

0.5**LINE (55,10,0) (line parameter)

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

CUR FRF; X POINT2; ....

CUR FBF; Z 0; XY POINT2 ...

CUR FBF; XYZ POINT2 ...

CUR FRF; Z 0; XY (POINT2,POINT2) ...

4. Working with parametrized geometry

4.1. Copying an existing geometry

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.

The following should be noted if EDI **object is used:

The created text contains only the referenced parameters.


PDEF commands do not contain the N (=new) option, and sorunning this macro does not change the other parameters of the existing
sets.
PSET commands are not included, and so running this macro in a new project results in errors 'undefined parameter'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1192 / 7399


NAPA for Design Manuals 2016.3

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.

4.2. Administrational commands

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.

4.3. Tasks TRA,EC,MC,ES

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.

5.2. Parametrisation in the NAPA system

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.

5.3. Parametrisation of the DTMB 5415 naval combatant

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1193 / 7399


NAPA for Design Manuals 2016.3

Common parameters of the whole ship defined in the set 'PDEF*HULL'


The parameters used in the definition of the aft part of the hull are defined in the set 'PDEF*HULLA' and consists of both independent parameters
and parameters which are a function of parameters in the common set 'PDEF*HULL'. The parameter set 'PDEF*HULLA' contains parameters
such as angles of deadrise and angles of flat side at different part of the aft hull. Propeller clearances are given and affect the shape and location
of the frame at the propeller x-section. The dimensions and shape of skeg is also defined with the help of parameters in the 'PDEF*HULL' set.
Figure below shows the parameters of the set 'PDEF*HULLA'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1194 / 7399


NAPA for Design Manuals 2016.3

Parameters of aft ship defined in the set 'PDEF*HULLA'


Figure below shows the parametric grid of the aft hull. The frame curve CXPROP is located at the propeller's x-coordinate. The hard point of
'CXPROP' is located above the propeller where the propeller clearance to hull and propeller's transverse location is taken into account. The 'SKL'
is a space curve defining the knuckle of the skeg. The vertical angle at transom of the 'TA2' curve is given with the 'ANGYTA2TRA' parameter, but
the hard point of 'CXPROP' heavily affects its behaviour forward from the transom.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1195 / 7399


NAPA for Design Manuals 2016.3

Parametric grid of the aft hull


The parameters used in the definition of the fore part of the hull are defined in the set 'PDEF*HULLF'. It contains global parameters such as height
of main deck and detailed parameters for modifying the shape of the sonar dome. Following figure shows the parameters of the set
'PDEF*HULLF'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1196 / 7399


NAPA for Design Manuals 2016.3

Parameters of the set 'PDEF*HULLF'


The grid structure of the fore hull is shown in the following figure. Three frames and two waterlines, as well as the border curves 'STEM', 'BLBTE'
and 'TFBLB1' define the dome.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1197 / 7399


NAPA for Design Manuals 2016.3

Parametric grid of the fore hull


Following figure shows in more detail the grid structure of the dome. The curve 'TFBLB1' defines the upper limit of the dome.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1198 / 7399


NAPA for Design Manuals 2016.3

Detailed grid structure of the dome

5.4. Container ship

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1199 / 7399


NAPA for Design Manuals 2016.3

Parameter set PDEF*HULL


The parameter set of the aft hull 'PDEF*HULLA' is also reduced to the minimum, containing only parameters for the transom, flat of side and deck
height as well as parameters where the propeller size and location is affected.

Parameter set PDEF*HULLA


The parametric grid is shown in Figure 9. The transom is fixed to have a full breadth of the ship at the main deck height and to start in the
centreline at a height of 0.1 m above the design waterline. Parametrically the transom curve 'TRANS' can directly be modified with the parameter
'ANGFSTRA', which defines the angle of the transom curve at deck height.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1200 / 7399


NAPA for Design Manuals 2016.3

Parametric grid of aft hull


The fore part of the hull is also defined with less than 15 parameters. It's parameter set 'PDEF*HULLF' consists of the deck height, and several
parameters describing the bulb form. Figure 10 shows the parameter set 'PDEF*HULLF'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1201 / 7399


NAPA for Design Manuals 2016.3

Parameter set 'PDEF*HULLF'


The parametric grid of the fore hull is shown in Figure 11. The bulb / hull interface is controlled with the 'KNB' curve. The intermediate point's y-
and z-coordinates of the 'KNB' curve are controlled with the parameters 'Y1.KNB' and 'Z1.KNB'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1202 / 7399


NAPA for Design Manuals 2016.3

Parameter set 'PDEF*HULLF'


The number of parameters kept to minimum in the parameterisation of the single propeller container ship in order to make it more user friendly
and lower the step of taking it into use.

5.5. Passenger/RO-RO ferry

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1203 / 7399


NAPA for Design Manuals 2016.3

Parameter set 'PDEF*HULL'.


Mainly for the transom and the flat side modification are parameters. The aft body is in modifying also with parameters in 'PDEF*HULL'.

Parameter set 'PDEF*HULLA'


The parametric grid is shown in Figure 14. The transom is fixed to have a full breadth of the ship at deck height. The skeg at CL is fixed also
concerning the breadth and roundings.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1204 / 7399


NAPA for Design Manuals 2016.3

Parametric grid of the aft hull


The fore part of the hull is parameter set 'PDEF*HULLF' consists of the length of the bow and several parameters describing the bulb form.
Following figure shows the parameter set 'PDEF*HULLF'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1205 / 7399


NAPA for Design Manuals 2016.3

Parameter set 'PDEF*HULLF'


The parametric grid of the fore body is shown in figure below. With the parameters x.frf3 and x.frf4 is possibility to modify the fore body slightly
more slender or more full but then it is had to take notice of the end of the flat side (parameter XFSF). To increase buoyancy and to change the
location of LCB forward is most suitably done with the parameters XFRA and XFRF in the table PDES*HULL.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1206 / 7399


NAPA for Design Manuals 2016.3

Parametric grid of the fore hull

5.6. Cruise Liner

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

Parameter set 'PDEF*HULL'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1207 / 7399


NAPA for Design Manuals 2016.3

Parameter set 'PDEF*HULLA'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1208 / 7399


NAPA for Design Manuals 2016.3

Parametric grid of the aft hull


The parametric grids are shown in the following figures.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1209 / 7399


NAPA for Design Manuals 2016.3

Parameter set 'PDEF*HULLF'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1210 / 7399


NAPA for Design Manuals 2016.3

Parametric grid of the fore hull

5.7. Parametric templates

The above described and some further ship specific parametric hull templates are available in the project PARALIB.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1211 / 7399


NAPA for Design Manuals 2016.3

Commands related to definitions (GM)


Table of Contents:

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]

1. Main definition functions

CNS -> define connection surface

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.

CNS name 'text' P

name: name of surface

text: (opt) descriptive text

P: (opt) create patch representation

CURVE -> define curve

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.

CURVE, name 'text' type

name: name of curve to be defined

text: (opt) descriptive text. Apostrophes compulsory.

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.

CYLINDER -> define cylinder

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.

CYL name 'text' P

name: name of cylinder

text: (opt) descriptive text

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

More instructions are available after entering the CYL command.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1212 / 7399


NAPA for Design Manuals 2016.3

DCYL -> define 'double cylinder'

A double cylinder differs from a simple cylinder in that the generator may be curved. Records
BASE+GEN must follow.

DCYL name 'text' P

text: (opt) descriptive text

P: (opt) create patch representation

EXAMPLE
DCYL MAINDECK
BASE MAIND-CL
GENERATOR MAIND-SECTION

EC -> edit curve

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

curve: name of curve to be changed

ES -> edit surface

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.

FCS -> define arbitrary facet surface

A facet surface is a surface formed by a combination of plane polygons, facets. In a general


facet surface, the facets are given directly in the definition by FAC commands.

FCS name 'text' P

name: name of surface

text: (opt) descriptive text

P: (opt) create patch representation.

FETCH fetch changed object from the data base

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

name: name of object to be updated

PDEF definition of parameter sets

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1213 / 7399


NAPA for Design Manuals 2016.3

------------------------

name: name of the parameter set

<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.

PDEF CAT unit selection options

-------------------------------

List a catalogue of parameter sets. The optional parameters unit etc. are the same as in the
general CAT command (see !exp CAT/GEN).

unit: (opt) data base unit

selection: (opt) selection criterium

options: (opt) see !exp cat/gen

Examples:
PDEF CAT
PDEF CAT NAME>HULL

PLANE -> define plane

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.

PLANE name 'text'

name: name of plane

text: (opt) descriptive text

EXAMPLE
PLANE BH1-PLANE; X 24
PLANE DIAG1; THR (- 10 0) (- 0 10)

PMO parametric macro object

Copyright © 1992 - 2016 NAPA. All rights reserved. 1214 / 7399


NAPA for Design Manuals 2016.3

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.

PMO name macro(parameters) 'description'

name: name of the result

macro: name of the macro

parameters: parameters to the macro

'description': (opt) descriptive text

EXAMPLE

An object named MYBOX is created by the macro BOX. The macro could begin with:
@parameters(l=n,b=n,h=n)

PMO MYBOX BOX(10,5,3)

POINT define point

This command defines a point as a named object.

POINT name 'text' definition l

name: name of the point

text: (opt) descriptive text

definition: specifies location

(x,y,z): point given by three coordinates. A coordinate can be given by reference to a point.

curve/axis=q: given curve, intersected at the given coordinate

curve/curve: intersection between two curves

curve/S,curve/E: startpoint, endpoint of curve

p(axis+q): other point translated the distance q along 'axis'. Several translations can be
combined.

-p: other point reflected around y=0

l: (opt) size of figure representing the point, default=0.01*lref

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)

PREP prepare surface

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.

PREP name options

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1215 / 7399


NAPA for Design Manuals 2016.3

SI: (smooth interpolation) generate tangent functions using smooth interpolation, default linear
interpolation. (Grid surfaces only).

U: (update) update the surface before preparation (same as UPDATE surf).

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.

ATOL=atol: (angle tolerance for curve/curve-intersections) In case of approximate intersections


(TOL=tol) two curves intersect if their distance is less than tol, and the angle between the
curves is greater than atol. As a default nothing is required from the angles.

NO: (no options) ignore preparation options stored with the surface by command PO.

options for NURBS surfaces:

TTOL=tol: tpl-tolerance

KTOL=angle: knuckle point tolerance (deg)

KTOL2=angle: knuckle line tolerance (deg)

BTOL=tol: approximation tolerance of boundary curves (<0: number of fixed subdivisions)

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

WSC=weight: weight of smoothing in curve appproximations (0...1)

ERED=n: number of control points NCP in equiparameter curve approximations is made


smaller by the given value n. If n<0, the reduction is int(-0.01*n*NCP).

ETOL=tol: tolerance for equiparameter curve approximations

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

NTOL=angle: tolerance for surface normal fitting (deg)

IMAX=n: max. number of iterations

SOPT=string: additional options for nurbs fitting

GTOL=tol: gap elimination tolerance for plane sections of the surface.

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.

PSET activate parameter sets

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.

PSET set1 set2 ...

------------------

The given sets are activated to form the current runtime set.

set1: name of the parameter set The prefix PDEF* is not needed.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1216 / 7399


NAPA for Design Manuals 2016.3

PSET LIST options

-----------------

List parameters of the runtime set. The list is controlled by the command LQ PDEF of the DEF
task.

name: (opt) name of the parameter

*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

--------

Cancel the use of runtime parameters.

PSET +

------

Make the gm-parameters available in the calculator also

PSET -

------

Cancel the use of the gm-parameters in the calculator

PSET

----

List parameters sets of the runtime selection

PYRAMID -> define pyramid (or cone)

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.

PYRAMID name 'text' P

name: name of surface

text: (opt) descriptive text

P: (opt) create patch representation. Note: the 'pyramid' property may not be rendered exactly.

ROOM -> define room

The command starts the definition of a room. The explanation of the additional commands
needed is available after the ROOM command is entered.

ROOM, name 'text'

name: name of room to be defined

text: (opt) descriptive text. Apostrophes compulsory.

The explanation of the additional commands is available after the ROOM command is entered.

ROT -> define rotation surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1217 / 7399


NAPA for Design Manuals 2016.3

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.

ROT name 'text' P

name: name of surface

text: (opt) descriptive text

P: (opt) create patch representation. Note: the 'rotation' property may not be rendered exactly.

SCC define side conditions

This command adds a side condition to a curve

SCC, name, sc

name: name of curve concerned

sc: side condition

P: plane (tangent plane of the surface coincides with the plane of the curve

*axis=t: constant angle t in the indicated sections

M: midship (surface tangent parallel with x-axis)

E: end of surface

-: free angle

sc1//sc2: different side cond. (sc1/sc2) to the left/right of the curve

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

Cancel previously given side conditions.

SCC, FRMID M
SCC, FLATBOTTOM, P
SCC, KNUCKLE1 -//-

SO -> define surface object

SO name 'text'

name: name of object to be defined

text: (opt) descriptive text. Apostrophes compulsory.

The explanation of the additional commands is available after the SO command is entered.

SPHERE -> define sphere

SPHERE, name P

The command CENTER must follow: CENTER (x,y,z) R=r.

name: name of sphere

P: (opt) create patch representation

SURFACE -> define general surface

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1218 / 7399


NAPA for Design Manuals 2016.3

SURFACE, name type 'text'

name: name of surface to be defined

type: (opt) P=patch, G=grid, W=wireframe. Default acc. to reference system (parameter GMST) or
from installation parameters.

text: (opt) descriptive text. Apostrophes compulsory.

TGF define tangent function

TGF, name/+-axis

name: name of curve to which a tangent function is defined

/+-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.

TUBE -> define tube

A tube is created when a given transverse cross section moves along a base curve. It is
defined by the command BASE+FORM.

TUBE name 'text' P

name: name of surface

text: (opt) descriptive text

P: (opt) make it a patch surface (default=facet)

EXAMPLE:
TUBE T1
BASE B1
FORM R=0.1

UNDO undo geometric definition

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.

selection: object to be restored.

n: n:th saved object. Use the auxiliary functions to get a list.

A: all saved objects

+n: 1...n:th object

n1,n2: objects in the range n1,n2

Copyright © 1992 - 2016 NAPA. All rights reserved. 1219 / 7399


NAPA for Design Manuals 2016.3

name: last version of the given object

name,n: nt:h last version of the given object

name,a: all versions of the given object

!: (opt) needed as check against accidental use if more than object is selected

UNDO function selection

Various auxiliary functions.

function:

L: list objects in the UNDO BUFFER (index, type, name, date)

D: list definition of objects in the UNDO BUFFER

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.

UPDATE recalculate object

The shape of the given curve or surface is recalculated in order to take into account changes in
referenced curves.

UPDATE, curve1, curve2, ...

curve1...: name of curves to be recalculated

UPDATE, surface, F

surface: name of surface, the curves of which are to be recalculated

F: (opt) force=update all curves. Otherwise only curves dependent on changed ones are updated.

WO wireframe options

Options of a wireframe surface are defined

WO surface option alternatives

surface: name of the wireframe surface

option: (opt) identifier of the option

LIMIT: limiting box

EX: endpoints of x-sections

EY: endpoints of y-sections

EZ: endpoints of z-sections

GRID: use of the grid near the intersection points

EC: forcing intersections into the box of extreme coordinates

SORT: ordering data

alternatives: (opt) parameters of the option see !exp WO/G40; or !exp WO/G40 LIMIT; etc.

2. Subcommands of curve definition (CURVE)

COMBINE define curve as combination

Copyright © 1992 - 2016 NAPA. All rights reserved. 1220 / 7399


NAPA for Design Manuals 2016.3

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.

COMBINE part op part ...

part: name of partial curve

op: operation between the parts. Note: entered as a separate item.

empty: no operation, just collect the parts together

-: concatenate by joining the two nearest ends

*-: concatenate both ends

+: 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.

POL polygon through space points

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.

POL, p1, p2, ....

p1,p2: points given in one of the following ways:

(x,y,z): point given by three coordinates

curve/axis=q: point obtained by intersecting a curve

QNT arbitrary quantity

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.

QNT id value value ...

id: name of the quantity

value: value of the quantity, one or several

EXAMPLE
QNT ACODE A1

RP define reference point

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)

id: name by which the point is referred to

(x,y,z): location. May also be given by a point object

RP id #i

This form defines the reference point by reference to a definition point.

i: index of the definition, counted from the start of the curve, in the order the points appear in the
resulting curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1221 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
CURVE C1
...
RP REFPOINT (0,4,5)
PLOT RP C1

SC add side condition

As SCC command, except that the curve name is omitted.

SECTION generate curve

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.

SECTION object/section/transformation options

see !EXP GEN/G0X SECTION

SKIP cancel the curve definition

This command allows an already started curve definition to be cancelled.

THROUGH general plane as location surface

See also EXPL THR/PLANE for more alternatives.

THROUGH, (x1,y1,z1), (x2,y2,z2), (x3,y3,z3)

Defines a plane through three given points. The points can also be given by point objects.

THROUGH, (x1,-,z1), (x2,-,z2)

THROUGH, Y (x1,z1), (x2,z2)

Defines a plane parallel with a given axis (in this case y), passing two points.

X defines location surface with constant x

This command defines a location surface with constant x, so that the resulting curve is a frame
curve.

X, x

x: constant x-coordinate defined by

coord: directly given coordinate of frame number

curve/curve: intersection between two curves

point: point object (only x-coordinate used)

XY defines curve projection in the XY-plane

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.

XY, options p1, p2, .... pn

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1222 / 7399


NAPA for Design Manuals 2016.3

***: as **, but the first and the last points are endpoints of the resulting curve also.

<>: make polygon, i.e. connect given points by straights.

TOL=tol: select polygonization tolerance. Default=as defined in the reference system.

LMAX=l: select max. length of the polygon segments. May be needed if a tangent curve is
defined later.

p1,p2,...; : points on the curve

(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

(name): apply the curve reference without creating a dependence

*surface: intersect all curves in the given surface

XY ... a1/, p, /a2 ...

As above, but angle conditions added to the point p.

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.

angle: given angle in the projection

*axis=angle: angle measured in the section given by 'axis'. e.g. *X=30. The point must be
defined by a curve reference.

*: apply the tangent function defined for the referenced curve.

--: no angle condition, occasionally needed to override an implied angle

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

This form copies the projection from the given curve.

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.

XY, STERN, (24, 3.7), FRM, (67, 3.4), -90/, STEM

XYZ curve through space points

A smooth curve is fitted through the given points so that the given sideconditions are obeyed.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1223 / 7399


NAPA for Design Manuals 2016.3

XYZ points sideconditions options

points:

(x,y,z) : coordinates of point. The character '-' can be used for an unknown coordinate.

(u,v): coordinates of point in a projection. As a default the current DR projection is used.


Another projection is defined by the option X=q, Y=q or Z=q. In the DES command, the third
coordinate is marked by '-'. Only for the endpoints, the value q is used (default=0).

point : name of point object

curve/axis=q : reference to a given curve

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=param: (opt) type of parametrization

TP=0: chord length parametrization (=default, if there are no unknown coordinates)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1224 / 7399


NAPA for Design Manuals 2016.3

TP=1: chord length in projection X

TP=2: chord length in projection Y

TP=3: chord length in projection Z

TP=4: parameters = 1,2,...,n (n= number of points)

TP=5: first calculate with TP=4, then with TP=0 (=default, if there are unknown coordinates)

TC=typ: (opt) type of calculation of the curve

TC=0: all components are calculated independently (=default, if there are no angle conditions)

TC=1: calculate first projection X, then coord. X

TC=2: calculate first projection Y, then coord. Y

TC=3: calculate first projection Z, then coord. Z

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

XYZ (40,0,0) -/ (40,8,0) (40,10,2) /- (40,10,12)

Same curve as in the previous example

XYZ (0,0,0) (0,1,-) (1,1,-) (1,0,-) (0,0,-) (0,1,-) (1,1,2)

A spiral rising from the z=0 plane

XYZ (0,0,0) /*(0,1,0) *(1,0,0)/ (1,1,0)

Same as XYZ (0,0,0) /Z=90 Z=0/ (1,1,0)

xyz (0,0,0) /(0,0.1,0) (0.1,0,0)/ (1,1,0)

Instead of directions the derivatives are given. Because they are of small length, the curve is
only slightly curved.

xyz (100,1,5) /P=HULLF (102,0,5)

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).

xyz (50,10,10) /P=(0,1,0) (50,0,0)

The curve starts from a plane perpendicular to the axis y

xyz (0,0,0) (10,0,0) /ROUND=2 (10,0,10)

A user defined sidecondition

XZ define projection in the XZ-plane

see XY

Y define location surface with constant y

as in command X

YX define projection in the YX-plane

see XY

YZ define projection in the YZ-plane

Copyright © 1992 - 2016 NAPA. All rights reserved. 1225 / 7399


NAPA for Design Manuals 2016.3

see XY

Z define location surface with constant z

as in command X

ZX define projection in the ZX-plane

see XY

ZY define projection in the ZY-plane

see XY

3. Subcommands to surface definition (SURFACE)

BND boundary curves

This command defines the boundaries for the surface patches. Giving this command also
triggers the use of new preparation mode

COMBINE defines a combined surface

A combined surface is formed by a collection of partial surfaces. The collection is formed


dynamically: any operation on the collection is done on the parts and the results combined. (Cf.
suboption COMB in GENERATE). A transformation (e.g. reflection) can be applied to the parts,
and therefore a combination with one part only can be useful.

COMBINE part1(transf) part2(transf) ...

part1,.. : name of partial surfaces

(transf): (opt) transformation applied to the part. For alternatives, see !EXP TRA/GEN.

CSC calculation section curves

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.

CSC curve1 curve2 ...

curve1...: name of curves in the order of increasing x. The curves must be have constant x.

CSECT control calculation sections

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.

OUTSIDE definition of the general outside

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

The general outside is defined to be =the given halfaxis.

Example
SURFACE DECK
THR ...
OUTSIDE Z

Copyright © 1992 - 2016 NAPA. All rights reserved. 1226 / 7399


NAPA for Design Manuals 2016.3

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

Options controlling preparation.

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 reflect surface

REF surface

RP define reference point

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)

id: name by which the point is referred to

(x,y,z): location. May also be given by a point object

SND secondary curves

This command defines the set of secondary curves. Meaningful only when combined with the
BND command

SYM symmetry for area calculations

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 defines surface through a set of curves

THROUGH curve1,curve2,...

curve1,...: name of curves

THROUGH arr()

Curve names passed in the string array 'arr'.

TRIM commands to generate surfaces: TRIM etc.

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.

TRIM surface limitation options

see !exp GEN/G0X TRIM

WO wireframe options

Options that control the plane sections of the wireframe surfaces are defined.

LIMIT limiting box

LIST2 list user defined options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1227 / 7399


NAPA for Design Manuals 2016.3

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.

limits: a limiting box given by x>xmin, y<xmax etc., or by six numbers


xmin,xmax,ymin,ymax,zmin,zmax where the - character can be used for a dummy limit.

OFF: no limits are used (default)

Examples:
WO LIMIT Y>0;
WO LIMIT - - 0 - - -;
WO LIMIT OFF;

EX endpoints of x-sections

WO EX endpoints

---------------

Endpoints of the x-sections are defined. An intersection point is always classified as an


endpoint if the intersected curve has the sidecondition E, or if such a classification can be
infered from the structure of the grid (WO GRID on is required). Additional endpoints are
defined here.

endpoint: additional endpoint

OFF: no additional endpoints (default)

SYM: points at the symmetry plane y=0

UMIN: point with the minimum y-coordinate

VMIN: point with the minimum z-coordinate

UMAX: point with the maximum y-coordinate

VMAX: point with the maximum z-coordinate

US: extreme coordinates of the surface in y-direction

VS: extreme coordinates of the surface in z-direction

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1228 / 7399


NAPA for Design Manuals 2016.3

Examples:
WO EY SYM VMIN US/VMIN; ** default
WO EZ OFF;

GRID use of the grid data

WO GRID status TOL=tol

----------------------

Use of the grid data near the intersection points.

status: use of the grid data

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)

OFF: the grid data is not used

TOL=tol: (opt) tolerance (default: GMTOL)

EC use of the extreme coordinates of the surface

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

SORT ordering data

WO SORT axis qmin qmax rule

---------------------------

An ordering rule of a plane section is defined. There can be any number of such rules for a
surface.

axis: type of the plane section (=X,Y or Z)

qmin: (opt) lower limit of the coordinate axis

qmax: (opt) upper limit of the coordinate axis

rule: ordering rule

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.

WO SORT axis OFF

No ordering data is used (default)

axis: (opt) type of the plane section (=X,Y,Z)

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1229 / 7399


NAPA for Design Manuals 2016.3

LIST list current values of the options

WO LIST

-------

List current values of the options

WO

--

Show values of those options that have been defined by the user.

RESET set back default values of the options

WO RESET

--------

The program defaults of the options are reset.

4. Subcommands to definition of planes (PLANE)

THROUGH arbitrary plane

This command defines a plane passing through given points or a given curve. Some special
syntaxes can also be used.

THROUGH (x1,y1,z1) (x2,y2,z2) (x3,y3,z3)

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.

THROUGH axis (u1,v1) (u2,v2)

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.

THROUGH axis (u,v) a

As above, but the second point is replaced by the angle measured in the plane normal to the
axis.

THROUGH (x,y,z) (v1,v2,v3) -

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.

THROUGH draught trim heel

Copyright © 1992 - 2016 NAPA. All rights reserved. 1230 / 7399


NAPA for Design Manuals 2016.3

Defines the plane corresponding to the seawater plane of the given floating position.

X plane with constant x

X x

x: x-coordinate of the plane

q: coordinate given as number for #-reference

name: name of point object or curve. The x-coordinate of the first point is taken.

Y plane with constant y

Analogically with X

Z plane with constant z

Analogically with X

5. Special surfaces

5.1. Subcommands of cylinders (CYL,DCYL)

AXIS define axis

The record defines a straight line between given points forming the axis of the cylinder.

AXIS (x1,y1,z1), (x2,y2,z2) L1=l1 L2=l2

This form defines the axis by two points.

(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.

AXIS (x1,y1,z1), (x2,y2,z2) l1 l2

As above but without identifiers. If one length only is given, it is interpreted as l2.

(x,y,z) direction L1=l1 L2=l2

This form defines the axis by a start point and a direction. The item l2 is compulsory in this
case.

(x,y,z): (opt) startpoint, default (0,0,0)

direction: direction of the straight

X,Y or Z: direction of the given axis

phi/theta: angle from x-axis and angle over xy-plane

l1: (opt) distance from startpoint to start of the cylinder. Identifiers optional as above.

l2: distance from startpoint to endpoint

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))

BASE define base

Copyright © 1992 - 2016 NAPA. All rights reserved. 1231 / 7399


NAPA for Design Manuals 2016.3

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

The base is defined by the given curve.

curve: name of curve

nr: (opt) select the n:th branch (default=1)

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.

CLOSE close the surface

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.

FORM define cross section

This record defines the cross section as it appears in the normal plane to the axis.

FORM R=r

--------

Defines the form to be a circle with given radius

FORM RECT=(lu,lv)

----------------------

Rectangle with sides lu,lv and reference point in the middle. A square can be defined as
SQ=lu.

FORM curve orientation

----------------------

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.

curve: name of a plane curve

orientation: (opt) orientation of the form, see below

FORM (u1,v1), (u2, v2), ... options

---------------------------------------

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.

(u,v): points in the uv-space

orientation: (opt) orientation of the form

Copyright © 1992 - 2016 NAPA. All rights reserved. 1232 / 7399


NAPA for Design Manuals 2016.3

FORM / (u1,v1) (u2,v2) R=r orientation

--------------------------------------

A rectangular box (with optionally rounded corners) is defined.

(u1,v1): lower left corner

(u2,v2): upper right corner

R=radius: (opt) the four corners are rounded with the given radius

orientation: (opt) orientation of the form

FORM profile options

--------------------------

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.

(u,v): startpoint of the contour, default=(0,0)

angle: turn the profile the given angle

FORM form orientation

---------------------

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.

form: a form specification in one of the forms above.

orientation: (opt) orientation of the form

U=dir: target direction for the u-xis (dir=X,Y,Z,-X,-Y,-Z)

V=dir: target direction for the v-axis

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

GENERATOR define generator

This record defines the generator of the cylinder, giving a shape which moves along the base.

GENERATOR (x1,y1,z1), (x2,y2,z2) L1=l1 L2=l2

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.

(x1,y1,z1), (x2,y2,z2): Endpoints of the straight, can be given by point objects.

l1,l2: optional, as for AXIS

Copyright © 1992 - 2016 NAPA. All rights reserved. 1233 / 7399


NAPA for Design Manuals 2016.3

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.

SKIP cancel the definition

X start definition of curve with constant x.

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.

5.2. Subcommands of pyramid (PYR)

AXIS define axis

The record defines a straight line, such that the base of the pyramid is placed at the startpoint
and the top in the endpoint.

AXIS (x1,y1,z1), (x2,y2,z2) L1=l1 L2=l2

This form defines the axis by two points.

(x1,y1,z1): location of the base. It can also be given by a point object.

(x2,y2,z2): location of the top.

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.

AXIS (x1,y1,z1), (x2,y2,z2) l1 l2

As above, but without identifiers for l1, l2. If one length only is given, it means l2.

(x,y,z) direction L1=l1, L2=l2

This form defines the axis by it startpoint, direction and distance to the endpoint.

(x,y,z): (opt) startpoint, default (0,0,0)

direction: direction of the straight

X,Y or Z: direction of the given axis

phi/theta: angle from x-axis and angle over xy-plane

L1=l1: (opt) as above

L1=l2: as above, but compulsory in this case

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 three alternatives are equivalent.

AXIS (0 0 0) (0 0 10) L1=1 L2=5

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.

BASE define base

Copyright © 1992 - 2016 NAPA. All rights reserved. 1234 / 7399


NAPA for Design Manuals 2016.3

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

The base is defined by the given curve.

curve: name of curve

nr: (opt) select the n:th branch (default=1)

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.

CLOSE close the surface

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.

FORM define cross section

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

FORM curve options

Defines the form by reference to a curve. The curve must be a plane curve.

FORM (u1,v1), (u2, v2), ... options

FORM / (u1,v1) (u2,v2) options

A rectangle box (with optionally rounded corners) is defined.

SKIP cancel the definition

TOP defines the top of a pyramid

TOP (x,y,z) q1, q2

(x,y,z): coordinates of the top, can be given by a point object.

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

X start definition of curve with constant x.

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.

5.3. Subcommands of connection surface (CNS)

BASE define base

Copyright © 1992 - 2016 NAPA. All rights reserved. 1235 / 7399


NAPA for Design Manuals 2016.3

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.

BASE name nr <

The base is defined by the given curve.

curve: name of curve

nr: (opt) select the n:th branch (default=1)

<: (opt) turn the curve so that endpoint/startpoint change role. Not available with the patch option.

CLOSE close the surface

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.

MDP match definition points (obsolete)

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.

SKIP cancel the definition

X start definition of curve with constant x.

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.

5.4. Subcommands of rotation surface (ROT)

AXIS define axis

The record defines a straight line forming the rotation axis.

AXIS (x1,y1,z1), (x2,y2,z2) ANGLE=a, DIV=n

This form defines the axis by two points.

(x1,y1,z1): Startpoint of the axis. The point can also be given by a point object.

(x2,y2,z2): Endpoint of the axis.

ANGLE=a: (opt) defines the rotation angle, default=360 degrees.

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.

AXIS (x1,y1,z1), (x2,y2,z2) angle div

As above, but without identifiers. A single value is interpreted as 'angle'.

(x1,y1,z1) direction ANGLE=a, DIV=n

This form defines the axis by it startpoint, direction and distance to the endpoint.

(x1,y1,z1): (opt) startpoint, default (0,0,0)

direction: direction of the straight

X,Y or Z: direction of the given axis

phi/theta: angle from x-axis and angle over xy-plane

Copyright © 1992 - 2016 NAPA. All rights reserved. 1236 / 7399


NAPA for Design Manuals 2016.3

ANGLE=a : (opt) as above

DIV=n: (opt) as above

EXAMPLES
AXIS (75 -8 3) (75 8 3)
AXIS Y; AXIS (0 0 0) (0 12 0); AXIS (0 0 0) 90/0 12

The three alternatives are equivalent.

AXIS (0 0 0) (0 0 10) ANGLE=180

The rotation is 180 degrees around the given axis.

BASE define curve to be rotated

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

curve: name of curve

nr: (opt) select the n:th branch (default=1)

CLOSE close the surface

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.

FORM define rotated form with respect to the axis

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.

FORM (u,v), (u,v), ...

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.

curve: name of curve

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 example uses a predefined curve named RPROFILE.

SKIP cancel the definition

X start definition of curve with constant x.

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.

5.5. Subcommands of facet surface (FCS)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1237 / 7399


NAPA for Design Manuals 2016.3

FAC vertices of facet surface

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.

FAC point points ... *

point: node point given in one of the ways presented below. Prefix * makes the point a double one.

(x,y,z): explicit point

curve/axis=q: given point on a curve

point: name of point object

*: (opt) close the set by repeating the first point.

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;

POL define facet by explicit polygon

The POL command adds a facet directly given by coordinates on a plane.

POL axis=q (u,v) (u,v), ...

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.

POL axis=q / (u1,v2) (u2,v2)

This form defines a rectangle represented by its diagonal.

SKIP exit without storing

THROUGH surface from set of planes

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.

THR axis=(q1,q2) plane1, plane2, ... * CLOSE

axis: X, Y or Z, the third direction

(q1,q2): (opt) limitation along this axis, default=0...HMAX

planei: planes forming the parts.

planei: plane, name of plane or axis=q. The facets are formed by

Copyright © 1992 - 2016 NAPA. All rights reserved. 1238 / 7399


NAPA for Design Manuals 2016.3

axis=q: coordinate plane, e.g. y=12

name: name of separately defined plane

(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).

TRIANGLES generate triangular faces

This command causes SUBSEQUENT faces to be subdivided into triangles. Default=make four
sided triangles. This command should normally be

TURN change direction of outside

TURN;

normal of facets determined before command TURN is changed

5.6. Subcommands of tube surface (TUBE)

BASE define base

This record defines a space curve serving as the reference curve along which the origin of the
form curve is placed.

BASE curve nr

The base is defined by the given curve.

curve: name of curve

nr: (opt) select the n:th branch (default=1)

CLOSE close the surface

This command specifies that the end shall be considered part of the surface, making it closed.
This requires that the form curve is closed.

FORM define cross section

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

FORM curve options

Defines the form by reference to a curve. The curve must be a plane curve.

FORM (u1,v1), (u2, v2), ... options

FORM / (u1,v1) (u2,v2) options

A rectangle box (with optionally rounded corners) is defined.

SKIP cancel the definition

Copyright © 1992 - 2016 NAPA. All rights reserved. 1239 / 7399


NAPA for Design Manuals 2016.3

X start definition of curve with constant x.

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.

5.7. Additional commands

CLOSE close the surface

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.

CSE instructions for calculation sections

See !EXP CSE/G0X

MDP match definition points

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.

OUTSIDE define orientation

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

Reverse inside and outside without changing the classification.

QNT arbitrary quantity

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.

QNT id value value ...

id: name of the quantity

value: value of the quantity, one or several

EXAMPLE
QNT ACODE A1

RC define reference coordinate

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1240 / 7399


NAPA for Design Manuals 2016.3

RP define reference point

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)

id: name by which the point is referred to

(x,y,z): location. May also be given by a point object

SKIP cancel definition

The definition currently being made is cancelled.

SYM symmetry for area calculations

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.

TOL tolerance for simplifying operand curves

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

tol: tolerance. Special case: 0: no simplifying except for doubled points.

TRIANGLE treat the surface as a set of triangles

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.

6. Subcommands to room definition (ROOM)

ADD defines a geometric addition

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

Parameters are same as in the LIMITS command

COMBINE define combined object

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.

COMBINE part1 part2 ...

Copyright © 1992 - 2016 NAPA. All rights reserved. 1241 / 7399


NAPA for Design Manuals 2016.3

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.

COMBINE q1*part1 q2*part2 ...

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()

The objects in the given array are added.

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

CSC calculation section curves

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.

CSC curve1 curve2 ...

curve1...: name of curves in the order of increasing x.

CSECT control of calculation sections

See !EXPL CSE/G0X. (Rooms only).

DMAX tolerance for section generation

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

FEATURE additional geometric feature

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

id: name of the feature

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)

The feature is defined by a point given directly.

FEATURE HATCH R123.HATCH

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.

H HB=hb HT=ht HD=hd

Copyright © 1992 - 2016 NAPA. All rights reserved. 1242 / 7399


NAPA for Design Manuals 2016.3

HB=hb: (opt) height for section for bottom area.

HT=ht: (opt) height for top section.

HD=hd: (opt) nominal deck height, default=zmax-zmin

LIMITS defines an elementary room

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

LIMITS, limit1, limit2, ....options;

limit: limit specified by a surface and the side on which the room is located. The alternatives for the
surface are:

name: name of separately defined surface

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:

-name: stands for the reflected surface (about y=0)


+name: stands for the reflected surface + the unreflected one
(q): as q (=explicit coordinate) but only for providing the
coordinate limit in this direction
(name): as 'name', but only for telling the system that the
room is limited by the surface in this dir. also
curve/axis=q: stands for the coordinate obtained as indicated,
which is used as a coord. in parentheses.
name(transf): general transformation applied to the given
surface (see expl TRA/GEN). Using room(transf), a room
may
be defined as a transformation of another one (see examples).

options: (surface objects only):

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)

LIMITS <> limit1 limit2 ...

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1243 / 7399


NAPA for Design Manuals 2016.3

(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

OK: explicit finishing the definition

Any command not belonging to the context has the same effect.

OUTSIDE specify orientation

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.

QNT arbitrary quantity

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.

QNT id value value ...

id: name of the quantity

value: value of the quantity, one or several

EXAMPLE
QNT ACODE A1

RC define reference coordinate

Defines the reference coordinate (surface objects only). The

RC axis=q

axis: X, Y or Z, defines the axis.

q: reference coordinate

REDUCT defines a geometric reduction

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.

Parameters are same as in the LIMITS command

REFLECT reflect room

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1244 / 7399


NAPA for Design Manuals 2016.3

RP define reference point

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)

id: name by which the point is referred to

(x,y,z): location. May also be given by a point object

EXAMPLE
ROOM R1234
...
RP MANHOLE (#BH1+1 0 #DECK2)
PLOT RP R1234

SKIP skip the definition

The current definition is cancelled.

SYMMETRIC add the symmetric part

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

ASSUME define assumed object

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

name: name of the assumed object

AUTO automatic drawing on/off

This command specifies whether to draw changed curves automatically.

AUTO ON/OFF/A

ON: set automatic drawing on (default). Concerns only the the curves explicitly changed.

A: as ON, but also during automatically started updates

OFF: cancel automatic drawing

AUTO /OFF/

OFF: (OPT) cancel AUTO

CANCEL cancel temporary definitions

CANCEL ALL

Cancel all current temporary definitions. A faulty object not accepted into the obj. administration
will not be noticed.

CANCEL obj1, obj2 ...

Cancel named temporary objects.

CATALOG catalog of stored objects

A catalog of objects stored in the data base is listed.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1245 / 7399


NAPA for Design Manuals 2016.3

CATALOG selection options

Normal catalog function, see !EXPL SEL/GEN.

CATALOG selection LOAD

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.

CNV convert to new format

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.

CNV OLD name, name ...

Convert named objects.

CNV OLD ALL

Convert all objects in the current version. This command will also cause the version to be
registered as belonging to level D.

COPY copy objects

This command copies objects inside the current version or from other projects or versions.

COPY oldname newname !

Copy a single object within the current version.

oldname: current name of the object

newname: name of the copy. The operation is not allowed if 'newname' is locked.

!: (opt) needed if the object 'newname' already exists

COPY objects FROM version/project options

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.

version: source version

/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.

!!: copy even if object of different type exists

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1246 / 7399


NAPA for Design Manuals 2016.3

EXAMPLES
COPY FRF FRFOLD

Make a copy of FRF named FRFOLD

COPY **HULL FROM A/P1234 !

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 ****ARR*A FROM B !!

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).

DESCRIPTION print definition data of object

By this command, a description of given objects is printed in the same form as given in the
definition. See also command EDIT.

DESCRIPTION, objects /version opt

objects: object or set of objects given one of the following forms:

obj1,obj2,...: objects listed by name

(cpart,i1,i2,di): series such as X1,X2,X3...

*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).

/version: (opt) get the objects from the given version

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.

!: convert generated curves with default options

!!: display evaluated number results instead of the parametric variables. See command PDEF.

TOL=tol: tolerance for conversion (default=GMTOL)

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.

AC=E: add angle conditions to endpoints

AC=K: (xyz-curves) add directions at endpoints and knuckles

AC=O: (xyz-curves) omit directions

ATOL=val: (xyz-curves) smallest nonzero component allowed in the normalized direction


vector. The corresponding angle is given here in degrees (default: ATOL=1).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1247 / 7399


NAPA for Design Manuals 2016.3

KTOL=val: tolerance for knuckle detection in degrees

LOC=OFF: (default) general space curves -> xyz curves

LOC=ON: general space curves -> location surface + shape definition

LOC=plane: plane of location surface (plane=1,2 or 3)

SHAPE=plane: plane of shape definition (plane=1,2 or 3)

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.

REF=list(): add references to the curves in the list

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

FIX=axis,coordinates: keep intersections with the axis=coordinate planes e.g. FIZ=Z (1 20 1)

DEC=n: max number of decimals in the definition form (default=3). Note: has no effect on
XYZ-curves (they have always 3).

ORD=0: (default) use ** ordering in all curves

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

ORD=3; use always * ordering

MAXITE=n: max. number of iterations allowed (default: 5)

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

EDIT -> enter description to the editor

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 +

objects: selection of objects as in the DES command

NL: (opt) (nolist) do not list automatically

+: (opt) ADD the result to the current contents of the work area, default=replace the current
contents

INFO information about objects

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1248 / 7399


NAPA for Design Manuals 2016.3

INFO objects CALC t-options

objects: (opt) selection of objects, default=the one selected for intersecting, if any, otherwise all objects
in memory.

name,...: named objects

*name: the given object and its components

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.

t-options: (opt) standard table output options (see !EXPL TOO/GEN).

LIST list curve

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

T: (opt) list angles from tangent functions, if any

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.

LOCK locking objects against changes

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 OFF objects

Removes the lock on the given objects.

LOCK CANCEL

Cancel all locks.

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.

LQ selection of output quantities

Copyright © 1992 - 2016 NAPA. All rights reserved. 1249 / 7399


NAPA for Design Manuals 2016.3

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.

The following concerns the INFO command.

For length quantities (e.g. CGX), a reference coordinate can be given as qualifier (coordinate
value or 'XREF', e.g. LQ ... CGX/XREF ...).

A few notes about some result quantities:

SS (section status): *=calculation sections up to date


x=calculation sect. done but not up to date
empty=no calc. sect available
E: object faulty
e: calculation sections could not be done
!: failed update attempt done
For surface objects, the status
refers to the generated facet object.
SDATE: date of calculation sections or last try
to generate these
ORNT (orientation): X=transversal,Y=longitudinal,Z=horizontal
C=closed, empty=undefined
GTYPE: geometric main type (surface, room or
surface object).
GSTYPE: geometric subtype, distinguishes different
types within a given main type (e.g. PLANE
as subtype of SURFACE). If no subtype is asked
for, GTYPE is given more specifically.

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

For example, LQ EC selects all extreme coordinates.

For LQ CUR, note:

- Quantities TSX,TSY and TSZ are available for curves having


a tangent function.
- Quantity ANG is the inclination of a projection, that can be
selected independently of the curve type, given as the
qualifier (i.e. ANG/X, ANG/Y, ANG/Z).

For LQ NODE, note:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1250 / 7399


NAPA for Design Manuals 2016.3

- 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 columns 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, PV, VNX, VNY and VNZ
the following qualifier can be used to define the patch where
the quantity is calculated:
Si: the i'th patch intersecting at the point is used.
(default=S1)
- Quantities FV, FVX, FVY, FVZ, FCP, FCF are related
to a function on the surface.
For FV, function name is given by a qualifier FV/name.
In the other cases, name of the function is the same as name
of the quantity.

NLIST list points on patch surface

LQ NODE and TOO controlled listing function for patch surfaces. Available quantities are listed
by LQ NODE ALT.

NLIST surface selection options

List information about a patch surface at the selected points

surface: name of a surface

selection: (opt) selection of points. As a default all node points i.e. intersection points between the grid
curves are listed.

curves: node points lying on the given curves

points: points (u,v) digitized in the current projection

patches: corner points of the given patches

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: corner points of subdivided patches, n= degree of subdivision

EQP=*n: as above, but points in boundary of the original patch are omitted.

patch/(u,v): parameters of a patch

options:

+TAB*table: table where the result is stored

>TAB*table: as above, but no listing is done

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

LQ NODE NR X Y Z TSX TSY TSZ CSX CSY CSZ;

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.

LQ NODE NR X ANG(before)/Z11 ANG(after)/Z12;

Copyright © 1992 - 2016 NAPA. All rights reserved. 1251 / 7399


NAPA for Design Manuals 2016.3

NLIS HULLA WL1A; inclinations of the curve in the projection z are calculated before and after
the node points.

LQ NODE X Y Z PN/S1 PN/S2; NLIS HULLA 3 4;

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.

RENAME rename objects

This command renames objects in the data base, and optionally corrects any references to
them

RENAME oldname newname !

oldname: current name of the object

newname: new name The operation is not allowed if 'oldname' or 'newname' is locked.

!: (opt) needed if the object 'newname' already exists

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.

RMV remove objects from the run time memory

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.

RMV name options

Remove selected object(s) only.

name: name of object

options: (opt)

P: if combined object, include its parts also

PP: include any objects referenced by the given one and not referenced by any remaining
object.

C: check only: list the objects that would be removed

Copyright © 1992 - 2016 NAPA. All rights reserved. 1252 / 7399


NAPA for Design Manuals 2016.3

L: list objects removed. Implied by C

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.

S: make no error message for failed removal

K: keep copies in the form of named descriptions in the free storage

SELECT list of objects into array

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.

SELECT objects type

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

As above, but keep only points and curves.

SRV -> enter services subtask

TEMP temporary mode

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

TOO set table output options

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 delete objects from the data base

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.

8. Special definition commands

-CFS compress facet surface

facet or general surface is converted into a compressed facet surface

CFS sur1 sur2

sur1: name of surface to be compressed

Copyright © 1992 - 2016 NAPA. All rights reserved. 1253 / 7399


NAPA for Design Manuals 2016.3

sur2: name of result

-SFG subfacet generator

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'.

SFG surface type

surface: name of surface

type: type of division

F n : each edge of surface patch is divided into n parts

F4 n : as above, but each subfacet has four edges

C tol : number of subdivisions is based on curvature of patches boundary. Maximum distance


from boundary to facet surface is approximately tol.

SFG surface OFF

Cancel subfacet generation

SFG surface type NAME=surface2 option

General surface is converted into general facet surface

surface2: name of general facet surface

option: (opt)

as a default the result is a compressed facet surface

NC: the result is a general facet surface without compression

CANCEL cancel temporary definitions

CSECT control generation of calculation sections

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.

Discontinuities defined for an object will be transferred to objects where it is used.

CSECT object *x1, **x2,

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).

CSECT object (n)

CSECT object (n1,x1,n2,x2,...nn)

These forms defines the number of sections to be generated and (optionally) discontinuities.

object: as above.

n: number of sections for the whole object

n1,n2: number of sections differently for each x-intervals.

x1,x2,...: limits for the x-intervals. The x-values may be preceded by asterisks as described above for
defining discontinuities.

CSECT >n

Copyright © 1992 - 2016 NAPA. All rights reserved. 1254 / 7399


NAPA for Design Manuals 2016.3

Defines the minimum number of sections: this defines the initial set, which may be extended if
accuracy requires it.

CSECT object ... PT=d

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)

where z1, z2 are the heights where the thickness changes.

CSECT object ...option

Setting various options

option: one or several of:

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 -

Cancels previous CSECT command for the given object.

CSECT object ... thickness N

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=d: use thickness d (option N required for the new method)

PT=STR*model: use thicknesses of column PLTH of the STR*model

PT=*: use parameter SHELL of the reference system

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)

DRM Define draughtmarks

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

curvea: curve on which the aft draughtmarks are.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1255 / 7399


NAPA for Design Manuals 2016.3

inta: interval for the marks at 'curvea'

textha: text height for the marks at 'curvea'. 'inta' and 'textha' can be omitted if they are the same as
'int'. 'texth'.

curvef: Curve on which the fore draughtmarks are.

int: interval for the marks on 'curvef' or both

texth: text height on 'curvef' or both.

min,max: (opt) height range in the given unit

unit: unit of the draughtmarks

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

FAIR fair curve

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.

FAIR curve tol points direction SAVE=name M L

curve: name of curve to be faired

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.

PP: primary points only (excluding endpoints)

direction: (opt) direction into which points are moved, default=coordinate direction nearest to the curve
normal.

X,Y,Z: given coordinate direction

N: at right angles (in projection plane).

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.

M: (opt) mark the tolerances in the drawing

L: (opt) list corrections applied to the points

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.

FAIR WL2F 0.05 PP Y SAVE

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.

FTC font to curve

A text is stored as a curve in the space coordinate system for the purpose of being in drawn in
3D.

FTC curve text axis=q P=(u,v) H=h FONT=font REF FILL

Copyright © 1992 - 2016 NAPA. All rights reserved. 1256 / 7399


NAPA for Design Manuals 2016.3

curve: name of curve created

text: the text

axis=q: (opt) plane, axis=X, Y or Z, q=coord. of the plane default: X=0

P=(u,v): (opt) starting point in the given plane, default (0,0)

H=h: (opt) text height, default 1

FONT=font: (opt) font, default EL. The font must available under this name in the sysdb or napadb (logical
fonts not available).

REF: (opt) reflect about v-axis at given u.

FILL: (opt) select font version designed for filling

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).

GENERATE generate object

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:

GEN name object/section/transf section


GEN CSE name options calculation sections
GEN name TRIM surface limitation trimmed surface
GEN name CTRIM surface curve trim with curve
GEN name LIMIT surface limits limit as surface object
GEN name PLIMIT surface limits limit by planes
GEN name PATCH surface convert to patch
surface
GEN name FACET surface convert to facet
surface
GEN name BOUNDARY surface boundary of surface
GEN name OFFSET surface D=offset offset surface
GEN name WAVE wave-name t (n) surface from wave
GEN name B5 hull t opt b5-limit as surface
GEN name MAX axis curve1 curve2 envelope curve
GEN name COMB surf1 surf2 ... combined surface
GEN name EQP surface options curves of nurbs surface
GEN name CSCURVE room options curves from calc.
sections
GEN name MERGE curve merge closed branches

SECTION Section

GEN name object/section/transformation options

----------------------------------------------

An intersection is calculated

name: name of the result (same in the other forms)

object: object to be modified, may be a surface, room or surface object.

/section: (opt) intersection operation

axis=q: intersect with coordinate plane

Copyright © 1992 - 2016 NAPA. All rights reserved. 1257 / 7399


NAPA for Design Manuals 2016.3

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 curve (patch and facet surfaces only)

*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.

A,F,S,P,B,T: side of room (only the simplest cases implemented)

/transformation: (opt) reflection, translation etc. specified as described under !EXPL TRA/GEN. Only for plane
sections.

options:

MERGE: merge separate, closed branches, e.g. when intersecting ARR*A

S: make surface instead of curve (only for sections with closed objects)

C: make curves instead of surface (for room/surface)

DREC: add direction to the result for use of SB-link (patch surface / plane, cylinder or patch
surface).

DES=s: a short description of the object

!: allow overwriting of object of different type.

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

CSE Calculation sections

GEN CSE name options

--------------------

Explicit starting of calculation section generation.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1258 / 7399


NAPA for Design Manuals 2016.3

TRIM Trimmed patch surface

GEN name TRIM surface limitation options

----------------------------------------

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.

name: name of the resulting patch surface

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.

TOL=tol: (opt) tolerance for the boundary of a trimmed patch (default=GMTOL)

BTOL=btol: object specific combination tolerance of patch-sections. The global default is controlled by !GM
BTOL btol, and defaulted to 0.001.

SYM: (opt) apply symmetry in area oriented calculations

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):

ALL: all checks with all patches

ONERR: show detected errors only

name: object name

i: patch number

T: check trimming of intersected patches

E: check the process of elimination

STYP=alt: (opt) type of the result

314: standard form of generated patch surfaces (defaulted when there are less than 1400
patches)

312: form of preparable patch surface

DES=s: (opt) a short description of the object

!: (opt) allow overwriting of object of different type

MODE=opt: (opt) mode of operation The following characters in opt are available:

O: use the older trimming method

N: (default) use the newer tpl-based trimming method

NN: as above, but list data for debugging

-E: do not add surface boundaries to the tpl-model; this option can be used if the trimmed
region is totally inside the surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1259 / 7399


NAPA for Design Manuals 2016.3

-P: skip the nurbs->patch conversion in the tpl-based trimming

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

CTRIM Trimming by a curve

GEN name CTRIM surface curve options

-------------------------------------

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.

surface: surface to be trimmed

curve: a closed curve lying on the surface

TYPE=alt: (opt) representations of the surface

TYPE=+NURBS: (default) patch and nurbs

TYPE=-NURBS: patch

TYPE=NURBS: nurbs

LIMIT Simulated surface object

GEN name LIMIT surface limits options

-------------------------------------

Internally a surface object with one LIMIT command is generated, but the result is expressed
as a general facet surface.

name: name of the resulting 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.

limits: as in the LIMIT command of surface objects

SYM: (opt) apply symmetry in area oriented calculations

TOL=tol: tolerance for the facet surface conversion (default=10*GMTOL)

DES=s: (opt) a short description of the object

!: (opt) allow overwriting of object of different type

Copyright © 1992 - 2016 NAPA. All rights reserved. 1260 / 7399


NAPA for Design Manuals 2016.3

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

PLIMIT Plane limitation of a facet surface

GEN name PLIMIT surface limits options

------------------------------------------

A facet surface is limited with a set of planes.

name: name of the resulting facet surface

surface: an object to be restricted.

limits: plane limits defined by axis<q, axis<plane etc.

SYM: (opt) apply symmetry in area oriented calculations

TOL=tol: tolerance for the facet surface conversion (default=10*GMTOL)

DES=s: (opt) a short description of the object

!: (opt) allow overwriting of object of different type

EXAMPLE:
GEN bh1p PLIMIT bh1 z<5 z>pla1 DES='part of a bh'

PATCH Conversion to patch surface

GEN name PATCH surface options

------------------------------

An object of NAPA is converted into a patch surface

name: name of the resulting patch surface

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.

selection: (opt) selection of patches

P=i: patch number

P=-i: all but the given patch

ALL: all patches

(i/n): patch i subdivided into n*n parts

(ALL/n): all patches subdivided into n*n parts

(sel1,...,seln): a set of selections

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1261 / 7399


NAPA for Design Manuals 2016.3

DES=s: (opt) a short description of the object

BTOL=btol: object specific combination tolerance of patch-sections. The global default is controlled by !GM
BTOL btol, and defaulted to 0.001.

!: (opt) allow overwriting of object of different type

EXAMPLES:
GEN DECKP PATCH DECK DES='patch repr. of a deck'
GEN HULLP PATCH HULL P=(1,4/2)

FACET Conversion to facet surface

GEN name FACET surface options

------------------------------

An object of NAPA is converted into a facet surface

name: name of the resulting facet surface

surface: an object of NAPA

TOL=tol: (opt) tolerance for the conversion (default= 10*GMTOL)

EQP=n: (opt) each patch is subdivided into n*n facets

EN=n: (opt) max. number of points in a facet is n+1

DES=s: (opt) a short description of the object

!: (opt) allow overwriting of object of different type

EXAMPLE
GEN HULLAF FACET HULLA TOL=0.1 DES='hulla faceted with a tolerance'

BOUNDARY Boundary of a surface

GEN name BOUNDARY surface options

---------------------------------

The boundary curve of a surface is created.

name: name of the result curve

surface: name of a surface

TOL=tol: (opt) tolerance for the boundary (default= GMTOL)

DES=s: (opt) a short description of the curve

!: (opt) allow overwriting of object of different type

EXAMPLE:
GEN B BOUNDARY HULL DES='boundary of hull'

OFFSET Offset surface

GEN name OFFSET surface D=offset options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1262 / 7399


NAPA for Design Manuals 2016.3

----------------------------------------

An offset surface i.e. a surface translated along the surface normal is created.

name: name of the resulting patch surface

surface: name of the original surface

D=offset: distance between the two surfaces Only small offsets that can be done without changing the
patch structure are allowed.

DES=s: (opt) a short description of the object

BTOL=btol: (opt) object specific combination tolerance of patch-sections. The global default is controlled by
!GM BTOL btol, and defaulted to 0.001.

!: (opt) allow overwriting of object of different type

EXAMPLE:
GEN HULLO OFFSET HULL D=+0.1 DES='a larger surface within distance
0.1'

WAVE Object representing wave

GEN name WAVE wave-name t (n)

-----------------------------

This form makes a surface from a wave defined for calculations. Wave inclinations over 60
degrees are ignored.

name: name of result

wave-name: name under which the calculation wave is defined

t: (opt) draught (=height of wave midline), default design draught

(n): (opt) take only every n:th point on the wave

DES=s: (opt) a short description of the object

!: (opt) allow overwriting of object of different type

EXAMPLE:
GEN WAVE-SURFACE WAVE WAVE1

B5 B/5 surface

GEN name B5 hull t B/q DES=s opt !

----------------------

This form makes a surface representing the b/5 limit or variations of it.

name: name of result

hull: name of hull surface from which to generate the b/5 curve

t: draught for intersecting b/5 curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1263 / 7399


NAPA for Design Manuals 2016.3

B/q: (opt) allows use of other fraction, e.g. B/7

DES=s: (opt) a short description of the object

opt: various options (one string)

S: make symmetric

C: make symmetric and closed

H: extend the surface to HMAX (as defined in the reference system)

Y: allow the surface to cross y=0, default=clip at y=0

N: generate a surface without any translation inside

!: (opt) allow overwriting of object of different type

EXT Extremes of curve set

GEN name MAX axis curve1 curve2 ... options

-------------------------------------------

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.

name: name of result

axis: defines the coordinate (x, y or z)

curve...: the operand curves

options:

DES=s: a short description of the curve

TOL=tol: tolerance used for cleaning redundant points, default=GMTOL. Minimum distance
between arguments=5*tol.

!: allow overwriting of object of different type

COMB combined surface

This form is otherwise similar with a normal combined surface, but the result is a self-contained
object represented as a facet surface.

GEN name COMB part(transf) part(transf) ...

-------------------------------------------

name: name of the result

part: name of partial surface

(transf): (opt) transformation, see !EXPL TRA/GEN for alternatives. (The parentheses are part of the
syntax).

EQP Equiparameter curves of nurbs surface

GEN target EQP source options

-----------------------------

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1264 / 7399


NAPA for Design Manuals 2016.3

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.

TOL=tol: (opt) tolerance of the conversion (default: GMTOL)

P=dir: (opt) direction of curves 1,2: along the 1st or the 2nd parameter direction; 0= both directions

!: (opt) allow overwriting existing objects with the same name

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

GENERATE name CSCURVE room restr options

This form generates a curve or a surface from the calculation sections of an object.

name: name of result

room: source of the calculation sections

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

options: (separate items)

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.

Y: generate curve representing the profile in y=0. Analogically Z

DD: flag separate parts (see GM.CSEXTRACT).

HLE enter test environment for the hull editor

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.

MC -> modify curve

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.

OUTSIDE define outside/orientation

Copyright © 1992 - 2016 NAPA. All rights reserved. 1265 / 7399


NAPA for Design Manuals 2016.3

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 !

name: name of surface

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

C: define the surface to be closed (accepted without checking the geometry).

R: (reverse) change inside to outside and vice versa (without changing the classification).

RC: same as R and C combined

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.

QNT define/change quantity

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.

QNT name id value value ...

name: name of the object

id: name of the quantity (defined in the quantity standared)

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()

RC define reference coordinate

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)

axis=: axis, may be omitted if the orientation of the object is known

Copyright © 1992 - 2016 NAPA. All rights reserved. 1266 / 7399


NAPA for Design Manuals 2016.3

q: the reference coordinate

RP define reference point

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.

RP name pname location

name: name of object to which the reference point belongs

pname: name of the reference point

location: location, either

(x,y,z): explicit point

#i: index of definition point (curves only)

EXAMPLE
RP BASE1 DP #2

RP name pname DELETE

Special case: delete the given reference point.

TEMP temporary mode

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

WAVE define/list calculation wave

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

This form lists the definition of the given wave.

WAVE name H=height,TYPE=type,L=length,POS=pos,DIR=angle

Define or redefine wave

name: name of the wave.

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.

type: type of wave SINUS (default) or TROCHOID.

SINUS: sinus shaped wave

TROCHOID: trochoid shaped wave

length: (OPT) length of the wave (default = reference length of the ship)

position: (OPT) position of wave hollow

HOGGING: wave hollow in AP (aft perpendicular)

SAGGING: wave hollow in AP+length/2

value: x-coordinate of wave hollow

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1267 / 7399


NAPA for Design Manuals 2016.3

9. Link functions

FEM -> enter FEM subtask

This subtask handles the generation of Finite Element Models.

FILE receiving file for geometry conversions

This command defines where to store the result when using commands TOSBH,TOSBD,
TOHSVA, TOIGES, TODXF and TOVDA.

FILE file

file: specifies the receiving file(s) in one of the following ways:

'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.

*: different objects are stored in different files, named as the objects

*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

FROM transfer data from another system

Objects are transferred from SIKOB, IGES, BLINES, VDAFS, DXF or from the KHI lines
system to Napa.

Calculation results are transferred from SHIPFLOW to NAPA.

SIKOB Transfer from SIKOB

FROM SIKOB dir1>file1 dir2>file2 options

----------------------------------------

Transfer a surface from SIKOB 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.

dir1>file1: Name of a text file containing SIKOB-definition of the hull.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1268 / 7399


NAPA for Design Manuals 2016.3

The link from SIKOB74 may be controlled by adding comment lines to the SIKOB-file. The
following options are available:

$ NAPA NAME name : name of the object in NAPA


$ NAPA FRAMES ENDPOINTS : frames are added at the
endpoints of curves
(default)
$ NAPA FRAMES NOT ENDPOINTS : opposite to the option above
$ NAPA FRAMES x1...xn : frames are added at
the given x-coordinates
$ NAPA FRAMES NOT x1...xn : opposite to the option above

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

IGES Transfer from IGES

FROM IGES file result options selection

---------------------------------------

Transfer data of IGES format to NAPA.

file: name of the text file containing the IGES data. (dir>file, or the directory path in apostrophes)

result: (opt) specification of the result (default: %TYP%IND).

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.

options: (opt) optional parameters

EQP: create equiparameter curves of NURBS surfaces (128)

EQP1: as EQP, but only in 1st parameter direction

EQP2: as EQP, but only in 2nd parameter direction

EQP=n: subdivide each knot sequence into n-parts. As a default the subdivision is controlled
by the option TOL=tolerance (default=GMTOL).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1269 / 7399


NAPA for Design Manuals 2016.3

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.

BTOL=btol: object specific combination tolerance of patch-sections. The global default is


controlled by !GM BTOL btol, and defaulted to 0.001.

E=i: transfer the i'th entity

E=-i: transfer the i'th entity, and invert surface normal

E=(i,...,-j,...): transfer the i'th, j'th etc. entities

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).

NURBS: create only the nurbs representation of NAPA surfaces

+NURBS: (default) create nurbs and patch representations

-NURBS: create only the patch representation

SPLINE: transfer spline representation of curves also

!: delete the old object with the same name

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.

NY=s: as above for y-curves (default: NY=Y)

NZ=s: as above for z-curves (default: NZ=Z)

NC=s: as above for z-curves (default: NC=C)

NS=s: as above for surfaces (default: NS=S)

N=*: equivalent to the options NX=X*,NY=Y*,NZ=Z*,NC=C* and NS=S*

IX=i: lower limit of %IND for x-curves (default: IX=0)

IY=i: lower limit of %IND for y-curves (default: IY=0)

IZ=i: lower limit of %IND for z-curves (default: IZ=0)

IC=i: lower limit of %IND for general space curves (default: IC=0)

IS=i: lower limit of %IND for surfaces (default: IS=0)

UNIT=sca1: scaling factor from IGES units to meters (default: accept the unit data in the IGES
file)

SCA=sca2: additional scaling

SCAX=sca2: additional scaling of the x-coordinates

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1270 / 7399


NAPA for Design Manuals 2016.3

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

that only surfaces are selected.

FROM IGES 'temp/hull.igs' HULL +NURBS SPLINE


to prevent possible conversion inaccuracies, transfer
also the original nurbs representation of the surfaces
and more accurate spline representations of curves
FROM IGES TEMP>DATA.IGS %TYPETEST
curves->CTEST; surfaces->STEST
equiparameter curves of NURBS surfaces
-> curves C1,C2,C2,...
-> wireframe surface C

List of quantities available in selections and in the catalog


function:
- ENT: type of entity
- PAR: pointer to parameter section (line number)
- LEV: level
- TRA: transformation (0=none, >0: pointer to directory section)
- VIS: visibility (0=visible, 1=blanked)
- DEP: dependency (0=independent,
1= physically dependent i.e. cannot exist alone,
2= logically dependent e.g. member of a group, 3= 1
& 2)
- USE: usage (0=geometry,1=annotation,2=definition,3=other,
4=logical/positional,5=2d parametric)
- DIR: pointer to directory section
- FORM: form number of entity type
- NAME: application specific alphanumeric identifier of the entity
- IND: numeric qualifier for NAME
- DES: name of entity

BLINES Transfer from BLINES

FROM BLINES file surface options

---------------------------------

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) name of the surface

+surface: (opt) as above, but the curves are added to an already existing surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1271 / 7399


NAPA for Design Manuals 2016.3

!: (opt) delete the old object with the same name

PO='options': (opt) preparation options The defaulted combination is PO='TOL=0.005 ATOL=1.0'.


Preparation option TOL=tol is propably needed, because curve intersections are not explicitly
defined by reference and not even exact (e.g. because of the limited accuracy of points in the
source file). Such points are easily missed in a preparation without a tolerance. The tolerance
should be larger than about 0.001, and smaller than the smallest distance between two
nonintersecting curves. The upper limit can be increased by using the option ATOL='angle in
degrees'. Curves within distance TOL are not intersecting if they have the same direction within
tolerance ATOL.

Examples:
FROM BLINES '/napa/temp/hull1.blines' HULL PO='TOL=0.003'
FROM BLINES '/napa/temp/hull2.blines' +HULL

SFL Transfer from Shipflow

FROM SFL file TAB*table options

---------------------------------

Transfer results calculated by the Shipflow system to a table of Napa.

For data in Shipflow version 2.8 format, please use

the macro 'addtab.readsfl' instead.

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:

O: file contains offset points of a hull surface

FROM SFL temp>sfl_result tab*sfl_result

KHI Transfer from KHI

FROM KHI dir>khi_file dir>napa_file options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1272 / 7399


NAPA for Design Manuals 2016.3

--------------------------------------------

Definition of a surface is converted from the KHI to the NAPA format.

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.

Conversion of the names is done as follows:

- 'end of parallel part' -> FRF or FRA


- other x-curves -> There are two alternatives:
- combination of 'X', section number,
and 'F' or 'A' (default)
- combination of 'X', KHI-name,
and 'F' or 'A'. Special characters
e.g. '/' are replaced by '_'.
(option N is needed)
- 'tangent trace line' -> FSF or FSA
- 'end profile' -> STEM or STERN
- 'end breadth' -> STEM_2 or STERN_2
- 'knuckle lines' -> KNF1,KNF2,... or KNA1,KNA2,...

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'.

Parameters of the command:

dir: directory

khi_file: name of the KHI file

khi_file: name of the NAPA file

options: (opt) control parameters

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

VDAFS Transfer from VDAFS

FROM VDAFS dir>file options

---------------------------

Transfer VDAFS data into NAPA. Only the entities SURF (untrimmed surface) and FACE
(trimmed surface) are supported.

dir>file: VDAFS file

Copyright © 1992 - 2016 NAPA. All rights reserved. 1273 / 7399


NAPA for Design Manuals 2016.3

CAT: (opt) list content of the VDAFS file. The following quantities are shown:

NR : index of the entity


NAME : name of the corresponding NAPA object
TYPE : type of the VDAFS entity
ID : name of the VDAFS entity
DES : description of the VDAFS entity
SET : name of the corresponding VDAFS set

NAME=rule: (opt) naming rule for the created NAPA objects The naming rule is a string where the following
variables can be used:

ENTITY : name of the VDAFS entity


SET : name of the related set entity
INDEX : index of the entity

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.

The defaulted naming rule is NAME=ENTITY.

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.

VDAFS: as in the vdafs file

+-X,Y,Z: direction of coordinate axis

G: according to geometry

GP: according to geometry but in the direction of positive coordinate axis

R: reversed

C: closed

INDEX=i: (opt) starting value of variable INDEX is i

!: (opt) overwriting of existing objects with the same name in DB1

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1274 / 7399


NAPA for Design Manuals 2016.3

Examples:
FROM VDAFS TEMP>VDA CAT
List content of the VDAFS file

FROM VDAFS TEMP>VDA NAME=*HULL OUT=GP


Transfer all FACE entities (trimmed surfaces)
and those SURF entities that are not refered by any
FACE entity into the database of NAPA. Each surface
is named according to the related VDAFS entity, and the
outside is selected according to the geometry so that
it points in the direction of a positive coordinate axis.
The created partial surfaces
are collected into a combined surface HULL.

FROM VDAFS TEMP>VDA NAME=HULL OUT=GP


As above, but instead of creating a combined surface,
the entities are packed into a single patch surface HULL.
In addition the OUT=GP option works on the result surface
and not on the parts pached into it.

FROM VDAFS TEMP>VDA NAME=HULL TYPE=SURF


Collect all SURF entities into the NAPA surface HULL

FROM VDAFS TEMP>VDA NAME=SET TYPE=SURF


Collect all SURF entities within a set
into a NAPA surface having the name of the set.
Each set is handled separately.

DXF Transfer from DXF

FROM DXF dir>file options

-------------------------

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.

!: (opt) overwrite existing objects with the same name

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)

IX=i: (opt) start index for principal x-curves (default: IX=0)

IY=i: (opt) start index for principal y-curves (default: IY=0)

IZ=i: (opt) start index for principal z-curves (default: IZ=0)

IS=i: (opt) start index for other than principal plane curves (default: IS=0)

X=q: (opt) plane for two dimensional data

Y=q: (opt) plane for two dimensional data

Copyright © 1992 - 2016 NAPA. All rights reserved. 1275 / 7399


NAPA for Design Manuals 2016.3

Z=q: (opt) plane for two dimensional data (default: Z=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

3DD Transfer from 3d-dump file of CADMATIC

FROM 3DD dir>file.3dd options

----------------------------------

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:

- In the EQP*table the orientation ORNT is expressed by the new syntax


C=(t1x,t1y,t1z,t2x,t2y,t2z); where t1 and t2 are the images of the x and y-axis of the component
template.

- The existing EQP* and EQT*tables with the same same are replaced by the new ones
created by the interface

dir>file.3dd: CADMATIC file

EQP*name: (opt) name of the EQP*table (default: EQP*CADMATIC)

EQT*name: (opt) name of the EQP*table (default: EQT*CADMATIC)

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.

ORNTYP=i: (opt) format of transformations 1 : (default) C=(t1x,t1y,t1z,t2x,t2y,t2z) 0 : a combination of


TZ=angle and TX=angle

Copyright © 1992 - 2016 NAPA. All rights reserved. 1276 / 7399


NAPA for Design Manuals 2016.3

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

KHI -> enter KHI-link

Surfaces of Napa are transferred into the definition format of the KHI lines system.

NPN -> enter NPN subtask, revised panel generation

This subtask handles generation of panel models for CFD calculations. It is a newer version of
the original PANEL task.

PAN -> enter PANEL subtask

This subtask handles generation of panel models for CFD calculations. See NPN for revised
version.

SB controlling generation of the circle representation

The command controls generation of data related to the circle representation in connection with
definition or updating of curves

SB ON/OFF

Turning circle generation on or off

SB TOL=tol

Assigns the tolerance controlling division into circle segments

SBP generate SB-preliminary surface

This command stores in a file the data defining a surface for the so called preliminary surface
of SB.

SBP name

name: name of surface (may be combined)

TO -> transfer data to another system

OPTISCAT Interface to the OPTISCAT format

TO OPTISCAT objects options

---------------------------

Patch and facet surfaces (with some restrictions) are written into an ascii file, that can be read
by the OPTISCAT system.

objects: objects to be transferred (names, or list()-syntax)

TOL=tol: (opt) tolerance

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();

VRML Interface to the VRML format

TO VRML objects file options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1277 / 7399


NAPA for Design Manuals 2016.3

---------------------------

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.

dir>file: e.g. temp>ship.wrl

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).

TITLE=text: title for the file as whole, default=name of object/project

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.

SKY=I: colour index of the sky, default 99=black.

GRN=I: colour index of the ground, default 99=black.

SUBS=array: string array selecting a subset (relevant with table only)

CONT: the file is left open so that additional entities can be appended into the same file

TOL=tol: tolerance controlling the representation of patch surfaces, default:10*GMTOL

Examples:

1) TO VRML STR*STEEL temp>steel.wrl

2) TO VRML '/n/napa/temp/ship.vrm' CONT


TO VRML HULL CONT
TO VRML STR*DECK

GDL Interface to the GDL+MDL format

TO GDL objects options

----------------------

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)

objects: as in command DES

DIR=path: (opt) name of directory

GD=name: (opt) name of gdl-file

MD=name: (opt) name of mdl-file

MDP=prefix: (opt) prefix of gdl-references in mdl-file

TOL=tol: (opt) tolerance for patch -> facet conversion (default:GMTOL)

EQP=n: (opt) each patch is subdivided into n*n facets

OWN=i: (opt) owner_id in ST-definition

Copyright © 1992 - 2016 NAPA. All rights reserved. 1278 / 7399


NAPA for Design Manuals 2016.3

OBJ1=i: (opt) lower limit of object_id in ST-definition

OBJ2=i: (opt) upper limit of object_id in ST-definition

SYS=i: (opt) system_id in ST-definition

ACC=i: (opt) accuracy_level in ST-definition

VIS=i: (opt) visibility_level in ST-definition

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

3DD Interface to the 3D Dump format

TO 3DD objects options

----------------------

NAPA geometry is converted into the 3DD format.

objects: as in command DES

FILE=path: file to be created

TOL=tol: (opt) tolerance for patch -> facet conversion (default:GMTOL)

DIV=n: (opt) each patch is subdivided into n*n facets

Examples:
TO 3DD DK1 FILE='c:/napa/temp/dk1.3dd'

TODXF conversion to the 3D-format of the DXF-standard

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.

3D transfer of curves and surface objects

TOD objects options

-------------------

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.)

options: (opt) control parameters

Copyright © 1992 - 2016 NAPA. All rights reserved. 1279 / 7399


NAPA for Design Manuals 2016.3

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.

NE: extended entity data is not added (=default)

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.

REP=alt: representation of objects REP=W: facet (default), REP=S: patch

D=n: number of decimals default: D=99 i.e. according to size

L=layer: layer (default: L=0) The identifier can be an integer or a string

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

TOFS conversion to IDF format

Patch surfaces are written in the IMSA IDF (Revision 3.01) format in the file defined by the
FILE command.

IMSA = International Maritime Software Associates.

IDF = Interface Definition File.

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.

TOFS objects options

---------------------

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:

K=P: periodic sequence -3,-2,-1,0,1,2,3,4 (=default)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1280 / 7399


NAPA for Design Manuals 2016.3

K=D: degenerate sequence 0,0,0,0,1,1,1,1

K=(k1,k2,...,k8): a user defined sequence

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

TOGDL Transfer to Cadmatic

TOGGL objects options

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)

objects: as in command DES

DIR=path: (opt) name of directory

GD=name: (opt) name of gdl-file

TOL=tol: (opt) tolerance for patch -> facet conversion (default:GMTOL)

EQP=n: (opt) each patch is subdivided into n*n facets

OWN=i: (opt) owner_id in ST-definition

OBJ1=i: (opt) lower limit of object_id in ST-definition

OBJ2=i: (opt) upper limit of object_id in ST-definition

SYS=i: (opt) system_id in ST-definition

ACC=i: (opt) accuracy_level in ST-definition

VIS=i: (opt) visibility_level in ST-definition

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

TOHSVA conversion to the milling format of HSVA

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.

TOH surface sections options

surface: name of the surface

sections: definition of the sections

z: value of the z-coordinate

(z1,z2,dz): sections from z1 to z1 with step dz

Copyright © 1992 - 2016 NAPA. All rights reserved. 1281 / 7399


NAPA for Design Manuals 2016.3

options: (opt) control parameters

SCA=scale: scale of the result (default=1)

MID=x: x-coordinate of the midship section (default=XMID from the reference system)

FS>zfs: the smallest z-coordinate of the flatside (default=0)

TOIGES conversion of geometry to IGES

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.

TOIGES objects options

objects: objects given in one of the following forms

obj1,obj2,...: objects listed by name

(cpart,i1,i2,di): series such as X1,X2,X3...

*object: given object + directly referenced objects The alternatives **object, ***object are also
available (as in the DES command).

array(): objects in the given array

options:

FILE='name': path name of the result file in apostrophes

NONTRIMMED: omit trimming curves

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

NURBS: transfer the nurbs representation of surfaces if available (default)

PATCH: transfer the patch representation of surfaces

DTOL=dtol: tolerance for detecting degenerate edges of a nurbs; defaulted dtol=0.001

PLATOL=platol: tolerance for detecting planar nurbses; defaulted platol=0 i.e. planarity is not
checked

Copyright © 1992 - 2016 NAPA. All rights reserved. 1282 / 7399


NAPA for Design Manuals 2016.3

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

TOSB generate geometry in SB format

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.

TOSB objects (Z)

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)

TOSBH TGF/surface curve1 curve2 ...

This form allows generation of tangent curves corresponding to the tangent functions
generated at surface preparation (SBH only).

surface: name of noncombined general GRID surface (not patch)

curve1...: (opt) name of curves for which tangent curves are desired. If omitted, all curves except frames
are taken.

TOUG conversion to UNIGRAPHICS

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().

THI=alt: (opt) thickness

THI=value: a real value for the thickness

THI=column: name of the thickness column in a table (defaulted column = thi)

THI=STR*table: name of the thickness table

THI=*: (default) read thickness values from STR* input tables

THI=OFF: omit thickness values

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

TOVDA generate geometry in the VDAFS format.

Objects of Napa are written in VDAFS format into a file that is defined by the command FILE.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1283 / 7399


NAPA for Design Manuals 2016.3

The following objects (simple or combined) are transferable:

- patch surfaces
- facet surfaces
- surface objects
- curves in the preparation results of the surfaces
- independent curves in the database

Two versions of the VDAFS standard are supported:

- VDAFS 1.0 (=DIN 66301)


- VDAFS 2.0

An object FACE corresponding to a trimmed patch of Napa


is introduced in VDAFS 2.0. The FACE element is used to transfer
patches where the boundary is not described by a unit box
(in the parameter space) including:
- facets with more than four sides
e.g. most facets of surface objects
- facets containing holes
- trimmed patches
- 3-sided patches obtained with the preparation option TP
With VDAFS 1.0 (without FACE) an alternative attempt is made
by subdividing such patches into 4-sided elements. This is not
very reliable.

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.

TOVDA objects options

objects: names of transferred objects

options: control parameters

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1284 / 7399


NAPA for Design Manuals 2016.3

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.

LC=val: number of the listclass (default: LC=3)

10. Subcommands of curve editing (EC)

ADD add point

A new point is added

ADD, (u,v)

ADD, name

either an explicitly given point or a point from another curve

is added

ADJUST adjust nearest point

This is a shorter form of the MOVE command, where the given point both designates the point
to move and gives its new position.

ADJUST axis (u,v)

axis: (opt) restrict the move as in command MOVE

(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.

DAC delete angle conditions

DAC (u,v), (u,v), ...

Angle conditions are removed from the given points.

(u,v): coordinates selecting the point.

DELETE delete point

Delete definition point.

DELETE, (u,v)

DELETE, name

either the explicit point nearest the given one or the reference

to the given curve is deleted.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1285 / 7399


NAPA for Design Manuals 2016.3

DISTRIBUTION set distribution function

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

Built in distribution functions.

Fi: symbol of the function:

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

Activate/deactivate the distribution function.

EXAMPLE
DISTR '(1-(1/(1-exp(-4.)))*(1-exp(-l*l*4.0))'

Same as DISRT F1.

EXTEND extend the curve at one end

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 -

This form extends the curve by a given length.

l: length of extension: >0 to end point <0: to start point

- (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.

axis: axis where the coordinate is given, X; Y or Z

q: coordinate value

- (opt) as above

EXAMPLES
EXTEND 1.2

Add a new point 1.2 m from the current endpoint.

EXTEND -0.5 -

Move the startpoint 0.5 m in the current curve direction.

EXTEND Z=12.5

Add a new point such that the curve reaches z=12.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1286 / 7399


NAPA for Design Manuals 2016.3

IM specify interpolation method

IM method

method: interpolation method:

M1: original method

M2: same method as in xyz curves

KNUCKLE make the selected point a knuckle

KNUCKLE (u,v), (u,v), ...

The given points are converted to knuckles.

(u,v): coordinates selecting the point.

MOVE move point

MOVE axis (u1,v1) (u2,v2)

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.

(u2,v2): where to move. also defines where to move.

Several moves may be defined in one command. See also command ADJUST.

MOVE U (10.2,4.7) (10.25,4.72)

The u-coordinate of the point selected will be 10.25.

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.

PLOT plot the curve

PP make points primary

Curve references are removed, keeping the definition point as a primary one.

PP (u,v), name ...

(u,v): point selected by pointing in the drawing

name: point selected by curve name

RANGE range for the distributed move

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.

RANGE rmin rmax

rmin: range before the curve: >0: length along the curve, <0: number of definition point intervals. -1:
to the end.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1287 / 7399


NAPA for Design Manuals 2016.3

rmax: analogically for the upper limit.

EXAMPLES
RANGE 5 5

The change affects the definition points nearer than 5 m to the moved one.

RANGE -3 -3

In both directions, the first and second points will be affected.

REPEAT allow more than one change

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.

SKIP cancel the editing

SORT specify sorting method

SORT method

method: sorting method:

*: no sortingm apply points as given

X: sort according to X, similarly Y, Z

XY: apply the general sorting method in the XY plane, similarly other projections.

10.1. Commands under 'Modify curve' (MC)

ADD add curve

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

curve: name of curve to be added

ADD *

In this case the operation is done by combining the branches of the current curve.

AXIS define axis

This command defines the axis used in the rotations. It can also be used for specifying a
translation, see command TRA.

AXIS (x1,y1,z1) (x2,y2,z2)

AXIS (x,y,z) axis

AXIS (x,y,z) phi/theta l

BRANCH select curve branch

This command makes the curve contain a given curve branch only.

BRANCH n

n: branch number (1,2,...)

CANCEL cancel the changes made

Copyright © 1992 - 2016 NAPA. All rights reserved. 1288 / 7399


NAPA for Design Manuals 2016.3

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.

CLEAN remove unnecessary points and other data

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 converge points against a point

A points of the curve are moved in the direction of a given point.

CNV (x,y,z) q

(x,y,z): the given point

q: relative distance to the point of the movement (0<q<1)

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.

(u,v): given point in the plane, e.g. (y,z) for a frame.

q: relative distance to the point of the movement (0<q<1)

COL change colour

The is the standard COLOUR command, see !EXPL COL/DR. Similarly DASH, THICKNESS,
FILL.

COMBINE combine curves

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).

GET get curve

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

name: name of curve

GPR generate projection

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1289 / 7399


NAPA for Design Manuals 2016.3

Make a projection in the direction given by a vector. The result is stored as a curve in the plane
y=0.

v1,v2,v3: components of the given vector.

MERGE merge curve branches

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

curve: name of RECEIVING curve

OK leave the task

The main definition context is reentered. The curve is not stored in the data base, but it is left in
the memory.

PLOT draw the current curve

(Command AUTO also affects the commands under MC).

PROJECTION change projection

This is the standard PROJECTION command, see !EXPL PRO/DR

PTR translation parallel to the curve

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 *

d: distance of translation, >0=to the right, <0=to the left

*: (opt) combine the moved contour with the initial one in order to form a closed contour

REDUCT reduct curve

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

curve: name of curve to be reducted

RENAME rename the 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

name: new name

REPLACE replace curve in the data base

The current curve is stored in the data base, replacing an already existing one. See also SAVE.

REPLACE name

name: (opt) save with the given name

ROTATE rotate curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1290 / 7399


NAPA for Design Manuals 2016.3

A rotation is performed around the axis given in the AXIS command.

ROTATE angle

angle: rotation angle

ROUND round corners

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

r: radius of the rounding

RSC rescale

The given curve is rescaled, possibly differently in the directions of the different coordinate
axes. The scaling is done before the translation.

RSC scale/(x0,y0,z0) (dx,dy,dz)

scale: rescaling factor(s)

sc: scale valid in all directions

(scx,scy,scz): different scales in the different directions

/(x0,y0,z0): (opt) pivot point for the scaling, default (0,0,0)

(dx,dy,dz): (opt) a translation in addition to the scaling

RSC (scx,scy,scz) (dx,dy,dz)

SAVE save curve in the data base

The current curve is stored in the data base. If the curve already exists, use REPLACE.

SAVE name

name: (opt) save with the given name

SIZE change scaling

This is the standard SIZE command, see !EXPL SIZE/DR.

SKIP leave and erase the result

The current curve is erased, eliminating any changes made in it, and the subtask is exited.

SPLIT split the current curve

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

curve: name of dividing curve

TRANSLATE translate the curve

The curve is translated a given distance.

TRANSLATE dx,dy,dz

dx,dy,dz: components of the translation

Copyright © 1992 - 2016 NAPA. All rights reserved. 1291 / 7399


NAPA for Design Manuals 2016.3

TRANSLATE *

The translation given by an AXIS command is used. This means the distance between the
given points.

TURN turn direction

The direction of the current curve is reversed. May be needed before COMBINE, for instance.

WHERE tell current curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1292 / 7399


NAPA for Design Manuals 2016.3

Service functions and events (GM)


Table of Contents:

1. Service functions, main GM


1.1. Properties of objects
1.2. Control and Administration
1.3. Various operations
1.4. Relative locations between objects
1.5. Elements of object definitions
1.6. Related to parameters
2. Service functions, surface editing
2.1. Management
2.2. Managing the graphic display
2.3. Current curve and point
2.4. Properties of curves and points
2.5. The locator
2.6. Options
2.7. Preparation options
2.8. Various functions
2.9. Editing functions, points
2.10. Editing functions, angles
2.11. New curves, changing curve type and location surface
2.12. Using the alphanumeric representation
2.13. Standalone functions (no work area)
3. Events of group GM
4. Events of group GME

1. Service functions, main GM

1.1. Properties of objects

GM.DATE() date of object

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')

name: name of object.

D: (opt) return definition date, relevant for surfaces, rooms and surface objects.

GM.DATE('#SYSTEM')

Special case: return the date of the frame systems.

GM.TYPE() type of object

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)

object: name of object

opt: options

M: main types: return only main types, i.e. POINT, CURVE, TGF, SURFACE, PLANE, ROOM,
SO (PLANE=unrestricted plane).

S: return the subtype. Default=main type+subtype.

I: return the internally used numeric code.

A: return types as in n_gmtype of the API

Copyright © 1992 - 2016 NAPA. All rights reserved. 1293 / 7399


NAPA for Design Manuals 2016.3

P: only distinguish between non-parametric (0), parametric, limits (1) and parametric with
hole(2).

ver: (opt) version. Default: current version

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.

GM.STATUS() status of object

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)

name: name of object

opt: options

I: return integer code, default plain text

The alternatives for status: (integer code, text):

-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

GM.DES() description of object

The function returns the description of an object in a macro. The function value is the resulting
macro, if any, else 0.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1294 / 7399


NAPA for Design Manuals 2016.3

GM.DES(object,macro,opt)

object: name of object. prefix * can be used as in the DES command.

macro: receiving macro (reference number) Without the A option, preceding contents are removed.

opt: options:

A: add to previous contents

!: 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.

object: name of object, as above

EXAMPLE
@mac=dm.create('')
@gm.des('**HULL',mac)

Create a macro and store the definition of HULLA including referenced parts.

GM.OUTSIDE() orientation of surface

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)

name: name of surface

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.

GM.OS() get owner surface

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)

name: name of the given surface

OPT: options

C: always return coordinate plane if possible

H: if part of moulded hull, return the hull

T: if transformed object ignore the transformation,

i.e. the reflection, translation or other modification.

Default=return 'name'. See also R, O

O: if transformed object, return a temporary

object named OS.name

R: treat reflection about Y separately: return the result as -osname

N: do not check further references than the first one

Copyright © 1992 - 2016 NAPA. All rights reserved. 1295 / 7399


NAPA for Design Manuals 2016.3

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

GM.RP() return/define reference point

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.

object: name of object

GM.RP(object,id,p)

This form gets coordinates.

object: name of the object

id: name of the reference point

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)

This form defines or modifies a reference point.

object: name of the owner object

id: name of the reference point

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')

Define two reference points in the curve CURVE1.

GM.FEATURE() return feature

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.

object: name of object

Copyright © 1992 - 2016 NAPA. All rights reserved. 1296 / 7399


NAPA for Design Manuals 2016.3

ok=GM.FEATURE(object,feature,curve,opt)

object: name of the room

feature: name of the feature

curve: description for receving the result

opt: options

P: the feature must be a point, 'curve' is an array.

EXAMPLES
@curve=dm.create('F1.R123')
@ok=gm.feature('R123','F1',curve)

Get the feature F1 of the object R123.

@p=arr(2)
@ok=gm.feature('R123','P1',p,'P')

Get the feature P1 of the object R123, which is supposed to be a point.

GM.BOUND() get bounding object

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

- there is a common coordinate plane or a common


owner surface (same name)
- there is the best overlap in the two remaining
coordinate directions (at least 50%)

Transformations (reflections, translations) are not supported. Function value=name of object or


empty.

GM.BOUND(name,side,model)

name: object, the bound of it is searched

side: coordinate axis, 1=x, 2=y or 3=z, >0=upper limit, <0=lower limit. 0=return all limits.

model: name of model (STR* table) or string array containing names

EXAMPLE
@limit=GM.BOUND('DECK1',-3,'A')

The lower limit of DECK1 is searched for among objects in STR*A.

GM.CALCSECT() get calculation sections as curve

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1297 / 7399


NAPA for Design Manuals 2016.3

B: record a box as a box rather than two sections

ind: (opt) index of the calculation section (default=all)

D: flag parts in the result. DD: stronger alt. needed for GM.CSEXTRACT.

GM.CSEXTRACT() further processing of the result from GM.CALCSECT

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)

name: name of the result from GM.CALCSECT

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)

opt: options, compulsory if 'part' given:

nr: select the given part only

P: plot the curves

B: plot the bounding boxes

M: merge: disregard redundant x-limits, i.e. combine boxes belonging to the same room and
sharing a common x-coordinate

GM.CSPOS() position of calculation sections

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)

name: name of object

array: real array for receiving the result

opt: options:

D: only discontinuities, default all calculation sections. In all cases, step discontinuities are
represented by repeating the x-coordinate.

L: include the limiting x-coordinates (relevant with option D)

T: add a tolerance to step discontinuities (+/-0.01)

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

Plot x-sections at all special places in R1234.

GM.QNT() various properties of geometric objects

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1298 / 7399


NAPA for Design Manuals 2016.3

name: name of the object

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

Q: reverse of G: take only quantities 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')

Get the value of ORNT (as available from the geometry).

@C=GM.QNT(NAME,'ACODE')

Get the first value of QNT ACODE

@R=GM.QNT(NAME,'ACODE','R') @N=RSIZE(R)

Access all values of QNT ACODE.

GM.LOCCOORD() return local coordinate system

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)

name: name of the object

p: record (real) for receiving the origin (x,y,z)

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)

the record r will contain x,y,z,vx,vy,vz.

GM.PONS() point and normal of surface

Calculate points on surface and normal vectors of the surface at these points

np=GM.PONS(sur,p,v,ps,vs, opt,atol)

np: number of points

sur: name of surface

p: given point (real array with 3 coordinates)

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

ps: points on surface (real array for x1,y1,z1,x2,y2,z2,...)

vs: normal vector of surface at points ps (real array for components vx1,vy1,vz1,vx2,vy2,vz2,...)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1299 / 7399


NAPA for Design Manuals 2016.3

opt: (opt) options

I: the point p is in the surface, only vs is needed

atol: (opt) angle tolerance for detecting equality of normal vectors (default=0.01745 i.e. 1 degree)

GM.BRACKETINFO() info for bracket included in object

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.

name: name of object

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).

GM.REFSURFACES() get reference surfaces used in an object

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)

name: name of the object

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

A: add to previous contents, default=remove

L: omit surfaces present in the current reference surface arrangement

C: where possible, return named planes as explicit coordinates

S: add section curve with the plane axis=q

B: take only bare planes (not named surfaces)

-B: omit bare planes

O: take only the owner surface (concerns surface objects)

-O: omit the owner surface

H: take the hull only (=any surface containing the HLID in the name, see reference system)

-H: omit the hull

Z: omit if orientation=AXIS

As the result, the following records are stored in the result:

1610: name. A locally defined plane is


represented in the form X=33.6
1627: orientation (X, Y or Z)
1629: reference coordinate
1699: gm-refence number

GM.SURQNT() quantities of a surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1300 / 7399


NAPA for Design Manuals 2016.3

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)

sur: name of surface

rx: array of x-coordinates

ry: array of y-coordinates

rz: array of z-coordinates

rv: array of direction, not impl., use rv=0

rec: array for the result

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

1.2. Control and Administration

GM.DBWATCH() control dynamic update from the data base

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:

ON: set on with current options

OFF: cancel

RUN: run the check without changing options

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()

Output the current settings.

GM.OPTION() set/assign options

The function handles control parameters related to geometry.

GM.OPTION(id,value)

id: name of option, presently only

GMTP: curve generation type, as in command !GMTP

GMTOL: polygonization tolerance

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

GM.COPY() copy surface

The function copies a surface and its components from a foreign source.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1301 / 7399


NAPA for Design Manuals 2016.3

GM.COPY(name,version,project,options,list)

name: name of surface

version: source version

project: (opt) project. May also refer to a data base unit in the form DBi.

options: NOTE: compulsory item

!: allow overwriting of objects of the same type

!!: allow overwriting of objects without restriction

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.

-: do not include referenced objects

N: do not copy, just record the objects concerned in 'list' Default: copy nothing unless the
operation can be done completely.

list: (opt) string array for receiving a list of objects transferred.

GM.RUN() run definition macro

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

T: generate temporary objects (=not written to the data base)

N: do not check for dependences on this object, saves efforts from the object administration

S: Silent. Do not generate GM.CHANGE events

GM.FREEZE() prevent updates

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)

c: sets the state:

1: set freeze mode

0: cancel freeze mode. Should always be called in the end.

state=GM.FREEZE()

This form tells the current state (1=freeze, 0=normal).

GM.UPDATE() trigger updates

This function handles updates of objects currently in use.

GM.UPDATE(funct)

funct: function

FRS: update objects dependent on the frame system(s)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1302 / 7399


NAPA for Design Manuals 2016.3

DB: update objects having a newer version in the data base

E: empty all objects

GM.READ() read geometric data

Data can be read from surfaces, curves and points. The process should go as follows:

@GM.READ('OPT',...) @@ assign options


@GM.READ('OPEN',...) @@ initialize reading
@FOR ITEM=1,N
@GM.READ('ITEM',...) @@ initialize item
@GM.READ('DATA',...) @@ read geometric data
@NEXT
@GM.READ('CLOSE',...) @@ close reading

GM.READ('OPEN',NAME,OPT,LW,R)

The reading of geometry of an object is initialized.

NAME: name of object

OPT: options created by GM.READ('OPT',...)

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: integer array for the result

R(1): type

1: facet surface

2: patch surface

3: nurbs surface

11: polygon curve

12: spline curve

13: nurbs curve

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)

Assign reading options

ID: identifier of the option

TOL tolerance for approximations

LIM limitation of facets by planes and surfaces

REP required representation

FAC faceting of patch surfaces

TRA additional transformation of surfaces

SUR reading grid curves from surfaces

NURBS nurbs surface specific options

R: real array for numeric options

S: string options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1303 / 7399


NAPA for Design Manuals 2016.3

OPT: description for the options

The options are described in more detail below:

TOL: TOLERANCE FOR APPROXIMATIONS This option is used in generating approximative


representations e.g. facet representation of patch surfaces. If not given this is defaulted to the
current polygonization tolerance GMTOL.

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

r(1)=0: (default) internal representation

r(1)=1: polygon representation

r(1)=2: polynomial representation

r(1)=3: nurbs representation

r(1)=-2 or -3: as 0, but curved items are returned as in REP=2 or 3

FAC: FACETING OF CURVED SURFACES This option affects the faceting of patch surfaces. The
following 4 items can be given (NR<=4):

r(1): subdivision of patches.

r(1)=0: (default) no subdivision i.e. one facet for each patch

r(1)=100: divide so that a tolerance TOL is obeyed

r(2): representation of patch boundaries

r(2)=0: (default) straight sides

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): special faceting options

r(3)=0: (default) closed facets

r(3)=-1: closed convex facets without any holes

r(3)=1: open curves r(1)=0: curves of preparation description 0<r(1)<100: equiparameter lines
of patches

r(3)=2: boundary curves of surface

r(3)=3: knuckle curves of surface

r(4): tolerance of subdivision (in the case r(1)=100)

TRA: TRANSFORMATION OF SURFACES Additional transformation can be applied in the reading


of surface items (facet/patch/nurbs).

r(1): the value should be 40 indicating the general coordinate transformation of NAPA

Copyright © 1992 - 2016 NAPA. All rights reserved. 1304 / 7399


NAPA for Design Manuals 2016.3

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): improving connections between nurbses

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): representation of boundaries

r(2)?0: (default) as stored

r(2)=1: 2d-polygon in the parameter space of the surface

r(2)=2: 3d-polygon

r(2)=3: 3d-spline

r(2)=4: 3d-nurbs

r(3): direction of boundary

r(3)=0: (default) as in NAPA

r(3)=1: inverted

r(4): scope of boundary generation

r(4)=0: (default) fetch only explicitly defined boundaries

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.

r(5)=0: (default) first index runs faster than the second

r(5)=1: second index runs faster than the first

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',...):

LW: work array created by GM.READ('OPEN',...)

ITEM: number of the item

IT: geometric data (integer array)

RT: geometric data (real array)

TYPE=1: facet representation of surfaces

IT(1): number of boundaries (outer boundary + holes)

IT(2): total number of boundary points

Copyright © 1992 - 2016 NAPA. All rights reserved. 1305 / 7399


NAPA for Design Manuals 2016.3

RT(1...4): plane coefficients

RT(1...3): normal vector of plane

RT(4): signed distance from (0,0,0)

plane: RT(1)*x+RT(2)*y+RT(3)*z=RT(4)

TYPE=2: patch representation of surfaces

IT(1): type of patch

IT(2): number of boundaries (outer boundary + holes)

RT(1...6): extreme coordinates XMIN,XMAX,...,ZMAX

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.)

TYPE=3: nurbs representation of surfaces

IT(1): degree of the 1st set of basis functions

IT(2): degree of the 2nd set of basis functions

IT(4): number of knots in the 1st set

IT(6): number of knots in the 2nd set

IT(8): representation of control points 3: 3d-space (x,y,z) 4: 4d-space (w*x,w*y,w*z,w)

IT(9): 1st dimension of the control points table

IT(10): 2nd dimension of the control points table

IT(11): type of boundary 1: 2d-polygon in parameter space 2: 3d-polygon

IT(12): number of boundaries (outer boundary + holes)

IT(14): total number of points in the boundary

RT(1...6): extreme coordinates XMIN,XMAX,...,ZMAX

TYPE=11: polygon representation of curves

IT(1): number of points

IT(2): type of branch 1,2,3: located in x,y or z-plane 0: general

TYPE=12: spline representation of curves

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.)

IT(2): type of branch 1,2,3: located in x,y or z-plane 0: general

TYPE=13: nurbs representation of curves

IT(2): number of knots

IT(4): representation of control points 3: 3d-space (x,y,z) 4: 4d-space (w*x,w*y,w*z,w)

IT(5): number of control points

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',...).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1306 / 7399


NAPA for Design Manuals 2016.3

The item can be a branch of a curve (polygon,spline,nurbs) or an element of a surface


(facet,patch,nurbs). A surface item contains data about the underlying surface and also about
the boundary. The boundary can have many branches. The first one is the outer boundary and
the rest are holes. If boundary data is read, the number of the branch must be given in the
parameter OPT.

LW: work array from GM.READ('OPEN',...) (INPUT)

RT: real array (OUTPUT)

SEL: selection of data (INPUT)

1: x-coordinates

2: y-coordinates

3: z-coordinates

4: 1st parameters of surface

5: 2nd parameters of surface

6: knots of nurbs curve

7: control points of nurbs curve

8: 1st knots of nurbs surface

9 2nd knots of nurbs surface

10: control points of nurbs surface

11: x-components of direction

12: y-components of direction

13: z-components of direction

-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:

TYPE=1: facet representation of surfaces

SEL=1,2,3: coordinates of 3d boundary polygon

TYPE=2: patch representation of surfaces

SEL=4,5: parameters of 2d boundary polygon

TYPE=3: nurbs representation of surfaces

SEL=1,2,3: coordinates of 3d boundary polygon (if IT(11)=2)

4,5: parameters of 2d boundary polygon (if IT(11)=1)

8,9: knots of surface

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',...)

TYPE=11: polygon representation of curves

SEL=1,2,3: coordinates of 3d polygon

11,12,13: x,y,z-components of direction

Copyright © 1992 - 2016 NAPA. All rights reserved. 1307 / 7399


NAPA for Design Manuals 2016.3

TYPE=12: spline representation of curves

SEL=1,2,3: x,y,z-coefficients of spline segments. Each spline segment is represented by 4


coefficients related to the basis functions 1,t,t2,t3 (0<t<1).

TYPE=13: nurbs representation of curves

SEL=6: knots of curve

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)

Close reading of geometry

LW: work array from GM.READ('OPEN',...)

GM.FROMFILE() Get externally defined object

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.

name: (opt) name of the result

GM.SELECT() select referenced objects

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

C: only combined objects

Copyright © 1992 - 2016 NAPA. All rights reserved. 1308 / 7399


NAPA for Design Manuals 2016.3

S: (single) only non-combined objects

E: elementary surfaces (CYL etc)

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.

opt: options. If given, a least an empty 'types' parameter must be given.

I: include the given object in the result

S: sort the result so that references are backwards

A: sort the result alphabetically

1: take only references one level down

*: same as 1.

**: take only references two levels down (as in DES **...) (same as * if P option)

****: take all levels: always include curves also

G: only objects from geometric definitions, not tables

P: parts: consider only references having the meaning that the object is a part, either from
COMBINE or MERGE.

C: (with P): take only combinations

M: (with P): take only parts from 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')

Return all curves and points upon which HULL is dependent.

@LIST=GM.SELECT('ARR*A','R','G')

Return all rooms in ARR*A except partial tables (such as ARR*DECK1).

@LIST=GM.SELECT('ARR*A','S/P')

Return all patch surfaces used in ARR*A.

@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)

As above but from version B.

@LIST=GM.SELECT('DB','S/G')

Return in all surfaces defined by a grid (=all surfaces to which the PREP command applies)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1309 / 7399


NAPA for Design Manuals 2016.3

@LIST=GM.SELECT('DB','R','^R*','')

Return all rooms except those named R....

GM.STRIP() strip object of geometry

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)

objects: specifies the target objects

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.

array: string array providing a list of objects (e.g. from GM.SELECT).

opt: options:

*: extend the operation to all referenced objects also. Ignored if the objects are specified by an
array.

P: encrypt rather than remove, allows restoring with option R

R: restore after stripping with option P

G: treat the given object only, ignore parts of combined object. Default when given an array,
where references supposed to handled.

D: as far as the operation concerns curves, delete the curve.

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.

GM.REMOVE() remove objects from the run time memory

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)

Remove selected object(s) only.

name: name of object

options: (opt)

P: if combined object, include its parts also

PP: include any objects referenced by the given one and not referenced by any remaining
object.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1310 / 7399


NAPA for Design Manuals 2016.3

C: check only: list the objects that would be removed

L: list objects removed. Implied by C unless 'list' is given.

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.

S: make no message if removal fails

K: keep copies in the form of named descriptions in the free storage

list: (opt) string array for receiving list of removed objects

GM.STATUSCHECK() select objects according to status

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:

0 or empty: check all objects currently active

list: string array containing the objects to be checked

types: string, one or several of S=surfaces, R=rooms and O=surface objects: check active
objects of the given type

receiver: string array for receiving name of incorrect objects

status: (opt) string array for receiving the corresponding status

opt: restrict according to status, empty=any, else one or several of

M: missing

E: object incorrect (incorrect definition of missing referenced object)

F: failure to generate the geometry of a surface object

C: failure to generate calculation sections

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.

B: boundary representation of a room failed The boundary repr. is checked by comparing


quantities calculated from the surface integrals with those based on the calculation sections.
The check is controlled by ropt(3:7).

ropt: (opt) real array to control the check of rooms (with opt=I or B)

The following items are in use; values<=0 indicate that


the related check is skipped or a default value is used:
1: number of sections between discontinuities
2: distance between intersection planes
3: absolute tolerance for volume
4: relative tolerance for volume
5: absolute tolerance for center of volume
6: relative tolerance for center of volume
7: number of gauss-legendre integration points

1.3. Various operations

Copyright © 1992 - 2016 NAPA. All rights reserved. 1311 / 7399


NAPA for Design Manuals 2016.3

GM.TRARG() define transformation

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

parameters: (input) parameters of the command

command=GM.TRARG(descr,command_id)

Read a stored command

command: (output) command of the TRA task

descr: (input) work description of the transformation

command_id: (input) identifier of the command

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

The transformation defined by GM.TRARG is executed

GM.TRANS(object,version,project,result,descr)

object: (input) name of the object to be transformed

version: (input) parent version

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.

project: (input) parent project

name: name of a version of the current project

RUNTIME: the result is left into free storage, and not stored into the database

'': current project

result: (input) result version Note: empty string does not refer to the current version

descr: (input) work description of the transformation

Examples:
@GM.TRANS('HULL','RUNTIME','','RUNTIME',DESCR)
@GM.TRARG('HULL','A','NAPASHIP','ATRA',DESCR)

GM.PANEL() Replaced by NPN.PANEL.

GM.FITPLANE() fit plane to point set

Copyright © 1992 - 2016 NAPA. All rights reserved. 1312 / 7399


NAPA for Design Manuals 2016.3

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)

x: array providing the x-coordinates

y: array providing the y-coordinates

z: array providing the y-coordinates

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)

As above, but the point set is provided by curve.

curve: name or reference number of the curve

ok=GM.FITPLANE(definition,vp)

This form defines a plane using a definition, see !EXPL THR/PLANE.

definition: given definition syntax

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.

@ok=gm.fitplane('Y (10 0) (20 2),pl)

GM.TRANSFORM() transformations of curves and surfaces

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.

21,draught,trim,heel,azimuth,x0,y0,z0: the rotation is defined so that an originally upright object


gets the orientation corresponding the floating position indicated by the given trim (m) and heel
(degrees). The azimuth angle is optional (default=0). (x0,y0,z0) defines a point on the rotation
axis. If omitted, it is selected as the point on the waterplane near the reference point
(XREF,0,0). The result is corrected so that intersecting the result with z=draught gives the
water plane. See also option W.

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'.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1313 / 7399


NAPA for Design Manuals 2016.3

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.

opt: options, one or sevaral of

S: save the result in the data base (name must be given)

!: override storing restrictions

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.

E: (for projection) omit branches giving zero area.

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')

GM.SCURVE() Curves of surface

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)

A description CURVES_ON_SURFACE is calculated that contains the the following records:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1314 / 7399


NAPA for Design Manuals 2016.3

record 1: names of grid curves


record 2: types of grid curves
0= ordinary inside curve
-1= border curve, surface on left side only
1= border curve, surface on right side only
2= knuckle
-9= curve is not connected to the grid

D: (output) reference number of the description CURVES_ON_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.

D: (output) reference number of the resulting curve

surface: name of the surface

curve: identifier of the curve

name: name of a grid curve

*p: profile

*fb: flat bottom

*fs: flat side

*f: limiting curves of flat regions

*m: limiting curves of midship

*k: knuckles

*b: boundaries

*g: all grid curves

resname: name of the result curve

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).

T: read from the reference surface

L: restrict by the limiting box of the given surface

LL: restrict by the boundary of the given surface

GM.WPLANE() waterplane from t,tr,heel

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

trim: trim, default=meters, see opt.

heel: heeling angle, default=degrees, see opt.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1315 / 7399


NAPA for Design Manuals 2016.3

opt: options: I=trim, heel given in internal units (radians)

d=GM.WPLANE(t,trim,heel,p,opt)

This form returns distance from the plane to the given point.

p: array giving (x,y,z). Other parameters as above.

EXAMPLES
@v=gm.wplane(10,0,5)

Return the plane corresponding to draught=10 m, trim=0, heel=5 degrees:

-> (0 -0.0872 0.9962 10.0)


@p=arr(2) @p(1)=50 @p(2)=0 @p(3)=12
@d=gm.wplane(10,0,5,p)

Return distance from the plane to the point (50,0,12) ->1.954

GM.SOCURVE() get/replace curve limit in surface object

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.

name: name of the surface object

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.

name: name of the surface object

nr: limit nr (see above)

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.

name: name of the surface object

nr: limit nr

descr: description for receiving the result. Previous contents are removed.

GM.SOCURVE(name,nr,def,'U..')

The U option means that the given limit is to be updated.

name: name of the surface object

nr: limit nr

def: (opt) new definition. Default=get a curve with the same name as obtained when getting a limit.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1316 / 7399


NAPA for Design Manuals 2016.3

name: name of curve

def: definition syntax. This interpretation requires that option S is added

'U..': options, alt least U.

S: interprete 'def' as the definition syntax, default=name of curve

N: do not write the result to the data base

D: delete the operand curve

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.

name: name of the surface object

nr: limit nr

descr: description containing records 101, 102. NOTE: at most 5 are allowed (otherwise definition is
likely to be too long).

'UA..': options, alt least U and A

N: do not write the result to the data base

D: delete the 'descr' after finishing

AA: convert points with three decimals, default=2.

EXAMPLES
@if GM.SOCURVE('WEB12',1,'I') then

Tests that the given limit exists.

@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.

GM.ROUND() Round corners of a polyline

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: rounded curve

urec: u-coordinate record

vrec: v-coordinate record

rrec: radius record

Copyright © 1992 - 2016 NAPA. All rights reserved. 1317 / 7399


NAPA for Design Manuals 2016.3

krec: parameter record (integers)

res=GM.ROUND(urec,vrec,radius,angle)

res: rounded curve

urec: u-coordinate record

vrec: v-coordinate record

radius: radius of the roundings

angle: all corners of the polygon whose opening is less than the given angle (in degrees) are rounded

GM.IBC() intersection between curves

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)

Optional parameters may be omitted from the end.

curve1: first operand curve, name or pointer

curve2: second operand curve, name or pointer

rx: real array for receiving the x-coordinates

ry: similarly for y-coordinates

rz: similarly for z-coordinates

tol: tolerance for deciding when points coincide, default=0.001

rk1: (opt) array for receiving point parameters on curve1 (as in the functions COORD, INCL).

rk2: (opt) array for receiving point parameters on curve2

np=GM.IBC(curve1,plane,rx,ry,rx,tol,rk1)

In this form, 'curve1' is intersected by a general plane.

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.

GM.TOCIRCLES() convert polygon to arcs of circles

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)

curve: name or reference number of the given curve.

brn: branch number (1,2,..). Only one branch at a time is converted.

tol: tolerance. 0=default (GMTOL)

ru: real array for receiving the u-coordinates of the circles

rv: similarly for the v-coordinates

rh: similarly for the segment heights. The number of values in rh is one less than in ru,rv

Copyright © 1992 - 2016 NAPA. All rights reserved. 1318 / 7399


NAPA for Design Manuals 2016.3

opt: options

X: take the x-projection

Y: take the y-projection

Z: take the z-projection

C: return the radius instead of the segment height in rh

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

rt: string array for receiving the result.

opt: options

X,Y,Z: as above

T: selects this case

R: reverse, turn the curve direction

S: separate: output each point in an own element in the array RT

GM.PLLIM() set extension for planes (plotting)

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)

Delete the limits.

GM.CONVERT() change format of geometry

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;

DEF>TOIGES ... NURBS;

name1: name of patch surface (prepared, simple, not combined)

name2: name of result

'G': keyword of the task

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

S: store result into db1 also

N: create only the NURBS representation. As a default, the patches calculated from the
NURBS representation are also stored in the result.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1319 / 7399


NAPA for Design Manuals 2016.3

GM.CONVERT(points,surface,'INT',opt)

Fit nurbs surface to a point set

points: name of a description containing the N*M-point set.

surface: name of the result surface. Nurbs and patch representations are both created.

opt: options

S: save the result into DB1 also.

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)

Get connections between the nurbses of a surface

sur: surface name or reference number

tdescr: topology description

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

B: set g1-continuity at the connection lines

P: plot curves where g1-continuity is not required

S: store sur2 indo db1 also

sur2: name of the result 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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1320 / 7399


NAPA for Design Manuals 2016.3

The following input data should be given by the user:


- number of rows: N
- number of columns: M
- row 1: curve R1 limited by KR11 and KR1M
- row N: curve RN limited by KRN1 and KRNM
- column 1: curve C1 limited by KC11 and KC1N,
- column M: curve CM limited by KC1N and KCMN)
The input data is stored in REF as follows:
integer record 1: N,M
integer record 2: R1,RN,C1,CM
real record 3: KR11,KRN1,KC11,KCM1
real record 4: KR1M,KRNM,KC1N,KCMN
The following output record is created in REF:
real record 5: points as an array of dimensions
(3,N,M) stored so that a preceding
index runs faster than the latter.

SUR1: original surface

TABLE: name of the result table for the points

REF: boundary description

SUR2: (opt) name of the result surface

n=GM.CONVERT(model,block,'NPN',sur,opt)

Fit surface to points of NPN model

model: name of NPN model

block: name of NPN block empty string: all blocks of the model

sur: name of the result surface

opt: options

U: assign uniform parametrization to the input data. As a default, the parameters are averaged
out from the chord lengths.

S: store the result surface into DB1

T: turn orientation of surface

ornt: required orientation: X,Y,Z,-X,-Y,-Z

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.

GG: as G, but all NPN-points are interpolated

n: (output) number of patches in the surface

GM.CONVERT(sur,table,'CP')

Get control points of a nurbs surface into a table

sur: name of a surface

table: name of the result table

GM.FACETS() get facets of a surface

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)

source: name of surface to be faceted

name: (opt) name of the result (default: name='')

Copyright © 1992 - 2016 NAPA. All rights reserved. 1321 / 7399


NAPA for Design Manuals 2016.3

opt: (opt) a string combined from the following characters

B: curved boundaries (default: straight)

C: result is a curve (default: facet surface)

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')

GM.CSTOSURFACE() surface from calculation sections

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)

name: name of source object

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).

N: omit ends (faces with constant x)

GM.CORNERS() identify corners

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.

curve: name/refnr. of the curve

proj: projection where cornes are identified (X=1, Y=2, Z=3)

arr: integer array for receiving result, the corners are returned at this order: upper right, lower right,
lower left, upper left

adj: (opt) adjust angle

GM.CORNERS(curve,proj,arr,angle,opt)

This returns all points classified as corners. Corners are identified as knuckles exceeding the
given angle

angle: angle criteria (degrees)

opt: options

A: this must be given in order to distinguish this case form the previous one

GM.COUNT() get number of parts

Returns the number of parts of a surface or branches of a curve.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1322 / 7399


NAPA for Design Manuals 2016.3

n=GM.COUNT(obj,opt)

obj: name/refnr. of the surface or curve

opt: options

O: count also openings (inner boundaries)

GM.GIRTH() girth along a surface

This function calculates a girth along a surface in various ways.

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.

name: name of the surface

p1: point1 (3D, real array)

p2: point2 (3D, real array)

desc: (opt) description for receiving the section curve from p1 to p2

d: distance along surface, -9 returned if distance not obtained

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.

name: name of the surface

axis: intersection axis

q: intersection coordinate

ref1: reference object1 (name of an object or 'axis=c')

ref2: reference object2 (name of an object or 'axis=c')

n: number of points generated between ref1 and ref2

xarr: real array for receiving the x coordinates

yarr: real array for receiving the y coordinates

zarr: real array for receiving the z coordinates

opt: options

E: get also points at ref1 and ref2 (number of points is NP+2)

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.

gv: girth value (negative or positive)

other parameters as above

GM.EXTRAPOLATE() extrapolate curve

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)

curve: curve to be modified, name or reference number

l1: extraplation at the start

Copyright © 1992 - 2016 NAPA. All rights reserved. 1323 / 7399


NAPA for Design Manuals 2016.3

l2: extraplation at the end

GM.UVALCURVE() modify curve to consist of unique function values

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)

curve: name of the curve to be modified

newcur: name of the new modified curve

axis: argument axis (1=X 2=Y 3=Z)

plane: plane where the curve has constant values (1=X 2=Y 3=Z)

opt: (optional) 'MAX' (default) or 'MIN'

1.4. Relative locations between objects

GM.INSIDE() test whether a point is inside closed object

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)

refobject: object to check, must be surface or curve

u,v: given point in the projection

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.

refobject: name of reference object

object: name of object to be tested with respect to 'refobject'.

EXAMPLES:
@GM.INSIDE('R601',22,0,3) -> 1 if (22,0,3) inside R601
@GM.INSIDE('DAMHULL','R10')
@IF GM.INSIDE('STABHULL',P) THEN ...

GM.OVERLAP() detect overlaps

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)

ovl: function value, 1=there is an overlap, 0=not.

name1: name of the first operand. Must be a non-combined object

name2: name of the second operand. Same restriction.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1324 / 7399


NAPA for Design Manuals 2016.3

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.

name: name of room to be tested

testobj: object to be tested for overlap

limits: real array containing the limits of a box, xmin,xmax,...zmax

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:

P: plot the points

R: see above

GM.POINTINSIDE() get point inside an object

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.

name: name of the object

opt: options:

X: return the result as two coordinates (y,z) (x-projection), similarly Y, Z

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.

P: show the point graphically

GM.POINTINSIDE(name,p,opt)

As above, the the result is returned in the array p provided by the caller.

GM.WHATSIDE() location with respect to open surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1325 / 7399


NAPA for Design Manuals 2016.3

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)

surface: name of surface

point: point to be tested, either name of object, three coordinates or array with three values

axis: direction in which to do the test, 1=x, 2=y, 3=z.

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)

GM.WHATROOM() locate point in set of rooms

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)

collection: name of combined room

point: point to be tested, either name of object, three coordinates or array with three values

opt: options

B: relevant if 'collection' is an arrangement containing combined objects. By default, the


compartment returned is the one belonging to the arrangement. With this option, it is always an
elementary part.

EXAMPLE
@NAME=GM.WHATROOM('ARR*A',40,3,4)
Name of room in the current arrangement containing the point

(40,3,4)

GM.POS() get position of objects

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)

nlist: string array containing the names of the objects

axis: axis at which coordinates are to be returned, 1=x, 2=y, 3=z

saxis: axis of the section plane, 1, 2 or 3

q: section coordinate

options:

L,U,C,A: select place in the section where to get the coordinate, default=at the coordinate qs

L: measure the coordinate at the lower limit

U: measure the coordinate at the upper limit

C: measure the coordinate at the midpoint

A: take the average of min/max on AXIS

O: select only surfaces with orientation=AXIS

Copyright © 1992 - 2016 NAPA. All rights reserved. 1326 / 7399


NAPA for Design Manuals 2016.3

S: treat missing sections and points silently

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).

qrec: array for receiving the result

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'

GM.ACOMP() adjacent compartments

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.

P: 'pcurve' represents a projection in the direction of the orientation of the surface.


Default=pcurve is in the surface.

X: with point object: apply as on an x-limit, similarly Y, Z.

GM.COMPCURVES() compare curves

The function tells whether two plane curves have the same shape and optionally generates the
difference.

same=GM.COMPCURVES(curve1,curve2,tol,result,opt)

same: 1=same shape, 0=not, -9=error

Copyright © 1992 - 2016 NAPA. All rights reserved. 1327 / 7399


NAPA for Design Manuals 2016.3

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.

curve2: name of second operand. Other conditions as for 'curve1'.

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.

R: reflect 'curve2' around y before the check

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)

Return 1 if the curves A and B coincide with 0.001 m tolerance.

@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.

GM.DIST() distances between objects

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

OBJ1: first object

OBJ2: second object

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

DIR: direction; X,Y,Z,-X,-Y,-Z,+X,+Y,+Z The signed directions correspond to distances where


sign*(p2(dir)-p1(dir))>0

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

S: use calculation sections of rooms

B: calculate distance to boundary of room. As a default, objects totally inside a room result in
D=0

A: use both alternatives of intersection AXIS

Copyright © 1992 - 2016 NAPA. All rights reserved. 1328 / 7399


NAPA for Design Manuals 2016.3

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)

Calculate distances from a set of points to an object.

D: function value i.e. the largest distance from the point set to the object

OBJ: name of object

XARR: real array of x-coordinates

YARR: real array of y-coordinates

ZARR: real array of z-coordinates

DARR: real array for the distances

1.5. Elements of object definitions

GM.RLIM() get part of a room boundary

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)

room: name of the room

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.

axis: 'location' surface

1: x-plane whose coordinate is q

2: y-plane whose coordinate is q

3: z-plane whose coordinate is q

'X=q': x-plane whose coordinate is q

'Y=q': y-plane whose coordinate is q

'Z=q': z-plane whose coordinate is q

name: name of a surface

q: (opt) coordinate of a principal plane. The parameter is used only if axis=1,2 or 3.

tra: (opt) transformation (default=1).

3: symmetric surface

2: reflected surface

1: take the surface as such

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1329 / 7399


NAPA for Design Manuals 2016.3

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

GM.RLIMITS() get room limits

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)

room: name of room

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1330 / 7399


NAPA for Design Manuals 2016.3

GM.RLIMITS(room,res,opt)

Get surfaces used in the room definition

room: name of the room

res: a string record for the names of the surfaces

opt: options

A: all surfaces (also those outside room limits)

B: only surfaces in the boundary of the room

P: return inclined planes in form P=(vnx,vny,vnz,d)

GM.CURTOTAB() definition points into arrays/table

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)

The array parameters can be omitted, beginning from the end.

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)

x,y,z: real arrays (type 2) for receiving the coordinates

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.

opt: (opt) options. D=return angles in degrees.

D: return angles in degrees

2: take the second base curve (CNS) or the generator (DCYL)

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.

table: name of table with prefix.

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,' ')

GM.TABTOCUR() update curve from table

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)

name: name of the curve

def: string array containing the definition points

Copyright © 1992 - 2016 NAPA. All rights reserved. 1331 / 7399


NAPA for Design Manuals 2016.3

a1: string array containing angle conditions before the points. Empty value where no angle
condition. The slash is optional.

a2: similarly after the points.

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.

table: name of table including prefix.

EXAMPLES
@GM.TABTOCUR('STEM',DEF,A1,A2)

The curve 'STEM' is updated using the arrays DEF, A1 and A2.

@GM.TABTOCUR('STEM','TAB*CURVE','XZ *','Y 0')

The curve STEM is created from the information the given table and the given parameters.

1.6. Related to parameters

GM.I2P() find parameters used in the given geometric items

n=GM.I2P(iref,pref,opt)

n: (output) number of parameters

iref: description containing the geometric items

pref: description for the parameters

opt: options

*: first level reference (corresponding to DES *object)

**: second level reference (corresponding to DES **object)

U: store users of the parameters also (-> rec. 21611)

P: store names of the parameters also (-> rec. 21614)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1332 / 7399


NAPA for Design Manuals 2016.3

The geometry description iref has the following records:


1610: names of objects
21613: (opt) items of objects
For each object there is one value coded as follows:
0= all items
>0: 100*i1+10*i2+i3, where
i1: number of item (0=all, >0: index of point etc.)
i2: type of item (1=point,2=angle before,3=angle
after,0=all)
i3: projection (1=location surface,2=shape
definition,0=all)
<0: number of a record containing a set of codes

The parameter description pref has the following records:


21610: names of parameter sets
21611: parameters coded as
1000*'set in record 21610'+'parameter in the set'
21614: (opt) names of parameters
i: (opt) users of the i'th parameter in record 21611 (or 21612)

GM.P2I() find users of the given parameters

n=GM.P2I(pref,iref,pref2,opt)

n: (output) number of geometric items

pref: description containing the parameters closer spec. by 'item'

iref: description for the geometric items

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

I: add items of objects also (-> rec. 21613)

P: add names of the parameters also (-> rec. 21614)

The parameter description pref has the following records:


21610: names of parameter sets
21611: parameters coded as
1000*'set in record 21610'+'parameter in the set'
21614: (opt) names of parameters
i: (opt) users of the i'th parameter in record 21611 (or 21612)

The geometry description iref has the following records:


1610: names of objects
21613: (opt) items of objects
For each object there is one value coded as follows:
0= all items
>0: 100*i1+10*i2+i3, where
i1: number of item (0=all, >0: index of point etc.)
i2: type of item (1=point,2=angle before,3=angle
after,0=all)
i3: projection (1=location surface,2=shape
definition,0=all)
<0: number of a record containing a set of codes

GM.PSET() handle run time set of parameters

GM.PSET(sets,opt)

Add,update or delete parameter sets from the runtime set

set: name of the PDEF*set or string record containing names of the pdef*sets

Copyright © 1992 - 2016 NAPA. All rights reserved. 1333 / 7399


NAPA for Design Manuals 2016.3

opt: option

A: add pdef*sets to the runtime set

U: update runtime set by the pdef*sets

AT: as A, and also update PDEF*tables in the work area

UT: (default) as U, and also update PDEF*tables in the work area

D: delete pdef*set from from the runtime set

r=GM.PSET(idata)

Read data from the runtime set of parameters

idata: identifier of the data

SETS: parameter sets

NAME: parameters

VALUE: value of parameters

DEF: definition of parameters

DES: description of parameters

TYP: type of parameters

SET: pointer to the SETS column for each parameter

r: (output) record in the runtime set of 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.

imod: type of change

K-1: (default) all expressions are converted into numeric items

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)

Define use of the gm-parameters in the calculator

icalc: calculator mode

+: parameters of the runtime set are used in the calculator also

-: the parameters are not available in the calculator

GM.PDEF() component of point definition

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)

curve: name or reference number of the given curve

point: point number, 1=first definition point etc

Copyright © 1992 - 2016 NAPA. All rights reserved. 1334 / 7399


NAPA for Design Manuals 2016.3

aspect: (opt) property to be returned

D: definition of the location (default)

A1: angle condition before the point

A2: angle condition after the point

T: both angles and location

GM.PDEF(curve,1,'P')

Special case, return number of points.

2. Service functions, surface editing

2.1. Management

GME.OPEN() open new work area

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.

GME.CLOSE() delete work area

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)

id: identifier of the process.

GME.TIDY() remove geometry from the run time memory

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:

N: remove curves but not the preparation result

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.

GME.WORKAREA() change work area

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)

value: Function value: 1=done, -1=error.

id: identifier of the process as in GME.OPEN.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1335 / 7399


NAPA for Design Manuals 2016.3

name=GME.WORKAREA()

name: name of the current work area.

GME.STATUS() status of work area

The function value is 0=not opened, 1=opened, no current surface, 2=surface current,
3=surface current and changed.

GME.GET() get a surface for editing/tell current surface

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)

name: name of general surface.

opt: options:

R: allow use of data in the run time store, default is to force reading new curves from the data
base.

B: read backup data from the auxilary data base

N: do not update the display

GME.GET()

Without parameters, the function value is the name of the current surface or empty=none.

GME.NEW() initiate new surface

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)

name: name of the new surface

size: initial size, either

arr: array containing xmin, xmax, ymin, ymax, zmin, zmax

sel: string, A or F referring to the reference dimensions.

opt: options:

!: allow replacing of a surface with this name

P: make it a patch surface, similarly G, W.

X: assign orientation X, similarly Y, Z.

-: in combination with X, Y or Z: assign outside to the negative direction

GME.PART() make surface part active/get list of parts

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.

GME.ADDCURVE() add curve to surface/editing process

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1336 / 7399


NAPA for Design Manuals 2016.3

name: name of curve

opt: options

E: to editing process only, do not add to the surface

F: force reading a new copy from the data base, default=reject if the curve is already in use

B: as F, but read from the backup

R2: set the new curve as a boundary curve

R3: set the new curve as a secondary curve

GME.REMOVECURVE() remove curve from the surface/editing process

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)

name: name of curve

opt: options

S: remove from the surface, keep in the editing process.

K: keep references to the curve

R: remove references to the curve, keep the curve

F: replace removed references with fixed points

P: as F, but only if the removed reference is to a point object

O: as F, but only if the curve would otherwise be truncated.

D: delete curve completely from memory and data base

GME.CURVETYPE() inquire or change the type of curve.

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()

Return type of the current curve or 0 = no current curve

GME.CURVETYPE(name)

Return type of the given curve

GME.CURVETYPE(name,opt)

Change type of the given curve

name: name of curve

opt: options

B: change the curve type to boundary curve

P: change the curve type to primary curve

S: change the curve type to secondary curve

GME.LOCK() lock/unlock curve/surface

The given curve/surface is locked or the lock removed.

GME.LOCK(name,opt)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1337 / 7399


NAPA for Design Manuals 2016.3

name: name of curve/surface

opt: options

L: lock curve

U: unlock curve

LWS: lock all curves of current surface

UWS: unlock all curves of current surface

EXAMPLE
GME.LOCK('KNA','L')

Curve KNA will become locked against changes.

GME.LOCK('HULLA','UWS')

Releases lock from all curves of surface HULLA.

GME.UNDO() undo the last change/control UNDO

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()

With no parameters, the last change is canceled.

GME.UNDO(opt,op)

Special functions.

opt:

UNDO: undo the last undo (=redo)

?: return 1 if there are curves available for undo, else 0

??: return 1 if FIX on else 0.

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.

FREE: restore normal function after FIX or B

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.

GME.SAVE() save edited objects

The current objects are written to the data base. Not needed if the auto-store mode is on (see
options).

GME.BACKUP() save backup copy

A backup of the current surface is made by storing the curves and the surface in DB4.

GME.BACKUP()

GME.RESTORE() restore surface

The last copy made with GME.BACKUP is restored. The function value is 1=done, 0=error.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1338 / 7399


NAPA for Design Manuals 2016.3

GME.RESTORE(opt)

opt: options

F: allow reading an old backup, default=must be done in the current session.

N: do not update the display

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() update the surface

This function updates the dependent curves of the current surface.

GME.UPDATE(opt)

opt:

N: do not update the display

X: do not try to recover from cross referencing

S: correct cross referencing silently

SS: correct cross referencing silently, do not report the original problem

P: do also preparation of the surface, see also GME.PREP.

PP: do only preparation of the surface

W: (with P): write the result to the data base even if option SAVE=0

Q: correct cross referencing after asking for permission

GME.PREP() prepare the surface

The function runs preparaion of the surface or diagnostics related to it

GME.PREP(opt):

opt:

W: write the result to the data base even if option SAVE=0

DD: (draw diagnostics) same as PREP DD.

DDP: as DD, but make the result permanent, default=disappears at the next update of the
view.

LD: (list diagnostics) same as PREP LD.

GME.CHANGED() handle effect of changed curve

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)

name: name of changed curve

opt: options: X, S, SS and Q as for GME.UPDATE.

2.2. Managing the graphic display

Copyright © 1992 - 2016 NAPA. All rights reserved. 1339 / 7399


NAPA for Design Manuals 2016.3

GME.VIEW() add/remove view

The function controls the set of views covered by the update services. Function value=empty.

GME.VIEW(nr)

nr: view number, >0=add, <0=remove

GME.VIEW()

This form returns the list of currently active views as the reference number of the internally
used list.

GME.REDRAW() update views

The function concerns the views managed by the editing process (see GME.VIEW). Function
value=empty.

GME.REDRAW(opt,view)

opt: (opt) options. Default=same as !VIEW R for the views concerned.

R: complete redraw of default contents (curves and point objects) after emptying the display.

S: assign the SIZE recorded (from GME.GET or GME.SIZE).

view: (opt) view concerned, default=all

GME.SIZE() set size of object

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:

C: calculate the size from the curves of the current surface.

P: output the values into the given array. Needs option C.

S: save the size, used when doing GME.REDRAW with option S.

O: do not apply the size (relevant with option S).

GME.PLOTOLD() draw old shape of curves

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)

opt: (opt) options

P: permanently, default=disappears at the next view update

2: cover two changes backwards (must be OPT UNDO >1), similarly higher numbers. Can also
be given as a number.

B: plot the backup-curves in the auxiliary DB

BD: plot the curves as presently in the main DB

col: colour, default 3

view: (opt) view concerned, default=all

GME.PLOTPOINTS() mark points of specified type

Copyright © 1992 - 2016 NAPA. All rights reserved. 1340 / 7399


NAPA for Design Manuals 2016.3

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.

D: primary definition points

P: points obtained by reference

L: as P, but use a line segment indicating the referencing curve.

PA: points having an angle specification

LOC: points in the definition of the location surface (when defined as a projection).

A: mark explicit angles

marker: (opt) marker number, for L and A, line thickness. 0=default.

col: (opt) colour, 0=default.

size: (opt) size, 0=default.

opt: (opt) options

V: to the current view only

P: permanently, default: erased at next redrawing.

GME.CURVATURE() assign a list of curves for curvature plotting

Curvature is always shown for the curves given by the user.

GME.CURVATURE(array)

array: string array containing the names of the curves for the curvature display, 0: empty the list

2.3. Current curve and point

GME.IDENTIFY() identify object at a given point

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:

the locator (-2)


an angle indicator (-1)
>0: curve or point object with the given number.

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

C: make the curve/point current if identified

P: take only curves (not angles, locator)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1341 / 7399


NAPA for Design Manuals 2016.3

L: ignore curves that are locked against changes

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.

GME.CURRENT() tell current object

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() current curve(s) or point object(s)

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.

sel: selection of data:

N: curve names (all curves currently treated). The alt. T,R and B are indexed as this one, D
gives indices in this record.

S: curves in the surface

T: object types (1=curve, 2=tangent function, 10=point)

R: reference numbers

B: reference numbers to backup copies (for UNDO), 0=none

D: curve indices in dependence order

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.

1: as option O, but list only names of the boundary curves

2: as option O, but list only names of the primary curves

3: as option O, but list only names of the secondary curves

arr: (opt) string array, needed as receiver with sel=O.

GME.POINT() index of current point

The function value is the index of the current point. 0=no point current.

GME.SELC() make curve current

A curve or point object is made current. The highlight is changed in the display.

GME.SELC(name)

name: name of curve. It must be in the set edited.

GME.SELC(di)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1342 / 7399


NAPA for Design Manuals 2016.3

Selection based on dependence order,

di: 1=take next, -1=take preceding, 0=take first.

GME.SELC('+')

Special case: select next curve in the current node

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() select point on curve

The function makes a point on the current curve current.

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()

Special case: return nr of points on the current curve.

GME.NEXTP() next point on curve

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:

P: take preceding point

A: make the curve and point active

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.

2.4. Properties of curves and points

GME.DES() return definition as text

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)

macro: refnr. of the receiving macro

curve: (opt) name or index of curve, default=current curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1343 / 7399


NAPA for Design Manuals 2016.3

GME.DEF() component of curve/point definition

The functions returns items related to the definition of a point on the current curve or the curve
as such.

GME.DEF(qnt,curve)

qnt: quantity The 8 first items are strings.

P: definition (as in the definition command)

A1: angle condition before the point

A2: angle condition after the point

T: complete definition (A1+P+A2 combined)

SC: side condition of the curve

LOCS: location surface

SORT: sorting criterion

TEXT: descriptive text

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

NP: number of definition points

NAME: name

curve: (opt) name or index of curve, default=current curve

GME.COORD() coordinates of the current point

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()

GME.SORT() sorting method of the current curve

The function value is the sorting method of the current curve, values as in GME.NEWDEF
(X,Y,Z,F,G).

GME.IM() interpolation method

The function returns the interpolation method of the current curve, alt. M1, M2 or XYZ.

GME.LOCKED() tell whether a curve is locked

The function tells whether a curve can be changed.

lock=GME.LOCKED(curve)

lock: function value

-1: error. e.g. missing curve

0: no restrictions

1: the curve is locked by the old locking function (command LOCK/DEF)

2: the curve is locked in the data base (by DB.LOCK)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1344 / 7399


NAPA for Design Manuals 2016.3

4: the current user does not have write access

curve: (opt) name of curve or surface. Default=the current curve.

n=GME.LOCKED(list)

This form returns a list of all locked curves or surfaces.

n: number of objects returned

list: string array for receiving the result.

2.5. The locator

GME.SETLOCATOR() assign location of the locator

The coordinates of the locator are updated and the display updated.

GME.SETLOCATOR(x,y,z,opt)

x: new x-coordinate, -999=no change

y: new y-coordinate, -999=no change

z: new z-coordinate, -999=no change

opt: options A I: the given values are increments

GME.SETLOCATOR(opt)

Special functions

opt: options

F: fix the locator to the curve pointed at in the current view.

GME.GETLOCATOR() coordinate of the locator

The function returns a coordinate of the locator.

GME.GETLOCATOR(axis)

axis: 1,2 or 3: return x, y or z

arr=GME.GETLOCATOR()

Return an array containing the coordinates x, y, z.

GME.MOVELOCATOR() interactive change of locator position

The function starts an operation where the locator is changed by moving with the cursor.

GME.MOVELOCATOR(opt)

opt: restrictions on the movement. Needed if general projections used.

X: allow changes in the x-direction only, similarly Y, Z.

FX: do not change x, similarly FY, FZ

2.6. Options

GME.SETOPTION() assign options

GME.SETOPTION(id,value)

value: value of option

Copyright © 1992 - 2016 NAPA. All rights reserved. 1345 / 7399


NAPA for Design Manuals 2016.3

id: identifier of option

SAVE: automatic save in the data base, 1=yes, 0=no. Default=0.

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.

DEC: number of decimals when converting graphic input

ILS: include location surface: imply option L in MOVE and MOVEI.

MXDX: for checking against unreasonable changes: upper limit for changes of x, default
0.1*LREF. Similarly MXDY, MXDZ, default 0.1*BDWL.

CC: curve colour, default=1

ACC: auxiliary curve colour, applied to curves not in the surface, default: 0=same as CC.

LCC: locked curve colour, default=13

BCC: boundary curve colour, default=41

SCC: secondary curve colour, default=6

CHL: highlight colour for curves, default=5

PHL: highlight colour for points, default=5

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.

ILO: 'ID L' on: 0=not, 3=all curves, 1=current curve

IAO: 'ID A' on: 0=not, 3=all curves, 1=current curve

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.

CRVI: curvature indication in interactive operation: 0=not, 1=colour *, 2=porcupine, 3=apply


CRV (default).

CRVO: curvature indicator (porcupine) on: 0=not, 3=all curves, 1=current only, 2=both curves
at node

CRVR: curvature indicator (porcupine) representation: 1=vectors, 2=vectors+envelope,


3=envelope, 11,12,13=same without weighted averaging

CRVS: scale factor for the curvature indicator

ITOL: tolerance for identification of points and curves, 0.1 mm screen scale, default=15 (1.5
mm).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1346 / 7399


NAPA for Design Manuals 2016.3

MTOL: tolerance for real time operations, unit 0.1 mm screen scale, default 2.

DPAU: pause after redrawing in real time operations, milliseconds/curve, default 0.

PREX: Prefix for new frame curves. Default: 'FR'

PREY: Prefix for new buttock curves. Default: 'BT'

PREZ: Prefix for new waterline curves. Default: 'WL'

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() get value of option

The values are read from the active surface.

GME.GETOPTION(id)

id: identifier, see GME.SETOPTION.

GME.OPTID() id and explanation of option

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)

Returns a short explanation of the i:th option.

2.7. Preparation options

GME.SETPOPT() assign preparation options

GME.SETPOPT(id,value)

value: value of preparation option

id: identifier of option

TTOL: topology tolerance. Must be at least 1.5 times the GMTOL

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

WSC: weight of smoothing in curve approximation. (0...1)

ERED: reduction of control points in equiparameter curve approximation.

ETOL: approximation tolerance for the equiparameter curves of the surface

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1347 / 7399


NAPA for Design Manuals 2016.3

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')

Set all preparation options back to the default values.

GME.GETPOPT() get value of a preparation option

GME.GETPOPT(id)

id: identifier, see GME.SETPOPT.

GME.POPTID() id and explanation of a preparation option

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)

Returns a short explanation of the i:th option.

GME.PREPDIAG() visual preparation diagnostics

The function plots information about the results of the preparation

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)

Plot normal vectors along the boundary curves

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

nsamples: (opt) number of samples for normal display, default: 100

2.8. Various functions

GME.NODE() information about node

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)

descr: description for receiving the result:

1: names of objects

2: curves: index of the curves in Hull Surface Editor administration.

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

6: coordinates of the node.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1348 / 7399


NAPA for Design Manuals 2016.3

point: (opt) point number, default=current point

name: (opt) curve, default=current curve

GME.CONSTRAINT() constraints implied by location surfaces

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.

2.9. Editing functions, points

GME.MOVE() assign new position to a point

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:

I: treat x,y and z as increments, default=as new absolute values

P: allow secondary point to become primary

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.

N: do not apply movement constraints caused by the location surfaces involved

O: allow change of order between points, default=restrict changes so that the ordering is not
changed.

!: do the change even if the maximum allowed change is exceeded

X: disregard other changes than those in the x-direction, similarly Y and Z.

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.

GG: as G but raise error if not principal projection.

Q: do not change qualifiers of references to this point (like FRA/Z=3).

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.

R: restrict so that only the largest one of dx, dy or dz is obeyed.

L: allow the location projection to change, if the selected point contains a degree of freedom.

LL: change the only the location projection

Copyright © 1992 - 2016 NAPA. All rights reserved. 1349 / 7399


NAPA for Design Manuals 2016.3

E: (after L or LL): apply only if the current curve has a location surface defined in the current
projection.

B: ignore effect of option LPO=4 (no implied L option)

A: adjust arguments of moved location points

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)

As above, but the coordinates are taken from the locator.

GME.MOVEI() change point by real time operation

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.

O: do not apply constraints derived from attempts to preserve point ordering.

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.

L: as in GME.MOVE, also LL, E.

B: ignore effect of option LPO=4 (no implied L option)

A: adjust arguments of moved location points

Q: do not change qualifiers of references to this point (like FRA/Z=3).

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() add primary definition point

The function adds a primary definition point to the current curve.

GME.ADD(opt)

Add the point represented by the locator.

opt: options

L: add also to the location surface if applicable

Copyright © 1992 - 2016 NAPA. All rights reserved. 1350 / 7399


NAPA for Design Manuals 2016.3

LL: add to the location surface only

GME.ADD(u,v.opt)

Add a point with the given coordinates.

GME.ADD(x,y,x,opt)

Add a point with the given coordinates.

GME.FIX() fix a point

A point on the current curve is fixed, i.e. made a definition point.

GME.FIX(opt)

The selected place is designated by the locator.

opt: options

L: fix also the location surface if applicable

LL: fix the location surface only

G: interprete (x,y,z) according to its projection in the current view.

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)

Add a point at the place desigated by the given coordinates.

GME.FIXNODE() fix a node

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)

u,v: (opt) point in the projection for selecting the node

opt: P: use the locator for selecting the point.

GME.DELETE() remove point

The function removes a definition point.

GME.DELETE(opt)

opt:

F: remove the current point regardless of its type. Default: remove only primary points.

L: delete a location surface point if present

LL: delete a location surface point only

C: if the current point is not a primary point, try to identify one in the current node.

GME.RELAXNODE() relax curves at 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.

GME.RELAXCURVE() relax points of the current curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1351 / 7399


NAPA for Design Manuals 2016.3

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)

list: integer array containing list of points to be relaxed.

GME.CLEANNODE() clean environment of a node

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.

SS: as option S, but do not raise error even if no point is found

T: double the range where primary points are fetched, default=0.02*BDWL.

TT: increase the range four times

TTT: increase the range eight times

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.

D: allow deleting even if the point is represented by a point object.

P: allow redefining of point object defining the removed point for fixing the node

A: do the operation for all nodes

GME.CLEANLOC() arrange points in the location surface

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:

T: double the tolerance, default=0.05*BDWL

TT: increase the tolerance four times

TTT: increase the tolerance eight times

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

FF: as F, but also for non-primary points

GME.FAIR() apply fairing algorithm

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1352 / 7399


NAPA for Design Manuals 2016.3

Parameters can be omitted from the end.

tol: allowed change

opt: options:

C: move the current point only. It must contain a primary point, but it may be on another curve
in the node.

K: keep the current point

L,N,X,FX...: as in in GME.MOVE for controlling the the constraints added.

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.

GME.ADDREF() add reference(s)

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

Q: add a qualifier to the reference (.../axis=q). Default if xyz-curve. Similarly X, Y or Z,


specifying the axis.

D: allow the deletion of a primary point at the place indicated

A: allow the addition of a repeated reference

R: allow the replacement of an existing reference to given curve

P: only allow references to the primary curves

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:

G: distinguishes this case

E: exclusive, omit any preceding definition points

P: take only references from primary curves

X: take only references from frames. Similarly Y and Z for buttocks and waterlines

GME.ADDREF(opt,syntax)

The reference is given by the normal curve reference syntax.

opt: options A, R and D as above. Must not be omitted in this case.

syntax: curve reference syntax, e.g. 'name, name/name.

GME.REVERSE() reverse dependence at a node

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1353 / 7399


NAPA for Design Manuals 2016.3

GME.REMOVEREF() remove reference from the current node

The function is valid for a node where two curves meet. It removes the reference from the
active curve.

GME.REMOVEREF(opt)

opt: options

R: update screen also

GME.CLEANREF() remove inactive references

References given in the curve definition but not resulting in a point are removed.

GME.CLEANREF(opt)

opt: options:

A: check all curves, default=current curve

2.10. Editing functions, angles

GME.CHANGEANGLE() assign curve direction

The function changes the value of an angle condition at the current point.

GME.CHANGEANGLE(value,opt)

value: new direction or change of direction

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.

A: select the angle after 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.

F: fix, the original angle may be unspecified or defined indirectly.

P: do not accept the change unless the angle affected is the one visible in the current
projection.

GME.FIXANGLE() add angle condition

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.

A: select the angle after the point

P: fix the angle in the current projection (xyz curves only)

R: allow also fixing of an indirectly given angle, default only undefined or free angles.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1354 / 7399


NAPA for Design Manuals 2016.3

V: make vector, default if XYZ curve, requires method M2

GME.FREEANGLE() make an angle free or undefined

The function either removes an angle condition or makes it a free angle.

GME.FREEANGLE(opt)

opt: options

D: delete, remove the angle condition, default=make a free angle.

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.

A: select the angle after the point

GME.ANGLEI() change angle by real time operation

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.

A: select the angle after 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.

2.11. New curves, changing curve type and location surface

GME.MOVELS() move the location surface

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.

NN: as N, but reject if no match found.

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1355 / 7399


NAPA for Design Manuals 2016.3

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.

GME.MOVELSI() interactive move of the location surface

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.

GME.POINTOBJECT() create point object for primary point

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

!: allow the operation even if the point object already exists

A: add the reference to all curves at the node, default=to the first one in the dependence order.

GME.DELETEPOINT() replace point object by fixed coordinates

(Reverse to GME.POINTOBJECT). The primary definition of the current point is supposed to


be a point object which is replaced by fixed coordinates in the referencing curve.

GME.DELETEPOINT()

GME.NEWCURVE() create new curve

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.

type: type of curve, either X, Y or Z.

opt: options, compulsory if 'locs' follows

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.

F: use fixed coordinate, overrides rule for P option.

A: add the curve to the surface

R2: make the new curve a boundary curve

R3: make the new curve a secondary curve

Copyright © 1992 - 2016 NAPA. All rights reserved. 1356 / 7399


NAPA for Design Manuals 2016.3

G: make the curve pass through the existing grid curves

G1: make the curve pass through only primary curves

X: keep x fixed (in the projection plane). Ignored if type=x or option G given. Similarly Y and Z.

E: make the initial extent as large as the surface.

3: make the curve contain three primary points, default=2. Ignored if G option. Similarly 4...9.

O: allow the locator to be outside the range.

N: try to adjust the fixed coordinate to the nearest definition point. For the tolerance, see T
option.

T: double the range for N option, default=0.01*bdwl.

TT: increase the range four times

!: 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.

coord: constant coordinate (number)

location: location surface in definition syntax

GME.GENLOCS() convert to curve with general location surface

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.

GME.GENPLANE() convert to curve with general location plane

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.

P: as X, Y or Z but make the decision on thge basis of the curve.

GME.CONVERTXYZ() convert to xyz curve

The current curve is converted to an xyz curve.

GME.CONVERTXYZ()

GME.RENAME() rename the current object

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1357 / 7399


NAPA for Design Manuals 2016.3

GME.RENAME(name,opt)

name: new name

opt: options

'!': allow redefinition of an object with this name, unless it is part of the current surface.

2.12. Using the alphanumeric representation

GME.NEWDEF() change definition by input syntax

This function changes a component of a curve definition by a definition in the command syntax.

GME.NEWDEF(aspect,definition)

aspect: property changed:

P: position, also available for points.

A1: angle condition before. Slash (as last character) optional.

A2: angle condition after. Slash (as first character) optional.

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. -//-.

SC: side condition

TEXT: descriptive text, also available for point

SORT: sorting method: values X,Y,Z, F=fixed, G=general, GE=general with ends fixed.

SA: (sort for all): as SORT, but apply to all curves

IM: interpolation method M1 or M2. Ignored for XYZ curves (always M2).

IMA: (IM for all): as IM but for all curves.

definition: text providing the definition in the normal input syntax. For specal values, see above.

GME.RUN() run macro

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)

2.13. Standalone functions (no work area)

GME.MOVESO() move point

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)

curve: name of curve or reference number

point: index of the definition point concerned. GME.DEFPOINT can be used for giving a point index
when knowing coordinates.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1358 / 7399


NAPA for Design Manuals 2016.3

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).

opt: options, always the last parameter.

P: interprete two coordinates as being given in the current projection (XYZ curves only)

I: treat the given coordinates as increments, default=as absolute values.

R: restrict the effect so that only the direction getting the largest change is changed.

W: write the result to the data base

EXAMPLES
@gme.moveso('FRF',1,0,0.5)

Moves the first point of FRF to the point Y=0, Z=0.5.

@gme.moveso('FRF',1,0,0.5,'I')

As above, but the values are a change to the current ones.

@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')

Otherwise as above, but the function is specified as a calculator function.

GME.DEFPOINT() identify definition point

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)

curve: name of curve or reference number

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.

opt: options, always the last parameter.

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.

T: set tolerance=0.05, default=0.005.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1359 / 7399


NAPA for Design Manuals 2016.3

3. Events of group GM

GM*CHANGE redefinition of object

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)

name: name of object

type: main type: P, C, S, R, SO as in selection criteria.

GM*UPDATE update of object

This event is raised when run time objects are updated because of changes in a referenced
ones. (10002).

GM*UPDATE(list)

list: string array, list of objects changed

GM*UPDDB() updates done from the data base

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

GM*REMOVE object removed from the run time memory

The event is raised when an object is removed from the run time memory (command RMV,
function GM.REMOVE).

GM*REMOVE(name)

name: name of object removed

4. Events of group GME

GME*CURRENT change current component

The event is raised when the current component has been changed (460001)

GME*CHANGE curve changed

The event is raised when the curve(s) have been changed. (460002)

GME*CHANGE3D location changed in interactive operation

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)

x,y,z: the new position

GME*CHANGE2D location changed in interactive operation

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1360 / 7399


NAPA for Design Manuals 2016.3

u,v: the new position

GME*CHANGEANGLE angle changed in interactive operation

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)

A: the new angle in degrees

GME*SAVEDOPTS Set the saved options

Set the options from the options dialog widget. Internal event (460011)

GME*SAVEOPTS()

GME*DEFAULTOPTS Set the default options to widget

Read the default options into the options dialogue widget. Internal event for GUI (460012)

GME*DEFAULTOPTS()

GME*FOCUSIN Focus into a drawing area

Raised when the keyboard focus is traversed into a drawing area. Internal event for GUI
(460013)

GME*FOCUSIN(id)

id Widget Id which gained the focus

GME*CLOSE Signal closing of surface

Raised when the current surface is closed. Internal event for GUI (460014)

GME*CLOSE()

GME*NEW Signal creation of a new surface

Raised when a new surface is created (460015).

GME*NEW(surname)

surname: name of the created surface

GME*LOAD Signal opening of an existing surface

Raised when an existing surface is successfully opened (460016).

GME*LOAD(surname)

surname: name of the opened surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1361 / 7399


NAPA for Design Manuals 2016.3

Lofting tables (GM)


Lofting tables are created in the LOFT - task. The table can contain for example the coordinates of defined intersection curves of the hull surface
or other surfaces, coordinates of special curves and other information on geometric quantities of selected objects.

The LIST LOFT command supports the older output format.

Table of Contents:

1. The SELECT command


1.1. Examples
2. The SPEC command
2.1. Examples
3. Output commands
3.1. LIST
3.2. PLOT
3.3. CALCULATE
3.4. SAVE
3.5. OUTPUT
3.6. FILE
3.7. WRITE
3.8. MODE
4. Arguments and options
5. Other commands
6. The KHI mode
7. The IDF mode
7.1. Circle representation
7.2. Handling of part entities
7.3. Format of coordinates
7.4. Representation of curves
7.5. Naming of plane curves
7.6. Naming of space curves
7.7. Classification of curves
7.8. Automatic reset of arguments X,Y and Z
7.9. Opening angle of circle segments
8. The SCAFO mode
9. The DXF mode
10. The NUPAS mode
11. The ID command for DXF and NUPAS modes
12. Commands in task LOFT

1. The SELECT command


The SELECT command is 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.

The syntax of the SELECT command is

SELECT abc1, abc2, ...

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

X use given x argument planes

Y use given y argument planes

Z use given z argument planes

Copyright © 1992 - 2016 NAPA. All rights reserved. 1362 / 7399


NAPA for Design Manuals 2016.3

L use constant distance between points

R use adjusted distance between points

N use constant number of intervals

C use circle representation of curves

P give all points generated by the polygonization

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.

2. The SPEC command


The SPEC 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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1363 / 7399


NAPA for Design Manuals 2016.3

The syntax of the command is

SPEC curves

where <curves> is a list of curves with the following alternatives

cname named curve


id=cname named curve with a new id
id=name1+name2+... combined curve
id=(name1,name2,...) list of curves under the same id
id=(name1+name2+...,name5,...) combination
X,Y or Z intersections with planes of the
command X,Y or Z.

2.1. Examples

SPEC PROF=STERN+STEM, FB=FBA+FBM+FBF, KN=(KN1A+KN1F, KN2)

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.

SPEC SAVE name

Save the current definition under the given name (a definition named STD is automatically retrieved when starting the task).

SPEC GET name

Retrieve the named definition.

SPEC DEL name

Delete the named definition.

SPEC CAT

Make a catalog of available definitions.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1364 / 7399


NAPA for Design Manuals 2016.3

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.

The syntax of the command is

LIST NLOF, objects, TOO, t-options

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)

sname surface to intersect with argument planes

sname/axis=q surface to intersect with the given plane(s)

sname1/sname2 surface to intersect with another surface

sname/*cname surface to intersect with a cylinder

*sname curves referenced by a surface

cname named curve

cid special curve defined with the SPECIAL command

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.

arr(): named curves from a table

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.

The syntax of the command is

LIST LOFT args, objects, TOO, t-options

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.

Available quantities for the NLOF subject are

CODE: ordinal number of the point (special curve name is included for intersection points of special curves)

NR number of the branch of the curve

X x-coordinate

Y y-coordinate

Z z-coordinate

FR x-coordinate represented by a frame number

Copyright © 1992 - 2016 NAPA. All rights reserved. 1365 / 7399


NAPA for Design Manuals 2016.3

L curve length from the start point

VTX x-component of the tangent of the curve

VTY y-component of the tangent of the curve

VTZ z-component of the tangent of the curve

TSX inclination of the curve in the x-plane

TSY inclination of the curve in the y-plane

TSZ inclination of the curve in the z-plane

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

UARC first coordinate of the center of the arc

VARC second coordinate of the center of the arc

RARC radius of the arc

HSEG segment height of the arc

HXSEG x-component of segment height

HYSEG y-component of segment height

HZSEG z-component of segment height

Available quantities for the LOFT subject are

X x-coordinate

Y y-coordinate

Z z-coordinate

FRN x-coordinate represented by a frame number

L curve length from the start point

ANG inclination of curve in the plane corresponding to the first argument

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).

The syntax of the command is

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1366 / 7399


NAPA for Design Manuals 2016.3

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.

The syntax of the command is

CALCULATE id, objects

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.

The syntax of the command is

SAVE id, objects

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.

The syntax of the OUTPUT command is

OUTPUT objects

where <objects> is a list of objects as in the LIST command.

3.6. FILE

The syntax of the FILE command is

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.

4. Arguments and options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1367 / 7399


NAPA for Design Manuals 2016.3

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.

6. The KHI mode


An interface to the system of Kawasaki Heavy Industries is selected by the command MODE KHI .

7. The IDF mode


The IDF mode provides an interface to the IMSA IDF format (Revision 3.01). The mode is selected by the command MODE IDF options. The
following options are available in the MODE IDF command. Most of these are implemented for the purposes of the SCAFO mode, that is a tailored
IDF mode.

7.1. Circle representation

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

C=2 3d-amplitude is always used

default amplitude is omitted

Copyright © 1992 - 2016 NAPA. All rights reserved. 1368 / 7399


NAPA for Design Manuals 2016.3

7.2. Handling of part entities

The required number and the creation of the PARTS is controlled by the following options:

P=i number of PARTS required (default=1)

P=OUT each OUTPUT command creates a PART (default)

P=HULL each HULL command creates a PART with the given name

7.3. Format of coordinates

The coordinates are written in meters in the format f.d, where f=field length and d=number of decimals.

7.4. Representation of curves

The representation of the curve entities in the IDF file is controlled by the following options:

R=0 curves are represented in the 3d-space (default)

R=1 space curves are represented by projections

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.

7.5. Naming of plane curves

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:

NAME curve name in the LOFT task (=default)

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 o f coordinate

7.6. Naming of space curves

The name of a space curve is controlled by the variable N2=string. The following variables can be included in the string:

NAME name of the curve in the LOFT task (=default)

PROJECTION '', XY, XZ or YZ

INDEX '', or number of subdivided part

7.7. Classification of curves

This option defines how the curves are classified into plane and space curves. The classification has an effect on the following:

namingi.e. whether to use the option N1=string or N2=string.


creating of projectionsA plane curve is always written into one projection.If R=1 or R=2, space curves have two projections, unless only
one projection has been explicitly asked by the SPEC command.
subdivision of curvesA plane curve is never subdivided.If R=2, space curves are subdivided if the v=f(u), u=g(v) criteria are violated.
However, subdivision is not done if only one projection has been explicitly asked by the SPEC command.

The following classification options are available:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1369 / 7399


NAPA for Design Manuals 2016.3

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.

7.8. 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 i.e. the commands X OFF; Y OFF; Z OFF are automatically executed after each OUT command.

7.9. Opening angle of circle segments

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

8. The SCAFO mode


The SCAFO mode is a tailored IDF mode. The command

MODE SCAFO

corresponds to the command

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.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1370 / 7399


NAPA for Design Manuals 2016.3

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

GEN x10 HULL/X=10

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.

For example, the projections XY and XZ are created by the commands

SPEC 'KNF XY XZ'=KNF; OUT SPEC

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

or a combination of curves e.g.

SPEC STEM=curve1+...+curven
OUT SPEC

and to add forced points to the result e.g.

SPEC curves
X (0 100 1)
OUT

Copyright © 1992 - 2016 NAPA. All rights reserved. 1371 / 7399


NAPA for Design Manuals 2016.3

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.

The transfer sequence is shown below.

MODE SCAFO start transfer to SCAFO

FILE dir>file define the output file

HULL hulla start transfer of hulla

... define arguments (sections, special curves etc.) and output objects in the after body ...

HULL hullf start transfer of hullf

... define arguments (sections, special curves etc.) and output objects in the fore body ...

FILE CLOSE close the output file

9. The DXF mode


The DXF mode is selected by the command MODE DXF. The outputted points are stored in the VERTEX entities of the POLYLINE entity. Only the
entities section of the DXF file is created.

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:

X x-section calculated by the link

Y y-section calculated by the link

Z z-section calculated by the link

P general plane section calculated by the link

S general section calculated by the link

G grid curve

KC knuckle curve

BC boundary curve

PC curve with the sidecondition P

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.

MODE DXF enter DXF mode

LAYER SPACE 1/X 2/Y W/Z define layers for the output

x (0 100 1) define x-sections

Y (0 10 1) define y-sections

z (0 20 1) define z-sections

FILE TEMP>EXAMPLE.DXF def ine result file

OUT HULL calculate and output the x,y and z-sections

PRE HULL define source of named curves

Copyright © 1992 - 2016 NAPA. All rights reserved. 1372 / 7399


NAPA for Design Manuals 2016.3

OUT *HULL output curves referenced by HULL

FILE CLOSE end of transfer

10. The NUPAS mode


The NUPAS mode is a tailored DXF mode. The command MODE NUPAS is equivalent to the commands

The transfer is done in principle by the following sequence of commands:

MODE enter NUPAS mode


NUPAS

FILE define the result file


dir>file

HULL sur1 define a surface for intersections

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

OUT output sections calculated from sur1

OUT curves output a set of named curves

.... e.g. output of surface/surface sections etc.

FILE close the result file


CLOSE

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

provided the definitions

LAYER SECTIONS/X; ID SECTIONS FR

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1373 / 7399


NAPA for Design Manuals 2016.3

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:

SELECT -N; NR 795 all curves have 796 points

SELECT -L; L 0.1 distanc e of points is 0.1 m

11. The ID command for DXF and NUPAS modes


In the DXF and the NUPAS modes an integer suffix that is appended to the name of the outputted layer can be defined by the command

ID layer suffix

The layer is defined by the following alternatives

n layer name

n/A layer name + restriction x<XMID,where XMID is the parameter from the reference system

n/F layer name + restriction x<XMID

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.

FR frame number (used only if integer)

X x-coordinat e (nearest integer to 1000*x is used)

Y y-coordinat e (nearest integer to 1000*y is used)

Z z-coordinat e (nearest integer to 1000*z is 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 following should be noted about the ID command:

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.

12. Commands in task LOFT

ADJUST set adjust option

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

Set the adjust option ON or OFF.

ARGS list arguments

The values of the arguments controlling the task are listed.

ASCENDING set ascending option

Copyright © 1992 - 2016 NAPA. All rights reserved. 1374 / 7399


NAPA for Design Manuals 2016.3

This option can be used to force the coordinates from the given objects into ascending order.

ASCENDING ON/OFF

Set the ascending option ON or OFF.

CALCULATE calculate coordinate tables

The command calculates the coordinate tables and puts the result into a named description
which can be accessed by table calculation routines.

CALCULATE id, objects

id: name of the result description

objects: list of objects as in LIST NLOF

CLEAN set clean option

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

Set the clean option ON or OFF.

CMOD Mode of circle segment conversion

CMOD mode

mode: conversion method

M1: old method, only plane curves are converted

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.

CONNECT set connect branches option

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

Set the connect branches option ON or OFF.

CTOL circle representation tolerance

This command sets the tolerance controlling the circle representation of curves when using the
C option with the SELECT command.

CTOL tol

Set the circle representation tolerance.

DR -> enter general drawing task

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.

DTOL adjusting tolerance

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1375 / 7399


NAPA for Design Manuals 2016.3

DTOL tol

Set the adjusting tolerance.

EDIT -> enter editor subtask

END finish the task

FIG add figure

See !EXPL FIG/GEN.

FILE open/close an output file

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

Open an output file.

dir>file: directory and file name to open

S: if given, echo the output to the file also to the sreen

FILE S Output only to the screen.

FILE CLOSE Close the current output file.

HULL name of the hull surface

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

name: name of the hull surface (OFF = default)

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.

KHI KHI mode

ID id0 did

----------

An additional numeric intersection curve id in the KHI mode is defined.

id0: id of the first intersection curve

did: id increment for the following curves

IDF IDF and SCAFO modes

ID 'options for IDF and SCAFO modes'

------------------------------------

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1376 / 7399


NAPA for Design Manuals 2016.3

B: building sections (=default) The naming rule N1=string is applied as such.

OFF: restore the default (same as the option B)

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'

DXF DXF and NUPAS modes

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.

layer: definition of layers to which the integer is appended

n: layer name

n/A: layer name + restriction x<XMID

n/F: layer name + restriction x>XMID

n/typ: layer name + restriction on the curve type (typ= X,Y,Z,P,S,G,KC,BC,PC, see !exp layer)

NUPAS: use the default suffixes of NUPAS

OFF: omit all suffixes

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.

FR: frame number (used only if integer)

X: x-coordinate (nearest integer to 1000*x is used)

Y: y-coordinate (nearest integer to 1000*y is used)

Z: z-coordinate (nearest integer to 1000*z is 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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1377 / 7399


NAPA for Design Manuals 2016.3

Example1: ID SECTIONS FR (5000,32768)

Frames 1,2,... are outputted in the layers


SECTIONS1,SECTIONS2,...
Frames whose numbers are not integers (e.g. HULL/#1.5)
are stored in layers SECTIONS5000,SECTIONS5001 etc..

Example2: ID SEAMS/A (300 399)


ID SEAMS/F (1300 1399)

Seams of after ship are stored in layers 300,...,399.


Seams of fore ship are stored in layers 1300,...,1399.

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

Resets L to not given.

LAYER layers for the output

Layers are defined for the curves , that are outputted in the DXF or NUPAS modes.

LAYER n/typ n2/typ2 ...

-----------------------

n: layer name (integer or string)

typ: (opt) type of curve

X: x-section

Y: y-section

Z: z-section

P: general plane section

S: general section

G: grid curve

KC: knuckle curve

BC: boundary curve

PC: curve with the sidecondition P

Copyright © 1992 - 2016 NAPA. All rights reserved. 1378 / 7399


NAPA for Design Manuals 2016.3

Example 1: LAYER SPACE FRAMES/X BUTTOCKS/Y WATERLINES/Z


x-sections -> layer frames
y-sections -> layer buttocks
z-sections -> layer waterlines
others -> layer space

Example 2: LAYER SEAMS


all curves -> layer seams

Note: A curve is classified as a section curve (X,Y,Z,P or S),


only if it has been calculated in the LOFT task.
For example, the curve created by X 10; OUT is a x-section
that is in the first example put into the layer FRAMES.
However, OUT X10 puts the curve X10 that has been created
in the DEF task by the command GEN X10 HULL/X=10 into the
layer SPACE, because it is no more a curve of type X.

LAYER OFF

---------

Omit all layer definitions.

LAYER NUPAS

-----------

Use the default layers of the NUPAS mode.

LIST list table

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 objects, TOO, t-options

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:

sname: surface to intersect with argument planes

sname/axis=q: surface to intersect with the given plane(s)

sname1/sname2: surface to intersect with another surface

sname/*cname: surface to intersect with a cylinder

*sname: curves referenced by a surface

cname: named curve

cid: special curve defined with the SPECIAL command

SPEC: all special curves defined with the SPECIAL command

arr(): named curves from a table

TOO: delimiter between objects and t-options

t-options: table output options.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1379 / 7399


NAPA for Design Manuals 2016.3

LIST LOFT args, objects, TOO, t-options

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.

LOFT: subject of the list

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.

TOO: delimiter between objects and t-options

t-options: table output options

LIST .macro options

Run given list macro. LIST .CAT gives catalog.

LQ list quantity selection

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.

MODE set output mode

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.

KHI Link to the lines system of KHI

MODE KHI

--------

KHI mode (KHI= Kawasaki Heavy Industries)

IDF Link to the IDF standard

MODE IDF options

----------------

IDF format of IMSA (Revision 3.01).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1380 / 7399


NAPA for Design Manuals 2016.3

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)

SCAFO Link to the SCAFO system

MODE SCAFO options

------------------

Interface to the SCAFO system.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1381 / 7399


NAPA for Design Manuals 2016.3

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.

The transfer is done as follows:

LOFT> MODE SCAFO

LOFT> FILE directory>file

LOFT> HULL hulla

LOFT> define arguments (sections, special curves etc.)

LOFT> and output objects in the after body

LOFT> HULL hullf

LOFT> define arguments (sections, special curves etc.)

LOFT> and ouput objects in the fore body

LOFT> FILE CLOSE

Notes for the SCAFO mode:

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.

options: (opt) same as in the MODE IDF command

DXF Link to the DXF standard

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.

NUPAS Link to the NUPAS system

MODE NUPAS

Copyright © 1992 - 2016 NAPA. All rights reserved. 1382 / 7399


NAPA for Design Manuals 2016.3

------------------

Interface to the NUPAS system.

Note 1: The NUPAS mode is a tailored DXF mode.


The command MODE NUPAS is equivalent to the commands
MODE DXF;
LAYER DS SECTIONS/X BUTTOCKS/Y WATERLINES/Z DS/P,
DS/S DS/G KNUCKLES/KC KNUCKLES/BC AL/PC;
CON ON;

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

Note 3: The layers can be changed by the LAYER command.


For example, 'LAYER SEAMS; X (0 100 1); OUT' puts
all the x-sections into the layer SEAMS.
The defaulted layers of the NUPAS mode are reset by
the command LAYER OFF.

Note 4: The maximum number of points in a NUPAS curve is 796.


If there are too many points, a new set must be defined
by the SELECT command. For example, 796 points are
created by using SELECT -N; NR 796;

Example: MODE NUPAS


FILE TEMP>EXAMPLE
HULL HULL
PREP HULL
X (0 100 1)
Y (0 10 1)
Z (0 5 0.5) (5 10 1)
OUT
OUT KNF FSA FSF STEM FRF DECKA
FILE CLOSE

NL new list

Open new list, see !EXPL NL/GEN.

NP start new page

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 nr1, nr2/name, nr3/name* ...

nr1: general value for nr

nr2/name: nr for a named object

nr3/name*: nr for objects which names have the same beginning

NR OFF

Resets NR to not given.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1383 / 7399


NAPA for Design Manuals 2016.3

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.

OUTPUT output coordinates in specific mode

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

objects: list of objects as in LIST NLOF

PLD output as diagram

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.

PLD ... POO plot-options

...: represents parameters as given for LIST, see !EXPL LIST.

POO: (opt) delimiter for plot options

PLOT plot the points

This command plots the gerated points. The projection and scaling must be defined in advance
(commands PROJ,and SIZE).

PLOT objects, C

objects: list of objects as in LIST NLOF

C: if given, plot straight lines between the points

POO assign plot output options

This command controls the output of PLD. For explanations, see !EXPL POO/GEN.

PQ select plot quantities

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.

PREP source of 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 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.

surface: surface name

PREP OFF

Copyright © 1992 - 2016 NAPA. All rights reserved. 1384 / 7399


NAPA for Design Manuals 2016.3

--------

Curves are read as independent objects from the database.

PROJ,SIZE,COL,DASH,THI,TH drawing control

These are commands from the general drawing task made directly available. For the others,
use the DR command.

PTOL cleaning tolerance

This command sets the tolerance controlling the cleaning of redundant points when the CLEAN
option is on.

PTOL tol

Set the cleaning tolerance.

SAVE save coordinate tables

The command calculates the coordinate tables, puts the result into a named description and
saves the description to the auxiliary database.

SAVE id, objects

id: name of the result description

objects: list of objects as in LIST NLOF

SELECT select coordinate generation method

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.

SELECT abc1, abc2, ...

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:

X = use given x argument planes

Y = use given y argument planes

Z = use given z argument planes

L = use constant distance between points

R = use adjusted distance between points

Copyright © 1992 - 2016 NAPA. All rights reserved. 1385 / 7399


NAPA for Design Manuals 2016.3

N = use constant number of intervals

C = use circle representation of curves

P = give all points generated by the polygonization

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:

+ = include intersections with special curves

- = ignore intersections with special curves

The default is to include the intersections if special curves have been defined with the
SPECIAL command.

SELECT OFF

Restore the default selection.

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.

SPEC define special curves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1386 / 7399


NAPA for Design Manuals 2016.3

SPEC curves

Define special curves.

curves: list of curves with the following alternatives:

cname: named curve

id=cname: named curve with a new id

id=cname1+cname2+...: combined curve

id=(cname1, cname2, ...): list of curves under the same id

id=(cname1+cname2+..., cname5, ...): combination

X: intersection curves with the x-planes

Y: intersection curves with the y-planes

Z: intersection curves with the z-planes

SPEC OFF

Do not use special curves.

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.

SPEC SAVE name

Save the current definition.

name: name of the definition (a definition named STD is automatically retrieved when starting the
task)

SPEC GET name

Retrieve the named definition.

name: name of the definition

SPEC DEL name

Delete the named definition.

name: name of the definition

SPEC CAT

Make a catalog of available definitions.

SRV -> enter services subtask

TOO table output options

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.

TYPE add arbitrary text

See !EXPL TYPE/GEN.

WRITE write arbitrary text

Copyright © 1992 - 2016 NAPA. All rights reserved. 1387 / 7399


NAPA for Design Manuals 2016.3

Writes arbitrary text to the current output file. It is available only if the output mode is specified.

WRITE text

X x arguments

This command gives values for x in tables where x occurs as an argument.

X x1, x2, ...

X (x1, x2, dx)

The coordinates can be given as a list or series.

X OFF

Resets X to not given.

XMAX restrict objects in x-direction

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: limiting coordinate

XMAX OFF

Resets XMAX to not given.

XMIN restrict objects in x-direction

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: limiting coordinate

XMIN OFF

Resets XMIN to not given.

Y y arguments

The command is analogous to the X command.

See command X

YMAX restrict objects in y-direction

The command is analogous to the XMAX command.

See command XMAX

YMIN restrict objects in y-direction

The command is analogous to the XMIN command.

See command XMIN

Z z arguments

The command is analogous to the X command.

See command X

Copyright © 1992 - 2016 NAPA. All rights reserved. 1388 / 7399


NAPA for Design Manuals 2016.3

ZMAX restrict objects in z-direction

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.

ZMAX zap, zfp

zap: limiting coordinate at the after perpendicular

zfp: limiting coordinate at the fore perpendicular (optional)

ZMIN restrict objects in z-direction

The command is analogous to the XMIN command.

See command XMIN

Copyright © 1992 - 2016 NAPA. All rights reserved. 1389 / 7399


NAPA for Design Manuals 2016.3

Link functions (GM)


Table of Contents:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1390 / 7399


NAPA for Design Manuals 2016.3

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'.

The following links are implemented:

1.1. Geometric links

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.

1.1.1. TRIBON and AVEVA

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.

1.1.2. VDAFS: geometry to the VDAFS standard

patch surfaces
curves
surface objects and facet surfaces
trimmed surfaces

1.1.3. DXF: geometry to the DXF standard

curves
boundary of surface objects

1.1.4. IDF: Link to the IMSA IDF standard

surfaces into nontrimmed NURBS surfaces


curves (LOFT task)

1.1.5. Others

Sikob: surface from the Sikob system


IGES: patch surfaces to and from the IGES standard
Unigraphics: surface objects and facet surfaces into Unigraphics
Blines: surface from the Blines system
HSVA: z-sections to the milling format of HSVA
KHI: transfer of surfaces to and from the lines system of KHI (=Kawasaki Heavy Industries)
FEM: geometry of a ship model into a format for Finite Element Method programs (FEM task)

1.2. Drawing links

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1391 / 7399


NAPA for Design Manuals 2016.3

1.3. Toolkit routines interfacing to NAPA

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.

2. Specifying the output file


Before any of the conversion commands can be used, the command FILE must be given, defining where to store the result.

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.

FILE T (=test) will direct the result to the screen only.

Examples: if curves C1, C2 and C3 are converted, the following result is obtained by different FILE commands:

FILE, SB>P1234 -> curves C1, C2 and C3 are stored in SB>P1234

FILE, SB>* -> files SB>C1, SB>C2 and SB>C3 are generated.

FILE, DIR>*.SB -> files DIR>C1.SB, ... DIR>C3.SB are generated

FILE, T -> the result is displayed on the screen

3. Link to Tribon/AVEVA Marine


Open NAPA Surface server dialog in Tribon/AVEVA via marsurfservmaint.exe. Tab NAPA defines the parameters for the Surface server, see the
explanations below:

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.

4. Link to Nupas-Cadmatic Hull (direct)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1392 / 7399


NAPA for Design Manuals 2016.3

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.

4.1. Running the interface

The following steps are needed to use the interface

define environmental variables that control the interface


start the server program nupas_napa_link
select the NAPA interface in Nupas-Cadmatic Hull (give the machine id etc.)

4.2. Overview of the control variables

The interface is controlled by a set of environmental variables. These variables should be assigned before the server is started.

The following variables are available:

NAPA project and version of NAPA


NAPADB NAPA database (db7) error messages etc.
NAPASYSDB system database (db2) administrative data about projects etc.
NAPAPROJDB project database (db1) surfaces, curves etc.
NAPA_SURFACE conversion table Nupas-Cadmatic Hull shapes/NAPA objects
NAPA_CURVE conversion table Nupas-Cadmatic Hull lines/NAPA curves
NAPA_PRINT name of log file
NAPA_LOG type of log file
NAPA_LIMITS use of the limiting coordinates
NAPA_GMTOL polygonization tolerance
NAPA_GTOL gap tolerance in curve combination
NAPA_BTOL gap tolerance in patch combination
NAPA_ATOL angle tolerance in knuckle detection

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.

4.3. Project/version of NAPA

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

4.4. Name conversions

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1393 / 7399


NAPA for Design Manuals 2016.3

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.

An example about the definition of the conversion tables is shown below:

TASK> PRO project/version


TASK> TAB

TAB> NEW TAB*NUPAS_SHAPES


TAB> COL SHAPE=I
TAB> COL NAME
TAB> ASG SHAPE 0 1 2 3
TAB> ASG NAME HULL HULLA HULLM HULLF
TAB> SAVE

TAB> NEW TAB*NUPAS_LINES


TAB> COL LINE_TYPE=I
TAB> COL NUMBER=I
TAB> COL NAME
TAB> ASG LINE_TYPE 6 6 6 6 6 3 3 3
TAB> ASG NUMBER 0 1 2 3 4 1 2 3
TAB> ASG NAME FR0 FR1 FR2 FR3 FRA CLA WL0A DECKA
TAB> SAVE

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.

4.5. Log file

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,

DEFINE NAPASYSDB /n/pr/ship/sysdb


define NAPAPROJDB /n/pr/ship/test.db

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

An example about the short log file is shown below:

NAPA INTERFACE

Copyright © 1992 - 2016 NAPA. All rights reserved. 1394 / 7399


NAPA for Design Manuals 2016.3

Napa 99-11-04, level D


Test program 99.2 + (T)

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

5. Surface from IGES format


IGES, /n/napa/temp/hse.igs, NUPASTEST, !

Transfered entities:
128 : rational b-spline surf. entity
4 patches transferred

6. Surface from NAPA format


Receiving unit=1 (/n/pr/ship/test.db)
Store under version A
A TAB*NUPAS_SHAPES 99-11-03 15:10

Copyright © 1992 - 2016 NAPA. All rights reserved. 1395 / 7399


NAPA for Design Manuals 2016.3

A TAB*NUPAS_LINES 99-11-03 15:16

END OF TRANSFER

4.6. Intersection tolerance

The tolerance of intersections is controlled by the variable NAPA_GMTOL. The following alternatives are available:

NAPA uses the GMTOL of NAPA (default)


Nupas-Cadmatic Hull uses the tolerance given by Nupas-Cadmatic Hull
tol a value (in meters) for the GMTOL

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.

4.7. Limiting box given by Nupas-Cadmatic Hull

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:

ON use the limiting box (default)


OFF omit the limiting box

4.8. Curves with many branches

The connection of different branches of a NAPA curve is controlled by the variable NAPA_CONNECT that can be assigned as

ON connect the branches (default)


OFF do not connect the branches. In this case only the first branch is transfered to Nupas-Cadmatic Hull.

4.9. Shift of extreme plane sections

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

export NAPA_PLATOL='tolerance in meters'

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.

4.10. Additional intersection tolerances

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1396 / 7399


NAPA for Design Manuals 2016.3

4.11. Reading files of standard format

The following data of standard format can be read by the interface:

IGES surfaces of type 128


VDAFS surfaces
NAPA dump files created by the DUMP command of the TOC task.

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:

VDAFS 1.0 (=DIN 66301)


VDAFS 2.0

The format is accepted by several systems, and it has been tested on CATIA, INTERGRAPH, BRAVO and DESKARTES.

The following objects (simple or combined) are transferable:

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).

5.2. Transfer of surfaces

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).

5.3. Transfer of curves

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1397 / 7399


NAPA for Design Manuals 2016.3

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.

5.4. Format of coordinates

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):

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

5.5. Conversion of names

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.

5.6. Grouping facilities

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:

OFF: omit SET or GROUP entities


string: create SET or GROUP entities. The name of the entity is the given string modified by the following replacements:

Substring Replacement

NAME: name of the NAPA object

INDEX: number of the SET or GROUP


As a default the first SET or GROUP of a transfer has the number 1. Another numbering is defined by the options SN=i0 or
GN=i0, so that the first entity corresponds to the index i0+1.

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

5.7. Notes about VDAFS transfer from NAPA to DeskArtes

The transfer is done by the following commands of the DEF task

Copyright © 1992 - 2016 NAPA. All rights reserved. 1398 / 7399


NAPA for Design Manuals 2016.3

FILE directory>file
TOVDA obj1 ... objn S=SINDEX G=NAME

The objects are independent Napa objects, or a collection of these


in structures SRT*name or in lists name(). It is recommended to collect
objects
with the same material properties into common structures. The options
S=SINDEX and
G=NAME are used in order to produce the following structure in the VDAFS
file:

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.

The following errors are known:

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.

6. Link to DXF (3D)

6.1. Transfer of geometry

The following objects of NAPA are transferable to the DXF standard:

curves (polygone -> polyline)


surface objects (boundary -> polyline)
surfaces (surface -> facet boundaries (default), or s apline representation (option REP=S))

The resulting file has two special features:

only the 'entities section' is included


as a default an 'extended entity data' called NAPADATA is connected with each object. The name of the object is stored there. This is

Copyright © 1992 - 2016 NAPA. All rights reserved. 1399 / 7399


NAPA for Design Manuals 2016.3

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.

The link can be used in two alternative ways:

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.

The following options are available:

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.

LAYN=layer layer number (default: LAYER=0)

L=olayer layer for the outer boundary

LH=hlayer layer for the holes

UNIT=alt unit of coordinates; alt=MM or M, default: UNIT=M

D=n number of decimals (default: D=99 i.e. according to the size)

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.

6.2. Object to line elements of 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:

DEF> FILE dir>file


DEF> TODXF FEM objects sections options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1400 / 7399


NAPA for Design Manuals 2016.3

TODXF FEM command has the following parameters:

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 transfer is done by the command

DEF>TOIGES objects FILE='file' options;

The transferred objects can be given in the following forms:

obj1,obj2,... names of objects

(name,i1,i2,step) series such as X1,X2,X3,...

array() list of objects

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'.

The link has been tested with the following systems

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1401 / 7399


NAPA for Design Manuals 2016.3

8. Link to the IMSA IDF standard


NAPA surfaces are transferable to the IMSA IDF (Revision 3.0) format. Each patch of the surface is converted into the NURBS entity of the IDF
standard. If the surface is not a patch surface, it is first converted into such. Trimmed patches are transferred so that only the coefficients of the
patch are linked. The curve representing the trimmed boundary is missing.

The transfer is done by the commands

FILE dir>file; TOFS objects options

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

K=P Periodic knot sequence (-3,-2,-1,0,1,2,3,4) (=default)

K=D Degenerate sequence (0,0,0,0,1,1,1,1)

K=(k1,k2,...,k8) User-defined sequence

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

FILE dir>file; TOUG objects

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).

10. Link to HSVA milling machine


Z-sections from an object of NAPA are transferable to the milling format of HSVA. The result is a text file created by the following command:

<index terms=" TOHSVA" />TOHSVA surface sections options .

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.

11. Link to KHI


A surface interface from NAPA to the KHI lines system is implemented as a subtask KHI of the task DEF. The surface is transferred as a set of
frames, and a set of special curves including the section Y=0 (STEM or STERN), the boundary of the flat of side, and the knuckle curves.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1402 / 7399


NAPA for Design Manuals 2016.3

Separate files for the forepart and the afterbody must be created.

The basic scheme for the transfer is the following

DEF> KHI ;enter task KHI

KHI> HULL surface ;define surface (fore or afterbody)

KHI> FILE dir>file ;define result file

KHI> OK ;start transfer

KHI> END ;exit task KHI

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.

12. Link to OPTISCAT


The link transfers patch and facet surfaces (with some restrictions) from NAPA to the OPTISCAT system.

A transfer is done as follows:

DEF?>FILE dir>file
DEF?>TO OPTISCAT objects options

The following options are available:

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.

The following objects are transferable:

nontrimmed patch surfaces


facet surfaces containing three or four-sided facets

The following objects are not transferable (for example):

surface objects
trimmed patch surfaces
patch surfaces with the TP option
closed facet surface

13. Link from Sikob


Surfaces can be transferred from SIKOB into NAPA by the command

Copyright © 1992 - 2016 NAPA. All rights reserved. 1403 / 7399


NAPA for Design Manuals 2016.3

<index terms=" FROM" />FROM SIKOB file.sikob file.napa options

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

EDI; GET file.napa; ADD

Two different SIKOB formats SIKOB74 and SIKOB77 are supported.

13.1. Link from SIKOB74

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:

$ NAPA NAME name

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

$ NAPA FRAMES locations

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.

13.2. Link from SIKOB77

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:

More angle conditions are created


The $ NAPA control commands in the SIKOB file are not supported
Sorting data of the SIKOB file is applied only with the option

ORDER apply sorting data of the SIKOB file.


The grid curves are listed in the THR command in the required order. A frame that obeys the sorting can be created by the
commands CUR name; X xval; ZY * *HULL. Note that by using ZY *HULL the points are sorted by the increasing z-values.

The transfer can be debugged by using the option

Copyright © 1992 - 2016 NAPA. All rights reserved. 1404 / 7399


NAPA for Design Manuals 2016.3

DEBUG show information about the transfer


The structure of the file is listed. For each datasheet (and also for some entities) the first SIKOB line is displayed. 'Blank cards' are
also shown.

13.3. New link from SIKOB (Release 2003 -)

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):

ADDDEF.FROM_SIKOB Reads the SIKOB 'hull' file

ADDDEF.SIKOBTOCURVES Creates the curves

ADDDEF.SIKOB_COMP Creates compartments

.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.

The SIKOB*HULL description is created in the DEF task by the command:

!ADD .FROM_SIKOB <options>

The following options are available:

? Explanation of the command

dir>file SIKOB hull file

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:

!ADD .SIKOBTOCURVES <options>

The following options are available:

? Explanation of the command

NWL Do not create waterlines

OWL Only waterlines are created to the existing hull

OKN Only knuckle lines are created to object KNSUR

HULLA Only aft hull part is created

HULLF Only fore hull part is created

OBN Only boundary curves are created to object BNSUR

Copyright © 1992 - 2016 NAPA. All rights reserved. 1405 / 7399


NAPA for Design Manuals 2016.3

AKN Add knuckle curves

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

!ADD .SIKOB_COMP <options>

The following options are available:

? Explanation of the command

dir>file SIKOB vol file

EXAMPLE:

!ADD .SIKOB_COMP temp>invol1

Known issues with compartments:

Inside/outside information of the CNS surface is wrong


There is unnecessary DECK or +HULL information

14. Link from IGES


NAPA is able to read IGES data (IGES=Initial Graphics Exchange Specification). Only geometric items but not all of them are supported. All
nongeometric items (annotations, properties, views etc.) are omitted. The general syntax of the command is

FROM IGES dir>file naming_rule options selections;

The following entities of IGES are supported:

Rational b-spline surfaces i.e. NURBS surfaces (entity 128)


Polynomial surfaces (entity 114)
Trimmed surfaces (entity 144) The referenced surfaces can be NURBS surfaces (entity 128) or polynomial surfaces (entity 114). The
trimming curve can be of any type that is supported by the interface (see below). The trimming curves are polygonized in the parameter
space with the tolerance that is given by the option TOL2=tol2. If tol2<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 TOL2=-0.001.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1406 / 7399


NAPA for Design Manuals 2016.3

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.

ENT: type of entity


PAR: pointer to parameter section (line number)
LEV: level
TRA: transformation
VIS: visibility
0=visible, 1= blanked
DEP: dependency
0=independent
1= physically dependent (does not exist alone in native database)
2= logically dependent (e.g. member of a group)
3=physically and logically dependent
USE: usage
0=geometry,1=annotation,2=definition,3=other,
4=logical/positional,5=2d parametric
DIR: pointer to directory section (line number)
FORM: form number
NAME: application specific alphanumeric identifier of the entity
IND: numeric qualifier for NAME
DES: name of entity

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 index of the entity

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1407 / 7399


NAPA for Design Manuals 2016.3

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.

Examples of the naming rule:


TEST : all transferred entities are packed into the object TEST.
The first entity define the type (surface/curve) of the
result.
All entities with conflicting types are omitted.
%TYPETEST : all curves are packed into CTEST and surfaces into STEST
E%INDEX : objects E1,E3,E5,... are created
%TYPE%BRANCH : curves C1,C2,C3,... are created (if curves are available)

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:

OUT=IGES: (default) as in the IGES file


OUT=X: x direction
OUT=Y: y direction
OUT=Z: z direction
OUT=C: closed
OUT=R: reversed
OUT=A: adjusted (see command DEF> OUT)
OUT=G: according to geometry
OUT=-alt: as above, but inverted

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1408 / 7399


NAPA for Design Manuals 2016.3

FROM IGES file IGES_%INDEX SPLINE !


SUR IGESHULL; THR IGESCUR(*)
EDI IGESHULL FIX=D TOL=10
@@ create definition curves of NAPA so that definition points are only at
endpoints of spline segments
@@ rename curves e.g. by CH /IGES/IGS/ A
ADD

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:

104: conic arc


106: copious data
116: point
118: ruled surface
120: surface of revolution
122: tabulated cylinder
125: flash (circular, rectangle, donut, canoe forms)
130: offset curve
132: connect point entity
143: bounded surface
144: boundary
308,320: subfigure definitions
408,420: subfigure instances

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.

14.1. Troubleshooting for TOIGES

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1409 / 7399


NAPA for Design Manuals 2016.3

15. Link from VDAFS


A subset of the VDAFS entities can be transferred to NAPA. The transfer is done by the command FROM VDAFS dir>file options; in the DEF
task. At the moment the SURF and FACE entities (nontrimmed and trimmed surfaces) are transferable.

The content of the VDAFS file is shown by the command FROM VDAFS dir>file CAT. In the catalog the following quantities are used:

TYPE: entity type (SURF, CURVE, BEGINSET etc.)


ID: entity name
SET: name of the VDAFS set, where the entity belongs
DES: a description of the entity (created by the link)

For SURF entities the degree of surface is shown.

NAME: name of the NAPA object to be created.

An empty string is shown, if the entity cannot be transferred by the link.

NR: index of the entity in the list

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:

VDAFS: as in the vdafs file (default)


X,Y,Z,-X,-Y,-Z: direction of coordinate axis
C: closed
R: reversed
G: according to geometry
GP: according to geometry but in the direction of positive

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.

16. Link from DXF


The following 3D data is transferable from DXF into NAPA:

POLYLINE entities that represent polygons


LINE entities
two dimensional CIRCLE entities
two dimensional SOLID entities

The transfer is done by the command

DEF> FROM DXF dir>file options

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1410 / 7399


NAPA for Design Manuals 2016.3

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).

The following options are available:

surface name of the surface to be created

PLOT the result is plotted only

! overwrite existing objects with the same name

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)

IX=i start index for principal x-curves (default: IX=0)

IY=i start index for principal y-curves (default: IY=0)

IZ=i start index for principal z-curves (default: IZ=0)

IS=i start index for other than principal plane curves (default: IS=0)

X=xval two dimensional data is transferred into the given plane

Y=yval two dimensional data is transferred into the given plane

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:

FROM DXF TEMP>HULL.DXF PLOT

plot only

FROM DXF TEMP>HULL.DXF HULL

transfer grid of HULL

FROM DXF TEMP>HULL.DXF

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.

17. Link from Blines


Grid curves of a surface are transferable from Blines to NAPA. Syntax:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1411 / 7399


NAPA for Design Manuals 2016.3

<index terms=" FROM" />FROM BLINES 'file' options.

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'

18. Link from Shipflow


Some data calculated by Shipflow can be read into a NAPA table. Syntax:

DEF> FROM SFL dir>file TAB*table options

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.

19. Link from KHI


Definition of a surface is converted from the KHI lines system to the NAPA format by the command

FROM KHI dir>khi_file dir>napa_file options

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.

Conversion of the names is done as follows:

- 'end of parallel part' -> FRF or FRA

- other x-curves -> There are two alternatives:


1) combination of 'X', section number, and 'F' or 'A' (default)
2) combination of 'X', KHI-name, and 'F' or 'A'. Special characters e.g. '/' are replaced by '_'.
(option N is needed)

- 'tangent trace line' -> FSF or FSA

- 'end profile' -> STEM or STERN

- 'end breadth' -> STEM_2 or STERN_2

Copyright © 1992 - 2016 NAPA. All rights reserved. 1412 / 7399


NAPA for Design Manuals 2016.3

- 'knuckle lines' -> KNF1,KNF2,... or KNA1,KNA2,...

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'.

Parameters of the command:

dir: directory

khi_file: name of the KHI file

napa_file: name of the NAPA file

options: (opt) control parameters


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.

20. Drawing links


There are two alternative ways to convert drawings of NAPA into the formats of some other systems:

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

The following systems are supported:

SBD Steerbear general design

DXF Autocad or other system using the DXF format

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.

NAME=name drawing name (default: the current name)

S send what is seen on the screen (default: send whole drawing)

* apply current scaling (default: 1/1)

LL=n line length (default: LL=80)

CHMOD=code protection code as in the chmod command of UNIX

The following options are available for the SDB link:

NC no circle segment conversion

TOL=tol tolerance for the circle segment conversion

MCS=n maximum number of circle segments in a polygone

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.

LAYN=layer layer number for the drawing

LAYN=* use layers defined by the !LAYER command

Copyright © 1992 - 2016 NAPA. All rights reserved. 1413 / 7399


NAPA for Design Manuals 2016.3

HATCH=type transfer of fillings

-HATCH fillings are not transferred

HATCH transfer fillings

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.

20.1. Setup of the drawing link to DXF

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:

VER=1: NAPA DXF before Release 2001.1


VER=2: AutoCAD 98/97/R14 DXF
VER=3: AutoCAD 2000 DXF

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:

The entities section is replaced by the NAPA drawing


The global scale of linetypes (LTSCALE) is redefined by taking into account the extents of the model and the NAPA drawings
The layers created in the NAPA drawing by the !LAYER command are added after the model ones. The attributes of the NAPA layers are
copied from the last layer of the model.
The extents of the current view in AutoCAD are updated
The value of the HANDSEED variable is updated (=the next handle available)
If the lineweights are used, the LWDISPLAY variable LWDISPLAY is activated so that the different line thicknesses are shown also

Some general remarks about the control records:

All conversion records are optional.


The i'th item of a record is the value of a quantity (colour etc.) in DXF corresponding to the value i in NAPA.
Special values 0, 0.0 or '' are reserved for the defaulted values of the receiving program. The corresponding definitions are missing from
the DXF file.
Negative value -i is interpreted as the i'th pen of record 4, i.e. as a certain combination of colour, dashing pattern and thickness. In case
of such pointers a zero col, das or thi (see expl. of rec. 4) does not change the value of the corresponding quantity. By using pointers e.g.
lines of different thickness can be converted to lines of different colour.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1414 / 7399


NAPA for Design Manuals 2016.3

Explanation of control records: (record number: description)

1: thickness (real record)


The unit is meters in the current scale of the PLOT task.
2: colour (integer record)
21: NAPA colors (integer record)
The pair of records 21 and 22 is an optional control facility provided for dsn2000.1 etc. If these records are available, they are used
instead of record 2.
22: DXF colours corresponding to record 21 (integer record)
3: dashing (string record)
Names of the dashing patterns are stored here. The i'th pattern is defined in a record 100+i.
4: pen (integer record)
The stored values are coded as 10000*col+100*das+thi col, das and thi are pointers to records 2,3 and 1.
5: line length (integer record) default=256
The line length is the upper limit for the number of characters that can be transferred in a string. Strings of larger length are truncated and
a warning is given. A temporal adjustment of the line length is done by the option 'LL=length' of the SEND command.
6: layer number (integer record)
The first item is the defaulted layer that can be changed by the option LAYN=layer of the SEND TO DXF or !SEND TO DXF command.
The value 999999 corresponding to the option LAYN=* indicates that the layers of the NAPA drawing are used. If there are no NAPA
layers, the DXF layer 1 is used. If another layer than 1 is required, store that layer as the first item and 999999 as the second item.
7: transfer of filled areas (integer record)
The filling of closed areas is supported by the link. They are transfered into the HATCH entities of the DXF standard. As a default this
feature is not in use. To install it as a permanent default of the program, an integer record 7 should be added to the control description
DXF*TYPES. The record should contain one integer that defines the type by which the filling is created by the link. The following values
can be used: 1= first create the boundary and then a HATCH that refers to the boundary; 2= create HATCH only; 3= the boundary is put
after the HATCH and no reference between these two is created; 4= as 2 if FILL ONLY, otherwise as 3. Temporary changes of the
inclusion of HATCH entities can be done by using the options HATCH or -HATCH of the SEND TO DXF or !SEND TO DXF command.
The filling convention can be defined by using the option HATCH=type (1,2,3,4=default). It should be noted that raster fillings are
replaced by colours, and the filling colours are converted in the same way as the line colours.
8: control of handles (integer record)
Entities like HATCH use pointers to other entities of the DXF file. As a default, the handles are created only for those entities that use
pointers, and the first created handle is 100001. The defaults can be changed by adding the integer record 8 to the control description.
The first integer should be the lower limit of the created handles i.e. the number of the first created handle minus one.
9: control of file format i.e. the DXF version (integer record)
If the record is missing or the first item is 1, the DXF2000 format accepted by AutoCAD2000 is used. If the first item is zero, data is
created in an older format accepted by AutoCAD98.
10: data of the objects section (string record)
This section is needed by AutoCAD2000 (but not by the 98 version). The items of the record are written into the objects section as such.
However, an item may contain the variables %HANDLE and %HANDLEi (i=integer). The former alternative is replaced by the current
dxf-handle incremented by one, and the latter one by the 'current handle'+i.
• 11: lineweights (the i'th value corresponds to THI i)
The lineweights are supported by AutoCAD 2000. The lineweight record 11 (if available) is used instead of the thickness record 1.

Dashing pattern specification:

There are control records for specifying AutoCAD dashing patterns directly at the link.

100+i: definition of the dashing pattern i (string record).


Each item corresponds to one line of the result file as explained in the DXF-standard.
0
LTYPE
2
name of the line type (the same as in record 3)
70
flag relevant to the table entry
3
descriptive text for line type
72
alignment code
73
number of dash length items
40
total pattern length (meters in the current scale of the drawing)
(opt) 49
(opt) dash length 1 (meters in the current scale of the drawing)
... the rest 49-groups

Optional version dependent records:

These control records are intended to maintain different versions of DXF link.

1000: number of the default version


2000: identifiers of versions

Copyright © 1992 - 2016 NAPA. All rights reserved. 1415 / 7399


NAPA for Design Manuals 2016.3

1000*VERSION+SECTION: a section from a model DXF file


SECTION=1: header
SECTION=2: classes
SECTION=3: tables
SECTION=4: blocks
SECTION=5: entities
SECTION=6: objects
SECTION=7: thumbnail image
10000*VERSION+RECNR: control record related to a version.

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.

Centering polyline dash pattern:

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).

The record has two items:

Item 1: Dashing type in NAPA->DXF curves


0: center pattern within each segment
1: center pattern within the whole curve
Item 2: value of PLINEGEN variable of the DXF file
0: center pattern within each segment
1: center pattern within the whole curve

Conversion between RGB colors and ACI colors:

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.

Transferring layer names to AutoCAD:

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.

20.2. Setup of the drawing link to Interleaf

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

20.3. Drawing link from DXF

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1416 / 7399


NAPA for Design Manuals 2016.3

LOAD dir>file.DXF options

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 following features are described in more detail:

Conversion of linetypes, text styles, colours and filling patters


The commands LTYPE, STYLE, COLOUR and HATCH have a common syntax, where the first half of the parameters correspond to the
DXF values and the second half to the related NAPA values. In the setup macro there can be many conversion commands that control
the same aspect e.g. LTYPE.
Transfer of fillings
The filling of closed areas i.e. the HATCH entity is supported. The conversion of the DXF filling patterns into raster codes can be defined
by the HATCH pattern1,...,patternN,c ode1,...,codeN in the setup description DXF*NAPA*TYPES. The conversion of filling colours is
defined by the command COL d1,...,dN,n1,...nN.
The drawing of the hatch boundaries is controlled by the command DEBUG HATCHB col; of the setup macro DXF*NAPA*TYPES. The
parameter col is the DXF-colour of the boundary. If the parameter is omitted (or the whole command is omitted, or col=-1), the boundary
is drawn with the filling colour. If col=0, the boundary is not drawn at all.
Transfer of layers
The string layers of DXF are converted into integer layers of NAPA based on the order they are found in the DXF file. If there are more
than 100 layers, the last ones (index>99) are all packed into the layer 99. A list of the layer conversions is obtained by using the
command LIST ALL in the setup description DXF*NAPA*TYPES. If the setup description contains the command DEBUG NOLAYERS;
the layers are not marked in the NAPA drawing. The direct conversion by the FIG command requires the option K to transfer the layers.
Connection of curve branches
Successive lines that are connected are combined into a single polygon of NAPA if the setup description DXF*NAPA*TYPES contains
the command DEBUG BRANCH.
Polygonization tolerance
As a default, the polygonization tolerance of the entities ARC, CIRCLE and SPLINE is equal to GMTOL, but another value can be set by
the command TOL tolerance; of the setup macro. If the given value is negative, the tolerance is calculated as min(-value*'smaller extent
of the drawing', GMTOL).

21. Links in the other tasks of NAPA

21.1. Links of the FEM task

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1417 / 7399


NAPA for Design Manuals 2016.3

21.2. Links of the LOFT task

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.

21.3. Link to ShipFlow

The SFL subtask of the DEF task contains functions for converting a surface into a set of panels for CFD purposes.

21.4. Link to DAWSON and RAPID

Creates and transfers hull panel data for CFD programs developed by MARIN.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1418 / 7399


NAPA for Design Manuals 2016.3

Panel models for CFD calculations (GM)


Table of Contents:

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.

1.2. Properties of a panel model

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1419 / 7399


NAPA for Design Manuals 2016.3

Example of a block, represented as points and panels


There is no assumption that the matrix of points should have some special geometric properties such as points at the same index sharing a
common coordinate, but such properties can be achieved if requested.

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.

1.3. Organization of the panel model

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.

1.4. Output for different systems

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1420 / 7399


NAPA for Design Manuals 2016.3

2.1. Topologic classification

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 and B have the same circulation, C different

2.2. Simple block

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1421 / 7399


NAPA for Design Manuals 2016.3

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.

2.3. Combined blocks

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.

2.4. Controlling the spacing between points

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:

Effect of the distribution control


If a border of a block does not have its own definition of the spacing, the spacing is copied from the opposite border, so that the same relative
spacing is created.

2.5. Generating the internal points

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1422 / 7399


NAPA for Design Manuals 2016.3

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:

parallel to a given plane


parallel to a given line
passing through a given point

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).

Example of generation of internal points


Deciding the principle for how to generate the internal points may not be quite obvious. The objective is to get a set of uniformly spaced points.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1423 / 7399


NAPA for Design Manuals 2016.3

2.6. Obtaining a section oriented result

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 secondary borders must be points or x-sections


the option DIV=X is given
the spacing is free on one of the primary borders

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

A non-combined block is defined by the BLOCK command:

BLOCK name TYPE=type DES=description, DIV=div,


POINTS: name=nr/side/block, ...
LEFT: limit RIGHT: limit BOTTOM: limit TOP: limit

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.

DES defines a string that is intended to be a descriptive text.

DIV controls the generation of internal points, and is formed by a combination of the following options:

V set primary direction to be left-right

U set primary direction bottom-up (default)

L use the curve length as argument

X select the subdivision planes parallel to the plane X=0

Y,Z analogically with X

PX select the generator planes parallel to the x-axis

PY,PZ analogically with PX

D(v1,v2,v3) select the subdivision planes parallel to the vector (v1,v2,v3)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1424 / 7399


NAPA for Design Manuals 2016.3

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]

The curve can be defined by

name the name of the curve (located in the surface)

axis-name the name of the curve, projection along axis e.g. Y-CLD

L-name the border of the block

axis=q section at given coordinate

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:

BLOCK B0 LEFT X=20 12 RIGHT X=50 BOTTOM B 6 TOP Z=8

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1425 / 7399


NAPA for Design Manuals 2016.3

BLOCK HULLF DIV=X,


LEFT: X=NPA3 20 RIGHT: X=PF0,
BOTTOM: Y=0 20/10 TOP: DWL

BLOCK BOW1 DIV=X,


POINTS: NNPF1=-4/RIGHT/HULLF NNPF2=1/RIGHT/HULLF,
LEFT: L-HULLF RIGHT: FRF15/(NPF4,NPF5),
BOTTOM: CLF/(NNPF2, PF4) 9/3 TOP: CLFU/(NNPF1,NPF5)

BLOCK BOW2 DIV=PXV,


LEFT: L-BOW1 RIGHT: STEM/(NPF4,NPF5),
BOTTOM: NPF4 1 TOP: NPF5

This definition corresponds to the one in the figure below. NPA3, PF0, NPF4, NPF5 are points objects.

Result of definition above

Detail of the case above. The example to the right is obtained by changing the DIV option in BOW1 to
DIV=PXV

3.2. Definition of a combined block

A combined block is defined with the COMBINE command:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1426 / 7399


NAPA for Design Manuals 2016.3

COMBINE name TYPE=type DES=description, TOL=tol, U name1 name2 ... !

'name' is the name of the resulting block while 'name1', 'name2' are the partial blocks.

The option ! is needed to overwrite a non-combined block.

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 component blocks may themselves be combinations.

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1427 / 7399


NAPA for Design Manuals 2016.3

HULL HULLA

BLOCK B1 DIV=PXV LEFT: PTR RIGHT: TR2 8,


BOTTOM: TR1 8 TOP: DECKA

BLOCK B3 DIV=PYV LEFT:STERN2 9 RIGHT: FR0.5,


BOTTOM: WL3A 5 TOP: Z=5.8

BLOCK B2 DIV=P LEFT: L-B1 RIGHT: FR0.5,


BOTTOM: L-B3 TOP: DECKA */1

BLOCK B4 DIV=PY LEFT: ST0 3 RIGHT: FR0.5,


BOTTOM: WL2A TOP: L-B3

BLOCK B5 DIV=PXV LEFT: STERN1 3 RIGHT: FR0.5,


BOTTOM: WL0A TOP: L-B4

BLOCK B0 HULL=BE DIV=ZV LEFT: CL0 RIGHT: L-B4,


BOTTOM: CL0S 3 TOP: CL0E

COMBINE B5-B2 V B5 B4 B5 B2

BLOCK B6 LEFT: L5-B5-B2 RIGHT: X=10, */1,


BOTTOM: WL0A 5, TOP: DECKA

Result of the definition above

Copyright © 1992 - 2016 NAPA. All rights reserved. 1428 / 7399


NAPA for Design Manuals 2016.3

4. Storing the result


Commands SAVE and REPLACE are used to save the panel models. The calculated results are stored with the definitions in descriptions with the
prefix NPANEL*.

When saving the result, it is checked that the results are calculated.

4.1. Contents of the panel description

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:

Storing order of points


Note that the order is tied to the labeling of the sides (left, right, top, bottom) and it is not dependent on the distinction between primary/secondary
directions or actual coordinate values.

4.2. Handling updates

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.

Note: the dependencies on changed surfaces are not handled.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1429 / 7399


NAPA for Design Manuals 2016.3

5.1. Plotting 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

PLOT block option th

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 I, the names of the blocks are plotted.

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

5.2. Displaying definitions

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.

5.3. Generating a surface

The command GENERATE generates a facet surface corresponding to the given panel object. This surface can be used as a normal NAPA object.

5.4. Surface grid smoothing

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1430 / 7399


NAPA for Design Manuals 2016.3

after smoothing.

Surface grid before and after smoothing


Example below shows how a smoothed surface grid is generated. FCS_P1A is the input facet surface that is generated from the panel model
paneling1. HULL is the name of the hull geometry and FCS_S1A is the name of the output facet surface that is the result of smoothing. The
number of smoothing steps is 12. Last parameter 'I' means that improved smoothing method is used.

NPN>get paneling1
NPN>gen FCS_P1A
NPN>@sfres=npn.smooth('FCS_P1A','HULL','FCS_S1A',12,'I')

NPN>rep

5.5. Surface grid quality

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1431 / 7399


NAPA for Design Manuals 2016.3

Skewness value from QUALITY_S.DAT in tecplot


In addition to QUALITY_S.DAT the service function creates a table in NAPA database that contains similar data and the file STATISTICS.TXT
that contains statistical information about quality indicators. The data in STATISTICS.TXT can be used to check extreme values of the indicators
or to generate probability integral curves. Figure below shows the probability integral curves of skewness for four different surface grids.

Skewness probability integral curves for four different surface grids


Example below shows how quality indicators can be calculated for a surface grid. 'paneling1' is the name of the panel model. 'FCS_P1A' is the
name of the generated facet surface. 'TAB*FCS_QUALITY' is the name of the table where indicators are written and
'c:/napa/temp/kcs/MAY_P1A/' is the path for the output files.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1432 / 7399


NAPA for Design Manuals 2016.3

NPN>get paneling1
NPN>gen FCS_P1A

NPN>@sfres=npn.quality('FCS_P1A','TAB*FCS_QUALITY','c:/napa/temp/kcs/MAY_P
1A/')

5.6. Commands in NPN task

BLOCK define a block

This command defines a block directly from the hull geometry, in contrast to COMBINE which
uses already defined blocks.

BLOCK name options points left-limit right-limit bottom-limit top-limit

name: name of the block. It must be unique within the model.

options: additional properties:

TYPE=s: assigns a string which can be used for controlling the target system.

DES=text: assigns a string which is intended to be used as a descriptive text

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

left-limit: defines the curve and subdivision at the left limit

LEFT: curve/(p1,p2) n/c The alternatives for 'curve' are

name: name of curve. A limit reduced to a point is represented by a point object.

L-name: take the matching limit from the given block

LL-name: take the left limit from the given block

LR-name: take the right limit from the given block

LB-name: take the bottom limit from the given block

LT-name: take the top limit from the given 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.

n: number of intervals, *=same as on the other side (default)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1433 / 7399


NAPA for Design Manuals 2016.3

/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.

right-limit: analogically, keyword=RIGHT

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).

BLOCK B2 LEFT: X=60 4 RIGHT: X=80 BOTTOM: L-B1 TOP: WL12

Similarly with the preceding one, using the block B1 as lower limit.

BLOCK B2 TYPE=A DES='region 2', LEFT: ...

Options added.

CAT catalog of save definitions

For options, see !EXPL CAT/GEN.

COMBINE combine blocks

A block is defined by combining existing blocks. Blocks can be combined in one direction only,
from left to right or from down up.

COMBINE name options dir part1 part2 ... !

name: name of the resulting block

options:

TYPE=s: as in BLOCK

DES=text: as in BLOCK

TOL=tol: allowed mismatch at block limits, default=0.5

dir: (opt) controls direction in which blocks are combined,

S: system selects automatically sorting according to x or z. The result will be recorded


internally as if U or V is given. (default)

U: from left to right, parts given in the correct order

V: from below up, parts given in the correct order

X: sort according to x, combine from left to right

Z: sort according to z, combine from below up

part1,part2...: the partial blocks

!: (opt) allow replacement of a non-combined block

EXAMPLE
COMBINE B12 V B1 B2

CURVE start curve definition

This command starts the normal curve definition function. The keyword CURVE must be
entered with min. three characters.

DELETE delete block

Copyright © 1992 - 2016 NAPA. All rights reserved. 1434 / 7399


NAPA for Design Manuals 2016.3

DELETE name

name: name of block to be deleted

DES print current definitions

This command prints the definition of objects in the input format.

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.

+: (opt) list also the definition of curves and points used.

DES !

List all blocks in the order recorded

DR enter general drawing task

EDIT enter editor

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.

END finish the subtask

GENERATE generate surface

This command generates a NAPA surface (facet surface) or a limit curve from the panels of the
current model.

GENERATE name block opt

name: name of the new surface

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:

T: turn the direction, causing inside/outside to be reversed

S: generate from simple blocks only, default=normal rule of taking all but those being used in a
combination.

!: allow overwriting of an object of a diiferent type

L: This form generates the limit curve of the given block and leaves the result in the run time
memory.

LL: Generate the left limit curve only

LR: Generate the right limit curve only

LB: Generate the bottom limit curve only

LT: Generate the top limit curve only

GET get panel definition from the data base

GET name/vers/proj !

name: name of set. The complete data base name is NPANEL*name.

/vers: (opt) version. NOTE: the version is taken into account when reading only.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1435 / 7399


NAPA for Design Manuals 2016.3

/proj: (opt) name of project

!: (opt) read as stored, do not update. Default=recalculate.

EXAMPLES:
GET PANEL1

Get panel definition PANEL1 from the description NPANEL*PANEL1.

GET PANEL2/A/PRO2

Get panel definition PANEL2 from version A of registered project PRO2.

GRID plot the grid of a surface

The same GRID command is in task DR.

HULL define hull to be used

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

name: name of hull surface

NEW create new definition

This command initiates a new panel definition.

NEW name

name: name of set

NOTES add comments

This command adds descriptive text. For more information, see !EXPL NOTES/GEN.

NOTES 'text', 'text', ...

text: line of text. The first one is visible in the catalog.

PLOT plot the points or limit curves

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).

PLOT block option

block: plot selected block, ALL=all blocks.

option:

L: plot the limits only, LS=plot the limits so that left, right, bottom, top separated

LL: Plot the left limits only

LR: Plot the right limits only

LB: Plot the bottom limits only

LT: Plot the top limits only

PL: plot the limits and points

E: plot panels, not points.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1436 / 7399


NAPA for Design Manuals 2016.3

HF: Plot elements using hidden lines effect and same fill colour.

I: plot block names May be ombined with other option, e.g. EI.

PP: plot locally defined points

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.

EFX: graphic check of elements using XOR colouring.

A: plot all blocks, default=omit blocks belonging to a combination.

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).

NN: plot panel normal vectors without arrows.

POINT define point

This is the same POINT command as under DEF.

PROJ,COL,DASH,THI,TH,FILL drawing control

These are commands from the general drawing task made directly available. For the others,
use command DR.

RENAME rename the current definition

RENAME name

name: new name

REPLACE replace the current set in the data base

If the definitions do not exist in the data base, use SAVE.

RNB rename block

The command assigns a new name ot a block and corrects all references to it.

RNB oldname newname

oldname: name of block to be renamed

newname: new name assigned to it

SAVE save the current set in the data base

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.

SIZE control scaling of plots

This is otherwise the standard SIZE command, except for the following forms:

SIZE *

Copyright © 1992 - 2016 NAPA. All rights reserved. 1437 / 7399


NAPA for Design Manuals 2016.3

Scale the plot according to the current model.

SIZE block

Scale the plot according to the given block.

TEXT add comments

Old synonym for NOTES.

UNSAVE delete panel definition from the data base

UNSAVE name

name: name of set to be deleted (with or without the prefix NPANEL*)

UPDATE start update

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.

UPDATE name opt

name: (opt) name of block, default=all blocks

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.

WHERE tell name of current definition

6. Panel definition with NPN to RAPID


This section shows how a hull panelisation is defined in the NPN task to be suitable for using it in the RAPID CFD program of MARIN. The use of
the output macro ADDNPN.MARIN which outputs panels in the RAPID format is also discussed.

6.1. Panel Requirements

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.

Triangular panels are allowed.

The following figures show different views of the panelisation of the DTMB-5415 naval combatant.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1438 / 7399


NAPA for Design Manuals 2016.3

Aft view of the hull panelisation

Copyright © 1992 - 2016 NAPA. All rights reserved. 1439 / 7399


NAPA for Design Manuals 2016.3

Aft view of the aft part of the panelisation

Copyright © 1992 - 2016 NAPA. All rights reserved. 1440 / 7399


NAPA for Design Manuals 2016.3

Fore view of the hull panelisation

Copyright © 1992 - 2016 NAPA. All rights reserved. 1441 / 7399


NAPA for Design Manuals 2016.3

Close up view of the sonar dome trailing edge panelisation


The definition of the panelisation of the DTMB5415 naval combatant is presented below. The example can also be found in the NAPA project
PARALIB/DTMB5415, which is included in the NAPA installation.

NEW RAPID1

HULL HULL

NOTES 'HP testar NPN->RAPID 31.10.00'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1442 / 7399


NAPA for Design Manuals 2016.3

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

COMBINE SKEGBAL2 V SKEG 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

COMBINE CBAL2 V BAFB BAL3

COMBINE CBATOT U BAL1 SKEGBAL2 CBAL2

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1443 / 7399


NAPA for Design Manuals 2016.3

BLOCK BFD1 DIV=V,


LEFT: STEM 6 RIGHT: BLBTE,
BOTTOM: P1WLFD1 TOP: BLBTE2 3

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

COMBINE CBFD U BFD2 BFD5

BLOCK BFL1,
LEFT: L-BAL3 RIGHT: X=50.5648,
BOTTOM: L-BFBF TOP: Z=2.48

COMBINE CBAGTOT V CBATOT BAU1

BLOCK BFL2,
LEFT: L-BFL1 RIGHT: STEM,
BOTTOM: L-CBFD TOP: Z=2.48

COMBINE CBF1 U BFL1 BFL2

Copyright © 1992 - 2016 NAPA. All rights reserved. 1444 / 7399


NAPA for Design Manuals 2016.3

BLOCK BFU1 DIV=V,


LEFT: L-BAU1 RIGHT: STEM,
BOTTOM: L-CBF1 TOP: DECKF

COMBINE CBFTOT V CBF1 BFU1

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:

!ADD .MARIN TESTFILE 'Hull data from NAPA' 'test output' 12 0

The last figures 12 and 0 are the draught and trim. Explanatory text of the macro is shown with the command:

!ADD .MARIN ?

A list of the available NPN dot-macros is shown with the command:

!ADD .CAT

They are also mainly for output of panel models in specific formats.

The list may look as follows:

NAPA data base:

MARIN @@ Panel data for RAPID/DAWSON of MARIN

PLOT3D @@ Panel data to Plot3D format

SHALLO @@ Panel data for SHALLO of HSVA

SHIPFLOW @@ Panel data for SHIPFLOW

SUM @@ Summary information on panels

Copyright © 1992 - 2016 NAPA. All rights reserved. 1445 / 7399


NAPA for Design Manuals 2016.3

Panel generation (GM)


The purpose of the subtask PANEL is to generate finite element like representations of the hull form for use in numeric hydrodynamics or similar
functions. The hull surface is converted to a set of elements called panels. The panels can be shown graphically, stored in the data base or output
as ASCII files.

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:

Example of group shown as points and as panels


In the following, the axis on which the section coordinates are defined (x in the example) will be referred to as the primary direction while the
other direction (z in the example) is the secondary direction. See below for examples of groups with other directions. Note: the receiver of the
data may require some specific axes to be used.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1446 / 7399


NAPA for Design Manuals 2016.3

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:

ADD X x1 nx x2 Z lim1 nz lim2

for example

ADD X 80.5 10 140 Z -99 10 12

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

ADD X FRF 10 P1F Z -99 10 WL12

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:

ADD X x1 nx x2 Z lim1 nz1 lim2 nz2 lim3 ...

In the following example, a rising knuckle has been added as an inner limit:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1447 / 7399


NAPA for Design Manuals 2016.3

ADD X FRF 10 P1F Z -99 8 KNF 4 WL12

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.

A tolerance can be given for the limits, separated by a slash:

x/tol

The tolerance will be added when making the section, but 'x' is recorded in the output.

At the beginning of the command, the following options can be given:

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1448 / 7399


NAPA for Design Manuals 2016.3

DEF 1 Y,0,9,4.6, Z,TRANS,9,DECKA

DEF 2 Y,0,4,Y3, X,FRA,20,TRANS

DEF 3 X,FRA,20,TRANS, Z,Y3,7,KNA

DEF 4 Z,KNA,4,9.99, X,TRANS,20,FRA

The following example illustrates the use of general coordinates for the sections:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1449 / 7399


NAPA for Design Manuals 2016.3

DEF 1 (BULB), X:, (BULB_EDGE,195.99)/12,


Z,-1,9,CLF_BULB
DEF 2 (BOW_LOW), X:, (FRF10,BULB_EDGE)/9,
Z,-1,4,3
DEF 3 (BOW_HIGH), Z:,(3,18)/15,
X,FRF10,9,BULB_EDGE
DEF 4 (MID), X:, FRA2,(15,FRF10)/20, Z,-1,20,18
DEF 5 (AFT), Z:, 0,(0.2,13)/10,(13.5,18)/5,
X,-7.99,10,FRA2

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

Prints the definition of the i:th group.

DES A

Prints the definition of all groups in the form of ADD commands.

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:

Level 1: name of task (PAN or SFL)


Level 2: group name (from DEF nr (id) ...)
Level 3: (x,yz) for point, nr for element

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1450 / 7399


NAPA for Design Manuals 2016.3

6. NAPA surface from panel geometry


A NAPA surface that is equivalent with the geometry of the current set of panels can be generated with command GENERATE:

GENERATE name part

where

name: name of the resulting surface

part: (optional) restrict to the given part (index)

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.

7.1. Output for Shipflow

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.).

7.2. Output for DAWSON and RAPID systems

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1451 / 7399


NAPA for Design Manuals 2016.3

!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.

8. Fetching panel data in a macro


For other uses than the standard output, the results can be fetched from the definition description. The geometry derived from the panel
definitions is added to it by giving command CALC. Any change of definition causes the geometry to be removed.

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.

The flag record contains five elements:

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,...

Copyright © 1992 - 2016 NAPA. All rights reserved. 1452 / 7399


NAPA for Design Manuals 2016.3

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.

The following macro lists the points of element i.

@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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1453 / 7399


NAPA for Design Manuals 2016.3

9. Output sample for Shipflow


The following example of the output corresponds to the definition below (here defined with the old syntax):

ADD (part1) 80,2,90,*,-1,3,KNF

ADD (part2) 90,3,99.7/-0.01,*,-1,2,4.2,3,KNF

ADD (part3) 99.7/0.01,3,102.9,*,-1,2,4.2

ADD (part4) 99.7/-0.01,3,105,*,4.2,3,KNF

Case for the output example


Note: the example was made before a change of output order, presently x runs from fore to aft.

PART1

80.00 0.000 0.000 5


80.00 4.493 0.552 0
80.00 7.876 3.509 0
80.00 9.967 7.501 0
85.00 0.000 0.000 1
85.00 4.128 0.993 0
85.00 6.954 4.276 0
85.00 9.741 7.593 0
90.00 0.000 0.000 1
90.00 3.580 1.697 0
90.00 5.874 5.149 0
90.00 9.037 7.867 9

Copyright © 1992 - 2016 NAPA. All rights reserved. 1454 / 7399


NAPA for Design Manuals 2016.3

PART2

90.00 0.000 0.000 5


90.00 3.189 1.175 0
90.00 4.981 4.200 0
90.00 6.283 5.473 0
90.00 7.720 6.601 0
90.00 9.037 7.867 0
93.23 0.000 0.000 1
93.23 2.675 1.263 0
93.23 3.618 4.200 0
93.23 4.982 5.631 0
93.23 6.619 6.822 0
93.23 8.154 8.143 0
96.47 0.000 0.000 1
96.47 2.328 1.479 0
96.47 2.067 4.200 0
96.47 3.347 5.832 0
96.47 5.127 7.140 0
96.47 6.870 8.496 0
99.70 0.000 0.074 1
99.70 2.068 2.161 0
99.70 0.007 4.200 0
99.70 1.302 6.085 0
99.70 3.133 7.604 0
99.70 5.112 8.928 9

PART3

99.70 0.000 0.077 2


99.70 2.065 2.164 0
99.70 0.000 4.200 0
100.77 0.000 0.271 1
100.77 1.895 2.165 0
100.77 0.000 4.150 0
101.83 0.000 0.719 1
101.83 1.546 2.252 0
101.83 0.000 3.919 0
102.90 0.000 1.920 1
102.90 0.548 2.460 0
102.90 0.000 3.010 9

Copyright © 1992 - 2016 NAPA. All rights reserved. 1455 / 7399


NAPA for Design Manuals 2016.3

PART4

99.70 0.007 4.200 5


99.70 1.302 6.085 0
99.70 3.133 7.604 0
99.70 5.112 8.928 0
101.47 0.000 6.283 1
101.47 1.232 7.350 0
101.47 2.542 8.320 0
101.47 3.916 9.198 0
103.23 0.000 7.829 1
103.23 0.885 8.328 0
103.23 1.730 8.921 0
103.23 2.590 9.491 0
105.00 0.000 9.375 1
105.00 0.407 9.440 0
105.00 0.787 9.602 0
105.00 1.147 9.807 9

10. Commands in task PANEL

ADD add new panel

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).

T: (opt) turn the direction of the section by a point object or by a curve.

axis1: the section axis, either X, Y or Z

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.

axis2: direction in which the other limitation is given

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1456 / 7399


NAPA for Design Manuals 2016.3

ADD HULLA Z 6 8 DECKA Y -1 7 TRANSOM

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,

ADD ... pl1/tol ni pl2/tol ....

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

ADD hull (id) x1 ni x2 * lim1 n1 lim2 n2 ... limn

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.

ADD 20 5 40 * -1 4 DWL 3 KNF

The panel is formed by two parts, one from below to the curve DWL, and the other from DWL
to KNF.

ADD (PANEL2) 92/0.01 4 96 * -1 5 DWL

A panel named PANEL2 is made between 92 and 96. The section for x=92 is made at 92.01.

CALC create the data set

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.

CAT catalog of save definitions

For options, see !EXPL CAT/GEN.

DEF define panel

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 ...

i: index of the panel, may be one higher than current number.

For the other parameters, see the ADD command.

DELETE delete panel

DELETE i

i: index of panel to be deleted

DES print current definitions

Copyright © 1992 - 2016 NAPA. All rights reserved. 1457 / 7399


NAPA for Design Manuals 2016.3

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.

n: only the n:th part

A: all parts, using ADD commands

DR enter general drawing task

EDIT enter editor

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.

EMPTY remove all panels

END finish the subtask

FORMAT define storage format

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

alt: format selection:

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.

GENERATE generate surface

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.

GENERATE name part

name: name of surface to be formed

part: (opt) use only the given part, default=all. 'part' is the index used in the DEF command.

GET get panel definition from the data base

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.

/proj: (opt) name of project

HULL define hull to be used

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1458 / 7399


NAPA for Design Manuals 2016.3

HULL name

name: name of hull surface

NEW create new definition

This command initiates a new panel definition.

NEW name

name: name of set

NOTES add comments

This command adds descriptive text. For more information, see !EXPL NOTES/GEN.

NOTES 'text', 'text', ...

text: line of text. The first one is visible in the catalog.

OUTPUT output the panels in SHIPLFLOW format

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

dir>file: (opt) directory and file name of the receiver.

PLOT plot the points or limit curves

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

L: limit curves totally

i,L: limit curves of the i:th part

E: plot elements, not points. If filling is on, the plotting order is selected to give a hidden lines
effect.

PROJ,SIZE,COL,DASH,THI,TH,FILL drawing control

These are commands from the general drawing task made directly available. For the others,
use command DR.

RENAME rename the current definition

RENAME name

name: new name

REPLACE replace the current set in the data base

If the definitions do not exist in the data base, use SAVE.

SAVE save the current set in the data base

If the definitions already exist in the data base, use REPLACE or add option !. To change the
name, command RENAME must first be used.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1459 / 7399


NAPA for Design Manuals 2016.3

TEXT add comments

Old synonym for NOTES.

WHERE tell name of current definition

Copyright © 1992 - 2016 NAPA. All rights reserved. 1460 / 7399


NAPA for Design Manuals 2016.3

Auxiliary functions (GM)


This chapter presents some auxiliary facilities related to the creating of geometric objects, such as arrangements in the database and producing
various kinds of information. The tasks presented are handled under the definition task (DEFINE).

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:

object,object,... This specifies the objects listed.

(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

stands for CX1, CX3, ... CX9

*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.

2. Listing and editing object definitions


One of the most important commands is the command DESCRIPTION:

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.

Note specially the case:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1461 / 7399


NAPA for Design Manuals 2016.3

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.

See also the section about changing of generated curves.

3. Listing curve data


Usually, the most practical way of verifying defined curves is to draw them. Using the LIST command, more information can be obtained, by
which some aspects of the result of the curve definitions can be obtained more precisely. There are two versions of LIST function installed.

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 following quantities can be specified in LQ CUR:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1462 / 7399


NAPA for Design Manuals 2016.3

LIST OF CURVE: FRA


**************************************
X Y Z T SC REF.CURVE
22.000 0.000 0.000 0.00
4.700 0.000 0.00 -/ PFRA1
6.500 1.800 90.00 /- PFRA2
6.500 10.000 90.00

LQ CUR NR, X, Y, Z, TP, ' ', SC, REFC


LIST FRA N

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

4. Listing information about a patch surface


Information about a patch surface at the selected points can be listed by the command NLIST. The result is controlled by the commands LQ
NODE and TOO NODE:

NLIST surface selection options

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.

The following quantities can be listed:

QUANTITY EXPLANATION

NR 470 number of point

X 1001 x-coordinate

Y 1002 y-coordinate

Z 1003 z-coordinate

TSX 1031 inclination of the x-section

TSY 1032 inclination of the y-section

Copyright © 1992 - 2016 NAPA. All rights reserved. 1463 / 7399


NAPA for Design Manuals 2016.3

TSZ 1033 inclination of the z-section

CSX 1041 curvature of the x-section

CSY 1042 curvature of the y-section

CSZ 1043 curvature of the z-section

CRVS 1044 the smaller principal curvature

CRVL 1045 the larger principal curvature

CRVM 1046 mean curvature

CRVG 1047 gaussian curvature

PN 1060 number of patch

PU 1061 parameter u of the patch

PV 1062 parameter v of the patch

C1 1051 first intersecting curve

C2 1052 second intersecting curve

ANG 310 inclination of intersecting curve

CRVN 1048 normal curvature of intersecting curve

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,

Si the i'th patch intersecting at the point is used. (default=S1)

The output sample below is made with the commands

LQ NODE, C1, C2, X, Y, Z


TOO NODE, HD=(S, U, UL)
NLIST HULLM

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

5. Listing information about objects (INFO)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1464 / 7399


NAPA for Design Manuals 2016.3

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

EC: all extreme coordinates

ADM: administrative oriented data

AREA: area oriented data

VOL: volume oriented data

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1465 / 7399


NAPA for Design Manuals 2016.3

The * prefix is available in INFO also, for example:

INFO *HULL

NAME GSTYPE DATE TIME XMIN XMAX REFQ ORNT SS


------------------------------------------------------------------
HULL COMB-P 95-09-01 21.57 -2.80 85.50 - Y x
HULLA PATCH 95-09-01 21.57 -2.80 22.00 - Y
HULLM PATCH 95-09-01 21.57 22.00 62.00 - Y
HULLF PATCH 95-09-01 21.57 62.00 85.50 - Y

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 following output example is the result of

CAT TYPE=S NAME>BH U

Name Description Date Time User


BH1 95-09-01 21.57 JVH
BH2 95-09-01 21.57 JVH
BH3 96-04-05 17.15 JVH
BH4 95-09-01 21.57 JVH
BH5 95-09-01 21.57 JVH
BH6 95-09-01 21.57 JVH
BH7 95-09-01 21.57 JVH

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.

7. Change of generated curves


A 'generated curve' means a curve obtained otherwise than by direct definition. Such a curve cannot therefore be modified the normal way by
changing the definition or using curve editing. 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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1466 / 7399


NAPA for Design Manuals 2016.3

!: generate the curve definition regardless of possible other ways producing the result. This option must be the last one.

TOL=tol: tolerance for conversion, default GMTOL.

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.

8. Lofting tables (old version)


Here the old version of the LOFT task, that is still available under the task OLOFT, is described. The new version of the Lofting tables is
documented in an own chapter.

Lofting tables, containing coordinates of selected points on surfaces or curves, can be produced under task OLOFT.

8.1. Commands of old version

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 points to be listed are selected by arguments X, Y and Z.

8.2. LIST command

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 values of the arguments are given by commands X, Y or Z.

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.

8.2.1. Available quantities

The following quantities are available for the LQ:

X: x-coordinate

Y: y-coordinate

Z: z-coordinate

FRN: x-coordinate represented by frame number

L: curve length from startpoint

Copyright © 1992 - 2016 NAPA. All rights reserved. 1467 / 7399


NAPA for Design Manuals 2016.3

ANG: inclination of curve in the plane corresponding to the first argument

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).

A halfbreadth table is as function of x and z without special features is obtained by LQ X Y.

8.2.2. Special cases

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

gives only two y-columns, corresponding to the two first z-arguments.

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

LQ X Y/1 Y/1/S Y/1/T

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.

8.2.4. Coordinates from curves

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.

8.2.5. Limiting the surface

Another possibility to avoid undesired points is to cut parts of the surface away with coordinate limits:

LIMITS xmin xmax ymin ymax zmin zmax

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1468 / 7399


NAPA for Design Manuals 2016.3

LIMITS - - 0 - - -

8.3. Other commands

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.

Command ARGS lists the current arguments.

9. Deleting objects in the database


Objects can be deleted from the database with command

UNSAVE, objects

where 'objects' is the syntax presented above for referring to single objects or objects including referenced ones.

This operation is not allowed for locked objects.

10. Copying objects between projects and versions


A set of objects can be copied from another version in the current project or from another project with command COPY:

COPY objects FROM version/project options

'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:

YES: copy anyway

NO: do not copy

C: copy, continue without asking for permission

Q: quit, cancel the whole operation

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:

COPY **HULL FROM A/P1234 !

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1469 / 7399


NAPA for Design Manuals 2016.3

COPY **ARR*A FROM B NQ

Copy all rooms from ARR*A in version B, as far as not already existing.

COPY ****ARR*A FROM B !!

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:

COPY oldname newname

This command stores under 'newname' a copy of the object 'oldname'.

Locked objects cannot be overwritten by COPY.

11. Renaming objects


The name of a single object can be changed by

RENAME, oldname newname

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.

12. Automatic drawing


Command AUTO controls automatic drawing of changed objects. For curves, the only additional measures needed are the usual commands for
scaling and projection.

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.

13. Temporary definitions


Command TEMP ON/OFF controls the temporary definition mode. In this mode, objects defined or changed are not stored in the database, but
available until the run time set is cleared or explicitly cancelled.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1470 / 7399


NAPA for Design Manuals 2016.3

With command CANCEL, temporary definitions can be cancelled.

14. Sharing objects between versions


An object can be defined to be the same as in another version by doing a definition with command FROM:

SURFACE HULL
FROM A

or, if the object has a different name in the other version

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.

15. Converting to the new format


Geometry created with pre-level D versions of NAPA is stored in a different format. This can be used by newer programs, but not vice versa.

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.

16. Frames, webs and longitudinals


Analogically with the normal frame system, a system of webs and longitudinals can be defined. While #n refers to the location of frame n, #WEBn
and #LONGn refer to locations expressed via the web or longitudinal systems. The number n can contain a decimal part, or a displacement in the
form #WEB2+0.5 can be used.

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).

17. Locking of objects against changes


For security against accidental changes a lock can be placed on geometric objects. As long as the lock is valid, the object cannot be defined or
redefined by the normal functions of GM. The locking function will not prevent changes caused by copying using general database operations
(mainly COPY under TOC).

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1471 / 7399


NAPA for Design Manuals 2016.3

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

locks also all curves directly or indirectly referenced by HULLF.

For the special case of locking part of a general surface, see the paragraph about defining partial surfaces.

18. Command GENERATE


The main purpose of command GENERATE is to create objects by performing operations on existing ones, and these functions are presented in
the chapter 'Special definition functions'.

The command can also be used for starting the generation of calculation sections:

GEN CSE object options

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 alternatives are R (rescue) and B (brief).

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

GEN CSE ARR*A F

forces recalculation of all calculation sections in the arrangement A.

The same function, but with graphic output added is available as PLOT CSE.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1472 / 7399


NAPA for Design Manuals 2016.3

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.

Cross Means that an object either directly or indirectly refers to itself.


referencing
objects

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.

General A general surface is a surface of arbitrary form, defined by a curve grid.


surface

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).

Outside See 'inside'.

Owner (of a The curve at which a tangent function is valid.


tangent
function)

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).

Point object An object defining a location (x,y,z).

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1473 / 7399


NAPA for Design Manuals 2016.3

Principal plane A plane parallel with a coordinate plane.

Principal plane Plane curve in a principal plane.


curve

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

Surface object Object defined by restricting a surface with other surfaces.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1474 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1475 / 7399


NAPA for Design Manuals 2016.3

Overview of functions (HYD)


Table of Contents:

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

2.1. Task HYD - main hydrostatic functions

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.

2.2. Task STAB - stability elements

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 .

The results can be presented graphically or as a list.

The calculations can be made in both calm water and waves.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1476 / 7399


NAPA for Design Manuals 2016.3

2.3. Task FRA - frame areas

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.

2.4. Task BJ - Bon Jean tables and curves

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.

3.2. Reference system

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1477 / 7399


NAPA for Design Manuals 2016.3

3.3. Layout control

The following possibilities can be used for varying the list layouts:

Command !HEA controls the page headers,


Command !PAGE controls the page size,
Command !FORM controls formatting of the numeric quantities,
Table output options

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.

3.4.1. Hydrostatics in oblique waves

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1478 / 7399


NAPA for Design Manuals 2016.3

Task HYD -basic hydrostatic quantities (HYD)


This task contains output of hydrostatic data in various forms for the ship. The difference between the HYD and STAB tasks is that all calculations
are done for given floating positions in HYD while STAB does balancing to meet the given displacement and center of gravity.

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:

Symbol Explanation Unit

AREA wetted area M2

AZIMAX aximuth angle of Imax DEGREE

AZIMIN azimuth angle of Imin DEGREE

CB block coefficient

CM midship section coefficient

CP prismatic coefficient

CW waterplane coefficient

DISP total displacement TON

DISPM moulded displacement TON

Copyright © 1992 - 2016 NAPA. All rights reserved. 1479 / 7399


NAPA for Design Manuals 2016.3

DW deadweight TON

FRA total frame area M2

FRAM moulded frame area M2

IMAX max. moment of inertia of waterplane M4

IMIN min. moment of inertia of waterplane M4

IX ix of waterplane M4

IXY ixy of waterplane M4

IY iy of waterplane M4

KML longitudinal metacentric height M

KMT transverse metacentric height M

LCA longitudinal centre of flotation M

LCB longitudinal centre of buoy. M

LMA longitudinal moment of waterplane M3

LMV longitudinal moment of volume M4

LWL length of waterline M

MCT moment to change trim TONM/CM

T draught, moulded M

TA draught aft M

TF draught fore M

TCB transverse center of buoyancy M

TCP immersion/cm TON/CM

TK draught below keel M

TMA transverse moment of surface M3

TMV transverse moment of volume M4

TRF trim factor M

TRFA trim factor aft M

TRFF trim factor fore M

VCB vertical center of buoyancy M

VMV vert. moment of volume M4

VOLM volume moulded M3

VOLT total volume M3

WLA waterline area M2

WSA wetted surface area M2

Below, some of the quantities are presented in more detail.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1480 / 7399


NAPA for Design Manuals 2016.3

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).

Graphic output is produced with the command PLOT or PLD.

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:

HULL HULL ;** hull name


T 6 ;** draught, moulded M
TK not given ;** draught below keel M
DISP not given ;** total displacement TON
TR 0 ;** trim M
HEEL 0 ;** heeling angle DEGREE
RHO 1.025 ;** density TON/M3
LWX 3200 ;** lightweight TON
CGXW not given ;** cgx of lightweight M
WAVE TEST,H=2 ;** wave
WLS OFF ;** waterline sections

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1481 / 7399


NAPA for Design Manuals 2016.3

3.1. The hull object

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).

3.2. Draught, trim and heel

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.

3.3. Waterline sections for area related quantities

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

ON means that waterline sections are used.

Since this option was introduced, the standard method for doing end corrections has been improved, and should in most cases be sufficient.

3.4. Other arguments

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1482 / 7399


NAPA for Design Manuals 2016.3

3.5. Handling of arguments

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.

DFL (x1,t1) (x2,t2) (x3,t3) ..

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.

Alternatively, the deflection can be defined as a single value:

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

4. General output functions


The following standard commands are available:

LQ selection of output quantities

LQ HYD selection of output quantities for tables concerning even keel

LQ TRQ selection of output quantities for tables with varying trim

LQ LDS selection of output quantities for loading scale

TOO table output options for controlling the layout

NL open a new list and/or specify list parameters. If not given, a list named 'HYDROSTATICS' is opened

TYPE add text to the list

NP new page

FIG insert figure

Copyright © 1992 - 2016 NAPA. All rights reserved. 1483 / 7399


NAPA for Design Manuals 2016.3

!PAGE set page size

!FORM control format and output units of quantities

5. Listing functions

5.1. LIST HYD

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.

The following examples show a short list in both formats:

Vertical format:

T DISP LCB KMT CB WLA MCT


M TON M M M2 TONM/CM
----------------------------------------------------------
3.000 3532.0 50.588 13.127 0.571 1512.6 88.1
4.000 5128.3 50.287 11.161 0.623 1593.4 95.3
5.000 6794.2 49.939 10.070 0.661 1666.0 105.5
6.000 8552.0 49.668 9.583 0.693 1769.1 124.8

Horizontal format:

draught, moulded M 3.000 4.000 5.000 6.000


--------------------------------------------------------------
total displacement TON 3532.0 5128.3 6794.2 8552.0
long. centre of buoy. M 50.588 50.287 49.939 49.668
transv. metac. height M 13.127 11.161 10.070 9.583
block coefficient 0.571 0.623 0.661 0.693
waterline area M2 1512.6 1593.4 1666.0 1769.1
moment to change trim TONM/CM 88.1 95.3 105.5 124.8

Quantities can be equipped with qualifiers as follows:

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:

LQ T ... DISP/1.010 DISP/1.025 LCB/XREF ...

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1484 / 7399


NAPA for Design Manuals 2016.3

LQ T ... DISP(D1010,-,'Displ. rho=1.010')/1.010, ...


LQ T VOLM LWL CB/L CB(CB2)/'VOLM/(LREF*BDWL*LWL)'

The qualifier L for CB replaces LREF with LWL and gives the same results as the formula for CB2.

5.2. LIST TRQ

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.

LIST TRQ DISP

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:

LIST TRQ DISP UL

--------------- total displacement TON ---------------


trim -2.00 -1.00 0.00 1.00 2.00
draught
-----------------------------------------------------
3.000 3560.2 3543.8 3538.0 3541.8 3552.6
4.000 5174.0 5150.4 5135.0 5124.8 5124.3
5.000 6875.8 6830.8 6801.0 6786.6 6787.9
6.000 8653.9 8597.2 8558.8 8542.8 8546.8

LIST TRQ DISP H UL

Copyright © 1992 - 2016 NAPA. All rights reserved. 1485 / 7399


NAPA for Design Manuals 2016.3

--------------- total displacement TON ---------------


draught 3.000 4.000 5.000 6.000
trim
-----------------------------------------
-2.00 3560.2 5174.0 6875.8 8653.9
-1.00 3543.8 5150.4 6830.8 8597.2
0.00 3538.0 5135.0 6801.0 8558.8
1.00 3541.8 5124.8 6786.6 8542.8
2.00 3552.6 5124.3 6787.9 8546.8

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).

5.3. LIST COMB

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:

T M 3.000 4.000 5.000 6.000


----------------------------------------------
DISP TON 3532.0 5128.3 6794.2 8552.0
LCB M 50.588 50.287 49.939 49.668
KMT M 13.127 11.161 10.070 9.583
CB 0.571 0.623 0.661 0.693
WLA M2 1512.6 1593.4 1666.0 1769.1
MCT TONM 88.1 95.3 105.5 124.8
TCP TON/CM 15.5 16.3 17.1 18.1
total displacement TON
-1.00 3538.1 5143.7 6824.0 8590.4
0.00 3532.0 5128.3 6794.2 8552.0
1.00 3535.5 5118.0 6779.8 8536.0
transv. metac. height M
-1.00 13.147 11.161 10.084 9.560
0.00 13.127 11.161 10.070 9.583
1.00 13.096 11.170 10.087 9.616

The example above used the following options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1486 / 7399


NAPA for Design Manuals 2016.3

LQ T, '-', DISP, LCB, KMT, CB, WLA, MCT, TCP


LQ TRQ, DISP, KMT
TOO HD=S

The units are added automatically, but can be suppressed by option NU.

5.4. LIST TRIM

This command lists values corresponding to the trim diagram. For further information, see PLOT TRIM.

5.5. Background information

The following list functions produce various background information:

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

Lists data about the current hull object.

Note also the general LQ EXPL command, by which a presentation of selected quantities can be listed.

6. Plot functions

6.1. Plot hydrostatic curves (PLD)

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1487 / 7399


NAPA for Design Manuals 2016.3

POO HYD, BOX, VA, LGTEXT=S, LEGEND, LGTYPE=IL, LGH=*1.1, NET=P5021,


F1: AXIS=LB, PEN=A1,
F2: AXIS=UA, PEN=A2, SCALE=(F1),
F3: AXIS=LA, PEN=A3, SCALE=(F1),
F4: AXIS=UL, PEN=A4, SCALE=(F1),
ARG: AXIS=LB

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 following example is obtained with

PQ T, VOLM, LCB, KMT, FRA

6.2. Hydrostatic data, old function (PLOT)

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.

The following figure shows an example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1488 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1489 / 7399


NAPA for Design Manuals 2016.3

PLOT simulated by PLD


The plot above was made with the following options:

PQ T, VOLM, LCB, KMT, FRA


POO HYD, BOX, VA, POS=*(0.1,0.3), SIZE=*(0.8,0.6),
SMOOTH, NET=P5021,ID=LH,
F1: AXIS=LBR, PEN=A1,
F2: AXIS=LBR, PEN=A2, SCALE=(F1), LA=-0.015,
F3: AXIS=LBR, PEN=A3, SCALE=(F1), LA=-0.03,
F4: AXIS=LBR, PEN=A4, SCALE=(F1), LA=-0.045,
ARG: AXIS=LB+UA

6.3. PLOT LDS - loading scale

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:

draught (over baseline)


deadweight
displacement
moment to alter trim
displacement per unit immersion
metacentric height from keel (KM)
draught below keel

Copyright © 1992 - 2016 NAPA. All rights reserved. 1490 / 7399


NAPA for Design Manuals 2016.3

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.

The following example shows the result without options:

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.

6.3.2. Controlling scaling aspects

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1491 / 7399


NAPA for Design Manuals 2016.3

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).

6.3.3. Controlling tick subdivision

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.

6.3.4. Controlling headers

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.

6.3.5. Other options

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.

6.3.6. Editing the result

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1492 / 7399


NAPA for Design Manuals 2016.3

6.4. PLOT TRI - trim diagram

The trim diagram shows the floating position as a function of displacement moment or vice versa:

Example of trim diagram (PLOT TRI R TH=1)


A header text is added with the option H in the PLOT command.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1493 / 7399


NAPA for Design Manuals 2016.3

This is illustrated by the following example:

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.

6.5. Plot options

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.

6.6. Using the general diagram drawing task

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.

The following examples show two complete sets of commands.

6.6.1. Example 1 - hydrostatic curves

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.

The example is drawn with the following commands:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1494 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1495 / 7399


NAPA for Design Manuals 2016.3

Diagram from the commands above

6.6.2. Example 2 - curves with varying trims

In this example, the result of LIST TRQ LCB is made into a diagram.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1496 / 7399


NAPA for Design Manuals 2016.3

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

ARG handle arguments

This command handles functions related to the arguments. Without parameters the current
values are listed.

ARG GET name source

The given argument set is fetched and assigned

name: name of the argument set

Copyright © 1992 - 2016 NAPA. All rights reserved. 1497 / 7399


NAPA for Design Manuals 2016.3

/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.

source: (opt) SYSDB or NAPADB

ARG SAVE name text db

The current arguments are saved under the given name in the project data base or in the
specified location.

name: name assigned to the set

text: (opt) descriptive text (apostrophes compulsory)

db: (opt) SYSDB or NAPADB, default=project db.

ARG UNSAVE name db

Delete save set from the data base.

name: name of argument set

db: (opt) SYSDB or NAPADB, default=project db

ARG CAT

Catalog of saved argument sets.

ARG RESET

Reset arguments to the default values

BDWL temporary change of BDWL

The command concerns BDWL as defined in the reference system. It affects the definition of
CB and other coefficients.

CALCULATE start calculation

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 List catalog of stored data

The command lists names of stored data of the given type.

CAT type

type: type of data

FRB: freeboard deck edge

WAVE: wave definitions

CFRB freeboard deck edge

Select the current freeboard deck edge. The freeboard deck edge is used for calculation of
quantities related to the freeboard.

CFRB name

Use the freeboard deck edge defined by FRB.

name: name of freeboard deck edge.

CFRB OFF

No current freeboard deck edge.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1498 / 7399


NAPA for Design Manuals 2016.3

CGXW center of gravity of light weight

This command defines longitudinal center of gravity of light weight. (Needed for trim diagram
with option DW).

CGXW value;

DES List data in input format

The command lists the given data in the input format.

DES type name

type: type of data

FRB: freeboard deck edge

WAVE: wave

name: name of data item

DFL hull deflection

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

DFL (x1,t1) (x2,t2) (x3,t3) ..

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.

x1,x2,x3...: places on the x-axis where draughts are given

t1,t2,t3...: draughts (m)

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.

d: deviation at XREF (m).

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

DISP displacement argument

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

values: displacements as series or single values

DR -> enter the general drawing task

ECO end corrections on/off

Copyright © 1992 - 2016 NAPA. All rights reserved. 1499 / 7399


NAPA for Design Manuals 2016.3

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

Set end corrections on/off

EDIT -> enter editor

END finish the task

FIG add figure to the list

See !EXPL FIG/GEN

FRB -> Define freeboard deck edge

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.

FRB name text

name: name of freeboard deck edge

text: (opt) descriptive text

HEEL calculation heel

Hydrostatics is normally calculated for heel=0 only, but this argument allows calculation for
other heels also.

HEEL heel

heel: value of heel (one value only)

HULL hull object

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

name: name of hull

INFO information about current hull object

The information displayed is the same as added to calculation log.

LIST start listing

This command starts various listings. If calculated values are not already available, calculation
is done with the current arguments.

HYD Main listing + TRQ

LIST HYD t-options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1500 / 7399


NAPA for Design Manuals 2016.3

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

t-options: standard table output options, see !EXPL TOO/GEN

LIST TRQ quant options t-options

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.

options: options specific for this command

CLASSIC: format the output as releases before 2010.

NH: (no header) omit the headers normally output between quantities

NP: start every quantity on a new page

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)

HOPT=opt: various options for the headers

B: output the quantity header without decorations (default if not CLASSIC)

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.

COMB Even keel and trim values combined

LIST COMB options t-options

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.

options: options specific for this list

NH: (no header) omit the headers normally output between values calc. for trims.

TR: add the text 'trim' over the trim values

NU: (no unit) omit the units column

U2: old way of adding units

SH: use short headers (from quantity standard) instead of symbols to identify quantities

LH: use long headers

UBT: add underline between quantities from TRQ.

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1501 / 7399


NAPA for Design Manuals 2016.3

O Others LDS,TRI,REF,HDP

LIST LDS t-options

As LIST HYD, but showing the default quantities of the loading scale.

Standard table output options (use !EXPL TOO/GEN).

LIST TRI XREF=x NH NTH=n1 NTV=n2 NP RULER

List calculated values for trim diagram.

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

NTV=n2: (opt) similarly for number of lines on the page

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

L: old style format

S: modern format (default)

LIST ARG

List arguments

LIST .macro options

Runs a list macro. LIST .CAT gives a catalog.

LQ select output quantities

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.

See !EXPL LQ/GEN.

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1502 / 7399


NAPA for Design Manuals 2016.3

LQ TRQ 'Displacement' DISP 'Longitudinal center of buoyancy', LCB,


'Height of transversal metacenter' KMT

Select the quantities mentioned, adding text to be output between the groups.

LREF temporary change of LREF

The command concerns LREF as defined in the reference system. It affects the definition of
CB and other coefficients and of trim.

LW lightweight of the ship

This command defines light weight of the ship (needed for loading scale if deadweight
included).

LW value

LWX define lightweight

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 causes the result listing to continue on a new page.

PLD draw diagram

This command draws a diagram showing the quantities selected with command PQ and using
the options set by command POO.

PLD POO plot-options

plot-options: (opt) standard plot options, see !EXP PLD/GEN. If this part is given, the keyword POO must be
added.

PLOT start drawing

This command starts drawing of the result. If calculated values are not already available,
calculation is done with the current arguments.

PLOT .macro options

Runs a plot macro. PLOT .CAT gives a catalog.

PLOT alt opt

alt: (opt) alternative plots (CURVES, TRI, LDS) see below.

opt: (opt) options

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.

LDS Loading scale

PLOT LDS qnt=d/option, qnt=d/option ... options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1503 / 7399


NAPA for Design Manuals 2016.3

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.

option: (opt) various quantity specific options, one or more of

R: add density correction scale to the right. RR=including rho=1.030.

M: (with R): attach the correction scale to main ticks only

F: draw the scale for fresh water (RHO=1)

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)

B: suppress the text corr. to the max. density

options:

SCALE=scale: scale of draught scale

H=h: height (in m) of area reserved for the data part

HU=h: height reserved for headers as a fraction of D (NOTE!)

D=d: breadth of column for a single quantity

BRHO=d: breadth reserved for a single density in the density correction scale

U0=u: horizontal location, default=0

TH=q: text height of numbers as fraction of D, default=0.075

THH=q: text height of the main header (m)

LTI=q: length of the longest ticks as fraction of the breadth of the column, default=0.5

E: make all smaller ticks equal, default=tick at multiple of 5 longer

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.

HD=text: main header text, default LOADING SCALE

SH: use the short header from the quantity standard as identification for the quantities (can be
changed by !FORM qnt SH=...)

NHD: omit the main header

S: identify quantities by symbols

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.

FONT=font: font for texts

XREF=x: reference point for x-coordinates, default x=0.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1504 / 7399


NAPA for Design Manuals 2016.3

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.

ONLY: plot the scale(s) only, not frames or header texts

Example:
PLOT LDS

Plot the default scale.

PLOT LDS -MCT

as above but omit the MCT scale

PLOT LDS T DW/R DISP MCT TCP KMT TK

The same as the default scale but with the quantities explicitly declared

PLOT LDS T DW/R DW/F DISP MCT

Variation with fewer quantities and the DW plotted on both sides of the density correction scale

DR; DRAWING LOADING_SCALE; END


PLOT LDS T D=0.02 U0=0 H=0.25 ONLY
PLOT LDS DISP D=0.03 U0=0.02 H=0.25 ONLY
PLOT LDS DW/R D=0.025 U0=0.05 H=0.25 ONLY
...
DR; POL / (0 0) (0.12 0.25)
... headers
EDR

The set above outlines the process when tailoring the scale using PLOT LDS for the scales
only.

TRI Trim diagram

PLOT TRI options

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:

H: add header text

DW: show deadweight instead of displacement

R=step: restrict marking of trims and draught to multiples of 'step'. The step parameter may be omitted,
default=1.

TH=step: use thick lines for lines belonging to multiples of 'step'.

POO set plot output options

This command handles plot output options for diagrams drawn with command PLD. For the
syntax of the POO command, see !EXPL POO/GEN.

PQ select quantities for diagram

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.

RESET reset default arguments

RESET P resets only arguments related to diagram plotting.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1505 / 7399


NAPA for Design Manuals 2016.3

RHO set seawater density

RHO rho

rho: density of seawater. Default as specified in the reference system.

SCAN -> enter list scanner (IOF).

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 set size of plot

SIZE size

size: size given as A1,.. or directly by du,dv.

SRV -> enter services subtask

SUBSET output subset

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

values: set of values (single values or series)

SUBSET OFF

Cancels the SUBSET command.

T calculation draughts (above base line)

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

values: draughts as series or single values

TABLE -> enter table calculation

TK calculation draughts (below keel)

This command defines the calculation draughts. See also commands T and DISP.

TK values

values: draughts as series or single values

TOO enter table output options

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1506 / 7399


NAPA for Design Manuals 2016.3

values: trims as series or single values

TRIM 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).

TRIM values

values: trims as series or single values

TT draught and trim from draughts at ends

This command specifies a single trim and draught by giving the draught at the perpendiculars.

TT ta tf

ta: draught at aft perpendicular

tf: draught at fore perpendicular

TYPE add text to the output list

This command adds arbitrary text to the result list. See !EXPL TYPE/GEN.

UNS Unsave data

The given data items are removed from the data base.

UNS type name

type: type of data

FRB: freeboard deck edge

WAVE: wave definition

name: name of data item

WAVE Wave to be used in the calculations

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

Reference to an existing wave.

WAVE name H=height,TYPE=type,L=length,POS=pos,DIR=angle;

Define or redefine wave

name: name of the wave.

height: wave height (>0) measured from hollow to crest.

type: type of wave SINUS (default) or TROCHOID.

SINUS: sinus shaped wave

TROCHOID: trochoid shaped wave

length: (OPT) length of the wave (default = reference length of the ship)

position: (OPT) position of wave hollow

HOGGING: wave hollow in AP (aft perpendicular)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1507 / 7399


NAPA for Design Manuals 2016.3

SAGGING: wave hollow in AP+length/2

value: x-coordinate of wave hollow

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

Cancel the wave

WAVE CAT selection

Catalog of stored waves, for parameters see !expl CAT/GEN

WLS calculation from waterline sections

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

XREF temporary change of XREF

The command concerns XREF as defined in the reference system.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1508 / 7399


NAPA for Design Manuals 2016.3

Task STAB - hydrostatics as function of heeling (HYD)


This task contains functions based on hydrostatic data obtained by balancing the ship to given heelings, with given displacement and center of
gravity.

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:

WLA waterline area


VOLT total volume
LMV longit. moment of volume
LMD longit. moment of displacement
VMV vert. moment of volume
IY transv.moment of inertia of wl
KMT transv. metacentric height
LCB long. centre of buoyancy

The following quantities are calculated for all heelings:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1509 / 7399


NAPA for Design Manuals 2016.3

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.

Graphic output is produced with command PLOT or PLD.

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.

4. General output functions


The following standard commands are available:

NL open a new list and/or specify list parameters. If not given, a list named 'STABILITY' is opened

TYPE add own text to the list

NP new page

FIG insert figure

!PAGE for setting page size

!FORM for controlling format and output unit of numeric values

LQ selection of output quantities

TOO table output options for controlling the layout

LQ and TOO have only a minor role, as presented below.

5. Listing functions

Copyright © 1992 - 2016 NAPA. All rights reserved. 1510 / 7399


NAPA for Design Manuals 2016.3

5.1. LIST LONG

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)

5.2. LIST MS, KN

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:

RESIDUARY STAB. LEVER MS AS A FUNCTION OF DRAUGHT AND HEELING ANGLE


INITIAL TRIM: 0.00 M UNIT:
m
===================================================================
INITIAL HEELING ANGLE (DEGREES)
DRAUGHT 0.0 10.0 20.0 25.0 30.0 40.0 50.0
3.000 0.000 0.012 0.078 0.125 0.168 0.104 -0.208
4.000 0.000 0.010 0.082 0.159 0.226 0.211 0.127
5.000 0.000 0.008 0.058 0.049 0.038 0.062 0.001

Copyright © 1992 - 2016 NAPA. All rights reserved. 1511 / 7399


NAPA for Design Manuals 2016.3

5.3. General list

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:

LIST arg1 arg2=value arg3=value

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

Single value of second and third arguments

LQ ARG, T, TR, KN, MS


TOO STAB HD=(S, U, UL)
LIST HEEL DISP=4000

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1512 / 7399


NAPA for Design Manuals 2016.3

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:

LIST DISP HEEL=25

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

Several values of the second argument

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, KMT, HPHI(GZ)


TOO STAB
HD=((DISP, KMT, ' Righting lever at heeling angle'),
('ton', 'm', A), UL)
LIST DISP HEEL

Copyright © 1992 - 2016 NAPA. All rights reserved. 1513 / 7399


NAPA for Design Manuals 2016.3

DISP KMT Righting lever at heeling angle


ton m 0.0 10.0 20.0 25.0 30.0 40.0 50.0
-------------------------------------------------------------------
1000 11.506 0.00 1.06 1.57 1.57 1.49 1.18 0.78
2000 7.139 0.00 0.38 0.74 0.89 0.96 0.99 0.80
3000 5.832 0.00 0.16 0.37 0.50 0.64 0.73 0.61
4000 5.471 0.00 0.09 0.24 0.34 0.39 0.45 0.46
5000 5.473 0.00 0.09 0.17 0.17 0.18 0.25 0.22

Multiple values of all arguments

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1514 / 7399


NAPA for Design Manuals 2016.3

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:

LQ ARG(- ' ') KN


TOO HD=((HEEL, ' KN, at draught='), SH, UL)
LIST HEEL T NH

Listing result:

HEEL KN, at draught=


1.250 2.500 3.750 5.000 6.250
-----------------------------------------------
0.0 0.000 0.000 0.000 0.000 0.000
10.0 3.290 2.468 1.994 1.765 1.666
20.0 5.324 4.348 3.825 3.512 3.345
30.0 6.584 5.695 5.320 5.107 4.760
40.0 7.233 6.759 6.502 6.138 5.629
50.0 7.492 7.543 7.168 6.654 6.114

LQ ARG(-, ' '), KN


TOO HD=(('HEEL=',A),('draught') UL),
LBG=(' ========= KN (M) at trim=%HDTRIM ==========' ' ')
LIST T HEEL NH

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

5.4. Background data

LIST OBJ and LIST REF give information about the calculation object and reference system respectively.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1515 / 7399


NAPA for Design Manuals 2016.3

6. Plotting functions

6.1. PLD STAB

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.

The examples below use the following PQ and POO:

PQ STAB, ARG, KN
POO STAB, NET, SMOOTH,
ARG: AXIS,
F1: AXIS,
KN: RANGE=6

PLD HEEL DISP=4000

Result of PLD HEEL DISP=4000


In the example above, one value of the second argument was selected, giving one curve. In the following example, the whole range is used. Note
the use of SH for identification.

PLD HEEL DISP POO ID=SH

Copyright © 1992 - 2016 NAPA. All rights reserved. 1516 / 7399


NAPA for Design Manuals 2016.3

Result of PLD HEEL DISP

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.

6.2. The PLOT command

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1517 / 7399


NAPA for Design Manuals 2016.3

PQ ARG, HPHI, EPHI


POO STAB, NET, SMOOTH, ID=LH,
ARG: AXIS=Z,
HPHI: RANGE=(-1,2), PEN=A1, AXIS, IDPOS=0.4,
EPHI: RANGE=HPHI, PEN=A2, IDPOS=0.6
PLD HEEL T

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:

The equivalent PQ+POO+PLD:

POO STAB, NET, SMOOTH,


ARG: AXIS=Z,
MS: RANGE=(-2,0.5), AXIS, ID=LH
PLD HEEL T

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1518 / 7399


NAPA for Design Manuals 2016.3

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 draws cross curves:

PLOT CKG
The equivalent PQ+POO+PLD:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1519 / 7399


NAPA for Design Manuals 2016.3

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.

6.4. Controlling the PLOT command

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1520 / 7399


NAPA for Design Manuals 2016.3

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

ARG handle arguments

This command handles functions related to the arguments. Without parameters the current
values are listed.

ARG GET name source

The given argument set is fetched and assigned

name: name of the argument set

/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.

source: (opt) SYSDB or NAPADB

ARG SAVE name text db

The current arguments are saved under the given name in the project data base or in the
specified location.

name: name assigned to the set

text: (opt) descriptive text (apostrophes compulsory)

db: (opt) SYSDB or NAPADB, default=project db.

ARG UNSAVE name db

Delete save set from the data base.

name: name of argument set

db: (opt) SYSDB or NAPADB, default=project db

ARG CAT

Catalog of saved argument sets.

ARG RESET

Reset arguments to the default values

AZI azimuth angle

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1521 / 7399


NAPA for Design Manuals 2016.3

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.

CALCULATE start calculation

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 List catalog of stored data

The command lists names of stored data of the given type.

CAT type

type: type of data

O: openings

WAVE: wave definitions

DELETE delete openings

DELETE, OPENING, name;

name : name of the opening

UNS Unsave data

The given data items are removed from the data base.

UNS type name

type: type of data

WAVE: wave definition

name: name of data item

DESCRIPTION list description of openings

DESCRIPTION, OPENING, crit;

crit : selection criterion

name: name of opening(s)

ALL: list all openings

ROP: list relevant openings

IRO: list irrelevant openings

DISP argument displacements

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

values: displacements as series or single values

EDIT -> enter editor

END finish the task

Copyright © 1992 - 2016 NAPA. All rights reserved. 1522 / 7399


NAPA for Design Manuals 2016.3

FIG add figure to the list

See !EXPL FIG/GEN

FIXTRIM Select calculation mode fix trim/free trim

FIXTRIM ON

The ship is kept in even keel in calculations.

FIXTRIM OFF

The ship is allowed to trim freely (default).

HEEL calculation heels

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.

HULL hull object

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

name: name of hull

INFO information about current hull object

The information displayed is the same as added to calculation log.

IRO make openings irrelevant

IRO, name, ...;

name: name of opening

KG height of center of gravity

KG h

h: height of the center of gravity of the ship.

LCG define longitudinal center of gravity

The LCG argument (in addition to DISP) is an alternative to giving initial trims.

LCG values

values: set of lcg values (individual values or series)

LIST start listing

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.

LIST LONG options

Comprehensive listing (default). Options:

O: add data regarding the object

Copyright © 1992 - 2016 NAPA. All rights reserved. 1523 / 7399


NAPA for Design Manuals 2016.3

R: add data regarding the reference system

OPE: add data regarding (relevant) openings

HPHI: add hphi-values. KG (or GM) must be known, either from KG-argument or option in the
command.

EPHI: add ephi-values. hphi will also be printed.

KG=kg: value of KG for calculating hphi, ephi.

GM=gm: alternative to KG

table output options: see !EXPL TOO/GEN

LIST MS options

List ms as function of draught and trim. Analogically LIST KN. Options O, R, table output
options.

LIST arg1 arg2=value2 arg3=value3 NH options t-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.

=value3: (opt) selects single value of the third argument

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).

options: GM=gm or KG=kg.

t-options: table output options

LIST ARG

List arguments

LIST .macro options

Run given list macro. LIST .CAT gives catalog.

EXAMPLES
LIST LONG HPHI GM=1.5

Long listing, including hphi for given GM.

LIST HEEL T

List quantities selected by LQ, for all heels and draughts

LIST HEEL T=5 TRIM

As above, but repeat the table for all trims.

LIST H T=5

List quantities selected by LQ, for varying heels and T=5, TRIM=0.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1524 / 7399


NAPA for Design Manuals 2016.3

LQ select list quantities

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.

OPARR Opening arrangement

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

Activate the table OPE*name as an opening arrangement.

name: name of table without prefix OPE*.

OPARR OFF

Deactivate the opening arrangement (the openings defined by the task OPEN become
available).

Columns of the arrangement:

ID: identification of the opening

DES: description of the opening

OTYPE: type of opening regarding its severity in progressive flooding. The alternatives:

UNPROTECTED must not submerged

WEATHERTIGHT partly watertight

WATERTIGHT totally watertight

UNNOPROGRESSIVE (in DA only) unprotected but in the stage PROGRESSIVE no new


compartment is flooded through it.

WEPROGRESSIVE (in DA only) weathertight but in the stage PROGRESSIVE new


compartment may be flooded through it.

WENOPROGRESSIVE: like WEATHERTIGHT but in the progressive stage, water is never


spreading through this opening.

UNSEAWATEROVERFLOW: Specific opening type for dredger calculations. The seawater


overflow is connecting the hopper with the sea.

XCG,YCG,ZCG: x-, y- and z-coordinate of the opening (check point of immersion).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1525 / 7399


NAPA for Design Manuals 2016.3

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)

- it leads from the sea to an intact compartment

- it leads from a damaged compartment to an intact compartment

- connection information is missing

The opening is irrelevant if

- it leads to a damaged compartment

- it connects two intact compartments

- it leads to the sea and the connection is one-directional

- it leads from an intact compartment and the connection is one-directional

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:

AL: above, to the left

AC: above, centered

AR: above, to the right

L: to the left

O: over

R: to the right

UL: under, to the left

UC: under, centered

UR: under, to the right

OPENING -> definition of opening

OPENING, name, text;

Opening, immersion angle of which is printed in results. The command POS (x,y,z), defining
the position, must follow.

name : name of opening.

text : descriptive text (opt.).

PLD plot diagram

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.

PLD arg1 arg2 arg3 POO options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1526 / 7399


NAPA for Design Manuals 2016.3

arg1,arg2,arg3: selects arguments exactly as in the LIST command. For each value of the third argument, a
separate drawing is made.

POO: (opt) delimiter needed if options follow

option: (opt) standard plot output options in addition to or replacing those given with command POO.

EXAMPLE:
PQ ARG KN
PLD HEEL T

KN-curves are drawn as many as there are values of T (draught).

POO: (opt) delimiter needed if options follow

option: (opt) standard plot output options in addition to or replacing those given with command POO.

PLOT start drawing

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.

PLOT alt opt

alt: (opt) alternative plotting formats, default MS

MS: ms as function of heel

CMS: ms as function of draught

DMS: ms as function of displacement

KMS: ms as function of draught below keel

CKG: cross curves Available options

FIG=fig, default FIG=DRWCRO2


NF=no figure.
TRIM=trim: draw for given trim only

HPHI: draw hphi-curve Available options:

FIG: name of drawing frame, default DRWHDFRAME.


NF: no figure
EPHI: draw efi also (first heel must be 0)
KG=kg: define KG if not given as argument
GM=gm: alternative to KG
T=t: draw for given draught only, default=all
TK=tk: draw for fiven draught below keel only
TRIM=trim: draw for given trim, default=0
GML: add line showing GM

OI op1 op2 ... draw curve showing immersion angle of opening as a function of draught.
op1,op2..= name of the opening(s). Options:

FIG: name of drawing frame, default DRWHDFRAME.


TRIM=trim: draw for given trim, default=0

PLOT .macro options

Run plot macro. PLOT .CAT gives catalog.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1527 / 7399


NAPA for Design Manuals 2016.3

RANGE V -0.5 1; RANGE U 0 90 DEGREE; PLOT HPHI KG=9.5 NF

As above, but with a given range and without frame.

POO set plot output options

This command controls the graphic result produced by PLD. For the parameters of the
command, see !EXPL POO/GEN.

PQ select quantities for plot output

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.

RESET reset default arguments

Without parameters, the result is the same exit+re-enter. With parameter D, only diagram
options are reset.

RHO density of seawater

With this command, the density of seawater stored in the reference system can be substituted.

RHO rho

rho: density of seawater

ROP make openings relevant

ROP, name, ...;

name: name of opening

SCAN -> enter list scanner (IOF).

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 of diagram

This command applies to diagrams drawn without a prestored frame.

SIZE size

size: alt. as in command *GRPAGE.

SRV -> enter services subtask

STDH list/define standard heels

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.

STDH h1 h2, ... hn SYSDB

h1,...: the heels given in degrees and in ascending order.

SYSDB: (opt) store the result in the system data base

T calculation draughts (above base line)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1528 / 7399


NAPA for Design Manuals 2016.3

T values

values: draughts as series or single values

TAB -> enter table calculation

TK calculation draughts (below keel)

This command defines the calculation draughts. See also commands T and DISP.

TK values

values: draughts as series or single values

TOO table output options

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.

TRA calculation trims

As command TRI but trim values are given in degrees.

values: trims (along stability axis) as series or single values (deg)

TRI calculation trims

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

values: trims (along stability axis) as series or single values (m)

TYPE add arbitrary text line to the output list

Standard TYPE command, see !EXPL TYPE/GEN.

TYPE text

text: text to be added given literally (no apostrophes). The only processing done is variable
replacement.

WAVE Wave to be used in the calculations

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

Reference to an existing wave.

WAVE name H=height,TYPE=type,L=length,POS=pos,DIR=angle;

Define or redefine wave

name: name of the wave.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1529 / 7399


NAPA for Design Manuals 2016.3

height: wave height (>0) measured from hollow to crest.

type: type of wave SINUS (default) or TROCHOID.

SINUS: sinus shaped wave

TROCHOID: trochoid shaped wave

length: (OPT) length of the wave (default = reference length of the ship)

position: (OPT) position of wave hollow

HOGGING: wave hollow in AP (aft perpendicular)

SAGGING: wave hollow in AP+length/2

value: x-coordinate of wave hollow

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

Cancel the wave

WAVE CAT selection

Catalog of stored waves, for parameters see !expl CAT/GEN

YCG tranverse center of gravity

YCG y

y: y-coordinate of the center of gravity of the ship. Default 0.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1530 / 7399


NAPA for Design Manuals 2016.3

Task FRA - drawing and listing of frame areas (HYD)


The purpose of the task FRA is to draw or list frame areas, normally from the hull, but which can also be from other objects.

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.

2. Standard output functions


The standard commands ARGS, NL, NP, TYPE, and FIG are available. With command DIAG, the diagram drawing task can be entered. The
PLOT command must be given first.

3. Absolute and relative frame areas


By default, absolute frame areas in square meters are output. Optionally, non-dimensional frame areas can be output, meaning frame areas
represented as a fraction of the area at the mid section (XMID in the reference system).

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1531 / 7399


NAPA for Design Manuals 2016.3

5. Plot options for the PLOT command


The standard plot control commands are installed. The ones most likely to be useful are SMOOTH, for requesting smoothing of the curve through
the calculated points, NET for demanding a grid net and LINE for controlling the line type. Command SIZE specifies the size of effective drawing
area.

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.

6. Handling multiple draughts in NLIST and PLD


If several draughts have been given, a quantity mentioned in the LQ or PQ (other than the argument) is duplicated as many times as there are
draughts. In the output, these can be identified by using the header component SH (short header), which is assigned so that it indicates the
draught argument in one of the following forms:

t=5.1 (default)
5.1m with option M
5.1 with option B

In the listing, this can be used as in the following example:

LQ X(SH=' ') FRA


TOO HD=(('x', ' area'),SH,U,UL)

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).

The same example is plotted by PLD using the following options:

PQ FRA, X, FRA
POO FRA, BOX, NET, FONT=S, ID=SH,
ARG: AXIS,
F1: AXIS, RMARG=*(0,0.05)
PLD M

Copyright © 1992 - 2016 NAPA. All rights reserved. 1532 / 7399


NAPA for Design Manuals 2016.3

Output for the example above


The plot options are designed so that the quantity can be changed in the PQ. Note, however, that usage of F1, F2 for designating quantities will
not work for other the first one if there are multiple draughts. Note also that F1 concerns only the first one (for the last draught). Options to be
applied to all duplications should be defined for the quantity, for example

POO ... FRA: PEN=P2011

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:

Frame area curves

Copyright © 1992 - 2016 NAPA. All rights reserved. 1533 / 7399


NAPA for Design Manuals 2016.3

Frame area curves, nondimensional


The following example shows a very special way of using frame areas. The hull object is ARR*A, and three draughts, 1, 4 and 8 have been set.

Frame areas from arrangement


The frame area curves show clearly that there is a doubly defined volume in the range #24...#40 and above t=1. In addition, there are some minor
inaccuracies. If the arrangement is a combined one where some compartments occur in several decks, a non-combined one must be made (use
DIR; COMB OFF; in SM).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1534 / 7399


NAPA for Design Manuals 2016.3

8. Command specifications

ARANGE range for frame areas

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.

ARG handle arguments

This command handles functions related to the arguments. Without parameters the current
values are listed.

ARG GET name source

The given argument set is fetched and assigned

name: name of the argument set

/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.

source: (opt) SYSDB or NAPADB

ARG SAVE name text db

The current arguments are saved under the given name in the project data base or in the
specified location.

name: name assigned to the set

text: (opt) descriptive text (apostrophes compulsory)

db: (opt) SYSDB or NAPADB, default=project db.

ARG UNSAVE name db

Delete save set from the data base.

name: name of argument set

db: (opt) SYSDB or NAPADB, default=project db

ARG CAT

Catalog of saved argument sets.

ARG RESET

Reset arguments to the default values

CALC start calculation

(Not needed normally).

DIAGRAM -> enter diagram drawing

This command can be given after the PLOT command for the purpose of adding texts, scales,
net or similar components.

EDIT -> enter editor

END end of task

End of task and return to monitor.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1535 / 7399


NAPA for Design Manuals 2016.3

FIG add figure to list

Standard FIG command (see !EXPL FIG/GEN).

GENERATE generate space curve from frame area curve

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.

GENERATE name scale

name: name of curve, default=FRA-hull-t (t=draught).

scale: scale factor for the area, default 1 (for non-dimensional areas 100).

HULL hull object

Define object from which areas are calculated.

HULL, hull

hull: name of the surface. Default: 'hydrostatic hull' in the reference system.

LIMITS set x-limits

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)).

LIMITS xmin xmax

LIST start listing

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

LIST .macro options

Run given list macro. LIST .CAT gives catalog.

LQ select list quantities for NLIST

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).

MLD select between moulded and total frame areas

Copyright © 1992 - 2016 NAPA. All rights reserved. 1536 / 7399


NAPA for Design Manuals 2016.3

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

ON=use moulded areas, OFF=use total areas.

NET draw net

This command specifies a grid net to be drawn instead of axis. For more details, see !EXPL
NET/GR6. For PLOT command.

NL start new list

Standard NL command (see !EXPL NL/GEN).

NLIST listing controlled by LQ and TOO

This command starts a listing handled the standard way using LQ and TOO.

NLIST opt t-options

opt: options, presently

M: if multiple draughts, the header generated has the form 5.1m, default is T=5.1

B: represent the draught by the bare value, e.g. 5.1

t-options: (opt) standard table output options

NONDIM nondimensional representation

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

sel: (opt) quantity concerned, default=both.

A: draw frame areas nondimensional, i.e. as percent of the area at XMID

X: represent x-coordinates as fractions of the reference length (range 0...20).

BOTH: (default) X and A simultaneously

OFF: normal representation (area in M2, x in meters).

NP start new page

PLD plot diagram controlled by PQ and POO

This command plots a diagram handled the standard way using PQ and POO.

PLD opt POO,p-options

opt: options, presently

M: if multiple draughts, the header generated has the form 5.1m, default is T=5.1

B: represent the draught by the bare value, e.g. 5.1

X: obey the XARG argument, default=use location of calculation sections

POO,p-options: (opt) standard plot output options

PLOT plotting diagram

Copyright © 1992 - 2016 NAPA. All rights reserved. 1537 / 7399


NAPA for Design Manuals 2016.3

Starts plotting according to the current arguments. See also PLD.

PLOT options

options:

X: mark x-coordinates instead of frame numbers

NF: (no frame) omit the frame

NOT: (no text) omit text giving hull name date etc.

F: draw the function only

POO plot output options for PLD

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).

PQ select list quantities for PLD

This is the standard PQ command (see !EXPL PQ/GEN) for controlling the output of PLD. It is
in all respects analogous with LQ.

SIZE size of plot

Defines the size of the drawing area of the frame area curve when plotted by PLOT. (Same
alternatives as in !GRP).

SIZE, size

size:

A1,A2...: standard A-size.

usize,vsize: directly given size

S: size of screen

S,marg: size of screen with margin.

SMOOTH draw area curve smoothed

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

OFF: (opt) cancel smoothing

SRV -> enter services subtask

T draught arguments

Defines the draught(s) for which frame areas are calculated and output. Number of draught at
most 50.

T values

value: draught values individually or as series. Default=design draught.

TAB -> enter table calculation

TOO table output options for NLIST

Copyright © 1992 - 2016 NAPA. All rights reserved. 1538 / 7399


NAPA for Design Manuals 2016.3

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 calculation trim

Trim in meters (default 0.0).

TRIM trim

TYPE add text

Standard TYPE command (see !EXPL TYPE/GEN).

UAXIS control tick spacing of the horizontal axis

See !EXPL UAXIS/GR6. For the PLOT command.

VAXIS control tick spacing of the vertical axis

See !EXPL VAXIS/GR6. For the PLOT command.

XARG x-values where areas are calculated

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

value: x-values individually or as series

X -

This form restores the initial default = use location of calculation sections.

XSTEP select evenly spaced x-values

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1539 / 7399


NAPA for Design Manuals 2016.3

Task BJ - Bonjean curves (HYD)


In this task, curves showing frame areas and moments of area as a function of draught are drawn for a number of frames in a single drawing.
Alternatively, the information can be output in list form.

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

ARG handle arguments

This command handles functions related to the arguments. Without parameters the current
values are listed.

ARG GET name source

Copyright © 1992 - 2016 NAPA. All rights reserved. 1540 / 7399


NAPA for Design Manuals 2016.3

The given argument set is fetched and assigned

name: name of the argument set

/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.

source: (opt) SYSDB or NAPADB

ARG SAVE name text db

The current arguments are saved under the given name in the project data base or in the
specified location.

name: name assigned to the set

text: (opt) descriptive text (apostrophes compulsory)

db: (opt) SYSDB or NAPADB, default=project db.

ARG UNSAVE name db

Delete save set from the data base.

name: name of argument set

db: (opt) SYSDB or NAPADB, default=project db

ARG CAT

Catalog of saved argument sets.

ARG RESET

Reset arguments to the default values

EDI -> enter text editor

END end of task

The control is returned to monitor

HULL name of the object of calculation

HULL hull

hull: name of the hull the reference system.

LIST start listing

The result list is listed.

LIST options

options:

OLD: list with the old format (default is the LQ controlled list)

NH: no header

TOO: table output options

LIST OBJ

list data about the hull object

LIST REF

list data from the reference system.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1541 / 7399


NAPA for Design Manuals 2016.3

LQ set listing quantities

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.

MODE calculation mode (moulded/total)

The argument MODE selects between moulded or total frame areas. The value is either
TOTAL (default) or MOULDED.

MODE mode

NL initiate new list

The standard list opening command, see !EXPL NL/GEN.

PLOT start plotting

The BonJean curves are plotted according to the current arguments.

PLOT options

options: presently only

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).

SCALE scale of curves

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, alt, scale

alt: alternative for curves

AREA: area curves

MOM: moment curves

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)

SCL draw scale for showing moment and area scale

The scaling of the moments and areas are shown by a scale instead of a text.

SCL OFF

OFF: (opt) cancel SCL

SIZE size of output page

size: page size (A1...A6 or directly by du,dv), default A3.

SMOOTH place smooth curve

A smooth curve is placed through the calculated points, instead of a polygon. Cancelled with
option OFF.

SRV -> enter services subtask

Copyright © 1992 - 2016 NAPA. All rights reserved. 1542 / 7399


NAPA for Design Manuals 2016.3

T calculation draughts

Defines the draughts at which areas are calculated.

T, draughts

T: draughts (single values or series). Default 2*TDWL divided into ten.

TAB -> enter the table calculation task

TOO set table output options

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 coordinate of calculation sections

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1543 / 7399


NAPA for Design Manuals 2016.3

Ship Model (SM)

Ship Model (SM)


Ship Model concepts (SM)
Compartment arrangements (SM)
Structure arrangements (SM)
Outfit (SM)
Colouring and line type standards (SM)
Commands and service functions (SM)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1544 / 7399


NAPA for Design Manuals 2016.3

Ship Model concepts (SM)


This chapter presents the ship model concept and the purpose of the ship model subsystem. The word ship model is used both for the
subsystem and the data describing a specific ship. Bearing this in mind, hopefully, the reader will be able to separate the concepts.

See also NAPA User Meeting workshop papers about ship model.

Table of Contents:

1. Ship model concept


2. Creating the model
3. Scope of application
4. Contents of the ship model
5. Ship-specific information
6. Functions
7. Using the ship model
8. Connection to table calculation
9. Installation
10. Generating new tables
11. Calculations handled by SM

1. Ship model concept


A model in general is a physical, mathematical, graphical or other type of an abstraction that represents a real object or a system in such a way
that the selected properties of the real object or system are reflected. The model is a way of storing information about the real object, and by
studying the model, one can make conclusions concerning it.

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.

2. Creating the model


In order to be useful, the ship model subsystem, in cooperation with the geometry subsystem must be capable of not only storing the ship model
but also of generating it. The ambition is that the system should not only be capable of recording an existing design, but it should also help in
generating and modifying it. As a summary, the two main purposes of the ship model are:

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1545 / 7399


NAPA for Design Manuals 2016.3

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.

4. Contents of the ship model


The bulk of the ship model is formed by a description of the general arrangement, including the geometry of the parts involved and selected other
properties.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1546 / 7399


NAPA for Design Manuals 2016.3

in the drawing task (DR).

7. Using the ship model


The ship model and the geometry behind it together form flexible tools which can be applied and used in many ways. While it is a necessary
condition for the system to respond to varying needs and ways of operating, it also means that the user organization has a responsibility for the
effective use of the system.

Here, two critical areas will be pointed out.

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.

8. Connection to table calculation


The central definitions of SM are stored in the format used by the table calculation module. Partly for historical reasons and partly because of SM
specific services, there is the subtask SM for handling definitions related to arrangements. All other main definition tasks appear as subtasks of
SM, where SM starts the table calculation task with the parameters corresponding to the current subject.

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:

prefix command subject

ARR* (DIR) compartment

PAR* PDEF compartment

STR* STR structure

STT* STT structure

EQP* EQP pieces

EQT* EQT equipment

COLOUR* FCD fill

PEN* PCD pen

'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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1547 / 7399


NAPA for Design Manuals 2016.3

9. Installation
The SM subtask itself is installed in parallel with geometry definition and drawing. The following scheme illustrates the set of subtasks involved:

Installation of the SM related subtasks


All subtasks below SM are similar, formed by table calculation work areas with predefined subject (prefix).

10. Generating new tables


When a new table is created, there is the possibility to refer to a model, from which the table structure is copied. If the prefix is not TAB* (=bare
table calculation without reference to a specific subject), the system automatically applies a model if available. The default model must be named
prefix*MODEL. The project database is checked first, then the system database and last the NAPA database.

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.

11. Calculations handled by SM


For the objects concerned by the definitions of SM, a number of calculated quantities can be obtained as a service of SM. These quantities can be
added to any table containing the required arguments by writing SM instead of a formula in a column definition.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1548 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1549 / 7399


NAPA for Design Manuals 2016.3

Compartment arrangements (SM)


This chapter presents the functions related to compartment arrangements. For the standard naval architectural calculations, (LD, DA, CP, etc) this
is the central subject and necessary for most of these tasks.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1550 / 7399


NAPA for Design Manuals 2016.3

7.3. Handling new quantities in own tables


8. Summary of table calculation commands

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.

An arrangement is formed by a set of compartments, to which various properties may be assigned.

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.

1.2. Current arrangement

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.

1.3. Combined arrangements

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.

1.4. Storage of arrangements

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.

1.5. Arrangements as geometric objects

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1551 / 7399


NAPA for Design Manuals 2016.3

1.6. Bottom surface

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.

2.1. Categories of parameters

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).

2.2. Overview of standard quantities

The following parameters can only be defined directly for each compartment:

NAME name

PURP purpose

DES descriptive name

CCODE alternative name or 'compartment code'

INCL inclusion control

The following parameters are normally obtained indirectly from the definition of the purpose, but they can also be defined directly:

PDES description of purpose

CLASS class

TYPE type

RHO density of contents

RED steel reduction

CAP capacity (or maximum filling degree)

PERM permeability

IPERM variable permeability

2.3. Room-specific parameters

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1552 / 7399


NAPA for Design Manuals 2016.3

2.3.1. Name (NAME)

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.

2.3.2. Purpose (PURP)

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.

2.3.3. Description (DES)

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).

2.3.4. Alternative name (CCODE)

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.

2.3.5. Inclusion control (INCL)

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.

2.4. Parameters associated with the purpose

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.

2.4.1. Description of the purpose (PDES)

This is a text that can be used in output for describing a purpose, for example, 'Engine room' for purpose=ER.

2.4.2. Type (TYPE)

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.

2.4.3. Classification (CLASS)

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).

2.4.4. Density (RHO)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1553 / 7399


NAPA for Design Manuals 2016.3

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.

2.4.5. Steel reduction

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.

2.4.6. Capacity (CAP)

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.

2.4.7. Permeability (PERM)

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.

2.4.8. Variable permeability (IPERM)

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:

Light service draught (DL): 5.8 m


Partial subdivision draught (DP): 6.6 m
Deepest subdivision draught (DS): 7.2 m

The IPERM definition:

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.

2.5. Properties of substances

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 following properties are associated with substances:

type (homogenous, liquid, bulk, grain, piece)


unit weight (density)

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1554 / 7399


NAPA for Design Manuals 2016.3

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:

A – Rooms related to accommodation


E – Rooms related to technical spaces, typically rooms that have low permeability
G - Rooms related to carrying deadweight, typically other than cargo
V – Rooms related to empty tanks, voids
X – Rooms related to crew accommodation (compare to type A)

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.

2.6. Difference between purpose and contents

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.

2.7. Calculated parameters

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1555 / 7399


NAPA for Design Manuals 2016.3

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.

XMAX,XMIN,YMAX,YMIN,ZMAX,ZMIN extreme coordinates in the main directions

FRMIN,FRMAX the same as xmin,xmax expressed as frame numbers

VOLM volume moulded

CGX,CGY,CGZ the center of gravity of volume

WAREA total wall area (from calculation sections)

TMY the moment of inertia of waterline at 50% filling

VNET net volume (volume with steel reduction)

WLMX load capacity (VNET*RHO*CAP)

AA mean area (volume divided by zmax-zmin)

BA bottom area (*)

CGXB,CGYB,CGZB the center of gravity of bottom area (*)

LWALL the length of wall (the length of bottom area section)

HD deck height (*)

SWAREA side wall area (LWALL*DH)

PERM permeability (based on TYPE) (*)

DES the description of compartment (from ROOM command) (*)

SDE the list of sounding devices (*)

For quantities marked with (*), see the following paragraphs.

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.

2.8. Calculating the permeability

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.

first char. in type permeability


--------------------------------------------
L,H 0.98 if country=SU, otherwise 0.95
C,B,S,V 0.60
E 0.85
others 0.95

The normal solution is to store these values as a property of PURP.

2.9. Compartment description

Copyright © 1992 - 2016 NAPA. All rights reserved. 1556 / 7399


NAPA for Design Manuals 2016.3

The verbal description of the compartments (quantity DES) can be given in the definition of the objects, for example

ROOM R1234 'auxiliary engine room'

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.

With the command

CALC DES SM

(directly under table calculation) descriptions are fetched without creating a permanent dependence.

2.10. Deck height

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.

2.11. Bottom areas and related quantities

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:

SET... DECK1/B ...

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1557 / 7399


NAPA for Design Manuals 2016.3

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).

2.12. Sounding devices

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'

(select compartments that have a manual sounding device).

2.13. Handling undefined values

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*

3.1. Work arrangement

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.

3.2. Main definition functions

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:

ADD PURP=purp comp1 comp2 ...

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1558 / 7399


NAPA for Design Manuals 2016.3

DEF R10 BW 'BW tank 21'


DEF R10 PURP=BW DES='BW tank 21'

Parameters not assigned in the command keep their values.

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.

DEF R123 RED=3.5

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

3.4. Differing commands between SM and TAB

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 LIST command under SM is specific for the task.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1559 / 7399


NAPA for Design Manuals 2016.3

3.5. Height for deck sections (command H)

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 following examples show the syntaxes available:

H 1.2 fixed height

H 2.2 20.5 1.6 89.4 2.3 height varies with x

H TTOP given surface

H TTOP-0.02 surface with translation

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.

3.6. Other definitions

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).

3.7. Registering arrangements

A list of available arrangements is maintained with the command REG.

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:

REG name PERM

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.

3.8. Getting a fast start

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()

Directly under table calculation, the command ASG can be used:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1560 / 7399


NAPA for Design Manuals 2016.3

ASG 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,

!SELECT TYPE=R NAME>R

assuming the names of the relevant rooms begin with R.

4. Getting information
The following sections present output functions assisting the creation and management of arrangements, while the main output functions are
presented later.

4.1. Listing in the input format

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.

The PRINT (P) command obeys the subset selected by SUBSET.

4.2. Drawing functions

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.

4.3. Overview of stored arrangements

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1561 / 7399


NAPA for Design Manuals 2016.3

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

4.4. Checking an arrangement

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1562 / 7399


NAPA for Design Manuals 2016.3

Example of output with ID PTR


In the example above, places that need to be checked are marked with asterisks. The tolerance by which the added line is drawn can be
adjusted. A smaller tolerance gives more accurate results, but requires a larger scale and/or better resolution. The following figure illustrates the
difference:

Effect of varying the tolerance in ID PTR


The drawing functions are presented in more detail in the Geometry Manual.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1563 / 7399


NAPA for Design Manuals 2016.3

Example of PLOT .ARRCHECK


For one more way of doing the check is to plot frame area curves, see hydrostatics.

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.

5.1. Listings related to arrangements

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.

5.2. Selecting and sorting

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1564 / 7399


NAPA for Design Manuals 2016.3

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 CLASS>B Selects bunkers (B) in liquid form (L)


TYPE=L

SUBSET DES='' Selects rooms with undefined description.

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).

5.3. Available quantities

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, PURP, VOLM, RED, VNET, RHO, CAP, WLMX

As listed by LQ EXPL, the selection is formed 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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1565 / 7399


NAPA for Design Manuals 2016.3

NAME PURP VOLM VNET RED


RHO CAP WLMX
m3 % m3ton/m3 ton
-----------------------------------------------------------
RT023 WB 90.0 2.0 88.2 1.025 1.00 90.4
RT051 HFO 33.8 2.0 33.2 0.940 0.95 29.6
RT031 VOID 248.8 0.0 248.8 1.025 0.95 242.3
RT044 GWT 18.1 2.0 17.7 1.000 0.95 16.8
RT045 WB 114.6 2.0 112.3 1.025 1.00 115.1
RT041 HFO 88.0 2.0 86.3 0.940 0.95 77.1
RT042 HFO 88.0 2.0 86.3 0.940 0.95 77.1
RT022 DO 36.5 2.0 35.8 0.860 0.95 29.3
RT001 FW 30.7 2.0 30.1 1.000 0.95 28.6
RT021 DO 36.5 2.0 35.8 0.860 0.95 29.3
RT053 WB 127.9 2.0 125.4 1.025 1.00 128.5
RT052 HFO 33.8 2.0 33.2 0.940 0.95 29.6
RT061 WB 58.9 2.0 57.7 1.025 1.00 59.1
RT002 FW 30.7 2.0 30.1 1.000 0.95 28.6
ELEV.1 LIF 84.0 0.0 84.0 1.000 1.00 84.0
ELEV.2 LIF 84.0 0.0 84.0 1.000 1.00 84.0
STAIR.2 STA 70.6 0.0 70.6 1.000 1.00 70.6
STAIR.3 STA 10.1 0.0 10.1 1.000 1.00 10.1
STAIR.7 STA 10.1 0.0 10.1 1.000 1.00 10.1
R1001 CA 3282.3 0.0 3282.3 1.000 1.00 3282.3
R1081 DST 33.4 0.0 33.4 1.000 1.00 33.4
R6001 MAC 51.9 0.0 51.9 1.000 1.00 51.9
R6031 MAC 69.9 0.0 69.9 1.000 1.00 69.9
FUNNEL MAP 194.8 0.0 194.8 1.000 1.00 194.8
-----------------------------------------------------------
TOTAL 22268.0 22244.4
SM?>

The other example demonstrates using table output options for grouping and adding subtotals. The list selection is given by

LQ NAME, PURP, VOLM, VNET, CGX, CGY, CGZ,


MOM(IY*RHO)/'TMY*RHO', (TMY), (RHO), (PDES)

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

TOO, HD=(UL, S, U, UL),


GROUP=PURP, SUBT, TOTALS, FIELD=*1,
LBG=(' ', 'CAPACITY OF %PDES (RHO=%RHO)', ' ')

The following output example is made with SELECT TYPE=L, i.e. tanks only.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1566 / 7399


NAPA for Design Manuals 2016.3

------------------------------------------------------------
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:

LQ PDES('Purpose'), VOLM('Volume'), WLMX('Load'), BA('Area')


TOO HD=(UL, S, U, UL), GROUP=PURP, SUBT=ONLY, TOTALS, SBTX=%PDES

Copyright © 1992 - 2016 NAPA. All rights reserved. 1567 / 7399


NAPA for Design Manuals 2016.3

----------------------------------------
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

5.5. Arrangement drawings

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1568 / 7399


NAPA for Design Manuals 2016.3

translation can be added to the surface using the - or + suffix, for example, TANKTOP+, TANKTOP-, or explicitly TANKTOP+0.05.

The following example illustrates an arrangement plan:

Example of arrangement plan


Non-geometric properties can be expressed by texts or colouring. Colouring can be done by giving a colouring criterion in the FILL command
(e.g. FILL PURP), referring to a colouring standard. Any quantity can used as the basis for colouring, provided that a corresponding colouring
table has been made.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1569 / 7399


NAPA for Design Manuals 2016.3

Example of filling based on the selection criterion


Information in text form is added by the ID command. SM-oriented identifications are expressed by a list in brackets, where any quantity available
in the current arrangement can be used. The most natural alternatives are NAME or CCODE, but one can also mark parameters such as PURP,
VOLM or BA. Several quantities can be selected, for example, ID (NAME,PURP), but the problem of finding space for these in the drawing
increases.

When drawing sections of structures, the line types can be used similarly expressing various properties.

5.6. Functions concerning neighbouring compartments

The functions presented here are available in the form of service functions:

SM.NEIGHBOURS find neighbours to a given compartment

SM.NBPAIRS: find pairs of neighbouring compartments that satisfy a given condition

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)

col 3; drw l2(*)


col 2; drw l1(*)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1570 / 7399


NAPA for Design Manuals 2016.3

Graphic presentation of the result from SM.NBPAIRS

5.7. Calculator functions

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')

For more information, see the Table Calculation Manual.

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.

6. General definitions related to arrangements

Copyright © 1992 - 2016 NAPA. All rights reserved. 1571 / 7399


NAPA for Design Manuals 2016.3

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.

6.1. Storing of parameter definitions

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.

If the PAR*PRO table is missing, it is replaced by 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.

6.2. Purpose definition subtask

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.

If the PAR*PRO table already exists, it is updated.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1572 / 7399


NAPA for Design Manuals 2016.3

description class type density red


DEF BW 'ballast water' X L 1.025
DEF HFO 'heavy fuel oil' B L 0.790 0.020
DEF DO 'diesel oil' B L 0.720
DEF FW 'fresh water' B L 1.000 0.020
DEF ER 'engine room' M M
DEF COAL 'coal' C B 0.655 0.040
DEF ACC 'accommodation' A A
DEF MISC

6.3. Automatic additions to PAR*PRO

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.

6.4. Use of non-standard purpose definitions

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.

7. Tailoring the arrangement tables


The contents and behaviour of the arrangement tables can be modified to suit the need of the user organization. For example, additional
attributes can be added to compartments. The next section presents the necessary conditions that the tables must satisfy.

7.1. Necessary properties of an arrangement table

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.

7.2. Standard table definition

Copyright © 1992 - 2016 NAPA. All rights reserved. 1573 / 7399


NAPA for Design Manuals 2016.3

The following definition is the standard model delivered with the system:

COLUMN NAME KEY


COLUMN PURP
COLUMN DES SM
COLUMN CCODE
COLUMN TYPE *
COLUMN CLASS *
COLUMN RHO *
COLUMN RED *
COLUMN CAP *
COLUMN HS *
COLUMN PERM *
APPLY PAR*PRO
ALT PAR*PRO/PAR*STD

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:

COLUMN NAME KEY


COLUMN PURP
APPLY PAR*STD

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.)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1574 / 7399


NAPA for Design Manuals 2016.3

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.

7.3. Handling new quantities in own tables

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:

COLUMN PURP KEY

COLUMN STADD (steel addition factor)

COLUMN WHA (work hours/m2)

A table with the following definition collects a subset of compartments from the current arrangement and fetches the properties defined by the
table above:

COLUMN NAME KEY


COLUMN PURP <ARR*CURRENT
COLUMN AREA 'AREA(NAME)*STADD'
COLUMN WH 'WHA*AREA'
APPLY PAINTDATA
ALOAD ARR*CURRENT TYPE=L

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).

8. Summary of table calculation commands


For ordinary use, only part of the commands of table calculation are needed and a summary of them is given here.

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.

The command DELETE deletes lines.

Return to the main task is done with the command END or OK. Changes made but not stored will remain during the run.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1575 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1576 / 7399


NAPA for Design Manuals 2016.3

Structure arrangements (SM)


This chapter describes the administration related to the description of the ship in terms of steel structures: hull, decks, deckhouse walls, bulkhead.
In the following, these will be referred to as structures. Analogically, with the terminology used for compartments, a set of structures is called a st
ructure arrangement.

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

The following applications in NAPA rely on structure arrangements:

weight calculation
generating FEM models
NAPA Steel

2. Role of the SM subsystem


The role of the ship model in the restricted sense of the SM subsystem is the same as for compartments: to define the sets of structures present
in the ship and their properties and to make this information available in various functions.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1577 / 7399


NAPA for Design Manuals 2016.3

as part of the ship: hull, wall of deckhouse, decks, bulkheads


on the basis of construction, representing different unit weights, material, etc
function: watertight bulkhead, fire bulkhead, etc.

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

CGXA,CGYA,CGZA the center of gravity

XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX extension in the coordinate directions

ORNT orientation (X, Y or Z)

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:

STYPE structure type, see above

DES the description of a structure

PLTH plate thickness

MAT material

W2 weight/m2

W weight

XCG,YCG,ZCG the center of gravity of the weight

5. Handling of structure definitions


Analogically with compartments, the structures are collected into sets, stored as tables. There is no special task for structures in the SM
subsystem: the definitions are done directly under the table calculation module.

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

COLUMN NAME KEY


COLUMN STYPE
APPLY STT*PRO :
ALT STT*PRO/STT*STD :

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.

6. Definition of structure types


The definition of structure types are stored in tables with prefix STT*, having the quantity STYPE as the key column. The same name rules as for
arrangements are defined: the standard definitions are stored in the system database under the name STT*STD and project-specific data in
STT*PRO.

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1578 / 7399


NAPA for Design Manuals 2016.3

COL, STYPE KEY


COL, DES
COL, W2
COL, LFCODE
COL, LPCODE

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'.

Several such tables can be combined to form a combined arrangement.

With the command

!SM STR name

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.

8. Usage as geometric objects


Analogously with compartments, a table containing a list of structures can be used a combined geometric object. The main type assigned to the
combined object is SO (=surface object).

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.

Sets of structures can be combined in the same way as arrangements.

10. Usage of structures in drawing functions


Using a set of structures as a geometric object, it can be used in all drawing functions implemented for this type of objects, including the DRW
command.

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.

This line type standard is selected with the PEN command:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1579 / 7399


NAPA for Design Manuals 2016.3

PEN *table/alt

analogically with the FILL command.

For the special case STYPE, the asterisk can be omitted.

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.

11. Dynamic limitation function


The function presented here addresses the problem that the division into objects may have to be different in different contexts. For example, a
bulkhead formed by parts in different planes may be needed as a whole in one case and divided into parts in another. The so-called dynamic
division means that the parts are created by the same line in the structure table where the other properties are defined. This reduces the
redundancy that would be caused by defining separate objects.

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:

SOURCE the name of the parent object

LIMITS syntax defining geometric limitation

SELECT syntax defining the selection of parts

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):

NAME SOURCE LIMITS SELECT


DEF BH1.1 BH1 '' 'X Y<0'
DEF BH1.2 BH1 '' 'X Y>0'
DEF BH1.3 BH1 '' 'X Y<5 Y>-5'
DEF BH1.4 BH1 '' 'Y Y<0'
DEF BH1.5 BH1 '' 'Y Y>0'
DEF BH2.1 BH2 'Z<3' ''
DEF BH2.2 BH2 'Z>3' ''

Copyright © 1992 - 2016 NAPA. All rights reserved. 1580 / 7399


NAPA for Design Manuals 2016.3

Result of plotting the example

Note: the table must not have a check criterion requiring that the object given by NAME exists in the database.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1581 / 7399


NAPA for Design Manuals 2016.3

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,

Copyright © 1992 - 2016 NAPA. All rights reserved. 1582 / 7399


NAPA for Design Manuals 2016.3

simplified representations are used that serve identification of the object in a plot and checking the space required.

1.2. Objects handled

Within the outfit context, two types of objects can be handled:

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

2.1. Main components of the definition

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.

These components are treated in more detail below.

2.2. Dimensions and locations related to equipment

Copyright © 1992 - 2016 NAPA. All rights reserved. 1583 / 7399


NAPA for Design Manuals 2016.3

All pieces of equipment have the following dimensions and measures:

Equipment types:

LENX length in x, similarly LENY, LENZ

LCGX the location of the center of gravity with respect to the lower x limit, similarly LCGY, LCGZ

Instances:

XMIN lower x-limit, similarly XMAX, YMIN, YMAX, ZMIN, ZMAX

XCG x-coordinate of the center of gravity similarly YCG, ZCG

X x-coordinate of the origin, similarly Y, Z.

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)

2.3. Various quantities

The following quantities are also relevant in this context:

DES descriptive text given to an individual piece

FIG name of figure for representing the object (see below)

MODE control for usage of figures

LFCODE logical fill code, alternatively FCODE

2.4. Declaring equipment properties in the table

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

ID the name of the piece, key column

ETYPE equipment type, key for type-specific properties

LOCTN location instruction

FORM geometric shape (optional)

ORNT rotation, the reflection of the shape (optional)

Other columns may be defined as needed.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1584 / 7399


NAPA for Design Manuals 2016.3

COLUMN XMIN SME

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.

2.5. Reference points

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1585 / 7399


NAPA for Design Manuals 2016.3

Example of object with reference points


In GENERATE name COMB ..., there is no possibility to define reference points, but those of the operands are transferred to the result.

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. Defining the position of a piece of equipment

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:

1. As replacement for individual coordinates

2. By reference to the object as a whole

For providing coordinates (case 1), the following types of objects are possible:

point object, the relevant coordinate is taken


curve, the relevant coordinate of the start point is taken (assumed to be used mainly with principal plane curves).
reference coordinate of surface
surface, from its local geometry. The surface must be single valued with respect to the axis concerned.
a reference point in another piece of equipment

The positions can be modified by a displacement in the direction of the axis concerned.

References to whole objects (case 2) can be to

point object, gives the location directly


curve: point selected according to the reference point specified
closed surfaces, rooms: using reference points analogically with pieces of equipment (not the local geometry)
other pieces of equipment: using the reference points. The referenced pieces must be available in the same table or in one given by
command REF.

The reference points of surfaces and rooms are defined analogically with those of equipment.

A room can be referenced indirectly by specifying the purpose or other property.

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.

3.2. Defining the location with separate coordinates (case 1)

Syntax:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1586 / 7399


NAPA for Design Manuals 2016.3

ref: (x,y,z)

ref (optional) reference point, syntax and default as presented above, default=MMM

x instruction for the x-coordinate, see the list of alternatives below

y similarly for y

z similarly for z

The instruction for a coordinate can be one the following:

value explicit value

#nr+d frame number with optional displacement (d), similarly web, longitudinal or vertical

#name+d the reference coordinate of surface with optional displacement

name+d the name of the surface or point with optional displacement

refp:id the piece of equipment with reference point

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:

(#10, 0 5.3) direct specification, midpoint

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:

L lower end in the direction concerned

U upper end in the direction concerned

A aft, equivalent with L for the x-coordinate

F fore, equivalent with U for the x-coordinate

P port, equivalent with L for the y-coordinate

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

(A/#BH1 0 5) is equivalent with


LMM: (#BH1 0 5)

(L=meaning of A, MM=default for the other directions).

The following example shows the use of reference points and how the result is controlled by the local geometry:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1587 / 7399


NAPA for Design Manuals 2016.3

ID ETYPE LOCTN
P1 PIECE 'LML: (BH1 0 TTOP-SO)'
P2 PIECE 'LUL: (BH1 LBH TTOP-SO)'
P3 PIECE 'LUL: (25 LBH TTOP-SO)'

Objects placed according to surfaces in the ship

3.3. Defining the location by reference to an object (case 2)

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

ref reference point in the defined object (optional)

refr reference point in the referenced object (optional)

object reference to object, see the alternatives below

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.

The object can be specified in one of the following ways:

name the name of a room, curve or point

* as 'name' but the name is given separately in the NAME column

E-id equipment with the given id

(purp) room with the given purpose

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1588 / 7399


NAPA for Design Manuals 2016.3

REF EQP*MACHINERY EQP*PIPING

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

UML:UML R1234 as above, but aligning upper x limits

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

The following example shows examples of placement in a room:

ID ETYPE LOCTN ORNT FORM


P1 PIECE3 'R601'
P2 PIECE3 'R601 A'
P3 PIECE3 'LMU:LMU R601'
P4 PIECE2 'R601 T'
P5 DEMO 'ULU:UUL R601' 'RZ TZ=90'
'PAR-BOXES(5,2,3,2)'

Example of pieces in a room


The following figure shows the position of pieces with respect to each other, defined by

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' ''

Copyright © 1992 - 2016 NAPA. All rights reserved. 1589 / 7399


NAPA for Design Manuals 2016.3

Example of referencing other pieces of equipment


Partially for compatibility with older releases, the following shorter way of expressing some standard cases are available for rooms:

A or AA align aft ends, equivalent with LML:LML

F or FA align fore ends, equivalent with UML:UML

P or PA align port sides, equivalent with MLL:MLL

S or SA align starboard sides, equivalent with MUL:MUL

B or BA align bottoms, equivalent with MML:MML (=the default)

T or TA align tops, equivalent with MMU:MMU

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.

3.4. Additional options

Modifications to the definition following from the main part can be added by the following options:

X=x, Y=y, Z=z, DX=dx DY=dy DZ=dz RY

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.

For example, the definition

:INLET E-COMPR1 DZ=0.5

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.

3.5. Location in a compartment with a given purpose

Copyright © 1992 - 2016 NAPA. All rights reserved. 1590 / 7399


NAPA for Design Manuals 2016.3

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

The following example is based on these definitions

DEF E1 ENGINE '(A/#EB1+0.8 3)'


DEF E2 ENGINE '(A/#EB1+0.8 -3)'
DEF ST STAIRS '(F/#EB2 0 #ELB+1)'
DEF P1 PUMP '(F/#EB2 0 -7)'
DEF A1 APPLIANCE 'ER2'

Example of locating equipment


For the type definitions, see below.

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 *

Copyright © 1992 - 2016 NAPA. All rights reserved. 1591 / 7399


NAPA for Design Manuals 2016.3

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.

4.1. Source and type of the geometry

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.

The shapes can be available as

objects stored the normal way in the NAPA database


objects created by macros
objects available in a foreign format as an ASCII file, for example, DXF.

In the last case, the objects are dynamically converted to the NAPA representation, in a similar way as implemented for DXF drawings.

4.2. Creating parametrized shapes

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1592 / 7399


NAPA for Design Manuals 2016.3

@@ parametric object formed by two boxes


@parameters(l1=n,d1=n,l2=n,d2=n)
@@ l1: length of the lower box
@@ d1: remaining dimensions of the lower box
@@ l2: length of the upper box
@@ d2: remaining dimensions of the upper box
@@ must be d2<=d1 d2<)l1
@if or(d2>l1,d2>d1) then
@ap.type('bad parameters in PAR-BOXES')
@end
@endif
cyl eqp-1
axis (0 0 0) (@l1 0 0)
for sq=@d1
@@ ref. points START,END automatically def. for this object
@ll2=l1/2
cyl eqp-2
axis (@ll2 0 @d1/2) (@ll2 0 @d1/2+l2)
for sq=@d2
rp joint (@ll2 0 @d1/2)
rp top (@ll2 0 @d1/2+l2)
gen result comb eqp-1 eqp-2

Example of object created by the macro above


Note the conventions used for explaining the parameters: when obeying these, the command PMO HELP (as well as the service function
AI.PARAMETERS) can produce a presentation of the parameters. The macro should also contain notes with suitable explanations.

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.

4.3. Adding the geometric shapes

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.

A macro is represented by the syntax

name(par1,par2,...)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1593 / 7399


NAPA for Design Manuals 2016.3

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.

ID ETYPE FORM LOCTN ORNT


P1 DEMO 'PAR-BOXES(3,2,3,1)' 'O: (0 0 0)' ''
P2 DEMO 'PAR-BOXES(4 1 2 0.5)' 'TOP:TOP E-P1' 'RZ'
P3 DEMO 'PAR-BOXES(1 3 4 0.2)' 'TOP:END E-P1' ' 'TY=-90'

Set of equipment based on a parametric object

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.

5. Modifying the orientation


The geometry defined for a piece of equipment represents its default orientation, i.e. the x-, y- and z-axes keep their meaning when the object is
placed in the ship. If the piece has no object defined, LENX, LENY and LENZ represent the dimensions in the default orientation.

For an object defined in FORM, the quantity ORNT changes the orientation by a rotation or reflection around the reference point.

The specification is formed by one or more of the following syntaxes:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1594 / 7399


NAPA for Design Manuals 2016.3

RX: reflect around X=xr, xr=x-coord. of the reference point


similarly RY, RZ.
TX=a: turn the angle a around the x-axis,
similarly TY, TZ.

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

6.1. Route concept

A route is a special kind of equipment, characterized by the following features:

it connects two pieces of equipment


its geometry is formed by a cylinder with a given cross section

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.

6.2. Properties of a route

The defining properties of a route are

identification, ID identifier for the route

start node, NODE1 the name of a piece of equipment

start reference point, REFP1 reference point at NODE1

end node, NODE2 the name of a piece of equipment

end reference point, REFP2 reference point at NODE2

cross section, FORM syntax defining the cross section

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).

The following quantities can be declared with the SME formula:

L length between the end points

AREA cross section area

VOL volume, L*AREA

LENX the width of the cross section

LENY the height of the cross section

6.3. Defining routes

Routes are defined by tables having ROUTE* as prefix. Each line defines one route.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1595 / 7399


NAPA for Design Manuals 2016.3

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

R=r circle with radius r

SQ=d square with side d

RECT=(lu,lv) rectangle with sides lu, lv

The form may be undefined, in which case routes can only be plotted as lines (option L).

6.4. Examples of routes

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.

The nodes are defined by the following table:

ID ETYPE LOCTN
DEF E1 BOX '(0 0 0)'
DEF E2 POS '(0 0 4)'
DEF E3 BOX '(0 5 4)'

The routes are defined by the following table:

ID NODE1 REFP1 NODE2 REFP2 FORM


DEF R1 E1 'N' E2 '' 'SQ=0.5'
DEF R2 E2 '' E3 'N' 'SQ=0.5'

The objects of the first example

Copyright © 1992 - 2016 NAPA. All rights reserved. 1596 / 7399


NAPA for Design Manuals 2016.3

In the second example, the nodes are represented by objects with the geometry defined, including reference points.

The nodes in the example are defined by the following table:

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.

The routes are defined by

ID NODE1 REFP1 NODE2 REFP2 FORM


DEF R1 PUMP 'U2' BEND 'START,END' 'R=0.15'
DEF R2 BEND 'START,END' VALVE 'N' 'R=0.15'

The objects of the second example

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:

SBJ EQP treat equipment


SBJ ROUTES treat routes

A shortcut is available as commands -E and -R.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1597 / 7399


NAPA for Design Manuals 2016.3

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

Plotting 3D geometry is straightforward with the PLOT command.

In the SME task, the PLOT command without parameters plots the current item.

The options include

simplified representations, ignoring the geometry (E, B)


colour using the colour coding defined in the table (P)
mark reference points (ID NAME shows the names) (R, RR)
clip objects with the limits defined by the LIMITS command of DR (C)
simplified representation of routes with a circular cross section (Z)
'super 3D mode': save run time memory by storing only a reference to the object (EQP only) (S)

Standard options can be set in advance with the command PO.

In the SIZE command, * refers to the size of the current table while ** to that of the current component.

8.2. Plotting sections

Sections with coordinate planes can be plotted by adding axis=q to the PLOT command, for example,

PLOT ALL Z=1

8.3. Drawing in arrangement plans

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 X, sections are plotted.

With the option F, equipment is plotted as figures. For the conditions for this, see below.

8.4. Representing equipment by figures

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1598 / 7399


NAPA for Design Manuals 2016.3

X the figure is useful for the x-projection only. Similarly Y, Z.

P there are figures available for all projections, obtained by adding suffix .X, .Y or .Z to the name recorded by FIG.

The use of figures is controlled by the option F in DRW.

9. Standard table definitions

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

COLUMN LENX SME

9.2. Equipment types

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.

The standard table definition contains the following columns:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1599 / 7399


NAPA for Design Manuals 2016.3

COLUMN ETYPE KEY


COLUMN EDES TEXT
COLUMN FORM TEXT
COLUMN W
COLUMN LENX
COLUMN LENY
COLUMN LENZ
COLUMN LXCG
COLUMN LYCG
COLUMN LZCG
COLUMN FIG
COLUMN MODE

EDES is a text used for describing the type.

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

The standard route table definition is

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1600 / 7399


NAPA for Design Manuals 2016.3

10. Support functions for the graphical user interface


The following functions support the graphical user interface be converting syntaxes to and from a form where the parts of the definitions can be
accessed individually. The function SM.EQPDEF converts a syntax to the opened form while SM.EQPASG does the reverse task. The functions
support the quantities LOCTN, FORM and ORNT. The format of the opened syntaxes is presented in the text EQPEXPAND in the NAPADB.

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')

The parameters can then be assigned as desired.

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.

11. Commands of the SME task

ADD add new items

This command adds new pieces of equipment to the current set.

ADD P id, id, ...

id,id,...: value of quantity ID for the new items. For more information, see !EXPL ADD/TPA.

CATALOG catalog of defined equipment sets (TP)

This command produces a list of equipment sets in the current project and version, containing
the name and description.

COL assign line colour

This is the same command as COLOUR in the drawing task, for changing the line colour.
Similarly THI, DAS, TCOL, FONT, PEN.

COMBINE define combined equipment set (TP)

This command defines or lists a combined equipment set.

COMBINE name part1 part2 ...

name: name of result. With no other parameters, the definition of the given (combined) equipment set
is displayed.

part1...: name of partial equipment sets

DEF add/modify equipment (TP)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1601 / 7399


NAPA for Design Manuals 2016.3

DEF id ETYPE=type LOCTN='location'

id: identifier, key value

type: equipment type

loctn: syntax defining the location, see !expl ILOC for explantion.

DELETE delete items (TP)

This command deletes pieces of equipment from the current set.

DELETE id, id, ...

Deletes the pieces with the given id.

DELETE ALL

The equipment set is emptied.

DELETE SELECTED

The items selected by the SELECT command are deleted.

DES list in input format (TP)

This is the same function as DES under table calculation, see !EXPL DES/TPA.

DIR -> enter table calculation directly

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.

DR -> enter drawing task

DRW drawing to the setup

This commands plots equipment from the current table into the current SETUP.

DRW [p1,p2] sel ID=qnt options

p1,p2: (opt) part range in the setup, default=all.

sel: selection of objects

ALL: all objects in the current table, possibly restricted by SUBSET

id: item with the given id

*: the current item, default if no other parameter follow

SELECT=crit: given subset

ID=qnt: (opt) quantity to be marked as text. Default=obey ID NAME.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1602 / 7399


NAPA for Design Manuals 2016.3

EXAMPLES
DRW ALL

Draw all pieces with default options.

DRW ALL BP

Draw all pieces marking the position only with a box coloured according to the associated fill
codes.

DRW ALL -

Same as DRW ALL; under DR, i.e. draw the arrangement.

EDIT -> enter editor

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.

see command DES

END -> exit from the task

The geometry definition task DEF will be entered. The equipment set in the work area remains
and is available when SM is re-entered.

EQT -> enter definition of equipment types

This command enters table calculation for defining properties associated with equipment types.

FCD -> enter definition of fill codes

This command enters table calculation for defining tables giving fill codes for colouring of
objects according to some property.

FIG insert figure into list

Standard FIG command (see !EXPL FIG/GEN). NOTE: plotting a figure into the current
drawing must be done under DR.

GET get equipment set (TP)

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.

GU updates related to equipment geometry

This command forces updates or removal of geometry stored for equipment objects.

GU U

Update all objects

GU P

Update parametric objects (needed if macro changed)

GU def

Update the object with the given definition.

GU E

Copyright © 1992 - 2016 NAPA. All rights reserved. 1603 / 7399


NAPA for Design Manuals 2016.3

Remove objects. If needed again, the will be recreated automatically. Must not be done if there
are objects plotted with the S option.

INQUIRE (->) define values of a parameter by inquiring (TP)

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.

INQUIRE par addinfo

par: parameter to be inquired, for example LOCTN, ETYPE

addinfo: name of column, the value of which is displayed in addition to the id

LIST list data from the current table

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

options: (opt) standard table output options (see !EXPL TOO/GEN).

LQ select listing quantities

This command selects the quantities listed by the LIST command (see !EXPL LQ/GEN). A list
of alternatives is obtained by command LQ ALT.

MAP map of requipment sets referenced by the current one (TP)

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
'...'

L,name,name...: as above, but listing only the given names.

EXAMPLE
MAP L R301 R302

The list of equipment sets will show where the given compartments belong.

NEW create new equipment set (TP)

NEW name

name: name of the equipment set.

NL open new list

Standard NL command (see !EXPL NL/GEN).

NOTE define description (TP)

This command defines/lists the description associated with the equipment set.

NOTE description

Copyright © 1992 - 2016 NAPA. All rights reserved. 1604 / 7399


NAPA for Design Manuals 2016.3

P list table lines in input form (TP)

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

selection: selection of compartments

name: name of compartment

n1,n2: indices in the current equipment set

A: all

PCD -> enter definition of pen codes

This command enters table calculation for defining tables giving pen codes to be used for
separating objects according to some property.

PED move compartment data to the editor (TP)

The command is otherwise the same as P, but the result is entered into the editor work area.

see command P.

PLOT plot equipment

This commands plots equipment from the current table obeying current projection and scaling.

PLOT sel axis=q ID=qnt options

sel: selection of objects

ALL: all objects in the current table, possibly restricted by SUBSET

id: item with the given id

*: the current item, default if no other parameter follow

list(): list of items given by a string array

axis=q: (opt) make section with the given plane, default=plot the object as it is.

ID=qnt: (opt) quantity to be marked as text. Default=obey ID NAME.

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.

P: fill according to fill codes in the table.

H: before plotting, sort for hidden lines effect

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.

Z: use simplified circles for routes

Copyright © 1992 - 2016 NAPA. All rights reserved. 1605 / 7399


NAPA for Design Manuals 2016.3

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.

PLOT ... ATTR=(attr1, attr2...) LINK=template

As above but adding XML properties, used in !SEND TO SVG.

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 all pieces with default options.

PLOT * R

Plot the reference points of the current piece.

PLOT ALL HP

Plot all objects, sorted for hidden linses effect, coloured according to the fill codes.

PLOT TTOP -

Plo the object TTOP.

PMO define parametric macro object

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.

PO set default plot options

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.

REG register equipment/route set

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

id: name of equipment set

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.

id: name of equipment set

Copyright © 1992 - 2016 NAPA. All rights reserved. 1606 / 7399


NAPA for Design Manuals 2016.3

subs: LD, CP, DA or WG. The registration can be cancelled by REG NONE subs.

REG DELETE id

Remove from the set of registered equipment sets

REG LIST

List registered equipment sets

RENAME rename the equipment set (TP)

RENAME name

name: new name of the equipment set.

REPLACE replace equipment set (TP)

This command is otherwise equivalent with SAVE, but is used then the equipment set already
exists in the data base.

SAVE save the equipment set (TP)

This command stores the current equipment set, when not existing previously in the data base.
For special options, see !EXPL SAVE/TPA.

SCAN -> shortcut to the list scanner

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!).

SELECT select visible columns (TP)

This command changes the set of visible columns.

SELECT col1 col2 ,...

col1,..: names of columns selected

SELECT ALT Display a list of avilable columns.

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 items with the origin at x>100.

SELECT ID=R*A

Select items with id beginning with R and ending in A.

SETUP setup for equipment set drawing

This is the same command as in the drawing task, see !EXPL SETUP/G20.

SIZE scale for given size

Except for cases *, **, this is the same command as SIZE under DR, see !EXPL SIZ/G20.

SIZE *

Copyright © 1992 - 2016 NAPA. All rights reserved. 1607 / 7399


NAPA for Design Manuals 2016.3

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 sort the table (TP)

Sort the lines of the current table.

SORT qnt

qnt: quantity to be sorted (any quantity in the table).

TAB -> enter table calculation

The command enters 'bare' table calculation for using it with out any predefined purpose (in
contrast to command PDEF and others)

TOO table output options

Options controlling the LIST command; see !EXPL TOO/GEN.

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.

TYPE add arbitrary text to the list

See !EXPL SCAN/GEN.

UNSAVE delete from the data base (TP)

UNSAVE: name

name: identifier of the arrangemnt

UPDATE update the current equipment set (TP)

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.

WHERE print name of current equipment set

Copyright © 1992 - 2016 NAPA. All rights reserved. 1608 / 7399


NAPA for Design Manuals 2016.3

Colouring and line type standards (SM)


Colouring and line type standards can be defined for showing various aspects of the ship, for example, compartments or structures of different
categories. These definitions are stored as tables according to the specifications below. The definitions are done under the table calculation
module, which is entered from SM with the commands FCD (fill code definition) and PCD (pen code definition).

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

TYPE FCODE LFCODE


-------------------------
DEFAULT -14 C14
L -5 C5
B -8 C8
E -2 C2

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1609 / 7399


NAPA for Design Manuals 2016.3

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.

2. Handling the colouring standard as compartment parameters


The special case of filling according to compartment purposes can be handled as other compartment parameters, by adding the fill code to these
(quantity FCODE or LFCODE). The application of the fill codes is not dependent on the way the parameters are entered, but the natural way to
add them is to use the tables PAR*PRO and PAR*STD.

Fill codes entered this way are connected to the compartments exactly as the other compartment parameters.

3. Line type standards


A line type standard works analogously with a fill code standard. Presently, the line type standard is applied when drawing structures only (DRW
STR*...).

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.

The tables are named PEN*id.

4. Use of fill codes and line types


Fill codes selected on the basis of properties fetched from the arrangement are requested with the FILL command in the drawing task. The
format is

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1610 / 7399


NAPA for Design Manuals 2016.3

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).

A command of the form

FILL PURP std

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.

The special case

FILL STYPE

is handled similarly as FILL PURP, but for colouring structures. There must be a structure arrangement made current by !SM STR.

The use of a line type table is analogical with FILL:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1611 / 7399


NAPA for Design Manuals 2016.3

Commands and service functions (SM)


Table of Contents:

1. Commands in the main SM task


2. Service functions of SM
2.1. Sets of compartments and relations
2.2. Equipment and routes

1. Commands in the main SM task

ADD add compartments

This command adds new compartments to the current arrangement.

ADD PURP=purpose name, name ...

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

T1,T2 and T3 are added. The purpose is undefined.

ADD PURP=HFO T1 T2 T3

T1,T2 and T3 are added and defined to contain HFO.

ADD *ROOMS

All compartments mentioned in ROOMS are added. ROOMS should normally be a combined
room.

CATALOG catalog of defined arrangements

This command produces a list of arrangements in the current project and version, containing
the name and description.

CL -> enter container loading

COL assign line colour

This is the same command as COLOUR in the drawing task, for changing the line colour.
Similarly THI, DAS, TCOL, FONT, PEN.

COMBINE define combined arrangement

This command defines or lists a combined arrangement.

COMBINE name part1 part2 ...

name: name of result. With no other parameters, the definition of the given (combined) arrangement is
displayed.

part1...: name of partial arrangements

DEF define parameters of compartment.

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.

DEF name PURP=purp DES=des CCODE=ccode

Copyright © 1992 - 2016 NAPA. All rights reserved. 1612 / 7399


NAPA for Design Manuals 2016.3

name: name of compartment

purp: (opt) purpose

des: (opt) description

ccode: (opt) alternative name

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.

DEF name ... CLASS=class TYPE=type RED=red PERM=perm CAP=cap

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)

DEF R40 RHO=0.75

Defines an exception to the density. Otherwise the definition is not changed.

DELETE delete compartments

This command deletes compartments from the current arrangement or components of the
definition.

DELETE name, name,...

Deletes the named compartments

DELETE ALL

The arrangement is emptied.

DELETE SELECTED

The compartments selected by the SELECT command are deleted.

DELETE EXCEPTIONS

Delete all so-called exceptions, i.e. values replacing those otherwise derived from the purpose,
e.g. room specific steel reduction.

DES list in input format

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.

DES name option

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.

option: (opt) options

Copyright © 1992 - 2016 NAPA. All rights reserved. 1613 / 7399


NAPA for Design Manuals 2016.3

G: interpret 'name' as name of geometric object

*: display arrangement in the short form using ADD commands.

DIR -> enter table calculation directly

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).

DR -> return to drawing context

DRW drawing to the setup

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.

DSC synonym for TEXT

EDIT -> enter editor

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.

see command DES

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.

END -> exit from the task

The geometry definition task DEF will be entered. The arrangement in the work area remains
and is available when SM is re-entered.

ENV synonym for OS

EQP -> enter definition of equipment

This command enters table calculation for defining sets of equipment.

EQT -> enter definition of equipment types

This command enters table calculation for defining properties associated with equipment types.

FCD -> enter definition of fill codes

This command enters table calculation for defining tables giving fill codes for colouring of
objects according to some property.

FIG insert figure into list

Standard FIG command (see !EXPL FIG/GEN).

FILL define filling

This is the same command as FILL in the drawing task, see !EXPL FILL/G22

Copyright © 1992 - 2016 NAPA. All rights reserved. 1614 / 7399


NAPA for Design Manuals 2016.3

GET get arrangement

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.

H define intersection for deck plans

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.

INQUIRE (->) define values of parameter by inquiring

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

par: parameter to be inquired; alternatives (normally):


PURP,DES,CCODE,PDES,CLASS,TYPE,RHO,RED,CAP,PERM The parameters
PDES...PERM are treated as exceptions. If no value has been given directly for a given
compartment, the one deduced from the purpose is shown in parentheses.

EXAMPLE:
SELECT DES=''
INQUIRE DES

Inquire the description of all compartments, presently having an empty one.

LIST list compartment parameters

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1615 / 7399


NAPA for Design Manuals 2016.3

options: (opt) standard table output options (see !EXPL TOO/GEN).

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.

LQ select listing quantities

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.

MAP map of registered arrangements

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 '...'

L,name,name...: as above, but listing only the given names.

EXAMPLE
MAP L R301 R302

The list of arrangements will show where the given compartments belong.

NEW create new arrangement

NEW name

name: name of the arrangement.

NL open new list

Standard NL command (see !EXPL NL/GEN).

OS define outer surface

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.

P list data for compartments

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

selection: selection of compartments

name: name of compartment

n1,n2: indices in the current arrangement

A: all

Copyright © 1992 - 2016 NAPA. All rights reserved. 1616 / 7399


NAPA for Design Manuals 2016.3

PAR synonym for DEF

PCD -> enter definition of pen codes

This command enters table calculation for defining tables giving pen codes to be used for
separating objects according to some property.

PDEF -> enter purpose definition

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.

PED move compartment data to the editor

The command is otherwise the same as P, but the result is entered into the editor work area.

see command P.

PLOT plot objects

For an explanation, !EXPL PLO/G21.

REG register arrangement

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

id: name of arrangement

PERM: (opt) make the given arrangement the assumed one

REG id subs

This commands makes the given arrangement default for the given subsystem.

id: name of arrangement

subs: LD, CP, DA or WG. The registration can be cancelled by REG NONE subs.

REG DELETE id

Remove from the set of registered arrangements

REG LIST

List registered arrangements

RENAME rename the arrangement

RENAME name

name: new name of the arrangement.

REPLACE replace arrangement

This command is otherwise equivalent with SAVE, but is used then the arrangement already
exists in the data base.

SAVE save the arrangement

This command stores the current arrangement, when not existing previously in the data base.
For special options, see !EXPL SAVE/TPA.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1617 / 7399


NAPA for Design Manuals 2016.3

SCAN -> shortcut to the list scanner

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!).

SELECT select subset of compartments.

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 compartments with name beginning with R.

SELECT PURP=HFO

Select compartments with purpose=HFO

SELECT CLASS>B

Select compartments belonging to class B (bunkers) or any subclass (such as BO).

SELECT CGZ=0...1.5

Select compartments, the center of gravity of which is in the specified range.

SELECT NAME=*ARR*A1

Select compartments belonging to partial arrangement A1.

SETUP setup for arrangement drawing

This is the same command as in the drawing task, see !EXPL SETUP/G20.

SORT sort the compartments

Sort the compartments of the current work arrangement.

SORT qnt1/qnt2 options

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)

-: sort in descending order (default=ascending)

EXAMPLE
SORT PURP/NAME

Sort the compartments primarily according to purpose, and within groups of constant purpose,
the compartments are sorted by name.

STR -> enter structure definition

This command enters table calculation for the purpose of defining sets of structures.

STT -> enter definition of structure types

properties associated with structure types. This command enters table calculation for the
purpose of defining

Copyright © 1992 - 2016 NAPA. All rights reserved. 1618 / 7399


NAPA for Design Manuals 2016.3

TAB -> enter table calculation

The command enters 'bare' table calculation for using it with out any predefined purpose (in
contrast to command PDEF and others)

TEXT define description

This command defines/lists the description associated with the arrangement.

TEXT description

description: text documenting the purpose or role of the current arrangement. If omitted, the current text is
displayed.

TLIST list as under table calculation

This command starts the same list as LIST under table calculation, see !EXPL LIST/TPA.

TOO table output options

Options controlling the LIST command; see !EXPL TOO/GEN.

TREAT get arrangement from the run time store

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.

TSELECT select columns in the table

This is the same command as SELECT under table calculation, controlling the PRINT, TLIST
and DEF commands, see !EXPL SEL/TPA.

TYPE add arbitrary text to the list

See !EXPL SCAN/GEN.

UNSAVE delete from the data base

UNSAVE: name

name: identifier of the arrangemnt

UPDATE update the current arrangement

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.

WHERE print name of current arrangement

2. Service functions of SM

SM.ARR() set/tell current arrangement

SM.ARR(name,'PERM')

This form changes the current arrangement.

name: name of arrangement, prefix ARR* optional.

PERM: (opt) make it the default.

name=SM.ARR()

Copyright © 1992 - 2016 NAPA. All rights reserved. 1619 / 7399


NAPA for Design Manuals 2016.3

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.

SM.PAR() current parameters table.

The function returns the name of the current table providing properties of compartment
purposes/load types (with prefix PAR*). Empty=none current.

SM.COMPPAR() return record with compartment parameter

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)

sel: (opt) property e.g. PURP, RHO, default=NAME.

SM.COMPLIST() list of compartments in the current arrangement

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)

array: receiving array (strings)

crit: (opt) selection criterion in the standard form, e.g. PURP=HFO.

EXAMPLE
@list=arr(3)
@n=sm.complist(list,'TYPE=L')

Store a list of all tanks in the array LIST.

SM.LIST() list occurrences of a given parameter

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)

prop: property, eg. PURP

array: receiving 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.

SM.REFARR() set/inquire the current reference surface 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')

Changes the current reference surface arrangement.

name: name of the arrangement, prefix REF* optional. With name=empty, the default arrangement is
taken.

PERM: (opt) make it the default

arr=SM.REFARR()

Copyright © 1992 - 2016 NAPA. All rights reserved. 1620 / 7399


NAPA for Design Manuals 2016.3

Inquire the current reference surface arrangement.

arr=SM.REFARR('DEFAULT')

Inquire the default reference surface arrangement.

SM.OPARR() set/inquire the current opening arrangement

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)

Changes the current opening arrangement.

name: name of the arrangement, prefix OPE* optional.

SM.IDENTIFY() check inclusion in the arrangement

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)

name: name of compartment

EXAMPLE

Assume that the arrangement contains the compartment R123, formed by the combination of
R123A and R123B.

@sm.identify('R123A') -> R123


@sm.identify('R123') -> R123

2.1. Sets of compartments and relations

SM.NEIGHBOURS() find neighbours of compartment

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)

name: name of compartment checked

nlist: string array for receiving the result: names of neighbours.

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.

opt: (opt) options

X: consider transversal neighbours

Y: consider lateral neighbours

Z: consider neighbours over and under. Default if neither X, Y nor Z: consider all.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1621 / 7399


NAPA for Design Manuals 2016.3

P: plot the result, provided that 'ext' given. The result is labeled for GR.IDENTIFY).

EXAMPLE
@nrec=arr(3)
@sm.neighbours('R123',nrec)

Store in nrec a list of neighbours to R123.

@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).

SM.NBPAIRS() find neighbouring pairs satisfying a given criterion

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

qnt2: quantity for the second criterion. Empty=same as qnt1.

crit2: criterion for the second component of the pair

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

rext: (opt) same as in SM.NEIGHBOURS

tol: (opt) same as in SM.NEIGHBOURS

ovrl: (opt) same as in SM.NEIGHBOURS

opt: (opt) same as in SM.NEIGHBOURS

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.

SM.SELCOORD() select coordinates for plans

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)

Optional parameters can be omitted from the end.

arr: array (type 2, reals) for receiving the result

axis: axis, 1=x, 2=y, 3=z

d: minmimum distance between coordinates returned.

min: (opt) lower limit of interval to be checked

max: (opt) upper limit of interval to be checked

Copyright © 1992 - 2016 NAPA. All rights reserved. 1622 / 7399


NAPA for Design Manuals 2016.3

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

L: return limits rather than places between them

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() handling variable configurations

This function handles arrangements where different configurations can be obtained by


activating alternative sets of compartments. This requires that the arrangement table contains
the column INCL (telling what are the active compartments) and SUBD (telling the relations
between the alternatives).

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.

comp: target compartment for the INCL subfunction:

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.

array: string array (names) or integer array (indices) of compartments

2.2. Equipment and routes

SM.PLOTEQP() plot equipment

The function plots pieces of equipment from a given table.

SM.PLOTEQP(table,sel,axis,q,attr,link,options)

table: source table, standard alternatives, see !EXPL TP.STDPAR, in addition empty=current
equipment table

sel: selection of items

0: all items

index: piece with the given line number

Copyright © 1992 - 2016 NAPA. All rights reserved. 1623 / 7399


NAPA for Design Manuals 2016.3

empty: (empty string), same as 0

id: piece with the given id

array: list of items, either integer array=list of line numbers or string array=list of id:s.

axis: (opt) section axis, 1,2 or 3. 0 or omitted: plot the object

q: (opt) section axis. Compulsory if 'axis' given.

options: string containing one or several of the following options:

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.

P: fill according to fill codes in the table.

H: before plotting, sort for hidden lines effect

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')

Plot all items in EQP*MACHINES with default options.

@SM.PLOTEQP('EQP*MACHINES'.0,'P')

As above but applying fill codes.

@list=TP.SUBSEL('EQP*MACHINES','ETYPE>M')
@SM.PLOTEQP('EQP*MACHINES'.LIST,'P')

Plot only those items having ETYPE beginning with M.

@ATTR=ARR(3) @ATTR(1)='ETYPE' @ATTR(2)='FORM'


@SM.PLOTEQP(0,0,ATTR,'eqp.%.htm','P')

Plot the current table, add the given attribute and links to HTML files.

SM.PLOTROUTES() plot routes

The function is similar with SM.PLOTEQP, only the operation concerns a set of routes-

SM.PLOTROUTES(table,sel,axis,q,attr,link,options)

See SM.PLOTEQP for the parameters.

SM.DRWEQP() plot equipment in the setup

Copyright © 1992 - 2016 NAPA. All rights reserved. 1624 / 7399


NAPA for Design Manuals 2016.3

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

sel: selection of items

0: all items

index: piece with the given line number

empty: (empty string), same as 0

id: piece with the given id

array: list of items, either integer array=list of line numbers or string array=list of id:s.

part: (opt) part numner in the setup, 0 or omitted=all parts.

attr: (opt) attributes, see SM.PLOTEQP

link: (opt) link template, see SM.PLOTEQP

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.

X: plot as sections, default=3d.

SM.DRWROUTES() plot routes in the setup

The function is similar with SM.DRWEQP, only the operation concerns a set of routes.

SM.DRWROUTES(table,sel,part,link,attr,options)

See SM.DRWEQP for the parameters.

SM.EQP() get geometry of piece of equipment

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

sel: selection of item

id: piece with the given id

lnr: line number in the table

axis: (opt) section axis, 1,2 or 3. 0 or omitted: return the object.

q: (opt) section axis. Compusory if 'axis' given.

options: string containing one or several of the following options:

C: always return curve, default=surface if possible

B: always return box, default=return actual shape if defined

R: add reference points, RR=also implied ones

S: save the result. Ignored if name not given.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1625 / 7399


NAPA for Design Manuals 2016.3

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)

Calculate the area of a section of the given piece.

SM.EQPOBJECT() apply equipment form definition

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)

def: definition, same alternatives as in FORM

opt: options:

C: always return curve, default=surface if possible

B: always return box, default=return actual shape if defined

R: add reference points, RR=also implied ones

S: save the result. Ignored if name not given.

name: name of the result

SM.ROUTE() get route from route table

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)

Parameters can be omitted from the end.

table: route table, alternatives as in TP. functions (see !EXP TP.STDPAR).

id: identifier of route to be plotted. Empty=all or subset (see parameter LIST, option R).

axis,q: (opt) make section with the specified coordinate plane.

name: (opt) name assigned to the result

opt: options, one or several of

S: save the result in the data base, default=plot

I: leave the result in the free storage, the function value is the reference number of the result.

P: return a patch surface. Must be single route or plot option.

L: return the center line (curve)

X: return the cross section as a curve in the plane x=0

X1: return the cross section at the startpoint

X2: return the cross section at the endpoint

R: apply subset specified for the table (must be in the current work area)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1626 / 7399


NAPA for Design Manuals 2016.3

list: (opt) integer record providing list of selected lines, can be created with TP.SUBSEL.

EXAMPLES
@it=tp.read('ROUTES*DEMO')
@sm.route(it,'')

Plot all routes in the table.

@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)

Plot all routes withe TYPE=DUCT

@sm.route(it,'','X',12)

Plot a section of all routes with X=12.

@sm.route(it,'','ROUTES')

Save the routes of the given table as a surface named ROUTES.

SM.EQPDEF() get definition of eqp component

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)

This form takes the syntax directly as a string.

syntax: string containing the definition to be expanded

descr: receiving description

opt: options

F: 'syntax' contains FORM, default=LOCTN

O: 'syntax' contains ORNT

A: add to the previous contents of DESCR, default=replace

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

line: line number in the table, standard alternatives

descr: receiving description

opt: options

L: take only LOCTN, default=all of LOCTN, FORM, ORNT

F: take only FORM

O: take only ORNT

A: add to the previous contents of DESCR, default=replace

EXAMPLES
@D=DM.CREATE('')
@SM.EQPDEF('PIPEBEND(3,0.5)',D,'F')

Copyright © 1992 - 2016 NAPA. All rights reserved. 1627 / 7399


NAPA for Design Manuals 2016.3

Store the definition of FORM as given by the first parameter.

@SM.EQPDEF(0,0,D)

Store all parameters of the object defined by the current line in the current table.

SM.EQPASG() get syntax from expanded definition

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)

This form returns the result as the function value (string).

d: description containing the expanded definition

opt: options:

F: return FORM, default=LOCTN

O: return ORNT

SM.EQPASG(table,line,d,opt)

This form returns the result in the given table.

table: table designated according to the standard alternatives,

line: line number in the table, standard alternatives

d: description containing the expanded definition

opt: options:

L: take LOCTN only, default=all of LOCTN, FORM, ORNT

F: take FORM only

O: take ORNT only

C: do error checks

!: assign even if errors detected

P: for FORM: construct parametric definition from the parts (rec. 32, 33) even if rec. 31
available

S: for LOCTN: use rec. 6 (syntaxes directly)

EXAMPLES
@loc=SM.EQPASG(d)

Get LOCTN from the description d.

@SM.EQPASG(0,0,d,'L')

Update LOCTN on the current line of the current table.

SM.EQPLIST() pieces of equipment available in a table

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)

Parameters can be omitted from the end, 'opt' independently of others.

table: equipment table, standard alternatives, default=current. If 'table' is given, 'lnr' must also be
given.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1628 / 7399


NAPA for Design Manuals 2016.3

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

A: return all pieces, default=omit the one corr. to 'lnr'

S: sort alphabetically, default=in the order stored in the table

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()

Return the equipment id:s in an internally reserved table.

SM.RPLIST() list of available defined reference points

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)

source: description as returned by SM.EQPDEF.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1629 / 7399


NAPA for Design Manuals 2016.3

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1630 / 7399


NAPA for Design Manuals 2016.3

Tank tables (CP)


Table of Contents:

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

AWP area of waterplane

AZIMAX azimuth angle of Imax

AZIMIN azimuth angle of Imin

CGX cgx of volume

CGXA cgx of area

CGY cgy of volume

CGYA cgy of area

CGZ cgz of volume

GAUGE sounding device reading

H height from tank bottom

FILL filling degree (% of max volume)

FSM free surface moment

IMIN min. moment of inertia of surface

IMAX max. moment of inertia of surface

LMA longit moment of surface

Copyright © 1992 - 2016 NAPA. All rights reserved. 1631 / 7399


NAPA for Design Manuals 2016.3

LMV longit. moment of volume

SCORRH sounding correction for heel

SCORRT sounding correction for trim

T draught

TMA transv moment of surface

TMV transv. moment of volume

TMX long. moment of inertia

TMY transv moment of inertia

VCORRH volume correction for heel

VCORRT volume correction for trim

VMV vert. moment of volume

VNET net volume

VOLM volume moulded

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.

3.1. Depth Arguments

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1632 / 7399


NAPA for Design Manuals 2016.3

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.

3.2. Trim and heel

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,

LQ H VNET('even keel') VNET('trim -1')/-1 VNET('trim 1')/1

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

LQ GAUGE VNET VCORRT('trim -1')/-1 VCORRT('trim 1')/1,


VCORRH('heel-5')/-5 VCORRH('heel=5')/5

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1633 / 7399


NAPA for Design Manuals 2016.3

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.

3.3. Other arguments

In addition to those presented above, the following arguments are defined:

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.

COMP - current compartment

When a new compartment is selected, arguments are adapted as presented below.

SDEV - current sounding device

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.

RHO - density of contents

This parameter is relevant for quantities WL (weight of load) and FSM (free surface moment) only. The default is fetched from the arrangement.

RED - steel reduction

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).

DMODE - control for dummy values

This argument controls the listing of undefined centers of gravity or redundant volumes, as presented below.

WLS - waterline section for waterline oriented quantities

This option may improve the accuracy of quantities derived from the surface (AWP etc), provided that the sections are obtained reliably.

3.4. Adaption of arguments when changing compartment

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1634 / 7399


NAPA for Design Manuals 2016.3

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 -

cancels the * option.

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:

SMCAP capacity (filling)

SMCCOD alternative name (tank code)

SMCGX,SMCGY,SMCGZ center of gravity of volume

SMCLAS class

SMDES descriptive text

SMPDES description of purpose

SMPURP purpose

SMRED steel reduction

SMRHO density of contents

SMTYPE type

SMVNET net volume

SMVOLM moulded volume

SMWLMX loading capacity (max weight)

SMXMIN...SMZMAX: extreme coordinates

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1635 / 7399


NAPA for Design Manuals 2016.3

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:

Volumes and weight:


The qualifier modifies the trim or heel argument as presented under 'Arguments'.
Quantity GAUGE:
The qualifier R (reverse) converts soundings to ullages and vice versa. Only when argument=gauge or gstep and the current device is a
tube.
Quantity FSM (free surface moment):
The qualifier gives the heeling for which the the moment is calculated. The default is 0, giving zero moment.
Centers of gravity:
The qualifier gives a reference point (default=0).

5.2. Standard lists commands

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:

TYPE Compartment @SBS(COMP,12) contents @SMPDES


TYPE Location #@FR(SMXMIN) to #@FR(SMXMAX)

5.3. Selecting sets of compartments

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:

SELECT TYPE=L -PURP=BW

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:

!DO LIST-MACRO NAME=CPLIST

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1636 / 7399


NAPA for Design Manuals 2016.3

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.

5.4. Presentation of undefined values

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:

G: replace centers of gravities by dummy values


V: replace redundant volumes or areas by dummy values
S: use space as dummy value (default minus sign)

Other characters are ignored.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1637 / 7399


NAPA for Design Manuals 2016.3

-----------------------------------------------------------------
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:

LQ GAUGE('sounding'), VNET('trim=-2')/-2, VNET('trim=-1')/-1,


VNET('even keel'), VNET('trim=1')/1, VNET('trim=2')/2
TOO CP HD=(UL, S, U, UL, -, UL)

----------------------------------------------------------------
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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1638 / 7399


NAPA for Design Manuals 2016.3

----------------------------------------------------------------
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
----------------------------------------------------------------

The following example is otherwise the same, but adding

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1639 / 7399


NAPA for Design Manuals 2016.3

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

PLOT .macro options

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:

Tank in the PLD example


This is a typical case where the ADD STEPS option is essential for getting a good plot of surface quantities (there is second discontinuity not
visible in this section). The plot was made with the following options:

PQ CP, H, VOLM, AWP, (GAUGE)


POO CP, BOX, VA, LGTEXT=LH, LEGEND, LGH=*1.1, NET=P1021, SMOOTH,
ARG: AXIS=LB, NOM=GAUGE, NAXIS=LA,
F1: AXIS=LB, PEN=A1, RANGE=(0,250),
F2: AXIS=UA, PEN=A2, SCALE=(F1)

Example of graphic presentation

Copyright © 1992 - 2016 NAPA. All rights reserved. 1640 / 7399


NAPA for Design Manuals 2016.3

Sounding devices and steel reductions (CP)


This chapter presents the definitions supporting the tank capacity calculations:

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

1.1. Device types

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:

MS, MU manual device

RS, RU remote device

LS, LU same device type as RS,RU, but with installed with local reading device.

DS 'dip' sounding device for measuring a remainder at the tank bottom

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1641 / 7399


NAPA for Design Manuals 2016.3

Illustration of manual soundings and ullages


A remote sounding device in one way or another senses the orthogonal distance from the device to the liquid surface, either from below
(sounding) or from above (ullage). Such a device is defined by the location of the probe and an optional correction, added by the device.

Illustration of remote soundings and ullages


The dip sounding device is formed by a weight dropped from a given position until it touches the bottom. The sounding the value is the length of
the immersed part:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1642 / 7399


NAPA for Design Manuals 2016.3

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.

1.2. Identification of sounding devices

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.

1.3. Defining sounding devices

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.

For a manual device, the form of the command is

DEV comp type/id curve h

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:

DEV T110 MU (#BH1+1 #LBH2-0.2 #DECK1+0.05),(#BH1+1 #LBH2-0.2


DEV T112 MS TUBE-T112 0.7

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.

The definition of a remote device has the following form:

DEV comp type/id (x,y,z) h

where (x,y,z) is the location of the probe and 'h' the optional reading correction.

Example:

DEV T110 RS (#BH1+1 #LBH2-0.2 #DECK1+0.05)

The definition of a dip device has the same form:

DEV comp type/id (x,y,z) h

(x,y,z) is the point from which the device is lowered and h the height (z-coordinate) of the tank bottom.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1643 / 7399


NAPA for Design Manuals 2016.3

1.4. Selecting the sounding device for calculation

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.

1.5. Auxiliary functions

A catalog of stored devices is obtained by command CAT. A list of compartments having devices is stored in a calculator array DEVLIST.

The DES command lists definitions of sounding devices:

DES DEV comp

(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.

Command DELETE DEV deletes sounding devices:

DELETE DEV comp type/id

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.

1.6. Drawing of sounding devices

In the drawing task, graphic check of sounding devices can be done with commands

PLOT SDEV name options (single compartment)

DRW SDEV options (from current arrangement)

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.

The following options are provided

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)

FIG=fig name of figure to represent the device

NAME=name name of compartment. Relevant for DRW only.

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.

The drawing task can be entered from CP with command DR.

The following figure shows an example of ID NAME +DRW SDEV:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1644 / 7399


NAPA for Design Manuals 2016.3

Example of DRW SDEV


The original way of plotting the devices was to use figures. With the 3d mode of the view (!view 3d), the figures are replaced by markers as
follows:

Markers designating different devices

1.7. Old definitions

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.

1.8. Using sounding values with the calculator

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1645 / 7399


NAPA for Design Manuals 2016.3

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)

The function CP.VOLG (volume from gauge) provides a shortcut:

vol=CP.VOLG(comp,device,gauge,trim,heel)

while CP.GVOL (gauge from volume) does the reverse function:

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.

2. Steel reduction as a function of filling


The steel reduction for an individual compartment can be defined as a function of filling degree.

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

The reduction is stored as a function of uncorrected relative volume as follows:

q=vol/volm
red=f(q)
vnet=(1-red)*vol

where

Copyright © 1992 - 2016 NAPA. All rights reserved. 1646 / 7399


NAPA for Design Manuals 2016.3

volm=total moulded volume


vol=volume at the current filling, as obtained from the geom
vnet=corrected volume at then current filling
f(q)=the variable steel reduction.

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:

RED comp (z1,red1) ... (zn, redn)

'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.

The internal form can be given directly this way:

RED comp I (q1,red1) ... (qn, redn)

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.

2.3. Alternative definitions

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

RED comp TAB*table

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1647 / 7399


NAPA for Design Manuals 2016.3

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).

In order to restore a fixed reduction, the variable one must be deleted.

2.7. Auxiliary functions

A catalog of stored steel reduction definitions is obtained with command

CAT RED

The command obeys the options defined for the general CAT command (see !EXPL CAT/GEN).

The DES command lists definitions:

DES RED comp

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

RED R601 (1 0.5) (4 0.5) (4 0) (7.2 0)

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:

Local and integrated steel reduction


From the figure it can be seen that the overall effect is 22 %. This value should be given in SM.

3. Other definitions
A reference height can be defined in subtask PAR by command

Copyright © 1992 - 2016 NAPA. All rights reserved. 1648 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1649 / 7399


NAPA for Design Manuals 2016.3

Examples of output macros (CP)


Table of Contents:

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.

100 ** PROG OUTPUT OF SOUNDING TABLE FOR SINGLE COMPARTMENT


110 !CDE 0
120
130 &ONERR 99999 (finish if error)
140 ** ----------- various initial assignments ----------
150 ** store list of sounding devices and corr. headers
160 &TYPELIST=ARR(3,1111) (string array, 'named' 1111)
170 &TYPELIST(1)='MS'
180 &TYPELIST(2)='MU'
190 &TYPELIST(3)='RS'
200 &TYPELIST(4)='RU'
210 &TYPELIST(5)='LS'
220 &TYPELIST(6)='LU'
230 &HEADER=ARR(3,1112)
240 &HEADER(1)='MANUAL SOUNDING TABLE'
250 &HEADER(2)='MANUAL ULLAGE TABLE'
260 &HEADER(3)='REMOTE SOUNDING TABLE'
270 &HEADER(4)='REMOTE ULLAGE TABLE'
280 &HEADER(5)='LOCAL SOUNDING TABLE'
290 &HEADER(6)='LOCAL ULLAGE TABLE'
300 ** (could be saved as a table under task TAB)
310
320 !FORM GSTEP 7.0 CM
330 !FORM GAUGE 7.0 CM
340 !FORM H 7.2
350 !FORM VNET 9.1
360 !FORM VCORRH 9.2
370 !FORM MASS 9.1
380 !FORM CGX 9.2
390 !FORM CGY 9.2
400 !FORM CGZ 9.2
410 !FORM TMY 9.1
420 !FORM TMX 9.1
430
440
450 &ONERR 970 (restart if error)
460
470 ** ------------- get sounding device -----------------

Copyright © 1992 - 2016 NAPA. All rights reserved. 1650 / 7399


NAPA for Design Manuals 2016.3

480 &ADEV=.... sounding device (MS,RS,MU,RU,lS or LU)


490 &I=LOCS(TYPELIST,ADEV) identify device
500 &IF I>0 530
510 !TYPE Unknown device - give again
520 &GOTO 480
530 &GARG='SND'
540 &IF SBS(ADEV,2,2)='U' &GARG='ULLAGE'
550
560 LQ GAUGE(&GARG),
570 VNET('Trim +1')/1 VNET('Even keel'), VNET('Trim -1')/-1,
580 VCORRH('Heel S')/-1, VCORRH('Heel P')/1
590 TOO HD=(S,U, '-', ' ') LMIN=18, SPACE=5,
600 LNP=(' COMPARTMENT IDENT: %COMP',
610 ' COMPARTMENT NAME: %SMDES',
620 ' CONTENTS: %SMPDES', ' ')
622 ** LNP option: headers for additional pages
630
640 ** ----------------------------------------------------
650 &NAME=.... name of compartment, E=end
660 &IF NAME='E' 1000
670
680 COMP &NAME
690 SDEV &ADEV
700 &IF SBS(SDEV,2)=ADEV 730
710 !TYPE device &ADEV not defined for &COMP
720 &GOTO 470
730
740 NL '&HEADER(I)'
750
760 ** select GSTEP so that the list fits into two pages
770 GSTEP 10 -1 1 ;** note the trim range
780 NARG ;** get number of arguments
790 &IF NARG<100 870
800 GSTEP 50 -1 1
810 &IF NARG<100 870
820 GSTEP 100 -1 1
830 &IF NARG<100 870
840 !TYPE GSTEP replaced by step
850 STEP 0.5
860
870 ** ----------------- start listing, headers first
880 TYPE COMPARTMENT IDENT: &COMP
890 TYPE COMPARTMENT NAME: &SMDES
900 TYPE CONTENTS: &SMPDES
910 TYPE NET VOLUME, CUBIC METRES
915 TYPE
920
930 LIST
940 NP
950 &GOTO 650
960
970 ** handle error
980 &Q=.... try again? (y/n)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1651 / 7399


NAPA for Design Manuals 2016.3

990 &IF Q='Y' 650

Copyright © 1992 - 2016 NAPA. All rights reserved. 1652 / 7399


NAPA for Design Manuals 2016.3

1000 **
END OF TEXT

Listing example:

Napa Oy MANUAL SOUNDING TABLE DATE 91-05-05


NAPA/D/CP/910404 TIME 18.30
DEMOSHIP/A SIGN JVH
PAGE 1
COMPARTMENT IDENT: T101
COMPARTMENT NAME: FW TANK NO 5
CONTENTS: FRESH WATER
NET VOLUME, CUBIC METRES
SND Trim +1 Even keel Trim -1 Heel S Heel P
CM M3 M3 M3 M3 M3
----------------------------------------------------------
0 3.7 2.2 0.8 1.10 -0.85
50 31.9 30.4 28.9 1.16 -1.15
100 60.6 59.1 57.5 1.21 -1.21
150 89.4 87.8 86.3 1.21 -1.21
200 118.1 116.6 115.1 1.21 -1.21
250 146.9 145.4 143.9 1.21 -1.21
300 175.7 174.2 172.7 1.21 -1.21
350 190.6 190.6 190.6 0.00 0.00

2. Listing groups of compartments


The following example shows the same list as in the first example, repeated for a group of compartments.

Main macro:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1653 / 7399


NAPA for Design Manuals 2016.3

100 ** PROG - OUTPUT OF SOUNDING TABLE - GROUP


110 ** This macro makes a sounding table for all compartments
120 ** with a given type sounding device
130 !CDE 0
140
150 &ONERR 99999
160 !ADD CP.SND-I
170 ** (assignments, formats etc. as in the preceding example)
180
190 &ADEV=.... sounding device (MS,RS,MU,RU,lS or LU)
200 &I=LOCS(TYPELIST,ADEV) identify device
210 &IF I>0 250
220 !TYPE Unknown device - give again
230 &GOTO 190
240
250 &GARG='SND'
260 &IF SBS(ADEV,2,2)='U' &GARG='ULLAGE'
270
280 LQ GAUGE(&GARG),
290 VNET('Trim +1')/1 VNET('Even keel'), VNET('Trim -1')/-1,
300 VCORRH('Heel S')/-1, VCORRH('Heel P')/1
310 TOO HD=(S,U, '-', ' ') LMIN=18, SPACE=5,
320 LNP=(' COMPARTMENT IDENT: %COMP',
330 ' COMPARTMENT NAME: %SMDES',
340 ' CONTENTS: %SMPDES', ' ')
350
360 SDEV &ADEV * ;** select device with permanent effect
370 NL '&HEADER'
380
390 SORT CCODE ;** sort according to CCODE
400 SELECT TYPE=L ;** all compartments with liquid contents
410 SELECT SDEV>&ADEV ;** subset with device of the given type
410 ** array CPLIST contains list of selected compartments
420
430 ** do the listing for all compartments selected
440 !DO CP.SND.L NAME=CPLIST
END OF TEXT

The macro CP.SND.L, run in the DO command above, contains the following:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1654 / 7399


NAPA for Design Manuals 2016.3

100 ** PROG LISTING COMMANDS FOR SINGLE COMPARTMENT


110
120 &ONERR 730 (allows main loop to continue if error)
130
140 COMP &NAME
150
160 ** select GSTEP so that the list fits into two pages
170 GSTEP 10 -1 1 ;** note the trim range
180 NARG ;** get number of arguments
190 &IF NARG<100 270
200 GSTEP 50 -1 1
210 &IF NARG<100 270
220 GSTEP 100 -1 1
230 &IF NARG<100 270
240 !TYPE GSTEP replaced by step
250 STEP 0.5
260
270 ** ----------------- start listing, headers first
280 TYPE COMPARTMENT IDENT: &COMP
290 TYPE COMPARTMENT NAME: &SMDES
300 TYPE CONTENTS: &SMPDES
310 TYPE NET VOLUME, CUBIC METRES
315 TYPE
320
330 LIST
340 NP
END OF TEXT

3. Example macro for LIST .macro


The following macro has been distributed as an example of writing macros of this type. Note specially that a set selected with SELECT causes the
whole set to be run. (This macro is independent of line numbers, which are not listed).

@@ Basic listing, use 'LIST .STD ?' for help


@ECHO OFF @@ Common declarations
!VAR @
!VAR TILDE ~
@IR=LOCS(LISTPAR,'?') @@ Check for ?
@IF IR>0 @GOTO HELP
@ONERR END
@I=1
@VT=VTYP('CPLIST')
@N=0
@IF VT>0 @N=RSIZE(CPLIST)
@IF N>0 THEN
@ONERR NEXT
COMP @CPLIST(1)
@ELSE

Copyright © 1992 - 2016 NAPA. All rights reserved. 1655 / 7399


NAPA for Design Manuals 2016.3

@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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1656 / 7399


NAPA for Design Manuals 2016.3

@LABEL END
!VAR STD @@ Reset variables and tilde

Output example.

Compartment ident: R10


Compartment descr: Front peak tank
Contents : DAY TANK (DT, RHO = 0.8)
Extreme points of comp: Aft end at frame 139.9
Fore end at frame 152.6
Lowest point 0.00 m above BL
Highest point 7.20 m above BL
---------------------------------------------------------
H VNET CGX CGY CGZ AWP CGXA CGYA
M M3 M M M M2 M M
---------------------------------------------------------
0.00 0.0 95.52 0.00 0.00 2.6 95.61 0.00
0.50 5.3 97.12 0.00 0.31 17.5 97.47 0.00
1.00 16.8 97.59 0.00 0.62 26.8 97.75 0.00
1.50 31.7 97.78 0.00 0.92 31.9 97.86 0.00
2.00 48.8 97.87 0.00 1.20 34.7 97.92 0.00
2.50 67.1 97.94 0.00 1.48 35.8 97.96 0.00
3.00 84.7 97.96 0.00 1.75 33.7 97.67 0.00
3.50 99.8 97.85 0.00 2.00 29.6 97.34 0.00
4.00 112.6 97.75 0.00 2.20 23.1 96.87 0.00
4.50 122.8 97.62 0.00 2.36 18.5 96.34 0.00
5.00 132.5 97.53 0.00 2.53 20.6 96.37 0.00
5.50 144.0 97.44 0.00 2.76 27.1 96.54 0.00
6.00 159.7 97.42 0.00 3.07 34.8 96.71 0.00
6.50 180.0 97.38 0.00 3.43 43.1 96.86 0.00
7.00 203.8 97.34 0.00 3.82 51.3 96.96 0.00
7.20 214.8 97.33 0.00 3.94 0.0 96.96 0.00
---------------------------------------------------------

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.

@@ Basic plotting, use 'PLOT .STD ?' for help


@ECHO OFF
!VAR @
!VAR TILDE ~
@I=1
@IR=LOCS(LISTPAR,'?')
@IF IR>0 @GOTO HELP
@ONERR END
@VT=VTYP('CPLIST')

Copyright © 1992 - 2016 NAPA. All rights reserved. 1657 / 7399


NAPA for Design Manuals 2016.3

@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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1658 / 7399


NAPA for Design Manuals 2016.3

@LABEL END
!VAR STD

Output example:

Tank diagram
The example was made with the following plot quantities (PQ) and plot options (POO):

PQ CP, H, VOLM, CGX, TMY, (CGZ)


POO CP, BOX, VA, LGTEXT=S, LEGEND, LGTYPE=IL, LGH=*1.1,
NET=P2021, SMOOTH,
ARG: AXIS=LB,
F1: AXIS=LB, PEN=A1,
F2: AXIS=UA, PEN=A2, SCALE=(F1),
F3: AXIS=UL, PEN=A3, SCALE=(F1),
F4: AXIS=LA, PEN=A4, SCALE=(F1),
CGX: SCALE=OFF, RMARG=1,
ARG: NOM=CGZ, NAXIS=UA

This set of options is designed to produce a reasonable plot with up to four freely selected quantities in the PQ.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1659 / 7399


NAPA for Design Manuals 2016.3

Commands and service functions (CP)


Table of Contents:

1. Main task
1.1. Subtask PAR
2. Service functions

1. Main task

ADD additional argument values

This command adds depth arguments to those obtained from the main argument
(STEP,H,GAUGE or GSTEP, not VOL or VSTEP).

ADD value, value, ...

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

Cancels previous ADD commands.

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.

ARGS list arguments

This command lists the current calculation arguments in the form used for input. A short
explanation is added as comment.

ARR select arrangement

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

id: name of arrangement

CNV convert old device definitions (obsolete)

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1660 / 7399


NAPA for Design Manuals 2016.3

CNV OLD

COMP select compartment

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

name: name of compartment

DMODE control listing of dummy values

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):

V: replace redundant volumes (and areas) with space or minus

G: replace undefined centers of gravities with space or minus

S: use space (instead of minus) for dummy values

EXAMPLE
DMODE VGS

DR -> enter drawing task

The standard drawing task is entered. Return to CP is done with command CP or OK.

EDIT -> enter editor

END finish the task

FIG add figure to the list

See !EXPL FIG/GEN

FILL depth argument as filling

The calculation depths are expressed as filling i.e. fraction of total volume. Effect of varying
steel reduction not taken into account.

FILL values

FSTEP depth argument as filling. equal spacing

As FILL, but the values are selected as a multiple of the given step.

FSTEP step

GAUGE sounding device readings (argument)

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

values: sounding values in the standard form

Copyright © 1992 - 2016 NAPA. All rights reserved. 1661 / 7399


NAPA for Design Manuals 2016.3

GET get compartment

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).

GSTEP step for sounding device argument

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.

GSTEP step trimrange

step: value of step

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

values: set of values in the standard form

HEEL calculation heel

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

LF add line feeds

This command adds empty lines, either a specified number or until a specified position on the
page, see !EXPL LF/GEN.

LIST start listing

This command starts various listings.

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.

t-options: standard table output options, see !EXPL TOO/GEN

LIST REF/OBJ/EXP

List various background data, REF=referenc system, OBJ=current hull object,


EXP=explanations of quantities.

LIST ARG

List arguments

LIST .id

List according to standard macro. For alternatives, use LIST .CAT.

LQ select output quantities

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1662 / 7399


NAPA for Design Manuals 2016.3

A numeric qualifier (not zero) is taken into account in the following cases:

Centers of gravity: reference coordinate (default 0)


Volumes and weight: trim value, e.g. VOLM/1
SCORRT,VCORRT: trim
SCORRH,VCORRH: heeling
FSM: heeling

The following string qualifiers can be used:

Volumes and weight: trim and/or heel, using symbols T and H,


followed by a value, e.g.
VOLM/T1 VOLM/T1H5 VOLM/H1
GAUGE: R=reverse, convert sounding to ullage or
vice
versa. Only when argument=gauge or gstep
and
the current device is a tube.

With subject SM (i.e. LQ SM ...) the LQ command concerns the listing with SML.

NARG number of depth arguments

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

This command causes the result listing to continue on a new page.

PAR -> definition of sounding devices ao

In this subtask, various permanent definitions related to NCP are made, e.g. sounding devices
are defined in this task.

PLD draw diagram

This command draws a diagram showing the quantities selected with command PQ and using
the options set by command POO.

PLD POO plot-options

plot-options: (opt) standard plot options, see !EXP PLD/GEN. If this part is given, the keyword POO must be
added.

PLOT run plot macro

This command runs plot created as a macro,

PLOT .macro options

macro: name of macro (complete name PLOTCP.macro). .CAT gives catalog.

POO set plot output options

This command handles plot output options for diagrams drawn with command PLD. For the
syntax of the POO command, see !EXPL POO/GEN.

PQ select quantities for diagram

Copyright © 1992 - 2016 NAPA. All rights reserved. 1663 / 7399


NAPA for Design Manuals 2016.3

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.

RED set steel reduction

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

REFZ reference height for calculation heights

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 *

h: new ref. height

*: (opt) makes the height valid for subsequent comppartments also. This option is cancelled with
REFZ -.

RHO set density of contents

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

SCAN -> enter list scanner

For more details, see !EXPL SCAN/GEN. SCAN SEND just sends the current result list to the
printer. Note: the current result list closed.

SDEV select sounding device

This command selects the sounding device for the current compartment or a default for
subsequent compartments.

SDEV type/id *

type: type of device (MS,MU,RS,RU,LS or LU)

/id: (opt) additional identifier

*: (opt) this option makes the selection default for subsequent COMP selections. Without this
option, the effect concerns the current compartment only.

SELECT select compartments

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1664 / 7399


NAPA for Design Manuals 2016.3

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.

device-crit: criterion concerning sounding devices

SDEV=type: select with given type and empty id. 'type'=MS,RS, RS,RU,LR,LU or only M, R or
L.

SDEV=type/id: select with given type and id.

SDEV>type: select with given type and unspecified id.

SDEV<id: select with given id and unspecified type.

SML summary of compartments.

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.

SORT specify sorting

This command specifies sorting that affects the result of the SELECT command. For sorting
the output of SML, use TOO SM ...

SORT qnt -

qnt: quantity to be sorted, e.g. NAME, PURP, XMIN.

-: (opt) make the sorting is descending order

STEP calculation step

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

TABLE -> enter table calulation

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.

TOO set table output options

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

See !EXPL TRI.

TRIM 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.

TRRANGE trimrange for applying GSTEP

Copyright © 1992 - 2016 NAPA. All rights reserved. 1665 / 7399


NAPA for Design Manuals 2016.3

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 trmin trmax

trmin,trmax: lowest,highest trim in the range

TRRANGE OFF

Cancel the TRRANGE argument.

(The old syntax GSTEP trmin trmax is still available).

TYPE print line

This is the standard TYPE command for adding arbitrary text to the list, see !EXPL TYPE/GEN.

VOL depth argument via volume

This command selects the depth argument so that specified (net) volumes are obtained.

VOL volumes

volumes: set of volumes

VSTEP depth argument as volume step

This command selects the depth argument so that (net) volumes are obtained as multiples of
the given step.

VSTEP step

vstep: volume step

WLS waterline section mode on/off

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.

OFF: standard method, use the calculation sections.

1.1. Subtask PAR

CATALOG catalog of sounding devices

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.

DELETE deleting from the data base.

This command deletes a sounding device or a steel reduction definition.

DELETE DEV comp type/id

comp: identification of compartment

type/id: identifier of the sounding device as in command DEV

DELETE RED comp

Delete the steel reduction defined for the compartment.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1666 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
DELETE DEV T120 MS/NN

DES a description of definition data

DES DEV comp type

A definition list of sounding devices of the given compartment

comp: name of compartment

type: (opt) list only devices of the given type (MS...RU).

DES DEV array() type

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.

type: (opt) list only devices of the given type (MS...RU).

DES RED comp

Display the definition of the steel reduction for the given compartment.

DEVICE entering or updating of sounding devices

This command redefines or adds a sounding device for a given tank.

DEVICE comp id/name curve h

This form defines a manual sounding device, where the soundings are formed by lengths
measured along a tube.

comp: name of tank to which it belongs

id: type of device: MS=manual sounding or MU=manual ullage.

/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:

name: name of space curve

(x1,y1,z1),(x2,y2,z2)...: curve defined by points in space

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

DEVICE comp id/name (x,y,z) h

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.

/name: (opt) as above

(x,y,z): location of probe (point in space).

h: (opt) height correction, actual value-displayed value, default=0.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1667 / 7399


NAPA for Design Manuals 2016.3

EXAMPLE
DEV T102 RS (#BH1+2, 0, #TTOP+0.1) 0.1

DEVICE comp DS/name (x,y,z) h

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

(x,y,z): point from which the line is lowered

h: height of tank bottom (or place where the dip touches the bottom)

EDIT enter editor

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 DEV comp

comp: identification of compartment

END end of device definition

END

This record finishes the task and returns control to CP

OK end of device definition

OK

This record finishes the task and returns control to CP

REDUCTION define variable steel reduction

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.

RED name (z1,r1) (z2,r2), ...

Defines local reduction as function of height

name: name of compartment

z1,z2: heights from the baseline

r1,r2: corresponding LOCAL steel reduction, i.e. fraction of the area at the given height.

RED name I (f1,r1) (f1,r2), ...

Defines integrated reduction as function of filling degree.

name: name of compartment

f1,f2: filling degree (0...1)

r1,r2: corresponding steel reduction, as fraction of VOLUME

RED name TAB*table

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1668 / 7399


NAPA for Design Manuals 2016.3

ZREF bottom reference height of tank

ZREF t

t: height from baseline

2. Service functions

CP.DEVICES() sounding devices of compartment

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)

comp: name of compartment

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 contents of DEVLIST could be 'MS', 'MS/V1', 'RS'.

CP.GAUGE() convert draught to gauge reading

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)

comp: name of compartment

device: sounding device (MS, RS etc). For local definition, see CP.VOLG.

T: draught

trim: (opt) trim (m), default=0

heel: (opt) heel,degrees, default 0

dens: (opt) density (effective only if float correction table defined)

tempv: (opt) vapour temperature (effective only if tape correction table defined)

shrt: (opt) shrinkage factor

pres: (opt) pressure (effective only if pressure correction table defined)

pef: (opt) pressure expansion factor

EXAMPLE
CP.GAUGE('R10','MS',1.2)

CP.T() convert gauge reading to draught

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)

comp: name of compartment

Copyright © 1992 - 2016 NAPA. All rights reserved. 1669 / 7399


NAPA for Design Manuals 2016.3

device: sounding device (MS, RS etc). For local definition, see CP.VOLG.

gauge: gauge reading, m

trim: (opt) trim, m, default=0

heel: (opt) heel, degrees, default 0

dens: (opt) density (effective only if float correction table defined)

tempv: (opt) vapour temperature (effective only if tape correction table defined)

shrt: (opt) shrinkage factor

pres: (opt) pressure (effective only if pressure correction table defined)

pef: (opt) pressure expansion factor

EXAMPLE
CP.T('R10','MS',0.52)

CP.GVOL() convert volume to gauge reading

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)

Parameters can be omitted from the end.

comp: name of compartment

device: sounding device (MS, RS etc). For local definition, see CP.VOLG.

vol: net volume

trim: (opt) trim (m), default=0

heel: (opt) heel,degrees, default 0

red: (opt) steel reduction, default=no steel reduction

value: explicit value as a fraction (0...1), default=0

SM: the value defined in SM. 0 if not defined.

V: the value obtained from the varying steel reduction (as defined by RED in subtask PAR of
CP). Same as SM if not defined.

dens: (opt) density (effective only if float correction table defined)

tempv: (opt) vapour temperature (effective only if tape correction table defined)

shrt: (opt) shrinkage factor

pres: (opt) pressure (effective only if pressure correction table defined)

pef: (opt) pressure expansion factor

opt: options

I: trim, heel in internal units

S: silent, make no error messages for missing devices

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')

CP.VOLG() convert gauge reading to volume

Copyright © 1992 - 2016 NAPA. All rights reserved. 1670 / 7399


NAPA for Design Manuals 2016.3

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)

Parameters can be omitted from the end.

comp: name of compartment

device:

id: sounding device, given by its name (MS, RS etc)

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.

gauge: gauge reading, m

trim: (opt) trim, m, default=0

heel: (opt) heel, degrees, default 0

red: (opt) steel reduction, default=no steel reduction

value: explicit value as a fraction (0...1), default=0

SM: the value defined in SM. 0 if not defined.

V: the value obtained from the varying steel reduction (as defined by RED in subtask PAR of
CP). Same as SM if not defined.

dens: (opt) density (effective only if float correction table defined)

tempv: (opt) vapour temperature (effective only if tape correction table defined)

shrt: (opt) shrinkage factor

pres: (opt) pressure (effective only if pressure correction table defined)

pef: (opt) pressure expansion factor

opt: options

I: trim, heel in internal units

S: silent, make no error messages for missing devices

EXAMPLE
CP.VOLG('R10','MS',0.52)

Return the moulded volume when the reading of MS is 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.

CP.GEOM() device geometry

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.

comp: name of compartment

device: sounding device (MS, RS, MS/id etc)

obj=CP.GEOM(comp,device,name)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1671 / 7399


NAPA for Design Manuals 2016.3

A above, but return a curve or point object.

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)

CP.VARRED() get variable steel reduction

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)

comp: name of compartment

fill: (opt) filling degree, either as a fraction (value<=1) or volume (value>1). Default=1.

CP.COMMAND() run command of task CP

This function runs a command available in the tasl CP.

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)

As above, but the command identifier is given separately.

id: command identifier

parameters: string containing the parameters.

CP.COMMAND(id,arr)

As above, but the parameters are fed by an array.

CP.PARCOMMAND() run command of subtask PAR

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)

As above, but the command identifier is given separately.

id: command identifier

parameters: string containing the parameters.

CP.PARCOMMAND(id,arr)

As above, but the parameters are fed by an array.

CP.STATUS() set/get status of task CP

The functions tells whether the CP task is active or changes this state.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1672 / 7399


NAPA for Design Manuals 2016.3

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.

CP.DEVROOMS() get list of rooms with sounding device definition

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

CP.CHECKDEVICES() Check device definitions and get list of errors

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.

n=CP.CHECKDEVICES(devicelist, dseclist, tol)

devicelist: string array for receiving the device names with errors

dseclist: string array for receiving explanation on the error

tol: (opt) tolerance for checking that device is inside room. Default tolerance is 0.01 m.

CP.GAUGECORR() interpolate correction to the observed gauge value

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)

room: name of the room

device: device type

table: table type:

FLOAT: float correction, value is density of load

TAPE: thermal correction for tape, value is vapour temperature

HEEL: heeling correction, value is heeling angle (deg)

TRIM: trim correction, value is trim (m)

PRESSURE: pressure correction, value is pressure

SHRINK: shrinkage factor, value is load temperature

PEF: pressure expansion factor, value is pressure

Copyright © 1992 - 2016 NAPA. All rights reserved. 1673 / 7399


NAPA for Design Manuals 2016.3

value: value, as defined for the table type (above)

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)

U: apply unit from the quantity standard (output as real number)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1674 / 7399


NAPA for Design Manuals 2016.3

Frequently asked questions (CP)


This chapter contains examples, hints and tricks for commonly asked questions

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1675 / 7399


NAPA for Design Manuals 2016.3

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1676 / 7399


NAPA for Design Manuals 2016.3

Loading Conditions (LD)

Loading Conditions (LD)


The loading conditions subsystem (LD)
Basic concepts (LD)
Lightweight definitions (LD)
Defining loading conditions (LD)
Handling load components in tables (LD)
Auxiliary definitions (LD)
On calculation (LD)
Free surface handling (LD)
Listing functions (LD)
Drawing functions (LD)
Managing processes (LD)
Frequently Asked Questions (LD)
Commands, service functions and events (LD)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1677 / 7399


NAPA for Design Manuals 2016.3

The loading conditions subsystem (LD)

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:

1. Definitions done under LD


1.1. Loading conditions
1.2. Light weight
1.3. Tank pairs
1.4. Tank supports
1.5. Loading priorities
1.6. Limiting curves for longitudinal strength
1.7. Free surface rules
2. Analyses done under LD
3. Installation
4. Connections to other subsystems
4.1. Summary
4.2. Connection to table calculation
4.3. Connection to CR and DA
4.4. Connection to grain stability
4.5. Connection to container loading
4.6. Connection to weight calculation
4.7. Connection to the inclining test

1. Definitions done under LD

1.1. Loading conditions

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.

1.2. Light weight

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.

1.3. Tank pairs

A tank pair is formed by two tanks, the load of which can be connected so that an equal load is assigned automatically.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1678 / 7399


NAPA for Design Manuals 2016.3

1.4. Tank supports

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.

1.5. Loading priorities

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.

1.6. Limiting curves for longitudinal strength

The curves define the maximum allowed shear force, bending moment, torsion moment and combined stress as a function of x.

1.7. Free surface rules

The free surface rules control the way the effect of free surfaces is calculated.

2. Analyses done under LD


The following calculations are handled by the loading condition subsystem:

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:

lightweight definition (LGDEF)


definition of free surface rules (FSDEF)
general drawing task (DR)
table calculation (TAB)
ship model (arrangements) (SM)
load parameters (LPD)
geometry definitions (DEF)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1679 / 7399


NAPA for Design Manuals 2016.3

stability criteria (CR)


damage stability (DA)
container loading (CL)

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. Connections to other subsystems

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.

The LD subsystem is able to analyze longitudinal strength in damage cases of DA.

Inclining tests can be generated under LD.

4.2. Connection to table calculation

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1680 / 7399


NAPA for Design Manuals 2016.3

4.3. Connection to CR and DA

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.

4.4. Connection to grain stability

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:

listing of grain shift moments (quantity GRM in LIST PAR)


evaluation of the grain stability criterion (PLOT GCR)

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.

4.5. Connection to container loading

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.

Other services are available by entering container loading as subtask CL.

A more detailed description of the connections between loading conditions and container loading is found in the document CL.2.

4.6. Connection to weight calculation

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1681 / 7399


NAPA for Design Manuals 2016.3

4.7. Connection to the inclining test

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1682 / 7399


NAPA for Design Manuals 2016.3

Basic concepts (LD)


This chapter presents the meaning and role of the concepts occurring in the loading conditions, while details of their use are presented in the
subsequent chapters.

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1683 / 7399


NAPA for Design Manuals 2016.3

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

3.1. The substance (LOAD)

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:

Property Design load Actual load

Substance PURP LOAD

Description PDES LDES

Copyright © 1992 - 2016 NAPA. All rights reserved. 1684 / 7399


NAPA for Design Manuals 2016.3

Density RHO DENS

Capacity CAP LCAP

Type TYPE LTYPE

Class CLASS LCLAS

3.2. The location of the load

The following cases are possible as locations of loads:

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)

3.3. The amount of load

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.

3.4. Load types

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1685 / 7399


NAPA for Design Manuals 2016.3

3.5. Mass loads

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:

NAME symbol representing the location

PURP purpose, defined as MASS

DES descriptive text

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

MASS STORES/DECK1 30 (40 0 4)


MASS STORES/DECK2 45 (55 0 7)

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.

The TYPE of the mass load has in this case to be defined as L.

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.

4. Compartments open to sea and grounding


These features, normally treated under damage stability, can be studied directly under LD, as properties of the loading condition:

compartments open to sea


grounding

'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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1686 / 7399


NAPA for Design Manuals 2016.3

5. Interaction with the arrangement


The definition of a loading condition is usually associated with a given arrangement (as defined in SM). The arrangement provides the assumed
loads for the various compartments, and some other information. Thus, in the normal case, the loads are placed in the compartments of the
arrangement, the load being that defined as the purpose of the compartment. The arrangement further defines the set of compartments available
for loading a given substance and the set to be taken into account when applying the IMO free surface rule.

However, by providing the necessary information in the loading commands, one can make exceptions to this in the following respects:

Loading compartments not in the arrangement:


The reason for this can be that the arrangement is incompletely defined or one wants to load a portion that does not correspond to the
current subdivision, for instance, part of a car deck, when the car deck as a whole is included as one compartment in the arrangement.
Loading with another substance than that defined as the purpose. A typical case is a compartment that is designed for more than one
load.
A load component can be entirely independent of the arrangement, by giving the location by coordinates (so called mass loads).
Deck load (timber) that may provide reserve buoyancy cannot be included in the current arrangement.

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.

6. Combined loading conditions


An entire loading condition may be defined as part of another loading condition. This possibility is added in order to facilitate cases when one has
to analyse combinations of load groups, for instance, various pay loads on one hand and bunkers on the other.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1687 / 7399


NAPA for Design Manuals 2016.3

respect to which the transversal moments are calculated.

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.

Different lightweight definitions are also called 'lightweight versions'.

8. Auxiliary definitions

8.1. Handling of free surface moments

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.

8.2. Loading priority

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.

8.3. Tank pairs

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1688 / 7399


NAPA for Design Manuals 2016.3

8.4. Tank supports

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.

8.5. Permissible strength values

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.

8.6. Permissible draughts

The permissible draughts define the minimum and maximum draughts allowed at given points in the ship, which can be compared with the actual
draughts.

8.7. Shear force corrections

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.

9. Calculation and output functions


Normally the results are output from the current loading condition. A loading condition is made current with the NEW or GET command. The
command WHERE tells the name of the current loading condition.

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:

the loading condition (any loading command entered),


geometry of the calculation hull,
geometry of any loaded compartment,
room parameters of any loaded compartment,
calculation arguments.

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.

The calculation arguments affecting the results are:

ARR arrangement,
HULL calculation hull,
RHO seawater density,
HEEL calculation heeling angles,
MODE calculation mode,

Copyright © 1992 - 2016 NAPA. All rights reserved. 1689 / 7399


NAPA for Design Manuals 2016.3

FIX calculation method,


LIG lightweight version,
FRS rule(s) for calculation of free surface corrections,
WAVE wave,
SLACK slack limit,
YREF method to take into account asymmetric loading,
SUPPORTS tank supports (only strength results)
LIMITS limits for free surfaces and weight and buoyancy distributions.

Other arguments are

SYTOL allowed asymmetry when YREF=ON

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.

10. Operations on sets of loading conditions


Most of the work done in the loading condition subsystem concerns the loading condition selected to be current by command NEW or GET. The
following functions concern sets of loading conditions stored in the data base:

Catalogs: Command CAT LOAD produces a list of stored loading conditions.


Summaries: Command LIST LC lists selected data for stored loading conditions. LIST LC is controlled by LQ/TOO.
Update: When the geometry has been changed, calculated data stored in connection with the loading conditions can be updated by
command UPDATE.
Listing with command OUTPUT
Arbitrary operations, for instance listings. This is done by command !DO or loops in macro, after first selecting the loading conditions with
command SELECT LC.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1690 / 7399


NAPA for Design Manuals 2016.3

Lightweight definitions (LD)


Table of Contents:

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'.

2. Definition of a lightweight case


The following commands are all given in the LGDEF subtask of LD.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1691 / 7399


NAPA for Design Manuals 2016.3

RENAME name;

the current lightweight version is renamed and the command

WHERE;

shows the name of the version currently under definition.

3. Lightweight distribution
There are four commands available for the definition of the lightweight distribution:

WEIGHT total lightweight of the ship

CG center of gravity of the total lightweight

DIST define a method or curve according to which the lightweight is distributed

ELEM define a local lightweight element.

There are five ways to distribute the lightweight:

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.

3.1. Undefined distribution

The command pair

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.

3.2. Total distribution by a curve

The command sequence

WEIGHT w xa,xf;
CG x,y,z;
DIST LLOYDS, cb;

and

Copyright © 1992 - 2016 NAPA. All rights reserved. 1692 / 7399


NAPA for Design Manuals 2016.3

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

DIST DIM (x,w,y,z), (x,w,y,z),...;

defines also all coordinates (x, y and z) of the center of the lightweight (command CG is not accepted). The alternative

DIST DIM (x,w), (x,w),...;

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).

3.3. Total distribution by elements

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:

ELEM FROM ELE*name

The preparation of element tables is presented below.

3.4. Distribution by elements and a curve

The command sequence

Copyright © 1992 - 2016 NAPA. All rights reserved. 1693 / 7399


NAPA for Design Manuals 2016.3

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).

The command sequence

DIST DIM ...;


ELEM ...;
ELEM ...;
. . .

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).

3.5. Distribution from weight calculation

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.

3.6. Dimensioning undimensional distribution curves

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!

3.7. Lightweight elements handled by a table

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:

ID: identification of the weight element (key)


TEXT: descriptive text
W: weight
XCG: x-coordinate of the center of gravity
YCG: y-coordinate of the center of gravity
ZCG: z-coordinate of the center of gravity
XMIN: lower x-limit
XMAX: upper x-limit

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1694 / 7399


NAPA for Design Manuals 2016.3

element placed symmetrically with respect to XCG.

The elements can be picked directly from the table by adding a reference to it from the lightweight version:

ELE FROM ELE*table

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 PUT table save the lightweights in the given table

ETAB enter table calculation with a work area created for the purpose (prefix ELE*)

ETAB G as GET but from the work area ELE

ETAB P as PUT but to the work area 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.

4. Parameters for deflection


To obtain deflection of the hull, the program needs to know the moment of inertia of the cross sections of the ship and the modulus of elasticity of
the material. These are given by the commands

I (x1,i1) (x2,i2) ...;

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.

6. Factors for combined stress


Combined stress for a frame is calculated from the equation

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1695 / 7399


NAPA for Design Manuals 2016.3

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:

Give frames for the table by the command IFFR.


Give hatches (x) for the table by the command IFHA.
Generate the model table by the command GEN IFTAB. The model table has the right format but it is filled with zeros. The command
transfers control to the table calculation task (TAB) where you may start to fill the table. Remember to save the table.

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.

Add a descriptive text to the lightweight definition:

TEXT text

List a catalog of lightweight versions stored in the database:

CAT;

or

CAT LIG;

List stored data in the input format:

DES LIG List lightweight (WEIGHT, CG, E, I, DIST).

DES ELEM name, name,...


: List named lightweight elements. If given without names, all elements are listed.

DES DIST List the distr. curve defined by the user (if any).

List and edit stored data in input format (cf. DES):

EDI LIG name

EDI ELEM name, name,...

EDI DIST name

Remove components (lightweight elements) from the current lightweight version:

DEL ELEM name, name, ...

Remove lightweight versions from the database:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1696 / 7399


NAPA for Design Manuals 2016.3

UNSAVE LIG name, name, ...

8. Storing the lightweight version in the database


A new lightweight version is stored in the database by calling

SAVE;

and an existing one is (re)stored by the command

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.

9. Leaving lightweight definition


The subtask can be left by five commands:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1697 / 7399


NAPA for Design Manuals 2016.3

Defining loading conditions (LD)


This chapter presents the definition of loading cases. More details and examples are found in the command explanations.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1698 / 7399


NAPA for Design Manuals 2016.3

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:

LOAD options load-type amount location parameters

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.

3. Summary of LOAD command options


The following options are possible in a LOAD command, entered as the first item:

* 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.

P load the pair of the tank, if one is defined

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

! interpret a negative amount as an absolute value instead of an increment

3.1. Specifying the load type

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:

LOAD IP amount ...

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1699 / 7399


NAPA for Design Manuals 2016.3

defined/redefined without exiting from LD (command LPD).

In a single LOAD command, only loads of the same type can be defined/modified.

3.2. Specifying the amount of load

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 FW +10 add 10 tons of 'FW'

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:

LOAD CAO1 V=1000 ... load 1000 m3 of CAO1

LOAD V=*0.5 T100 load T100 to half the net volume

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.

3.3. Specifying the location

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 10 T10 Load 10 tons of the design load into T10

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1700 / 7399


NAPA for Design Manuals 2016.3

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

4. Changing the substance


By giving the load explicitly in the loading command, a compartment can be loaded independently of the load specified as purpose in SM. In later
loading commands, the new load will be treated as the purpose. This means that loading without specifying type is done with the new load, and
the compartment will be included in this category when loading tanks according to purpose. This principle can be reversed by specifying option IP
(initial purpose). When grouping tanks in an output list, the current load is used as basis for the grouping (unless other is stated in the TOO comma
nd).

Note carefully the distinction between the parameters describing the purpose and those describing the current load:

Property Design load Actual load

Substance PURP LOAD

Description PDES LDES

Density RHO DENS

Capacity CAP LCAP

Type TYPE LTYPE

Class CLASS LCLAS

5. Changing the density in the LOAD command


A differing density from that defined for the load type can be defined in the LOAD command, for example

LOAD HFO 30 T200 DENS=0.855

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1701 / 7399


NAPA for Design Manuals 2016.3

6. Loading tank pairs


Normally, the components of a tank pair are loaded with an equal amount. When two tanks are defined to form a pair (command PAIR), equal
loading is done automatically in the following cases:

when loading a set of tanks selected on the basis of purpose


when the components occur after each other in an explicit list of tanks
when option P is given, and at least one of the components is given in the loading command. A load given as an absolute amount is
distributed into the pairs so that the sum equals the given amount.

The tank pair logic is not applied when one of the tanks is directly specified as receiver.

7. Special loading commands (MOVE, CHA and BAL)


Changing load type or moving loads between tanks could in principle be done by LOAD commands, but can be done more conveniently by the
following commands.

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:

MOVE, amount, loc22,loc12 ..., ->, loc21, loc22, ...

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 10 T20 -> T30 move 10 tons from T20 to T30

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:

CHANGE,old-load, new-load, tanks

Example:

CHANGE HFO HFO2

The load of tanks loaded with HFO is changed to HFO2.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1702 / 7399


NAPA for Design Manuals 2016.3

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

BALANCE comp1 comp2, ...

Loads are moved between compartments with the same load only.

When giving the load only, the form is

BALANCE (load)...

for example, BALANCE (BW).

With options in the command, the function can be modified in the following respects:

setting another target trim than zero


changing the defaults for fixed or free amount of load
specifying bounds within which the total amount of load must be kept
controlling the relative effect of the different optimization targets (see below)

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:

keeping the total as small as possible


keeping the changes as small as possible

The relative influence of the different targets is controlled by weights which can be set in the command:

WT: weight for the trim aspect, default=1


WH: weight for the heel aspect, default=1
WM: weight for 'minimize total', default=1
WC: weight for 'minimize change', default 0

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1703 / 7399


NAPA for Design Manuals 2016.3

T40 0.0 -> 17.5 (30.3) HFO1 (HFO)

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:

MASS, type/f-loc, amount, location, extension, fsmom description

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.

With the L option, dimensions can be given in all directions:

MASS ... L=(lx,ly,lz)

The complete extension can be given by the SIZE option:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1704 / 7399


NAPA for Design Manuals 2016.3

MASS load amount (x,y,z) SIZE=(xmin,xmax,ymin,ymax,zmin,zmax)

'fsmom' is optional and defines a free surface moment in the form

MASS ... FSM=mom

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/TT1 50 (20, 0, 4) 5 'BW


tank 1'

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.

10. Deck loads


Deck load, e.g. timber cargo, can be loaded similarly to normal loads. The compartment presents the maximum deck load cannot be part of the
arrangement. The load type for deck load 'D' must be specified in the applied PAR*STD table.

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:

BFAC: buoyancy factor between 0 and 1


HB: upper limit for the buoyant part, measured from the base line

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 loading is done with the command:

LOAD DECK mass roomname BFAC=b HB=h

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1705 / 7399


NAPA for Design Manuals 2016.3

the original stabhull.

Similarly to container load the loaded part of the deck load is taken into account in the calculation of the lateral wind profile.

11. Dual loads


It is possible to load two load components into one room. The additional component is recorded with the name obtained by adding #2 to the name
of the compartment (e.g. R1234#2). The original component keeps its name, but in commands it can be referred to with the suffix #1. For
example:

NEW DUALLOAD
LOAD CARGO1 *0.3 ROOM1#1
LOAD CARGO2 *0.4 ROOM1#2
SAVE

Example of dual load


The load component with higher density is always the lower one. The loading must be done with the command syntax, the Loading Conditions
window can be used only for modifying the already existing dual loads.

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.

12. Defining deadweight constants


In addition to the bunker and cargo loads a loading condition typically also contains miscellaneous load components (deadweight constants). This
chapter explains how these are handled when designing the loading conditions.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1706 / 7399


NAPA for Design Manuals 2016.3

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:

The definition above as commands:

3. Add this condition to all real loading conditions (except light condition) by using LD GUI or ADD command:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1707 / 7399


NAPA for Design Manuals 2016.3

4. Example on listing the deadweight constants:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1708 / 7399


NAPA for Design Manuals 2016.3

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=Crew & Baggage

CB CREW AND BAGGAGE 2.0 0.0 60.00 0.00 12.00

CONTENTS=Passengers

DECK1 PASSENGERS, DECK 1 2.0 0.0 40.00 0.00 18.00


DECK2 PASSENGERS, DECK 2 3.0 0.0 40.00 0.00 21.00
------------------------------------------------------------------
SUBTOTAL 5.0 40.00 0.00 19.80

------------------------------------------------------------------
NAME DES MASS FILL XM YM ZM
t % m m m
------------------------------------------------------------------

CONTENTS=Stores

BOSUN BOSUN STORE 3.0 0.0 180.00 0.00 10.00


PROV PROVISIONS 2.0 0.0 30.00 0.00 14.00
------------------------------------------------------------------
SUBTOTAL 5.0 120.00 0.00 11.60
------------------------------------------------------------------
TOTAL 12.0 76.67 0.00 15.08

13. Adding result quantities to the results list


In the loading condition window, numerical results depending on the loading condition are displayed in a results list. This list can also be modified
manually.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1709 / 7399


NAPA for Design Manuals 2016.3

13.1. Existing quantities

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.

13.2. Quantities calculated in macros

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:

ID=quantity - the quantity to be shown at the beginning of the line in he list


DES=text - the descriptive text shown at the end of the line in the results list
UNIT=unit - the unit for the value displayed

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.

14. Container loading GUI


In the first steps to develop a GUI for the functions in the container loading task (CL), functionality has been added to handle container load
cases. The first version of the CL loading GUI should be considered as a beta version that can still have some limitations and compatibility
restrictions between cases defined with commands and cases defined with the new GUI.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1710 / 7399


NAPA for Design Manuals 2016.3

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.

14.1. Connection between a load case and a container load case

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.

14.2. Activating the CL GUI

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
.

Opening the container loading GUI

14.3. Layout of the CL GUI

Below is a typical view of the CL GUI window, where the different components of the window are numbered and described:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1711 / 7399


NAPA for Design Manuals 2016.3

The layout of the CL GUI


Icons either to define a new (empty) container load case OR to open an existing container load case and add it to the current loading
condition.
Field where the name of the active container load is shown. If a NEW case has been defined, this field will be empty until the case is
saved and given a name.
The name of the current container arrangement. The name of the arrangement is prompted when a new container load case is defined.
The container arrangement defines all possible positions where containers can be loaded.
With this icon the CL load case can be "disconnected" from the loading condition.
Selection of default containers to be loaded (STD/Short/Long).
Four icons controlling: Load all positions, Empty all positions, "mark" selected positions to be used for short containers and "mark"
selected positions to be used for long containers.
Output fields showing the mass and number of loaded containers.
Graphic area where the selected bay(s) is/are shown. This area is "dynamic" i.e. the view changes depending on the selected bay or the
selected bays.
This view shows the SETUP the user has selected in the uppermost toolbar.
In the table area each container is listed on its own line. The bay, row and tier number is shown in addition to the container type and
weight.
A subset of containers can be selected either as a function of bay/row/tier OR the type. NOTE that if a subset is active, only the
containers in the subset can be selected in the graphics view.
The container handling (graphics & table) is activated by selecting the "Containers" tab.

14.4. Selection of containers

Containers to be loaded are selected by:

Selecting an entire bay, row or tier in the lower graphic area


Selecting (or deselecting) many bays, rows or tiers by pressing the CTRL key and the corresponding bay, row or tier in the lower graphic
area
Selecting a single container (or many containers if CTRL is pressed) in the active bay shown in the upper graphic area.
Using the drag selection tool, containers in a limited area can be selected

Copyright © 1992 - 2016 NAPA. All rights reserved. 1712 / 7399


NAPA for Design Manuals 2016.3

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.

Use of the CTRL key when selecting containers

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.

14.5. Handling of short/long container positions

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".

Copyright © 1992 - 2016 NAPA. All rights reserved. 1713 / 7399


NAPA for Design Manuals 2016.3

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

14.7. Hint for handling containers with different properties

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).

Standard container type table


In this table the user can e.g. define containers with different default weights, different local center of gravities (e.g. column LCZG), different sizes,
etc. Each container type can have its own colour code (column FCODE) giving a good way to visualize the different types in the graphics.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1714 / 7399


NAPA for Design Manuals 2016.3

15. Grain loading GUI

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.

15.2. Loading grain

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.

16. Permissible draughts


The command

TLIM(x,tmin,tmax) (x,tmin,tmax), ...

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).

17. Shear force corrections


Shear force corrections are used for calculation of the corrected shear force curve according to different classification societies. The corrected
shear force is only an additional output quantity and it does not affect any other quantities. Shear force correction for the current loading condition
is defined at specific x-coordinates by

SFC FIX (x,ca,cf) (x,ca,cf), ...

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1715 / 7399


NAPA for Design Manuals 2016.3

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.

18. Auxiliary functions

18.1. Commands DES and EDIT

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:

DES, LOAD, sel opt

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.

The options 'opt' are:

E (expand) list components of added loading conditions

R (relative) list loads as relative value

The DES command also lists other definitions related to loading:

DES, PRIOR for priority lists

DES, PAIR for tank pairs

DES, FRS for the free surface rules

DES, LGR name for loading cond. groups

DES, OPE name for openings

DES, SUP for tank supports

DES, LCUR name,name,... f or limit curves of strength

DES, LCGR name,name,... f or limit curve groups

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.

18.2. LIST PAR

Copyright © 1992 - 2016 NAPA. All rights reserved. 1716 / 7399


NAPA for Design Manuals 2016.3

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.

18.3. Graphic feedback and graphic input

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.

18.4. Command WATCH

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:

FLOAT Displays the floating position and GM.

OFF Stop displaying the floating position

18.5. Events

Actions to done in response to load changes can also be triggered by macros tied to the following events:

LD*CHANGE: triggered every time a single load component is changed

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

Note the variables LDTR, LDHEEL are in internal units.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1717 / 7399


NAPA for Design Manuals 2016.3

The macro is tied to the LD*GCHANGE event by the following command:

!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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1718 / 7399


NAPA for Design Manuals 2016.3

Handling load components in tables (LD)


Table of Contents:

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.

1.2. Transfers between tables and the loading condition

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1719 / 7399


NAPA for Design Manuals 2016.3

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.

This can be modified by options as follows:

A: add missing, loaded tanks (when updating the table)


E: exclusive: assign zero to loads not belonging to the
set in question
R: as E, but mass loads are removed rather than assigned zero

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. Properties of the tables

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.

2.2. Compulsory columns

For defining a loading condition, the following information is the minimum for compartments:

NAME name of compartment (key)


LOAD: substance
MASS: amount of load

For mass loads the corresponding columns are:

LOAD: substance
MASS: amount of load
XM,YM,ZM: location

Copyright © 1992 - 2016 NAPA. All rights reserved. 1720 / 7399


NAPA for Design Manuals 2016.3

Optional quantities are DENS and TEMP.

The type of definition for the load component is recorded depending on what quantities are recorded as primary. If overdetermined, then MASS +
DENS.

The following quantities are transferred if specified:

DENS density, replacing that from PAR*


TEMP temperature

NOTE: if the loading condition is stored or updated according to the standard logic, some values may be changed.

2.3. Other columns

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.

3. Dependence between quantities


A central feature of table loading is that there are calculations that can be performed within the table, so that the original quantity by which a load
component is defined can be different from the quantity that in the end is transferred to LD. These calculations also make it possible to handle
loading related functions independently by the table.

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

A load component is defined by the following items:

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.

3.2. Quantities related to the density

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 alternatives for the reference density are

density, ton/m3 (RHO, 380)


specific gravity (SPG, 386)
API density (DAPI, 5389) (ObN)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1721 / 7399


NAPA for Design Manuals 2016.3

The actual density is given by or derived from

density, ton/m3 (DENS, 5380)


temperature, Celsius (TEMP, 382)
temperature, Fahrenheit (TEMPF, 385).

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.

3.3. Quantities related to the amount

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:

mass of load (MASS, 5340)


weight in air (WAIR, 5387, ObN), needs WCORRF
fraction of maximum mass (MREL, 5342)
volume of load (VLOAD, 5201)
fraction of the net volume (VREL, 5344)
gauge reading (GAUGE, 228) (0-4 columns for different devices)

The special questions related to gauge readings are presented below.

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.

3.4. Load properties used

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.

VOLM: for calculating VNET, from the geometry


RED: for calculating VNET, from SM or CP
VNET for calculating VLMAX, from VOLM, RED.
LCAP: for calculating VLMAX, from CAP in ARR* or PAR*
VLMAX, maximum volume, for applying VREL, for checking allowed amount, from VNET, LCAP.
WMAX, max load (mass): for applying MREL, for checking allowed amount, from VLMAX, DENS.

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.

3.5. Loading time and rate

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.

3.6. Derived load properties

The following derived quantities can also be declared with the LD formula, but updated only in connection with transfers to the loading condition:

XM...ZM: center of gravity


XMIN...ZMAX extensions
H: height of the load
TMY (?): actual free surface moment
FRULE: free surface rule
TMY: surface moment as obtained from the rule
GMCORR: gm-correction, requires total displacement

Copyright © 1992 - 2016 NAPA. All rights reserved. 1722 / 7399


NAPA for Design Manuals 2016.3

3.7. Checking the amount of load

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

3.8. Relation to other columns in the table

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'

The following definition prevents that WAIR is treated as input:

QNT LDDT 5387

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.

3.9. The dynamic dependence management

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1723 / 7399


NAPA for Design Manuals 2016.3

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:

COLUMN NAME KEY


COLUMN LOAD
COLUMN RHO LD
COLUMN MASS LD
COLUMN VLOAD LD
COLUMN VREL LD
DDEP MASS,VLOAD,VREL

If, for example, the relative volume, VREL is given, MASS and VLOAD will be calculated.

3.10. Special questions for gauge values

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:

QNT HEEL heel


QNT TRIMX trim

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,

Copyright © 1992 - 2016 NAPA. All rights reserved. 1724 / 7399


NAPA for Design Manuals 2016.3

TR will be taken into account.

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.

3.11. Special questions for free surface moments

The table can be used for controlling the free surface rule, expressed by the quantity FRS:

IMO, REAL, MAX, etc.

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.

3.12. Compartments open to sea

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.

3.13. Pressurised compartments (damaged)

Air pockets can be treated in the loading table by adding one or several of the following columns:

AIRPO - air pocket, pressure*volume (A)

AIRP - air pressure (P)

AIRV - air volume (V)

IAIRP - definition of dominating quantity

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.

Thus, the standard declaration in the table definition would be:

COLUMN AIRPO DUMMY


COLUMN AIRP DUMMY
COLUMN AIRV DUMMY
COLUMN IAIRP DUMMY
DDEP AIRPO AIRP AIRV IARPO

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.

3.14. Designing a table for mass loads

Copyright © 1992 - 2016 NAPA. All rights reserved. 1725 / 7399


NAPA for Design Manuals 2016.3

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:

NAME does not represent a compartment


XM,YM,ZM, XMIN,XMAX (alternatively LENX) are primary quantities, must be visible
some columns, e.g RED, CAP, ... are irrelevant, should not be visible.
the graphic feedback of mass loads is different

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.

4. Updating the table from the loading condition


The following quantities are transferred if there are receivers:

Records, grouped:

PURP purpose of the compartment, MASS

DES description

DAT date

CLASS class

RED steel reduction

XMIN minimum x (geometry or mass load

XMAX maximum x

YMIN minimum y

YMAX maximum y

ZMIN minimum z

ZMAX maximum z

VOLM volume moulded

VNET net volume

CGX x-coordinate center of gravity (

CGY cgy of volume

CGZ cgz of volume

Copyright © 1992 - 2016 NAPA. All rights reserved. 1726 / 7399


NAPA for Design Manuals 2016.3

CAP filling capacity

TYPE type

LOAD load, substance

TEMP temperature

MASS amount of load, mass

MREL amount of load, mass/wmax (alt.

VLOAD amount of load, volume

VREL amount of load, vload/vnet

XCG YCG and XCG can be used instead

LDES description of load

LTYP load type

LCLAS load class

DENS density (may be given or dep. on

LCAP capacity

WMAX total weight

VLMAX max. volume

HM height of load

XM cgx of mass (primary for mass lo

YM cgy of mass

ZM cgz of mass

IYM iy of surface

MOM moment

TMY transversal moment of inertia

FRULE rule of free surfaces (internal

FRS rule of free surfaces (string)

GMCORR gm-correction

LENX xmax-xmin

LENY ymax-ymin

LENZ zmax-zmin

LOCTN location of mass as a string (x,

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.

5. Updating the loading condition from the table


When updating the loading condition from the table, only those quantities normally available for definition of loads are transferred. When there are
alternatives, the definition of the resulting load is made according to what quantity was primary. For example, if VLOAD is primary, the load is
defined with V=vload. For mass loads, the definition status of the extreme coordinates is relevant.

Thus, for loads in compartments, the following properties can be transferred:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1727 / 7399


NAPA for Design Manuals 2016.3

MASS amount (alternatively MREL, VLOAD, VREL)


LOAD substance
DENS density
TEMP temperature
FRS free surface rule

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).

For mass loads, the following properties are transferred:

NAME formal location


DES description
LOAD substance
MASS amount
XM,YM,ZM location, XCG,YCG and ZCG can also be used
XMIN,XMAX extension in X, may also be derived from LENX
ZMIN,ZMAX similarly for z
YMIN,YMAX similarly for y

All combinations of defining the extension are not supported by the MASS command, and the result obeys one of the following forms:

MASS load amount (no extension)


MASS load amount l (length in x only)
MASS load amount xmin xmax (extension in x only)
MASS load amount L=(lx,ly,lz) (all lengths given)
MASS load amount SIZE=(x1,x2,y1,y2,z1,z2) (all ends given)

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.

6. Using the arrangement plan


An essential part of the user interface is the arrangement plan for graphic feedback and for doing selections.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1728 / 7399


NAPA for Design Manuals 2016.3

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.

7. Defining the automatic table connection


The transfers between the loading condition and the table can be made automatically by defining a set of transfer rules. As the minimum, each
rule designates the table concerned. In addition, the following aspects can be controlled:

direction: to/from the table or both. The default is both.


transfer options: usually recommended to add M or C if the transfer is restricted to mass loads or tanks.
selection criterion

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:

CTU id table options subset

id: identifier of the rule


table: name of table concerned
options: loads concerned and possible other options:
M mass loads
C compartments
A add if missing
E exclusively: set load=zero for loads not in the set
R as E, but delete if MASS load
F update heel/trim in the table
subset: (opt) limitation (mass loads)
selection criterion, e.g. CLASS=C

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)

The default is to do both operations.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1729 / 7399


NAPA for Design Manuals 2016.3

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.

CTU ON/OFF activates/deactivates transfers while keeping the definitions.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1730 / 7399


NAPA for Design Manuals 2016.3

Auxiliary definitions (LD)


Table of Contents:

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:

PAIR (t11,t12) (t21,t22), ...

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

PRI load t1 t2 t3 ...

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.

3. Permissible strength values


The permissible strength values define the extreme permitted limits for the quantities of longitudinal strength. The permissible strength values, or
strength limit curves, are shown in different output of longitudinal strength. The permissible strength values are defined in the following way.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1731 / 7399


NAPA for Design Manuals 2016.3

LCUR name text


BM (x, min, max), ...
OK

defines a limit curve for bending moment. Similarly, the sequences

LCUR name text


SF (x, min, max), ...
OK

LCUR name text


TM (x, min, max), ...
OK

LCUR name text


MSTOT (x, max), ...
OK

define limit curves for shear force, torsion moment and combined stress. Example:

LCUR BMHARB6, 'Permissible BM, harbour condition T=6m'


BM (#40, -4571, 4571), (#60, -8464, 8464), (#75, -9170, 9170),
(#90, -8803, 8803), (#100,-7213, 7213), (#110,-2148, 2903),
(#125, -913, 1396)
OK

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.

LCUR BMLIMITS, 'Permissible BM linked to a table'


BM BMLIMTABLE
OK

The minimum and maximum permissible values can be defined in separate tables:

LCUR BMLIMITS, 'Permissible BM linked to separate tables'


BM HOG BMHOGTABLE
BM SAG BMSAGTABLE
OK

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1732 / 7399


NAPA for Design Manuals 2016.3

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:

LCGR name text start definition limit curve group

BM t,cur t,cur, ... bending moments for different draughts

SF t,cur t,cur, ... shear force for different draughts

TM t,cur t,cur, ... torsion for different draughts

MST t,cur t,cur,... combined stress for different draughts

OK finish the definition

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:

LCGR SEA, 'Sea condition by GL'


BM 4, BMSEA4, 6, BMSEA6
SF SFSEA
TM 4, TM4, 6, TM6
OK

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:

CAT LCUR catalog of limit curves

CAT LCGR catalog of limit curve groups

DES LCUR name,name,...


list definition of limit curves

DES LCGR name,name,...


list definition of limit curve groups

EDI LCUR name,name,...


edit limit curves

EDI LCGR name,name,...


edit limit curve groups

UNS LCUR name,name,...


delete limit curves

UNS LCGR name,name,...


delete limit curve groups

Copyright © 1992 - 2016 NAPA. All rights reserved. 1733 / 7399


NAPA for Design Manuals 2016.3

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:

SUP tank (x1,x2,p), (x1,x2,p), ...

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'

SUP tank #1 (x1 w1) (x2 w2) .... (xn wn)


SUP tank #2 (x1 w1) (x2 w2) .... (xn wn)
...
SUP tank #n (x1 w1) (x2 w2) .... (xn wn)

For administration of supports, the following commands are installed:

DES SUP list definition of supports

EDI SUP edit supports

SUP tank DEL delete supports of the given tank

UNS SUP delete supports of all tanks

Example:

SUP CARGO1 (48.2 52.4) (72.3 76.5)


SUP GASTANK3 (65.5 70.0 28.0) (78.6 82.1 44.0) (90.6 94.1 28.0)

5. Shear Force Corrections According to CSR

5.1. Definitions

For bulk carriers automatic calculation and update of the shear force correction can be defined:

SFC CSR=table OPT=option

And similarly for a damage case:

SFC CSR=table DAM=damage OPT=option

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:

NAME: name of the cargo hold (key column)


DBT: list of double bottom ballast tanks below the cargo hold (separated by commas)
DBTCSR: list of virtual double bottom tanks (see figure below). The rooms must correspond the actual tanks that are listed in the column
DBT. The names are separated with commas. Note that these rooms must be defined manually before any calculations.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1734 / 7399


NAPA for Design Manuals 2016.3

The following auxiliary input data is calculated automatically, in the model table, based on the name of the cargo hold:

XMIN: location of the aft bulkhead for the hold


XMAX: location of the forward bulkhead of the hold
LH: length of the hold (measured between the middle of the transverse corrugated bulkheads depth)
BH: ship's breadth at the middle of the hold at the level of inner bottom of the hold
L0: length of the flat portion of the double bottom in way of the hold
B0: breadth of the flat portion of the double bottom in way of the 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:

DENS: correct the filling ratios with densities.


DIFFxx: if the difference between relative load volumes do not exceed the given limit (e.g. DIFF0.2)the bulkhead is considered as
homogenous
RATIOxx: if the ratio between the relative load volumes do not exceed the given limit (e.g. RATIO1.2) the bulkhead is considered as
homogenous. If both holds are empty the bulkhead is considered as homogenous and if only one hold is empty the bulkhead is
considered as non-homogenous.

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.

5.2. Damage Cases

Copyright © 1992 - 2016 NAPA. All rights reserved. 1735 / 7399


NAPA for Design Manuals 2016.3

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.

5.3. Output, LIST SFC

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 following qualifiers can be used:

Qualifiers for quantity MASS:


LOAD: mass of the load in the hold
FLW: mass of floodwater in the hold (for damage cases)
DBTCSR: effective mass in the double bottom tanks below the hold. It is also possible to list the effective mass in each double
bottom tank separately by adding the number of the tank to the qualifier: e.g. DBTCSR1 will list the mass of the tank that is first
in the DBTCSR column in the definition table.
without a qualifier the sum of all mass components is listed
Qualifiers FWD or AFT bulkhead of the hold are available for the following quantities:
SHEAR: uncorrected shear force
SFCORR: corrected shear force
SFC: shear force correction (with the sign)
SFMN, SFMX: limit curve values at the bulkhead locations

The results can be listed also for the pre-defined damage cases:

LIST SFC DAM=damage

Copyright © 1992 - 2016 NAPA. All rights reserved. 1736 / 7399


NAPA for Design Manuals 2016.3

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

1.1. Floating position

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:

MODE FIX fix trim, see below


MODE LFIX disregard longitudinal movement of liquids

1.2. The fixed trim method

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).

In the fixed trim method the program works as follows:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1737 / 7399


NAPA for Design Manuals 2016.3

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).

1.3. Stability curve

The righting arm GZ is calculated according to the equation

GZ = KN - (YCG * cos(phi) + ZCG * sin(phi)) - dGZ

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.

1.4. Free surface moments

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1738 / 7399


NAPA for Design Manuals 2016.3

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)

IY = v * b * gamma * sqrt(delta) * b / (12 * h)

Mfs = v * b * gamma * k * sqrt(delta)

where

v = the tank total capacity,


b = the tank maximum breadth,
gamma = the specific weight of liquid in the tank,
delta = the tank block coefficient v/blh,
h = the tank maximum height,
l = the tank maximum length,
k = non-dimensional coefficient depending on heeling,
sqrt = square root.

The equations are independent of the filling of the tanks.

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.

The constant moment is used in calculations in the following way:

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.

1.5. Longitudinal strength

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1739 / 7399


NAPA for Design Manuals 2016.3

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

SF(x) = INTEGRAL(B(x) - W(x))dx

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

The slope of the keel line at x, SL(x), is

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.

The torsion moment at x, TORS(x), is

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)

MSTOT(fr) = ABS(BM(fr)*ALF(fr)) + ABS(SUM(TMOM(x)*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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1740 / 7399


NAPA for Design Manuals 2016.3

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.

The arrangement is changed by the command

ARR arr

As an (in practice obsolete) option, a subset can be used:

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.

2.2. Calculation hull

The calculation hull is selected by entering

HULL hull

The default hull is STABHULL as defined in the reference system

2.3. Seawater density

The seawater density is changed by the command

RHO rho

where rho is in t/m3. Default value for seawater density is fetched from the reference system.

2.4. Heeling angles

Calculation heeling angles for stability curves are selected by the command

HEEL ang1, ang2, ...;

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1741 / 7399


NAPA for Design Manuals 2016.3

curve is calculated exactly for these angles.


If the range of input heeling angles starts from zero and neither FORCE SB nor FORCE PS is given, the program selects the sign of the
heeling angles depending on the GZ-value in the upright position: if GZ is greater than +1 mm, a negative sign is selected, otherwise the
sing is positive. Note that the asymmetry control command YREF has no effect on the selection.
If the range of input heeling angles starts from zero and FORCE SB or FORCE PS is given, the program selects the heeling angles from
the starboard (FORCE SB) or port (FORCE PS) side.

2.5. Calculation method

The calculation method free trim/fixed trim is selected as

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 fixed trim method, alt. command FIX ON


FIX

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)

MODE ISTR calculate longitudinal strength in an inclined floating position

To take steel reductions into account or not in the calculation of the real free surface moments is selected as

MODE SRED take steel reductions into account (default)

MODE NOSTRED do not take steel reductions into account.

2.6. Asymmetry control

The command YREF controls whether the asymmetric hull or loading is taken into account or not:

YREF ON do not take asymmetry into account (default mode),

YREF OFF take asymmetry into account.

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.

2.7. Calculation mode

The calculation mode accurate/approximate (=fast) is selected by the alternatives ACC and FAST of the command MODE:

MODE ACC select accurate mode (default),

Copyright © 1992 - 2016 NAPA. All rights reserved. 1742 / 7399


NAPA for Design Manuals 2016.3

MODE FAST select approximative (fast) mode.

Both modes imply free trim method.

2.8. Lightweight version

The lightweight version is selected by entering

LIG version;

The default version is A. For more information about lightweights see the chapter LIGHTWEIGHT DEFINITIONS.

2.9. Free surface rule

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;

references to an existing wave and the form

WAVE name H=height, TYPE=type, L=length, POS=pos, DIR=angle;

defines a named wave and stores it in the data base. Parameters:

name name of the wave (must be given)

H=height height of the wave (must be given)

TYPE=type shape of the wave SINUS or TROCHOID (optional, default SINUS),

L=length length of the wave (optional, default LREF),

POS=pos position of the wave hollow, alternatives


x : wave hollow at x;
SAG : wave crest at AP;
HOG : wave hollow at AP;
(optional, default wave hollow at x=0.0),

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1743 / 7399


NAPA for Design Manuals 2016.3

The form

WAVE OFF;

sets the still water mode on (default).

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.

2.12. Slack limit

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).

2.13. Permissible strength values

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.

2.14. Filling limits for free surface handling

The command

LIMITS, FRS, min, max

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1744 / 7399


NAPA for Design Manuals 2016.3

2.15. Limits for longitudinal strength

The command

LIMITS LSTR xmin, xmax

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.

2.16. Resetting arguments

The current argument values can be replaced by the system defaults by calling

RESET ARG;

The effect of the command LIMITS is reset by LIM OFF.

2.17. Management of arguments

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

ARG GET name get arguments. The source can be specified.


ARG SAVE name save arguments. SYSDB can be specified.
ARG UNSAVE name delete saved arguments
ARG CAT catalog of saved arguments
ARG NOTE assign/inquire descriptive text
ARG RESET set arguments to the current defaults
ARG FACTORY set arguments to built-in defaults
ARG INFO information about current standard arguments

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1745 / 7399


NAPA for Design Manuals 2016.3

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.

3. Storing results in the data base


To avoid unnecessary recalculation of results, the floating position of the ship and the corresponding hydrostatics, stability curves and longitudinal
strength results may be stored in the data base. Storing is done only if the user commands SAVE or REPLACE after calculations.

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. Additional calculation control


There are some miscellaneous commands related to calculating and updating the results.

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.

The command alternatives

FORCE; or FORCE ON;

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1746 / 7399


NAPA for Design Manuals 2016.3

4.2. Calculate

The results can be calculated without making output by the command CALCULATE. The command has the following alternatives:

CALCULATE Calculate the floating position.

CALCULATE STAB Calculate stability.

CALCULATE STR Calculate longitudinal strength.

The normal up-to-date control is applied also with this command.

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!

The format of the command alternative concerning stored results is

UPDATE ALL NS;

The option NS do not recalculate stability.

For other alternatives of UPDATE see !EXPL UPDATE.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1747 / 7399


NAPA for Design Manuals 2016.3

Free surface handling (LD)


Table of Contents:

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:

FRS 'subrule' 'subrule' 'subrule' ...

Copyright © 1992 - 2016 NAPA. All rights reserved. 1748 / 7399


NAPA for Design Manuals 2016.3

As the free surface moment also can be given as a user-defined polygon the other (not very often used) syntax is

FRS 'POLYGON name'

More is explained about the polygon in section Polygon definition.

The subgroups are defined in the same way, and the subgroup syntax is

FRS 'group/subgroup rule info'

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'.

In the following each parameter of the FRS command is described.

2.1. Parameter 'group'

The group parameter can be given in five different ways.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1749 / 7399


NAPA for Design Manuals 2016.3

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:

FRS 'BW REAL' 'ALL IMO'


FRS 'BW REAL' 'OTHERS IMO'

give exactly the same result.

FRS 'ALL 0' 'ALL REAL'

calculates with a free surface moment equal to zero for all tanks as the first rule defines MOM=0 for all tanks.

FRS 'ALL REAL' 'ALL 0'

calculates a real free surface moment 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.)

2.2. Parameter 'subgroup'

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.

The five subgroup alternatives are:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1750 / 7399


NAPA for Design Manuals 2016.3

2.3. Parameter 'rule'

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1751 / 7399


NAPA for Design Manuals 2016.3

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).

2.4. Parameter 'info'

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:

FRS 'ALL DGZREAL 10'

specifies that the GM reduction is calculated using the slope of the GZ curve at a heel of 10 degrees.

3. Free surface moment for mass loads


As mentioned before, a mass load can be given a free surface moment. This moment will be distributed according to sin(heel). This can (since
Release 2001) be given directly in the MASS command:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1752 / 7399


NAPA for Design Manuals 2016.3

MASS load amount ... FSM=moment

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

MASS BW/DTANK1 300 ...

The free surface rule is defined as version 5) for the group definition, and version 4) for the rule definition. E.g:

FRS '(DTANK1) 145' ...

4. Exceptions to free surface rules


It is possible to define explicit exceptions to the free surface rule (FRSV argument) as an option in the LOAD command. This can be done either
as an explicit rule FRS=rule or as an explicit moment FSM=mom.

LOAD BW V=*0.5 T1001 FRS=MAX

LOAD BW V=*0.5 T1002 FSM=100

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:

FRS EXCEPTIONS OFF

The quantity EXC in LQ FRS shows the exceptions in LIST FRS.

4.1. Handling of exceptions in FSDEF task

The exceptions can also be given in the FSDEF task with the following command:

EXCEPTION tank1=rule1, tank2=rule2,...

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):

Copyright © 1992 - 2016 NAPA. All rights reserved. 1753 / 7399


NAPA for Design Manuals 2016.3

EXCEPTION GEN

All exceptions are removed with:

EXCEPTION OFF

The created rule and the exceptions can be saved and used in another loading condition.

4.2. Exceptions in tables

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1754 / 7399


NAPA for Design Manuals 2016.3

7. Output and check


Mainly because of the way the IMO rules are interpreted, the free surface corrections could be difficult to understand. The reason for this is that
the default for IMO allows tanks that are not loaded to have a free surface moment. This could, for example, result in a situation where a
lightweight load case without any loads still has a free surface correction. The tanks that give this correction can though not be seen in the normal
list that is produced with the command LIST, as this list by default only contains the loaded tanks (see TOO PAR for LQ*PAR*STD in LD).

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:

LQ PAR NAME, LOAD, MASS, VREL(FILL), FRSM, GMCORR, FRULE

TOO HD=(UL, S, U, UL), GROUP=LOAD TOTALS, FIELD=*2,


SEL=(MASS>0 OR FRSM>0).

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.

FRS '*B IMO' 'OTHERS REAL'

Tanks with CLASS starting with the letter B (bunkers), others REAL. Default subgroup for IMO is MAX, and ALL for REAL.

FRS 'ALL IMO'

Rule IMO (subgroup=MAX) will be applied to all liquid load groups (same as FRS 'ALL/MAX IMO').

FRS 'ALL/ALL IMO'

Rule IMO will be applied to all liquid tanks.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1755 / 7399


NAPA for Design Manuals 2016.3

FRS '*C REAL' 'OTHERS IMO'

Rule REAL will be applied to all classes, whose name begins with the letter C (CARGO), other load groups with rule IMO.

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 IMO'

Free surface correction will not be calculated for load BW0, other liquid load groups with rule IMO.

FRS '(T10) 100' '(T20) 120' '(T30) 300'

Corrections given directly for given tanks. Moment curve=sinus.

FRS 'ALL 0'

Corrections for free surfaces will not be calculated at all.

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).

FRS '(HFO1 HFO2) R50' '*B IMO' 'OTHERS REAL'

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.

9. Free surface definition subtask


As mentioned above, the subtask FSD can be used to create free surface versions, i.e. what is given by the argument FRSV in LD. The difference
between using free surface rules directly with the FRS command and using a stored free surface version created under FSD is that the SLACK
limits and LIMITS for filling are also stored with the free surface version. This means that rather than specifying these arguments and limits
separately for each loading condition you can store one free surface version and refer to it in the FRSV argument.

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).

The description of a free surface version can be seen in LD with:

DES FRS version

For example:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1756 / 7399


NAPA for Design Manuals 2016.3

FRS STD

DES FRS

gives:

SLACK 0.99, 0.01 ;** from SLACK argument


LIMIT FRS, 0, 1 ;** built-in default
FRS '*B IMO','OTHERS REAL'

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.

The task is entered from LD with the command:

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.

The task is exited with:

OK

A definition in progress is cancelled with:

SKIP

Notes for a free surface version can be assigned, edited and deleted using the NOTES command of FSD.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1757 / 7399


NAPA for Design Manuals 2016.3

Listing functions (LD)


Table of Contents:

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.

ALTERNATIVE CONTENTS PARAMETERS/OPTIONS OTHER


CONTROL

LIST LC Selected items about loading conditions tab. options SELECT LC; LQ
LC

LIST PAR Selected quantities NH=no header SELECT;

LIST LOAD Loading components NH=no header SHIFTED

LIST FLOAT Floating position NH=no header

LIST FLP Floating position alt. II. Note! Draughts measured with heeling angle NH=no header
of 0.0 degrees!

LIST TOTAL Total of loads NH=no header

LIST ST Stability curve and related data G=add gen. data tab.options LQ ST

LIST STB Stability curve alternative layout K=add KN data

LIST STR Strength summary NH=no header DAM=case MAXREL


MAXREL=SEP TORS

LIST SD Strength related quantities as func. of x x-coordinates G=add gen.data tab.options LQ SD


DAM=case

LIST CRI Properties of the stability curve NH=no header

LIST ELE Lightweight elements tab. options LQ ELE

LIST OPE Data about openings tab. options LQ OPE

LIST CST Combined stresses tab. options LQ CST

LIST TLIM Draught limits tab. options LQ TLI

Copyright © 1992 - 2016 NAPA. All rights reserved. 1758 / 7399


NAPA for Design Manuals 2016.3

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 set of compartments for controlling LIS PAR.

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.

SUBJECT ALTERNATIVE USED IN

empty or PAR LIS PAR, list compartment parameters

LC LIS LC, list selected items about loading cond.

ST LIS ST, list stability curve

SD LIS SD, list strength values

ELE LIS ELE, list lightweight elements

OPE LIS OPE, list openings

CST LIST CST, list combined stresses

TLI LIST TLIM, list draught limits

Table output options

The command

TOO subject parameters

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.

4. The command ASG (assign)


In order to have a possibility to make an own output of the LD results, there is a command ASG (assign) that assigns loading condition dependent
values to a set of variables. These variables can then be used in further calculations, or used in a TYPE command to print out the results in a
desired way.

There are two options that can be given the ASG command :

ASG HYD for hydrostatic variables

ASG STR for strength variables

Copyright © 1992 - 2016 NAPA. All rights reserved. 1759 / 7399


NAPA for Design Manuals 2016.3

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.

The variables that can be assigned are:

VARIABLE EXPLANATION

LDDISP Displacement of ship (t)

LDLCB Longitudinal center of buoyancy from origin (m)

LDTCB Transversal center of buoyancy from CL (m)

LDVCB Vertical center of buoyancy from BL (m)

LDDWT Deadweight = LDDISP-LDLW (t)

LDMX Longitudinal center of gravity of ship from origin (m)

LDMY Transversal center of gravity of ship from CL (m)

LDMZ Vertical center of gravity of ship from BL (m)

LDLW Lightweight of ship (t)

LDLX I

LDLY I Centers of gravity of lightweight (Origin, CL. BL) (m)

LDLZ I

LDT Mean draught (at XREF, heel = 0,0 deg.) (m)

LDTR Trim (heel = 0,0 deg) (rad)

LDHEEL Heeling angle (rad) (if stability is calculated)

LDGMO Solid GM (m)

LDKMT Transversal KM (m)

LDDGM GM reduction, dGM = LDIY/LDDISP (m)

LDIY Free surface mom according to FRS rules (tm)

LDTRMOM Trimming moment (tm)

VARIABLE EXPLANATION

LDBEND Array of bending moments tm)

LDSHEAR Array of shear forces (t)

LDSARG Array of x-coordinates corresponding to LBEND & LDSHEAR

LDW Array of weight distribution

LDWARG Array of x-coordinates corresponding to LDW (m)

LDBD Array of buoyancy distribution (t/m)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1760 / 7399


NAPA for Design Manuals 2016.3

LDBARG Array of x-coordinates corresponding to LDBD (m)

LDLW Array of lightweight distribution (t/m)

LDLARG Array of x-coordinates corresponding to LDLW (m)

5. Auxiliary listing functions


The subsystem offers the following commands related to listing:

TYPE text; add text to the list,

FIG * ...; insert the latest drawing into the list,

FIG name,...; insert drawing 'name' into the list,

LF n; add empty lines to the list,

NP; new page,

NL; open new list,

SCAN L; send the last list to the printer,

SCAN S;

6. Tailoring list outputs


This chapter is intended to give a few hints of how user defined list layouts can be made.

The most central commands can be summarized as:

LIST with all possible options.


especially 'LIST PAR' and 'LIST LDD FMT' are useful. LIST FRS gives a specified list of the free surface moments. See the explanation
text !EXPL LIST for all possibilities.
qualifiers can be used with LQ LC in order to list mass or c.o.g. for different load components or rooms. Wild cards are supported and
e.g. MASS/HFO|DO lists the combined total mass of all heavy fuel oil and diesel oil in the loading conditions.
The command ASG
This command is explained in chapter 'The command ASG (assign)'.
FIG *
This command adds drawings to the list
The commands TYPE, NP, NL & LF
With the command TYPE own texts can be added to the list. E.g. the variables assigned with ASG ..., can be printed out with TYPE. See
!EXPL TYPE/GEN for more info. NP, NL and LF are used to control New Pages, New Lists and Line Feeds.
The command SELECT LC and !DO
Usually it is recommended to make a macro with all the output and list commands. In this way one can use the same macro for a
selected set of loading conditions. By using the command SELECT LC one can handle a group of selected cases instead of handling
them one by one. (See the command SELECT for all options)

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)

The !DO command can then be used in two ways, e.g.:

!DO 'GET %NAME;LIST;PLO STR;FIG *' NAME=LCLIST

or

Copyright © 1992 - 2016 NAPA. All rights reserved. 1761 / 7399


NAPA for Design Manuals 2016.3

!DO macroname NAME=LCLIST

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1762 / 7399


NAPA for Design Manuals 2016.3

Drawing functions (LD)


Table of Contents:

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.

2. Geometry oriented drawing


Geometry oriented drawing refers to drawings showing the geometry of the ship, contrary to diagrams showing various functions. These drawings
can be used as such as background to other data or for showing graphically the location of load components. The SETUP-DRW combination is
installed directly in the loading task, and any other geometry oriented drawing functions can be used by entering the general drawing subtask
(command DR).

2.1. Drawing the arrangement

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

SETUP 1...2 PROF

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1763 / 7399


NAPA for Design Manuals 2016.3

DRAW ARR*A

(assuming that the arrangement is called A).

2.2. Showing loads graphically

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

DRW OPT option

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:

Example of loads plotted with option H

Copyright © 1992 - 2016 NAPA. All rights reserved. 1764 / 7399


NAPA for Design Manuals 2016.3

Example of loads plotted with option TP


The actual floating position can be shown by a waterline in the profile view. The waterline is plotted by the command 'PLO WL'. This requires that
a SETUP has been given. For turning the setup, see above.

The following examples show the same load case in two ways:

Load case shown in SETUP 1...2 PROF


Commands:

SET 1...2 PROF


ID NAME
DRW ALL
DRW

Copyright © 1992 - 2016 NAPA. All rights reserved. 1765 / 7399


NAPA for Design Manuals 2016.3

Load case shown in SETUP DECK1 (X=13 X=28.4 X=46.2 X=53.2 X=99)

2.3. Drawing mass loads

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.

Showing mass loads graphically: DRW MASS X FILL=PURP I


Permanent options for plotting mass loads are set with

DRW MOPT options size colour

'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.

P colour according to the load, default=fixed colour

B plot the symbol with a boundary, default=fill only

L add the name of the load as text

Copyright © 1992 - 2016 NAPA. All rights reserved. 1766 / 7399


NAPA for Design Manuals 2016.3

2.4. Automatic plotting of changed loads

Changed loads can be automatically shown in the setup:

DRW AUTO concerns loads in compartments


DRW AM concerns mass loads

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

DRW LAY layer1 layer2

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:

option T works correctly


loads indirectly affected are also updated, .e.g the flood water in a compartment open to sea
change of position of mass loads is shown

NOTE: for manually updating the layers, use DRW UPD;. DRW; (or DRW LOAD;) always plots the old way.

3. Using multiple views


Multiple views can be used when one wants to handle drawings of various types simultaneously. Either drawings of different subjects
(arrangement drawings, plots related to the calculations) or belonging to different loading conditions. Consider for example:

!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

will make both views visible simultaneously.

4. Drawing diagrams with PLD

Copyright © 1992 - 2016 NAPA. All rights reserved. 1767 / 7399


NAPA for Design Manuals 2016.3

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

PQ ST ... ; POO ST ... ;


PQ SD ... ; POO SD ... ;

4.1. Plotting stability curves

PLD ST is a straightforward application of the PLD command. The following example shows a basic case:

PQ ST, HEEL, HPHI, EPHI


POO ST, NET, SMOOTH, ID,
HEEL: AXIS=Z,
HPHI: AXIS, PEN=A1, RMARG=*0.1,
EPHI: RANGE=HPHI, PEN=A2

Simple example of PLD ST


Of the possible functions HPHI (=gz) and EPHI (integral of gz) are selected, while HEEL is the argument. Option NET adds a grid, option
SMOOTH makes a smooth curve rather tan a polygon connecting the points and option ID marks the quantity symbol at the curve. Options given
before any specific quantities are either valid independently of the quantities or for all quantities. For quantity HEEL, the only option is to draw an
axis, located at the function zero (rather than lower limit). For quantity HPHI, the logical pen A1 is selected and the scaling is done so that a
margin of 10 % is added with respect to the actual range. For quantity EPHI, logical pen A2 is used and the scaling is set to be the same as for
HPHI.

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:

PQ ST, HEEL, HPHI, DGZ


POO ST, NET, SMOOTH, LEGEND, LGTYPE=IL,
BOX, BMAR=*(0.15,0.1,0.1,0.1),
HEEL: AXIS=Z,
HPHI: AXIS=Z, PEN=A1, RMARG=*0.1, LGTEXT='GZ',
DGZ: RANGE=HPHI, PEN=A3, LGTEXT='Fluid effect'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1768 / 7399


NAPA for Design Manuals 2016.3

Example of options PLD SD:

PQ SD, FR, BEND, SHEAR, WD, BD


POO SD, BOX, LGTEXT=S, LEGEND, LGTYPE=IL,
ARG: AXIS=Z,
WD: AXIS=LB, PEN=A1, RANGE=SYM, RMARG=*0.1,
BD: PEN=A2, RANGE=WD,
BEND: AXIS=UA, PEN=A3, RANGE=SYM, RMARG=*0.3,
BMMX: RANGE=BEND, PEN=A3, LGTEXT=OFF, SYM,
SHEAR: AXIS=UL, PEN=A4, RANGE=SYM, RMARG=*0.3,
SHMX: RANGE=SHEAR, PEN=A4, LGTEXT=OFF, SYM

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1769 / 7399


NAPA for Design Manuals 2016.3

Output from PLD SD with options give above


The POO command can provide options for quantities not in use (decided by PQ). In the following, such quantities have been removed for clarity.

The following example shows bending moments, shear forces and their allowable values:

POO SD, BOX, NET, LEGEND, LGTYPE=IL, FONT=HW1,


ARG: AXIS=Z, RANGE=OFF,
BEND: AXIS=LB, PEN=A3, RANGE=SYM, RMARG=*0.3, LGTEXT='Bending moment'
BMMX: RANGE=BEND, PEN=A3, SYM, ID='Max', IDPOS=0.35,
SHEAR: AXIS=UA, PEN=A4, RANGE=SYM, RMARG=*0.3, LGTEXT='Shear force',
SHMX: RANGE=SHEAR, PEN=A4, SYM, ID='Max'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1770 / 7399


NAPA for Design Manuals 2016.3

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:

PQ SD, X, LWD, WD POO SD, BOX, NET, LGTEXT=S, LEGEND, LGTYPE=IL,


ARG: AXIS=Z, RANGE=OFF,
WD: PEN=P2002, AXIS=UA, LWD: PEN=P1001, AXIS=LB,
LWD: PEN=P1001, AXIS=LB, RANGE=WD

Diagram over the weight distribution


The following example is borrowed from the presentation of PLD and shows how the curves can be coordinated with ship geometry:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1771 / 7399


NAPA for Design Manuals 2016.3

SET PROF C
DRW ALL
NEW T
PQ SD FR BEND SHEAR
PLD SD POO SIZE=(-3 87 -20 20) FR: RANGE=(-3 87)

Example of combining a diagram with geometry

5. Diagrams with command PLOT


The PLOT command provides additional plot functions, of which PLOT STAB and PLOT STR are considered obsolete and replaced by PLD.

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.

Option FRAME adds a rectangle around the diagram (implying NF).

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.

5.3. PLOT STAB

PLOT STAB produces the gz-curve and optionally ephi curve for the current load case.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1772 / 7399


NAPA for Design Manuals 2016.3

PLOT STAB (no options)

PLOT STAB HPHI FRAME SHF=0.2

5.4. PLOT STR

PLOT STR draws functions related to the longitudinal strength. The functions available are:

WG weight distribution

BUOY buoyancy distribution

SHEAR shear force

Copyright © 1992 - 2016 NAPA. All rights reserved. 1773 / 7399


NAPA for Design Manuals 2016.3

MOM bending moment

MS mome nt and shear force

SHMX maximum allowed shear force

BMAX maximum allowed bending moment

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.

The option DAM=case plots strength curves of the damaged ship.

Examples:

PLOT STR (no options)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1774 / 7399


NAPA for Design Manuals 2016.3

PLOT STR WG BUOY NET=2 NF SIZE=(0.2 0.1)

PLOT STR MS NF SIZE=(0.2 0.1)

5.5. PLOT LIMIT

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.

Format of the command

Copyright © 1992 - 2016 NAPA. All rights reserved. 1775 / 7399


NAPA for Design Manuals 2016.3

PLOT LIM opt;

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 LIM (two loading conditions selected)

5.6. PLOT GCR, grain criterion

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.

5.8. Plotting the ship in the actual floating position

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

SETUP TRIM=trim HEEL=heel

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1776 / 7399


NAPA for Design Manuals 2016.3

!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):

Example of setup turned according to the trim


The solution above is the general method. The following function was added with test status in release 96.1, It plots a plan of the ship, where the
ship is shown in the calculated floating position.

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 PROF L POO BOX

Result of PLOT FLPOS X=30 L POO BOX (load unsymmetry exaggerated for demonstration)

6. Adding drawings to lists


Provided that suitable output devices are available (presently only CANON laser printer or device run with Postscript), graphic output can be
included in result listings. The drawings to be included must either be stored in the data base or immediately before inclusion stored in the
intermediate output file IOF (!GR F; or !GR +F must be given).

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1777 / 7399


NAPA for Design Manuals 2016.3

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

FIG * SIZE 0.10 0.05

Copyright © 1992 - 2016 NAPA. All rights reserved. 1778 / 7399


NAPA for Design Manuals 2016.3

Managing processes (LD)


A process refers to something that happens as a function of time. For the handling of processes the following tools are provided

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:

1. The process table


2. Treating the time
3. Controlling quantities
3.1. Columns related to quantities
3.2. Target of quantity changes
3.3. Quantity change events
3.4. Default quantity
3.5. Connected change
3.6. Time definition dependent on quantities
3.7. The C and T events
3.8. Effect of maximum values
3.9. Various examples
4. Order between the lines
5. Output of functions related to quantities
6. Alternative scenarios
6.1. Managing alternative scenarios
6.2. Graphic representations of alternative scenarios
7. Using a process table for controlling loading conditions
7.1. Initial values
7.2. Properties controlled by the process table
7.2.1. Loads in compartments
7.2.2. Mass loads
7.2.3. Damage related properties of a compartment
7.2.4. Breaches
7.2.5. Grounding
7.2.6. Arguments
7.2.7. Special events
7.3. Grouping of events
7.4. Generating a loading condition
7.5. Loading condition properties as function of time
7.6. State dependent on the history
8. Short summary
8.1. Columns
8.2. Event types
8.3. Time definition
8.4. Functions

1. The process table


A process is managed by a table where each line represents an event.

The central concepts and the corresponding columns are

ID identifier of the event

EVTYPE event type, defines the meaning of the event

TIMDEF syntax defining the time

DAT the actual time in seconds

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1779 / 7399


NAPA for Design Manuals 2016.3

2. Treating the time


The time associated with an event is recorded in the column DAT as seconds from a specified reference time. The reference time is defined by

QNT RTIME time

If not given, the default is zero.

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 following example shows the basic time definitions:

ID TIMDEF DAT TIME


----------------------------------
E0 0S 0 10:00
E1 1.5H 5400 11:30
E2 12:00 7200 12:00
E3 E2 7200 12:00
E4 E3+10M 7800 12:10

QNT RTIME 36000

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.

3.1. Columns related to quantities

The value of the quantity controlled must be available in a column in the table. The values may be recorded in the generic columns

FV: real valued function


VALUE: string valued function

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1780 / 7399


NAPA for Design Manuals 2016.3

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.

3.2. Target of quantity changes

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.

3.3. Quantity change events

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.

For real valued quantities, the alternatives for 't' are

V assign a new value, no implication for the rate

E assign a new, constant value

R assign a new rate

B break: finish the effect of the preceding change

The following examples show the basic cases:

Quantity controlled by V events

ID EVTYPE TIMDEF VLOAD RATE


---------------------------------------------
V1 E.VLOAD 12:00 10.0 40.0
V2 E.VLOAD 13:00 50.0 20.0
V3 E.VLOAD 14:00 70.0 -10.0
V4 E.VLOAD 15:00 60.0 0.0

Copyright © 1992 - 2016 NAPA. All rights reserved. 1781 / 7399


NAPA for Design Manuals 2016.3

In the example above, the rate shown is calculated.

Quantity controlled by E events

ID EVTYPE TIMDEF VLOAD RATE


---------------------------------------------
V1 E.VLOAD 12:00 10.0 0.0
V2 E.VLOAD 13:00 50.0 0.0
V3 E.VLOAD 14:00 70.0 0.0
V4 E.VLOAD 15:00 60.0 0.0

Quantity controlled by R events

ID EVTYPE TIMDEF VLOAD RATE


---------------------------------------------
V0 V.VLOAD 12:00 10.0 0.0
V1 R.VLOAD 12:00 10.0 40.0
V2 R.VLOAD 13:00 50.0 20.0
V3 R.VLOAD 14:00 70.0 -10.0
V4 B.VLOAD 15:00 60.0 0.0

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:

EVENT Value of quantity Change rate


V taken as given calculated
E taken as given assigned 0
R calculated taken as given
B calculated calculated

3.4. Default quantity

Copyright © 1992 - 2016 NAPA. All rights reserved. 1782 / 7399


NAPA for Design Manuals 2016.3

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.:

QNT QNT VLOAD

3.5. Connected change

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:

Example of connected events

ID EVTYPE NAME TIMDEF VLOAD RATE


---------------------------------------------------
R10 V R1 12:00 50.0 0.0
R11 R R1 R10 50.0 -15.0
R12 B R1 14:30 12.5 0.0
R20 V R2 R10 0.0 0.0
R21 P R2 R11 0.0 15.0
R22 B R2 R12 37.5 0.0

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.

3.6. Time definition dependent on quantities

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:

value! the given value is reached


value+ a given increase is reached
value- a given decrease is reached
value% the given fraction of the maximum value is reached

In the following example, the tank is first filled to 50% and after a 0.5 h pause, to 100 %.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1783 / 7399


NAPA for Design Manuals 2016.3

Change times controlled by the function value

ID EVTYPE NAME TIMDEF VLOAD RATE VLMAX


--------------------------------------------------------
R20 V R2 12:00 0.0 0.0 35.0
R21 R R2 R20 0.0 15.0 35.0
R22 B R2 50% 17.5 0.0 35.0
R23 R R2 R22+0.5 17.5 15.0 35.0
R24 B R2 100% 35.0 0.0 35.0

Note carefully that this is possible only when the rate is fixed (preceding event R).

3.7. The C and T events

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.

The following example uses these events to trigger others:

Using T and C events for triggering other events

Copyright © 1992 - 2016 NAPA. All rights reserved. 1784 / 7399


NAPA for Design Manuals 2016.3

ID EVTYPE NAME TIMDEF VLOAD RATE TIME


--------------------------------------------------------
R10 V R1 12:00 0.0 0.0 12:00
R11 R R1 R10 0.0 15.0 12:00
R111 C R1 R10+0.5 7.5 15.0 12:30
R112 T R1 T 20.0 15.0 13:20
R12 B R1 100% 35.0 0.0 14:20
R21 V R2 R111 5.0 0.0 12:30
R31 V R3 R112 10.0 0.0 13:20

3.8. Effect of maximum values

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

Effect of maximum volume

ID EVTYPE NAME TIMDEF VLOAD RATE VLMAX


--------------------------------------------------------
R10 V R1 12:00 50.0 0.0 100.0
R11 R R1 R10 50.0 -15.0 100.0
R12 B R1 0! 15.0 0.0 100.0
R20 V R2 R10 0.0 0.0 35.0
R21 P R2 R11 0.0 15.0 35.0
R22 B R2 R12 35.0 0.0 35.0

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.

3.9. Various examples

Copyright © 1992 - 2016 NAPA. All rights reserved. 1785 / 7399


NAPA for Design Manuals 2016.3

Various quantity definitions

ID EVTYPE NAME TIMDEF VLOAD RATE


---------------------------------------------------
B1 R CASE3 12:00 0.0 10.00
B2 B CASE3 14:00 20.0 -3.00
B3 V CASE3 15:00 17.0 0.00
P0 V CASE4 12:00 30.0 0.00
P1 P CASE4 B1 30.0 -10.00
P2 P CASE4 B2 10.0 3.00
P3 P CASE4 V4 13.0 -9.00
P4 B CASE4 V6 4.0 0.00
R1 V CASE2 12:00 40.0 0.00
R2 R CASE2 13:00 40.0 20.00
R3 C CASE2 14:00 60.0 20.00
R4 R CASE2 14:15 65.0 -30.00
R5 B CASE2 45! 45.0 0.00
V1 V CASE1 12:00 95.0 -5.00
V2 V CASE1 13:00 90.0 -20.00
V3 E CASE1 14:00 70.0 0.00
V4 V CASE1 15:00 75.0 9.00
V5 T CASE1 T 80.0 9.00
V6 V CASE1 16:00 84.0 0.00

4. Order between the lines


It is necessary that lines defining changes of the same quantity follow in the correct order, otherwise the basic functions for handling the process
table are not dependent on the lines being ordered.

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.

5. Output of functions related to quantities


Quantities controlled by the table are available as functions of time. Before the first event, the value is zero and after the last event, value is either

Copyright © 1992 - 2016 NAPA. All rights reserved. 1786 / 7399


NAPA for Design Manuals 2016.3

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.

6.1. Managing alternative scenarios

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1787 / 7399


NAPA for Design Manuals 2016.3

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.

See below for a graphic representation of alternative scenarios.

The function AD.PTABLEITEMS includes selections related to the set of alternative scenarios:

B list of branching points

A alternatives at a branching points

N main events from one branching point until next

(For alternatives M, S, see above).

6.2. Graphic representations 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:

PREC: pointers connecting an item to its parent


FRACTION: a quantity in the range 0...1 for use as second coordinate in plot (time being the first one)

There is also the option to store the logical time as the quantity RTIME. The logical time increases with a fixed amount between events.

These quantities can be stored in the process table or in a separate description.

The following macro illustrates the use of this function:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1788 / 7399


NAPA for Design Manuals 2016.3

@@ plot graph of subprocesses, source table in the work area


@@ the table is supposed to contain columns PREC, FRACTION
@ad.subprocmap(0)
dr; size -10 110 -10 110
@trec=tp.column(0,'DAT')
@prec=tp.column(0,'PREC')
@idrec=tp.column(0,'ID')
@qrec=tp.column(0,'FRACTION')
@n=rsize(trec)
@t1=min(trec)
@t2=max(trec)
@qt=100/(t2-t1)
@for i=1,n
@t=(trec(i)-t1)*qt
@q=100*qrec(i)
text #2005 (@t @q) (@idrec(i)) th=*0.004
text '@idrec(i)' (@t @q) (00) th=*0.002
@p=prec(i)
@if p>0 then
@t0=(trec(p)-t1)*qt
@q0=qrec(p)*100
pol (@t0 @q0) (@t @q)
@endif
@next

Result of the macro


When using the PLD, the option POINTERS controls how to connect data points with lines and for this purpose, the quantity PREC is used:

PQ TAB DAT(UNIT=HH.MM) FRACTION (ID) (PREC)


The following example is used with these options:
POO TAB, BOX, FONT=S, NET,
F1: MARK=#2005*1.5, RMARG=*0.1, PLABEL=ID,
POINTERS=PREC,
TICK=(10,10),
ARG: RMARG=*0.1, TICK=(30,60), AXIS

Copyright © 1992 - 2016 NAPA. All rights reserved. 1789 / 7399


NAPA for Design Manuals 2016.3

Result of PLD

The following example is made with different options and using


option L (=logical time) in AD.SUBPROCMAP. Note the change
in the argument.
PQ TAB RTIME FRACTION (ID) (PREC)
The following example is used with these options:
POO TAB, BOX, FONT=S,
F1: MARK=#2005*1.5, RMARG=*0.1, PLABEL=ID,
POINTERS=PREC,
TAG=ID,
ARG: RMARG=*0.1

Result of the second PLD example


The option PLABEL has the effect that the markers are labeled so that GR.IDENTIFY returns the identifier of the event.

7. Using a process table for controlling loading conditions


A process table can define loading (or damage) events from which a loading condition can be generated by specifying the time. Together with the
initial loading condition the table represents a loading scenario.

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.

7.1. Initial values

Copyright © 1992 - 2016 NAPA. All rights reserved. 1790 / 7399


NAPA for Design Manuals 2016.3

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.

7.2. Properties controlled by the process table

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).

7.2.1. Loads in compartments

A load in the compartment given by NAME can be modified by the following quantities:

LOAD loaded substance

MASS amount of load expressed as mass

VLOAD amount of load expressed as volume

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).

7.2.2. Mass loads

For mass loads the formal location is given by NAME. The following properties can be controlled:

MASS: amount

LOAD: substance

XM: location, x-coordinate

YM: location, y-coordinate

ZM: location, y-coordinate

DES: complete description, allows introduction of new loads.

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.

7.2.3. Damage related properties of a compartment

The following quantities change damage related properties of the compartment given by NAME:

STATUS damage status (INTACT or OTS)

VLIM upper limit on inflown volume

AIRPO air pocket, defined by volume*pressure

AIRV air pocket, defined by fixed volume

AIRP air pocket, defined by fixed pressure

Copyright © 1992 - 2016 NAPA. All rights reserved. 1791 / 7399


NAPA for Design Manuals 2016.3

RPERM modification to permeability

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

The following quantities are treated as arguments:

RHO seawater density

DFL deflection

STLIM strength limit curves

WAVE wave

7.2.7. Special events

These events are treated in more detail in the respective contexts, here is a summary:

INIT defines the initial loading condition

NODE formal event heading a group of changes

CHECK formal event triggering a check by LD.UPDATPTABLE.

7.3. Grouping of events

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:

M return list of main events (nodes)

S return list of events subordinated to a node

See also handling of alternative scenarios.

7.4. Generating a loading condition

Generating the loading condition at a specified time from a process table is done with the function

LD.FROMPTABLE(table,time,opt)

The following options are available:

N do no updates, raise no events (as in LD.LOAD)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1792 / 7399


NAPA for Design Manuals 2016.3

U as N but do calculations

Z treat undefined values as zero/empty, default=ignore

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.

7.5. Loading condition properties as function of time

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 the maximum bending moment as a function of time.

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.

This table is then given to LD.PFUNCTION:

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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1793 / 7399


NAPA for Design Manuals 2016.3

Result with default arguments

Result when minimum time step specified

7.6. State dependent on the history

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:

T,TR,HEEL (floating position), GM (metcentric height), OFLV (outflown volume).

The most important one is HEEL which can be used later for giving the correct initial heeling angle for the balancing.

These values are recorded at NODE and CHECK events only.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1794 / 7399


NAPA for Design Manuals 2016.3

ID: identifier of event


EVTYPE: event type
TIMDEF: definition of the time
DAT: time in seconds, normally calculated
TIME: wall time

Columns related to quantities

NAME: additional argument for quantities


FV: generic column for real valued function
VALUE: generic column for string valued function
RAT: generic column for the change rate
MAXIMUM: generic column for the maximum value
qnt: column for the specific quantity

Columns related to multiple scenarios

LEVEL: controls division into alternative scenarios


INCL: control actually used branch
FRACTION: supports graphic display of alt. scenarios
PREC: pointer to preceding event

8.2. Event types

S.qnt: fixed value of a string quantity


V.qnt: fixed value of the quantity, rate calculated
E.qnt: fixed value of the quantity, rate=0
R.qnt: fixed value of the change rate, value calculated
B.qnt: finish change, value and rate calculated
P.qnt: connected change, get rate from referenced event
C.qnt: calculate quantity, function not affected
T.qnt: calculate time, function not affected

Special for LD:

INIT: name of initial loading condition


NODE: header for group of collected events
CHECK: formal event for triggering intermediate results

8.3. Time definition

General:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1795 / 7399


NAPA for Design Manuals 2016.3

nnn: time from reference time, default unit=hours


hh:mm: wall time
id: same time as given event
id+nnn: specified time from given event

For change of quantity when rate fixed:

value!: when quantity reaches given value


value+: when quantity increased by given value
value-: when quantity decreased by given value
value%: when quantity reaches specified relative value

'nnn' may be followed by H (hours), M (minutes) or S (seconds).

8.4. Functions

Update process table:

AD.UPDPROCESS(table,opt)

Extract quantity as function of time:

AD.PFUNCTION(table,qnt,name,arec,frec,irec,opt)
value=AD.PFUNCTION(table,qnt,name,time,opt)

List of functions in table:

AD.PFUNCTIONS(table,qnt,qrec,nrec,vrec,arg,opt)

Select subprocess from alternative scenarios:

AD.SUBPROCESS(table,item,opt)

Select subset of events based on grouping of subprocesses:

array=AD.PTABLEITEMS(table,set,id,opt)

Basis for graphic representation of alternative scenarios:

AD.SUBPROCMAP(table,rdescr,opt)
AD.SUBPROCMAP(table,opt)

Generate loading condition:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1796 / 7399


NAPA for Design Manuals 2016.3

LD.FROMPTABLE(table,time,opt)

Loading condition properties as function of time:

LD.PFUNCTION(ptable,arg,funct,qnt,astep,x,opt)
LD.PFUNCTION(ptable,rtable,astep,opt)

Updating quantities and derived events in the process table:

LD.UPDATEPTABLE(table,time,opt)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1797 / 7399


NAPA for Design Manuals 2016.3

Frequently Asked Questions (LD)


Table of Contents:

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():

!type Longitudinal center of buoyancy: @ld.qnt('LCB')


!type Longitudinal center of gravity: @ld.qnt('XCG')

produces for example:

Longitudinal center of buoyancy: 21.9932


Longitudinal center of gravity: 22

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1798 / 7399


NAPA for Design Manuals 2016.3

The points are on the same coordinate in the global coordinate system

2. Output: why relative strength values do not match hand calculation?


Relative strength values (like BMREL) are calculated at the same points, where the primary strength quantity (like BEND) was calculated. For
LIST SD and service function LD.SQNTX all results are obtained through linear interpolation at the requested x-coordinate.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1799 / 7399


NAPA for Design Manuals 2016.3

interpolation of relative strength quantities

Copyright © 1992 - 2016 NAPA. All rights reserved. 1800 / 7399


NAPA for Design Manuals 2016.3

Commands, service functions and events (LD)


Table of Contents:

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]

1. Administrative and general commands

ARRV select arrangement

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

arr: name of arrangement

CATALOG catalogs of stored data

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).

CATALOG LOAD options

List catalog of loading conditions saved.

options: selection criterion or other options according to the general catalog function, see !EXPL
CAT/GEN.

CATALOG, LIG options

List catalog of lightweight versions saved.

options: as above

CATALOG, LGR

List catalog of load groups.

CATALOG, OPE

List catalog of openings.

CATALOG +OPE options

This form uses the general catalog function, but gives no information about opening status.

CATALOG LCUR options

List catalog of limit curves of strength.

CATALOG, LCGR options

List catalog of limit curve groups of strength.

CATALOG STLIM options

List catalog of limit curves and limit curve groups, first curves then groups.

CATALOG, WAVE

List catalog of waves.

CATALOG SFCORR

List damages for which shear force correction is stored.

CATALOG ENV

Copyright © 1992 - 2016 NAPA. All rights reserved. 1801 / 7399


NAPA for Design Manuals 2016.3

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.

FSDEF -> enter free surface definition

This command enters the subtask handling definition of the free surface effect.

LCGR -> Define limit curve group for strength

The command defines a limit curve group which may be used as argument for permissible
strength values.

LCGR name 'descriptive text'

name: name of limit curve group.

'descriptive text': (optional) descriptive text for the group.

Example:

LCGR SEA 'Sea condition by GL'

LCUR -> Define limit curve for permissible strength values

The command defines a limit curve for permissible bending moment, shear force, torsion
moment or combined stress.

LCUR name 'descriptive text'

name: name of limit curve.

'descriptive text': (optional) descriptive text for the curve.

Example:

LCUR BMSEA.4 'Bending mom. in sea condition, T=4 m'

LGDEF -> enter lightweight definition

This command enters the subtask handling definition of the lightweight.

LGR define load groups

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.

LGR name 'descr' lc1, lc2, ...

name: name of the group.

'descr': (opt) explanatory text (with apostrophes!)

lc1,lc2: members of the group (names of loading conditions)

LGR name 'descr' arr()

As above but the name are fetched from the (string) array 'arr'.

LGR name 'descr' SELECT

Create a group from all loading conditions in the current version.

LGR name 'descr' SELECT crit

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1802 / 7399


NAPA for Design Manuals 2016.3

List definition of the given group.

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.

OPARR Opening arrangement

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

Activate the table OPE*name as an opening arrangement.

name: name of table without prefix OPE*.

OPARR OFF

Deactivate the opening arrangement (the openings defined by the task OPEN become
available).

Columns of the arrangement:

ID: identification of the opening

DES: description of the opening

WT: watertightness of opening. Type of opening regarding its severity in progressive flooding. The
alternatives:

UNPROTECTED must not submerged

WEATHERTIGHT partly watertight

WATERTIGHT totally watertight

UNNOPROGRESSIVE (in DA only) unprotected but in the stage PROGRESSIVE no new


compartment is flooded through it.

WEPROGRESSIVE (in DA only) weathertight but in the stage PROGRESSIVE new


compartment may be flooded through it.

WENOPROGRESSIVE: like WEATHERTIGHT but in the progressive stage, water is never


spreading through this opening.

UNSEAWATEROVERFLOW: Specific opening type for dredger calculations. The seawater


overflow is connecting the hopper with the sea.

REFX,REFY,REFZ: x-, y- and z-coordinate of the opening (check point of immersion).

FR: x-coordinate of opening as frame number

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)

- it leads from the sea to an intact compartment

- it leads from a damaged compartment to an intact compartment

- connection information is missing

The opening is irrelevant if

Copyright © 1992 - 2016 NAPA. All rights reserved. 1803 / 7399


NAPA for Design Manuals 2016.3

- it leads to a damaged compartment

- it connects two intact compartments

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).

PAIR define tank pairs

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.

PAIR, (loc,loc), (loc,loc)...;

(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;

Delete all tank pairs

PRIORITY define priority list

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

PRIORITY, load, comp, comp, ...;

load: type of load (HFO, DO, ...)

comp: compartment name

PRIORITY, load DELETE

This command deletes the definitions done for a given load.

load: as above

SUP Define tank supports

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.

SUP tank (x1,x2,p), (x1,x2,p), ...

tank: name of the tank.

x1,x2: limits of the support. Must be x2 > x1.

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%).

SUP tank #i (x1,p1), (x2,p2), ...

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1804 / 7399


NAPA for Design Manuals 2016.3

tank: name of the tank.

i: index of support curve (must be continuous numbering, starting from 1)

x location, must be given in ascending order

p: non-dimensional portion of the total weight on the support at the given x-coordinate.

SUP tank DEL

Delete the supports of the given tank.

UNSAVE delete the named definition data

UNSAVE, LOAD, id, id, ...;

Delete the given loading conditions from the data base.

id: loading condition to be deleted

UNSAVE, LIG, vers, vers, ...;

Delete the given lightweight versions from the data base.

vers: lightweight version to be deleted

UNSAVE, OPE name;

Delete the given opening from the data base.

name: name of the opening.

UNSAVE, LGR name;

Delete the given loading condition group from the data base.

name: name of the group.

UNSAVE LCUR name, name, ...;

Delete the given limit curves of strength.

name: name of the limit curve.

UNSAVE LCGR name, name, ...;

Delete the given limit curve groups of strength.

name: name of the limit curve group.

UNSAVE WAVE name, name, ...;

Delete the given wave definitions

name: name of the wave

UNSAVE SUPPORTS

Delete all tank supports.

UNSAVE ENV name, name, ...;

Delete the given envelope curves.

name: name of the envelope curve.

WHERE show current condition

The name of the current arrangement, loading condition and lightweight are displayed.

CRANE Define a crane

Copyright © 1992 - 2016 NAPA. All rights reserved. 1805 / 7399


NAPA for Design Manuals 2016.3

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.

CRA name BASE=(x,y,z), L=length

name: name of the crane

(x,y,z): crane base position

length: crane base length in x-direction

CRA crane DEL

Delete the crane definition.

2. Definition of loading conditions

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.

ADD add partial loading condition

This command adds given partial loading conditions.

ADD part1 part2 ...

part1...: name of partial loading conditions

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

This command removes the given 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.

AIRPOCKET define airpocket

This command defines an airpocket, i.e. a condition regarding the air trapped in a damaged
compartment.

AIRPOCKET name prop=value

name: name of compartment

prop=: (opt) defines the fixed quantity: P=pressure, V=volume, A=airpocket, volume*pressure,
default=A

value: value of the fixed quantity

Copyright © 1992 - 2016 NAPA. All rights reserved. 1806 / 7399


NAPA for Design Manuals 2016.3

BALANCE balance ship

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

loads: loads to change, any combination of the following:

t1,t2...: name of tanks

(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.

WH=w: (opt) similarly for the heeling angle

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)

Minimize trim and heel by changing ballast water (amount free).

BAL (HFO)

Minimize trim by re-allocating HFO (amount fixed).

BAL (HFO) FREE

Minimize trim and heel by re-allocating and/or changing the amount of HFO.

BAL T10 T20 T30 T40

Minimize trim by shifting the loads in the given tanks.

BAL (HFO,*FW) HFO>500

Balance with the aid of HFO and FW, the amount of which is allowed to change, but leaving at
least 500 tons of HFO.

BAL (BW) TRIM=-0.5

Copyright © 1992 - 2016 NAPA. All rights reserved. 1807 / 7399


NAPA for Design Manuals 2016.3

Change/move ballast water to obtain the given trim.

BREACH define breach

A breach is defined as part of the definition of the loading condition.

BREACH id definition

id: identifier that separates the breach from possible others

definition: definition using explicit points (not table)

BREACH id OFF

Delete the given breach.

BREACH OFF

Delete all breaches.

BREACH ... N

As above but do not update the loading condition. Can be done separately with UPDATE
command or LD.UPDATE.

CHANGE change load

Change the type of load (substance) while keeping the initial relative load fixed.

CHANGE old-load new-load tanks

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 load HFO to HFO1 in all tanks containing HFO.

CHANGE ALL IP

Change the load type in all tanks to be the one defined as purpose.

CHANGE HFO DO T10 T11

Change load HFO to DO in tanks T10, T11.

CLA container load administration

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

Make the given container load current.

CLA REP

Store the current container load in the data base.

CLA NEW name arrangement

Create a new container load and add it to the current loading condition.

name: name of load

arrangement: container arrangement to contain the load

Copyright © 1992 - 2016 NAPA. All rights reserved. 1808 / 7399


NAPA for Design Manuals 2016.3

CTU control table updates

This command sets rules for automatic update of tables when the loading condition has been
changed or vice versa.

CTU rule-id table options crit

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:

T: the rule concerns only transfer TO the table

F: the rule concerns only transfer FROM the table

table: name of table (with prefix)

options: options controlling the effect, one or several of

M: the rule is for mass loads only

C: the rule is for compartments only

A: add the component if missing

E: exclusive, remove lines in the table not corr. to loads

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.

CTU ruleid OFF

Cancel the given rule.

DELETE delete load component (also mass load)

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

As above, but selecting from several mass loads (see MASS).

DELETE selection

Delete set of MASS loads.

selection:

LOAD=load: all mass loads of given substance, e.g. LOAD=STORE

Copyright © 1992 - 2016 NAPA. All rights reserved. 1809 / 7399


NAPA for Design Manuals 2016.3

TYPE=type: all mass loads of given type, e.g. TYPE=L

CLASS=class: all mass loads of given class, e.g. CLASS=X

DELETE MASS !

Delete all mass loads

DELETE ALL !

Delete all mass loads and all load components not in the arrangements (deck loads etc.)

DESCRIPTION list definitions in input form

DESCRIPTION, LOAD, selection options

List the definition of the given loading condition.

LOAD (opt) optional keyword selecting this case

selelection: (opt) select loading condition or subset

name: loading condition to be listed, default=current

(load): restrict the listing to the given load, e.g. BW. Special case: MASS: loaded as mass load,
LOAD: loaded by LOAD.

options:

E: (expand) list components of added loading conditions

R: list all loads as relative values (current loading cond. only)

O: (original) display loads as tons or fraction as in the original definition (for loading conditions
made by rel. 93.2 and later)

RHO: add the RHO argument

ARG: add all arguments

TYPE: add type

SIZE: show the extension mass loads using SIZE (default=as originally defined.

DES, case

List definition of the following items:

PAIR: tank pairs. List definition of tank pairs.

FRS: current rules for handling of free liquid surfaces. Filling and slack limits are listed too.

SUP: tank supports

PRIOR: priority lists used for loading and listing purposes.

DES, LGR name

List definition of the load group.

DES, OPE name

List definition of the opening.

DES LCUR name, name, ...

List definition of the given limit curves of strength.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1810 / 7399


NAPA for Design Manuals 2016.3

DES LCGR name, name, ...

List definition of the given limit curve groups of strength.

name: name of a limit curve group.

DES WAVE name

List definition of the given wave.

DUMP save the loading condition as text file

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

file: file name of the result

opt: options

!: allow overwriting of existing file

L: output load components only (not arguments)

B: skip initial comments concerning the source

EDIT -> enter editor

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.

EMPTY make loading condition empty

The current loading condition is made empty preserving its current arguments.

EMPTY opt

opt: options

B: remove breaches also

O: include OTS and air pockets

GET fetch a loading condition from the data base

GET, name/vers/proj

name: name of the loading condition

vers: version (optional) NOTE: SAVE/REPLACE always store under the current version.

proj: project (optional)

LOAD load/unload compartments

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 Main parameters, options

LOAD, options, load, amount, location, parameters

options: (opt) special instructions:

P: if members of tank pairs are encountered, distribute the amount equally into both members.
(default=explicitly mentioned tanks are filled as given)

*: (repeat) If an absolute load or an increment is given, it will be applied to all given


compartments individually (default=load until the sum of changes equal the given amount).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1811 / 7399


NAPA for Design Manuals 2016.3

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.

!: interpret a negative amount as a neg. load (not reduction)

SEC: secured grain cargo Comment: the options are placed first in the command in order to
facilitate graphic input of the compartments.

L Load, type and amount

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)

value: new load (tons or m3 or m).

+value: add the given amount to the current one.

-value: remove the given load.

*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

location: (opt) locations to be loaded.

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'.

PAR Special parameters

parameters: (opt) values for load parameters

DENS=ldens: replace density provided by SM with given value. Standard value restored by
DENS=OFF.

TEMP=temp: calculate density dependent on the temperature. RHO provided by SM is used as


reference density. See document for required additional parameters. Canceled by TEMP=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.

BFAC=b: buoyancy factor (only for deck load)

HB=h: height of buoyant part of deck load

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)

FILLMAX=f: maximum fill limit (percentage, default=100), see FILLMIN

Copyright © 1992 - 2016 NAPA. All rights reserved. 1812 / 7399


NAPA for Design Manuals 2016.3

GR Loading grain

LOAD grain amount compartment

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.

compartment: name of compartment.

LOAD OFLV

Special case: change the loading conding according to outflown volume (from damaged
compartments).

Examples:

E Examples

LOAD FO1 1000 1000 tons FO1 is loaded into tanks

with purpose=FO1.

LOAD FO1 +300 the given amount of FO1 is added to the


previous contents
set of tanks for FO1.
LOAD FO1 1000 T1 T2 T3
the given tanks are loaded with FO1 until
they are either full or the whole amount is loaded
LOAD 1000 T1 T2 T3
Same as previous, if the purpose of the given tanks
is FO1.
LOAD, * 100, T10, T20, T30
load 100 ton into each one of the given locations
(default contents)
LOAD, * HFO, 100
load 100 tons into all HFO locations found
LOAD -10 T10 10 tons will be subtracted from T10
LOAD -*0.2 T10 20 percent from the capacity will be subtracted
LOAD 0 T10 T10 will be emptied
(same as EMPTY T10)
LOAD V=100 T10 load 100 m3 of the default contents to T10
LOAD V=*0.5 T10 load T10 to half the net volume.
LOAD H=5.5 T10 load T10 to height of 5.5 m from the baseline

LOAD P 100 T10BB


100 tons will be distributed evenly into tank
T10BB and its pair.
LOAD 100 T10BB T10SB
same effect as above, if T10SB is the pair of T10BB
LOAD *1 T10 T20 T30 T40
locations given will be filled with the load
specified as purpose.
(same as FILL T10 T20 T30 T40)
LOAD HFO2 500 (HFO1)
load 500 tons of HFO2 into the tanks designed
for or currently containing HFO1.
LOAD DECK 100 DK1 BFAC=0.75 HB=12
load 100 tons of deck load with the shape of room DK1
(not in
the arrangement). 75 % of the volume below 12 m
contributes
to reserve buoyancy in stability calculations

MASS load given weight at given coordinates

Copyright © 1992 - 2016 NAPA. All rights reserved. 1813 / 7399


NAPA for Design Manuals 2016.3

The purpose of this command is to add loads independently of the arrangement by directly
specifying the weight and the position.

MASS, load/f-loc, amount, location, extension FSM=mom descr CRA=crane

load: type of load (e.g. PASS, ICE).

/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.

amount: weight of load in tons

+weight: amount to add to previous contents

-weight: amount to remove from previous contents

location: (opt) location of the load (center of gravity). If the weight is given as an increment, the location
must be omitted.

(x,y,z): coordinates of the center of gravity

(x,z): as above, but y=0 assumed. Can be used for showing the load in a profile drawing (see
command DRW).

(xmin,xmax,ymin,ymax,zmin,zmax): all dimensions, center of gravity implied (midpoint). This


form is recorded as (x,y,z), L=(lx,ly,lz). NOTE: The combination -weight and given location is
interpreted as a negative load.

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.

l: length. The enpoints are placed place symmetrically with respect to x.

xmin,xmax: end coordinates directly given

L=(lx,ly,lz): length in all directions given.

SIZE=(x1,x2,y1,y2,z1,z2): extreme coordinates in all directions given.

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.

MASS ctype contload

Load containers.

ctype: load identifier (purpose) defined under SM as having TYPE=C or TYPE=SC.

contload: name of container load

Copyright © 1992 - 2016 NAPA. All rights reserved. 1814 / 7399


NAPA for Design Manuals 2016.3

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.

MOVE move load between compartments

A load is moved from one set of compartments to another.

MOVE, amount loc11, loc12 ..., ->, loc21, loc22, ... S

amount: (opt) amount to be moved. Default=move until delivering compartments are empty or receiving
ones full.

value: load in tons

V=vol: load as volume

-: move until the (two!) tanks have equal contents.

loc11,loc12...: delivering compartments

->: delimiter, may be omitted if there are two tanks only. A minus sign will also do.

loc21,loc22...: receiving compartments

S: (opt) silent: omit the asociated messages in the log

NEW define a new loading condition

NEW name

name: name of the new loading condition

A possible loading condition in the work area will be erased.

OPENING -> Define opening

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.

OPENING name ,text;

OTS open to sea

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...

Copyright © 1992 - 2016 NAPA. All rights reserved. 1815 / 7399


NAPA for Design Manuals 2016.3

This form lists the compartments open to sea, replacing any previous definition.

name: name of compartment

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

Cancel OTS for all compartments.

OTS (no parameters)

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 rename current loading condition

RENAME, name !

name: new name of the loading condition

!: (opt) allow a loading condition with same name to be replaced. NOTE: the check concerns the
run time memory only.

REPLACE replace loading condition

The current loading condition is stored in the data base, replacing a previous definition. For
options, see !EXPL SAVE.

RPERM reduction to permeability

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.

RPERM name value

name: name of compartment

value: value of the added permeability (0...1)

SAVE save loading condition

The current loading condition is saved in the data base. If a previous definition exists,
command REPLACE or option ! must be used.

SAVE ! U

!: (opt) save regardless of previous existence

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.

SAVE name RUNTIME

Copyright © 1992 - 2016 NAPA. All rights reserved. 1816 / 7399


NAPA for Design Manuals 2016.3

A copy of the current the loading condition is saved in the run time memory under the given
name.

name: name of the copy

SKIP skip the current loading condition

The current loading condition is removed from the run time memory. No questions asked.

TEXT description of load case

A description of the load case is defined for use as additional identification in output lists. Same
command as NOTES.

TEXT, text1, text2, ...

text: main text

text2,...: (opt) additional texts, can be listed by selecting LQ LC ... TEXT/2 ...

TREAT make loading condition active

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

name: name of loading condition

3. Calculation arguments

ARGUMENT handle arguments

This command handles functions related to the arguments. Without parameters, the current
values are listed.

ARG GET name source

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.

source: (opt) SYSDB or NAPADB, alternative way of designating the source.

ARG SAVE name omit-list text db

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.

name: name assigned to the set

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1817 / 7399


NAPA for Design Manuals 2016.3

ARG UNSAVE name

ARG UNSAVE name db

Delete save set from the data base.

name: name of setfrs

db: (opt) SYSDB or NAPADB, default=project db

ARG CAT

Catalog of save argument sets. More parameters can be given as explained by !EXPL
CAT/GEN.

ARG function

Other functions:

function:

NOTE,text: assign, inquire descriptive text

RESET: reset arguments to defaults, last ARG GET obeyed.

FACTORY: assign built-in values

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.

AZI azimuth angle

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.

heel: heeling angle at which to begin the calculation

DFL hull deflection

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.

DFL (x1,t1) (x2,t2) (x3,t3) ...

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.

x1,x2,x3...: places on the x-axis where draughts are measured

t1,t2,t3...: measured draughts (m)

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.

d: deviation at XREF (m).

DFL 0

No deflection.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1818 / 7399


NAPA for Design Manuals 2016.3

FIX fix trim

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.

FRSV Select method for handling of free surfaces

There are three ways to select the method for handling of free surfaces:

1. reference to a predefined rule stored in the data base

2. reference to a predefined correction curve stored in the data base

3. direct definition of the rule by this command.

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.

FRS 'POLYGON name'

Use the given curve as the total sum of free surface moments.

name: name of the curve defined by the command POL.

FRS 'subrule' 'subrule' ...

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:

FRS 'group/subgroup rule info' ...

group: group of tanks

*class: all loads, whose class begins with given letters, e.g. *B=bunkers, *C=cargo.

load: name of load, e.g. BW=ballast water.

ALL: all liquid loads

OTHERS: remaining tanks (in practice, same as ALL because of principle for overlapping
rules).

(t1...tn): given tanks

subgroup: subgroup inside of group (optional). The default depends on 'rule' as presented below.

ALL: all

SLACK: slack tanks

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.

MAXL: as MAX, but taking only loaded tanks

+SLACK: MAX+SLACK

Copyright © 1992 - 2016 NAPA. All rights reserved. 1819 / 7399


NAPA for Design Manuals 2016.3

OTHERS: remaining tanks in the group

rule: calculation rule

IMO: IMO RES. A.749(18) [A.167]

REAL: real, at real filling

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.

R50: real, at 50% filling

it: given moment at zero heel, shape=sine

MAX: largest moment at even keel, independent of loading

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.

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.

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.

The default for selection of subgroup depends on the rule as follows:

rule subgroup
--------------------
REAL ALL (=SLACK)
IMO MAX
R50 MAX
MAX MAX
others: ALL

Examples:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1820 / 7399


NAPA for Design Manuals 2016.3

FRS '*B IMO' 'OTHERS REAL'


bunkers with IMO, others with real moments (default)
FRS 'ALL IMO'
rule IMO (subgroup=MAX) will be applied to all load groups
FRS 'ALL/ALL IMO'
rule IMO will be applied to all liquid tanks
FRS '*C REAL' 'OTHERS IMO'
rule REAL will be applied to all classes, whose name begins with
letter C (CARGO), other load groups with rule IMO
FRS '*C REAL'
as above but only CARGO tanks will be taken account
FRS 'BW0 0' 'OTHERS IMO'
free surface correction will not be calculated for load BW0,
other load groups with rule IMO
FRS '(T10) 100' '(T20) 120' '(T30) 300'
corrections given directly for given tanks. Moment curve=sinus
FRS 'ALL 0'
corrections for free liquid surfaces will not be calculated
at all
FRS '(T10 T20)/ALL REAL GZ'
definition of corrections for GZ curve
FRS EXCEPTIONS OFF
removes all exceptions to the rule from the current loading
condition.
FRS '*B/MAX MAX'
means that the room with maximum free surface in the group of bunker
tanks is
assigned with the rule MAX whereas the other bunker tanks get no
definition from this rule.

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.

GRO Define grounding

The ship may be aground in three different ways.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1821 / 7399


NAPA for Design Manuals 2016.3

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.

GRO 1F ta tf heel xmin,xmax TIDE=td TIME=tm

GRO 1F ta tf heel l TIDE=td TIME=tm

One point grounding defined by the floating position.

ta,tf: draught at AP and FP (m).

heel: heeling angle (deg).

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).

GRO 1C x y z d xmin xmax HEEL=h TIDE=td TIME=tm

GRO 1C x y z d l HEEL=h TIDE=td TIME=tm

One point grounding by the point of contact.

x,y,z: point of contact (center of grounding force) in the ship coordinate system (m).

d: depth of water at the point of contact when tide is zero (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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1822 / 7399


NAPA for Design Manuals 2016.3

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).

GRO 2F ta tf heel x1 x2 l1 l2 TIDE=td TIME=tm

Two point grounding defined by the floating position.

ta,tf: draught at AP and FP (m).

heel: heeling angle (deg).

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).

GRO SF ta tf heel x1 x2 l1 l2 TIDE=td TIME=tm

Shelf grounding defined by the floating position.

ta,tf: draught at AP and FP (m).

heel: heeling angle (deg).

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).

GRO 2C x1 y1 z1 d1 x2 y2 z2 d2 l1 l2 HEEL=h TIDE=td TIME=tm

Two point grounding defined by the points of contact.

x1,y1,z1: coordinates of the first point of contact in the ship coordinate system (m).

d1: depth of water at the first point of contact (m).

x2,y2,z2: coordinates of the second point of contact in the ship coordinate system (m).

d2: depth of water at the second point of contact (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).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1823 / 7399


NAPA for Design Manuals 2016.3

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).

GRO SC x1 y1 z1 d1 x2 y2 z2 d2 l1 l2 HEEL=h TIDE=td TIME=tm GRHEEL=g GRW=(p,s)

Shelf grounding defined by the contacts with the ground.

x1,y1,z1: coordinates of the aft end of shelf contact (coordinates in the ship coordinate system (m)).

d1: depth of water at the aft end of the contact (m).

x2,y2,z2: coordinates of the fore end of shelf contact (coordinates in the ship coordinate system (m)).

d2: depth of water at the fore end of the contact (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).

GRHEEL=g: (optional) inclination angle of the shelf

GRW=(p,s): (optional) width of the shelf towards port side (p) and towards starboard (s) from the average of
y1 and y2

GRO SC x1 d1 x2 d2 l1 l2 HEEL=h TIDE=td TIME=tm GRHEEL=g GRW=(p,s)

Shelf grounding defined by the contacts with the ground. As above but y1, y2, z1 and z2
assumed zero.

GRO OFF

GRO -

No grounding, the ship floats freely.

HEEL define the heeling angles for stability calculations

HEEL, angle, angle, ...;

angles: set of angles in the standard notation.

HEEL, SYSDB/NAPADB

Get standard heels from the system data base or the NAPA data abse

HMODE heel calculation mode (obsolete)

Obsolete feature. The default HMODE GZ is used.

HULL select the hull used in the hydrostatics calculations

HULL,name;

name : name of the hull object The default name is the one defined for stability calculation defined in
the reference system.

IRO Openings not taken into account in this run

Copyright © 1992 - 2016 NAPA. All rights reserved. 1824 / 7399


NAPA for Design Manuals 2016.3

The given openings are not relevant. Compare with the ROP command.

IRO op, op,...;

IRO op.rgoup;

IRO ALL;

LIGV set the lightweight version

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).

LIMITS Define limits

LIMITS, FRS, min, max;

Define filling limits for free surface handling.

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).

LIMITS LSTR xmin, xmax;

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;

Reset the effect of the LIMITS-command

MODE set calculation mode

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;

Same as the mode FREE.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1825 / 7399


NAPA for Design Manuals 2016.3

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.

PAR source of load parameters

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

table: name of table providing the parameters (prefix PAR* optional)

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.

POLYGON Definition of polygon-formed free surface moment

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).

POLYGON name (h1,m1),(h2,m2),...

name: name of the polygon, referred to in FRS 'POL name'.

(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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1826 / 7399


NAPA for Design Manuals 2016.3

RESET reset arguments

Resets given groups of arguments to default values.

RESET, ARG;

Resets calculation arguments to their default values. Same as ARG RESET.

RESET, VER

Resets versions to their default values.

RESET, P

Resets diagram plotting options.

RHO define a temporary change of the seawater density

The change of seawater density is valid only during the session (default is the one defined in
the reference system).

RHO, density;

ROP Relevant openings

The command defines the openings which are relevant in this run.

ROP op, op,...;

ROP op.group;

ROP ALL;

SFC Shear force correction

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.

SFC rule=table OPT=options DAM=damage

rule: supported rules are CSR and HCSR

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.

DENS: apply density corrections with option RATIO

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):

SFC FIX SIGN DAM=damage (x,ca,cf) (x,ca,cf),...

Copyright © 1992 - 2016 NAPA. All rights reserved. 1827 / 7399


NAPA for Design Manuals 2016.3

SFC FIX ASIGN DAM=damage (x,ca,cf) (x,ca,cf),...

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.

FIX: (opt) fix the corrections at the given points

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)

ca: correction aftward from the point

cf: correction foreward from the point

SFC OFF

SFC OFF DAM=damage

Omit calculation of corrected curve.

SFC OFF ALL

Shear force correction definitions for both intact and all damage cases are removed.

SFC OFF ALL DAM

Shear force correction definitions for all damage cases are removed but not the definition for
intact condition.

SFC

SFC DAM=damage

List the current definition.

SFC CAT

List catalog of all shear force correction definitions that are associated with the current loading
condition.

SLACK define filling limits for slack tanks

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.

SLACK ulim llim;

ulim: upper filling limit between 0 and 1, default 0.98.

llim: (optional) lower filling limit between 0 and 1, default 0.01. Cannot be less than 0.0001.

STLIM Permissible strength values

Copyright © 1992 - 2016 NAPA. All rights reserved. 1828 / 7399


NAPA for Design Manuals 2016.3

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.

STLIM limcur DAM=d

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

No limit curves used.

Examples:

STLIM HARBOUR
STLIM SEA/DEF
STLIM SEA DAM=DAM

SWOSTATE State of seawater overflows

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

Seawater overflows up. Default position if the state is undefined.

SWOS DOWN

Seawater overflows down.

SYTOL limit for allowed unsymmetry

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

tol: value of the argument

TLIM Define permissible draughts

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.

TLIM (x,tmin,tmax) (x,tmin,tmax), ...

x: x where the actual draught is observed

tmin: minimum permissible draught

tmax: maximum permissible draught.

WAVE Wave to be used in the calculations

WAVE name;

Copyright © 1992 - 2016 NAPA. All rights reserved. 1829 / 7399


NAPA for Design Manuals 2016.3

Reference to an existing wave.

WAVE, name H=height,TYPE=type,L=length,POS=pos,DIR=angle;

Define or redefine wave.

name: name of the wave.

height: height of the wave (>0) from hollow to chest.

type: the type of wave

SINUS (default) or TROCHOID

length: length of the wave

value: use given value

pos: position of the wave hollow

SAG wave crest at AP (aft perpendicular)

HOG wave hollow at AP

value x-coordinate of wave hollow

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;

Sets the wave off

WAVE CAT selection

Catalog of stored waves, for parameters see !expl CAT/GEN

YREF Asymmetry control

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.

4. Calculation and output

ASG Assign variables

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

set: (opt) set of variables.

HYD: the variables related to masses, volumes, floating position. The same information is
available with the function LD.QNT (see !EXPL LD.QNT).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1830 / 7399


NAPA for Design Manuals 2016.3

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.

ASG assign values LD-variables

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.

CALCULATE calculate loading results

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

Recalculates the floating position.

CALC, task DAM=case

task: subtask to be calculated

STAB: stability

STR: strength By default all strength quantities are calculated.

DAM=case: (opt) with task STR, calculate strength for damage(s).

case: name of a single damage or name of a damage group.

LQ: (opt) with task STR, limit the calculated quantities according to LQ SD

DRW arrangement oriented drawing

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).

Special alternatives for LD are:

LOAD various aspects

DRW /LOAD/R/UPD/DAM/WL/WAVE/BRE/GRO/

Draw various aspects of the current loading condition.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1831 / 7399


NAPA for Design Manuals 2016.3

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

WL: mark the waterline, option Ci=use colour i (one digit)

WAVE: mark the wave (if calculations are done in wave), option Ci=use colour i (one digit)

GRO: mark the grounding, options Gi=use fill colour i

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/?/

Options concerning automatic drawing of changed loads.

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.

AM: automatic mode for compartments and mass loads

OFF: switch automatic mode off

?: inquire all aspects of drawing control

MASS drawing mass loads

DRW MASS options

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.

load: (opt) draw the given load only

options: (separate items). If no options are given, those given by DRW MOPT are used.

COL=col: (integer) use the given colour

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)

E: draw according to actual extension

X: mark x-extension with an arrow. The arrow head obeys the text height.

Z: do not show if mass zero (default until 2006.1)

P: colour according to load, same as FILL=PURP.

R: restrict to directly added loads, omitting components from added loading conditions

I: add load as text, alternative to DES and M options.

DES: add descriptive text as text, alternative to I and M options.

M: add mass (in tons) as text, alternative to I and DES options.

LOC: add location as text

Copyright © 1992 - 2016 NAPA. All rights reserved. 1832 / 7399


NAPA for Design Manuals 2016.3

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 ?).

TYPE=name: select according type, may contain wildcards

LOAD=load: select the given load only

PART=part: draw to the given setup part only,part=index. A part range can be given as
PART=(p1,p2).

OPT setting options

DRW OPT option

Assign options for showing loads in compartments. Note: options set by LD.DRWAUTO
override DRW OPT.

option: string containing one or several of

H: mark slack tanks by hatching (deck plans only)

HHH: mark slack tanks in all views

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.

F: indicate tanks with a free surface

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)

D: mark draught in x-plans, only with DRW LAY

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

DRW MOPT option l col

Assign options for showing mass loads.

option: one or several of the following characters

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.

P: colour according to load, default=fixed colour 6

B: plot the symbol with boundary, default=fill only

L: add the name of the load as text

C: include containers (for DRW LAY only)

l: (opt) assign size of the symbol showing the load, default=0.1*BDWL

col: (opt) assign colour, default=6

DRW DOPT options

Options controlling DRW DAM ... presently only when given LD.DRWAUTO. Concerns marking
of damaged rooms, breaches (flood water plotted in connection with loads).

options:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1833 / 7399


NAPA for Design Manuals 2016.3

Ci: use colour i for marking damaged compartments, e.g. C7

#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

L: add labels for identification

LAY automatic drawing to own layers

DRW LAY lload,mload,dam

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.

lload: layer for loads in compartments, 0=not used

mload: layer for mass loads, 0=not used.

dam: (opt) layer for marking damaged compartments

OP drawing openings

DRW OP SELECT=(sel) DA L=l TH=th ID LAB FIG MARKER=m OPT=opt

Draw openings from the current opening arrangement.

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)

SEL=sel: selection criterion based on properties in the table, e.g. DRW OP


SELECT=(WT=UNPROTECTED)

DA: take only openings for which there are calculation results

L=l: size or marker or figure

TH=th: text height (when ID given)

LAB: add labels for graphic identification

OPT=opt: various options

F: change the marker colour according to FCODE or LFCODE in the table

CL drawing container objects

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.

EDR finish drawing

This command finishes the current drawing, for instance, in order to start a new figure for the
current output list.

EDR option

option: (opt) additional functions:

S: start a new drawing and restore previous SETUP

R: as S, but also redraw the arrangement base drawing, same effect as adding command
DRW ALL FIG.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1834 / 7399


NAPA for Design Manuals 2016.3

FIG insert figure into the result list

This command allows a stored drawing or currently made graphic output to be added to the
output list.

FIG * SIZE du,dv pos

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.

FIG name ....

This form inserts a drawing stored in the data base.

More detailed information is obtained by !EXPL FIG/GEN (latter form).

FILL set colour filling

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:

FILL SL OFF no marking


FILL SL ON standard case, only in z-view
FILL SL X extended - always when the partial filling
cannot be seen from the drawing
FILL SL ALL always

FORCE Force the program to run in an abnormal way

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

Set the program to work in the normal way.

GEN Generate envelope curves of strength

Copyright © 1992 - 2016 NAPA. All rights reserved. 1835 / 7399


NAPA for Design Manuals 2016.3

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).

GEN ENV NAME=name, LOAD=ldgr, DAM=dgr L+D

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.

INQUIRE identify compartment/load

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

Inquire properties of compartment.

name: name of compartment

INQ (u,v)

Identify mass load.

(u,v): coordinates near the mass load in the deck plan.

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

n: (opt) number of empty lines, default 1.

LIST start listing

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1836 / 7399


NAPA for Design Manuals 2016.3

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.

PAR Parameters of load components/compartments

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

Various data for the current loading condition.

sel: data to be listed

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

LD: summary of loading condition, alt II.

TOTAL: total loads currently loaded

CRI: stability criteria

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.

PP: list of partial loading conditions (from ADD command)

WAVE: list main characteristics of the current argument wave.

FRS: list free surface moments location by location

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.

ARG: list arguments for output (DocBook options available)

NH: (opt) suppress additional headers.

NSH: (opt) suppress any additional headers and subheaders (alternative to NH)

ST Stability

LIST ST options tab-opt

Copyright © 1992 - 2016 NAPA. All rights reserved. 1837 / 7399


NAPA for Design Manuals 2016.3

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.

options: G=add general data.

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).

MOM=moemt: add equlibrium heel angle with the given moment

NH: suppress any additional headers

NSH: (opt) suppress any additional headers and subheaders (alternative to NH)

tab-opt: normal table output options

LIST STB options

List the stability curve and related quantities using alt. output module.

options: K=list KN and KG*SINFI instead of MS and GM0*SINFI

STR Hull girder strength

LIST STR options

List the global hull girder strength values

options:

DAM=case: lists strength of damaged ship

TORS: lists also quantities related to torsional moment

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

LIST SD x-coord DAM=case ENV=curv options tab-opt

List the strength related quantities (sel. by LQ SD) as a function of x.

x-coord: (opt) x-arguments, default=frames divisible by 10.

values: list of coordinates x1,x2,..., or a series (xmin,xmax,step)

xarr(): values provided by a calculator array 'xarr'

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.

DAM=case: (opt) list strength of damaged ship

ENV=curv: (opt) add envelope curve values from the stored set 'curv'. The envelope curves are generated
by 'GEN ENV NAME=curv...'.

options: additional options:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1838 / 7399


NAPA for Design Manuals 2016.3

G: add general data

NH: suppress any additional headers

NSH: suppress any additional headers and subheaders (alternative to NH)

tab-opt: normal table output options

EXAMPLES
LIST SD (#0 #100 1) (frames id the given range
LIST SD D=#1 TABLE=ONLY

Every frame, store the result as a table, omit listing.

G2 ELE,OPE,OPA,TLI,CST

LIST sel tab-opt

sel: data to be listed

ELE: list lightweight elements. The quantities are selected by LQ ELE.

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.

SFC Shear force correction

LIST SFC options

options: (opt)

DAM=case: list for specified damage case

CL Related to container loading

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 ...

Arbitrary CL listing, parameters as in CL

LQ select listing quantities

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

subj: (opt) subject, using the symbols listed above. Default=PAR.

selection: the syntax is the same as in the standard command (see !EXPL LQ/GEN).

Copyright © 1992 - 2016 NAPA. All rights reserved. 1839 / 7399


NAPA for Design Manuals 2016.3

A list of alternatives is obtained by command LQ subj ALT.

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):

load: list sum for the given load, e.g. MASS/HFO


(comp): load in the given compartment, e.g. MASS/(CA1)
'load' and 'comp' may contain wildcards, e.g. several
loads
can summed with MASS/HFO|DO|LO
*class: list sum for given class, e.g. MASS/*B

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.

NL open new list

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

This command causes the subsequent output to start on a new page.

OUTPUT make result list

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1840 / 7399


NAPA for Design Manuals 2016.3

TOTAL: write only deadweight, lightweight


and displacement.
SUM(load,load,...): write only sum rows for
the given loads, the other loads are
written location by location.
SUM : write only sum rows for all loads.
ORDER(load,load,...): write loads in the given
order. Default order is loading order.
(The order list need not contain all loads).
The loading components within the groups are
sorted in the alphanumeric order by the
alternatives ORDER(load,load,...,NAME) and
ORDER(load,load,...,CCODE). The first one
sorts according to the name and the second one
according to the compartment code.
NOLIG: do not write lightweight and displacement.
REFX=x: reference point of LCG is at x. X is
either XREF (or L/2), AP or explicit
coordinate value. x with prefix * means
that LCG's aft from the reference point
have plus sign and LCG's fore from the
reference point have minus sign. Default
for x is NAPA origin.
!FORM: accept formatting of values by the
quantity standard.
NOUND: no underlining (for saving space).
NOHEAD: omit header lines.

PLD plot diagram

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.

PLD ST GML POO options

This command draws the gz-curve and related data as function of heel.

GML: (opt) add a line showing the GM

POO: (opt) delimiter needed if options follow

option: (opt) standard plot output options in addition to or replacing those given with command POO.

PLD SD DAM=case ENV=curv POO options

This command draws data related to the longitudinal strength as function of x.

DAM=case: (opt) plot strength of damaged ship

ENV=curv: (opt) add envelope curves from the stored set 'curv'. The envelope curves are generated by
'GEN ENV NAME=curv...'.

POO: (opt) delimiter needed if options follow

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.

PLOT plotting functions

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

Plot according to standard macro. For alternatives, use PLOT .CAT.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1841 / 7399


NAPA for Design Manuals 2016.3

POO set plot output options

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.

PQ select quantities for plot output

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.

Special options for LD

For quantities BMMX and SHMX, a string qualifier is interpreted as the name of limit curve.

SCAN -> shortcut to task SCAN

Scan or send the last list.

SCAN L

Enter scanner and select the last list.

SCAN S

Enter scanner, send the last list to the printer and return to LD.

SELECT select subset

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 compartments belonging to class B (bunkers) or any subclass (such as BO).

SELECT MASS>0

Select compartments containing a non-zero load.

SELECT LC A NAME>nnn NAME

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 loading conditions, the name of which begin with LC.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1842 / 7399


NAPA for Design Manuals 2016.3

SELECT LC OFF

Cancel the previous selection

SETUP setup for arrangement drawings

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.

TOO table output options

This command controls the layout of LIST PAR, LIST LC, LIST SD and LIST ST.

TOO subject parameters

subject: (opt) PAR,LC,SD,SD or ELE as above. Default=PAR.

parameters: see explanation !EXPL TOO/GEN.

TYPE adding of arbitrary text to the list.

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.

UPDATE update calculated data

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.

UPDATE (no parameter)

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.

WATCH Display continuously floating position

The program is commanded to display the current floating position after every loading
command.

WATCH FLOAT: watch floating position and GM

WATCH OFF : stop watching

YREF Asymmetry control

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1843 / 7399


NAPA for Design Manuals 2016.3

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.

5. Lightweight definition (subtask LGDEF)

->DR enter the drawing task

->TAB enter table calculation

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 (x,a), (x,a), ...

Cross-sectional area as a function of x; x in m, a in m2.

A a

Constant area over the ship.

ALF Stress concentration factors

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,...

ai: stress concentration factor for the i'th frame.

ALF

List the current set.

CATALOG list catalog of stored data

CATALOG alt

alt: (opt) alternative

LIG: lightweight versions (default)

ELEM lightweight element tables from the current version

CG Center of gravity of lightweight

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;

x : centre of gravity (x-coordinate)

y : centre of gravity (y-coordinate)

z : centre of gravity (z-coordinate)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1844 / 7399


NAPA for Design Manuals 2016.3

CTW Center of twist

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.

DELETE delete components of the current lightweight version

DELETE, ELEM, name, name, ...;

Deletes given lightweight elements from the current lightweight version.

DELETE ELEM ALL

Deletes all lightweight elements.

DESCRIPTION List lightweight

DESC, LIG (, version);

List lightweight version. If version is not given the current version will be used.

DESC, ELEM (, name, name, ...);

List lightweight elements. If name is missing all lightweight elements will be listed.

DESC, DIST;

List user defined distribution curve.

DISTRIBUTION define the type of lightweight distribution

DISTRIBUTION , LLOYDS , cb;

LLOYDS : lightweight distribution according to LLOYDS' coffin diagram

cb : block coefficient, should be between 0.55 and 0.85

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

u : the length coordinate between 0 and 1

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.

DISTRIBUTION DIM (x,w) (x,w), ...;

Copyright © 1992 - 2016 NAPA. All rights reserved. 1845 / 7399


NAPA for Design Manuals 2016.3

DISTRIBUTION DIM (x,w,y,z) (x,w,y,z), ...;

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.

x: x-coordinates of the distribution (m)

w: weight distribution (t/m)

y: center of weight in y-direction (m)

z: center of weight in z-direction (m).

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;

EDIT -> edit lightweight

Same as DES, except the result is stored in the editor work area.

ELEMENT define a lightweight element

ELEMENT, name, weight, x, y, z, xa, xf, text

ELEMENT, name, weight, x, y, z, l, text

name : name of the element (e.g. SPLE120)

weight: weight of the element

x,y,z : centre of gravity of the element

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.

text: (opt) a descriptive text

All the lightweight elements defined will always be added to the distribution curve regardless of
the type of distribution used.

ELEM FROM table

Special case: use the given table as source for lightweight elements. Possible directly defined
elements will be discarded.

table: name of table, prefix ELE* assumed

ELEM DIRECT

Cancels ELEM FROM table. The current element will be recorded as directly given.

END return to loading level

Returns to the loading level without storing the current lightweight version into the data base.

ETAB handle element tables

This command transfers data between the current lightweight definition and tables containing
elements and/or enters table calculation.

ETAB

Copyright © 1992 - 2016 NAPA. All rights reserved. 1846 / 7399


NAPA for Design Manuals 2016.3

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.

ETAB GET name

As above, but from a named table.

ETAB PUT name

Store the elements of the current lightweight definition in the given table.

EXAMPLES
ETAB

Just enter table calculation with the work area ELE.

ETAB GET ELEMENTS

Copy the elements of the table ELE*ELEMENTS to the current lightweight definition.

GEN -> Generate model table for input influence factors

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 !

Generate model table and enter the task TAB.

!: (option) if the table INFLUENCE_FACTORS already exists, it is not overwritten unless ! is


given.

GET get stored lightweight definition

A given lightweight version is fetched from the data base and made current.

GET, id

id: identification of the lightweight version

GET, OLD, version;

version: the lightweight version to be used

Get lightweight from old format.

I Moment of inertia of cross section

Moment of inertia of ship's cross section as a function of x (m4). I is used in deflection


calculation (slope = integral of M/E*I, deflection = integral of slope).

I (x1,i1),(x2,i2),...;

Copyright © 1992 - 2016 NAPA. All rights reserved. 1847 / 7399


NAPA for Design Manuals 2016.3

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.

IFFR Frames for influence factor table

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

List the current set.

IFHA Hatches for influence factor table

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,...

x: x-coordinate of hatch. Give x's in ascending order.

IFHA

List the current set.

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 (x,k), (x,k), ...

Shear coefficient as a function of x; x in m, k dimensionless.

K k

Same k over the ship.

LD -> return to loading level

Same as END.

LD;

NEW make a new lightweight version

A new lightweight version is created and made current.

NEW, version;

version: lightweight version to be created

OK -> Exit the lightweight definition process

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;

PLOT plot the lightweight elements

Copyright © 1992 - 2016 NAPA. All rights reserved. 1848 / 7399


NAPA for Design Manuals 2016.3

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).

PLOT SCL=scl ZSC=zsc FILL=fill

scl: (opt) scale factor for converting weight/m to ship scale, default=1

zsc: (opt) additional scaling factor for z-coordinates, 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.

REGISTER register lightweight version

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

id: lightweight version

PERM: (opt) ensures that id is not interpreted as an option

REG DELETE

Remove default lightweight version from the reference system

REG LIST

List the currently registered version

RENAME rename current lightweight version

Current lightweight version will be renamed.

RENAME, version;

version: new name for lightweight version

REP Replacing of lightweight version

REP, vers;

vers: (optional) lightweight version. The current working version is replaced with current or given
name.

SAVE saving of lightweight version

SAVE, vers !

vers: (optional) lightweight version The current working version is saved with current or given name.

!: (opt) save even if already existing

TEXT define descriptive text

TEXT,text;

text : descriptive text

UNSAVE delete data from the data base

UNSAVE, LIG, id, id, ...;

Deletes the given lightweight versions from the data base.

id: lightweight version to be deleted

Copyright © 1992 - 2016 NAPA. All rights reserved. 1849 / 7399


NAPA for Design Manuals 2016.3

WEIGHT define total lightweight and distr. range

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.

WEIGHT, weight, xa, xf;

weight: lightweight of the ship

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.

WHERE show current lightweight version

6. Free surface rule definition (subtask FSDEF)

CAT Catalog of definition data

Lists catalog of definitions stored in the data base. The command is based on the general
catalog function (see !EXPL CAT/GEN).

CAT

Catalog of all free surface definitions in all bata base units.

CAT unit selection options

See !EXPL CAT/GEN.

DESCRIPTION List definition data

Lists definition data in input format.

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

name: name of the definition data

vers: data base version (default=current)

project: name of project

unit: data base unit 1, 2, 7 or DB1, DB2, DB7.

EDIT Edit definition data

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 Return to the main level

Returns the control to the main level.

END;

Copyright © 1992 - 2016 NAPA. All rights reserved. 1850 / 7399


NAPA for Design Manuals 2016.3

EXCEPTION Define exceptions to the rule

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.

EXCEPTION tank1=rule1, tank2=rule2, ...

tank: name of tank

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

Remove all exceptions

FRS Define rules for free surface handling

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:

FRS 'subrule' 'subrule' ... or

FRS 'POLYGON name'

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:

FRS 'group/subgroup rule info' ...

group: group of tanks

*class: all loads, whose class begins with given letters, e.g. *B=bunkers, *C=cargo.

load: name of load, e.g. BW=ballast water.

ALL: all liquid loads

OTHERS: remaining tanks (in practice, same as ALL because of principle for overlapping
rules).

(t1...tn): given tanks

subgroup: subgroup inside of group (optional). The default depends on 'rule' as presented below.

ALL: all

SLACK: slack tanks

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.

MAXL: as MAX, but taking only loaded tanks

+SLACK: MAX+SLACK

rule: calculation rule

IMO: IMO RES. A.749(18) [A.167]

REAL: real, at real filling

Copyright © 1992 - 2016 NAPA. All rights reserved. 1851 / 7399


NAPA for Design Manuals 2016.3

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.

R50: real, at 50% filling

it: given moment at zero heel, shape=sine

MAX: largest moment at even keel, independent of loading

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.

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.

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.

The default for selection of subgroup depends on the rule as follows:

rule subgroup
--------------------
REAL ALL (=SLACK)
IMO MAX
R50 MAX
MAX MAX
others: ALL

Examples:

FRS '*B IMO' 'OTHERS REAL'


bunkers with IMO, others with real moments (default)
FRS 'ALL IMO'
rule IMO (subgroup=MAX) will be applied to all load groups
FRS 'ALL/ALL IMO'
rule IMO will be applied to all liquid tanks
FRS '*C REAL' 'OTHERS IMO'
rule REAL will be applied to all classes, whose name begins with
letter C (CARGO), other load groups with rule IMO
FRS '*C REAL'
as above but only CARGO tanks will be taken account
FRS 'BW0 0' 'OTHERS IMO'
free surface correction will not be calculated for load BW0,
other load groups with rule IMO
FRS '(T10) 100' '(T20) 120' '(T30) 300'
corrections given directly for given tanks. Moment curve=sinus
FRS 'ALL 0'
corrections for free liquid surfaces will not be calculated
at all

Copyright © 1992 - 2016 NAPA. All rights reserved. 1852 / 7399


NAPA for Design Manuals 2016.3

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 Get definition data from data base

Fetches data from the data base.

GET, name

GET, name/vers/project

GET, name/vers/unit

name: name of the definition data

vers: data base version, default current.

project: nane of project, default current.

unit: data base unit 1, 2, 7 or DB1, DB2, DB7. Default 1.

LIMITS Define limits

LIMITS, FRS, min, max;

Define filling limits for free surface handling.

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 Create a new free surface definition

Starts definition from scratch

NEW name

name: name of the definition data.

NOTE Define notes

NOTES text1 text2 ....

Assign note text

NOTES

List note text

NOTES EDIT

Enter notes to the editor

NOTES DELETE

Delete the notes.

OK Return to the main level

Returns the control to the main level.

OK;

REN Rename definition data

Copyright © 1992 - 2016 NAPA. All rights reserved. 1853 / 7399


NAPA for Design Manuals 2016.3

REN name

name: new name of the definition data

REP Replacing definition data in the data base

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

name: name of definition.

vers: data base version

project: name of 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.

SAVE Save definition data in the data base

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).

!: (optional) save regardless of previous existence

SAVE name/vers/unit

SAVE name/vers/project

name: name of definition.

vers: data base version

project: name of 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 Skip definition and return to the main level

Skips definition and returns the control to the main level.

SKIP

SLACK Define filling limits for slack tanks

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.

SLACK ulim llim;

ulim: upper filling limit between 0 and 1, default 0.98.

llim: (optional) lower filling limit between 0 and 1, default 0.01. Cannot be less than 0.0001.

UNSAVE Delete definition from the data base

The command deletes the given free surface defintion from the data base.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1854 / 7399


NAPA for Design Manuals 2016.3

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

name: name of the definition data

vers: data base version

project: name of project

unit: data base unit 1, 2, 7 or DB1, DB2, DB7.

7. Service functions

LD.NAME() name of current loading condition

The function value is the name of the current loading condition if any, else empty.

LD.NOTE() description of current loading condition

The function value is the descriptive text (from command TEXT) of the current loading
condition (one line only).

LD.NOTE()

(No parameters) Return the first line of the notes text.

LD.NOTE(s)

Return all notes texts in the given array.

s: string array, receiver

LD.NOTE(text1,text2,...)

Assign notes texts

texti: new text to line i

LD.ARR() current arrangement

The function value is the name of the arrangement of the current loading condition.

LD.WORK() current descriptions

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)

alt: (opt), string

WOR: work description containing parameters of the loads, contents similar to LQ PAR
(default)

CON: the definition description

ARG: argument description

LIG: lightweight description

FRS: free surface description (0 if given directly in the arg.)

LD.RARR() work records

Copyright © 1992 - 2016 NAPA. All rights reserved. 1855 / 7399


NAPA for Design Manuals 2016.3

The function lists data for work records. Provided mainly as support for developers.

LD.RARR()

List all records.

refnr=LD.RARR(rec)

rec=. record, either index, record number or quantity name

LD.RARR(rec,0)

List the given record.

LD.STATUS() change status of definition components

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)

alt: (opt), string

CON: the definition description (default)

ARG: argument description (implemented at test level)

LIG: lightweight description (in the subtask LGDEF)

LD.LQNT() properties of load components

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)

quantity: quantity to be returned:

From the arrangement, geometry (property of the compartment)


Irrelevant or modified meaning for mass loads.

NAME: name

PURP: purpose of room, MASS if mass load

DES: description

CLASS: compartment class

RED: steel reduction

XMIN: minimum x

XMAX: maximum x

YMIN: minimum y

YMAX: maximum y

ZMIN: minimum z

ZMAX: maximum z

VOLM: volume moulded

VNET: net volume

TMY: transv moment of inertia

Copyright © 1992 - 2016 NAPA. All rights reserved. 1856 / 7399


NAPA for Design Manuals 2016.3

CGX: cgx of volume

CGY: cgy of volume

CGZ: cgz of volume

CAP: filling capacity

TYPE: type (from arr. def)

Definition:of the load, administration:

MASS: amount as weight

LOAD: substance loaded

LCDEF: definition type

TEMP: temperature

SLACK: upper slack limit

LSLACK: lower slack limit

FILLMIN: min. filling limit

FILLMAX: max. filling limit

Properties dependent on the substance

LDES: description of load

LTYP: load type

LCLAS: load class

DENS: density

RHO: density without temperature correction

LCAP: capacity

STF: stowage factor (converted from RHO)

SPG: specific gravity (converted from RHO)

BFAC: buoyancy factor (for deck loads)

HB: height of buoyant part (for deck loads)

ARAT: angle ratio for PMC loads

ADIF: angle difference for PMC loads

Derived properties

WMAX: maximum load as weight

VLMAX: maximum load as volume

VLOAD: volume of load

HM: height of load (z-coord. of upper level)

XM: cgx of mass (primary if mass load)

YM: cgy of mass

ZM: cgz of mass

IX: Iy of the surface (m4) Only for normal liquid loads, special cases like PMC not considered

Copyright © 1992 - 2016 NAPA. All rights reserved. 1857 / 7399


NAPA for Design Manuals 2016.3

IYM: transversal moment of inertia of the surface

IY: Iy of the surface (m4)

MOM: ...

FRSM: free surface moment (according to rule)

FRS: rule of free surfaces (string)

FRULE: rule of free surfaces (integer code) <0: not active

GMCORR: gm-correction

MREL: relative load (mass/wmax)

VREL: relative load (vload/vnet)

IXW: moment of inertia around x

IYW: moment of inertia around y

IZW: moment of inertia around z

VFL: amount of flood water (for comp. open to sea)

comp: (opt) load component, default=total of all

name: name of compartment, see options

index: index in the list of compartments

empty or omitted: return total of all loads (zero if not possible)

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.

D: 'name' is the description (DES)

C: 'name' gives CCODE

M: restrict subset to mass loads

T: restrict subset to loads in compartments

A: (active) restrict subset as if given MASS>0.

F: for numeric values: output the result as a string obeying the quantity standard (format and
unit). Default=output as number.

FF: output the result as a string, free format (unit obeyed)

FZ: as F but without leading spaces

R: with empty name: return the source record as such

EXAMPLES
@ld.lqnt('RHO','R601')

Return the density of the load in R601.

@ld.lqnt('MASS','PASS','L')

Return the mass of the load component with LOAD=PASS.

@ld.lqnt('LDES','Day tank 1','D')

Return the load description of the tank with DES='Day tank 1'

Copyright © 1992 - 2016 NAPA. All rights reserved. 1858 / 7399


NAPA for Design Manuals 2016.3

@ld.lqnt('MASS')

Return total of MASS.

@ld.lqnt('MASS','','M')

Return total of MASS from mass loads.

@ld.lqnt('MASS','LOAD=BW')

Return total of MASS of tanks loaded with BW.

@nrec=ld.lqnt('NAME','','R')

Return the array containing compartment names.

LD.SELECT() return subset of load components

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.

crit: criterion in the normal selection syntax. May be empty.

opt: options:

M: take mass loads only

T: take loads in compartments only

A: take only loaded compartments

N: return NAME instead if indices

C: return CCODE. Note: components with undefined CCODE omitted.

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.

sarr: string array

opt: options:

L: sarr contains loads (quantity LOAD), default=NAME

D: sarr contains descriptions (quantity DES)

EXAMPLES
@LIST=LD.SELECT('','ATN')

Return a list of names of loaded tanks.

@LIST=LD.SELECT('LOAD=HFO')

Return a list of tanks loaded with HFO (indices).

@HFOTANKS=ARR(3)
@LD.SELECT('LOAD=HFO',HFOTANKS)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1859 / 7399


NAPA for Design Manuals 2016.3

As above, but the result is returned as names in the array HFOTANKS.

@MLOADS=ARR(3)
@LD.SELECT('',MLOADS,'ML')

Return a list of all mass loads (option M), represented by LOAD (option L).

LD.GETLCSEL() get list of selected loading conditions

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

LD.FITVOLUME() select tanks with capacity for a given volume

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).

volume: volume to be located

nmax: number of tanks that may be used (1...5)

fill: used if option F given: fill to the given filling degree, default=apply the currently valid VLMAX

opt: options:

F: apply 'fill'

L: take into account the amount of load already loaded

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.

LD.MI() moments of inertia of load components

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)

sel: selection of load components

empty: all components (also sel=0)

name: the given one

index: index

list: list of components, integer record, e.g from LD.SELECT.

res: real array for receiving the result, total if many components.

res(1...3): IXW,IYW,IZW

res(4...6): IYZW,IXZW,IXYW

Copyright © 1992 - 2016 NAPA. All rights reserved. 1860 / 7399


NAPA for Design Manuals 2016.3

res(8...9): center of gravity

res(10): total mass

x,y,z: (opt) reference point, default 0,0,0

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)

As above, but with different reference point.

@list=ld.select('','M')
@ld.mi(list,res)

Return total moment of inertia for all mass loads.

LD.QNT() data for the loading condition as a whole

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)

quantity: selects the quantity:

DISP: total displacement=total weight. In case of damaged compartments, these values give
the state before the damage

LCB: longitudinal center of buoyancy (at zero heel)

TCB: transversal center of buoyancy (at zero heel)

VCB: vertical center of buoyancy (at zero heel)

XCG: xcg of total weight

YCG: ycg of total weight

ZCG: zcg of total weight

DW: deadweight

XM: xcg of the deadweight

YM: ycg of the deadweight

ZM: zcg of the deadweight

DWRES: deadweight reserve, needs DWMX

LW: lightweight

CGXW: xcg of lightweight

CGYW: ycg of lightweight

CGZW: zcg of lightweight

T: draught, see options K and Y

TK: draught below keel

TA: draught at aft ref.point (see option D)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1861 / 7399


NAPA for Design Manuals 2016.3

TF: draught at fore ref.point (see option D)

TX: draught at given x coordinate (see options D and X=x)

TEQV: equivalent draught, same as T if no deflection

TMAX: max. draught, taking hull geometry into account

TLCA: draught at the longitudinal center of flotation (LCA)

TR: trim, see option I,Y

TRA: trim angle (by default in degrees, see options I and Y)

TRIMX: trim, m (external repr.)

HEEL: heeling angle, see option I

GM: GM (liquids accounted)

GM0: GM (solid)

GMCORR: gm-correction (actually GM reduction, i.e. positive)

GMV: 'virtual' GM (liquids type LV excluded)

GRM: grain shift moment

KG: KG, same as ZCG

KGL: virtual KG

KMT: transversal metacentric height (at zero heel)

KML: longitudinal metacentric height (at zero heel)

LCA: longitudinal center of flotation

MOM: free surface moment for GM reduction as specified by the free surface rules (argument
FRS)

IX: longitudinal moment of inertia of water plane

MINGM: minimum gm from table assigned with LD.LIMDEF('GM'...)

MINGMV: as MINGM, but using GMV (see above)

GMOK: GM compared with MINGM: 1=ok, 0=not

MAXKG: maximum kg from table assigned with LD.LIMDEF('GM'...)

TRLA: largest allowed aft trim from LD.LIMDEF('TR'...)

TRLF: similarly fore trim

TRIMOK: TRIM compared with TRLA,TRLF: 1=ok, 0=not. If no trim limits, the MINGM is used:
0K=value obtained.

VFL: total volume of flood water in comp. open to sea

VGRM: Vertical grain shift moment

OTS: 1=there are compartments open to sea, 0=not

OFLV: total of outflown cargo (volume)

PHM: permissible grain heeling moment.

LWL: length of waterline

opt: options

F: output the result as a string obeying the quantity standard (format and unit)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1862 / 7399


NAPA for Design Manuals 2016.3

FF: output the result as a string, free format (unit obeyed)

FZ: as F but without leading spaces

I: (internal) return trim, heel in radians, default=m,degree

FD: (for heel): if YREF=ON return - (otherwise 0)

K: (for draughts): return draught below keel (default for TK)

Y: (for T,TR): return as if YREF ON (default if actually so)

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).

/X=x: for TX: return draught at given x coordinate

/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')

Get the value of GM

!TYPE @LD.QNT('HEEL','F')

Type the value of heel in the external format.

@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')

Get the draught (formatted) as read at the curve DRMC1.

LD.SQNT() strength related quantity (total)

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)

quantity: quantity to be returned:

ATORS: absolute area under torsion moment curve

BMABSMX: greatest abs bending moment (sign included)

BMMAX: maximum value of bending moment

BMMIN: minimum value of bending moment

BMMN: value of the minimum permissible bending moment at XBMMN

BMMX: value of the maximum permissible bending moment at XBMMX

DFLMAX: greatest deflection

SHABSMX: greatest abs shear force (sign included)

SHMAX: maximum value of shear force

SHMIN: minimum value of shear force

SHMN: value of the minimum permissible shear force at XSHMN

SHMX: value of the maximum permissible shear force at XSHMX

TMMAX: maximum value of torsion moment

Copyright © 1992 - 2016 NAPA. All rights reserved. 1863 / 7399


NAPA for Design Manuals 2016.3

TMMIN: minimum value of torsion moment

TMMN: value of the minimum permissible torsion moment at XTMMIN

TMMX: value of the maximum permissible torsion moment at XTMMAX

XBMABSMX: x where greatest abs bending moment

XBMMN: x where the minimum bending moment occurs

XBMMX: x where the maximum bending moment occurs

XDFLMAX: x where the greatest deflection occurs

XSHABSMX: x where greatest abs shear force

XSHMN: x where the minimum shear force occurs

XSHMX: x where the maximum shear force occurs

XTMMAX: x where the maximum torsion moment occurs

XTMMIN: x where the minimum torsion moment occurs

Relative strength related quantities:

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.

RELBMMN: greatest relative negative bending moment. Calculated as RELBM

RELBMMX: greatest relative positive bending moment. Calculated as RELBM

RELHOG: greatest relative hogging moment. Calculated as BMREL.

RELSAG: greatest relative sagging moment. Calculated as BMREL.A

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.

RELSHMN: greatest relative negative shear force. Calculated as RELSH

RELSHMX: greatest relative positive shear force. Calculated as RELSH

SHREL: greatest relative shear force. At both limits SHREL is 1 (100%) and at SH=0 SHREL is
0. Compare with RELSH.

SHRELMN: greatest relative negative shear force. Calculated as SHREL

SHRELMX: greatest relative positive shear force. Calculated as SHREL

TMREL: greatest relative torsion moment, At both limits TMREL is 1 (100%) and at TORS=0
TMREL is 0

TMRELMN: greatest relative negative torsion moment. Calculated as TMREL

TMRELMX: greatest relative positive torsion moment. Calculated as TMREL

XBMREL: x where the greatest relative bending moment BMREL occurs

XRELBM: x where the greatest relative bending moment RELBM occurs

XRELBMMN: x where greatest relative negative bendinf moment occurs

XRELBMMX: x where greatest relative positive bendinf moment occurs

XRELHOG: x where the greatest hogging moment occurs

XRELSAG: x where the greatest sagging moment occurs

XRELSH: x where the greatest relative shear force RELSH occurs

Copyright © 1992 - 2016 NAPA. All rights reserved. 1864 / 7399


NAPA for Design Manuals 2016.3

XRELSHMN: x where greatest relative negative shear force occurs

XRELSHMX: x where greatest relative positive shear force occurs

XSHREL: x where the greatest relative shear force SHREL occurs

XSHRELMN: x where greatest relative negative shear force occurs

XSHRELMX: x where greatest relative positive shear force occurs

XTMREL: x where the greatest relative torsion moment TMREL occurs

XTMRELMN: x where greatest relative negative torsion moment occurs

XTMRELMX: x where greatest relative positive torsion moment occurs

Envelope quantities, only with the option ENV=envelope:

EBMMAX: envelope max. bending moment (largest value)

EBMMIN: envelope min. bending moment (smallest value)

ESFCMAX: envelope max. corr. shear force (largest value)

ESFCMIN: envelope min. corr. shear force (smallest value)

ESFMAX: envelope max. shear force (largest value)

ESFMIN: envelope min. shear force (smallest value)

ETMMAX: envelope max. torsion moment (largest value)

ETMMIN: envelope min. torsion moment (smallest value)

XEBMMAX: x where max envelope bending moment occurs

XEBMMIN: x where min envelope bending moment occurs

XESFCMAX: x where max envelope corrected shear force occurs

XESFCMIN: x where min envelope corrected shear force occurs

XESFMAX: x where max envelope shear force occurs

XESFMIN: x where min envelope shear force occurs

XETMMAX: x where max envelope torsion moment occurs

XETMMIN: x where min envelope torsion moment occurs

EBMABSMX: envelope maximum absolute bending moment

ESFABSMX: envelope maximum absolute shear force

ESFCABSMX: envelope maximum absolute corrected shear force

ETMABSMX: envelope maximum absolute torsion moment

XEBMABSMX: x where envelope maximum absolute bending moment

XESFABSMX: x where envelope maximum absolute shear force

XESFCABSMX: x where envelope maximum absolute corrected shear force

XETMABSMX: x where envelope maximum absolute torsion moment

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.

BMRANGE: bending moment range

SHRANGE: shear force range

TMRANGE: torsion moment range

Copyright © 1992 - 2016 NAPA. All rights reserved. 1865 / 7399


NAPA for Design Manuals 2016.3

opt: options:

F: output the result as a string obeying the quantity standard (format, unit). Default=as a
number.

FF: output the result as a string, free format (unit obeyed)

FZ: as F but without leading spaces

FU: as F but add unit symbol

DAM=damage: calculate the quantities for the given damage.

ENV=curv: envelope curve (can be used with envelope quantities only)

S: silent, no error message if quantity not recognized

C: check avalability (returns 1 if quantity eqcognized, otherwise 0)

N: shear force quantities calculated without correction (no SFCORR)

LD.SQNTX() strength related quantity (function of x)

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)

quantity, quantity to be returned:

BD: buoyancy distribution

BDFR: integral of buoyancy distribution over one frame spacing

BEND: bending moment

BMMN: min. permissible bending moment

BMMX: max. permissible bending moment

BMREL: % of permissible bend. mom.

DEFL: hull girder deflection

LMWX: longit. mom. of weight as function of x

LWD: lightweight distribution

MSTMAX: max. permissible combined stress

MSTOT: combined stress

RELBM: relative bending moment

RELSH: relative shear force

SFCORR: corrected shear force

SHEAR: shear force

SHMN: min. permissible shear force

SHMX: max. permissible shear force

SHREL: % of permissible shear force

SLOPE: slope of defl. curve

TMMN: min. permissible torsion moment

TMMX: max. permissible torsion moment

TORS: torsion moment

Copyright © 1992 - 2016 NAPA. All rights reserved. 1866 / 7399


NAPA for Design Manuals 2016.3

VMWX: vertical mom. of weight as function of x

WD: weight distribution

WDFR: integral of weight distribution over one frame spacing

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

EBMMAX: envelope max. bending moment (only with option ENV)

EBMMIN: envelope min. bending moment (only with option ENV)

ESFCMAX: envelope max. corr. shear force (only with option ENV)

ESFCMIN: envelope min. corr. shear force (only with option ENV)

ESFMAX: envelope max. shear force (only with option ENV)

ESFMIN: envelope min. shear force (only with option ENV)

ETMMAX: envelope max. torsion moment (only with option ENV)

ETMMIN: envelope min. torsion moment (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.

FF: output the result as a string, free format (unit obeyed)

FZ: as F but without leading spaces

DAM=damage: calculate the quantities for the given damage. Note that the whole option must
be in apostrophes.

ENV=curv: envelope curve (can be used with envelope quantities only)

...

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)

Get the bending moment at x=45.

@BMX=LD.SQNTX('BMMX')
@XBMX=LD.SQNTX('BMMX','A')

Get the max. bending moment and the corresponding argument as arrays.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1867 / 7399


NAPA for Design Manuals 2016.3

LD.STQNT() stability related quantity

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)

quantity, quantity to be returned:

HEEL: the heel argument

HPHI: righting lever (gz)

EPHI: integral of hphi, area under the curve

MS: MS, the residuary stability lever

FSMOM: free surface moment

T: draught

TR: trim

GZ: the gz-value

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.

FF: output the result as a string, free format (unit obeyed)

FZ: as F but without leading spaces

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.

quantity: as above. NOTE: heel and trim in internal units.

LD.STQNT(quantity,opt,arr)

As above but the result is returned in in the array provided.

options: I, as above

arr: receiving array

EXAMPLES
@T=LD.STQNT('T',20)

Get the draught at heel=20

LD.ELQNT() data for weight elements

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:

ID: name of the element

TEXT: descriptive text

W: weight

Copyright © 1992 - 2016 NAPA. All rights reserved. 1868 / 7399


NAPA for Design Manuals 2016.3

XCG: x-coord of center of gravity

YCG: y-coord of center of gravity

ZCG: z-coord of center of gravity

XMIN: lower x-limit

XMAX: upper x-limit

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

LD.ARG() get/set arguments

The function handles control functions done by the arguments.

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.

id: name of argument, three first characters relevant:

HULL: calculation hull

RHO: seawater density

MOD: calculation mode(s)

HEEL: heeling angles

ARR: arrangement version

LIG: lightweight version

FRSV: free surface argument

RULE: free surface rule: the actual rule, only for inquiring

SLACK: slack limits

WAVE: name of wave

YREF: fix cgy at y=0 (ON/OFF)

DFL: deflection (string record)

OPA: opening arrangement

AZI: azimuth angle

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)

This form assigns new values to arguments.

id: name of argument, as above except for ARR, OPA, ROP.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1869 / 7399


NAPA for Design Manuals 2016.3

newvalue: new value, either

arr: array containing the values. This form must be used if there are many values

value: value given directly, number or string depending on the argument

opt: (opt) options

N: do not update the loading condition. The update can be triggered later with LD.UPDATE.

S: do not raise the event 50003 (LD*CHANGEARG)

LD.OTSSTATE() state regarding open to sea

The function returns information regarding compartments open to sea.

state=LD.OTSSTATE()

The function value is 1 if there are compartments open to sea, else 0.

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.

LD.LOADMETHOD() how was a compartment loaded

The function tells how the compartment was filled when loaded.

value=LD.LOADMETHOD(compartment)

compartment: name of the 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

LD.FILLRANGE() set fill range for a compartment

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)

The function value is 1 if the range was properly defined

comp: designates the compartment:

name: name of compartment

ind: index

subset: array containing names (type 3) or indices (type 1) of load components. The operation
will be repeated for all these.

fillmin: minimum fill limit (percentage of net volume)

fillmax: maximum fill limit (percentage of net volume)

LD.USEDLOADS() get list of used loads

Copyright © 1992 - 2016 NAPA. All rights reserved. 1870 / 7399


NAPA for Design Manuals 2016.3

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)

array: string array for receiving the result

selection: (opt) selection criteria (see !EXP SELECT)

opt: options:

M: take mass loads only

T: take loads in compartments only

A: take only loaded compartments

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

array: string array for receiving the result

class: (opt) limit results to loads in the given load class, e.g. B for bunkers

opt: options:

M: take mass loads only

T: take loads in compartments only

A: take only loaded compartments (mass>0)

LD.LOAD() load compartment(s)

The function changes the load in a compartment or set of compartments.

LD.LOAD(comp,load,amount,dens,fill,opt)

comp: designates the compartment:

name: name of compartment

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.

load: substance, empty=keep original, IP=assign same as purpose

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.

dens: (opt) given density (default) or temperature

fill: (opt) upper limit for filling degree (fraction of volume). 0 or omitted=ignore.

opt: (opt) options:

V: 'amount' is volume of load, default=mass

H: 'amount' is load height, default=mass

Copyright © 1992 - 2016 NAPA. All rights reserved. 1871 / 7399


NAPA for Design Manuals 2016.3

I: 'amount' is an increment, default=new load

R: 'amount' is the relative load (MREL or VREL, dep. on option V)

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.

T: 'dens' is the temperature

M: make the same message in the log as the LOAD command

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.

S: secured grain cargo, i.e. the cargo cannot shift.

EXAMPLES
@LD.LOAD('R601','BW',100)

Load 100 tons of BW to R601. Previous contents replaced.

@LD.LOAD('R601','',10,'I')

Add 10 tons of the original load to R601.

@LD.LOAD('R601','',10,'IV')

As above, but the amount is the volume.

@LL=LD.SELECT('TYPE>L')
@LD.LOAD(LL,'',0)

Empty all tanks.

@LL=LD.SELECT('PURP=BW')
@LD.LOAD(LL,'BW',1,'R')

Fill all ballast water tanks.

LD.LOADDECK() load deck load

Load deck load (room not in arrangement). Part of the room may provide additional reserve
buoyancy.

LD.LOADDECK(comp,load,amount,bfac,hb,opt)

comp: name of the deck load

load: load substance

amount: amount of load, for interpretation see options.

bfac: buoyancy factor (between 0 and 1.0)

hb: limit height for buoyant part of the deck load

opt: options (opt)

V: 'amount' is volume of load, default=mass

H: 'amount' is height from the base line

Copyright © 1992 - 2016 NAPA. All rights reserved. 1872 / 7399


NAPA for Design Manuals 2016.3

LD.MASS() load/update mass loads

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)

The three first parameters are compulsory.

floc: formal location, identifies the load component. May be empty for a new load: assigned (load).

string: name given as such. See options for alternative interpretations.

ind: index

load: name of load, empty=no change

amount: amount in tons

pos: position of the load

x,y,z: coordinates given as separate parameters

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).

l: length in the x-direction

xmin,xmax: extension in the x-direction

xmin,xmax,ymin,ymax,zmin,zmax: extension in all directions. If 'pos' is omitted, the midpoints


are assigned as the position.

des: (opt) description, recorded as the quantity DES.

type: (opt) load type. Default=from SM. Note that description is compulsory if type is given (at least
empty string)

fsmom: (opt) free surface moment, default=0

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)

D: 'floc' designates DES (only for change of existing mass load)

I: 'amount' is an increment, default=new value.

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.

LD.MOVE() move loads

This functions moves loads between compartments. The function value is the moved amount
(tons).

moved=LD.MOVE(source,receiver,amount,fill,options)

source: compartments from which to move

name: single, named compartment

list: string array containing a list of names

Copyright © 1992 - 2016 NAPA. All rights reserved. 1873 / 7399


NAPA for Design Manuals 2016.3

receiver: receiving compartments

name: single, named compartment

list: string array containing a list of names

amount: (opt) amount to move, default=move as much as possible. 0=default.

fill: (opt) specifies upper limit on filling degree in receivers

options:

E: make the amounts equal. There must be only one source and receiver

R: relative: 'amount' is a fraction. There must be only one source compartment.

V: 'amount' and the function value are volumes, default=mass

M: message: add messages about changes in the log

N: do not update the loading condition (as in LD.LOAD).

T: keep temperature of the receiver, default=as in the source

EXAMPLE
@value=LD.MOVE('T100','T110')

Move as much as possible from T100 to T110.

@value=LD.MOVE('T100','T110',10)

Move 10 tons from T100 to T110.

@value=LD.MOVE('T100','T110','E')

Move between T100 and T110 to make amounts equal.

@source=arr(3)
@source(1)='T110' @source(2)='T111 '@source(3)='T112'
@value=LD.MOVE(SOURCE,'T1000')

Move as much as possible from T110, T111 and T112 to T1000.

LD.ADD() added loading conditions

The function handles added loading conditions as with command ADD.

rec=LD.ADD()

This form returns a list of added loading conditions in the current loading condition.

LD.ADD(name,opt)

Add/remove the given loading condition.

name: name of loading condition (with or without prefix)

opt: options

R: remove instead of add

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.

list: string array containing a list of loading condition names

LD.OTS() set open-to-sea property

orig=LD.OTS(comp,state,opt)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1874 / 7399


NAPA for Design Manuals 2016.3

Modify a given compartment. The function value is the state at the call, defined as 'state'

comp: name of compartment

state: (opt) new state, default=no change

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.

D: as N, but update the drawing as far as marking set of damaged compartments.

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

LD.BALANCE() move loads to balance the ship

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.

group1: first tank group

load: (string) all compartments with the given load

array: list of compartment names

opt1: (opt) string, options controlling 'group1'

FREE: allow amount to change without restriction, default if load=BW or WB

FIX: do not allow amount to change, default if load other than BW or WB

>amount: allow amount to change above the given minimum

<amount: allow amount to change below the given maximum

group2...: (opt) additional groups

opt2...: (opt) options for the additional groups

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.

1: target trim (T), default=1

2: target heel (H), default=1

Copyright © 1992 - 2016 NAPA. All rights reserved. 1875 / 7399


NAPA for Design Manuals 2016.3

3: minimize change (C), default=0.1

4: minimize total (L), default=1

opt: general options, string combined from the alternatives below (note: compulsory item, may be
empty)

M: make messages in the log about changes done

N: do not update the loading condition (more changes coming, finish by calling LD.UPDATE()).

I: trim and heel are in internal units (radians)

U: all tanks given as one list, not possible to give separate options for different loads in the list

FR: all amounts free

FX: all amounts fixed

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','')

Balance the ship to even keel using ballast water.

@LD.BALANCE(2,-999,'BW','FIX','')

Balance the ship to trim=2 using ballast water as already loaded. Influence on heeling ignored.

@tlist=arr(3) @tlist(1)='T101' @list(2)='T102'


@LD.BALANCE(0,0,TLIST,'')

Balance the ship using the given tanks.

@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).

LD.DELETE() delete loads

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)

sel: load components concerned

string: name given as such. See options for alternative interpretations.

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:

L: 'sel' designates LOAD, default=NAME (i.e. the formal location).

D: 'sel' designates DES

EXAMPLES
@LD.DELETE('T123#2')

Delete the additional load component in T123.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1876 / 7399


NAPA for Design Manuals 2016.3

@LD.DELETE('PASS','L')

The (first) component with LOAD=PASS is deleted.

@LL=LD.SELECT('MASS=0','M')
@LD.DELETE(LL)

All unused mass loads are deleted.

LD.AUTOLD() Define tank loadings with strength limitations

The function loads given tanks such that a desired floating


position is achieved by taking into account strength limitations
(bending moment and shear force) and KG/GM limitations.

--------------------------------------------------------------------

LD.AUTOLD(val,target,group1,opt1,lopt1,group2,opt2,lopt2)

val: (real array): deviations of the object function values

Deviation of the object functions from


the targets in the target array and possible
group options other than 'FREE'. The deviation from
angular target quantities trim (TR) and heel (HE) are
returned in meters and degrees respectively.
The stress targets (MN and SN) are within tolerances
when the deviation is between 0 and 1.
A positive value means that the target is within tolerance.
Similarily a negative value means that the target in question
does not lie within tolerance.
In addition as the last index
of the 'val'-array the status of the result is assigned:
1 All object functions within tolerances
0 One or several object functions do not meet tolerances
-1 One or several object functions way out of line or
an error has occurred during calculation.

target: (string array): list of target functions:

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

T opt3: draught (excluding displacement target)

DISP opt3: displacement

TA opt3: draught aft

TF opt3: draught fore

KG: maximum KG limit

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1877 / 7399


NAPA for Design Manuals 2016.3

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

An alternative way to give the GM-limits is to


use the LD.LIMDEF-command. In this case the
GM- and TR-tables should be of the form:

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

Another alternative way to give the GM-limits


using the LD.LIMDEF-command is to
use displacement (quantity DISP) instead of
draught (T). In this case the GM- and TR-tables
should be of the form:

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1878 / 7399


NAPA for Design Manuals 2016.3

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

group1: first tank group

string: all compartments with the given load


string array: list of compartment names

opt1: loading group option:

FIX: do not allow amount to change


(default)
FREE: allow amount to change without restriction
MIN: minimize load
MAX: maximize load
=amount: use the given amount
>amount: allow amount to change above the given minimum

lopt1: loading and unloading group option:

LOA: Each tank has a minimum load equal to the load


amount at start
UNL: Each tank has a maximum load equal to the load
amount at start
' ': Use empty string if this option is not
needed (default)
real array loptarr1: LOAd or UNLoad option with user given
minimum or maximum loads for each compartment.
loptarr1(i)<0 -> Maximum load for compartment i
in group1 array
loptarr1(i)>0 -> Minimum load for compartment i
in group1 array

group2...: (opt) additional group

opt2...: (opt) options for the additional group

Copyright © 1992 - 2016 NAPA. All rights reserved. 1879 / 7399


NAPA for Design Manuals 2016.3

lopt2...: (opt) LOAding or UNLoading option for the additional group

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')

LD.MASSTOCRANE() attach a mass load to a crane or detach it

The function attaches a mass load to an existing crane. Optionally, it can be used to detach a
mass load from a crane.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1880 / 7399


NAPA for Design Manuals 2016.3

LD.MASSTOCRANE(floc,crane)

Attach mass to a crane.

floc: formal location of the mass load

crane: name of the crane

LD.MASSMASSTOCRANE(floc)

Detach a mass from any cranes.

LD.NEW() initiate new loading condition

LD.NEW(name)

The effect is equivalent with NEW name.

name: name of the new loading condition

LD.GET() make loading condition current

LD.GET(name)

The effect is quivalent with GET name.

name: name of the loading condition, may contain the data base prefix LD*CON()

LD.SAVE() save loading condition

LD.SAVE(opt)

The current loading condition is saved in the data base.

opt: !: save even if already exists

LD.RENAME() rename the current loading condition or given definition

LD.RENAME(name,opt)

The effect is the the same as RENAME name.

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".

sel: select the type of definition

LCUR: limit curve

LCGR: limit curve group

oldname: old name of the definition

newname: new name of the definition

opt: options

!: Force replace the definition if a definition with the newname already exists.

LD.STATUS() change status

Copyright © 1992 - 2016 NAPA. All rights reserved. 1881 / 7399


NAPA for Design Manuals 2016.3

The function value is 1 if the current loading condition has been changed but not stored, else 0

LD.EXISTS() Test existence

The function value is 1 if the description exists, else 0.

LD.EXISTS(name,type)

name: name of description

type: (opt) type, alternatives are LOAD (default), LGR, LCUR, LCGR, LIG, ENV and WAVE

LD.DRW() draw loads to the setup

The function plots loads in compartments in the setup.

LD.DRW(set,opt,source)

set: set of load components

name: name of compartment

ind: index in the set of loads

empty: all loads in the source

list: array containing names of loads or indices, for example from LD.SELECT.

opt: options, string containing

H: add hatching showing partial filling

HH: as H but in all projections

T: show liquid surfaces with real inclination. NOTE!: trim and heel taken acc. to the current
loading condition.

B: paint with background to erase a possible previous load

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')

Draw the load in compartment R601.

@d=tp.dmr('TAB*TABLOAD')
@ld.drw('','',D)

Draw the loads in the given table.

LD.DRWMASS() draw mass loads into the setup

LD.DRWMASS(sel,opt,source,size,col)

set: set of load components

name: name, see option D, L

ind: index in the set of loads

Copyright © 1992 - 2016 NAPA. All rights reserved. 1882 / 7399


NAPA for Design Manuals 2016.3

empty: all loads in the source

list: array containing names of loads or indices

opt: options, string containing

L: name refers to LOAD, default=formal location (NAME)

D: name refers to DES

E: plot according to the recorded extension, default=mark a symbol of fixed sise

X: mark the x-extension with an arrow

P: fill according to the load

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.

col: colour, default=from DRW MOPT, initially 6 Not used if P option.

LD.DRWAUTO() control of automatic drawing

This function controls updating of the graphic display after load changes.

LD.DRWAUTO(sel)

This form selects between the following basic cases:

sel: case:

OFF: no automatic drawing

ON: automatic update of compartments

M: as M, but also for mass loads

GEN: general control, must be defined by the form below

CANCEL: cancel general definition (from the form below)

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.

vl: integer array, list of views. 0=plot without changing view.

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.

mll: similarly for mass loads.

dll: similarly for marking damaged compartments

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.

dopt: (opt) options for marking damages, values as in DRW DOPT.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1883 / 7399


NAPA for Design Manuals 2016.3

LD.DRWAUTO('UPD',view)

Update the display according to current settings.

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')

Same as DRW AUTO;

@ld.drwauto(0,2,3)

Show compartments in layer 2 and mass loads in layer 3 of the current view.

@lll=arr(1) @mll=arr(1); @lll(1)=2 @lll(2)=2 @mll(1)=2 @mll(2)=2


@vl=arr(1) @vl(1)=1 @vl(2)=2
@ld.drwauto(vl,lll,mll)

Maintain the display of loads in two views, using layer 2 in both of them.

LD.DRWOPT() get/set drawing options

The function sets or assigns the option controlling plotting of loads.

opt=LD.DRWOPT(case)

Inquire the current option.

case: L=loadings in compartments, M=mass loads

LD.DRWOPT('L',option)

Assign option for loads in compartments.

option: new option, see command DRW OPT

LD.DRWOPT('M',option,size,col)

Assign option for mass loads.

option; string option (see DRW MASS)

size: (opt) size of mass symbol

col: (opt) colour of the symbol

LD.LDINSECTION() plot loads in a section

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)

object: provides the geometry of the section either

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.

trim: (opt) trim (m), default 0

Copyright © 1992 - 2016 NAPA. All rights reserved. 1884 / 7399


NAPA for Design Manuals 2016.3

heel: (opt) heel (degrees), default 0

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

B: erase possible old loads by filling with background colour

H: mark slack tanks with hatching, z-projection only

HH: as H, but also when not otherwise seen

HHH: always

P: mark slack tanks in z-plans by filling partially, overrides H

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.

@fcarr=arr(3) @fcarr(1)='FLW' @fcarr(2)='C-HFO'


@tarr=arr(2) @tarr(1)=5 @tarr(2)=3
@ld.ldinsection('R601',fcarr,tarr,2.3,5)

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.

LD.TOTABLE() update table from loading condition

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.

crit: criterion in the normal selection syntax, e.g. TYPE=X

iarr: integer array, containing indices of the load components

opt: options:

A: add: add new loads if needed, default=only update parameters of items already in the table

R: remove loads not in current loading condition (or subset)

F: update also the floating position recorded in quantities HEEL, TR, TRIMX

E: (exclusive) same as A+R

G: remove #2 entry if no additional load

U: update the table lines concerned

M: mass loads only, default=acc. to the table definition

C: compartments only

D: mass loads identified by DES, default=NAME

L: mass loads identified by LOAD

Copyright © 1992 - 2016 NAPA. All rights reserved. 1885 / 7399


NAPA for Design Manuals 2016.3

EXAMPLES
@LD.TOTABLE(0,'C')

Transfer loads from the current loading condition to the compartments listed in the table
currently in the work area.

LD.FROMTABLE() update loading condition from table

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.

crit: criterion in the normal selection syntax, e.g. TYPE=X

iarr: integer array, containing indices of the load components

opt: options:

M: mass loads only, default=acc. to the table definition

C: compartments only

S: obey subset. The source table must the current one.

D: mass loads identified by DES, default=NAME

L: mass loads identified by LOAD

T: same LTYP=(any type in the table), given as 'select'

N: do not recalculate the loading condition (see LD.LOAD)

LD.FROMTABLE(table,group,opt)

This form does the transfer according to the old conventions (before rel. 2001).

table: source table, as above

group: M=mass loads, C=compartment loads

opt: options:

E: exclusive: assign mass=0 to load components not in the table default=assign those in table.
Obeys 'select'.

R: as E, but in case of mass loads, remove rather than assign 0.

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

C: (mass loads) as T, but the criterion is based on the class.

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.

LD.CTU() control table updates

Copyright © 1992 - 2016 NAPA. All rights reserved. 1886 / 7399


NAPA for Design Manuals 2016.3

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)

id: identifier of the rule (freely selected string)

table: table concerned by the rule

crit: selection criterion, e.g. TYPE>L, controls transfers to the table. Assign empty if not needed.

options: options controlling the effect, one or several of

M: the rule is for mass loads only

C: the rule is for compartments only

A: add the component if missing

E: exclusive, remove lines in the table not corr. to loads

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)

Change of CTU state:

setting:

OFF: make inactive

ON: make active again

DELETE: cancel permanently

LD.CTU(id,'OFF')

Cancels a given partial rule in the current CTU.

id: id of the rule (as in the main acse)

LD.LIGTOTABLE() transfer weight elements to a table

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.

opt: (opt) options:

U: update (by default table is emptied first)

LD.TABLETOLIG() load lightweight elements from a table

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1887 / 7399


NAPA for Design Manuals 2016.3

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.

LD.LIGDIST() lightweight distribution type

This function returns the type and descriptive information on the lightweight distribution in the
given lightweight version

LD.LIGDIST(ligv,type,txt)

ligv: name of the lightweight version

type: (opt) string variable for distribution type

txt: (opt) string variable for additional informative text

LD.LIGDES() lightweight definition information

This function returns various data from the given lightweight version.

LD.LIGDES(ligv,arr)

ligv: (opt) name of the lightweight version

arr: string array for receiving the data, the items are:

1: lightweight version (can also be input)


2: descriptive text
3: distribution type (ELEM/DIM/LLOY/USER/NONE)
4: weight (xa, xf limits if specified)
5: cgx
6: cgy
7: cgz
8: distribution definition (DIM/USER, cb for LLOY)
9: number of lightweight elements
10: element table name
>10: manually defined elements (not in the table)

LD.LIGDESCTW() lightweight centre of twist definition information

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)

return 1 if CTW is defiend and 0 if CTW is missing in the lightweight definition.

ligv: name of the lightweight version

LD.LIGDESCTW(ligv,coord,arr)

ligv: name of the lightweight version

coord: coordinate to read the data for (X, Y and Z)

arr: real array to return the data in (will be emptied)

LD.LIGSTATUS() status of the LGDEF subtask

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:

Copyright © 1992 - 2016 NAPA. All rights reserved. 1888 / 7399


NAPA for Design Manuals 2016.3

STATUS: return current status (default)


OPEN: open the LGDEF task for LD.LIGCOMMAND
CLOSE: close the LGDEF task
RESET: reset the LGDEF task (close and open)

LD.LIGCOMMAND() run command in LGDEF task

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() run command of the LD task

This function runs any command available in the loading task.

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)

As above, but the command identifier is given separately.

id: command identifier

parameters: string containing the parameters.

LD.COMMAND(id,arr)

As above, but the parameters are fed by an array.

LD.OPEN() open loading conditions

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.

LD.RESET() restore initial state

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.

LD.UPDATE() start updates

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

A: arrangement or geometry changed

P: load properties changed

N: do not trigger the LD.CHANGE event.

U: start recalculation and generate event (same as default)

FRS: update free surface results

LD.GETDEF() get definition into macro

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1889 / 7399


NAPA for Design Manuals 2016.3

LD.GETDEF(subj,name,macro,opt)

subj: subject, first three character are relevant:

LOAD: the loads

FRS: the current free surface rule

PRI: priorities

PAIR: tank pairs

SUP: tank supports

LIG: lightweight definition (without elements)

I: stiffness distribution

LCUR: limit curves

LCG: limit curves + limit curve group

name: (opt) name of the group/curve, supported only with LCUR and LCG

macro: receiving macro

options:

A: add, default=remove initial contents of 'macro'

G: with LCG, get only the group definition

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.

LD.RUNDEF() run definition 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.

LOAD: the loads

FRS: the current free surface rule

PRI: priorities

PAIR: tank pairs

SUP: tank supports

LIG: lightweight definition

I: stiffness distribution

LCUR: limit curves

LCG: limit curve group (see !EXPL LD.GETDEF and option 'G')

LD.GROUPMEMBERS() members of a loading condition group

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1890 / 7399


NAPA for Design Manuals 2016.3

list=LD.GROUPMEMBERS(name,arr,opt)

name: name of the loading condition group. May contain the database prefix.

arr: (opt) string array for storing results

opt: (opt) options:

P: returns the database name in the result: LD*CON(name).

LD.DATE() date of loading condition

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)

The date is the internal date.

name: name of loading condition, date base prefix (LD*CON) optional

opt: options:

L: return the date of the loading condition itself

H: return the date of the hull

W: return the date of the lightweight

A: return the date of the arrangement

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'))

LD.API() run API function

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1891 / 7399


NAPA for Design Manuals 2016.3

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')

Get the GM of the current loading case.

LD.PREPDECKLOAD() prepare deck loads

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

LD.DECKLOADS() inquire deck loads in the current loading condition

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

bf: (opt) real array for receiving the buoyancy factors

zlim: (opt) check that there is no buoyant part above the given limit height from the baseline

LD.MASSLOADS() inquire mass loads in the current loading condition

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1892 / 7399


NAPA for Design Manuals 2016.3

LD.SFCDEF() get shear force correction definition data

The function fetches the shear force correction definitions into arrays.

LD.SFCDEF(lcase,dam,xa,ca,cf)

lcase: (opt) name of load case (default = current)

dam: (opt) name of damage case (lcase option is needed)

xa: real array for x-coordinates

ca: (opt) real array for corrections aftward from the point

cf: (opt) real array for corrections forward from the point

LD.SFCINFO() inquire shear force correction

The function returns 0 if shear force correction is not defined for the specified loading condition

n=LD.SFCINFO(lcase,damcase,arr)

lcase: (opt) name of load case (default = current)

damcase: (opt) name of the damage case (also lcase required)

arr: (opt) string array for info on the SFC definition

LD.TASKSTATUS() get status of the LD task

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()

LD.LCGMEMBERS() get information on limit curves in limit curve group

The function returns the size of the result arrays.

n=LD.LCGMEMBERS(name,namearr,typarr,tarr,tabarr)

name: name of the group

namearr: string array for receiving the limit curve names

typarr: (opt) string array for curve types

tarr: (opt) real array for draught values

tabarr: (opt) string array for table names if curve is defined from LCUR table(s), otherwise empty string
is returned.

desarr: (opt) string array for description texts of the curves

LD.LCURDES() Get limit curve data

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)

lcur: name of the limit curve

xarr: (opt) real array for returning the x-coordinates

minarr: (opt) real array for returning the minimum limit values

maxarr: (opt) real array for returning the maximum limit values

Copyright © 1992 - 2016 NAPA. All rights reserved. 1893 / 7399


NAPA for Design Manuals 2016.3

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.

LD.LCURTOTAB() convert strength limit curve into table

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)

lcur: name of the limit curve

table: table name or a string array containing max. two table names, in which case the minimum
limits are stored in a separate table.

opt: (opt) options:

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() get descriptive text

The function returns the descriptive text of a given definition

LD.GETDESCRTEXT(name,type)

name: name of the definition, e.g. limit curve name

type: type of the definition

LCUR: limit curve

LCGR: limit curve group

FRS: free surface rule

LIGV: lightweight version

LGR: loading condition group

LD.CRANES() inquire defined cranes

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

LD.CONTLOADS() inquire container loads in the current loading condition

The function returns the names or count of container loads in the current loading condition.

nr=LD.CONTLOADS()

Return the number of container loads in the current loading condition.

name=LD.CONTLOADS(nr)

Return the name of the given container load..

nr: index of the container load (1=first one etc). If nr is out of range, empty is returned without error
message.

LD.UPDCONTLD() update/create/delete container load

Copyright © 1992 - 2016 NAPA. All rights reserved. 1894 / 7399


NAPA for Design Manuals 2016.3

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

A: add if not existing

D: delete the given container load from the loading condition

R: replace the given container load with the one current under CL.

LD.DRSURVEY() Draught survey

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.

heel: (opt) heeling angle (deg).

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1895 / 7399


NAPA for Design Manuals 2016.3

ind. 1 : draught at xref from the base line (m)


ind. 2 : trim (m)
ind. 3 : heeling angle (deg)
ind. 4 : draught at AP from the base line (m)
ind. 5 : draught at xref including deflection (m). For
calculation of the deflection, there must be
observations minimum at 3 different
x-coordinates.
ind. 6 : draught at FP from the base line (m)
ind. 7 : equivalent T (m), i.e. T if the ship would not be
deformed (defl.=0)
ind. 8 : deflection at XREF (>0, hogging; <0, sagging)
ind. 9 : correction mass (t), i.e. difference between
the observed and calculated displacement
ind.10 : longit. location of the correction mass (m), i.e.
where should the correction mass located to
compensate the longit. moment difference
ind.11 : transverse location of the correction mass (m),
i.e. where should the correction mass located
to make the ship heel as observed. This item will
be calculated only if the vertical position
of the correction mass zcm is given as the last
parameter.

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).

dfl: (output) as xar,tar but in character string format.

t: draught (m)

trim: trim (m)

LD.DDRSURVEY() Draught survey for damaged hull

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.

LD.DRMARKS() Readings at the marks

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)

t: mean draught (m).

tr: trim (m).

heel: heeling angle (deg).

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.

readings: (output) array containing the readings at the marks.

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)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1896 / 7399


NAPA for Design Manuals 2016.3

dfl: (output) as xar,tar but in character string format.

LD.RDOT() read tank data from the automation system

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.

progfile: name of program file of the reading program

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

opt: (opt) options

F: update also values marked as exceptions

R: update only lines in the current subset

S: update only columns in the current column selection

E: mark assigned values as exceptions

C: mark assigned values as calculated

O: mark assigned values with a special status=2 (counted as exception by TP)

LD.RDOTAB() read table from the online system

This function reads data in table form from the online automation system (header #TABLE).

LD.RDOTAB(table,progfile,options,opt)

table: receiving table, for alternatives, see !expl tp.stdpar.

progfile: name of program file of the reading program

options: string passed to the reading program. Special case: FILE: get the results directly from the file
'progfile'.

opt: (opt) options

F: update also values marked as exceptions

U: update: do not add new items, only update values. The table must have a key column,
which is present in the input.

R: update only lines in the current subset, implies U.

E: mark assigned values as exceptions

C: mark assigned values as calculated

O: mark assigned values with a special status=2 (counted as exception by TP)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1897 / 7399


NAPA for Design Manuals 2016.3

X: replace preceding contents.

I: ignore without message parts (#TABLE) that do not match the current receiver

LD.RDOF() read floating position from the automation system

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.

progfile: name of program file of the reading program

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.

LD.RDOM() read arbitrary measures

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)

The form reads labeled measures under the header #MEASURES.

progfile: name of program file of the reading program.

options: string passed to the reading program. Special case: FILE: get the results directly from the file
'progfile'

idarr: string array for receiving the identifiers

varr: string array for receiving the values

opt: options:

A: add to preceding contents of idarr, varr, default=replace

U: update: update values in varr, as far as given in the input

R: store repetitions of the same identifier, default=keep only the last value

LD.RDOM(progfile,options,varr,opt)

The form reads arbitary text under the header #TEXT.

progfile: as above

options: as above

varr: string array for receiving the texts

opt: options:

A: add to preceding contents of varr, default=replace

Copyright © 1992 - 2016 NAPA. All rights reserved. 1898 / 7399


NAPA for Design Manuals 2016.3

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

The example lists all text items in the file temp/test2.

LD.OBNFLP() get/assign floating position data

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)

id: quantity in question, TA,TF=draught aft/fore, HEEL=heeling (radians), TR=trim (radians),


TRIM=trim (m, trim sign obeyed),

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.

opt: (opt) modifies the effect, one or both of

S: 'newvalue' is the definition status

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')

Assign definition status=2 and update.

LD.OBNWFV() return watch float value

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.

LD.VCASTM() volume correction factor from the ASTM standard (ObN)

The function returns the volume correction factor for a given temperature, reference density
and table.

vcorrf=LD.VCASTM(table,dens,temp,alfa,opt)

table: name of table

dens: reference density

temp: temperature

Copyright © 1992 - 2016 NAPA. All rights reserved. 1899 / 7399


NAPA for Design Manuals 2016.3

alfa: (opt) temperature coefficient (needed for some tables)

opt: options:

A: density given as API density (default=ton/m3)

F: temperature given in Fahrenheit (default=Celsius)

C: just check the parameters: function value=0 or error code (5361...5364). Alfa not needed.
Default=make normal error messages.

LD.DENSCONV() convert different representations of density

The function converts a density from one representation to another.

rhores=LD.DENSCONV(rho,repin,repout)

rhores: density in the new representation

rho: given density

repin: representation of the given density

RHO: ton/m3

SPG: specific gravity. The conversion may be done with a built-in formula or using a table, see
below.

STF: stowage factor

API: API density

repout: representation of the result, alternatives as above.

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 density 0.912 ton/m3 is converted to specific gravity.

LD.LIMDEF() assign table of limit values

The function defines the table to be used for calculating the quantities MINGM, MAXKG, TRLA,
TRLF in LD.QNT.

LD.LIMDEF(case,table)

case: GM=for mingm/maxkg, TR=for trim limits.

table: (opt) name of table or table reference number. If omitted, name of the current table is returned
as the function value.

LD.OBMODE() assign/inquire onboard mode

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)).

LD.FLPOS() floating position

Copyright © 1992 - 2016 NAPA. All rights reserved. 1900 / 7399


NAPA for Design Manuals 2016.3

The function calculates the floating position of the ship in water with the specified density.

LD.FLPOS(rho,flpos)

rho: density of sea water (t/m3)

flpos: array for output.

ind. 1 : mean draught (m)


ind. 2 : trim (m)
ind. 3 : heel angle (deg).

LD.GROSTATE() check for grounding

The function returns information about grounding.

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.

LD.DAMDEF() damage definition commands

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.

command: any damage definition command, e.g. LD.DAMDEF('PHASES 3').

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.

arr: string array containing the commands.

LD.DAMDEF('RESET')

Make the damage definition command set empty.

LD.CALDAM() Calculate damage

Calculate damage as defined by the loading table.

LD.CALDAM(opt,scope)

opt: calculation options for DA's CALC-command.

scope: (opt) S, calculate also strength for the damage.

LD.DSQNT() strength related quantity in damage (total)

Get strength related quantities of the damage calculated by the function LD.CALDAM.

LD.DSQNT(qnr,resar)

qnt: quantity, same selection as for LD.SQNT.

resar: receiving array, one element for each phase of damage.

LD.SIMPLIFYWD() simplify weight distribution

Copyright © 1992 - 2016 NAPA. All rights reserved. 1901 / 7399


NAPA for Design Manuals 2016.3

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)

version, lightweight version

spacing: spacing of arguments, 1=every frame, 2=every second etc

opt: options

T: temporary, do not save the result

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.

LD.DLEVELH() height of cargo and/or water level in flooding condition

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)

comp: name of compartment

hc: height of cargo level (m)

hw: height of water level (m).

LD.FROMPTABLE() update loading condition from process table

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)

table: process table, expressed as in TP functions (e.g. name)

time: time for generating the loading condition

sec: time in seconds (number)

wall-time: time expressed as hh:mm (string)

opt: options

Z: treat undefined values as zero or empty, default=ignore. Refers to values undefined


because time earlier than first assignment.

C: ignore a possible initial condition (event type INIT). The modifications are done to the
current loading condition as such.

LD.TOPTABLE() update process from current loading condition

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1902 / 7399


NAPA for Design Manuals 2016.3

LD.TOPTABLE(ptable,time,nrule,node,level,options)

ptable: the process table

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).

nrule: name rule for the identifiers:

sss#: sss=fixed part, #=assigned the first free index.

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#

ER: special case, apply convention defined for the ER application

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).

J: use step events for vload (default if nor ER option)

X: ignore changes of arguments

S: raise no TP events

T: register also changed LTYP

E: register also changed x-extension of mass loads (as L=length)

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.

LD.PFUNCTION() loading condition property as function of time

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.

ptable: the process table

arg: record for receiving or optionally giving the time arguments

funct: record for receiving the function values

Copyright © 1992 - 2016 NAPA. All rights reserved. 1903 / 7399


NAPA for Design Manuals 2016.3

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.

astep: (opt) argument step or count

0: (default) use the time arguments of the process table

step: divide the time range into intervals of 'step' seconds

-nr: divide the time range into 'nr' intervals

x: (opt) x-coordinate for calculating quantity dependent on x. May also be given with the quantity
in the form BEND.x

opt: options

I: 'arg' is input, i.e. it already contains the time arguments

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.

T: set tide for each time argument. See LD.DEFTIDE.

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.

ptable: the process table

rtable: table for receiving the result

astep: (opt) argument step or count, as above

opt: options, as above

S: silent, send no events during generation

LD.UPDATEPTABLE() update process table

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)

ptable: the process table

time (opt) restrict the update to events later than this time, expressed as seconds (numeric value) or
clock time (string).

opt: options:

A: generate at all changes, default=only at events NODE or CHECK

T: (with A): use tolerance 5 s to distinguish betwen events at different times, default=1. TT=use
60 s tolerance.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1904 / 7399


NAPA for Design Manuals 2016.3

N: do not update quantities

E: raise event LD.PTABLE (50008) after generating a new load case. Allows additional actions
to be connected to the operation.

LD.FLSTOPTABLE() update process table

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)

ptable: the process table

time (opt) restrict the update to events later than this time, expressed as seconds (numeric value) or
clock time (string).

opt: options:

T: use tolerance 5 s to distinguish betwen events at different times, default=1. TT=use 60 s


tolerance.

P: use prediction of progressive flooding instead of time-accurate simulation.

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.

LD.DEFTIDE() define tide as function of time

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.

t1: time (seconds) when low tide occurs

h1: height of tide at t1

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.

ht: maximum value (largest deviation from average)

t0: reference time, seconds from midnight, see 'rt'

rt: (opt) interpretaion of t0, default=R

R: t0 gives the time when the tide is zero and rising

D: t0 gives the time when the tide is zero and decreasing

T: t0 gives the time when the maximum tide occurs

B: t0 gives the time when the minimum tide occurs

Copyright © 1992 - 2016 NAPA. All rights reserved. 1905 / 7399


NAPA for Design Manuals 2016.3

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).

name: name of table (TAB*...)

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).

name: name of result, beginning with TIDE*.

LD.DEFTIDE('OFF')

Cancel the tide.

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.

LD.TIDE() return height of tide

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.

h: height of tide (from the neutral)

rtime: (opt) reference time, default=0. The first occurrence after the reference time is returned.

opt: options for this case, H compulsory

H: marks this case

R: return the time when the tide is rising, default=first time with given h

D: return the time when the tide is decreasing

LD.BREACH() get breach(es)

The function returns list of all breaches defined for the current loading condition or definition
data of the specified breach.

nr=LD.BREACH()

Returns number of breaches.

LD.BREACH('CAT',arr)

Get list of all breaches of the current loading condition.

arr: receiving string array.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1906 / 7399


NAPA for Design Manuals 2016.3

LD.BREACH('DES',id,arr)

Get definition data of the specified breach of the current loading condition.

id: identification of the breach.

arr: receiving string array.

LD.GQNT() get data related to grounding

The function returns the value of a quantity related to grounding.

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'.

qnt: quantity to be returned:

NR: number of contacts as in definition data

TIDE: tide

TIME: time of tide

DEPTH: depth of water at the contact including 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.

LD.GROUND() get definition of ground

The function returns definition data of the current ground.

des=LD.GROUND('DES')

Return definition data in input format.

tp=LD.GROUND('TYPE')

Return type of grounding. The alternatives are 1C, 1F, 2C, 2F, SC and SF.

LD.BRECOMPS() compartments in way of damage

The function returns list of compartments which are in way of damage, i.e. opened by a
penetration (breach).

n=LD.BRECOMPS(breach,comps)

breach: identification of breach (see command BREACH)

comps: receiving array for the breaced compartments

n: function value, number of compartments in array comps.

LD.FRULE() get explanation for frule code(s)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1907 / 7399


NAPA for Design Manuals 2016.3

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)

code: (opt) get explanation for the given code only

LD.FRSRULES() get list of known free surface rules

The function returns the number of knwon free surface rules. The rule names are listed in the
array

LD.FRSRULES(array)

array: string array for receiving the rule names

LD.FRSEXCEPTIONS() check for free surface exceptions in a load case

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() Get extreme case name in given postion.

Get curve name which causes extreme value in given position.

LD.ENVEXT(curve,qnt,position)

curve envelope curve name

qnt envelope curve quantity


(ESFMAX,ESFMIN,ESFCMAX,ESFCMIN,EBMMAX,EBMMIN,ETMMAX,ETMMIN)

position x-coordinate, 'min' or 'max'

LD.ENVQNTS() Get envelope curve quantities.

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)

curve envelope curve name

array string array for receiving the envelope quantities. The possible alternatives are BEND, SHEAR,
SFCORR and TORS.

8. Events

LD*LCHANGE() change of loading component

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)

name: loading component changed (compartment or formal location).

type: type of change: L=compartment, M=mass load.

LD*CHANGE() loading condition changed

Copyright © 1992 - 2016 NAPA. All rights reserved. 1908 / 7399


NAPA for Design Manuals 2016.3

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() argument changed

This event is raised when an argument has been changed (50003).

LD.CHANGEARG(id)

id: tell what argument has changed, id of command (3 char)

LD*GETCOND() loading condition read from the data base

This event is raised when a loading condition has been made active by reading from the data
base (50004).

LD*GETCOND(name)

name: name of the loading condition

LD*NEWCOND() new loading condition created

This event is raised when a loading condition has been made active by making a new one
(50005).

LD*NEWCOND(name)

name: name of the loading condition

LD*OTSCHANGE() open to sea property changed

The even is raised when the set of compartments being open to sea has change (command
OTS or LD.OTS). (50007)

LD*OTSCHANGE(stat)

stat: 0/1: no/yes: theer are compartments open to sea

LD*SAVECOND() loading condition written to the data base

This event is raised when the current loading condition has been written to the data base
(SAVE or REPLACE) (50006).

LD*SAVECOND(name)

name: name of the loading condition

LD*RRADD() roro load component added

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

lane: name of lane

LD*RRCHGLANE() lane changed

Copyright © 1992 - 2016 NAPA. All rights reserved. 1909 / 7399


NAPA for Design Manuals 2016.3

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)

line: line number of load primarily changed. May be 0.

lane: name of lane concerned

type: type of change: -1=load deleted, 1=load added, 2=load moved, 3=length of load changed.

LD*RRCHGLOAD() 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.

LD*RRLOADSTORO() storo load changed

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)

line: line number of load changed.

name: name of storo area

LD*RRCHGSTORO() storo/break bulk areas changed

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)

line: line number of load changed.

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.

LD*RRNEWL() default load changed

The event is raised when the default load (as set with RRL L) is changed (50017)

LD.RRNEWL(load)

load: the new load

LD*RRLOADBRB() break bulk load changed

The event is raised when a break bulk load has been changed (50018).

LD.RRLOADBRB(ind,blind)

ind: index of changed load area (line number in the table)

blind: index of changed line in the booking list, 0=none

Copyright © 1992 - 2016 NAPA. All rights reserved. 1910 / 7399


NAPA for Design Manuals 2016.3

Container Loading (CL)

Container Loading (CL)


Container loading subsystem (CL)
General principles (CL)
Defining container arrangements (CL)
Auxiliary definitions (CL)
Loading functions (CL)
Drawing functions (CL)
Output functions (CL)
Command specifications (CL)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1911 / 7399


NAPA for Design Manuals 2016.3

Container loading subsystem (CL)


The container loading subsystem contains functions supporting the design of container arrangements and creating container loads for use as
such or as parts of loading conditions.

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

definition of container arrangements


drawing container arrangements as such or in arrangement plans
output of container counts and other properties
definition of container loads
output data for container loads in table or graphic form
adding container loads to loading conditions

2. Connection to other subsystems


Geometry (definitions):

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:

A modified lateral wind profile can be generated from a container load.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1912 / 7399


NAPA for Design Manuals 2016.3

Installation of container loading


The map also shows the direct access to the drawing task, without leaving container loading.

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).

4. Handling container loads under loading conditions (LD)


Containers cannot be added directly to load cases (except as ordinary mass loads), but are collected into container loads, added as a whole.
Defining a container load can be a fairly complicated process, and this task can be managed more easily when done independently of loading
conditions, and the result can be used repeatedly by combining it with different 'ordinary' load components or with different other container loads.
This principle is also dictated by the need to minimize the interdependence between the two large subsystems, LD and CL.

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

The listing and drawing 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.

Defining container types


This function is not necessarily ship dependent and standard type definitions can be prepared.
Defining the owner numbering system
To some extent, a numbering system can be standardized, but there is likely to be ship specific exceptions requiring adaptations.
Defining container arrangements
The potential container locations are defined, beginning with the basic components, which can be combined into larger sets.
Defining container loads
Different ways of using the container positions are defined.
Independent analyses of container loads
Calculations and graphic presentations of the container loads can be prepared independently of other subsystems.
Analyzing loading conditions containing container loads
The behaviour of the ship as a whole is studied, when loaded with containers. This includes the effect on the wind area in stability criteria.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1913 / 7399


NAPA for Design Manuals 2016.3

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1914 / 7399


NAPA for Design Manuals 2016.3

General principles (CL)


Table of Contents:

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.

Defining a container load means placing containers into a container arrangement.

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.

2. Parts of a container arrangement


Logically, a container arrangement is considered formed by a three dimensional matrix of spaces, oriented as the ship coordinate system. The
transversal layers are called bays, the longitudinal layers rows and the horizontal layers tiers. These layers are numbered, and a container
position can be designated by the bay, row and tier number.

Bay, row, tier and stack


A set of containers with the same bay and row number and physically connected, i.e. standing on each other, is called a stack. This is the basic
component from which the container arrangement is formed. A stack is always vertical, having a fixed location in x and y. When containers of
different dimensions are loaded, the alignment point controls the relative position in x and y so that the alignment point of a container is made
coincide with that of the container below or that of the stack. There may be several stacks in the same bay and row, normally one under deck and
one above deck. These are distinguished by their starting tier number. In most cases, the word 'stack' refers to a physical stack as presented. A
logical stack is the total set of containers with the same bay and row number.

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1915 / 7399


NAPA for Design Manuals 2016.3

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.

Example of a basic block

Example of a block with positions removed and non-uniform spacing


A set of stacks can also be defined directly, so that the relevant properties are defined directly for each stack (pilot level only).

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.

The following figure illustrates a combined container arrangement

Example of combined container arrangement


In order to give a preliminary idea of the definitions, the definition of the arrangement is presented below:

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1916 / 7399


NAPA for Design Manuals 2016.3

3. Properties of stacks
The following properties are relevant for stacks. The symbols given below are the names of the quantities representing the properties.

container type (CTP)


The container type provides the basis for the spacing and the default for container loads. The type can be changed when containers are
loaded. Capacities referring to the arrangement as such are calculated as if the places are occupied with containers of the default type.
double size container type (CT2)
If the stack is such that it can be loaded in combination with its neighbouring stack by double sized containers, a default container type is
needed for this purpose.
position in x, y and z (REFX, REFY,REFZ)
This information is stored as the location of the alignment point the default of which is the lower x-, y- and z-coordinate.
numbering, bay, row and tier (BAY, ROW, T1)
The bay and row numbers are fixed for the stack, while the tier number means the lowest tier in the stack.
number of containers that can be loaded
The nominal capacity of the stack is expressed by the number of containers of the default type that can be loaded or indirectly by the
highest tier number (TN). This implies a maximum height, which is the actual limitation used.
maximum height (ZMAX)
This places a limit on how many containers can be loaded. It is inferred from the container positions defined, as presented above, but can
also be defined directly.
size, length in x, y and z (LENX, LENY, LENZ)
The size refers to the space reserved for the individual containers and is obtained from the default container type.
on deck/in hold (DH)
It is recorded whether the stack is on deck or in hold. Unless explicitly defined, the default is based on the tier number.
maximum stack weight (WSTMAX)
The maximum allowed stack weight places another limitation on the container load that the stack can have and is used for check
purposes.
alignment point (LXAL, LYAL, LZAL)
The alignment point is measured from the lower x- and y- limits and defines a reference point that is made to coincide with that of the
container. By default, the alignment point is derived from properties of the default container type.
orientation, longitudinal/transversal (ORNT)
Containers are normally loaded as defined, i.e. with the x-dimensions longitudinally. By defining a stack to be transversal, the containers
are turned 90 degrees so that x and y change place.

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.

5. Properties of container types


The main properties of containers are handled by defining container types. The definition of a container type gives some fixed properties and
some properties that are only defaults and can be changed in connection with loading. In addition to the standard properties described below, the
user can add own properties which can be used in output functions.

The role of the standard properties is the following.

physical dimensions of the container


Since the system is not concerned with the detailed properties of the containers, these are presently not used, but reserved for future
functions, for instance in drawing. The physical container is assumed centered inside the logical one.
logical dimensions of the container (LENX, LENY, LENZ)
These dimensions define the total space occupied by the container. It means the minimal distance between consecutive containers, and
decides the spacing of blocks and height of stacks. All local distances are measured within the logical dimensions.
local center of gravity (LXCG, LYCG, LZCG)
The local center of gravity means the (default) center of gravity of the container, measured from the lower limits of the logical container.
weight (W)
The weight defined for a container type provides the default when loading containers. In a given loaded container it can be changed.
minimum, maximum weight (WMIN, WMAX)
The minimum and maximum weights define the interpretation of relative weights, so that 0%=minimum and 100%=maximum. These are
also used for error checks.
fill colour (FCODE, LFCODE)

Copyright © 1992 - 2016 NAPA. All rights reserved. 1917 / 7399


NAPA for Design Manuals 2016.3

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.

Illustration of some container properties


Other properties can be defined as needed. These will have no function in the calculations, but are available for output purposes or for doing
selections. A list of such properties are maintained in order to allow the system do some error checking (command QNT under ADM).

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.

6. Numbering of container positions


Container positions are designated by bay, row and tier numbers. The numbering system is global, i.e. it concerns the total set of containers.
Each part of the arrangement must therefore be placed into the global numbering system.

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.

Copyright © 1992 - 2016 NAPA. All rights reserved. 1918 / 7399


NAPA for Design Manuals 2016.3

The numbering systems

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:

the numbering system


container types
primary arrangement parts
combined arrangements
loads

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

Copyright © 1992 - 2016 NAPA. All rights reserved. 1919 / 7399


NAPA for Design Manuals 2016.3

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.

The dependence of combined arrangements on the parts is also handled dynamically.

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.

8. Usage of alignment points


The purpose of the alignment points is to allow the system to load correctly containers of differing length, for example a 40 foot one on top of a 45
foot one. The location of the upper container is adjusted so that the alignment points coincide. The lowermost container obeys the alignment point
of the stack.

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.

The following figure illustrates the alignment logic:

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.

9. Mixed loading of long and short containers


In general, a stack is loaded by piling containers on top of each other, without affecting the neighbouring stacks. Under the conditions presented
below, it is possible to load a container so that it occupies two adjacent bays. Most frequently, this occurs when loading 40 foot containers over
two 20 foot bays. This following figure illustrates an arrangemen

You might also like