Introducing PolyCAD 9.0

Introduction

The 9th version release of PolyCAD brings together several long term developments which were created to support the hull form transformation process. The primary focus has been the development of hull form transformation tools for X-Topology surfaces using the techniques explored in IntelliHull. This development required a thorough review of the way surfaces are handled and the introduction of new realisation code to manage all information extracted from surfaces. While the hull transformation functions developed for X-Topology surfaces are omitted in this first release of version 9 to allow for further testing, the transformation process has been reviewed and the basic translate, rotate, scale and mirror operations have been completely rewritten to support interactive changes and, in the case of the translate and rotate operations, geometric arraying is now available. Furthermore, hull form transformations for B-Spline surfaces, sections and polygonal hull surface representations have been introduced.

While the user interface has been upgraded to remove graphical issues that appeared in previous versions when running on Vista/Windows 7, as little as possible has been done to change the way that it appears or operated. That said, a number of new Operations have been introduced which reuse the entity properties area of the screen. These Operations are used to provide additional options when creating or modifying geometry.

Finally, a number of new file interfaces have been introduced covering Tribon/AVEVA Marine, Seasafe and Napa data formats.

Transformations - Coordinate Transformations

The translate, scale, rotate and mirror transformations have been updated replacing the old modal forms with new Operation interfaces and introducing interactive transformations. Each transformation features a graphical “framework” handle which can be used to manipulate the change.

Fig 1: General Transformation have been updated to introduce interactive changes. Snapping works throughout allowing a user to position transformations with respect to certain features. Changes can still be numerically using the new interface in entities properties.

The Move operation features two points representing the source and destination points. Both points will snap to common features removing the need to make a specific calculation to align objects as was necessary in previous versions. The move operation also has the ability to array objects in a linear arrangement based repeated application of the move translation.

The Scale operation encapsulates the group of selected objects in a box and provides the user with an edit handle in each corner to orthogonally stretch the geometry. In addition, the scale origin is available but only affects the transformation if the change is applied numerically.

The Rotate operation has a graphical framework which features three arcs allowing control of rotation about each local axis. The framework can be independently rotated to align it with the World frame after a previous rotation and also supports snapping, when an arc is selected close to an axis, so that a specific alignment can be achieved. Although this approach has been something I’ve wanted to implement for some time, users of PDMS/AVEVA Marine Outfitting and the now withdrawn Caligary Truespace will find the approach very familiar. As a frequent user of AVEVA Marine, I found that wasn’t much that I could do to improve on Model Editor so the solution used in PolyCAD is somewhat similar. A departure is the inclusion of a stack which records each rotation the user may make in sequence. Consequently, if a user wanted to change their mind during a transformation they can remove sucessive rotations without having to start again or reset the tool. Finally, the rotate transformation features the ability to create polar arrays based on repeating the transformation.

The mirror operation features a similar graphical handle to that of the rotate operation although it only supports rotation in two directions. Both origin and rotations will snap to features to allow more accurate alignment. Mirroring can also be achieved about any named plane entities that may be found within the model.

Transformation - Hull Surfaces

The new Hull Surface Transformation tool was developed as a prototype to explore hull transformations without the additional definition complexities found in either IntelliHull or X-Topology. Consequently, if the user doesn’t want or need to convert a hull form definition into an IntelliHull or X-Topology representation, they can use this tool apply the traditional 1-Cp/Lackenby or McNaull transformations in addition to changes in length, breadth and depth. The McNaull method is also included for interest although this implementation does not include the ability to change the slope at the ends of the section area curve, primarily as it is not always possible to accurately determine this information in the first place.

The tool incorporates many features that are found in the X-Topology Hull Transformation tools. The user can compare the initial hull form both graphically and numerically, using the hydrostatics and section area curve displays which are extended when transformation operations are active. As a hull form is successively transformed, each stage is retained so a comparison can be made with the parent at any time. The user can also go back to an earlier stage if changed begin to produce an undesirable form. The parent hull form data is not modified at any time during this process until the user is happy and commits to the final change at the end of the process.

Fig 2: Hull Transformation, showing the Operator, and comparisons results ons creen both graphically and numerically.

Operators

The ability to edit entities both graphically and numerically at the same time has been quite successful and this concept has now been extended to allow this to happen prior to an entities creation or to allow several different entities to be reference in the process of creating something new. Operators have been primarily introduced as part of the Hull Surface transformation tools but many other entities have benefitted. For example, B-Spline surfaces now feature a set of template options when being created, X-Topology curves can be interactively positioned as a planar intersection through existing curves and least squares fit operations for both curves and planes have been introduced.

Fig 3: Three examples of the new Operator interfaces which provide consistent way of creating new or operating on existing entities.

Surface Realisation

In order for the ambitions of the Hull Surface transformation tools to be achieved the process used to evaluate surface entities needed to be entirely reviewed. The new transformation tools retain each stage of a transformation allowing it to be reviewed with respect to other stages. In previous versions of the software, if a surface was to be displayed in wireframe, rendered, have it curvature analysed or have its hydrostatics calculated it would be separately analysed. If the information was needed again later it would have to be recalculated. The new transformation tools need this information to be evaluated much more efficiently so that calculations aren’t repeated and to allow calculated information to be shared between different outcomes.

To achieve this, a new interface has been developed which manages the wireframe, rendered, surface analysis, contouring and hydrostatic views of the surface. Consequently, because the surface evaluation only happens within this interface it is now much quicker. For example, if a surface is being manipulated and is displaying contours, the hydrostatics analysis will reuse the polygons used to generate the contours to generate calculation sections.

While these benefits were primarily intended for transformations, they have had a profound effect on all surface operations to the extent that updates to contours and surface curvature can be displayed as individual surfaces are being manipulated. Of course, there is a downside in that as things get faster the software will be called on to do more. To this extent it is now possible to control the level of detail in which surfaces are evaluated and by default this is set to maximum.

Managing access to surfaces through a single location has also benefitted the rendering of surfaces in both shaded and curvature views. Again the technique uses shared information, but now makes use of OpenGL vertex arrays to speed up the rendering and uses texture mapping to display curvature instead of explicitly shading each polygon eliminating the need to slice a polygon up if it needed to be shaded in more than one unique colour.

Fig 4: The new surface realisation interface speeds up the process of evaluating surface to the extent that contours and curvature can be updated ad and displayed while the surface is being manipulated. These options can be turned of if the surface become too complicated and causes the update process to slow.

Hydrostatics and Section Area

In addition to viewing the surface qualities, when designing a hull form it is important to be able to see how changes affect the hydrostatics and buoyancy distribution. Consequently, the hydrostatics and section area calculations can now be displayed as a surface is being manipulated keeping up to date with the changed. These new displays work downstream of the surface realisation interface described in the previous section so that the hydrostatics and section area curve can be displayed with minimal overhead on the time required to update the surface. In addition, these displays are extended whenever a hull transformation is in place to show both the results from the parent hull form and the currently selected transformation. Furthermore, whenever the hydrostatics or section area curve is active the waterplane and centroid is now displayed about the hull form.

Fig 5: Full Hydrostatics and Section Area can now be displayed and updated as a hull surface is manipulated.

X-Topology

While the initial release of X-Topology in PolyCAD 8 was intended to be comprehensive, it fell short of the original expectation I had for it once I started using it. The problem was fairly obvious in that it needed a lot of use to understand how the technique behaved across a wide range of scenarios, identify the bugs and the strange behaviours that would occur during modelling. The development of the X-Topology Hull form Transformations has assisted in this process as the curves and surface generation code upon which these transformation work need to very robust. In PolyCAD 9.0, the range of features of available to control X-Topology Curves has been slightly extended and the updated implementations of both X-Topology Curve and Surface are incorporated.

Updates to X-Topology Curves

The curve generation algorithm has been updated to improve the way B-Spline Control points and interpolation points are handled. In the original version, whenever the curve definition changed from being defined by control points to interpolation points it was necessary to break the curve into segments so that it could either be defined by directly by the control points or the control points found from a fitting algorithm employed on the interpolation points. There were a number of downsides to this approach. To ensure continuity between each segment additional control points would occasionally be added at the ends of segments. Also, individual control points neighboured by interpolation points would produce a curve segment that would become quadratic. Consequently, if the user chose to mix interpolation and control points without regards to the effect on the underlying curve the shape would become unnatural. This complexity has now been removed through the development of a fitting algorithm that can account both interpolation and control points. The previous curve generation approach is still retained so that the shape of curves in older models does not change when loaded in the new version.

A new tangent constraint has been added to control the direction of the curve through interpolation points. This constraint allows the shape to be constrained parallel to the x, y or z axes. The curve direction through a point can also be relaxed in or out of the location. This effectively causes the curve to end at the point and then continue on using the tangent direction in which the curve entered the point.

Fig 6: Examples of the new tangent constraint, showing the original curve and relaxed-in and relaxed-out tangency on the third point.

The ability to relax the tangency of a curve as it travels through a point can also be achieved using the surface tangency constraint. However, in this particular case the relaxing direction is defined by selecting the positive or negative side of an axis direction. This constrain is particular important when creating end surfaces when using the X-Topology Lofting surface.

With the introduction of the new Operators, more control is available when creating entities and this also applies to X-Topology curves, Figure 3 - centre. By default, an X-Topolology curve will be created in 3D but the operator allows the ability for the points to be constrained to a principle plane so that all snap points are planar. In addition, the created curve automatically has the chosen planar constraint applied to the curves. Furthermore, the operator allows a curve to be generated using the selected principle plane, through X-Topology curves and other PolyCAD curves. The curve can be restricted between curves with Surface Constraints and automatically added to the X-Topolology Surface definition associated with the intersected curves. The introduction of this feature is pretty significant as it greatly increases the speed in which hull definition can be constructed particularly using existing curve data which could have been imported into the tool.

Fig 7: X-Topology Curve creation is now extended to allow a single curve to be generated through others at a single click of a button.

X-Topology Lofting

The development of the X-Topology Lofting “Surface” may seem like a strange development given that it is entirely a curved based technique. It represents a more traditional approach to generating a surface by successively fitting curves through the X-Topology Curve network in each principle plane as would have been done for a Lines Plan on the drafting board. However, now the software takes care of making sure each curve properly intersects.

The introduction of this lofting tool came about from the need to extend the approach used in Tribon Lines to generate the shape of the hull form prior to fitting a surface. In Tribon Lines, the curve fitting process is instigated manually in that the user must explicitly choose the curves and the order they are fitted it and do this after ever change. While this approach allows great flexibility it can be very laborious. The X-Topology Lofting surface automates the fitting by allowing the user to select the order in which the fit occurs and through which curves the fit it made. The software automatically updates the lofting by foillowing the fitting order the user has defined.

Fig 8: X-Topology Lofting "Surface" generated between two curves. Lofting supports curvature analysis on each curve.

But why develop a surface generation tool based on curves, isn’t it a backwards step? Having used Tribon Lines frequently over the three years it has become clear that they can be a much more powerful design tool than working with a surface. It was found that this approach provided the following, somewhat unebenefits:

  • Curves need much less processing than a surface and therefore update much more quickly. Consequently, a complex surface can be manipulated interactively. In fact, it is possible to use significantly less curves than working with surface patches and ignore the need to ensure the curve network is correctly connected.
  • Curves are not adversely affected by the distortions that can occur in the curve network when trying to represent a hull form. These distortions introduce degenerate and/or sheared surface patches when the control of surface shape becomes less than optimal. It has been previously mentioned that one of the skills needed to be learn when using the X-Topology surface is the ability identify the arrangement of curves that will produce the best surface. However, this can get in the way of the design process particularly when it is not obvious what the best arrangement should be.
  • The surface generation process used in X-Topology surfaces regardless of the surface mathematics chosen is based upon the ideas of Coon’s patch blending where a patch of minimum energy is fitted between four edges. Consequently, in combining the information from each of the four edges it can have the effect of averaging out stronger features. Consequently, it can minimise or change the bias of stronger shapes so the user gets close to the shape they wanted but not exactly. However, in the worst of cases it can hide mismatches in the definition. Often these mismatches can be really small by significant enough to create an unfair surface. But it will not be obvious where the problem lie. As the curve lofting approach does not combine the shape from several directions at once, mismatches in the definition appear more obvious and therefore addressed immediately, speeding up the design process.
  • As curves are fitted in one direction at a time, areas of single and double curvature can be controlled directly based on the arrangement of the definition curves rather than using a trial and error based approach using tools such as Gaussian curvature as an indicator. Again, this allows more rapid development of a design.

Although it can be shown that following a traditional curve lofting approach offers advantages over surface when it comes to design. It is still important that a hull form can be represented as a surface. Therefore, the X-Topology Lofting surface should not be seen as an alternative to the X-Topology surface, but as tool which can be used to design a better curve network. As it possible to generate an X-Topology Surface and X-Topology Lofting from the same curve network at the same time, it is possible to view the differences between the two surface highlighting areas to be improved where the two definitions diverge.

Despite the effort put into making the X-Topology easy to use, it was still found to be difficult to get good results. Experience has shown that while the definition is easy to manipulate, it requires further skill to select the best arrangement of curves or identify when an arrangement of curves cannot produce a good continuous surface. What this leads to is the need to develop tools which can assist in this process by identifying the areas of the surface when the definition is not performing well. This is the focus of next stages of development.

Knot Editor

While tools available to manipulate B-Spline Curves and Surfaces have been comprehensive in previous versions, in general, direct manipulation of the Knot vector has been avoided because it is all too easy to make a surface more complicated that it needs to be. However, there has been occasion when it’s been necessary to find out the underlying structure of the knot vector to find out if it could be the source of problems in other systems and software. The Knot Editor is intended for advanced users and allows the knot vector to be reviewed, knots to be added and the knot vector to be reset back to open uniform. It is also now possible to split a curve or surface at a specific knot value either interactively or numerically.

Fig 10: A knot editor is now incoporated to allow advanced users to view and manipulate the knots of B-Spline Curves and Surfaces.

New File Interfaces

Several new file interfaces are introduced in version 9. The most significant number of interfaces is dedicated to Tribon/AVEVA Marine. PolyCAD can now produce a BritFair file and also generate a Lines Macro to reproduce a design in Lines. Both these two interface provide an intermediate tool before the file is saved so that the data can be checked and organised. An interface to ACIS is also provided so there is a route to getting surfaces from other file formats such as IGES. As ACIS is a solid modelling format, import process will only extract the B-Spline curves and surfaces from the file. It is also possible to import the Compartment XML files which are transferred from Surface/Compartment to Calc within the Initial Design suite.

In addition to Tribon, some speculative work has been done to create interfaces for Seasafe and Napa data. Although the approach used in both system is topological in nature and therefore similar to X-Topology the details of these two systems and X-Topology make it difficult to get a like-for-like transfer of data. Therefore, particular in the case of the Napa interface, the solutions are provided to allow the crossover of data particular with regards to design intent. It is not possible for X-Topology to import Napa curves with curved location surfaces and it will ignore any curve tangent angles which are not 0 to 90 degrees.

Both these interfaces are under test and I would be very grateful if you feed back the problems and successes you experience if you use it.

Finally, an interface was developed to Archimedes MB but I haven’t got a full description to the file format so it’s likely that it may be removed. The Archimedes website hasn’t been updated for three years so may be its no longer under development.

Fig 11: The interface used to organise data before a Tribon Lines macro is saved.

System and Miscellaneous General and Changes

The overall structure of the user interface has not been changed in the new release. However, the number of constraints available to the user when moving points has been extended to allow points to be constrained to the direction of the local control polygons of curves and to allow projection from points when a constraint is acting on a point. Projections are indicated by a dashed line in the system snap colour.

Fig 12: A snap projection occuring when a point is manipulated and subjected to a constraint

Since the release of PolyCAD 8.0 there have been quite a few changes to the Windows operating system. Unfortunately, it was only possible to update the software to respect the changes that occurred with the introduction of Windows Vista and Window 7 once I upgraded to a new machine. This highlighted quite few issues and a number of updates were necessary.

  • The UI has been updated because the default font and general scale of the screen changed. Unfortunately, this has the effect of making all buttons larger and each form had to be reset. Furthermore, a few custom controls had to be updated to respect the new Windows themes.
  • PolyCAD 9 remains as a 32-bit application. There is yet to be a version of Delphi available that can compile 64-bit applications.
  • Access to the Windows registry has changed and while this was a great problem for PolyCAD 8 because it is recognised as an 'old' program, for PolyCAD 9, accessing the registry has become difficult, particularly on 64-bit versions of the operating system. Consequently, I have abandoned using the registry to store program settings and they are now stored in the user’s home directory alongside the application layout files.
  • As a consequence the Windows registry becoming difficult to access and the fact that Delphi strings are now Unicode, the registration of PolyCAD has changed. This means that users of previous versions will need to re-register for PolyCAD 9.

Finally, In PolyCAD 8, running on Vista and Windows 7 the help failed to function. This was because some 3 rd party code I was using had hardcoded a specific version of the Windows Help API into it. This code has now been removed and the Windows Help API is now accesses without reference to a particular version.