Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

User-Defined Fill Styles

  • Last UpdatedDec 03, 2025
  • 4 minute read

Basic Fill Style Functionality

User-defined Fill Styles are defined in the database by FILLSTyle elements which are members of a Fill Style Table (FSTYTB).

A FILLST is defined either as 'Solid Fill' or by 1 or more Hatch Patterns (HPATTE). A basic Hatch Pattern is defined in terms of four parameters:

Line Style (HLSTYLE):

the style with which the hatch lines will be drawn. This may either be a system-defined line style, thus: Chained or DashedThick, or a user-defined line style, specified either by its LSTYNO value or by its database name. Thick lines may be used but user-defined line styles that make use of glyphs cannot be used. By default HLSTYLE will be set to SOLID.

Angle (HANGLE):

the slope of the hatch lines in degrees measured in a counter clockwise direction from the horizontal. The value specified must lie in the range -360 to 360. If not specified a value of 45 will be assumed.

Separation (HSEPAR):

the spacing between the hatch lines (measured perpendicularly). If 0 then a solid fill is achieved. The specified value will always be used in plot files; on terminals the spacing will be device-dependent but it will be related to the specified value. If no value is given, 3mm will be assumed.

Offset (HOFFSET):

the offset of the hatch-pattern from a datum point on the Sheet. It is only of use when two or more hatch-patterns are combined. If they have the same angle and separation but different offsets double-line hatching can be achieved. If no value is given 0 is assumed. If the value is positive the positioning of the pattern is relative to the bottom left corner of the Sheet, if negative the positioning of the pattern is relative to some feature of the area being filled. For patterns that require the precise matching of diagonal dashes (to form triangles for instance) it will probably be necessary to define relative patterns (with negative offsets) but in general positive offsets should be used. If no value is given, 0mm will be assumed.

Thus the commands:

NEW FILLST /My-Fillstyle

NEW HPATTE

HANGLE 35

HSEPAR 3.5mm

will create a Fillstyle composed of parallel lines 3.5mm apart at an angle of 35deg.

Adding a second HPATTE thus:

NEW HPATTE

HANGLE 35

HSEPAR 3.5mm

HOFFSE 1mm

will convert /My-Fillstyle into a double-line Fill Style with double lines (1mm between them) repeated every 3.5mm

Element FILLST also has attributes:

FSTYNO:

This is a system defined attribute that will have a unique value within the MDB. It is this number that should be used when the Fillstyle is used.

SOLFILled:

If set TRUE will cause the Fillstyle to provide solidfill. The default setting is FALSE.

FUNCtion:

Text attribute for descriptive purposes.

ALTDEF

If set it must refer to another FILLST. If set the referenced FILLST will be used on hard copy output. Thus if at /My-Fillstyle:

ALTDEF is set to /My-Plot-Fillstyle it is /My-Plot-Fillstyle that will be used on hardcopy output in place of /My-Fillstyle. The default setting is unset.

When the FILLST element is created a system-defined fill style number is allocated automatically. This is a unique number in the range 1-255 and is held in the FSTYNO attribute of the FILLST element. This is the number to use for the FSTYLE attribute when it is required to use that FILLST.

Alternatively, it is usually more convenient to specify a name for the FILLST, and this is then used to set the FSTYLE attribute (although it is the FSTNO value that will be assigned to the FSTYLE attribute).

Having created a Fillstyle it must be defined within the graphics system by an 'UPDATE PENSTYLES' command if it is to be used during that session of DRAFT. In subsequent sessions it will be automatically defined during module entry.

Advanced Fill Style Functionality

In order to create more complex patterns, such as Triangles, Brickwork, etc it is necessary to use two additional attributes of HPATTE:

Line Pattern

Advance (PATADV):

the amount by which the pattern on each individual line is advanced. The pattern is moved by a value which accumulates from line-to-line. The lines either side of the first are offset by ± the advance value. The lines either side of these are offset by ± twice the value and so on.

Line Pattern

Offset (PATOFF):

the amount by which the pattern of the first hatch-line is offset from its nominal start point.

Thus for example, in order to create a Fill Style to represent brickwork (with 10mm x 4mm bricks) we first need to create a suitable linestyle for the vertical lines and then a Fillstyle with 2 Hatch Patterns:

NEW LSTYTB
NEW LINESTYLE /BrickWork-VerticalLS

PATDEF 50 -50

Creates a pattern with equal sized dashes and gaps

PATREP 8mm

Sets the repeat distance to the height of 2 bricks

NEW FSTYTB

NEW FILLSTYLE /BrickWorkFS

NEW HPATTERN /BrickWork-HorizontalHP

HLSTYLE Solid

HANGLE 0

HSEPAR 4mm

4mm between horizontal lines

HOFFSE 2mm

Offsets the pattern (vertically) from its datum

NEW HPATTERN /BrickWork-VerticalHP
HLSTYLE /Brickwork-VerticalLS

HANGLE 90

HSEPAR 5mm

10mm long bricks require 5mm between vertical lines

HOFFSE 3mm

Offsets the pattern (horizontally) from its datum

PATOFF 2mm

Offsets the pattern (vertically) from its datum

PATADV 4mm

Causes the 'dash' in the vertical lines to advance by the brick height and so create the 'staggered' effect

Offsetting the pattern is not strictly necessary and so attributes HOFFSE and PATOFF of both HPATTEs could be left at 0mm; it is merely done to reduce the chance of the horizontal and vertical lines coinciding with the edge of the hatched area.

Related Links
TitleResults for “How to create a CRG?”Also Available in