The Vehicle group of functions are high-level commands that pertain to the entire OpenVSP model. Click here to return to the main page.
More...
◆ ClearVSPModel()
void vsp::ClearVSPModel |
( |
| ) |
|
|
extern |
Clear the current OpenVSP model
string fid =
AddGeom(
"FUSELAGE",
"" );
Print( string( "--->Resetting VSP model to blank slate\n" ) );
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
◆ GetAndResetUpdateCount()
int vsp::GetAndResetUpdateCount |
( |
| ) |
|
|
extern |
Return the OpenVSP update count and also reset it to zero.
The OpenVSP update count tracks how many times the GUI has been told to update screens (set to dirty). It provides a simple means of testing whether the OpenVSP state has possibly changed (non-zero returned).
- Returns
- int OpenVSP update count
◆ GetVSPFileName()
std::string vsp::GetVSPFileName |
( |
| ) |
|
|
extern |
Get the file name of the current OpenVSP project
string fid =
AddGeom(
"FUSELAGE",
"" );
string fname = "example_fuse.vsp3";
Print( "\tSaving vehicle file to: ", false );
Print( fname );
void SetVSP3FileName(const std::string &file_name)
void WriteVSPFile(const std::string &file_name, int set=SET_ALL)
void Update(bool update_managers=true)
std::string GetVSPFileName()
- Returns
- File name for the current OpenVSP project
◆ Update()
void vsp::Update |
( |
bool | update_managers = true | ) |
|
|
extern |
Update the entire vehicle and all lower level children. An input, which is true by default, is available to specify if managers should be updated as well. The managers are typically updated by their respective GUI, so must be updated through the API as well to avoid unexpected behavior.
string fid =
AddGeom(
"FUSELAGE",
"" );
void SetXSecTanAngles(const std::string &xsec_id, int side, double top, double right, double bottom, double left)
std::string GetXSecSurf(const std::string &geom_id, int index)
std::string GetXSec(const std::string &xsec_surf_id, int xsec_index)
int GetNumXSec(const std::string &xsec_surf_id)
- Parameters
-
update_managers | Flag to indicate if managers should be updated |
◆ VSPCrash()
void vsp::VSPCrash |
( |
int | crash_type | ) |
|
|
extern |
Cause OpenVSP to crash in a variety of ways.
- Parameters
-
[in] | int | crash_type Type of crash to attempt. |
◆ VSPExit()
void vsp::VSPExit |
( |
int | error_code | ) |
|
|
extern |
Exit the program with a specific error code
- Parameters
-