TurboCADables - Brush Style Patterns

TurboCAD, as does all CAD software, has a hatching tool that fills polygons with a brush style pattern – either with a vector hatch or bitmap pattern. Such fills are commonly used to denote a specific property or material, such as glass, wood, etc. A common question often asked by many TurboCAD users – is it possible to use custom hatch patterns in TurboCAD? The answer is yes – you can use custom patterns! This how-to guide explains how to use custom hatch and bitmap patterns in legacy versions of TurboCAD from v3 to v9 including LE. Examples include converted AutoCAD hatch patterns and custom bitmap patterns.

Photo of Mount Rainier taken from Offut Lake during winter.

Getting Started

Using custom brush patterns in TurboCAD requires editing the TurboCAD configuration file, which has an ini extension. Before editing the ini file, it is a good idea to first make a backup of your existing file. Some modifications to the ini file, when made incorrectly, might cause TurboCAD to become unstable. A backup will make it easy to restore TurboCAD to a working state, by fixing any problems that might be caused by a corrupted ini file. Although TurboCAD will create a default ini file if one doesn't exist, this method isn't necessarily the best way to replace a corrupted ini file. If forced to use this method, you might lose your custom TurboCAD settings. So, always make a backup!

  TurboCAD Pro Platinum

TurboCAD Professional Platinum - advanced architectural and mechanical design tools.

TurboCAD Design Store

The TurboCAD ini file is located in the TurboCAD program folder. Because the ini file is used by TurboCAD to store information when it is running, make sure to exit TurboCAD before you edit the ini file. You'll need to locate the ini file before following the instructions in this quick guide. Depending on your version of TurboCAD, the file will be named using this notation: tcwXX.ini, where XX is the version number of TurboCAD. For example, the configuration file is named tcw30.ini in TurboCAD v3, and named tcw80.ini in TurboCAD v8.

After loading the TurboCAD ini file into your favorite text editor and scrolling down, you'll come across the [BrushStyle_Table] heading. It is under this heading that you'll find the definitions for all of TurboCAD's brush style patterns. (Except for the Solid brush – which is hard-coded into TurboCAD.) Note the different parameters listed in TurboCAD's brush style table. Using a given custom hatch or bitmap pattern in TurboCAD requires specifying a corresponding set of parameters under the [BrushStyle_Table] heading.

There are three types of TurboCAD brush style patterns under the [BrushStyle_Table] heading:

Specific parameters are used to identify a brush style pattern as one of the above types. All patterns will have three things in common: (1) a style name to identify the pattern, then (2) either a T or a W to denote it as a TurboCAD or Windows pattern, and (3) either H or B to indicate whether the pattern is a hatch or a bitmap. For the three types of brush style patterns that are possible in TurboCAD:

Important – if you decide to make changes to the TurboCAD ini file, save the file in ascii format! (Not as a Word doc file or in some other non-ascii format!)

Hatch Pattern Syntax

TurboCAD Vector Hatch Patterns

TurboCAD's hatch patterns are for the most part identical to vector-based hatch patterns used by other CAD packages and drawing programs. The main differences are in the parameters required to create these patterns, and how those parameters affect the pattern that is created. By specifying the correct parameters, you can create many different vector-based hatch patterns. The required parameters, and a brief explanation of each, are listed below:

<style_name> = T,H, <angle>, <x0>, <y0>, <dx>, <dy>, <number_of_dashes_values>, <dash_values>

  TurboCAD Mac Designer

TurboCAD Designer Mac - precision 2D drafting and design for the Mac.

TurboCAD Design Store

To define a TurboCAD hatch pattern, start with a unique, descriptive style_name. (Don't use any spaces in the name!) Then, T,H must be used to indicate that you are defining a TurboCAD hatch pattern. The next parameters might be a bit tricky to understand. A hatch pattern is a vector-based entity, think of it as a single repeating line, or several repeating lines, within a given area. The spacings and different line styles of the pattern are controlled by dashes in the repeating line(s). By using these parameters, you can manipulate the appearance of the repeating line(s) to create a desired hatch pattern. The parameters are described in more detail below:

The only difference between AutoCAD and TurboCAD hatch patterns, is that Turbocad requires a style_name, the T and H parameters, and the number_of_dash_values parameter. For example, listed below is the legacy AutoCAD "parquet" hatch pattern from acad.pat used to represent flooring by the same name:

*AR-PARQ1, 2x12 Parquet flooring: pattern of 12x12
90, 0,0, 12,12, 12,-12
90, 2,0, 12,12, 12,-12
90, 4,0, 12,12, 12,-12
90, 6,0, 12,12, 12,-12
90, 8,0, 12,12, 12,-12
90, 10,0, 12,12, 12,-12
90, 12,0, 12,12, 12,-12
0, 0,12, 12,-12, 12,-12
0, 0,14, 12,-12, 12,-12
0, 0,16, 12,-12, 12,-12
0, 0,18, 12,-12, 12,-12
0, 0,20, 12,-12, 12,-12
0, 0,22, 12,-12, 12,-12
0, 0,24, 12,-12, 12,-12

In TurboCAD, this hatch pattern would be defined as:

#Comment: 2x12 Parquet flooring - pattern of 12x12
PARQ1=T,H, 90, 0,0, 12,12, 2,12,-12
PARQ1=T,H, 90, 2,0, 12,12, 2,12,-12
PARQ1=T,H, 90, 4,0, 12,12, 2,12,-12
PARQ1=T,H, 90, 6,0, 12,12, 2,12,-12
PARQ1=T,H, 90, 8,0, 12,12, 2,12,-12
PARQ1=T,H, 90, 10,0, 12,12, 2,12,-12
PARQ1=T,H, 90, 12,0, 12,12, 2,12,-12
PARQ1=T,H, 0, 0,12, 12,-12, 2,12,-12
PARQ1=T,H, 0, 0,14, 12,-12, 2,12,-12
PARQ1=T,H, 0, 0,16, 12,-12, 2,12,-12
PARQ1=T,H, 0, 0,18, 12,-12, 2,12,-12
PARQ1=T,H, 0, 0,20, 12,-12, 2,12,-12
PARQ1=T,H, 0, 0,22, 12,-12, 2,12,-12
PARQ1=T,H, 0, 0,24, 12,-12, 2,12,-12

Windows Vector Hatch Patterns

Windows hatch patterns are pre-defined in the Windows Wingdi.h file (i.e., pre-defined GDI styles). In TurboCAD, these patterns consist of a style_name (no spaces) to identify that pattern, then W,H to indicate that the pattern is a Windows vector-based hatch, and finally the style_index which GDI uses to identify the pattern:

<style_name> = W,H, <style_index>

Listed below are three examples from Wingdi.h – the middle digit is the style_index:

#define HS_BDIAGONAL 1 /* ///// */
#define HS_CROSS 2 /* +++++ */
#define HS_DIAGCROSS 3 /* xxxxx */

And here are the corresponding parameters to define those hatch patterns (plus two others), from tcw80.ini:


Bitmap Hatch Patterns

  TurboCAD Mac Designer

TurboCAD Designer Mac - precision 2D drafting and design for the Mac.

TurboCAD Design Store

Even though there are parameters listed in the TurboCAD ini file under the [BrushStyle_Table] heading for Windows bitmap patterns, they are commented out and disabled by default in TurboCAD. This is because it is difficult to predict whether these bitmap patterns reside on every computer that TurboCAD is installed on. To enable these patterns, you may delete the hash "#" mark with a text editor. However, to use these (or other) bitmap patterns, you must ensure that the path points to the correct folder, and that the listed bitmaps actually exist.

As with vector-based hatch patterns, bitmap patterns start with a unique, descriptive style_name (no spaces) to identify the pattern. You must use W,B to identify it as a Windows bitmap pattern. Currently Windows bmp is the only file type supported; however, this does not restrict you to the default bmp files listed under the [BrushStyle_Table] heading. The last parameter to specify a bitmap pattern is the bitmap_file_pathname, which includes the bmp filename:

<style_name> = W,B, <bitmap_file_pathname>

The default bitmap files in tcw80.ini are listed below:


You may have to experiment to create a desired bitmap pattern – one possible restriction you might encounter will be the physical size of the bitmap that you are using to fill-in, or tile, a given area. Another restriction might be the scale of any detail in an individual bitmap tile; say you specify a bitmap tile that is largely black with a small white dot in the center, when tiled as a brush style pattern, all you'll likely see is black.

Final Considerations

Whenever you create a new drawing file, TurboCAD stores a copy of the [BrushStyle_Table] in the newly created file. This is true for new drawing files that are created using the TurboCAD factory default settings, and for new drawing files based on templates. For this and other reasons, when adding custom patterns to the TurboCAD brush style table, you should follow these guidelines:

  TurboCAD Deluxe 2D/3D

More professional features per dollar than any other CAD solution! TurboCAD Deluxe.
Click here to learn more.

TurboCAD Design Store

Good luck using your custom patterns in TurboCAD! If you encounter any inaccuracies in this quick guide, please send email.

The contents of this page are copyrighted.

Document history: