# Shapes: Drawing

## Wire frame drawing

### Pens and number of lines

Each surface of a shape is drawn as a wire frame using one the specified pens. To aid visualisation, the outside pen is used if the surface is being viewed from the outside of the shape, and the inside pen is used if it is being viewed from the inside.

The number of lines determines how many lines are used in the wire frames – a larger value gives a more realistic picture, but one which takes a little longer to draw. Where it is necessary to keep the display simple you may set the number of lines to 2.

The number of lines drawn for a plane shape is controlled by the grid density, which is given in terms of the length of the scale bar on the 3D view. A density of $d$ means that there are $d$ lines per scale bar length: higher density values give a finer grid, which may take longer to draw. Planes extend to infinity in all directions, but only a part of the infinite plane local to the view centre is drawn.

The number of lines is used only for the drawing of the shape. It does not have any affect on the calculations: these are performed with the precise geometry defined for the shape.

For label shapes, which have no surface to draw, you specify only the axis pen colour to be used with the draw local axes option.

By default, for shaded 3D views, shapes are drawn as solid objects with their given geometry.

Alternatively the object can be represented by an imported 3D model by specifying the shaded drawing file. This can be one of the following formats:

• Microsoft's DirectX .x file format
• Wavefront .obj format
• Wamit .gdf, .fdf or .csf panel mesh
• Aqwa .dat panel mesh
• Hydrostar .hst panel mesh
• Sesam .fem panel mesh
• Nemoh .dat panel mesh
• Gmsh .msh panel mesh

If you use a relative path then the path will be taken as relative to the folder containing the OrcaFlex file.

Draw size (.x, .obj) allows you to scale the drawing. All directions are scaled equally such that the longest side in the drawing is drawn to the given draw size. This longest side is calculated by fitting the smallest possible cuboid around the vertices of the shaded drawing, aligned with the shaded drawing's local axes. The longest side is the length of the longest side of this cuboid.

Set draw size to '~' to display the drawing using the absolute coordinates as specified in the drawing file.

 Note: If you use a value of '~' for draw size, then OrcaFlex uses the coordinates in the drawing file directly, taking them to be in the prevailing OrcaFlex units. If these coordinates use a different length unit from your OrcaFlex model, then you should define them in an auxiliary file called AdditionalInformation.txt. Examples of this can be found in the sample shaded drawings provided by Orcina.

The culling mode (.x, .obj) option enables an optimisation that may provide a useful performance benefit. When enabled, only faces towards the viewer are drawn. The backward-facing faces are culled – they are not drawn. By culling these faces, less computation is required and performance is improved. In practice however, typical modern graphics cards are sufficiently powerful that you may not notice any benefit.

There are different conventions in common use regarding the specification of the outward facing direction, which we refer to as clockwise or anticlockwise. It is not always possible to detect programmatically which convention is in use, so we must pass the responsibility to you, the user, to do so. It is usually immediately apparent by trial and error which option is correct.

Culling requires that the faces defined in the drawing file have their outward-facing directions defined correctly. If this is not the case, then the object will not display correctly; typically, sections of the the object will be missing when it is drawn by OrcaFlex. This problem is usually resolved by disabling culling.

The mirror in plane (.x, .obj) option allows you to mirror the whole 3D model about the specified plane. Note that the axes refer to the 3D drawing axes rather than the OrcaFlex axes. This may be required if the original drawing axes convention does not match that assumed by OrcaFlex.

• For .x files, OrcaFlex assumes that an imported drawing file uses a left-handed axis convention.
• For .obj files, OrcaFlex assumes that an imported drawing file uses a right-handed axis convention.

These assumptions may not be appropriate for your mesh file, so this option allows you to adjust the rendering so the model appears correctly. When you choose to mirror in a plane, this has the effect of switching from a left-handed axis convention to a right-handed axis convention, and vice versa.

A common sign that the coordinate convention needs switching is if asymmetric features, or text on the model, appear mirrored in the shaded view.

For panel mesh files you must specify the mesh length units and the mesh symmetry. OrcaFlex uses length units to scale the mesh panels to match the units system of the OrcaFlex model. Mesh symmetry can be one of the following values: none, xz plane, yz plane or xz and yz planes. This is used to generate the additional panels that are implied by the symmetry.

For panel mesh files that support multiple bodies or structures, you must specify the body number to be imported. If the panel mesh file format does not support multiple bodies then this value is ignored.

For panel mesh files that define panels above the waterline (dry panels), you must specify whether to import dry panels. If the panel mesh file format does not support dry panels then this value is ignored.

Shaded drawing origin is provided because the shaded drawing and the shape may have different origins. The shaded drawing origin defines the origin of the shaded drawing with respect to the shape's local axis system. Similarly shaded drawing orientation allows you to reorient the shaded drawing to match the shape's axis system.

### Shaded drawing plane translucency (only available for planes)

Controls how translucent the plane appears in the shaded graphics mode. A value of 0% gives an opaque surface: nothing behind the surface will be visible. A value of 100% specifies transparency and gives a completely see-through surface.

 Note: This value is not used if an imported 3D model is used to draw the shape.