GearGeom Functions

This group of functions is available for interacting with the Bogie list of a GearGeom through the API.

CreateAndAddBogie(gear_id)

Create a new Bogie and add it to the end of the Bogie list of the specified GearGeom.

GetNumBogies(gear_id)

Get the number of Bogies in the specified GearGeom.

GetAllBogies(gear_id)

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

DelBogie(gear_id, bogie_id)

Delete the specified Bogie from the specified GearGeom.

DelAllBogies(gear_id)

Delete all Bogies from the specified GearGeom.

Details

openvsp.CreateAndAddBogie(gear_id)[source]

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.

gear_id = AddGeom( "GEAR", "" )             # Add a landing gear Geom

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

See also: GetAllBogies, GetNumBogies, DelBogie, DelAllBogies :param [in]: gear_id string GearGeom Geom ID :rtype: string :return: string ParmContainer ID for the newly added Bogie

openvsp.GetNumBogies(gear_id)[source]

Get the number of Bogies in the specified GearGeom.

gear_id = AddGeom( "GEAR", "" )

CreateAndAddBogie( gear_id )
CreateAndAddBogie( gear_id )

num_bogie = GetNumBogies( gear_id )            # num_bogie == 2

assert num_bogie == 2, "GetNumBogies, two were added"

See also: CreateAndAddBogie, GetAllBogies :param [in]: gear_id string GearGeom Geom ID :rtype: int :return: int Number of Bogies in the specified GearGeom

openvsp.GetAllBogies(gear_id)[source]

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

gear_id = AddGeom( "GEAR", "" )

CreateAndAddBogie( gear_id )
CreateAndAddBogie( gear_id )

bogie_ids = GetAllBogies( gear_id )
assert len( bogie_ids ) > 0, "GetAllBogies returned nothing"

See also: CreateAndAddBogie, GetNumBogies, DelBogie :param [in]: gear_id string GearGeom Geom ID :rtype: std::vector< std::string,std::allocator< std::string > > :return: vector<string> Vector of Bogie ParmContainer IDs

openvsp.DelBogie(gear_id, bogie_id)[source]

Delete the specified Bogie from the specified GearGeom.

gear_id = AddGeom( "GEAR", "" )

bogie_id = CreateAndAddBogie( gear_id )

num_before_del = GetNumBogies( gear_id )
DelBogie( gear_id, bogie_id )
assert GetNumBogies( gear_id ) < num_before_del, "DelBogie removed nothing"

See also: CreateAndAddBogie, DelAllBogies :param [in]: gear_id string GearGeom Geom ID :param [in]: bogie_id string Bogie ParmContainer ID

openvsp.DelAllBogies(gear_id)[source]

Delete all Bogies from the specified GearGeom.

gear_id = AddGeom( "GEAR", "" )

CreateAndAddBogie( gear_id )
CreateAndAddBogie( gear_id )

DelAllBogies( gear_id )                            # GetNumBogies( gear_id ) == 0
assert GetNumBogies( gear_id ) == 0, "DelAllBogies left something behind"

See also: CreateAndAddBogie, DelBogie :param [in]: gear_id string GearGeom Geom ID