Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

AnchorRace63557PRace63557PHotkey: * F2 (Ctrl+F2 to close) Image Removed

 
Enables you to make numerical calculations within TurboCAD, and to define variables.

Image Removed Image Added
You can also use this palette to assign constraints to dimensions. See Constraining Dimensions.

...

Mathematical Calculations

To perform a calculation, enter the values in the top field of the palette, using parentheses as needed to create inner expressions. No spaces are allowed. The four mathematical operators should be entered as +, -, * (multiply), and / (divide). Image Removed

Image Added
To  To calculate the result, press Enter.

Image Removed Image Added
You can also use these commonly-used values in place of numbers:

pi =3.1415926
e =2.71828

The function (F) button enables you to perform a function on the value in the parentheses. For example, select sin(error) to get the sine of an angle. Image Removed

Image Added

sin sin(error) appears in the calculator field (you also could have entered this expression yourself manually).

Image Removed Image Added
Sine  Sine is calculated for radians, so if you have a value in degrees it must be converted. Look in the functions menu under Units Conversion and select rad(a), which converts degrees to radians. Image Removed

Image Added
Arrange the expression so that the parentheses are in the correct places, and include the angle in degrees (45 in this case): Image Removed

 Image Added 
Press Enter to obtain the result.

Image Removed Image Added 
Some functions require two values, such as exponentials. pow(x, y) raises x to the y power. Image Removed

Image Added 
Include the values and press Enter to get the result.
Image Removed

...

 Image Added

Defining and Using Variables

In addition to calculating numerical equations, you can use the Calculator Palette to define variables. Subsequent values and variables can then be based on variables you've already created.
In the calculator field, enter the variable definition in the format "variable name=value" (in this example, Length=5). The value can be a number, function, or another variable. Variables are case sensitive and cannot have spaces.  Image Removed

Image Added

Press Enter, and the variable, value, and formula are listed in the list below.  Image Removed

Image Added

You can also enter a variable and variable or formula directly in the fields of the list.
The next variable can be based on an existing variable. In the calculator field, enter an equation that uses a variable name, such as "Width=Length/2." Image Removed

Image Added
Press  Press Enter, and the new variable appears, with its calculated value.
Image Removed

...

AnchorRace84811PRace84811P Image Added

 

Using Expressions in Data Field

Numbers or variables from the Calculator Palette can be used as values in the Inspector Bar or Coordinate fields.
As an example, define Length and Width variables, and draw a rectangle (see Rectangle). Select the first corner point, but not the second point.  Image Removed

Image Added
Press  Press Tab to access the first field in the Inspector Bar. The value is highlighted. 

Image Removed Image Added
Press  Press F2 to access the Calculator Palette. In the calculator field, type Length and press Enter.  Image Removed

Image Added

...

NoteNote: You could also enter a mathematical expression based on numbers, or an expression that includes one or more variables.

...

Back in the Inspector Bar, the first field contains the new value.  Image Removed

Image Added

For subsequent fields of the Inspector Bar or Coordinate Fields, do not press Tab to scroll. Instead, place the cursor in the desired field, then press F2 to access the Calculator Palette.