CAL — Calculator
Evaluates a mathematical expression.
- Command:
CAL· Global name:_CAL - Ribbon: Home › Utilities
Evaluates a mathematical expression typed on the command line and shows the result. It does not change the drawing.
Use
- Type CAL or click its button.
- Type the expression and press Enter.
Expression to evaluate:
- The result appears on the command line with the drawing format (UNITS).
Expressions
- Operators:
+,-,*,/,^(power) and the sign; use parentheses to group. - Constants:
piande. - Functions:
sin,cos,tang,asin,acos,atan,sqrt,sqr(square),abs,ln,log(base 10),exp,round,trunc,r2dandd2r.
Points and vectors
- Points and vectors are written
[x,y]or[x,y,z]. They add and subtract;number*pointscales them;a*bis the dot product anda&bthe cross product. - Geometric functions:
dist(p1,p2),ang(p1,p2)(degrees in the XY plane; alsoang(vertex,p1,p2)),vec(p1,p2),vec1(p1,p2)(unit),mee(p1,p2)(midpoint),ill(p1,p2,p3,p4)(intersection of two lines),pld(p1,p2,d)(point at distance d from p1 towards p2),plt(p1,p2,t)(parametric point),rot(p,origin,angle),xof,yof,zofandmag;cvunit(value,from,to)converts units (mm, cm, m, km, in, ft, yd, mi, deg, rad, grad, g, kg, lb, oz, c, f, k). - Drawing points:
cur(any point) and the snapsend,mid,int,ins,nea,nod,qua,cen,perandtanask for a point with the mouse;radasks for an arc or circle and gives its radius. Example:dist(cur,cur)or(end+end)/2. - The snap functions do not force the mode: the point comes out with the active snaps of the status bar (OSNAP). Coordinates are flat (Z = 0).
Notes
- Trigonometric angles are in degrees, like the AutoCAD calculator;
atanreturns degrees. - Examples:
2+3*4,sqrt(2)*10,sin(30),(1+2)^3.