# Introduction

X-Topology provides a surface design and modelling solution for complex hull surfaces. Frequently, ship hull forms introduce a range of features which are challenging to model never mind design in three dimensions, such as specific bulbous bow designs and the twin skeg arrangements found on certain ships. It's not that is impossible to model these shapes by directly configuring the control polygon, but its time consuming and it's often necessary to introduce internal discontinuities that are perfectly acceptable from a mathematical point of view but will cause a solid modelling tool to reject the definition.

These design scenarios arise because the hull surfaces, ship forms in particular, contain a wide range of features with different curvature. Large regions of planar surface will be found on the flat of side and flat of bottom, but at the top of a bulb the radius of curvature may be similar to the side of a football. Managing a single NURBS Surface control polygon to support this definition to the level of detail required for production is a difficult task due to the number of control points required. The solution is to subdivide the surface into regions and use separate surface patches to represent each region. This approach may allow the whole of the flat of side to be represented with a dedicated large patch, and then areas such as bulbs may be refined using many smaller patches.

The challenge with this approach is that to achieve mathematical continuity between patches its necessary to precisely position the points along the edge of each patch. Since this involves precise mathematical equalities it is, again, another activity that's challenging to achieve manually by positioning control points using the mouse or coordinates and will make effective design impossible to achieve. A method of managing the continuity between patches is needed allowing the user to get on with the modelling or design process.

Rather than model the patches, an alternative approach is to model the boundaries between. For the ship designer this approach fits better with their mental representation of the shape because its feature driven. The shape of the stem, stern, midship section, flat of bottom, flat of side, knuckles and angular features are all part of the style of the ship and each represents a patch boundary line which may be modelled with a curve. Once this organisation of shape is represented then the shape of the surface within those boundaries is refined. This approach, called Cross Sectional Design suggests the use of a curve network from which the software will "loft" a surface. Today, most hull design applications aimed at ship design use this basic approach although each has its own particular way of executing the design.

In X-Topology, the curve network is defined using X-Topology Curves. These are multi segment cubic B-Spline curves that dynamically attach together in a parent-child relationship. This means that while there may appear to be quite a large number of curves the shape of many of them will be complete dependant on others since the parent-child connections form a hierarchy. The shape of curves can be controlled with dynamic shape constraints avoiding the need to manually introduce specific arrangements of control points which must be explicitly managed throughout the design process. Shape constraints can also be applied to parent curves to control the shape of any connecting child curve.

Design of complex hull shapes using X-Topology is much easier than manipulating NURBS surface control polygons but it is not without challenge. It takes some skill to get results good enough for production design and this is directly connected to the users' exposure to ship surface shapes. It is very easy to get caught up in the complexity of designing a particular shape but considering a ship hull is made of steel plates there are limits to shapes that are feasible and that we may consider NURBS surfaces to behave like metal plates then if the surface isn't doing what you want, you do need to ask yourself if you are creating a realistic shape which is efficient to manufacture.

In this respect, X-Topology Lofting offers an interesting alternative which generates an implied 'surface' using curve intersection. From a processing perspective, this executes significantly faster than X-Topology Surfaces and provides interactive feedback of shape and curvature. It does not require as rigourous a curve network as an X-Topology Surface. In areas of poor shape, curves will behave badly exhibiting significant unfairness. This is more easily identified than in the surface because the blending algorithms naturally smooth the shape making unfair or poor areas of shape difficult to identify. As a design matures both the X-Topology Lofting and Surface definitions are compared together, on the same curve network definition. The Lofting element is used to identify areas of poor definition, where the Lofting and Surface shape diverge. Fairing involves curve adjustment, reconfiguring the curve network or refinement to bring the shape generated by both elements into correspondence. Running these two techniques in parallel results in the most productive hull surface design experience available today!

# Design

Surface Definition using X-Topology for hull surface design usually follows the same process for every design.

1. Begin with the outer boundaries of the surface, sometimes the midship section if there is parallel middle body present.

2. Next, introduce all the feature shapes. Flat of Side, Flat of Bottom, Knuckles, Angular shapes. These shapes represent discontinuities in the surface and define the separate regions of shape which may be designed independently, with a different number of patches depending on complexity.

3. Next we introduce the curves to control the shape of the surface across each region, the "Primary Shape Control Curves". At this point the effectiveness of the design process is dependent on the decisions made at this stage. The right number of curves need to be chosen. In general, these curves will run in either a longitudinal direction (waterlines, buttocks or diagonals) or transverse (sections). The best direction is the one with minimal curvature and change of direction. A good guide is to consider the direction of water flow along the surface. If possible, each primary curve should have the same number of points, distributed in the same way. This will mean that all Primary Shape Curves will have the same mathematical model and will produce better quality patches.

4. Finally, "cross" the Primary Shape Curves with secondary curves to complete the shape and form a valid network, hence X(cross)-Topology. The connections in the curve network establish the surface normal at vertices and the surface tangent ribbons along the curve edges between vertices. The patches resulting from this activity should be predominantly 4 sided without too high an aspect ratio. Non-four sided patches are acceptable but the shape of these requires additional estimation which may not be exactly as desired. The software will make the best guess but it's always better to define shape explicitly, since it is what you want.

To produce a fair surface in a good amount of time it is important that these rules be adhered to closely. It is easy to introduce wide variations of points on neighbouring curves or mixing the directions of Primary Shape Curves but this introduces mathematical incompatibility in the surface parameters and it's almost impossible to remove unfairness introduced in this way by moving control points around. In many cases it will not be possible to adhere to the rules precisely but following this discipline will always produce a surface that is quickly designed and easy to fair. Furthermore, if the X-Topology Lofting is used alongside the X-Topology Surface it will often quickly expose areas of the definition that aren't working in a compatible way.

## Form Topology

An observation that may be made in respect of the recommended definition procedure above is that hull forms with similar style, performance, function and shape etc. will have a lot of similarity in the structure of the hull surface definition. This structure is termed the Form Topology of the hull surface and is captured in the two initial stages of the definition procedure. IntelliHULL uses this information to generate further definition to produce a ship hull surface definition. Although X-Topology can trace is ancestry back to IntelliHull it does not make direct use of this process today except in the dedicated X-Topology hull transformation [1] tools which use the Form Topology structure to identify the hull parameters and generate the transformation structure. The concept is presently used in a Parametric Hull Generator based on X-Topology Curve Networks, which although released in PolyCAD is presently still a research project.

## Hull Form Lofting

Definition of a hull form without using a mathematical surface representation has almost become unthinkable today but considering the complexity involved in creating shape this way we must admit that there is as much management of the definition as there is design. At different stages in the design process an X-Topology Surface may require the curve network to be checked or reconfigured to get a better quality hull surface, a task that doesn't really add any value to a pure design process. In the old days, designers predominantly worked with curves on a Lines Plan using 2D representations that still created valid 3D hull forms. In that era, most of the work went into making sure the 2D was a true 3D object. Asking the question, what happens if we implemented that design approach today in 3D software produced the X-Topology Lofting element. It generates a hull 'surface' implied with curves by intersecting and fitting cubic B-Splines in Waterline, Buttock and Sections planes in a sequence definable by the user. The simplicity of the algorithms used in this approach creates a design tool which is capable of updating far faster that a lofted mathematical surface. This means that we can interactively review feedback such as section curvature while control points are being moved by the mouse. Furthermore, since the different curve directions are fitted independently, unfairness across the surface in different directions is readily exposed because the perturbations in shape are easily seen. When a surface is generated, it blends shape together minimising any unfairness and incompatible making poor areas of surface shape difficult to identify.

X-Topology Lofting does not require a complex Curve Network. It will generate shape with two unconnected curves. This means that in early phases of design concern over the quality and management of the curve network is not strictly necessary although it is good practice. The Lofting curves produced may even be used to refine the definition, by fitting X-Topology Curves to the surface using the intersection capabilities. Again, this kind of approach is something quite unique to PolyCAD. X-Topology Lofting is not intended to replace the X-Topology Surface, it is an aid to producing good quality definition for an X-Topology Surface. That said, the Lofting element can be used for hydrostatics and stability analysis and basic compartment design. In the case of the X-Topology Surface/Loft Fit element the patch structure of an X-Topology Surface and shape of the X-Topology Loft can be combined to produce a surface with improved continuity.

# X-Topology Curves

X-Topology Curve is no different to other curves in PolyCAD. It is an extended version of the B-Spline curve allowing a user to achieve specific shapes and features within the definition without having to know how to configure the control points to achieve that. Since these capabilities are dynamic the X-Topology Curves capture Design Intent.

In order to form a Curve Network curves need to attach to each other. X-Topology Curves extend PolyCAD snapping options by generating a dynamic link to the referenced curve which then becomes a parent in the definition. If the shape of the parent is updated, referenced child curves update automatically. To attach curved together, with snapping enabled, drag the definition point of one curve onto another. Attaching a parent to child is not allowed and snapping will not be activated in this case. Since the curves are B-Splines, attaching a control point to a curve results in an interpolation point. A worked example demonstrating snapping can be found here.

X-Topology Curves feature a number of dynamic constraints used to control the shape of the curve. Using constrains the user may apply their Design Intent to the definition. At Control Point level, the user may introduce Interpolation Points, Knuckles and tangents. Between a pair of point they may introduce a straight segment or a segment that blends shape between its adjacent neighbours. Relaxation constraints break the continuity of the curve imposing the 'end' tangent of a segment on one side of the control point to the adjacent segment. Constraints may also applied to the curve to control the shape of all connecting curves. This will turn the curve into a knuckle line or control tangency of connecting curves in either the principle planes or introducing a relaxation constraint. Curve constraints avoid the need to apply Point constrains to each attaching curve. A worked example demonstrating contraints can be found here.

# X-Topology Surfaces

An X-Topology Surface takes a curve network defined by the X-Topology Curves and generates the surface patch representation. This is quite a complex process which generates a Boundary Representation (B-Rep) data structure of vertices, edges and faces. It then interpolates tangent ribbons along each design curve based on the surface normal implied by connecting curves at each junction. Then, any multi-sided faces (those with more than 4 discrete edges) must be further subdivided into 4 or less sided faces. At this point, the surface patches can be generated.

The user has some control over how surface patches are generated. They may choose the blending method, whether to simplify the edges to Bezier curves and the methods used to subdivide multi-sided faces. There are two methods of subdivision. Regular Subdivision [2], will split a multisided face by estimating a centre point and then subdividing each face edge in half, connecting the new vertex to the centre. This approach works well when the face has roughly equal edge lengths although the position of the central vertex cannot always be placed in a perfect position. The other method, termed Decomposition, subdivides a multi-sided face by cutting it up into strips. This methods is more successfully used when the multi-sided face is roughly rectangular, often almost a four-sided face but with corners cut off. Both methods should be seen as best guess approaches for decomposing the definition into four sided faces and should not expect good performance especially if being used to a "fill a hole" when the user is not prepared to explicitly define the shape of a particularly difficult area of the surface. That said, these methods will complete the definition of a surface and that may be all that's needed during earlier phases in the design process.

Initially, X-Topology Surfaces supported 12 different mathematical
techniques for generating the surface patches. Today that has been reduced
to 4 basic methods, those that generate patches that may be represented as
NURBS allowing export to other CAD systems without
conversion. However, some of the better
performing surfaces were removed. NURBS Surfaces have a limitation caused
by the rectangular data control point structure in that they handle twist
compatibility poorly. Consider that the internal control points influence
tangency, the internal control point adjacent to the corner is connected to
both edges. Therefore, it physically unable to achieve tangential
continuity in many situations because a single control point
must achieve compatibility on both edges at once. 2^{nd} Order continuity, which is
influenced by the 2^{nd} row of control points in from the patch
edge, is affected similarly. Unfortunately, this situation means that
precise curvature continuity cannot be achieved with regular NURBS surface
but the approximation is acceptable since this phenomenon affects all hull
design software working with NURBS. PolyCAD also supports the Gregory Patch
which is formulated to avoid this problem, and can be precisely converted
to a NURBS surface. It however, has degenerate corners and is a Bezier
patch. Therefore, poorly constructed curve networks may experience gaps.
There is no perfect mathematical surface when it comes to hull form design
and compromises must be accepted!

# X-Topology Groups

There are often occasions where it is desirable to represent a hull form using several X-Topology Surfaces. Ship surfaces can be split about the fore, midship and aft portions of the hull and with each X-Topology Surface focusing on its particular region it will update quicker. However, to combine the surface into one element allowing operations like hydrostatic calculations it needs to be grouped together. Two grouping surface grouping functions are provided. The X-Topology Surface Group collects the surface patches from referenced X-Topology Surface and combines them together as if they were a B-Spline Surface List. The X-Topology Surface Union combines the B-Rep structure together to produce a new representation complete with surface Topology. This is required when transforming a hull form based on a number of X-Topology Surfaces.

# X-Topology Lofting

Considering the complexity of the X-Topology Surface, the X-Topology Lofting element offers a simple alternative and reveals a lot of insight about the mathematical compatibility of the curve network that is hard to expose when using a surface representation. The X-Topology Lofting is created in the same way as the surface, referencing the X-Topology Curve in the network. The element will then sequentially intersect the network curves and generate fitted cubic B-Splines representing the Sections Waterlines and Buttocks. The user has control of the fitting sequence as well as the position of each intersection. In addition, a different fitting sequence may be used on the forward and aft sections by splitting the fit about a selected midship section curve.

Once fitted, the loft will update interactively when referenced X-Topology curves are manipulated. In addition, the curvature of the intersections can be visualised as the design is change providing active feedback of the quality of the surface produced by the curve network.

## X-Topology Surface/Loft Fit

The X-Topology Surface generates shape by blending the position and surface tangency of the surrounding face edges together to form a surface in a process typical of the Coons patch approach. This means that the shape of these patches is entirely determined by edge characteristic and there is no direct constraint to impose curvature continuity. Each patch is generated independently. Extending the blending algorithm to accommodate these characteristics is difficult given the already complicated nature of the implementation. An alternative approach used by the AVEVA Lines application is the surface generation by fitting to contour curves in addition to edge information. Because the contour curves are fitted across the curve network they capture the global position, tangent and curvature properties of the surface. The X-Topology Surface/Loft fit implements this approach taking the B-Rep structure of a X-Topology Surface and refitting edges and patches using least squares technique. This can be shown to improve surface curvature.

However, a limitation of the approach is that it requires every patch to be intersected by enough curves to adequately perform the fit. For most patches this isn't a problem but for small patches in the surface this can be a problem. Several strategies may be used to create these patches but it does mean that curvature continuity can be degraded in these areas. Unfortunately, the need to compromise to generate an acceptable surface rather than a perfect surface appears again.

# X-Topology Videos

The video below demonstrates how to build up the boundaries and shape the region of a hull form. X-Topology Lofting is used as an indicator of shape allowing refinement and inspection of section curvature before the Surface is applied. You'll find more videos about X-Topology here.

# References

- Interactive Hull Form Transformations using Curve Network Deformation, M. Bole, COMPIT 2010, Gubbio, Italy, 12-14 April 2010.
- Solid Modelling with DESIGNBASE: Theory and Implementation, H. Chiyokura, 1988, Addison-Wesley.