Using Coordinate Systems In This Chapter 5 As you draw you use the coordinate system to specify points in the drawing. You can locate and use your own movable user coordinate system (UCS) for working on angled, isometric, or orthographic (3D) views. Working with polar and Cartesian coordinates Using direct distance entry to specify points Moving and rotating a UCS Using a different UCS in each viewport Naming, saving, and restoring a UCS 107
Working with Cartesian and Polar Coordinate Systems A Cartesian coordinate system has three axes: X, Y, and Z. When you enter coordinate values, you indicate a point s distance (in units) and its direction (+ or ) along the X, Y, and Z axes relative to the coordinate system origin (0,0,0) or relative to the previous point. Usually, when you begin a new drawing in AutoCAD, you are automatically in the world coordinate system (WCS); the X axis is horizontal, the Y axis is vertical, and the Z axis is perpendicular to the XY plane. In addition to the WCS, you can define a movable user coordinate system (UCS) with a different origin and axes in different directions. You define a UCS in terms of the WCS (see Shifting and Rotating the Coordinate System on page 113). You can use a template with a UCS to start a drawing that does not use the WCS. Polar coordinate systems use a distance and an angle to locate a point. When you enter polar coordinate values, you indicate a point s distance from the origin or from the previous point and its angle along the XY plane of the current coordinate system. Locating Points The following illustration demonstrates the location of points on the XY plane. The 8,5 coordinate indicates a point 8 units in the positive X direction and 5 units in the positive Y direction relative to the origin. The 4,2 coordinate represents a point 4 units in the negative X direction and 2 units in the positive Y direction. Y 8,5 4,2 -X X -Y origin (0,0) Two-dimensional coordinate system 108 Chapter 5 Using Coordinate Systems
In AutoCAD, you can enter coordinates in scientific, decimal, engineering, architectural, or fractional notation. You can enter angles in grads, radians, and surveyor s units or in degrees, minutes, and seconds. This guide uses decimal units and degrees. If your work involves 3D modeling, you can add the Z axis to your coordinates so that a point is specified as X,Y,Z. The origin in a 3D coordinate system is the point where the values of X, Y, and Z are zero. For more information about setting up and using coordinate systems for 3D models, see chapter 17, Working in Three-Dimensional Space. Displaying Coordinates of the Current Cursor Location AutoCAD displays the current cursor location as a coordinate on the status bar at the bottom of the AutoCAD window. current cursor location There are three types of coordinate display available: Dynamic display: Updates the coordinate values as you move the cursor. Static display: Updates the coordinate values only when you specify a point. Distance and angle: Updates the coordinate values as you move the cursor and displays the values in the format distance<angle. This option is available only when you draw lines or other objects that prompt you for more than one point. When you edit objects, you can cycle through the three types of coordinate display by pressing F6 or CTRL +D. You can also right-click the coordinate display on the status bar to access the display options from a shortcut menu, or you can set the COORDS system variable to 0 for static display, 1 for dynamic absolute display, or 2 for distance and angle display. To find the coordinate of a point on an existing object (for example, midpoint, intersection), use the ID command. To ensure precision, use object snaps to select the point on the object. To find coordinates for all the key points on an existing object, use the LIST command or select the object using grips. Grips are small boxes that appear at strategic locations on objects, such as endpoints and midpoints. When the cursor snaps to a grip, the coordinate display shows its coordinate. Working with Cartesian and Polar Coordinate Systems 109
Specifying Coordinates origin (0,0) In 2D space, you specify points on the XY plane, also called the construction plane. The construction plane is similar to a flat sheet of grid paper. The X value of a Cartesian coordinate specifies horizontal distance, and the Y value specifies vertical distance. The origin point (0,0) indicates where the two axes intersect. You can enter 2D coordinates as either Cartesian (X,Y) or polar coordinates. Polar coordinates use a distance and an angle to locate a point. You can use absolute or relative values with each method. Absolute coordinate values are based on the origin (0,0). Relative coordinate values are based on the last point entered. They are useful for specifying a series of points that are a known distance apart. Entering Absolute and Relative Coordinates To enter an absolute X,Y coordinate, specify a point by entering its X and Y values in the format X,Y. Use absolute X,Y coordinates when you know the precise X and Y values of the location of the point. For example, to draw a line beginning at an X value of 2 and a Y value of 1, make the following entries on the command line: Command: line From point: 2,1 To point: 3,4 AutoCAD locates the line as follows: Y 3,4 -X -2,1 X -Y 110 Chapter 5 Using Coordinate Systems
Use relative X,Y coordinates when you know the position of a point in relation to the previous point. For example, to locate a point relative to 2,1, precede the next coordinate with the @ symbol: Command: line From point: 2,1 To point: @5,3 This is the equivalent of entering the absolute coordinate 3,4. Entering Polar Coordinates To enter a polar coordinate, enter a distance and an angle, separated by an angle bracket (<). For example, to specify a point at a distance of 1 unit from the previous point and at an angle of 45 degrees, enter @1<45. By default, angles increase in the counterclockwise and decrease in the clockwise direction. To move clockwise, enter a negative value for the angle. For example, entering 1< 45 is the same as entering 1<315. You can change the angle direction and set the base angle on the Units Control dialog box. See Setting Drawing Units on page 68. The following example shows a line drawn with polar coordinates. Command: line From point: 0,0 To point: 4<120 To point: 5<30 4<120 5<30 0,0 To point: To point: To point: @3<45 @5<285 Press ENTER to exit the command Working with Cartesian and Polar Coordinate Systems 111
@3<45 previous point previous point 0,0 0,0 @5<285 You also can use a feature called direct distance entry. With direct distance entry, you can specify a relative coordinate by moving the cursor to specify a direction and then entering a distance. See Using Direct Distance Entry on page 112. Specifying Units and Angles You can specify the unit type according to your drawing s requirements: architectural, decimal, scientific, engineering, or fractional. Depending on what you specify, you can enter coordinates in decimal form or in feet, inches, and degrees or in other notation. To enter architectural feet and inches, indicate feet using the prime symbol ('): for example, 72 3,34 4. You don t need to enter quotation marks (") to specify inches that follow feet. If you use surveyor s angles when specifying polar coordinates, indicate whether the surveyor s angles are in the north, south, east, or west direction. For example, to enter a coordinate relative to the current coordinate for a property line that is 72 feet 8 inches long with a bearing of 45 degrees north, 20 minutes 6 seconds east, enter @72 8"<n45d20 6"e You can enter 3D coordinates in the same input formats as 2D coordinates: scientific, decimal, engineering, architectural, or fractional notation. Also, you can enter angles using grads, radians, or surveyor s units or using degrees, minutes, and seconds. Using Direct Distance Entry In addition to entering coordinate values to specify points, you can use a method called direct distance entry. You can use this feature during any of the drawing commands. Once you have started the command and specified the first point, you can specify a point by moving the cursor to indicate a direction and then entering the distance from the first point. This is a good way 112 Chapter 5 Using Coordinate Systems
to specify a line length quickly and is especially useful used in conjunction with ortho and polar tracking. See Using AutoTrack on page 178. You can use direct distance entry to specify points for all commands except those that prompt you to enter a single real value, such as ARRAY, MEASURE, and DIVIDE. When Ortho is on, this method is an efficient way to draw perpendicular lines. In the following example, you draw a line using direct distance entry. To draw a line using direct distance entry 1 From the Draw menu, choose Line. 2 Specify the first point (1). 3 Move the pointing device until the rubber-band line extends in the same direction as the line you want to draw. Do not press ENTER. 4 On the command line, enter the distance you want, and press ENTER. For example, enter 25 to draw a line 25 units in length. 1 cursor moved to specify the direction result after distance entered The line is drawn at the length and in the direction you specified. Shifting and Rotating the Coordinate System Moving the UCS makes it easier to work on particular sections of your drawing. Snap, Grid, and Ortho modes all rotate in line with the UCS. With a customized UCS, you can rotate the XY plane and change the origin point of the coordinate system. This feature is particularly useful for working on sections where the baseline deviates from a horizontal or vertical orientation. You can relocate the UCS using several methods: Specify a new XY plane. Specify a new origin. Align the UCS with an existing object. Align the UCS with the face of a solid. Shifting and Rotating the Coordinate System 113
Align the UCS with the current viewing direction. Rotate the current UCS around any of its axes. Create a UCS perpendicular to a designated Z axis. Select a previously saved UCS. Apply an existing UCS to a different viewport. Two methods, one specifying a new XY plane and one specifying a new origin, are described in Shifting the XY Plane on page 114 and Locating a New UCS Origin on page 114. The other methods are more appropriate for working with 3D models and are described in chapter 17, Working in Three- Dimensional Space. Shifting the XY Plane One way to relocate a UCS is to specify a new UCS origin and the direction of its positive X and Y axes. To shift the XY plane Y 3 1 2 X points specified 1 From the Tools menu, choose New UCS 3 Point. 2 Specify the new origin point (1). For example, in a large drawing, you might specify an origin point near the area in which you want to work. 3 Specify a point to indicate the horizontal orientation of the new UCS. This point should be on the positive portion of the new X axis (2). 4 Specify a point to indicate the vertical orientation of the new UCS. This point should be in the positive portion of the new XY plane (3). The UCS, including the grid, shifts to represent the X and Y axes you have specified. UCS new UCS System variables UCSXDIR and UCSYDIR display the X and Y directions of the current UCS for the current viewport in the current space (model space or paper space). Locating a New UCS Origin By locating a new origin, you can adjust coordinate entry to be relative to a specific area or object in your drawing. For example, you might relocate the origin point to the corner of a building or to serve as a reference point on a map. 114 Chapter 5 Using Coordinate Systems
new origin origin To use a new UCS origin 1 From the Tools menu, choose New UCS Origin. 2 Specify a point for the new origin. UCS Rotating a UCS Origin You can rotate a UCS around an axis by a prespecified value. By rotating a UCS origin in this way, you can quickly relocate the UCS origin in set increments. To rotate the UCS origin 1 Enter the UCSAXISANG system variable and then enter 30. The UCSAXISANG system variable changes the default rotation angle for the X, Y, Z options of the UCS command. 2 Use the X, Y, or Z UCS command options to rotate the UCS origin in increments of 30 degrees. Restoring the UCS to WCS If you have been working with a UCS, you can restore the UCS to coincide with the WCS. To restore the WCS From the Tools menu, choose New UCS World. UCS World Shifting and Rotating the Coordinate System 115
Displaying the UCS Icon To indicate the location and orientation of the UCS, AutoCAD displays the UCS icon either at the UCS origin point or in the lower-left corner of the current viewport. If the icon is displayed at the origin of the current UCS, a cross (+) appears in the icon. If the icon is displayed in the lower-left corner of the viewport, no cross appears in the icon. If you have multiple viewports, each viewport displays its own UCS icon (see Working with UCSs in Viewports on page 117). AutoCAD displays the UCS icon in various ways to help you visualize the orientation of the drawing plane. The following figure shows some of the possible icon displays. indicates WCS UCS at WCS UCS at origin UCS rotated about Z axis UCS rotated about X axis UCS viewed from below Examples of UCS icon display broken pencil icon The broken pencil icon replaces the UCS icon when the viewing direction is along a plane intersecting the X and Y axis. Specifying coordinates with the pointing device while the broken pencil icon is displayed produces points with nonzero Z values. Results may not be what you expect. Make sure that the UCS icon display indicates that the viewing direction is at an angle which allows sufficient pointing device accuracy before attempting to specify coordinates or edit your model. To turn the display of the UCS icon on and off 1 From the View menu, choose Display UCS Icon. 2 To turn the display of the UCS Icon on or off, select On. A check mark beside the On option indicates that the icon is displayed. Choose On again to remove the check mark and turn the UCS icon off. System variables UCSICON UCSICON controls the UCS icon. 116 Chapter 5 Using Coordinate Systems
To display the UCS icon at the UCS origin From the View menu, choose Display UCS Icon Origin. A check mark beside the Origin option indicates that the icon is displayed. The UCS icon is displayed at the origin of the current coordinate system. Choose Origin again to remove the check mark and display the icon at the default position in the lower-left corner of the current viewport. UCSICON System variables UCSORG stores the origin point of the coordinate system for the current viewport. Working with UCSs in Viewports Multiple viewports provide different views of your model. For example, you might set up viewports that display a top view, right and left side views, and a bottom view (see Using Tiled Viewports on page 223). To facilitate editing objects in different views, you can define a different UCS for each view. Each time you make a viewpoint current, you can begin drawing using the same UCS you used the last time that viewport was current. The UCS in each viewport is controlled by the UCSVP system variable. When UCSVP is set to 0 in a viewport, its UCS is always the same as the UCS in the current viewport. When UCSVP is set to 1 in a viewport, the UCS is locked to the UCS last used in that viewport and does not change to match the UCS of the current viewport. To set a UCS for different viewports 1 Create three viewports: one top, one front, and one isometric view. 2 Make the top view active. 3 Enter ucsvp and set value to 1. 4 Rotate the X axis for the active viewport 90 degrees. 5 Repeat steps 2 through 4 for the front viewport, but rotate the X axis 30 degrees. 6 Make the Isometric View active. The isometric view updates to reflect the UCS per viewport depending on which viewport is active. 7 Enter the UCSVP system variable and set the value to 0. 8 To see that the UCS is set for different viewports, switch the focus back and forth between the top and front views. Working with UCSs in Viewports 117
Saving and Restoring a Named UCS You can name and save a UCS with your drawing and restore it at any later time. (See Working with Named Objects on page 157.) You can also create multiple UCSs and easily switch from one to another during a drawing session. To save a UCS 1 From the Tools menu, choose Named UCS. 2 In the UCS dialog box, right-click the current UCS and choose Rename. 3 Enter a new name. UCS Save System variables UCSNAME stores the name of the current coordinate system for the current space. You can restore named or unnamed UCSs. To restore a UCS 1 From the Tools menu, choose Named UCS. 2 In the UCS dialog box, choose the Named UCSs tab and select the UCS you want to restore. 118 Chapter 5 Using Coordinate Systems
3 To view the origin and axis direction of the selected UCS, choose Details. 4 In the UCS Details dialog box, you can view the origin, X axis, Y axis, and Z axis settings. By default, the coordinate system details are calculated relative to the World Coordinate System, as set in the UCSBASE system variable. To calculate these values relative to any named UCS, select a name from the Relative To list. After viewing the names, choose OK. 5 In the UCS dialog box, if you want to change the display of UCS icon or save the UCS with a viewport, choose the Settings tab. See Modifying the UCS Icon Settings on page 121. 6 Choose Set Current. 7 Choose OK. UCSMAN Related UCS Restore restores a named UCS. To rename a UCS 1 From the Tools menu, choose Named UCS. 2 In the UCS dialog box, select the coordinate system name you want to rename. 3 Right-click, and then choose Rename. You can also double-click the selected name or press F2. 4 Enter a new name for the UCS. 5 Press ENTER. UCSMAN Related RENAME renames a named UCS. Saving and Restoring a Named UCS 119
To delete a UCS 1 From the Tools menu, choose UCS Named UCS. 2 In the UCS dialog box, select a UCS. 3 Right-click, and then choose Delete. You can also press the Delete key. 4 Choose OK. Related UCS Del deletes a named UCS. Using a Predefined Orthographic UCS AutoCAD provides six standard orthographic UCSs: top, bottom, front, back, left, and right. By default, the orthographic UCSs are calculated relative to the WCS. You can select one of the predefined orthographic UCS settings from the UCS dialog box. To change to a predefined orthographic UCS 1 From the Tools menu, choose Orthographic UCS Preset. 2 In the UCS dialog box, on the Orthographic UCS tab, select a UCS. 3 Choose Set Current. 120 Chapter 5 Using Coordinate Systems
4 In the UCS dialog box, if you want to change the depth of the orthographic UCS, double-click the depth field list of the orthographic UCS you want to change. To calculate an orthographic UCS relative to a named UCS, select the named UCS from the Relative To list. 5 Choose OK. System variables UCS. UCSMAN UCSBASE specifies the UCS for calculating an orthographic Modifying the UCS Icon Settings The UCS icon settings for the currently active viewport can be modified from the Settings tab. You can use these options to specify the display of the coordinate system icon for different viewports or to apply the specified icon settings to all active viewports in the current drawing. You can also specify whether the coordinate system is saved with the viewport, and whether the view is updated to plan view whenever the coordinate system is changed. To view or modify the UCS icon or viewport settings 1 From the Tools menu, choose Orthographic UCS Preset. 2 Choose the Settings tab. Saving and Restoring a Named UCS 121
3 Under UCS Icon Settings, select one of the following options: On: Displays the UCS icon. Display at UCS Origin Point: Specifies the UCS icon at the origin of the current UCS. Apply to All Active Viewports: Specifies whether the UCS settings in the current viewport are reflected in all active viewports. 4 Under UCS Icon, select one of the following settings: Save UCS with Viewport: Saves the coordinate system settings with the viewport (specified in the UCSVP system variable). Update View to Plan When UCS is Changed: Determines whether the view is restored to plan view when the UCS changes in the viewport (specified in the UCSFOLLOW system variable). 122 Chapter 5 Using Coordinate Systems