Appendix A: Operators and Units
This appendix describes mathematical and conditional operators.
Entry boxes that accept numbers also accept mathematical, trigonometric and exponential operators in the form:
funcName (arg1; arg2; . . . ; argN)
|
Math operators are case-sensitive so be sure to type them in lower case when using them. Use these operators to edit objects, make entries in the Status Line and specify values in dialog boxes.
Conditional expressions are particularly useful with parametrics when an expression depends on a condition. For example, a flange might depend on the diameter of a pipe but should never be smaller than some minimum size. Use two function forms of conditional expressions, ifelse and RNG (range).
ifelse (condition; expression1; expression2)
|
The following examples show boolean expressions and an ifelse statement:
|
The range function is a more general form of conditional expression.
RNG (T; V1; N1; V2; N2; V3; N3 ... Vi; Ni; Vi + 1)
In this function, the first argument (T) is tested against every N value in the other arguments and returns the value (V) that lies between the two N values that bracket T. Each of the test N values must be greater than the preceding N.
For example, the expression
|
Use different units of measure such as inches ("), feet ('), inches and feet (x'y"), millimeters (mm), centimeters (cm) and meters (m). It is possible to mix the units in the mathematical expression as long as the units are labeled properly, for example, 10" + 25.4 cm.
Graphite is well-suited for computer hardware design, such as diagrams of timing devices. For example, draw in nanoseconds (a billionth of a second). Designs which include nanoseconds typically consist of wave forms made of horizontal and vertical lines which mimic the functions of a timing device.
The concept for using nanoseconds is to relate time with distance.
1. Specify millimeters as the unit of measure by choosing Layout>Preferences>Units.
2. Choose Layout>Preferences>Grid.
3. Set the grid spacing to 34 and the number of subdivisions to 2.
A megahertz is approximately 34 nanoseconds and this becomes the base cycle, with two tick marks for drawing half cycles.
4. Turn on the grid.
5. Use the Connected Lines tool to draw the wave form of the desired specifications.
6. Use the Expand/Shrink tool to stretch the wave form to half and full cycles.
Using Parametrics for Wave Forms
Use parametrics to speed up this process, as shown below. The dotted lines are constraint lines.
Tip: It is possible to place the constraint lines on another layer and hide them.
International numeric keypads have a comma in place of the period because Europeans use commas in decimal expressions.
Graphite can handle both American and European decimal entries in the Status Line (24,5 or 24.5), however, the display is controlled by the Numbers Control Panel.
Since keyboards vary from country to country, the Graphite command keys may not respond as described with a non-American keyboard.