This group of functions is available for adding, deleting, and modifying OpenVSP Geoms through the API.
Click here to return to the main page.
More...
◆ AddGeom()
Add a new Geom of given type as a child of the specified parent. If no parent or an invalid parent is given, the Geom is placed at the top level
string wing_id =
AddGeom(
"WING" );
- Parameters
-
[in] | type | Geom type (i.e FUSELAGE, POD, etc.) |
[in] | parent | Parent Geom ID |
- Returns
- Geom ID
◆ CopyGeomToClipboard()
void CopyGeomToClipboard |
( |
const string &in |
geom_id | ) |
|
Copy Geom from current location and store on clipboard
string pid1 =
AddGeom(
"POD",
"" );
string pid2 =
AddGeom(
"POD",
"" );
if ( geom_ids.size() != 3 ) {
Print(
"---> Error: API Copy/Paste Geom " ); }
- See also
- PasteGeomClipboard
- Parameters
-
◆ CutGeomToClipboard()
void CutGeomToClipboard |
( |
const string &in |
geom_id | ) |
|
Cut Geom from current location and store on clipboad
string pid1 =
AddGeom(
"POD",
"" );
string pid2 =
AddGeom(
"POD",
"" );
if ( geom_ids.size() != 2 ) {
Print(
"---> Error: API Cut/Paste Geom " ); }
- See also
- PasteGeomClipboard
- Parameters
-
◆ DeleteGeom()
void DeleteGeom |
( |
const string &in |
geom_id | ) |
|
Delete a particular Geom
string wing_id =
AddGeom(
"WING" );
- Parameters
-
◆ DeleteGeomVec()
void DeleteGeomVec |
( |
string@ [] |
del_arr | ) |
|
Delete multiple Geoms
- Parameters
-
[in] | del_arr | Array of Geom IDs |
◆ FindGeom()
Find and return the Geom ID with the specified name at given index. Equivalent to FindGeomsWithName( name )[index].
geom_id =
FindGeom(
"ExamplePodName", 0 );
if ( geom_ids[0] != geom_id )
{
Print(
"---> Error: API FindGeom & FindGeomsWithName" );
}
- See also
- FindGeomsWithName
- Parameters
-
[in] | name | Geom name |
[in] | index | |
- Returns
- Geom ID with name at specified index
◆ FindGeoms()
Find and return all Geom IDs in the model
string pod1 =
AddGeom(
"POD",
"" );
string pod2 =
AddGeom(
"POD",
"" );
if ( geom_ids.size() != 2 ) {
Print(
"---> Error: API FindGeoms " ); }
- Returns
- Array of all Geom IDs
◆ FindGeomsWithName()
Find and return all Geom IDs with the specified name
if ( geom_ids.size() != 1 )
{
Print(
"---> Error: API FindGeomsWithName " );
}
- See also
- FindGeom
- Parameters
-
- Returns
- Array of Geom IDs
◆ GetGeomBBoxMax()
vec3d GetGeomBBoxMax |
( |
const string &in |
geom_id, |
|
|
int |
main_surf_ind = 0 , |
|
|
bool |
ref_frame_is_absolute = true |
|
) |
| |
Get the the maximum coordinate of the bounding box of a Geom with given main surface index. The Geom bounding box may be specified in absolute or body reference frame.
- See also
- GetGeomBBoxMin
- Parameters
-
[in] | geom_id | Geom ID |
[in] | main_surf_ind | Main surface index |
[in] | ref_frame_is_absolute | Flag to specify absolute or body reference frame |
- Returns
- Maximum coordinate of the bounding box
◆ GetGeomBBoxMin()
vec3d GetGeomBBoxMin |
( |
const string &in |
geom_id, |
|
|
int |
main_surf_ind = 0 , |
|
|
bool |
ref_frame_is_absolute = true |
|
) |
| |
Get the the minimum coordinate of the bounding box of a Geom with given main surface index. The Geom bounding box may be specified in absolute or body reference frame.
- See also
- GetGeomBBoxMax
- Parameters
-
[in] | geom_id | Geom ID |
[in] | main_surf_ind | Main surface index |
[in] | ref_frame_is_absolute | Flag to specify absolute or body reference frame |
- Returns
- Minimum coordinate of the bounding box
◆ GetGeomChildren()
Get the IDs for each child of the input parent Geom.
string pod2 =
AddGeom(
"POD", pod1 );
string pod3 =
AddGeom(
"POD", pod2 );
Print(
"Children of Pod #1: " );
for ( int 1 = 0; i < children.size(); i++ )
{
}
- Parameters
-
- Returns
- Array of child Geom IDs
◆ GetGeomName()
Get the name of a specific Geom
- Parameters
-
- Returns
- Geom name
◆ GetGeomParent()
Get the parent Geom ID for the input child Geom. "NONE" is returned if the Geom has no parent.
string pod2 =
AddGeom(
"POD", pod1 );
Print(
"Parent ID of Pod #2: ",
false );
- Parameters
-
- Returns
- Parent Geom ID
◆ GetGeomParmIDs()
Get all Parm IDs associated with this Geom Parm container
Print(
string(
"---> Test Get Parm Arrays" ) );
if ( parm_array.size() < 1 ) {
Print(
"---> Error: API GetGeomParmIDs " ); }
- Parameters
-
- Returns
- Array of Parm IDs
◆ GetGeomTypeName()
Get the type name of specified Geom (i.e. FUSELAGE)
string wing_id =
AddGeom(
"WING" );
Print(
"Geom Type Name: ",
false );
- Parameters
-
- Returns
- Geom type name
◆ GetGeomTypes()
Get an array of all Geom types (i.e FUSELAGE, POD, etc.)
string pod1 =
AddGeom(
"POD",
"" );
string pod2 =
AddGeom(
"POD",
"" );
if ( type_array[0] !=
"POD" ) {
Print(
"---> Error: API GetGeomTypes " ); }
- Returns
- Array of Geom type names
◆ GetGeomVSPSurfCfdType()
int GetGeomVSPSurfCfdType |
( |
const string &in |
geom_id, |
|
|
int |
main_surf_ind = 0 |
|
) |
| |
Get the VSP surface CFD type of the specified Geom
string wing_id =
AddGeom(
"WING" );
{
Print(
"---> Error: API GetGeomVSPSurfCfdType " );
}
- See also
- VSP_SURF_CFD_TYPE
- Parameters
-
[in] | geom_id | Geom ID |
[in] | main_surf_ind | Main surface index |
- Returns
- VSP surface CFD type enum (i.e. CFD_TRANSPARENT)
◆ GetGeomVSPSurfType()
int GetGeomVSPSurfType |
( |
const string &in |
geom_id, |
|
|
int |
main_surf_ind = 0 |
|
) |
| |
Get the VSP surface type of the specified Geom
string wing_id =
AddGeom(
"WING" );
{
Print(
"---> Error: API GetGeomVSPSurfType " );
}
- See also
- VSP_SURF_TYPE
- Parameters
-
[in] | geom_id | Geom ID |
[in] | main_surf_ind | Main surface index |
- Returns
- VSP surface type enum (i.e. DISK_SURF)
◆ GetNumMainSurfs()
int GetNumMainSurfs |
( |
const string &in |
geom_id | ) |
|
Get the number of main surfaces for the specified Geom. Multiple main surfaces may exist for CustoGeoms, propellors, etc., but does not include surfaces created due to symmetry.
string prop_id =
AddGeom(
"PROP" );
Print(
"Number of Propeller Surfaces: ",
false );
- Parameters
-
- Returns
- Number of main surfaces
◆ GetTotalNumSurfs()
int GetTotalNumSurfs |
( |
const string &in |
geom_id | ) |
|
Get the total number of surfaces for the specified Geom. This is equivalent to the number of main surface multiplied by the number of symmetric copies.
string wing_id =
AddGeom(
"WING" );
int num_surf = GetNumMaGetTotalNumSurfsinSurfs( wing_id );
Print(
"Total Number of Wing Surfaces: ",
false );
- Parameters
-
- Returns
- Number of main surfaces
◆ PasteGeomClipboard()
string [] PasteGeomClipboard |
( |
const string &in |
parent_id = "" | ) |
|
Paste Geom from clipboard into the model. The Geom is pasted as a child of the specified parent, but will be placed at top level if no parent or an invalid one is provided.
string pid1 =
AddGeom(
"POD",
"" );
string pid2 =
AddGeom(
"POD",
"" );
if ( geom_ids.size() != 2 ) {
Print(
"---> Error: API Cut/Paste Geom " ); }
- Parameters
-
[in] | parent_id | Parent Geom ID |
- Returns
- Array of pasted Geom IDs
◆ SetGeomName()
void SetGeomName |
( |
const string &in |
geom_id, |
|
|
const string &in |
name |
|
) |
| |
Set the name of the specified Geom
if ( geom_ids.size() != 1 )
{
Print(
"---> Error: API FindGeomsWithName " );
}
- Parameters
-
[in] | geom_id | Geom ID |
[in] | name | Geom name |
◆ UpdateGeom()
void UpdateGeom |
( |
const string &in |
geom_id | ) |
|
Perform an update for the specified Geom
string wing_id =
AddGeom(
"WING" );
SetParmVal( pod_id,
"X_Rel_Location",
"XForm", 5.0 );
- See also
- Update()
- Parameters
-