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...")
 
m (→‎Formula Wizard: link to functions entry)
 
(3 intermediate revisions by 3 users not shown)
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 Seamly2D. A formula may contain the following:
* constants (integers or decimal numbers)
* constants (integers or decimal numbers)
* variables (any of the ones listed in the Tables of variables)
* variables (any of the ones listed in the Tables of variables)
Line 11: Line 13:
** / for division
** / for division
** ^ for raising a number to an integer power (e.g. 3^2 = 9)
** ^ for raising a number to an integer power (e.g. 3^2 = 9)
* algebraic or trigonometric functions
* algebraic or trigonometric [[functions]]
** sin
** sin
** cos
** cos
** min
**[[Min (function)|min]]
** max
**[[Max (function)|max]]
** avg
** avg
** fmod
** 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.
Many of the tools in Seamly2D 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]]

Latest revision as of 19:09, 13 May 2020

Formula Wizard[edit | edit source]

Different choices to use in formulas

You may use formulas to set segment's lengths and angles in Seamly2D. 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

Many of the tools in Seamly2D 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[edit | edit source]

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.