17.1 The Hatch Command

 < Day Day Up > 



17.1 The Hatch Command

There are actually a few ways to draw hatch patterns. (Section lines are created as a style of hatch pattern. Therefore, I'll refer to both as hatch patterns.) There's a dialog box approach called Boundary Hatching, a simple drag-n-drop approach that utilizes the Tool Palettes, and, of course, a command line approach. We'll begin with the command line as it presents some opportunity you won't find in the dialog box. The sequence is:

Command: hatch (or -h)

Enter a pattern name or [?/Solid/User defined] <ANSI31>: [enter the name of the pattern you wish to use]

Specify a scale for the pattern <1.0000>:  [enter the scale for your hatch pattern]

Specify an angle for the pattern <0>: [enter the desired angle of the pattern]

Select objects to define hatch boundary or <direct hatch>,

Select objects: [select closed objects that will form the closed boundaries of the hatching]

Select objects: [enter to complete the command]

  • There are four options presented at the initial hatch prompt.

    • The default option (the one within the angled brackets) is ANSI31. This is the standard hatch pattern most people use to show section lines.

    • If you enter a question mark at the end of the first prompt, AutoCAD will prompt as follows:

      Enter pattern(s) to list <*>:

      Hit enter to view a list of the available hatch patterns.

    • The Solid hatch pattern will produce the same results - but faster - as the Solid and Donut commands you learned in Lesson 10.

    • The User Defined option allows you to create a hatch pattern by defining the angle and spacing of hatch lines. If selected, AutoCAD presents these prompts:

      Specify angle for crosshatch lines <0>: [enter the angle for the hatch lines]

      Specify spacing between the lines <1.0000>: [enter the spacing between the hatch lines]

      Double hatch area? [Yes/No] <N>:  [double hatching means that AutoCAD will draw the lines first according to the angle defined at the first prompt here; then it'll draw a second set of hatch lines perpendicular to the first

  • The next prompt asks you to enter a Scale. This may already be set if you created the drawing using a wizard. But if it defaults to 1 and you wish to plot the final drawing to scale, enter the drawing scale factor here. (Refer to the Drawing Scales chart in Appendix A.)

  • The Angle of the hatch pattern defaults to zero. This doesn't mean that the lines of the hatch pattern will be horizontal. It means that AutoCAD will draw the lines of the selected hatch pattern as they appear in the pattern's definition. Changing the angle here will cause AutoCAD to rotate the pattern (which may have defined the lines at an angle already) by the angle specified.

  • Next, AutoCAD requires that you identify the boundaries of the hatch pattern. Accomplish this by simply selecting the objects to use as boundaries.

    Alternately, you can hit enter to use the direct hatch option. This option allows you to draw the boundaries (polylines) on the fly. The command sequence for the direct hatch option looks like this:

    Retain polyline boundary? [Yes/No] <N>: [you'll define the boundary in much the same way you would draw a polyline; tell AutoCAD if you wish to keep the boundary once you've defined it]

    Specify start point: [pick the start point of the boundary line]

    Specify next point or [Arc/Length/Undo]: [continue picking points on the boundary - this option repeats]

    Specify next point or [Arc/Close/Length/Undo]: c [close the boundary]

    Specify start point for new boundary or <apply hatch>: [you can hit enter to complete the command or hatch more than one area at a time]

    • The first option here - Retain polyline boundary? - allows you to keep the polyline you'll create to define the hatched area. The default is to delete it.

    • The rest of the options are standard Pline options.

Okay; let's take a look at the Hatch command in action.

Do This: 17.1.1 Command Line Hatching

  1. Open the demo-hatch.dwg file the C:\Steps\Lesson17 folder. The drawing looks like Figure 17.1.1a.


    Figure 17.1.1a

  2. Follow these steps.

    TOOLS

    COMMAND SEQUENCE

    STEPS

    No Button Available

    (Note: The button on the Draw toolbar calls the BHatch command.)

    Command: -h

    1. Enter the Hatch command by typing hatch or -h at the command prompt.

     

    Enter a pattern name or [?/Solid/User defined] <ANSI31>: [enter]

    Specify a scale for the pattern <1.0000>:  [enter]

    Specify an angle for the pattern <0>:  [enter]

    2. Accept the defaults for pattern, scale, and angle.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects:

    Select objects: [enter]

    3. Select the outer rectangle, and then hit enter to complete the command. Your drawing looks like Figure 17.1.1.3a.

     


    Figure 17.1.1.3a: Default Hatching of Outer Object Only

    Command: u

    4. Undo the last modification.

     

    Command: -h

    5. Repeat Steps 1 and 2.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects:

    Select objects: [enter]

    6. This time, select all of the objects before completing the command. Your drawing looks like Figure 17.1.1.6a.

    Notice the results of this hatching. AutoCAD has recognized multiple objects in the selection set and hatched so that you can tell them apart. It has even recognized the text in the middle. This is AutoCAD's Normal style of hatching.

     


    Figure 17.1.1.6a: Default Hatching of All Objects

    Command: u

    7. There are three styles altogether. By default, AutoCAD uses the Normal style shown here. Now let's look at the other two - Outer and Ignore.

    Undo the last modification.

     

    Command: -h

    8. Repeat the Hatch command.

     

    Enter a pattern name or [?/Solid/User defined] <ANSI31>: ansi31,o

    9. When prompted for the pattern, type ANSI31,O. (the "O" tells AutoCAD to hatch only between the two outermost boundaries.)

     

    Specify a scale for the pattern <1.0000>:  [enter]

    Specify an angle for the pattern <0>:  [enter]

    10. Accept the defaults for scale and angle.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects:

    Select objects: [enter]

    11. Select all of the objects; complete the command. Your drawing looks like Figure 17.1.1.11a. (Only the area inside the outer boundary has been hatched.)

     


    Figure 17.1.1.11a: Outer Hatching

    Command: u

    12. Undo the last modification.

     

    Command: -h

    13. Repeat the Hatch command.

     

    Enter a pattern name or [?/Solid/User defined] <ANSI31>: ansi31,i

    14. When prompted for the pattern, type ANSI31,I. (The "I" tells AutoCAD to ignore any internal boundaries.)

     

    Specify a scale for the pattern <1.0000>:  [enter]

    Specify an angle for the pattern <0>:  [enter]

    15. Accept the defaults for scale and angle.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects:

    Select objects: [enter]

    16. Select all of the objects again; complete the command. Your drawing looks like Figure 17.1.1.16a.

     


    Figure 17.1.1.16a: Ignore Hatching

    Command: u

    17. Undo the last modification.

     

    Command: -h

    18. Let's define our own pattern. Repeat the Hatch command.

    Enter a pattern name or [?/Solid/User defined] <ANSI31>: u

    19. Tell AutoCAD to use the User defined option.

     

    Specify angle for crosshatch lines <0>: 60

    20. Draw the lines for your User defined pattern at 60°

     

    Specify spacing between the lines <1.0000>: .25

    21. … and space the ¼ unit apart.

     

    Double hatch area? [Yes/No] <N>:

    22. Don't double hatch the area yet.

      

    23. Select the circle and complete the command. Your drawing looks like Figure 17.1.1.23a.

     


    Figure 17.1.1.23a: User-Defined Hatching

     

    Command: -h

    24. Repeat the Hatch command. (Do not hit enter to repeat the command as that will repeat the Select objects prompt only. AutoCAD will use the Style, Angle, and Spacing you set up last.)

     

    Enter a pattern name or [?/Solid/User defined] <U>: [enter]

    25. Define another style.

     

    Specify angle for crosshatch lines <60>:  [enter]

    Specify spacing between the lines <0.2500>: [enter]

    26. Accept the default angle and spacing.

    Double hatch area? [Yes/No] <N>: y

    27. This time, let's Double hatch an area.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects:

    Select objects: [enter]

    28. Select the polygon and the circle. Then complete the command. Your drawing looks like Figure 17.1.1.28a.

    Notice that when double hatching is indicated, AutoCAD draws the second set of lines at 90° to the first.

     


    Figure 17.1.1.28a: Double Hatching

     

    Command: -h

    29. Now let's look at the Solid option. Repeat the Hatch command. (Do not hit enter.)

    Enter a pattern name or [?/Solid/User defined] <U>: s

    30. Select the Solid option.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects:

    Select objects: [enter]

    31. Select the rectangle and the polygon. Then complete the command. Your drawing looks like Figure 17.1.1.31a.

     


    Figure 17.1.1.31a: Solid Hatching

    Command: e

    32. Erase all the hatch patterns. Notice that a single pick selects all the lines in a pattern. (You may have to pick several places to find a pickable point in the solid pattern.)

     

    Command: -h

    33. Let's change the Angle of the pattern and see what happens. Repeat the Hatch command.

     

    Enter a pattern name or [?/Solid/User defined] <SOLID>: ansi31

    34. Use the ANSI31 pattern.

     

    Specify a scale for the pattern <1.0000>:  [enter]

    Specify an angle for the pattern <60>: 90

    35. Accept the scale, but tell AutoCAD to use a 90° angle for the hatching.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects:

    Select objects: [enter]

    36. Select the rectangle and the polygon. Complete the command. Your drawing looks like Figure 17.1.1.36a.

    Notice that AutoCAD hatches between the two selected boundaries, and that the defined 45° hatch lines have been rotated 90° as instructed.

     


    Figure 17.1.1.36a: Angled Hatching

     

    Command: -h

    37. Now let's look at the Scale option. Repeat the Hatch command. (Again, don't hit enter.)

     

    Enter a pattern name or [?/Solid/User defined] <ANSI31>: [enter]

    38. Accept the default pattern.

     

    Specify a scale for the pattern <1.0000>: 2

    Specify an angle for the pattern <90>: 0

    39. Change the scale to 2, and return the angle to 0.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects:

    Select objects: [enter]

    40. Select the polygon and the circle, and then complete the command. Your drawing looks like Figure 17.1.1.40a.

     

    click to expand
    Figure 17.1.1.40a: Scaled Hatching

     

    Command: -h

    41. We've one more thing to explore - the direct hatch option. Here we'll create a hatch pattern within a temporary polyline. Repeat the Hatch command.

     

    Enter a pattern name or [?/Solid/User defined] <ANSI31>: [enter]

    42. Accept the default pattern.

     

    Specify a scale for the pattern <2.0000>: 1

    Specify an angle for the pattern <0>: 135

    43. Set the scale to 1 and the angle to 135.

     

    Select objects to define hatch boundary or <direct hatch>,

    Select objects: [enter]

    44. This time, hit enter to access AutoCAD's direct hatch option.

     

    Retain polyline boundary? [Yes/No] <N>:  [enter]

    45. We don't want to retain the polyline boundary.

     

    Specify start point:

    Specify next point or [Arc/Length/Undo]:

    Specify next point or [Arc/Close/Length/ Undo]:

    Specify next point or [Arc/Close/Length/ Undo]:

    Specify next point or [Arc/Close/Length/ Undo]: c

    46. With the Ortho on, draw a four-sided polyline around the text in the center of the circle. Be sure to close the polyline.

     

    Specify start point for new boundary or <apply hatch>: [enter]

    47. Hit enter to complete the command. Your drawing looks like Figure 17.1.1.47a.

     

    click to expand
    Figure 17.1.1.47a: Direct Hatch

    Command: e

    48. Erase all the hatch patterns.

    Command: qsave

    49. Save the drawing but don't exit.

Note 

An important thing to remember about our exercises thus far is that each of the objects being hatched (circle, polygon, and rectangle) is closed. You can hatch lines and arcs as well, but they must also be part of a closed grouping.

It isn't at all unusual to get some fairly bizarre hatching results - particularly patterns that bleed outside of the selected boundaries. There are a number of quirks that can cause this, but the most common is an open boundary. If you're sure the boundary is closed and you still get some freaky result, or if you simply don't want a boundary to show, use the direct hatch option.



 < Day Day Up > 



AutoCAD 2004. One Step at a Time
3D AutoCAD 2004/2005: One Step at a Time
ISBN: 0975261371
EAN: 2147483647
Year: 2003
Pages: 96

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net