visual3d:documentation:pipeline:expressions:expressions_overview
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:expressions:expressions_overview [2024/07/31 20:16] – Cleaned up formatting. wikisysop | visual3d:documentation:pipeline:expressions:expressions_overview [2025/01/22 14:06] (current) – [Intersection Functions] wikisysop | ||
---|---|---|---|
Line 3: | Line 3: | ||
Many (but not all) edit boxes and pipeline command parameters allow the use of expressions instead of numerical values. Visual3D uses a common expression parser, so the following syntax is common across all command parameters that allow expressions. | Many (but not all) edit boxes and pipeline command parameters allow the use of expressions instead of numerical values. Visual3D uses a common expression parser, so the following syntax is common across all command parameters that allow expressions. | ||
- | ==== Evaluate_Expression Command ==== | + | ===== Evaluate_Expression Command |
The Evaluate_Expression command allows the users to include expressions for defining the processing of the signals. | The Evaluate_Expression command allows the users to include expressions for defining the processing of the signals. | ||
Line 16: | Line 16: | ||
/ | / | ||
!/ | !/ | ||
- | **;** | + | ; |
</ | </ | ||
- | ==== Expression | + | ===== Expression |
- | Expressions are incredibly flexible and capable of ingesting most data types in Visual3D | + | Expressions are incredibly flexible and capable of ingesting most data types in Visual3D. The key to using expressions is to understand the syntax used for each data type: |
- | -[[Visual3D:Documentation:Pipeline:Expressions:Expression_Items#Data_Tree|Data Tree Signals]] | + | -[[visual3d:documentation:pipeline:expressions:expression_syntax#data_tree_syntax|Data Tree Signals]] |
- | -[[Visual3D:Documentation:Pipeline:Expressions:Expression_Items#Model_Builder|Expressions_in_Model_Builder_Mode]] | + | -[[visual3d:documentation:pipeline:expressions:expression_syntax#model_builder_syntax|In Model Builder mode]] |
- | -[[Visual3D:Documentation:Pipeline:Expressions:Expression_Items#Pipeline_Parameters|Pipeline_Parameters]] | + | -[[visual3d:documentation:pipeline:expressions:expression_syntax#Model_Metric_Syntax|Model Metrics]] |
- | -[[Visual3D:Documentation:Pipeline:Expressions:Expression_Items#Tags|Tags]] | + | -[[visual3d:documentation:pipeline:expressions:expression_syntax#pipeline_parameter_syntax|Pipeline Parameters]] |
- | -[[Visual3D:Documentation:Pipeline:Expressions:Expression_Items#C3D_Parameters|C3D_Parameters]] | + | -[[visual3d:documentation:pipeline:expressions:expression_syntax#tag_syntax|File Tags]] |
- | -[[Visual3D:Documentation:Pipeline:Expressions:Expression_Items#Model_Metrics|Model Metrics]] | + | -[[visual3d:documentation:pipeline:expressions:expression_syntax#C3D_Parameter_Syntax|C3D Parameters]] |
-[[Visual3D: | -[[Visual3D: | ||
- | ==== Visual3D Reserved Characters ==== | + | ===== Visual3D Reserved Characters |
There are five characters that cause the expression parser considerable trouble. We have introduced reserved pipeline commands that can be used in the place of these characters. | There are five characters that cause the expression parser considerable trouble. We have introduced reserved pipeline commands that can be used in the place of these characters. | ||
Line 41: | Line 41: | ||
|[[Visual3D: | |[[Visual3D: | ||
- | ==== Visual3D Reserved Names ==== | + | ===== Visual3D Reserved Names ===== |
We have introduced reserved names for a few common ideas that are useful to reference in constructing expressions. | We have introduced reserved names for a few common ideas that are useful to reference in constructing expressions. | ||
Line 50: | Line 50: | ||
|[[Visual3D: | |[[Visual3D: | ||
- | ==== Numbers ==== | + | ===== Numbers |
We have introduced three number-related functions to aid in the construction of expressions. | We have introduced three number-related functions to aid in the construction of expressions. | ||
Line 59: | Line 59: | ||
|[[Visual3D: | |[[Visual3D: | ||
- | ==== Mathematical Operators ==== | + | ===== Mathematical Operators |
In its simplest use, the Evaluate_Expression command can be used to evaluate arbitrary mathematical expressions. Use the following characters for your mathematical operators. | In its simplest use, the Evaluate_Expression command can be used to evaluate arbitrary mathematical expressions. Use the following characters for your mathematical operators. | ||
Line 79: | Line 79: | ||
|[[Visual3D: | |[[Visual3D: | ||
- | **Note: Visual3D parses the mathematical operators before it parses the signal names. If you have a signal name that contains a mathematical operator (e.g. R-Foot1), Visual3D will probably not be able to parse the equation expression properly.** | + | **Note:** Visual3D parses the mathematical operators before it parses the signal names. If you have a signal name that contains a mathematical operator (e.g. R-Foot1), Visual3D will probably not be able to parse the equation expression properly. |
**Also Note the potential conflict between some of the operators and the reserved characters. If the string is obviously an expression, there is no conflict.** | **Also Note the potential conflict between some of the operators and the reserved characters. If the string is obviously an expression, there is no conflict.** | ||
- | === The ugly truth of the logical AND=== | + | ==== The ugly truth of the logical AND==== |
The & character is used by Visual3D for concatenating strings. This works quite well, but there is one circumstance where this choice of delimiter is a nuisance. That is when you want & to actually be a logical AND and the parser throws it away. | The & character is used by Visual3D for concatenating strings. This works quite well, but there is one circumstance where this choice of delimiter is a nuisance. That is when you want & to actually be a logical AND and the parser throws it away. | ||
Line 97: | Line 98: | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
! But what if you want to generalize and use another pipeline parameter for TEST2 | ! But what if you want to generalize and use another pipeline parameter for TEST2 | ||
Line 103: | Line 104: | ||
/ | / | ||
/ | / | ||
- | **;** | + | ; |
Select_Active_File | Select_Active_File | ||
/ | / | ||
/ | / | ||
! / | ! / | ||
- | **;** | + | ; |
</ | </ | ||
- | ==== Brackets ==== | + | ===== Brackets |
^Brackets | ^Brackets | ||
Line 117: | Line 119: | ||
|[[Visual3D: | |[[Visual3D: | ||
- | ==== Functions ==== | + | ===== Functions |
Visual3D has pre-defined functions embedded in the pipeline to help you construct your expressions. These functions are commonly used or have been added based on customer use. | Visual3D has pre-defined functions embedded in the pipeline to help you construct your expressions. These functions are commonly used or have been added based on customer use. | ||
- | === Metric Functions === | + | ==== Metric Functions |
*[[Visual3D: | *[[Visual3D: | ||
Line 135: | Line 137: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | === Signal Functions === | + | ==== Signal Functions |
*[[Visual3D: | *[[Visual3D: | ||
Line 147: | Line 149: | ||
*[[Visual3D: | *[[Visual3D: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | *[[Visual3D: | + | *[[Visual3D: |
+ | *[[Visual3D: | ||
+ | *[[Visual3D: | ||
*[[Visual3D: | *[[Visual3D: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | *[[Visual3D: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | === String Data === | + | ==== String Data ==== |
*[[Visual3D: | *[[Visual3D: | ||
Line 167: | Line 170: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | === Least Squares Fitting of Data === | + | ==== Least Squares Fitting of Data ==== |
*[[Visual3D: | *[[Visual3D: | ||
Line 174: | Line 177: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | === Intersection Functions === | + | ==== Intersection Functions |
*[[Visual3D: | *[[Visual3D: | ||
Line 182: | Line 185: | ||
*[[Visual3D: | *[[Visual3D: | ||
*[[Visual3D: | *[[Visual3D: | ||
+ | *[[Visual3D: | ||
+ | *[[Visual3D: | ||
+ | |||
- | === Assigned Force Functions === | + | ==== Assigned Force Functions |
*[[Visual3D: | *[[Visual3D: | ||
Line 189: | Line 195: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | === Trigonometric Functions === | + | ==== Trigonometric Functions |
*[[Visual3D: | *[[Visual3D: | ||
Line 201: | Line 207: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | === Array and Matrix Functions === | + | ==== Array and Matrix Functions |
*[[Visual3D: | *[[Visual3D: | ||
Line 209: | Line 215: | ||
*[[Visual3D: | *[[Visual3D: | ||
*[[Visual3D: | *[[Visual3D: | ||
- | *[[Visual3D: | + | *[[Visual3D: |
- | === Common Math Expressions === | + | ==== Common Math Expressions |
* **int(a**) - truncate each component to the nearest integer | * **int(a**) - truncate each component to the nearest integer | ||
Line 227: | Line 233: | ||
* **cross (a, b)** -- creates the cross product of a and b | * **cross (a, b)** -- creates the cross product of a and b | ||
- | ==== Expression Examples ==== | + | ===== Expression Examples |
Examples of using Evaluate_Expressions can be found here: **[[Visual3D: | Examples of using Evaluate_Expressions can be found here: **[[Visual3D: |
visual3d/documentation/pipeline/expressions/expressions_overview.1722456997.txt.gz · Last modified: 2024/07/31 20:16 by wikisysop