OpenVSP API Documentation 3.55.0
Loading...
Searching...
No Matches
GearGeom Functions

This group of functions is available for interacting with the Bogie list of a GearGeom through the API. Click here to return to the main page. More...

Functions

std::string vsp::CreateAndAddBogie (const std::string &gear_id)
int vsp::GetNumBogies (const std::string &gear_id)
std::vector< std::string > vsp::GetAllBogies (const std::string &gear_id)
void vsp::DelBogie (const std::string &gear_id, const std::string &bogie_id)
void vsp::DelAllBogies (const std::string &gear_id)
void vsp::SetBogieStowParentID (const std::string &bogie_id, const std::string &geom_id)
std::string vsp::GetBogieStowParentID (const std::string &bogie_id)
void vsp::SetBogieMechParentID (const std::string &bogie_id, const std::string &geom_id)
std::string vsp::GetBogieMechParentID (const std::string &bogie_id)

Detailed Description

Function Documentation

◆ CreateAndAddBogie()

std::string vsp::CreateAndAddBogie ( const std::string & gear_id)
extern

Create a new Bogie and add it to the end of the Bogie list of the specified GearGeom. A GearGeom's landing gear is described by its list of Bogies. Each Bogie is a ParmContainer, so once you have the returned Bogie ID you can query and set its Parms with the normal Parm API functions.

string gear_id = AddGeom( "GEAR", "" ); // Add a landing gear Geom
string bogie_id = CreateAndAddBogie( gear_id ); // Create and add a Bogie
// Bogies are ParmContainers -- work with their Parms once you have the ID.
SetParmVal( bogie_id, "NumAcross", "Bogie", 2 ); // Two wheels across
SetParmVal( bogie_id, "NumTandem", "Bogie", 2 ); // Two wheels in tandem
if ( bogie_id.length() == 0 || bogie_id == "NONE" )
{
Print( "ERROR: CreateAndAddBogie returned no id" );
__failure++;
}
void Print(const std::string &data, bool new_line=true)
std::string CreateAndAddBogie(const std::string &gear_id)
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
double SetParmVal(const std::string &parm_id, double val)
See also
GetAllBogies, GetNumBogies, DelBogie, DelAllBogies
Parameters
[in]gear_idstring GearGeom Geom ID
Returns
string ParmContainer ID for the newly added Bogie
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DelAllBogies()

void vsp::DelAllBogies ( const std::string & gear_id)
extern

Delete all Bogies from the specified GearGeom.

string gear_id = AddGeom( "GEAR", "" );
CreateAndAddBogie( gear_id );
CreateAndAddBogie( gear_id );
DelAllBogies( gear_id ); // GetNumBogies( gear_id ) == 0
if ( GetNumBogies( gear_id ) != 0 )
{
Print( "ERROR: DelAllBogies left something behind" );
__failure++;
}
int GetNumBogies(const std::string &gear_id)
void DelAllBogies(const std::string &gear_id)
See also
CreateAndAddBogie, DelBogie
Parameters
[in]gear_idstring GearGeom Geom ID
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DelBogie()

void vsp::DelBogie ( const std::string & gear_id,
const std::string & bogie_id )
extern

Delete the specified Bogie from the specified GearGeom.

string gear_id = AddGeom( "GEAR", "" );
string bogie_id = CreateAndAddBogie( gear_id );
int num_before_del = GetNumBogies( gear_id );
DelBogie( gear_id, bogie_id );
if ( GetNumBogies( gear_id ) >= num_before_del )
{
Print( "ERROR: DelBogie removed nothing" );
__failure++;
}
void DelBogie(const std::string &gear_id, const std::string &bogie_id)
See also
CreateAndAddBogie, DelAllBogies
Parameters
[in]gear_idstring GearGeom Geom ID
[in]bogie_idstring Bogie ParmContainer ID
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAllBogies()

std::vector< std::string > vsp::GetAllBogies ( const std::string & gear_id)
extern

Get the ParmContainer IDs of all the Bogies in the specified GearGeom, in list order.

string gear_id = AddGeom( "GEAR", "" );
CreateAndAddBogie( gear_id );
CreateAndAddBogie( gear_id );
array<string> @bogie_ids = GetAllBogies( gear_id );
if ( bogie_ids.length() == 0 )
{
Print( "ERROR: GetAllBogies returned nothing" );
__failure++;
}
std::vector< std::string > GetAllBogies(const std::string &gear_id)
See also
CreateAndAddBogie, GetNumBogies, DelBogie
Parameters
[in]gear_idstring GearGeom Geom ID
Returns
vector<string> Vector of Bogie ParmContainer IDs
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBogieMechParentID()

std::string vsp::GetBogieMechParentID ( const std::string & bogie_id)
extern

Get the Geom a bogie retracts on.

string pod_id = AddGeom( "POD" );
string gear_id = AddGeom( "GEAR" );
string bogie_id = CreateAndAddBogie( gear_id );
// A bogie only keeps a mechanism parent while it retracts by mechanism
SetParmVal( bogie_id, "RetMode", "Retract", GEAR_MECHANISM );
SetBogieMechParentID( bogie_id, pod_id );
if ( GetBogieMechParentID( bogie_id ) != pod_id )
{
Print( "ERROR: GetBogieMechParentID did not return the Geom set" );
__failure++;
}
@ GEAR_MECHANISM
Definition APIDefines.h:920
void SetBogieMechParentID(const std::string &bogie_id, const std::string &geom_id)
std::string GetBogieMechParentID(const std::string &bogie_id)
See also
SetBogieMechParentID
Parameters
[in]bogie_idstring Bogie ID
Returns
string Geom ID, or an empty string for none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBogieStowParentID()

std::string vsp::GetBogieStowParentID ( const std::string & bogie_id)
extern

Get the Geom a bogie stows into.

string pod_id = AddGeom( "POD" );
string gear_id = AddGeom( "GEAR" );
string bogie_id = CreateAndAddBogie( gear_id );
SetBogieStowParentID( bogie_id, pod_id );
if ( GetBogieStowParentID( bogie_id ) != pod_id )
{
Print( "ERROR: GetBogieStowParentID did not return the Geom set" );
__failure++;
}
void SetBogieStowParentID(const std::string &bogie_id, const std::string &geom_id)
std::string GetBogieStowParentID(const std::string &bogie_id)
See also
SetBogieStowParentID
Parameters
[in]bogie_idstring Bogie ID
Returns
string Geom ID, or an empty string for none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNumBogies()

int vsp::GetNumBogies ( const std::string & gear_id)
extern

Get the number of Bogies in the specified GearGeom.

string gear_id = AddGeom( "GEAR", "" );
CreateAndAddBogie( gear_id );
CreateAndAddBogie( gear_id );
int num_bogie = GetNumBogies( gear_id ); // num_bogie == 2
if ( num_bogie != 2 )
{
Print( "ERROR: GetNumBogies, two were added" );
__failure++;
}
See also
CreateAndAddBogie, GetAllBogies
Parameters
[in]gear_idstring GearGeom Geom ID
Returns
int Number of Bogies in the specified GearGeom
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetBogieMechParentID()

void vsp::SetBogieMechParentID ( const std::string & bogie_id,
const std::string & geom_id )
extern

Set the Geom a bogie retracts on, or an empty string for none.

string pod_id = AddGeom( "POD" );
string gear_id = AddGeom( "GEAR" );
string bogie_id = CreateAndAddBogie( gear_id );
// A bogie only keeps a mechanism parent while it retracts by mechanism
SetParmVal( bogie_id, "RetMode", "Retract", GEAR_MECHANISM );
SetBogieMechParentID( bogie_id, pod_id );
if ( GetBogieMechParentID( bogie_id ) != pod_id )
{
Print( "ERROR: SetBogieMechParentID did not set the Geom" );
__failure++;
}
See also
GetBogieMechParentID
Parameters
[in]bogie_idstring Bogie ID
[in]geom_idstring Geom ID, or an empty string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetBogieStowParentID()

void vsp::SetBogieStowParentID ( const std::string & bogie_id,
const std::string & geom_id )
extern

Set the Geom a bogie stows into, or an empty string for none.

string pod_id = AddGeom( "POD" );
string gear_id = AddGeom( "GEAR" );
string bogie_id = CreateAndAddBogie( gear_id );
SetBogieStowParentID( bogie_id, pod_id );
if ( GetBogieStowParentID( bogie_id ) != pod_id )
{
Print( "ERROR: SetBogieStowParentID did not set the Geom" );
__failure++;
}
See also
GetBogieStowParentID
Parameters
[in]bogie_idstring Bogie ID
[in]geom_idstring Geom ID, or an empty string
Here is the call graph for this function:
Here is the caller graph for this function: