How To Create Object In Autocad
Intro. to Computers for Architecture Majors: § 4: Manipulating AutoCAD Objects
Instructor: M.S. Schmalz
AutoCAD has many different methods for grouping primitive graphics objects into composite objects. Such features are used to increase productivity, by allowing copying, rotating, or various types of editing commands to be performed concurrently on groups of objects, rather than sequentially on individual objects.
AutoCAD 2000 has several improvements over Release 12 in the area of object composition and manipulation, including improved icon-based editing tools whose string representations are echoed in the Command Window. In this section, we discuss each of these commands, and show you how to access them from the AutoCAD interface. This section is organized as follows:
4.1. Object Editing Commands
4.2. Polylines and Polyline Editing
4.3. Patterns and Fills
4.4. Reusable Drawing ComponentsWhen one has many objects on the screen and wants to edit some but not all of them, the editing commands discussed in Section 4.1 are useful. Section 4.2 discusses the grouping of sequentially connected line segments into composite linear objects called polylines. Often in architectural drawing, one needs to produce visual effects such as bricks, shingles, etc. The pattern-hatch and fill commands required to produce these effects are discussed in Section 4.3. We also discuss a more advanced topic, namely, resuable drawing components (e.g., trees, shrubbery, clip art in Section 4.4) that will be useful for you in completing the Final Project.
4.1. Object Editing Commands.
Object editing commands provide a convenient method of performing various spatial tasks such as rotation and scaling, mirroring (reflection about a line), and low-level tasks such as copying and moving graphics objects.
4.1.1. Object Selection.
In order to manipulate one or more objects with an editing command, the object or group of objects must first be selected. The selection process is accomplished by drawing a selection figure with the pointing device, then clicking to lock in the selection. The following are useful selection figures, also called selection modes, several of which are illustrated in Figure 4.1:
Point -- One picks a point on the object with the box at the center of the crosshair cursor, then clicks. The selected object's boundary (outline) becomes dotted instead of a solid line.
Window -- This mode is used to select a group of objects. When the pointing device is clicked for the first time, a corner of a selection window or box appears. By dragging the cursor, one establishes the window perimeter. The window mode selects only those objects that are entirely contained within the window, as shown in Figure 4.1.
Crossing -- Similar to the Window mode, this figure is also a box or rectangle, shown in Figure 4.1 by a bold outline. However, all objects that are partially or entirely within the box will be selected. This includes objects that the box or window just touches.
WPolygon -- Using the pointing device in line-drawing mode, one draws a polygon (similar to the LINE command with the CONTIN option). The objects that are entirely contained within the polygon are selected at the next click. Objects not entirely contained in the polygon are not selected.
CPolygon -- This mode is similar to crossing and WPolygon, in the sense that a polygon is draw, and all objects partially or entirely contained within the polygon are selected.
Fence -- Similar to CPolygon mode, a line consisting of a sequence of line segments is drawn. All objects touched by the line are selected when the pointing device is clicked.
All -- Every object in the current drawing is selected.
Last -- The most recently created object is selected. A synonym for this option is Previous.
Figure 4.1. Examples of AutoCAD selection modes.4.1.2. Object Editing.
The major AutoCAD editing commands require that objects to be first selected by one of the methods described above. Salient editing commands are:
Erase -- Removes selected objects from drawing. One enters the ERASE command or selects the ERASE icon (looks like a pencil eraser), then selects objects, then depresses the carriage return (
Enter
key). The selected object(s) will disappear from the screen but can be recalled immediate after the Erase command by entering the OOPS command on the Command Line.Move -- Used when one needs to move an object or group of objects from one location to a different location on the current drawing. The MOVE command has the following procedure:
- Select the objects to be relocated using one of the modes listed above.
- Select the base point (a reference point on an object) using the pointing device.
- Select the displacement (amount the base point is to be moved) using the pointing device.
Copy -- Similar to Move, but reproduces objects. This is a useful command that saves much effort in repetitive drawing tasks. The usage of Copy is exactly like that of Move, except that the original object is preserved.
Mirror -- Allows an object to be reflected about a mirror line, where preservation of the original object can be selected by the user. The following procedure pertains:
- Select the objects to be reflected.
- Draw a mirror line (one line segment), as shown in Figure 4.2.
- Select the base point (a reference point on an object) using the pointing device.
- Select the displacement (amount the base point is to be moved) using the pointing device, and the object will be mirrored about the mirror line.
- In answer to a prompt on the Command Line, specify whether or not the original object is to be preserved.
Trim -- This command is similar to a paper cutter or scissors, whereby a part of an object or group of objects may be deleted. One merely draws a trim line (similar to a mirror line) and clicks. The portion of the selected object(s) on the side of the trim line occupied by the pointing device cursor will be deleted.
Extend -- With this command, one selects a boundary edge of an object, then moves the pointing device to the point to which the edge is to be extended. The selected object is reshaped so that the boundary edge now meets the destination point.
Fillet -- Rounds the angles of an object that are less than 180 degrees in subtense. This command is often used to depict a welded joint between two pieces of metal.
Chamfer -- Truncates the vertices of angles in a graphic object (e.g., a polygon) that are less than 180 degrees in subtense. The chamfer depth, which determines how much of the angle will be truncated, is specified in a command option.
Rotate -- With this command, one can rotate objects around a point to change their orientation. One merely selects the objects to be rotated, clicks on a base point (the center of rotation), then moves the pointing device to rotate the object about the base point. Alternatively, the rotation angle can be specfied in response to a prompt that appears on the Command Line.
Figure 4.2. Examples of selected AutoCAD editing commands.This concludes our overview of basic object selection and editing commands.
4.2. Polylines and Polyline Editing.
It is often useful to draw an object in terms of a connected sequence of line segments. In the preceding section, we saw how the CONTIN option of the LINE command would allow one to draw such a sequence. The concept of polylines takes the idea of connected line segments a step further, by allowing the sequence of segments to be manipulated as a single object.
4.2.1. Drawing Polylines.
The PLINE command is used to draw polylines, and has the following features:
Usage:
Step 1. Pick a from-point (origin of the polyline).
Step 2. A list of options is displayed, and one can enter endpoints of the polyline segments.Salient Options:
- WIDTH
-- the default width is zero, which means that polylines look like regular lines.To change linewidth, enter the decimal width, e.g., 0.125 = 1/8". Depending on how you set precision in the UNITS command, AutoCAD may round this number.
Both a starting and an ending width must be specified. AutoCAD defaults the ending width to the starting width. If the widths are different, then tapered lines will be drawn. The i-th line segment in the polyline sequence must have as its starting width the ending width of the (i-1)-th segment.
- HALFWIDTH
-- the linewidth is specified in terms of a centerline that runs down the middle of the current line segment. To determine the linewidth, multiply the halfwidth by two.
- LENGTH
-- the current line segment is drawn to a specific length and is parallel to the last polyline segment drawn. To make the segments connected (not parallel), enter a negative length in response to the prompt.
Polylines can also be drawn using arcs. This is similar in concept to the CONTIN option on the ARC command. Continuous polyline arcs are drawn tangent to the preceding arc in the polyline sequence. Additionally, the current arc segment has the same directional sense as the previous polyline segment.
Polylines can be "undone" (similar to the UNDO option of the LINE command) using the UNDO option to delete segments in the reverse order in which they were drawn.
4.2.2. Editing Polylines.
A completed polyline is treated as a single graphic object, not a series of line or arc segments. Therefore, editing occurs at the object level, not at the segment level. The customary editing commands apply (e.g., those commands reviewed in Section 4.1). However, there are two differences in command usage, which are discussed as follows:
Polyline Fillet -- All angles of the object are filleted, not just those corners that have inside angles less than 180 degrees.
Polyline Chamfer -- All corners of the object are truncated, in a manner symmetric to the polyline fillet described above.
Polyline editing has several unfortunate implementational problems in AutoCAD. Chief among these is the difficulty one encounters when one attempts to combine or merge polylines of different width. Often, the resulting width (if the polylines can be merged at all) is the average of the two differing widths. Occasionally, one or the other widths is adopted as the width for all segments in the joined polyline.
Another problem with polylines is that segments which have tapering widths are not easily edited (e.g., trimmed or chamfered). In such cases, AutoCAD often cannot decide how to set the polyline tapers in truncated lines, and width information is misrepresented or lost. If this awkwardness (and potential inaccuracy) is tolerable, then proceed with polyline editing. Otherwise, be careful.
In addition to the usual editing commands, one may use the PEDIT command to edit polylines. In this case, one selects object in the usual manner, except that objects with a presecified width may be ignored unless the Window or Crossing selection options are used. Also, if one selects segments that are not polylines, AutoCAD will prompt as to whether the segments should be unified into one or more polylines. If such is the case, then the polyline width defaults to the currently-specified polyline width. Beware! Strange things can happen -- e.g., a circle can become a 360 degree polyline arc!
4.2.3. The PEDIT Command.
The polyline editing command PEDIT has many options, with the more common ones listed as follows:
Open -- Deletes the closing segment of a polyline.
Close -- Used if a different command has been interposed in the polyline creation sequence, such that the CLOSE option on the PLINE command won't work. This is similar to the situation where one creates a sequence of line segments with the LINE command and its CONTIN option, but cannot manipulate all the segments in the same way because another command has been interposed. This problem is a key deficiency of AutoCAD polylines, and will be discussed further during class.
Join -- Combines two or more polylines that touch at one point, to yield one unified polyline. This option cannot be used with closed polylines, i.e., ones from which a polygon was formed.
Width -- Allows the user to change the current polyline width. Unfortunately, if one uses this option with tapered segments, then the taper information will be lost and the segments will have the specified width. All polyline segments will have the same width, which can be selected via the keyboard or pointing device.
Edit Vertex -- Used to alter the shape of a polyline object. This allows the user to manipulate (e.g., move, insert, delete, or break) polylines at any given vertex. The reference point for the Edit Vertex sub-options is the "first" vertex of the polyline, which is marked with an X. For example, here follow several sub-options:
Break inserts a space or break between the first vertex and a vertex specified by the user's pointing device.
Insert adds a new vertex, which is added after the vertex marked X. The user must select the position of the new vertex.
Move translates an existing vertex to a new location. For example, this is useful when stretching a graphics object by moving one of its vertices, where the segments attached to that vertex are "rubberbanded".
Regen regenerates the edited polyline, similar to the REGEN command.
Straighten will linearize segments that lie between any two selected vertices.
Tangent allows a vertex and direction of the associated segment to be selected for later use with curve fitting (discussed subsequently).
Width facilitates changing the width of the segment that occurs after the marked vertex. One can use this suboption to taper segments individually.
Fit Curve -- converts a sequence of straight line segments into curved lines, which is useful for manually forming contour maps, drafting outlines of curved streets, etc.
Spline Curve -- converts a sequence of straight line segments into a curved line using spline interpolation. Unlike the Fit Curve option, the spline curve segments do not necessarily pass through the vertices, but through the first and last vertices of the polyline only. Specifying additional vertices (also called control points) will make the curve appear to be smoother.
De-curve -- converts a fitted or spline curve into a sequence of straight line segments. The procedure for this conversion is sometimes "buggy", and tends to produce line segments that do not pass through the vertices of the original polyline from which the curve was constructed.
4.3. Patterns and Fills.
Polygons or circles/ellipses can be drawn with a patterned fill using the HATCH command, which is accessed via the Draw pulldown menu (on the Top Bar) or via the Hatch Icon (a shaded box in the lower left hand corner of the Draw popup toolbar).
4.3.1. Hatching a Selected Area.
To hatch or fill a specific area, execute the following steps:
Select the HATCH command from the Draw menu or popup toolbar, and the Boundary Hatch dialog box will appear.
Click on the Pick Points button to activate polygon selection.
Move the AutoCAD crosshair cursor within the area to be hatched and click on the left pointing device button. The lines surrounding the selected area will become dotted, dashed, or light grey in color.
Depress the
Enter
key to signify that you are done selecting areas.Select the Apply button from the Hatch dialogue box, and the selected area will be hatched.
4.3.2. Obtaining Different Fill Patterns.
It is frequently useful to have different patterns filling areas that have different meanings in a given drawing or set of drawings. The Hatch Style option is used to change the pattern fill, as follows:
Select the HATCH command, and the Boundary Hatch dialog box will appear.
Select the pattern type using the menu bar at the upper left hand corner of the dialog box.
Set the pattern scale (resolution of spaces between lines in the pattern) and rotation angle using the Scale and Angle parameter specification slots in the dialog box.
The Advanced button in the dialog box allows you to access features such as detection of islands in the center of closed figures, pattern fills for islands and other types of figures, etc. This will be discussed in class, and in our demonstration session.
We next turn to a discussion of reusable AutoCAD objects.
4.4. Reusable Drawing Components.
It is frequently useful to have a library of objects that you can paste into AutoCAD drawings. For example, instead of having to draw each tree or shrub, then copy it where duplicates are useful, one can import various types of trees or shrubs from a library of clip art. AutoCAD has various mechanisms for facilitating this import/export of graphics and drawings, which we discuss in this section.
The easiest way to bring graphics into an AutoCAD drawing is via the IMPORT command. Invoking this command produces the Import File dialogue box. The pulldown list labelled List Files of Type displays the file formats that you can import.
The file types currently accepted by AutoCAD 2000 are:
DOS Extension File Type Contents .WMF
Windows Meta File MS-Windows vector format graphics file .DXF
Drawing Interchange File AutoCAD drawing -- ASCII file format .SAT
ACIS File AutoCAD solid model file format .EPS
Encapsulated Postscript Common raster-format file .PCX
Microsoft Paint File obsolete raster-format file .TIF
Tagged Image File Raster-format file, commonly-used .GIF
Graphic Interchange Format Raster-format file, commonly used on WWW .3DS
3-D Studio File AutoDesk 3D Studio model file
The result of using these different file formats varies with the file type. For example, a .WMF
file is converted to an AutoCAD Block datatype, but a .DXF
file is converted directly to an AutoCAD drawing. Check your AutoCAD textbook and manual for directions as to each file type. We recommend that you use .DXF
and .GIF
files wherever possible.
This concludes our discussion of graphics editing. In the next section, we overview more advanced topics, such as database interfaces and 3-D rendering.
Copyright © 1997 by Mark S. Schmalz
All rights reserved, except for viewing or printing by UF faculty
or students registered for this class.
How To Create Object In Autocad
Source: https://www.cise.ufl.edu/~mssz/Arch-CGS3470/AutoCAD-obj.html
Posted by: randallevould.blogspot.com
0 Response to "How To Create Object In Autocad"
Post a Comment