Using Intermediate Variables |
Top |
As described in Calculating Output, the application expresses results in terms of:
However, expressions can sometimes be so large and complex as to be difficult to read and understand. To make output expressions clearer and more compact, you can choose to use intermediate variables. An intermediate variable is a variable defined in the same terms — your own variables plus those the system added — for the purpose of simplifying an expression and enhancing its readability. Not every expression needs or can benefit from intermediate variables, but for some expressions, their use allows one straightforward name to replace a significant portion of the expression. You can control how Geometry Expressions handles intermediate variables in three ways:
These three settings interact with each other to let you control the calculations that Geometry Expression performs and how it presents them. Intermediate Variable Complexity is an application setting, available from Edit > Preferences. From the Math tab, this option allows you to set a threshold for intermediate variable complexity in terms of a number from 2 to 100. This number determines the complexity of the term to be replaced with a variable in an expression. A low number tells the application to replace even simple terms with intermediate variables, so you'll see more of these variables. A progressively higher number means that intermediate variables will represent progressively larger and more complex terms in expressions, so you'll see fewer of them. Use Intermediate Variables, a drop down list (in Output section of Math tab of Preferences dialog box and in output Display Properties dialog), determines whether intermediate variables above the complexity threshold are used or not. When set to True, terms more complex than the threshold will be replaced by intermediate variables in expressions. Terms simpler than the threshold are not replaced. When set to False, intermediate variables never appear and the threshold has no effect. Show Intermediate Variables, also a drop down list (in Output section of Math tab of Preferences dialog box and in output Display Properties dialog), determines whether intermediate variable definitions are displayed with results. When set to True, you’ll see the results, including intermediate variables, followed by additional lines displaying the definition of each intermediate variable used. When set to False, you’ll see intermediate variables in expressions according to the other two settings, but not their definitions. Show Intermediate Variables affects only how an expression is displayed; it has no effect on the underlying expression itself. And it’s relevant only when Use Intermediate Variables is set to True. When Use Intermediate Variables is set to False, there are no intermediate variables to display. ![]() ![]() To summarize:
|