AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry...

26
SUPPLEMENTAL MATERIALS Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page AutoCAD and Its Applications BASICS Student CD Student CD Geometry Calculator The geometry calculator is used by entering expressions at the Command: prompt. Fundamental math calculations and drafting applications are presented using the geometry calculator. Complex mathematical calculations are also possible. AutoCAD’s geometry calculator allows you to extract and use existing infor- mation in your drawing. The geometry calculator also allows you to perform basic mathematical calculations at the command line or supply an expression as input to a prompt. The geometry calculator is accessed by entering CAL at the Command: prompt. You are then prompted for an expression. After you type the math- ematical expression and press [Enter] , AutoCAD automatically simplifies, or “solves,” the expression and returns the result. Using the Geometry Calculator The geometry calculator is more powerful than most hand-held calcula- tors because it can directly access drawing information and can supply input to an AutoCAD prompt. The types of expressions that can be entered include numeric expressions and vector expressions. A numeric expression refers to a mathematical process using numbers, such as the expressions solved using normal calculators. A vector expression is an expression involving a point coor- dinate location. To use the geometry calculator, you must understand the sequence and format of an expression. The geometry calculator evaluates expressions according to the standard mathematical rules of precedence. This means that expressions within parentheses are simplified first, starting with the inner- most set and proceeding outward. Mathematical operators are evaluated in the standard order: exponents first, multiplication and division next, addition and subtraction last. Operators of equal precedence are evaluated from left to right.

Transcript of AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry...

Page 1: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Geometry CalculatorThe geometry calculator is used by entering expressions at the Command:

prompt. Fundamental math calculations and drafting applications are presented using the geometry calculator. Complex mathematical calculations are also possible.

AutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing. The geometry calculator also allows you to perform basic mathematical calculations at the command line or supply an expression as input to a prompt.

The geometry calculator is accessed by entering CAL at the Command: prompt. You are then prompted for an expression. After you type the math-ematical expression and press [Enter], AutoCAD automatically simplifies, or “solves,” the expression and returns the result.

Using the Geometry CalculatorThe geometry calculator is more powerful than most hand-held calcula-

tors because it can directly access drawing information and can supply input to an AutoCAD prompt. The types of expressions that can be entered include numeric expressions and vector expressions. A numeric expression refers to a mathematical process using numbers, such as the expressions solved using normal calculators. A vector expression is an expression involving a point coor-dinate location.

To use the geometry calculator, you must understand the sequence and format of an expression. The geometry calculator evaluates expressions according to the standard mathematical rules of precedence. This means that expressions within parentheses are simplified first, starting with the inner-most set and proceeding outward. Mathematical operators are evaluated in the standard order: exponents first, multiplication and division next, addition and subtraction last. Operators of equal precedence are evaluated from left to right.

Page 2: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

When AutoCAD is configured to display a screen menu, the commands appear in a separate screen.

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Making Numeric EntriesThe same methods of entering numbers at AutoCAD prompts are also

acceptable for calculator expressions. When entering feet and inches, either of the accepted formats can be used. This means that 5′-6″ can also be entered as 5′6″ or as 66″.

NOTE An entry at the Expression: prompt must be completed by pressing [Enter]. Pressing the space bar adds a space to your entry; it does not act as a return at this prompt.

Using Basic Math FunctionsThe basic mathematical functions used in numeric expressions with the CAL

command include addition, subtraction, multiplication, division, and exponential notation. Parentheses can be used to group symbols and values into sets. The following examples use the CAL command to solve each type of mathematical functions:

Command: CAL↵>> Expression: 17.375+5.0625↵��.4375

Command: CAL↵>> Expression: 17.375-5.0625↵��.3��5

Command: CAL↵>> Expression: 12*18.25↵��9.0

Command: CAL↵>> Expression: 27’8”/4”↵83.0

Page 3: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page 3

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Command: CAL↵>> Expression: 9^2↵8�.0

Command: CAL↵>> Expression: (17.375+5.0625)+(4.25*3.75)-(18.5/2)↵�9.��5

An integer is a whole number; it has no decimal or fractional part. The geometry calculator has limits when working with integer values. Integers greater than 32,767 or less than –32,768 must be presented as real numbers. When working with values outside this range, type a decimal point and a zero (.0) after the value.

Making Unit ConversionsThe calculator has a function called CVUNIT that lets you convert one type

of unit into another. For example, inches can be converted to millimeters or liters can be converted to gallons. The order of elements in the CVUNIT function is:

CVUNIT(value,from units,to units)

For example, to convert 4.7 kilometers to the equivalent number of feet:

Command: CAL↵>> Expression: CVUNIT(4.7,kilometers,feet)↵�54�9.9

If the units of measure you specify are either incompatible or are not defined in the acad.unt file, the following message is displayed and the prompt reissued.

>> Error: CVUNIT failed to convert units

The CVUNIT function can work with units of distance, angles, volume, mass, time, and frequency. The units available for conversion are specified in the file acad.unt found in the AutoCAD \Support folder. This file can be edited to include additional units of measure if needed.

Page 4: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page 4

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Point EntryWhile the numeric functions of the calculator provide many useful capa-

bilities, the most powerful use of the geometry calculator is its ability to find and use geometric information. Information such as point coordinates can be entered as input to the geometry calculator.

A point coordinate is entered as one, two, or three numbers separated by commas and enclosed in square brackets. The numbers represent the XYZ coor-dinates. For example [4,7,2], [2.1,3.79], or [2,7.4,0]. Any value that is zero can be omitted, as well as commas immediately in front of the right bracket. For example:

[�,�] is the same as [�,�,0][,,6] is the same as [0,0,6][5] is the same as [5,0,0][] is the same as [0,0,0]

Direction can be entered using any accepted AutoCAD format, including polar and relative coordinates, as shown in the following table.

Coordinate entry Entry format

Polar [dist<angle]

Relative [@x, y, z]

These options provide the ability to determine locations, distances, and directions within a drawing. For example, to determine a point coordinate value for a location that is 6 units at an angle within the XY plane of 45° from the point 2,2,0, use the sequence:

Command: CAL↵>> Expression: [2,2,0]+[6<45]↵6.�4�64 6.�4�64 0.0

In an application of this type, the point answer is returned in parentheses with spaces to separate the numbers instead of commas. Calculations can also be performed within the point coordinate specification. For example:

Page 5: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page 5

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

>> Expression: [2+3,2+3,0]+[1,2,0]↵6.0 7.0 0.0

A point location can be specified using the @ symbol. Entering this symbol supplies the current value of the LASTPOINT system variable:

Command: CAL↵>> Expression: @↵point coordinates

The reference to point coordinates in this command sequence represents the point coordinate values returned by AutoCAD. The actual coordinate values will vary based on user input.

Besides entering coordinates at the prompt, you can also specify point coor-dinates by picking with the cursor. The CUR function is used to specify a point picked with the cursor:

Command: CAL↵>> Expression: CUR↵>> Enter a point: (pick a point)point coordinates

This method can also be used as part of a calculation:

>> Expression: CUR+[1,2]↵>> Enter a point: (pick a point)point coordinates

Using the Cal Command TransparentlyThe CAL command can also be used transparently (within another

command). To use the geometry calculator transparently, enter the command as ‘CAL (an apostrophe followed by CAL). When the CAL command is used transparently, the result is supplied as input to the current prompt.

The following example uses direct distance entry combined with the geom-etry calculator to provide the correct length of a line. The line being drawn is 8.0″ times 1.006.

Page 6: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page 6

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Command: L or LINE↵Specify first point: (pick first point)Specify next point or [Undo]: ‘CAL↵ (drag cursor in appropriate direction

to set the angle of the line)>> Expression: 8*1.006↵8.048Specify next point or [Undo]: ↵

The calculator evaluates the expression and automatically supplies the result of 8.048 at the Specify next point or [Undo]: prompt. When AutoCAD receives a single numeric value at a point prompt, it is automatically understood as a direct distance entry value. An application of this type of calculation may include a shrinkage allowance for a casting or forging pattern.

Using the Object Snap ModesObject snap points can also be specified as point coordinates to the geom-

etry calculator. The object snaps provide the accuracy that is often needed when finding points on an object. The following example shows the Endpoint object snap used to identify a specific point on an object. Note that you must use the letter abbreviation. Typing the full snap name will result in an error.

Command: CAL↵>> Expression: END↵>> Select entity for END snap: (pick an object)point coordinates

The next example uses the Endpoint object snap to find the end of a line and add the point coordinate of 2 at 45°.

Command: CAL↵>> Expression: END+[2<45]↵>> Select entity for END snap: (pick an object)point coordinates

You can use the geometry calculator to provide information based on selected points. For example, the following sequence can be used to find the point midway between two points selected with the cursor.

Page 7: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page 7

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Command: CAL↵>> Expression: (CUR+CUR)/2↵>> Enter a point: (pick a point)>> Enter a point: (pick a point)point coordinates

This same technique can be used with any desired object snap mode. For example, to divide the distance between the center of a circle and the endpoint of a line by two:

Command: CAL↵>> Expression: (CEN+END)/2↵>> Select entity for CEN snap: (pick the circle)>> Select entity for END snap: (pick the line)point coordinates

The previous sequence can be used within the LINE command to draw a line that starts halfway between the center of an existing circle and the endpoint of an existing line, as shown in Figure GC-1.

Command: L or LINE↵Specify first point: ‘CAL↵>> Expression: (CEN+END)/2↵>> Select entity for CEN snap: (pick the circle)>> Select entity for END snap: (pick the line)point coordinatesSpecify next point or [Undo]:

The following sequence is used to create a circle with its center located two units along the X axis from the midpoint of an existing line, as shown in Figure GC-2.

Command: C or CIRCLE↵Specify center point for circle or [3P/�P/Ttr (tan tan radius)]: ‘CAL↵>> Expression: MID+[2,0]↵>> Select entity for MID snap: (pick the line object)point coordinatesSpecify radius of circle or [Diameter] <current>:

Page 8: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page 8

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

New line

Point midway betweenthe center of the circle and

the endpoint of the line

Figure GC-1. Finding a point halfway between the center of a circle and the endpoint of a line.

New circle

Midpoint ofexisting line

MID+[2,0]

Figure GC-2. Locating the center of a circle two units to the right of the midpoint of a line.

Page 9: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page 9

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

The next sequence determines the centroid (center of mass) of a triangle defined by picking three endpoints, as shown in Figure GC-3.

Command: CAL↵>> Expression: (END+END+END)/3↵>> Select entity for END snap: (pick first corner of the triangle)>> Select entity for END snap: (pick second corner of the triangle)>> Select entity for END snap: (pick third corner of the triangle)point coordinates

PROFESSIONALT IP The snaps entered within a CAL command expres-

sion are not the same as those used with OSNAP. If OSNAP is on when using object snaps within the CAL command, you may get incorrect results. Turn OSNAP off before using an object snap in an expression within the CAL command. You can, however, use OSNAP to precisely locate points with the CUR function of the CAL command.

Pick first corner

Pick second corner

Centroid of triangle(END+END+END)/3

Pick third corner

Figure GC-3. Locating the center of mass of a triangle.

Page 10: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �0

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Calculating DistancesThere are three basic calculator functions used to calculate distances in a

drawing. These are the DIST, DPL, and DPP functions.The DIST function performs a simple distance calculation between the two

specified points. It is entered as DIST(P1,P2) where P1 = Point 1 and P2 = Point 2. Similar to all calculator functions, the points can be entered manually or picked. The DIST function is used in the following sequence to find a distance between two endpoints of a line:

Command: CAL↵>> Expression: DIST(END,END)↵>> Select entity for END snap: (pick an object)>> Select entity for END snap: (pick an object)distance

The DPL function calculates the perpendicular distance between a point (P) and a line passing through two other points (P1 and P2). It is written as DPL(P,P1,P2). See Figure GC-4. The following is an example using DPL with the endpoint object snap. The order of selection is P, P1, and then P2:

Command: CAL↵>> Expression: DPL(END,END,END)↵>> Select entity for END snap: (pick an object)>> Select entity for END snap: (pick an object)>> Select entity for END snap: (pick an object)distance

Page 11: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page ��

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

DPP function is much like the DPL function except it finds the shortest distance between a point (P) and a plane defined by three other points (P1, P2, and P3). See Figure GC-5. The DPP function is written as DPP(P,P1,P2,P3). The points for DPP can be entered manually or picked. The following example calculates the distance between the point 2,2,6 and three random points on the XY plane:

Command: CAL↵>> Expression: DPP([2,2,6],CUR,CUR,CUR)↵>> Enter a point: (pick a point)>> Enter a point: (pick a point)>> Enter a point: (pick a point)6.0

If point P is on the same plane as the three points picked to define the plane, the returned value is 0. Notice in the command sequence that point P is defined with the coordinates 2,2,6, which means it is located six units above the XY plane.

Third pointselection

Second pointselection

First pointselection

P2

P1

P

DPL reportsthis distance

Figure GC-4. Finding the shortest distance between a point and a line.

Page 12: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page ��

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Finding Intersection PointsThe ILL function locates an intersection point between two nonparallel

lines. This function is written as ILL(P1,P2,P3,P4). The point location where the line containing P1 and P2 intersects the line containing P3 and P4 is identified. An actual line between P1 and P2 (or P3 and P4) is not necessary. This function finds a hypothetical intersection as though the lines are infinite in length. The following sequence shows the use of the ILL function to find the intersection of the lines shown in Figure GC-6:

Command: CAL↵>> Expression: ILL([2,5,0],[4,6,0],[4,5,0],[2,6,0])↵3.0,5.5,0.0

If the two lines, or hypothetical extensions of the two lines, do not intersect, the following message is displayed and the >>Expression: prompt is returned:

>> Error: The two lines in function ILL do not intersect or are collinear.

DPP reportsthis distance

Plane formed byP1, P2, and P3

P1

P2

P3

P

Figure GC-5. Finding the shortest distance between a point and a plane.

Page 13: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �3

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Finding a Point on a LineThe PLD function finds a point that is a specified distance from the start

point of a line passing through two points (P1 and P2) and on the line. It is written as PLD(P1,P2,Dist). It is not necessary for an actual line to exist. The following sequence finds a point along a line passing through 0,0 and 3,1 that is 10 units from the start point, as shown in Figure GC-7.

Command: CAL↵>> Expression: PLD([],[3,1],10)↵9.48683,3.�6��8 0.0

The PLT function provides another means of finding a point along a line. It finds a point that is along a line passing through two points (P1 and P2) and located from the start point based on a specified scale (T parameter). The T parameter is simply a scale factor relative to the distance between P1 and P2. The function is written as PLT(P1,P2,T). The following sequence locates a point that is three-quarters of the way along the length of the specified line:

Command: CAL↵>> Expression: PLT([],[2,2],.75)↵�.5,�.5,0.0

Intersectionidentified by ILL

(3.0,5.5,0.0)(2,6,0)

P4

P1(2,5,0)

P3(4,5,0)

(4,6,0)P2

Figure GC-6. Finding the point of intersection of two nonparallel lines.

Page 14: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �4

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

If T=0, then the point location is the same as P1. If T=1, then the point loca-tion is the same as P2. A T value of .5 identifies the midpoint between P1 and P2. A T value of 2 locates a point along the line that is a distance from the start point equal to twice the length of the line. Figure GC-8 shows several examples.

10

P2

Startpoint

P1

(9.48,3.16)

(3,1)

(0,0)

Figure GC-7. Finding a point along a line that is a specified distance from the start point.

P1

T=2.0

T=1.5

T=1.0

T=.5 P2

Figure GC-8. Finding a point along a line based on the scale of the line length.

Page 15: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �5

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Finding an AngleThe ANG function finds the angle between two lines. As with other calcu-

lator functions, the lines need not physically exist in the drawing. This function can be entered several different ways, depending on the nature of the angle you are trying to calculate.

To find the angle of a vector from the X axis in the XY plane, enter ANG(coordinates). The coordinate values are entered within parentheses. The coordinates can be manually entered or a point can be selected using object snap options. The following sequence shows this method being used to enter the coordinates of a point along the line shown in Figure GC-9A.

Command: CAL↵>> Expression: ANG([1,1,0])↵45.0

If the vector is not known, two points along a line can be used to determine the angle of the line in the XY plane from the X axis. The function is ANG(P1,P2), as shown in Figure GC-9B and in the following sequence:

Command: CAL↵>> Expression: ANG([2,2],[4,4])↵45.0

You can also calculate an included angle by specifying a vertex and a point on each side, or leg, of the angle. A vertex is the intersection of two lines. An included angle is the angle formed between the vertex and the sides of the angle. The formula is entered as ANG(vertex,P1,P2), Figure GC-9C. The following example determines the angle between two lines. The Endpoint object snap is used to precisely pick points.

Command: CAL↵>> Expression: ANG(END,END,END)↵>> Select entity for END snap: (pick vertex)>> Select entity for END snap: (pick end of first line)>> Select entity for END snap: (pick end of second line)angle

Page 16: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �6

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Finding a RadiusYou can use the RAD function to find the radius of an arc, circle, or 2D poly-

line arc. The command sequence is:

Command: CAL↵>> Expression: RAD↵>> Select circle, arc or polyline segment for RAD function: (select a circle)radius

You can easily draw objects to match the radius of an existing object using the RAD function. The following example uses RAD to supply the radius value for a circle to match that of the existing circle, as shown in Figure GC-10.

ANG reportsangle of line

from 0,0 to point

P1=(1,1)

0,0

ANG(P1)

P2=(4,4)

P1=(2,2) ANG(P1,P2)

ANG reportsangle fromhorizontal

Angle

Vertex

P2

P1ANG(vertex, P1,P2)

A B C

Figure GC-9. Finding angles with the ANG function. A—Entering a single coordinate returns the angle from horizontal of a line containing 0,0 and the specified point. B—Entering two coordinates returns the angle from horizontal of a line containing the points. C—Entering three coordi-nates finds the angle between the two lines formed by the three points.

Page 17: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �7

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Command: C or CIRCLE↵Specify center point for circle or [3P/�P/Ttr (tan tan radius)]: (pick the

center point of the new circle)Specify radius of circle or [Diameter] <current>: ‘CAL↵>> Expression: RAD↵>> Select circle, arc or polyline segment for RAD function: (select the

existing circle)radius of existing circleCommand:

Combining Calculator FunctionsCalculator functions can be combined. For example, suppose you want to

draw a new circle that is 25% the size of the original circle and placed in a new position that also needs to be calculated. Look at Figure GC-11 as you use the following command sequence:

Command: C or CIRCLE↵Specify center point for circle or [3P/�P/Ttr (tan tan radius)]: ‘CAL↵>> Expression: (MID+MID)/2↵>> Select entity for MID snap: (pick Line 1)>> Select entity for MID snap: (pick Line 2)point coordinates

Original circle New circle

Select circlefor RAD function

Pick centerpoint

Figure GC-10. Using the RAD function to create a circle equal in diameter to an existing circle.

Page 18: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �8

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

This locates the center point of the new circle halfway between the midpoints of Line 1 and Line 2. Now, instruct AutoCAD to calculate a new radius that is 25% of the size of the original circle:

Specify radius of circle or [Diameter] <current>: ‘CAL↵>> Expression: .25*RAD↵>> Select circle, arc, or polyline segment for RAD function: (pick one of

the original circles)Command:

A new circle that is 25% of the size of the original circle is drawn at the calcu-lated location.

New circleLine 1

Line 2 Original circleOriginal circle

Figure GC-11. Combining calculator functions to revise a circle and place it in a new position.

Page 19: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �9

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Another application of the CAL command is shown in Figure GC-12 where a new circle is placed 3″ along a centerline from an existing circle. The new circle is 1.5 times larger than the original circle. The command sequence is:

Command: C or CIRCLE↵Specify center point for circle or [3P/�P/Ttr (tan tan radius)]: ‘CAL↵>> Expression: PLD(CEN,END,3)↵>> Select entity for CEN snap: (pick the original circle)>> Select entity for END snap: (pick near the right end of the centerline)point coordinatesSpecify radius of circle or [Diameter] <current>: ‘CAL↵>> Expression: 1.5*RAD↵>> Select circle, arc, or polyline segment for RAD function: (pick the

original circle)

Original circle New circle

Figure GC-12. Copying a circle along a centerline and resizing it.

Page 20: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �0

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Geometry Calculator Shortcut FunctionsTo make using the geometry calculator as efficient as possible, some of the

most commonly used calculator tasks have shortcuts. The basic abbreviations are shown in the following table.

Function Replaces Description

DEE DIST(END,END)Distance between two selected endpoints

ILLE ILL(END,END,END,END)Intersection of two lines defined by four selected endpoints

MEE (END+END)/2Point midway between two selected endpoints

These functions work exactly the same way as the longer format that you have already learned. Look at each of the shortcut options as you review earlier discussions covering the actual functions used by the shortcuts. For example, you can use the DEE shortcut to determine the length of a line:

Command: CAL↵>> Expression: DEE↵>> Select one endpoint for DEE: (pick one end of the line)>> Select another endpoint for DEE: (pick the other end)distance

The command sequence to draw a circle at the center of a rectangle using the MEE function, as shown in Figure GC-13, is:

Command: C or CIRCLE↵Specify center point for circle or [3P/�P/Ttr (tan tan radius)]: ‘CAL↵>> Expression: MEE↵>> Select one endpoint for MEE: (pick one corner of the rectangle)>> Select another endpoint for MEE: (pick the opposite corner of the rectangle)coordinatesSpecify radius of circle or [Diameter] <current>: (type a radius and press

[Enter] or pick a radius)

Page 21: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page ��

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Using Advanced Math FunctionsA number of advanced mathematical functions are also supported by the

geometry calculator. These include logarithmic and exponential functions, as well as some data modification and conversion functions. For example, you can calculate the square root of 25:

Command: CAL↵>> Expression: SQRT(25)↵5.0

The following table shows each of the advanced math operators supported by the geometry calculator:

Second endpoint for MEE

First endpoint for MEE Center of circle atdiagonal midpoint

Figure GC-13. Centering a circle within a rectangle using the CAL command.

Page 22: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page ��

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Function Description

LN(x) Returns the natural log of a number.

LOG(x) Returns the base-10 log of a number.

EXP(x)Returns the natural exponent (or antilog) of a number.

EXP10(x) Returns the base-10 exponent of a number.

SQR(x) Returns a number squared.

SQRT(x) Returns the square root of a number.

ABS(x) Returns the absolute value (magnitude) of a number.

ROUND(x) Rounds a number to the nearest integer value.

TRUNC(x)Removes the decimal value of a number, returning the integer value.

Using Trigonometric FunctionsWhen creating drawings, you often need to work with distances and angles.

The geometry calculator supports several trigonometric functions for the calcu-lations of distances and angles in a drawing. Figure GC-14 shows the basic trigonometric operators and formulas.

The geometry calculator assumes the input for angular values is in degrees unless otherwise specified. This is regardless of the current angular units setting in AutoCAD. To enter angular data as degrees (d), minutes (′) and seconds (″), use the format 30d45′�5″. If the minute or second value is zero, it can be omitted from the entry. For example, 42d0′30″ can be written as 4�d30″. However, the degree value must be given, even if it is zero.

To enter a value in radians, use an r as a suffix for the number, such as �.�r. A suffix of g indicates that the value is in grads, such as 50.00g. The geometry calculator output is always decimal degrees, regardless of the angular units style used for the input, except for the D2R(angle) function. The available trigo-nometric operators are shown in the following table.

Page 23: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �3

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Function Description

SIN(angle) Returns the sine of the angle.

COS(angle) Returns the cosine of the angle.

TANG(angle) Returns the tangent of the angle.

ASIN(angle) Returns the arcsine of the angle.

ACOS(angle) Returns the arccosine of the angle.

ATAN(angle) Returns the arctangent of the angle.

D2R(angle) Converts from degrees to radians.

R2D(angle)Converts from radians to degrees. (Note: Do not use r suffix for this function.)

PI The constant pi (π, 3.14159…)

length of opposite sidelength of hypotenuse

sine =

cosine =

tangent =

B

CA

length of adjacent sidelength of hypotenuse

length of opposite sidelength of adjacent side

hypo

tenu

se

sin A = a

ac

b

c

cos A = bc

tan A = ab

Figure GC-14. The elements of a right triangle and related trigonometric functions.

Page 24: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �4

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

To provide an example of using trigonometric functions in the geometry calculator, the following sequence solves for angle A in Figure GC-14. The length of side a is 4.182 and side c is 5.136. Since the length of side a divided by the length of side c is equal to the sine of angle A, the arcsine of a ÷ c is equal to angle A:

Command: CAL↵>> Expression: ASIN(4.182/5.136)↵54.5�35

The returned value of 54.5135 indicates that angle A is 54.5135°. Using the infor-mation in Figure GC-14 and the geometry calculator, you can quickly solve for missing information needed to complete a drawing.

The constant pi (π) is presented in the trigonometry functions table. This constant is also used in circular formulas, such as πR2 (area) or 2πR (circumference).

Setting and Using Variables with the Geometry Calculator

The geometry calculator has the ability to save values by assigning them to a user-defined variable. A variable is a text item that represents a value stored for later use. Calculator variables can store only numeric, point, or vector data. The following example sets a variable named X to a value of 1.2.

Command: CAL↵>> Expression: X=1.25↵�.�5

The variable can be entered at a prompt by using the transparent CAL command:

Command: C or CIRCLE↵Specify center point for circle or [3P/�P/Ttr (tan tan radius)]: (pick a

center point)Specify radius of circle or [Diameter] <current>: ‘CAL↵>> Expression: X�.�5

Page 25: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �5

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

This extracts the value of the variable X (1.25) and uses this as the radius of the circle. The following example sets a variable named P1 to the coordinates of a user-selected endpoint, then uses P1 in the LINE command:

Command: CAL↵>> Expression: P1=END↵>> Select entity for END snap: (pick an object)point coordinatesCommand: L or LINE↵Specify first point: ‘CAL↵>> Expression: P1↵coordinates of P1Specify next point or [Undo]: ↵

PROFESSIONALT IP The variables used by the geometry calculator are

actually AutoLISP variables. AutoLISP is an easy-to-learn programming language for AutoCAD. An intro-duction to AutoLISP is given in AutoCAD and its Applications—Advanced.

Using AutoCAD System Variables in the Geometry Calculator

In AutoCAD, many values are given a special name and stored for access whenever needed. These are called system variables, and their values depend on the current drawing or environment. The geometry calculator has a special-ized function named GETVAR that allows you to use values stored in AutoCAD system variables. To retrieve a system variable, type GETVAR(variable name) at the Expression: prompt. The following example shows the drawing area being increased by multiplying the upper-right limits by 4:

Page 26: AutoCAD - Faculty Webfaculty.ivytech.edu/~bl-desn/dsn113/resources/geo calc.pdfAutoCAD’s geometry calculator allows you to extract and use existing infor-mation in your drawing.

SUPPLEMENTALMATERIALS

Copyright by Goodheart-Willcox Co., Inc. Geometry Calculator, page �6

AutoCADand Its Applications

B A S I C SStudent CDStudent CD

Command: LIMITS↵Reset Model space limits:Specify lower left corner or [ON/OFF] <0.0000,0.0000>: ↵Specify upper right corner <��.0000,9.0000>: ‘CAL↵ (notice the current

maximum limits are 12,9)>> Expression: 4*GETVAR(LIMMAX)↵48.0 36.0 0.0Command:

If you use the LIMITS command again, you will see the upper-right value has increased to 48,36.

A complete listing of system variables is available by typing SETVAR at the Command: prompt, followed by typing ?. This gives you the Enter variable(s) to list <*>: prompt. The default * lists all of the variables:

Command: SETVAR↵Enter variable name or [?]: ?↵Enter variable(s) to list <*>: ↵

This opens the AutoCAD Text Window, where all the system variables and their settings are listed. Continue pressing [Enter] to see the complete list. Press the [F�] key to return to the graphics window.