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 |
◆ 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 " );
}
- Parameters
-
- Returns
- Array of Geom IDs
◆ 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
◆ 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, when symmetry is actve, etc.
string prop_id =
AddGeom(
"PROP" );
Print(
"Number of Propeller 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
-