Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Книги_AutoCad_2 / AutoCAD 2006 and AutoCAD LT 2006 Bible_2004г__.pdf
Скачиваний:
142
Добавлен:
09.04.2015
Размер:
17.83 Mб
Скачать

Chapter 12 Obtaining Information from Your Drawing

301

Getting information from the Properties palette

You can also obtain information about an object by selecting it and choosing Properties from the Standard toolbar. In Chapter 11, I discuss using this Properties palette to change layer, color, linetype, and lineweight properties. As you can see in Figure 12-10, the window also lists the line’s start and end points; delta (change) in X, Y, and Z; length; and angle — much like the LIST command. However, you can change the start and end points directly in the palette.

Figure 12-10: The Properties palette lists information about a selected object.

On the

The CD-ROM contains three routines that provide information about your objects. Linesum

CD-ROM

provides the total length of selected lines. Arcsum adds the lengths of selected arcs.

 

Polydis provides the length of a selected polyline. Look in the Software\Chap12 folder.

Measurement Commands

The DIVIDE command divides an object into equally spaced sections. The MEASURE command divides an object into sections of a specified length. These commands are useful in many fields. For example, you may need to space bolt holes evenly around the edge of a bushing, or place fence studs along the edge of a plot every five feet.

Dividing objects

The DIVIDE command divides an object into equal sections. DIVIDE does not break the object — it simply places point objects along the selected object. You can then use the Node object snap if you want to draw from those points.

302 Part II Drawing in Two Dimensions

 

To divide an object, choose Draw Point Divide. Select the object that you want to divide.

 

The command responds with the Enter the number of segments or [Block]: prompt.

 

Enter the number of segments that you want to create. AutoCAD places the point objects

 

and ends the command.

Tip

Remember that you can set the point display by choosing Format Point Style. An easy-to-see

 

point style is especially useful for the DIVIDE command. Specify the point style before using the

 

command.

 

For example, to create eight segments, you need to place seven point objects. If you have in

 

your mind the number of point objects that you want, simply add one when specifying the

 

number of segments.

 

You can use the Block option to place a block of your choice along the object instead of a

 

point object. The block must exist in your drawing. (Chapter 18 covers blocks.) If you choose

 

the Block option (right-click and choose Block), the option responds with the Enter name of

 

block to insert: prompt. Type the name of the block. The prompt asks, Align block with

 

object? [Yes/No] <Y>. Answer Y or N, depending on whether you want to align the block

 

with the object.

Note

Aligning a block is appropriate for curved objects and blocks that are not completely

 

symmetrical.

 

The prompt asks for the number of segments that you want, and you type that number, as

 

described earlier. Figure 12-11 shows an electrical schematic. Here you want to divide a line

 

so that you can evenly space wires entering the ignition module. Four wires need to come in

 

so that the line is divided into five segments by an easy-to-see point object.

 

Point objects Divided line

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 12-11: Dividing a line into five segments by using point objects.

Thanks to Robert Mack of the Dexter Company, Fairfield, Iowa, for this drawing.

You can practice using the DIVIDE command after the next section.

Chapter 12 Obtaining Information from Your Drawing

303

Measuring objects

The MEASURE command is similar to the DIVIDE command, except that you specify the distance between point objects instead of the total number of segments. The command starts measuring from the endpoint closest to where you pick the object. MEASURE does not break the object — it simply places point objects along the object. You can then use the Node object snap if you want to draw from those points.

To measure an object, choose Draw Point Measure. Select the object that you want to measure. The command responds with the Specify length of segment or [Block]: prompt. Type the segment length where you want to place the point objects and end the command.

Remember that you can set the point display by choosing Format Point Style. An easy-to-see point style is especially useful for the MEASURE command. Specify the point style before using the command.

As with the DIVIDE command, you can place a block along the object using the Block option, as long as the block exists in your drawing. The option prompts you for the name of the block and lets you choose whether you want to align the block with the object. The prompt asks for the segment length, and you type in the lengths between the points, as described earlier. Figure 12-12 shows a plat drawing with one side of a lot measured into 20-foot segments.

Figure 12-12: Measuring a line into 20-foot segments by using point objects.

Thanks to Bill Maidment of Caltech, Inc. Fairfield, Iowa, for this drawing.

On the

The drawing in the following exercise on using the DIVIDE and MEASURE commands,

CD-ROM

ab12-a.dwg, is in the Drawings folder on the CD-ROM.

304 Part II Drawing in Two Dimensions

STEPS: Using the DIVIDE and MEASURE Commands

1.Open ab12-a.dwg from the CD-ROM if it isn’t already open from the previous exercise.

2.If you didn’t do the previous exercise, use ZOOM Window to zoom in to the parcels labeled D and E, as shown in Figure 12-13.

3.Choose Format Point Style and choose the fourth style in the first row. Choose Set Size Relative to Screen and set the size to 5%. Click OK.

4.Choose Draw Point Divide. At the Select object to divide: prompt, choose 1 in Figure 12-13. At the Enter the number of segments or [Block]: prompt, type 3 . The command places two points along the line, dividing it into three segments. (If you want, draw lines from the points perpendicular to the opposite side of the parcel to divide it into three parcels.)

5.Choose Draw Point Measure. At the Select object to measure: prompt, choose

2 in Figure 12-13. At the Specify length of segment or [Block]: prompt, type 120

(10 feet). The command places two points along the line.

6.Do not save your drawing. Keep it open if you’re continuing to the next exercise.

2

1

Figure 12-13: The site plan zoomed in to parcels D and E.

AutoCAD’s Calculator

To start the calculator, choose Tools QuickCalc or press Ctrl+8 to start the QUICKCALC command. The calculator opens as a palette. Use the palette for stand-alone calculations, as you would use a physical hand-held calculator. To start the calculator within a command, type 'quickcalc or 'qc on the command line. When you start the calculator transparently, it appears as a window, rather than as a palette, as shown in Figure 12-14. Note that if you have the palette version of QuickCalc open when you use QuickCalc transparently, the palette temporarily closes until you finish the calculation. In other words, you can only use one format of QuickCalc at a time.

Chapter 12 Obtaining Information from Your Drawing

305

New

Feature

AutoCAD 2006 and AutoCAD LT 2006 now feature a new graphical calculator. The calculator is available both separately and in the Properties palette. The calculator is a brand-new feature for AutoCAD LT. The CAL command, which is the command-line calculator available in earlier releases of AutoCAD only, still exists in AutoCAD.

Get Coordinates

Clear

Distance Between Two Points

 

 

 

 

 

 

 

 

History

 

Angle of Line Defined by Two Points

Clear

 

 

 

Intersection of Two Lines Defined by Four Points

 

 

 

 

 

 

 

History Area

Input box

Apply button

Figure 12-14: The new graphical calculator looks similar to a hand-held calculator.

306 Part II Drawing in Two Dimensions

Tip

Press the Num Lock key on your keyboard and use your numerical pad to enter numbers into

 

the calculator.

 

The History area stores previous calculations. You can reuse History area data by double-

 

clicking the line that you want. This places the data in the input area. First be sure to clear

 

the input area of current data.

Calculating numbers

Calculating numbers is straightforward and uses the standard rules of precedence. For example, if you type 3*(2+3)/5-1 , the calculator displays the answer, 2, as shown in Figure 12-15. After any calculation, you can either press Enter or click QuickCalc’s = button.

Figure 12-15: You can use the calculator just like a hand-held one. The calculator stores earlier calculations for easy reference in the History area.

Because the 2+3 sum is in parentheses, it is calculated first so that the expression multiplies 3 by 5 (which is 15), divides it by 5 (which is 3), and subtracts 1 (which is 2).

Let’s say you want to draw a horizontal line. You know it has to be the total of two other lines whose length you know. Follow these steps:

1.Start the LINE command.

Specify first point: Pick the start point for the line.

Specify next point or [Undo]: Type ‘quickcalc (The QuickCalc window opens.)

2.Press the Num Lock key.

3.In the Input area of the QuickCalc window, delete the 0.

4.Type 3.953+6.8725 .

5.Click the Apply button at the bottom of the calculator. The QuickCalc window disappears and the sum appears on the command line.

6.Move the cursor to the right so that you can use Direct Distance Entry to draw at a zero-degree angle.

7.Press Enter to draw the line segment.

8.Continue the LINE command or press Enter to end the command.

You can use feet and inches as well. Use the format 6'5" or 6'-5". Don’t put any spaces between the feet and inches. With the calculator, all inches must be marked with a double prime ("), unlike regular AutoCAD command-line usage. Note that your drawing must be using architectural units for this technique to work properly. (For more information on using feet and inches, see the sidebar “Subtracting Feet and Inches in QuickCalc.”)

The QuickCalc toolbar has several buttons that are shortcuts for often-used tasks. These buttons are:

Chapter 12 Obtaining Information from Your Drawing

307

Get Coordinates

Distance Between Two Points

Angle of Line Defined by Two Points

Intersection of Two Lines Defined by Four Points

In each case, you are returned to the drawing area to specify the point or points that you need. For example, to draw a line the same length as another line, follow these steps:

1.Start the line.

2.Start QuickCalc transparently.

3.Click the Distance Between Two Points button on the QuickCalc toolbar.

4.You then return to your drawing where you can specify two points using any method, such as object snaps.

5.Back in QuickCalc, you see the distance in the Input area. Click Apply to paste this number into the command line.

6.Move the cursor in the direction that you want to draw, and press Enter to draw the line.

Using coordinates

You can use coordinates in QuickCalc expressions. Coordinates are enclosed in square brackets. For example, if you want to draw a line that is equal to the length of two other objects in your drawing that you happen to know are 3.953 and 6.8725 units long, and you want the line to be at a 20-degree angle, then you can follow these steps:

1.Start the LINE command.

2.At the Specify first point: prompt, specify your first point.

3.At the Specify next point or [Undo]: prompt, type ' quickcalc.

4.In the calculator input box, type [@(3.953+6.8725)<20] . Note that the calculator converts your expression to absolute coordinates.

5.Click the Apply button at the bottom of the calculator. AutoCAD draws the line segment.

Subtracting Feet and Inches in QuickCalc

Using fractional inches in QuickCalc is much easier than in the older CAL command. If you type the expression 3'2-1/2", AutoCAD converts it to 3’-2-1/2”, adding a hyphen between the feet and inches.

However, if 3'2" is the same as 3'–2", then how do you subtract 2" from 3'?

The solution is to put parentheses around the 3 feet so that AutoCAD doesn’t assume that the next expression is part of the same feet-inches expression, as shown here:

(3’)-2”

The result is 2’-10”. In this expression, AutoCAD subtracts 2" from 36" (3 feet).

308 Part II Drawing in Two Dimensions

Using object snaps

You can use the object snaps as part of a QuickCalc expression, when you use it transparently. When you press Enter after completing the expression, AutoCAD prompts you for the objects for each object snap in the expression, one after another.

For example, you could draw a line to the center of a triangle in this way. Figure 12-16 shows the process of drawing a line to the center of a triangle.

Figure 12:16: In this drawing, you can use QuickCalc to draw a line to the center of the triangle.

To draw a line to the center of the triangle, follow these steps:

1.Start the LINE command.

2.At the Specify first point: prompt, pick any start point.

3.At the Specify next point or [Undo]: prompt, type ' quickcalc .

4.In the QuickCalc input box, type (end+end+end)/3 . The QuickCalc window disappears, and you see a pickbox.

5.Pick the three corners of the triangle in succession. The QuickCalc window reappears with a coordinate in the Input box.

6.Click Apply to draw the line.

You can use QuickCalc as a substitute for the From object snap. For example, at the Specify first point: prompt, you can start QuickCalc transparently and type mid+[3,–2.5] in the Input box. AutoCAD prompts you for the object for which you want the midpoint. Click Apply to start the line (3,–2.5) units from there.

Using the scientific calculator

QuickCalc has its own scientific calculator, which you can use to calculate advanced formulas. Table 12-3 lists these functions.

Chapter 12 Obtaining Information from Your Drawing

309

 

Table 12-3: CAL Mathematical Functions

 

 

Function

What It Does

 

 

sin(angle)

Calculates the sine of the angle

cos(angle)

Calculates the cosine of the angle

tan(angle)

Calculates the tangent of the angle

asin(real)

Calculates the arc sine of the real number

acos(real)

Calculates the arc cosine of the real number

atan(real)

Calculates the arc tangent of the real number

ln(real)

Calculates the natural log of the real number

log(real)

Calculates the base-10 log of the number

exp(real)

Calculates the natural exponent of the real number

exp10(real)

Calculates the base-10 exponent of the real number

abs(real)

Calculates the absolute value of the real number (the number not including

 

its + or – sign); this function is also used to calculate lengths

rnd(real)

Rounds the number to its nearest integer

trunc(real)

Truncates any decimal value leaving only the integer

r2d(angle)

Converts radian angles to degrees

d2r(angle)

Converts degree angles to radians

 

 

Converting units

You can use the Units Conversion section of QuickCalc to convert units of length, area, volume, and angular measurements. For example, you can convert acres to square feet or meters to inches. Follow these steps:

1.If necessary, click the double down arrow to expand the Units Conversion section of QuickCalc.

2.From the Units Type drop-down list, choose the type of units that you want to convert.

3.From the Convert From drop-down list, choose the unit with which you want to start.

4.From the Convert To drop-down list, choose the unit to which you want to convert.

5.In the Value to Convert text box, type the value that you want to convert, and press Enter.

6.To use this value on the command line, click the value that you entered, and then

click the Return Conversion to Calculator Input Area button. Then click the Paste Value to Command Line button on the calculator’s toolbar.

310 Part II Drawing in Two Dimensions

Working with QuickCalc variables

QuickCalc comes with some variables that you can use as part of calculated expressions. These include functions and one constant — the so-called Golden Ratio or Golden Number, Pi. Table 12-4 lists the functions and what they do.

Table 12-4: Special CAL Functions

Function Name

Full Function

What It Does

 

 

 

rad

 

Gets the radius of the selected object.

dee

dist(end,end)

Calculates the distance between two points; you can

 

 

also use the Distance Between Two Points button on

 

 

the QuickCalc toolbar.

ille

ill(end,end,end,end)

Calculates the intersection of two lines based on their

 

 

four endpoints; you can also use the Intersection of Two

 

 

Lines Defined by Four Points button on the QuickCalc

 

 

toolbar.

mee

(end+end)/2

Calculates the midpoint between two endpoints.

nee

nor(end,end)

Calculates a one-unit vector in the XY plane that is

 

 

normal (perpendicular) to two endpoints.

vee

vec(end,end)

Calculates a vector from two endpoints.

vee1

vec1(end,end)

Calculates a one-unit vector from two endpoints.

 

 

 

To use these functions, follow these steps:

1.Start a command.

2.At the prompt where you need the function, type ' quickcalc. The QuickCalc window opens.

3.From the Variables list, double-click the function that you want to place in the Input box of the QuickCalc window.

4.Press Enter. You return to your drawing and see a pickbox cursor.

5.Pick the required points. The QuickCalc window returns, and you see an absolute coordinate in the Input box.

6.Click the Apply button.

7.Continue the command.

Note

A vector is a direction that is expressed as delta X, delta Y, delta Z. For example, using the vee

 

function on a horizontal line that is 4 units long results in a vector direction of 4,0,0.

Remember that you can specify the points for the functions in many ways, most commonly by object snaps.

Chapter 12 Obtaining Information from Your Drawing

311

Using QuickCalc in the Properties palette

QuickCalc is also available in the Properties palette, where you can use it to calculate values that represent properties of objects, such as the X coordinate of the start point of a line. You can even use QuickCalc like the CHANGE command to specify a new start point for a line, using the Get Coordinate button.

To change an object’s property in the Properties palette, follow these steps:

1.Select the object.

2.Display the Properties palette. (Press Ctrl+1 or click the Properties button on the Standard toolbar.)

3.Click any value in a white text box. (Gray boxes are not editable.)

4.Click the QuickCalc icon that appears. QuickCalc opens with the current value in the Input box.

5.Delete the value and enter any mathematical expression. Press Enter or click QuickCalc’s equal sign (=) button.

6.Click Apply to change the object. The new value also appears in the Properties palette.

Tip

For simple calculations, you don’t need to use QuickCalc. When set to 1 (the default), the

 

new CALCINPUT system variable allows you to type expressions into any text box that can

 

take a value, including the Properties palette. Start the expression with the equal sign (=)

 

and press the End key on your keyboard at the end of the expression. For example, you could

 

enter =1/16+1/8 to change the thickness of an object. You can even enter =sqrt(8) to

 

obtain the square root of 8, or enter =2^3 to obtain the cube of 2! Don’t forget to press the

 

End key after you enter the expression.

On the

The drawing used in the following exercise on using the QuickCalc command, ab12-a.dwg,

CD-ROM

is in the Drawings folder on the CD-ROM.

STEPS: Using the QUICKCALC Command

1.Open ab12-a.dwg from the CD-ROM if you don’t have it open from the previous exercise.

2.Save the drawing as ab12-01.dwg in your AutoCAD Bible folder.

3.If you did not do the previous exercise, use ZOOM Window to zoom in on the parcels labeled D and E, as shown in Figure 12-17.

4.In the exercise on calculating area earlier in this chapter, you calculated a total area of 306975.04, in square inches. To calculate this area in square feet, type quickcalc . In the Units Conversion section, choose Area from the Units Type drop-down list. In the

Convert From drop-down list, choose Square Inches. In The Convert To drop-down list, choose Square Feet. In the Value to Convert text box, type 306975.04 . AutoCAD calculates 2131.7711111111.

312 Part II Drawing in Two Dimensions

4 5 2

1

3

Figure 12-17: Parcels D and E in the civil engineering drawing.

5.In the exercise on the DIVIDE command earlier in this chapter, you divided a line into three segments by placing two points on the line. To calculate the length of those

segments, open QuickCalc. From the Variables section, choose the dee function and click the Return Variable to Input Area button. You see the expression dist(end,end) in the Input area. Click at the end of the expression and type /3 . In your drawing, the command line prompts you for the two endpoints. Pick the two ends of the line at in Figure 12-17. QuickCalc calculates 262.37.

6.Close the QuickCalc palette.

7.You may want to draw a line starting from the intersection of two intersecting lines, going from corner to diagonally opposite corner and ending perpendicular to the top

line of the land parcel. To do this, start the LINE command. At the Specify first point: prompt, type 'quickcalc .

8.Click the Intersection of Two Lines Defined by Four Points button. Pick the end-

points in Figure 12-17 at 1 and 2 to define the first line, and then at 3 and 4 to define the second line. Click the Apply button. AutoCAD starts the line at the intersection of the two lines. At the Specify next point or [Undo]: prompt, choose the Perpendicular object snap and pick 5. End the LINE command. Figure 12-18 shows the result.

Соседние файлы в папке Книги_AutoCad_2