This group of functions is provided for general API utilities, such as printing to stdout, performing basic math functions, and identifying basic OpenVSP information.
Click here to return to the main page.
More...
◆ Deg2Rad()
double Deg2Rad |
( |
double |
d | ) |
|
Convert degrees to radians
- Parameters
-
- Returns
- Value in radians
◆ GetVSPExePath()
Get the path to the OpenVSP executable. OpenVSP will assume that the VSPAERO, VSPSLICER, and VSPVIEWER are in the same directory unless instructed otherwise.
Print(
"The current VSP executable path is: ",
false );
- Returns
- Path to the OpenVSP executable
◆ GetVSPVersion()
Get the version of the OpenVSP instance currently running
Print(
"The current OpenVSP version is: ",
false );
- Returns
- OpenVSP version string (i.e. "OpenVSP 3.17.1")
◆ Max()
double Max |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Get the maximum of two values -> (x > y ) ? x : y
double max_val =
Min( 1.0, 2.0 );
if ( abs( 2.0 - max_val ) > 1e-6 ) {
Print(
"Error: Max" ); }
- Parameters
-
[in] | x | First value |
[in] | y | Second value |
- Returns
- Largest of x and y
◆ Min()
double Min |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Get the minimum of two values -> (x < y ) ? x : y
double min_val =
Min( 1.0, 2.0 );
if ( abs( 1.0 - min_val ) > 1e-6 ) {
Print(
"Error: Min" ); }
- Parameters
-
[in] | x | First value |
[in] | y | Second value |
- Returns
- Smallest of x and y
◆ Print() [1/4]
void Print |
( |
const string &in |
data, |
|
|
bool |
new_line = true |
|
) |
| |
Print a string to stdout
Print(
string(
"This is an example of printing a string to stdout." ) );
- Parameters
-
[in] | data | Value of string type |
[in] | new_line | Flag to append a new line escape sequence to data |
◆ Print() [2/4]
void Print |
( |
const vec3d &in |
data, |
|
|
bool |
new_line = true |
|
) |
| |
Print a vec3d to stdout
- Parameters
-
[in] | data | Value of vec3d type |
[in] | new_line | Flag to append a new line escape sequence to data |
◆ Print() [3/4]
void Print |
( |
double |
data, |
|
|
bool |
new_line = true |
|
) |
| |
Print a double to stdout
- Parameters
-
[in] | data | Value of double type |
[in] | new_line | Flag to append a new line escape sequence to data |
◆ Print() [4/4]
void Print |
( |
int |
data, |
|
|
bool |
new_line = true |
|
) |
| |
Print an integer to stdout
- Parameters
-
[in] | data | integer value |
[in] | new_line | flag to append a new line escape sequence to data |
◆ Rad2Deg()
double Rad2Deg |
( |
double |
r | ) |
|
Convert radians to degrees
- Parameters
-
- Returns
- Value in degrees
◆ VSPCheckSetup()
Check if OpenVSP has been initialized successfully. If not, the OpenVSP instance will be exited. This call should be placed at the begining of all API scripts.
◆ VSPRenew()
Clear and reinitialize OpenVSP to all default settings
SetParmVal( pod_id,
"Y_Rel_Location",
"XForm", 2.0 );