Please enable JavaScript to view this site.

Navigation: 2. 3D Modelling > Curves > Curve by law > Setting the function for coordinates of a curve point

Entering the expression and setting the function parameter

Scroll

A function expression may contain an intervalParameter and non-interval parameters. For example, a coordinate is defined by the expression: x = a · (1 - t) + b · t. The t parameter is an interval parameter while a and b are non-interval parameters.

If the function expression contains no interval parameter, then the value of the function will be the result of calculating this expression, that is, a constant. In order for plotting the curve to be possible, the function of at least one coordinate should contain an interval parameter, that is, it should not be constant.

An expression may contain an arbitrary number of spaces. They are not considered when interpreting the expression.

You can enter the function expression as follows:

Manual entry of the expression;

Inserting a variable of a model into an expression;

Insert expression elements from a collection.

If an expression contains Cyrillic letters, or an invalid combination of the operator symbols, or symbols which are not designating any operations/functions, a "Syntax Error" message will be displayed.

After the expression is entered on the Parameter Panel, the Values of parameters table appears, into which non-interval parameters are written. The table contains three columns. The names of the expression parameters are displayed in the first column; the second column contains the calculation expressions, and the third column contains the values. You can interact with the table in the same way as with the Variables panel.

Manual Input

You can enter the function expression in the Expression field using your keyboard.

When entering expressions, you can use existing custom variables of the model, including Functional. In this case, the name of the parameter should match the name of the variable. The data about the variable (name and expression for custom variables; name, expression and argument for functional variables) are sent to the table Values of parameters from the Variable Panel. You cannot change these data in the table.

If the name of a parameter does not match any of the existing names of variables, this parameter is entered into the table Values of parameters with a default value. To enter the value of the parameter, double-click the parameter cell in the Expression column to make it active, then enter the value.

After the curve is created, the variable with the name of the defined parameter appears in the list of variables of the model.

If a function expression uses a functional variable, it is recommended to create this variable using the Variables toolbar prior to creating the curve by law.

After the curve is created, you can edit the variables used for this curve: you can enter new values or expressions in the Variables toolbar. After the model is rebuilt, the shape of the curve changes.

You can use arithmetic operators, constants, functions, and formulas in an expression (see tables in the Guide on formulas and tables Arithmetic operators, Logical operators, Functions and Constants Add-Ons Operators, functions and constants). You can copy operators, functions and formulas to the Expression field using the system clipboard.

Inserting a variable of a model

You can insert an existing variable in a function expression. You can select the variable from the available variables of the model. To do so, click the Insert Variable Name button on the right side of the Expression field. The Variables dialog box will appear on the screen. This dialog box contains the complete list of the model variables. To specify a variable, please select any cell in the row of this variable, then click OK in the dialog box.

The variable name is added to the function expression in the Expression field, and its data is displayed in the Values of parameters table on the Parameter Panel.

Insert expression elements from a collection

You can insert expression elements (system functions, curve function expressions, etc.) from a collection into the function expression.

To do so, press the Insert Function from Collection button on the right side of the Expression field.

A dialog will appear on the screen where you can insert an expression. Select the required expression element or compose an expression from several elements and click the Paste button in the dialog. For more details on working in the dialog...

You can edit the inserted expression.

© ASCON-Design systems, LLC (Russia), 2024. All rights reserved.