UserManual:Formula creation: Difference between revisions

From Seamly
Content added Content deleted
(Created page with "__TOC__ ==Formula Wizard== You may use formulas to set segment's lengths and angles in Valentina. A formula may contain the following: * constants (integers or decimal number...")
 
No edit summary
Line 2: Line 2:


==Formula Wizard==
==Formula Wizard==
[[File:Gt00013.jpeg|Different choices to use in formulas]]

You may use formulas to set segment's lengths and angles in Valentina. A formula may contain the following:
You may use formulas to set segment's lengths and angles in Valentina. A formula may contain the following:
* constants (integers or decimal numbers)
* constants (integers or decimal numbers)
Line 20: Line 22:


Many of the tools in Valentina accept formulas as input. To simplify the creation of formulas, these tools use a special dialogue (The Formula Wizard) that lists all the variables you can use.
Many of the tools in Valentina accept formulas as input. To simplify the creation of formulas, these tools use a special dialogue (The Formula Wizard) that lists all the variables you can use.

[[File:Input data.png]]


Select the desired variable type (e.g. measurements) and double-click on the variable name to include it in a formula field.
Select the desired variable type (e.g. measurements) and double-click on the variable name to include it in a formula field.


[[File:List of measurements.png]]
Dialog that have more that one formula field don't allow use double-click on the variable name. You should select the variable name and click on button Put variable here near to the right formula field. You may also type the variable name in the formula, but selecting variables from the list provided is recommended for speed and accuracy.

Dialog that have more that one formula field don't allow use double-click on the variable name. You should select the variable name and click on button [[File:PutHereLeft.png|caption]] near to the right formula field. You may also type the variable name in the formula, but selecting variables from the list provided is recommended for speed and accuracy.


The formula dialogue validates the formula and displays the result shortly after the formula is modified. The dialogue considers the formula valid if the field is not empty and the value can be calculated. If the field represents a length, not an angle, then the value cannot be zero. If the formula is invalid, the dialogue displays an error message. You can find more detailed error message if call tooltip for label with word "Error".
The formula dialogue validates the formula and displays the result shortly after the formula is modified. The dialogue considers the formula valid if the field is not empty and the value can be calculated. If the field represents a length, not an angle, then the value cannot be zero. If the formula is invalid, the dialogue displays an error message. You can find more detailed error message if call tooltip for label with word "Error".
Line 30: Line 36:


You may specify an angle as a constant number or as a formula. Angles are specified in degrees, where 0 degrees points East and angle values increase in a counter-clockwise direction.
You may specify an angle as a constant number or as a formula. Angles are specified in degrees, where 0 degrees points East and angle values increase in a counter-clockwise direction.

[[File:Setting angles.png]]

Revision as of 06:26, 31 March 2017

Formula Wizard

Different choices to use in formulas

You may use formulas to set segment's lengths and angles in Valentina. A formula may contain the following:

  • constants (integers or decimal numbers)
  • variables (any of the ones listed in the Tables of variables)
  • operators
    • + for addition
    • - for subtraction
    • * for multiplication
    • / for division
    • ^ for raising a number to an integer power (e.g. 3^2 = 9)
  • algebraic or trigonometric functions
    • sin
    • cos
    • min
    • max
    • avg
    • fmod

Many of the tools in Valentina accept formulas as input. To simplify the creation of formulas, these tools use a special dialogue (The Formula Wizard) that lists all the variables you can use.

Select the desired variable type (e.g. measurements) and double-click on the variable name to include it in a formula field.

Dialog that have more that one formula field don't allow use double-click on the variable name. You should select the variable name and click on button caption near to the right formula field. You may also type the variable name in the formula, but selecting variables from the list provided is recommended for speed and accuracy.

The formula dialogue validates the formula and displays the result shortly after the formula is modified. The dialogue considers the formula valid if the field is not empty and the value can be calculated. If the field represents a length, not an angle, then the value cannot be zero. If the formula is invalid, the dialogue displays an error message. You can find more detailed error message if call tooltip for label with word "Error".

Specifying Angles

You may specify an angle as a constant number or as a formula. Angles are specified in degrees, where 0 degrees points East and angle values increase in a counter-clockwise direction.