GearGeom Functions¶
This group of functions is available for interacting with the Bogie list of a GearGeom through the API.
|
Create a new Bogie and add it to the end of the Bogie list of the specified GearGeom. |
|
Get the number of Bogies in the specified GearGeom. |
|
Get the ParmContainer IDs of all the Bogies in the specified GearGeom, in list order. |
|
Delete the specified Bogie from the specified GearGeom. |
|
Delete all Bogies from the specified GearGeom. |
|
Set the Geom a bogie stows into, or an empty string for none. |
|
Get the Geom a bogie stows into. |
|
Set the Geom a bogie retracts on, or an empty string for none. |
|
Get the Geom a bogie retracts on. |
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
- openvsp.SetBogieStowParentID(bogie_id, geom_id)[source]¶
Set the Geom a bogie stows into, or an empty string for none.
pod_id = AddGeom( "POD" ) gear_id = AddGeom( "GEAR" ) bogie_id = CreateAndAddBogie( gear_id ) SetBogieStowParentID( bogie_id, pod_id ) assert GetBogieStowParentID( bogie_id ) == pod_id, "SetBogieStowParentID did not set the Geom"
See also: GetBogieStowParentID :param [in]: bogie_id string Bogie ID :param [in]: geom_id string Geom ID, or an empty string
- openvsp.GetBogieStowParentID(bogie_id)[source]¶
Get the Geom a bogie stows into.
pod_id = AddGeom( "POD" ) gear_id = AddGeom( "GEAR" ) bogie_id = CreateAndAddBogie( gear_id ) SetBogieStowParentID( bogie_id, pod_id ) assert GetBogieStowParentID( bogie_id ) == pod_id, "GetBogieStowParentID did not return the Geom set"
See also: SetBogieStowParentID :param [in]: bogie_id string Bogie ID :rtype: string :return: string Geom ID, or an empty string for none
- openvsp.SetBogieMechParentID(bogie_id, geom_id)[source]¶
Set the Geom a bogie retracts on, or an empty string for none.
pod_id = AddGeom( "POD" ) gear_id = AddGeom( "GEAR" ) 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 ) assert GetBogieMechParentID( bogie_id ) == pod_id, "SetBogieMechParentID did not set the Geom"
See also: GetBogieMechParentID :param [in]: bogie_id string Bogie ID :param [in]: geom_id string Geom ID, or an empty string
- openvsp.GetBogieMechParentID(bogie_id)[source]¶
Get the Geom a bogie retracts on.
pod_id = AddGeom( "POD" ) gear_id = AddGeom( "GEAR" ) 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 ) assert GetBogieMechParentID( bogie_id ) == pod_id, "GetBogieMechParentID did not return the Geom set"
See also: SetBogieMechParentID :param [in]: bogie_id string Bogie ID :rtype: string :return: string Geom ID, or an empty string for none