PIAS Manual  2024
Program for the Integral Approach of Shipdesign
Wireframes

The main purpose of the wireframe functionality in Fairway is the import of 3D curves from a different source than Fairway — e.g. from a general-purpose CAD-system such as Autocad or Rhino — and their conversion to a Fairway model. The global procedure of this process will be discussed in The entire procedure to import DXF or IGES files.

Having this functionality in Fairway also serves a secondary purpose, which is that a design which starts with a ‘blank sheet’ (a so-called ab initio design) can be set up sketch-wise with initially unconnected curves. At some point this wireframe will need to be converted into a solid though, which comes with its own set of challenges and requires an advanced understanding of topology and geometry.

Warning
Therefore we do not recommend this approach to the novice, while the following sections should be considered obligatory reading...
Note
The easiest way to do ab initio design is to start out with an initial shape that is already represented as a solid, by selecting any of the upper options in the start menu.

Finally, a third application of loose points and curves is in the support of the design of another solid, such as the marking of important positions, construction lines and as the master in master/slave relations.

Drawing exchange formats

IGES and DXF are popular file formats, and support for these formats is an important feature. However, DXF and IGES are not particularly suitable for the exchange of ship hull forms. One must keep in mind that these two formats are essentially intended for drawing exchange, and not for the exchange of product model data, an aspect which is confirmed by the full names of the acronyms (DXF: Drawing eXchange Format, IGES: Initial Graphics Exchange Specification). Unfortunately, this background inhibits a guaranteed error-free, automatic import of hullforms as proper Fairway solids for every case. That is why IGES and DXF files are imported as a wireframe, after which they can be made suitable for conversion to solid within Fairway.

Importing 3D lines from DXF format

Attention
Import produces a wireframe only. Conversion to solid requires knowledge of the complete process, starting with section Wireframes.

Import of lines from a 3-D DXF is started with the corresponding option in the start menu. The following menu appears:

Correlation between ship and import file
1. Name import file (*.dxf)
2. The X-axis of the import file corresponds with the vessel'sLongitudinal axis
3. The Y-axis of the import file corresponds with the vessel'sTransverse axis
4. The Z-axis of the import file corresponds with the vessel'sVertical axis
5. Merge succeeding curvesYes
6. Multiplication factor on the import coordinates1.0000
7. Minimum angle to recognize a knuckle in a polyline10.0
8. Ratio of segment lengths above which a knuckle is inserted500
9. Maximum length (m) of a polyline segment500.0000

A 3-D DXF file contains dimensionless coordinates in an XYZ system of axes. So before the import can start the correspondence between DXF's XYZ coordinate system and the longitudinal, transverse and vertical axes of the ship must be specified. In addition, a multiplication factor must be given that will be applied on all DXF coordinates (for instance 0.001 when the DXF data are in millimetres).

Options 5 and 7–9 — from which the backgrounds are discussed in Intermezzo on polylines — are palliatives to deal with badly constructed DXF files. If possible, it can be a better idea to instruct the exporting computer program to structure its output in a more appropriate way. DXF supports geometric elements of quite a number of different types, of which Fairway supports the following:

  • POLYLINE and LWPOLYLINE. With these types a curved line is approximated by a chain of many small straight lines. A property of this representation is that knuckle points are not defined explicitly (because theoretically each point is a knuckle). So knuckles have to be added artificially. This can be done automatically during the import according to the criteria of options 7–9, or manually in Fairway. Polylines are converted into polycurves that are faired through all points of the polyline, which can result in an unnecessarily large number of points per curve.
  • LINE. This is simply a straight line between two points. Sometimes this type occurs inappropriately often in a DXF file, where another type would should have been used. An example is when all elements of what actually is a polyline are transferred as LINE elements. With option 5 switched on Fairway will merge successive lines (within a tolerance of 0.1 mm) to larger polylines regardless. If this option is off, import of a large number of lines will result in Fairway in a great number of unconnected short polycurves that tediously must be merged into longer curves and polycurves.
  • ARC. A circular ARC.
  • SPLINE. Actually this is a NURBS curve. A property of this representation is that multiple segments that together represent a continuous polycurve, are not connected in DXF and therefore most be connected in Fairway later on. Again, option 5 will do its best to merge successive curves automatically. Another aspect of this type of elements is that, although the geometry is transferred exactly, no internal points exist. Consequentially, if these curves are faired in Fairway prior to the insertion of a sufficient number of points, a lot of detail can get lost.

Intermezzo on polylines

Attention
By its nature a polyline cannot distinguish between a knuckle and a non-knuckle point, and thus Fairway considers a polyline as a continuously curved curve, which is smoothed right through all polyline points. If a line contains one or more knuckles, it must be split into separate curves (which must be represented by distinct polylines) which meet at the knuckle points. If one continuous polyline is used for a knuckled line, the knuckles must be designated artificially, which may be a cumbersome job on a line containing hundreds of points.

It is a sad experience that more often than not only a model without explicit information about the knuckles is available. For those occasions the import procedure is equipped with auxiliary functions, which may help to create knuckle points automatically. However, it must be emphasized that those functions are only palliatives, and are in no respect a replacement for proper definition of knuckles in the input data. These functions come in four flavours:

  1. With option [Merge succeeding curves] all imported curves are scanned to see if any of them can be merged into contiguous polycurves, joined by a knuckle. The criteria for this are that both curves must be either spatial or defined in the same plane, and that end-points coincide (with a tolerance of 0.1 mm).
  2. A user can specify an angle (in degrees, option [Minimum angle to recognize a knuckle in a polyline]) between two successive lines of a polyline, above which the common point of those two lines is treated as a knuckle.
  3. A critical ratio between the lengths of two successive lines of a polyline may be specified. When an actual ratio exceeds this critical one, the common point is treated as a knuckle.
  4. A maximum length for a line of a polyline may be specified. If an actual length exceeds this maximum, additional points are inserted in that region (by linear interpolation). Those additional polyline points may give the interpolating line a broader support basis.

Regardless of the data carrier (DXF or IGES), NURBS curves are to be preferred above polylines. The reason is that Fairway converts polylines to NURBS anyway, and that conversion may always lead to a reduced accuracy.

Import 3D lines from IGES format

Attention
Import produces a wireframe only. Conversion to solid requires knowledge of the complete process, starting with section Wireframes.

Import of lines from a 3-D IGES file is started with the corresponding option in the start menu. The following form appears, described below.

Correlation between ship and import file
1. Name import file (*.iges)
2. The X-axis of the import file corresponds with the vessel'sLongitudinal axis
3. The Y-axis of the import file corresponds with the vessel'sTransverse axis
4. The Z-axis of the import file corresponds with the vessel'sVertical axis
5. Merge succeeding curvesYes

A 3-D IGES file contains dimensionless coordinates in an XYZ system of axes. So before the import can start, the correspondence between IGES' XYZ coordinate system and the longitudinal, transverse and vertical axes of the ship must be specified. Option [Merge succeeding curves] has been discussed as first auxiliary function in the intermezzo just above.

IGES supports a large number of geometric entities. Fairway recognizes these entities:

  • Entity type 110, the straight line.
  • Entity type 126, the Rational B-Spline curve. Actually this is a NURBS curve.
  • Entity type 128, the Rational B-Spline surface (a NURBS surface). Importing a set of NURBS can only be successfully done if the edges of adjacent surfaces coincide sufficiently.
  • Entity types 142 and 144 (‘Curve on parametric surface’ and ‘Trimmed surface’). These entities allow some exotic constructions which are not all supported. For example, an internal trimming is not processed, but that is not necessary because it indicates a hole, which should be avoided in the intrinsically closed hull of Fairway. Common forms of trimmed surfaces are normally processed.
  • Entity type 314, color definition, is ignored.
  • Entity type 406, forms 3, 7 and 15. This concerns a level and the name, which is being recognized and skipped.

Import ship hull models in SXF/CXF format

SARC has defined an open file format that supports Fairway's polycurves and solid definitions to enable third parties to exchange models without the dependence on assumptions and heuristics. A model in this format consists of two files: the curve and polycurve definitions are in a text file with extension .cxf and the solid definition is in a text file with extension .sxf. The format of these files is discussed in the appendix, see File CXF and SXF file formats.

For applications that must frequently export their hull forms to Fairway, it is recommended to develop an interface routine that writes CXF and SXF files directly. With this file combination there is no need for Fairway to reconstruct the shape of the solid, thus saving time and avoiding possible reconstruction anomalies. In this way, also external applications — e.g. for the generation of parametric objects, such as cilinders, gas tanks, NACA profiles, keels and rudders — can store their shapes in a fashion that enables smooth import into Fairway.

The entire procedure to import DXF or IGES files

RhinoFileIGES1024.png
Ship hull, represented by IGES NURBS surfaces, in Rhino.
The procedure for importing an external file, and the conversion of its content to Fairway consists of some clearly identifiable steps (which are illustrated by the figures in this section, from which the hull form has been published in Mucha, P., el Moctar, O., Dettmann, T., Tenzer, M. Inland waterway ship test case for resistance and propulsion prediction in shallow water. Ship Technology Research 64(2):106-113, 2017):

  1. Importing the 3D lines from DXF or IGES, as discussed in Importing 3D lines from DXF format and Import 3D lines from IGES format.
  2. If after import it appears that lines that are in reality continuous, in the source file do consist of multiple parts or separated line segments, then for a proper overview it is advised to merge them. That task could be performed in the source program (eg. Autocad), but also Fairway contains tools for this task. The easiest way is to switch option ‘5. Merge succeeding curves’ to ‘Yes’, than all lines will directly be merged at import. Alternatively, lines can be merged manually with the function [Join polycurves].
  3. Generating a wireframe, with assistance of the so-called wireframe points, as discussed in Wireframe points and Wireframe connections.
  4. Converting this wireframe to a Fairway solid, as discussed in Convert Wireframe to Solid. For this conversion, a correct wireframe is a prerequisite, so first a test will be performed. If this is not successfully completed then the conversion will be aborted.
fairway_from_IGES1024.png
The imported model in Fairway.
linesplan_fromimported_IGES1024.png
Fairway-generated lines plan from the imported model.

Manual construction of a wireframe

Attention
The recommended procedure for doing ab initio design is not described here, in general it is easier and faster to start out with a solid instead of a wireframe.

Normally, functionality for working with wireframes is disabled in the user interface of Fairway, in order not to confuse the user with options that would not be applicable. Therefore, if one wants to set up a wireframe by hand, this functionality needs to be enabled in [Fairway project settings], option [Enable wireframe modeling]. When a wireframe is imported then this option will be enabled automatically.

Hereafter it is possible to add a new empty wireframe in [Object management]. In case a project needs no solids at all, the last option in the start menu is appropriate: [Start with empty model (advanced)].

New free polycurves can be added to a wireframe by connecting points using the action [Connect Points]. Points can be added using the action [Wireframe points]. For further wireframe manipulations consult Actions for wireframe manipulation.

A brief introduction to topology and connectivity of solids

A wireframe model is an open approximation of a solid, constituted by edges and vertices (`vertices' is the plural of `vertex') on the boundary of the solid. For example, the object in the figure below contains 4 vertices and 6 edges. However, because the wireframe model does not describe the closed object it is ambiguous. A proper unambiguous way to describe a solid object is the method of boundary modelling, where explicit information about the faces is included in a so-called boundary representation, or B-rep. Our example below contains four faces.

Solid_faces_and_vertices_and_edges_800.png
Solid, faces and vertices and edges.

There is a well-known relationship between the number of vertices (V), edges (E) and faces (F); for solids without trough-holes this so-called Euler relation is V-E+F=2. It can be verified easily that this relation is indeed applicable on the figure above.

Attention
The Fairway user interface denotes vertices as wireframe points, mainly in order to avoid confusion with spline control points, which are also called vertices.

The necessity of explicit face information to describe a solid unambiguously can be demonstrated with the object in the figure below. With wireframe information only (vertices and edges) the actual shape of the object cannot be determined.

wireframe_only_is_ambiguous_480.png
Wireframe only is ambiguous.

So an important task in the conversion of a wireframe to a solid is the recognition of the faces between the edges. In general, this problem is unsolvable, but under some practical constraints iterative methods are available. One of those methods is implemented in Fairway. This method implies the following constraints:

  • The solid must be closed, without through-holes.
  • The solid may not be 2-connected.

A 2-connected solid is a solid where the removal of 2 vertices separates the solid in two parts. For example, the object in the figure below is 2-connected, because the removal of vertices 1 and 2 leaves the small inner part unconnected from the larger, outer part. By the way, one additional edge between the vertices 3 and 4 would make this object not 2-connected anymore.

2-connected_object.png
A 2-connected object.

One might perhaps expect at first sight that this freak object is unlikely te be encountered when importing ship's lines. However, consider a very simple initial body plan in the figure below. This one is highly 2-connected, because many combinations of edges exist which leaves the object separated at deletion (edges 2-4 & 3-5, 4-6 & 5-7, 6-8 & 7-9 etc.).

bodyplan_is_2-connected_480.png
This simple bodyplan is 2-connected.

A few more remarks can be made about this figure:

  • Apart from the theoretical aspects of 2-connectivity, one can also imagine that this wireframe cannot be converted into a solid automatically, because explicit information about inside and outside is missing.
  • Extra waterlines or buttocks, but even the inclusion of one additional edge, between vertices 1 and 20, would make this object not 2-connected anymore.

It would lead us too far to discuss all theoretical aspects, but fortunately there are some exceptions where 2-connectivity is allowed:

  • Some areas of 2-connectivity are acceptable, in the case when an unconnected part of the wireframe forms one face with the vertices which makes the object 2-connected. In the simple body plan above this is, for example, the case with vertices 2 and 3, whose removal leaves vertex 1 unconnected from the rest, which does no harm because vertices 1, 2 and 3 are all part of one valid face.
  • For ‘open’ objects, such as the simple body plan above, 2-connectivity may be allowed.

All these considerations have led to a two-stage face recognition procedure in Fairway:

  • Initially an object is assumed to be not 2-connected, and faces are generated accordingly. When a valid combination is found the generation process ends, because it is a theoretically valid solution.
  • When no valid combination of faces is found, the wireframe is annotated graphically with pairs of vertices that cause the wireframe to be 2-connected. Finally the faces are constructed under the assumption that the object is 2-connected. However, this second stage may fail to find a proper solution.

Actions for wireframe manipulation

If wireframe modeling is enabled (see [Fairway project settings]) then the user has access to the following dedicated actions:

Further, the following generic actions also work on wireframe curves: