DDHATCH

The DDHATCH command lets you setup the required crosshatch pattern and then create an associate hatch region or replace the associate hatch of selected regions with it. The same functionalities are also provided by the HATCH, RHATCH and CHANGE commands. However, DDHATCH provides a much better user interface in specifying the crosshatch pattern.

DDHATCH will create and maintain its own private hatch pattern table out from the current pattern file used by TwinCAD, and a slide library containing slides corresponding to these patterns. If these informations can not be found from the installed directory or are already out-of-date, DDHATCH will begin an initialization process first before entering the service dialogue at its start-up. See latter section for more information about the initialization process.

If everything is fine, DDHATCH will pop up the dialogue window as show below:
ddhatch.gif (11012 bytes)

You may setup the required crosshatch pattern by selecting one from the predefined patterns or by giving direct hatch line specifications, and then click at the [

Create] button to create a new hatch region to associate with it, or click at the [Modify] button to select existing regions and to replace their associate hatch with it.

The following describes the details of these screen items from the top of the dialogue windows.

Use Predefined Pattern

This group title is also an option check box. You may pick at it to toggle its checking state. If this option is enabled (i.e. being checked), the predefined pattern specified in this group will be used for the crosshatch and those items in this group will become effective:

  • Pattern     A combo-box type value field, specifying the name of the predefined pattern to use. You may pick it by its drop-down button to select a name directly from a list of predefined patterns. Or, you may pick it by its value box to choose the desired pattern from the pop-up icon menu, as shown in the Example section.
  • Size     A value entry field, specifying the size of the pattern in terms of the Minimum Y-interval of the repeated lines in the pattern. Change this size value will also update the scale factor.
  • Scale     A value entry field, specifying the scale factor of the pattern. Change this scale value will also update the size value.
  • Angle     A value entry field, specifying the rotation angle of the pattern in units of degrees.

The selected pattern will be shown in the preview sub-window with a slide from the "DDHATCH.SLB" slide library, provided that it is present. Note that the effect of the pattern scale and rotation angle is not reflected from the preview image. To observe the true-size image of the resulting pattern, you may click the [Preview] button. See latter paragraphs on the [Preview] button.

User-Defined Pattern Group

If the use of the predefined pattern is disabled, then user-defined pattern will be used and the items from this group will become effective. A user-defined pattern is a pattern defined by direct hatch line specifications. Each hatch line specification contains the following three parts:

  • Angle     Direction angle of the hatch line in units of degree.
  • Spacing     Offset distance between each repeated hatch lines in drawing unit. This value can not be zero.
  • Relative Alignments     Relative position with respect to a given alignment point that one of the repeated hatch lines must pass through. This consists of two separate value entry fields, one for the delta-X and the other, delta-Y.

For an associate hatch region using user-defined pattern, there can be at most three distinct hatch line specifications. These are tabulated in this group. You can modify any of these control values by clicking at the corresponding entry field. However, to make a hatch line specification become effective, you have to check at its corresponding check-box.

The resulting pattern will be shown in the preview sub-window, provided that the use of predefined pattern is disabled. Note that the true size of the pattern with respect to the current drawing is determined by the spacing between hatching lines, and is not reflected by the preview image. To observe the true-size image of the resulting pattern, you may click the [Preview] button. See latter paragraphs on the [Preview] button.

Align Hatch Pattern

This is an option check box. If this option is enabled, you will be asked to designate an alignment point when you click at the [Create] button to create a new associate hatch region. DDHATCH will prompt:

Please designate pattern alignment base point:

The pattern alignment point is a point through which the pattern origin will pass. The default will be at point (0,0).

Visible Boundary

This is an option check box. If this option is enabled, the associate hatch region created will have a visible boundary; otherwise, the boundary will be invisible.

All associate hatch regions created by HATCH command are with invisible boundaries.

The [Sample] Button

You may click this button to sample an existing region entity from the drawing to setup the current hatch specification. You will be asked to pick up the region entity by the prompt:

Please select the hatch region to sample:

DDHATCH will read the associate state of the region and set the current hatch specification accordingly.

The [Preview] Button

You may click this button to view the physical size of the crosshatch pattern that appears in the preview sub-window from the drawing. DDHATCH will create a box of crosshatch and prompt

A 6-unit crosshatch is created at lower left corner...
Press space bar to end this crosshatch size preview:

You may enter ZOOM and PAN commands transparently to compare the crosshatch size with respect to your current drawing or the targeted boundary area.

Although the appearance of the current hatch pattern specification, either from predefined pattern or from direct hatch lines, can be observed from the preview sub-window, the relative size of the pattern to the current drawing may still not be clearly visualized. If the pattern size is too small, i.e. small scale factor or too narrow line spacing, the crosshatch will be too dense to have any meaning other than solid, let along the time to generate it. If it is too large, the effect of the crosshatch may not be so obvious.

Therefore, you may need to physically observe the relative size of the crosshatch to the current drawing, to determine a proper size for it.

The [Modify] Button

You may click this button to select region entities, modify their states of associativity by the current hatch specification and end the DDHATCH command operation. You will be asked to select region entities by the prompt:

Select Regions to Modify (+):

DDHATCH will terminate after the operation completes.

The [Create] Button

You may click this button to create a new regional area of crosshatch and end the DDHATCH command operation. DDHATCH will internally call BPOLY command first for you to define the regional area. See BPOLY command for details of the command operation.

After the region entity is created by the BPOLY command, DDHATCH will apply the current setting of hatch specification to it and end the command operation.

Other Buttons

You may press the [Help] button to see the helping text. Press the [Quit] button to end DDHATCH immediately. Pressing <ESC> key also quits DDHATCH.

DDHATCH Initialization

DDHATCH requires additional informations from the following two disk files:

  • Pattern Table: A file containing a compacted informations about the current loaded hatch patterns in TwinCAD. It must have the same path name as the current loaded pattern file but with a different file extension as "DDH".
  • Slide Library: A file containing corresponding slides to these predefined patterns. It must be "DDHATCH.SLB" and be located in one of the search path of TwinCAD.

If DDHATCH can not find and load in the Pattern Table, or the Pattern Table is out-of-date because the pattern file had been updated, DDHATCH will issue the message:

** Initialize DDHATCH ...

and begin to create a new pattern table.

After the pattern table is created or loaded in, DDHATCH will search for the "DDHATCH.SLB" slide library and check to see if there are corresponding slides in it to each of the predefined hatch patterns. If this slide library is missing, or there is at least one slide missing (maybe due to new pattern definition added to the pattern file), DDHATCH will pop up a query dialogue asking you if you want DDHATCH to build one or to add new slides for you.

Note that, without the corresponding slide, you won't be able to view the predefined pattern from the preview sub-window. However, if you like, you may create the required slides using MSLIDE command and update the "DDHATCH.SLB" slide library using the DOS utility ASLIDE.EXE all by yourself.

Creating Slides

If you permit, DDHATCH will create slides for each corresponding predefined hatch patterns and save them into the "DDHATCH.SLB" slide library automatically. This requires the DOS utility ASLIDE.EXE be located from the search paths.

Since the aspect ratio of the slide to create has better be the same as that of the preview sub-window which is about square, you may have to adjust the window frame of TwinCAD such that the drawing window is about square for better slide generation.

DDHATCH will prompt

** Before generating the required slide ...
Please adjust the drawing window to about square:

You may press the space bar to proceed the slide generation.

Special Notes:

The DDHATCH command is an external command provided by the TCL program file "DDHATCH.TCL" or "DDHATCH.TCA". Either file must be present in the COMMANDS sub-directory where the TwinCAD resides. If you can not issue DDHATCH command, you may resolve the problem by copying the "DDHATCH.TCL" to the COMMANDS sub-directory.

goback.gif (1545 bytes)